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
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ This repository owns WorkDSH Web and Desktop. Desktop and Web consume the same e

## Current authorized npm migration

- The user explicitly requires the latest published DSH release, currently `0.2.1-rc.2` (2026-10-17). Every actual DSH Host, Client and SDK npm package must use this same exact version. Web preview and Desktop preserve the complete native Conversation, using public Workspace/Layout APIs and only the narrowly authorized shared outer-frame patch below, without embedded custom conversation controls. Matching artifact hashes do not prove Desktop packaged-runtime acceptance; do not release Desktop until its runtime and UI checks pass.
- `upstream.json` separately locks each official binary archive's own version, URL, size and SHA-512. The explicitly locked macOS Intel archive remains the official `0.2.1-rc.1` archive solely for Node, pnpm, Python, Office assets and prebuilt command helpers, because no Intel `rc.2` archive is published. It must not supply DSH Host, Client or SDK packages. Preserve its original `runtime.json` and record the source accurately; do not relabel it as `rc.2` or implement an automatic fallback. Intel publication requires checks against its actual packaged x64 Resources, in addition to the common npm version gate.
- The user explicitly requires the latest published DSH release, currently `0.2.1-rc.5` (2026-10-30). Every actual DSH Host, Client and SDK npm package must use this same exact version. Web preview and Desktop preserve the complete native Conversation, using public Workspace/Layout APIs and only the narrowly authorized shared outer-frame patch below, without embedded custom conversation controls. Matching artifact hashes do not prove Desktop packaged-runtime acceptance; do not release Desktop until its runtime and UI checks pass.
- `upstream.json` separately locks each official binary archive's own version, URL, size and SHA-512. The explicitly locked macOS Intel archive remains the official `0.2.1-rc.4` archive solely for Node, pnpm, Python, Office assets and prebuilt command helpers, because no Intel `rc.5` archive is published. It must not supply DSH Host, Client or SDK packages. Preserve its original `runtime.json` and record the source accurately; do not relabel it as `rc.5` or implement an automatic fallback. Intel publication requires checks against its actual packaged x64 Resources, in addition to the common npm version gate.

## Personal and enterprise product boundary

Expand All @@ -47,7 +47,7 @@ This repository owns WorkDSH Web and Desktop. Desktop and Web consume the same e

- Never clone, import or compile official DSH source as part of product builds. `upstream.json` locks published package versions and Desktop archive URLs, sizes and SHA-512 hashes. Extract only runtime dependencies, Office assets and prebuilt command helpers; do not carry a second official Electron application or DSH installation.

- Explicit user-authorized exception (Web preview 2026-10-17; Desktop packaging and release 2026-10-18): the user's latest-version and compatibility-adaptation authorization extends this same two-seam exception to official `0.2.1-rc.2`; both may apply the exact-version/checksum-locked `native-workbench-frame-patch` to restore the rightmost complete native Conversation. Only the two outer-frame seams may change; preserve original headers, views, Composer and right-sidebar owners. Fail closed on unknown bytes, verify the packaged result and keep exact rollback. Desktop release still requires actual packaged-runtime and UI acceptance; no other official file changes are authorized.
- Explicit user-authorized exception (Web preview 2026-10-30; Desktop packaging and release 2026-10-18): the user's latest-version and compatibility-adaptation authorization extends this same two-seam exception to official `0.2.1-rc.5`; both may apply the exact-version/checksum-locked `native-workbench-frame-patch` to restore the rightmost complete native Conversation. Only the two outer-frame seams may change; preserve original headers, views, Composer and right-sidebar owners. Fail closed on unknown bytes, verify the packaged result and keep exact rollback. Desktop release still requires actual packaged-runtime and UI acceptance; no other official file changes are authorized.

## Delivery regression gate

Expand Down
10 changes: 5 additions & 5 deletions apps/desktop/scripts/official-desktop-release.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -73,32 +73,32 @@ test('every supported target has an immutable official URL and a full digest', (
}
})

