Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 73 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
contents: read
actions: read
id-token: write
attestations: write
Expand Down Expand Up @@ -75,10 +75,81 @@ jobs:
uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4
with:
subject-path: release/*.tgz
- name: Publish immutable GitHub release
- name: Retain verified CLI distribution
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: skillsync-cli
path: release/*
if-no-files-found: error

mac-app:
needs: release
runs-on: macos-15
permissions:
contents: read
id-token: write
attestations: write
artifact-metadata: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: "24"
package-manager-cache: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
with:
python-version: '3.x'
- run: npm ci --ignore-scripts
- run: npm run build
- name: Build and inspect owned portable application
run: |
set -euo pipefail
test "$(uname -m)" = arm64
python3 -m unittest discover -s desktop/tests -p 'test_*.py'
python3 desktop/prepare_runtime.py --output "$GITHUB_WORKSPACE/.release-workspace/runtime"
python3 desktop/build_app.py --runtime "$GITHUB_WORKSPACE/.release-workspace/runtime" --output "$GITHUB_WORKSPACE/.release-workspace/apps"
app="$GITHUB_WORKSPACE/.release-workspace/apps/SkillSync.app"
codesign --verify --deep --strict "$app"
"$app/Contents/MacOS/Workspace" --smoke-check "$RUNNER_TEMP/native-smoke.json" --snapshot "$RUNNER_TEMP/native-smoke.png" --width 390
python3 -c 'import json,sys; assert json.load(open(sys.argv[1]))["success"] is True' "$RUNNER_TEMP/native-smoke.json"
mkdir release
version="${GITHUB_REF_NAME#v}"
archive="release/skillsync-app-v$version-aarch64-apple-darwin.zip"
ditto -c -k --sequesterRsrc --keepParent "$app" "$archive"
python3 desktop/application_manifest.py --application "$app" --archive "$archive" --output "release/skillsync-app-v$version-aarch64-apple-darwin.source.json"
- name: Attest owned portable application
uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4
with:
subject-path: release/*.zip
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: skillsync-mac-app
path: release/*
if-no-files-found: error

publish:
needs: [release, mac-app]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
pattern: skillsync-*
path: release
merge-multiple: true
- name: Verify immutable tag and publish complete distribution
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
ref=$(gh api "repos/$GITHUB_REPOSITORY/git/ref/tags/$GITHUB_REF_NAME" --jq '.object.type+" "+.object.sha')
read -r kind source <<< "$ref"
if [[ "$kind" == tag ]]; then source=$(gh api "repos/$GITHUB_REPOSITORY/git/tags/$source" --jq '.object.sha'); fi
test "$source" = "$GITHUB_SHA"
if gh release view "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then echo 'An existing release must not be overwritten' >&2; exit 1; fi
(cd release && sha256sum *.tgz *.zip *.json > checksums.txt)
gh release create "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --verify-tag \
--title "SkillSync $GITHUB_REF_NAME" --generate-notes release/*
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
node_modules
dist/
/release/
/.release-workspace/
coverage/
.DS_Store
.env
Expand Down
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Changelog

## Unreleased source - 2026-11-02
## 0.4.0 - 2026-11-16

- Check retained repair originals, create a new bounded recovery copy, reopen the same operation after interruption and verify/download the copy without changing the selected directory.
- Bind new backups to the local selected directory, preserve v1 legacy manifests with original-plan verification, and invalidate confirmation on content, permissions or identity changes.
- Retain four private recovery slots, cancellation material and immutable completion evidence; keep queries read-only and copy reports path-redacted.

### Included source follow-ups (2026-11-02)

- Report Git URL/commit declarations as unknown remote identity rather than
authenticated provenance. Explicit unknown-provenance policies also block
Expand All @@ -14,7 +20,7 @@
- Record synthetic small, byte-limit and near-file-limit scan baselines while
retaining the required before/after mutation checks and no cross-request cache.

## Unreleased source - 2026-10-21
### Included workbench follow-ups (2026-10-21)

- Add a loopback graphical workbench for real Skill and contract directories,
with native macOS selection, read-only cancellation and offline report review.
Expand Down
12 changes: 6 additions & 6 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Load the sample, check its frontmatter, and use the reported line and column to

Inspect local Skill folders and declared artifact deliveries. Review provenance, compatibility and changes without executing the Skill.

> **Alpha · GitHub release v0.3.0 · Node.js 20+**
> **Alpha · GitHub release v0.4.0 · Node.js 20+**
> SkillSync performs offline checks of local Skill content. It does not execute Skill scripts, does not read credentials, and does not enable live provider, remote-worker, or runtime capabilities.

GitHub v0.3.0 adds a declared cross-file checklist to HTML, text and JSON reports, including paths, field mappings and capacity limits. Declarations remain separate from actual results, and expected values are omitted. [Review the declaration list](docs/declared-checks.md). It also locates citation metadata failures by file, data record and compared columns. It checks exact digests and revisions without copying record values into reports. The offline review, correction workflow and bounded composite-key reconciliation remain available. The npm registry stays at 0.1.0; use the verified GitHub archive for current features.
GitHub v0.4.0 adds a declared cross-file checklist to HTML, text and JSON reports, including paths, field mappings and capacity limits. Declarations remain separate from actual results, and expected values are omitted. [Review the declaration list](docs/declared-checks.md). It also locates citation metadata failures by file, data record and compared columns. It checks exact digests and revisions without copying record values into reports. The offline review, correction workflow and bounded composite-key reconciliation remain available. The npm registry stays at 0.1.0; use the verified GitHub archive for current features.

[![Terminal demo](https://raw.githubusercontent.com/Chumaniac/skillsync/main/docs/assets/verify-demo.svg)](https://github.com/Chumaniac/skillsync/blob/main/docs/assets/verify-demo.svg)

Expand Down Expand Up @@ -49,7 +49,7 @@ Current source also supports [multi-delivery acceptance plans and portable revie

Tagged builds now publish a CLI tarball, checksums, a validated CycloneDX SBOM
and a source manifest on [GitHub Releases](https://github.com/Chumaniac/skillsync/releases).
[GitHub v0.3.0](https://github.com/Chumaniac/skillsync/releases/tag/v0.3.0)
[GitHub v0.4.0](https://github.com/Chumaniac/skillsync/releases/tag/v0.4.0)
is distributed as a versioned CLI tarball with checksums, SBOM, source manifest
and GitHub provenance. Its release workflow requires the exact immutable tag
and an already successful main check before packaging. Earlier v0.1.7 assets
Expand All @@ -58,12 +58,12 @@ Installation uses Node.js 20+ and fetches the package's public dependencies;
it needs no npm login.

```bash
release_base="https://github.com/Chumaniac/skillsync/releases/download/v0.3.0"
for asset in chumanic-skillsync-0.3.0.tgz checksums.txt sbom.cyclonedx.json release-manifest.json; do
release_base="https://github.com/Chumaniac/skillsync/releases/download/v0.4.0"
for asset in chumanic-skillsync-0.4.0.tgz checksums.txt sbom.cyclonedx.json release-manifest.json; do
curl --fail --location --output "$asset" "$release_base/$asset"
done
shasum -a 256 -c checksums.txt
npm install --prefix ./skillsync-tools ./chumanic-skillsync-0.3.0.tgz
npm install --prefix ./skillsync-tools ./chumanic-skillsync-0.4.0.tgz
./skillsync-tools/node_modules/.bin/skillsync --version
```

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

在运行 Skill 之前,检查它来自哪里、需要哪些权限,以及交付物是否满足声明的规则。

**[打开 SKILL.md 检查器 →](https://chumaniac.github.io/skillsync/)** · [English / CLI reference](README.en.md) · [桌面下载](https://github.com/Chumaniac/skillsync/releases/tag/user-2026.11.11-zh)
**[打开 SKILL.md 检查器 →](https://chumaniac.github.io/skillsync/)** · [English / CLI reference](README.en.md) · [桌面下载](https://github.com/Chumaniac/skillsync/releases/tag/v0.4.0)

进入后,点击「载入示例」再检查文档;出现行列提示时,用「定位错误」回到原文。网页只解析粘贴的文档,本机目录、权限和交付物由 CLI 核验。

Expand Down Expand Up @@ -48,3 +48,5 @@ node dist/cli/index.js verify --path fixtures/product/trust-loop/review --target
[使用指南](docs/user-guide.md) · [构建桌面应用](docs/build.md) · [隐私与备份](docs/privacy.md) · [贡献指南](CONTRIBUTING.md)

修复前的持久备份、并发编辑保全和中断后的核对步骤见[修复与恢复](docs/repair-recovery.md)。工作台会区分完成历史和保留的未完成材料。

修复前文件可在本机核验台检查、恢复到独立副本并只读核验。原目录不被覆盖,旧版备份需关联原计划,结果待查时查询原恢复编号。详见[恢复说明](docs/repair-recovery.md)。GitHub 0.4.0 包与 npm 0.1.0 是不同发行渠道;npm 观察值保持实际记录,不冒充新版已发布。
2 changes: 2 additions & 0 deletions desktop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ The three task sections share a quiet sidebar. File and directory selection, scr
Native smoke checks use port 19012, a dedicated canonical cache directory and nonpersistent WebKit storage. They never use the normal history directory. The project tests use synthetic files and explicit cleanup. Build output is not a user-data backup. Local builds use ad-hoc signing and are not notarized redistribution releases.

完整可移动程序的构建步骤、运行时闭包和许可要求见[构建说明](../docs/build.md)。

The 0.4.0 workbench can check retained repair originals, restore to a new private copy and verify it without changing the selected directory. Source build identity must match the package version and exact Git tree before runtime assembly. The release pipeline includes the portable Apple Silicon app and reports ad-hoc signing explicitly.
44 changes: 44 additions & 0 deletions desktop/application_manifest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
"""Inventory an owned SkillSync application without executing its contents."""
import argparse
import hashlib
import json
import os
from pathlib import Path
import re

def scoped(value):
root=os.path.realpath(os.getcwd()); value=os.path.realpath(os.path.abspath(os.path.expanduser(value)))
if value!=root and not value.startswith(root.rstrip(os.sep)+os.sep):raise ValueError('PATH_OUTSIDE_INVOCATION_ROOT')
return Path(value)
def metadata(path,limit):
if not path.is_file() or path.is_symlink() or path.stat().st_size>limit:raise ValueError('METADATA_INVALID')
return json.loads(path.read_text())
def digest(path):
with path.open('rb') as stream:return hashlib.file_digest(stream,'sha256').hexdigest()
def create(application,archive):
application=scoped(application);archive=scoped(archive)
if not application.is_dir() or application.is_symlink() or not archive.is_file() or archive.is_symlink() or archive.stat().st_size>1024**3:raise ValueError('ARTIFACT_INVALID')
resources=application/'Contents/Resources';config=metadata(resources/'app.json',16384)
runtime=metadata(resources/'runtime/runtime-manifest.json',8*1024**2);build=metadata(resources/'runtime/app/dist/build-info.json',16384)
package=metadata(resources/'runtime/app/package.json',16384);revision=config.get('sourceCommit')
if runtime.get('architecture') not in {'arm64','x86_64'}:raise ValueError('RUNTIME_ARCHITECTURE_INVALID')
if not isinstance(revision,str) or not re.fullmatch('[a-f0-9]{40}',revision) or config.get('includesWorkingTreeChanges') is not False or runtime.get('sourceCommit')!=revision or runtime.get('includesWorkingTreeChanges') is not False or build.get('sourceRevision')!=revision or build.get('dirty') is not False or build.get('version')!=package.get('version'):raise ValueError('SOURCE_IDENTITY_MISMATCH')
files={};total=0
for file in application.rglob('*'):
if file.is_symlink():
if not file.resolve().is_relative_to(application.resolve()):raise ValueError('EXTERNAL_LINK')
continue
if not (file.is_file() or file.is_dir()):raise ValueError('SPECIAL_FILE')
if file.is_file():
name=str(file.relative_to(application));total+=file.stat().st_size
if len(files)>=30000 or total>512*1024**2 or len(name.encode())>1024:raise ValueError('ARTIFACT_CAPACITY')
files[name]=digest(file)
prefix='Contents/Resources/runtime/'
actual={name[len(prefix):]:value for name,value in files.items() if name.startswith(prefix) and name!=prefix+'runtime-manifest.json'}
if actual!=runtime.get('files'):raise ValueError('RUNTIME_BYTES_CHANGED')
return {'schema':'skillsync.application-release/v1','version':package['version'],'architecture':runtime['architecture'],'sourceCommit':revision,'minimumSystemVersion':runtime['minimumSystemVersion'],'archive':archive.name,'sha256':digest(archive),'signing':'ad-hoc','notarized':False,'validation':'file hashes; verify published workflow provenance separately','bytes':total,'files':files}
def main():
p=argparse.ArgumentParser();p.add_argument('--application',type=Path,required=True);p.add_argument('--archive',type=Path,required=True);p.add_argument('--output',type=Path,required=True);a=p.parse_args()
value=create(a.application,a.archive)
with scoped(a.output).open('x') as stream:stream.write(json.dumps(value,sort_keys=True,indent=2)+'\n')
if __name__=='__main__':main()
21 changes: 19 additions & 2 deletions desktop/build_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@

ROOT = Path(__file__).resolve().parents[1]

def validate_portable_profile(config):
expected = {
'executable': '{{RESOURCES}}/runtime/bin/node',
'workingDirectory': '{{RESOURCES}}/runtime/app',
'arguments': ['{{RESOURCES}}/runtime/app/dist/cli/index.js', 'gui', '--state-dir',
'{{HOME}}/Library/Application Support/SkillSync/workspace', '--port', str(config['port'])],
'smokeArguments': ['{{RESOURCES}}/runtime/app/dist/cli/index.js', 'gui', '--state-dir',
'{{SMOKE_DIR}}/state', '--port', str(config['smokePort'])],
}
if config.get('product') != 'skillsync' or any(config.get('launch', {}).get(key) != value for key, value in expected.items()):
raise ValueError('PORTABLE_LAUNCH_PROFILE_INVALID')

def main():
parser = argparse.ArgumentParser()
parser.add_argument('--output', type=Path, default=ROOT / 'desktop/build')
Expand All @@ -21,6 +33,8 @@ def main():
if sys.platform != 'darwin':
raise SystemExit('MACOS_BUILD_REQUIRED')
config = json.loads((ROOT / ('desktop/portable.json' if args.runtime else 'desktop/app.json')).read_text())
if args.runtime:
validate_portable_profile(config)
dirty = bool(subprocess.check_output(['git','status','--porcelain'],cwd=ROOT,text=True).strip())
if dirty and not args.preview:
raise SystemExit('CLEAN_SOURCE_REQUIRED; use --preview only for local review')
Expand Down Expand Up @@ -72,10 +86,11 @@ def main():
binary = app / 'Contents/MacOS/Workspace'
resources = app / 'Contents/Resources'
binary.parent.mkdir(parents=True); resources.mkdir()
product_version = json.loads((ROOT / 'package.json').read_text())['version']
info = {'CFBundleIdentifier': config['identifier'], 'CFBundleName': config['name'],
'CFBundleDisplayName': config['name'], 'CFBundleExecutable': 'Workspace',
'CFBundlePackageType': 'APPL', 'CFBundleIconFile': 'AppIcon', 'CFBundleShortVersionString': '1.0.0',
'CFBundleVersion': '1', 'LSMinimumSystemVersion': '13.0',
'CFBundlePackageType': 'APPL', 'CFBundleIconFile': 'AppIcon', 'CFBundleShortVersionString': product_version,
'CFBundleVersion': product_version, 'LSMinimumSystemVersion': '13.0',
'NSHighResolutionCapable': True,
'NSAppTransportSecurity': {'NSAllowsLocalNetworking': True}}
(app / 'Contents/Info.plist').write_bytes(plistlib.dumps(info))
Expand All @@ -95,6 +110,8 @@ def resolve(value):
raise SystemExit('RUNTIME_MANIFEST_REQUIRED')
import hashlib
manifest = json.loads((runtime / 'runtime-manifest.json').read_text())
if manifest.get('architecture') != platform.machine():
raise SystemExit('RUNTIME_ARCHITECTURE_MISMATCH')
if manifest.get('sourceCommit') != installed['sourceCommit'] or manifest.get('includesWorkingTreeChanges') != dirty:
raise SystemExit('RUNTIME_SOURCE_IDENTITY_MISMATCH')
paths = list(runtime.rglob('*'))
Expand Down
Loading
Loading