test('Intel tools retain their exact official archive version while npm Host/Client provenance stays rc.2',()=>{
test('Intel tools retain their exact official archive version while npm Host/Client provenance stays rc.5',()=>{
const directory=mkdtempSync(join(tmpdir(),'workdsh-intel-source-'))
try{
const target='mac-x64',artifact=officialDesktopArtifact(target)
assert.equal(lock.version,'0.2.1-rc.2');assert.equal(artifact.version,'0.2.1-rc.1')
assert.equal(lock.version,'0.2.1-rc.5');assert.equal(artifact.version,'0.2.1-rc.4')
const original=JSON.stringify({desktopVersion:artifact.version,platform:'darwin',arch:'x64',...lock.primaryRuntime,payloadDigest:'b'.repeat(64)})+'\n'
writeFileSync(join(directory,'runtime.json'),original)
const receipt=writeOfficialRuntimeProvenance(directory,target)
assert.deepEqual(createOfficialRuntimeProvenance(new TextEncoder().encode(original),target),receipt)
assert.equal(readFileSync(join(directory,'runtime.json'),'utf8'),original,'official runtime.json is never relabelled')
assert.equal(receipt.npmDshVersion,'0.2.1-rc.2');assert.deepEqual(receipt.artifact,artifact)
assert.equal(receipt.npmDshVersion,'0.2.1-rc.5');assert.deepEqual(receipt.artifact,artifact)
assert.deepEqual(verifyOfficialRuntimeProvenance(directory,target),receipt)
for(const key of ['version','url','sha512','size']){
writeFileSync(join(directory,OFFICIAL_PROVENANCE_FILE),JSON.stringify({...receipt,artifact:{...artifact,[key]:key==='size'?artifact.size+1:'tampered'}}))
assert.throws(()=>verifyOfficialRuntimeProvenance(directory,target),/provenance mismatch/)
}
writeFileSync(join(directory,OFFICIAL_PROVENANCE_FILE),JSON.stringify(receipt))
writeFileSync(join(directory,'runtime.json'),original.replace('0.2.1-rc.1','0.2.1-rc.2'))
writeFileSync(join(directory,'runtime.json'),original.replace('0.2.1-rc.4','0.2.1-rc.5'))
assert.throws(()=>verifyOfficialRuntimeProvenance(directory,target),/metadata does not match/)
writeFileSync(join(directory,'runtime.json'),original+' ')
assert.throws(()=>verifyOfficialRuntimeProvenance(directory,target),/provenance mismatch/,'even a formatting change to upstream metadata is detected')
}finally{rmSync(directory,{recursive:true,force:true})}
})

test('binary source locking has no guessed version, range or automatic fallback',()=>{
for(const replacement of [undefined,'^0.2.1','0.2.1-rc.2']){
for(const replacement of [undefined,'^0.2.1','0.2.1-rc.5']){
const changed=structuredClone(lock);changed.desktopArtifacts['mac-x64'].version=replacement
assert.throws(()=>officialDesktopArtifact('mac-x64',changed),/locked|invalid/)
}
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/tests/native-workbench-frame.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Desktop native Conversation frame guard', () => {
try {
await mkdir(join(pkg, 'lib'), { recursive: true })
await writeFile(join(profile, 'package.json'), '{}')
await writeFile(join(pkg, 'package.json'), JSON.stringify({ name: '@deepseek-ai/dsh-client-ui-conversation', version: '0.2.1-rc.2' }))
await writeFile(join(pkg, 'package.json'), JSON.stringify({ name: '@deepseek-ai/dsh-client-ui-conversation', version: '0.2.1-rc.5' }))
await writeFile(target, 'unexpected-runtime-bytes')
await expect(ensureNativeWorkbenchFrame(profile)).rejects.toThrow('unsupported runtime bytes')
await expect(verifyNativeWorkbenchFrame(profile)).rejects.toThrow('unsupported packaged runtime bytes')
Expand Down
4 changes: 2 additions & 2 deletions apps/desktop/tests/verify-mac-smoke.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ describe('macOS DMG smoke artifact verification', () => {
expect(harness.removeMountPoint).not.toHaveBeenCalled()
})

it('rejects a missing or falsified Intel source receipt rather than relabelling tool bytes as npm rc.2',()=>{
it('rejects a missing or falsified Intel source receipt rather than relabelling tool bytes as npm rc.5',()=>{
const value=fixture('x64'),primary=join(value.root,'WorkDSH.app','Contents','Resources','workdsh-runtime','primary-runtime')
const harness=options({targetArch:'x64',makeMountPoint:()=>value.root},value.modeOverrides)
writeFileSync(join(primary,OFFICIAL_PROVENANCE_FILE),JSON.stringify({schemaVersion:1,npmDshVersion:'0.2.1-rc.2',artifact:{version:'0.2.1-rc.2'}}))
writeFileSync(join(primary,OFFICIAL_PROVENANCE_FILE),JSON.stringify({schemaVersion:1,npmDshVersion:'0.2.1-rc.5',artifact:{version:'0.2.1-rc.5'}}))
expectSmokeFailure(harness,'provenance mismatch')
rmSync(join(primary,OFFICIAL_PROVENANCE_FILE))
expectSmokeFailure(harness,OFFICIAL_PROVENANCE_FILE)
Expand Down
2 changes: 1 addition & 1 deletion apps/web/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This independent pnpm workspace owns WorkDSH feature packages and Web compositio

## Runtime and ownership

- Pin official DSH dependencies and required peers to the product target `0.2.1-rc.2`, with Cordis `4.0.5`. Web consumes published official packages. Never require its checkout for a Web build. The explicit Web-preview and Desktop exception in root AGENTS.md permits only the shared checksum-locked rc.2 two-seam outer native workbench frame patch; other upstream edits remain prohibited.
- Pin official DSH dependencies and required peers to the product target `0.2.1-rc.5`, with Cordis `4.0.5`. Web consumes published official packages. Never require its checkout for a Web build. The explicit Web-preview and Desktop exception in root AGENTS.md permits only the shared checksum-locked rc.5 two-seam outer native workbench frame patch; other upstream edits remain prohibited.
- Personal Web, enterprise Web and Desktop share official runtime targets, owned feature packages, business services and pages. Identity, storage, execution and synchronization vary only at explicit adapter boundaries.
- Use official Loader/Profile/Cordis, Session/Agent loop, preset registry, Skill parser/provider, MCP transport, model routing, Remote, Storage and Conversation UI. Do not introduce another Host, Client, loader or executor.
- Feature packages own business objects, revisions, authorization and presentation. Page actions and Agent tools use the same business services. Optional cross-plugin collaboration uses public contracts and lifecycle injection, never another plugin's internal implementation.
Expand Down
Loading
Loading