@fish-under-sea/dsh-agent-teams-fish 1.0.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE.md +13 -7
- package/README.en.md +20 -12
- package/README.md +20 -12
- package/compatibility.json +82 -46
- package/icon.png +0 -0
- package/lib/artifacts.js +148 -25
- package/lib/client/ActivityPanel.js +26 -5
- package/lib/client/WorkspaceActivity.js +6 -4
- package/lib/client/activity-monitor.js +113 -41
- package/lib/client/locales.js +14 -0
- package/lib/client.js +433 -199
- package/lib/client.js.map +1 -1
- package/lib/command.js +7 -4
- package/lib/git-artifact-stamp.json +2 -2
- package/lib/harness-compat.js +120 -62
- package/lib/index.js +7 -10
- package/lib/mailbox.js +15 -5
- package/lib/members.js +221 -154
- package/lib/snapshot.js +15 -10
- package/lib/state.js +41 -8
- package/lib/tools.js +123 -64
- package/lib/types/artifacts.d.ts +6 -3
- package/lib/types/client/activity-monitor.d.ts +13 -4
- package/lib/types/client/locales.d.ts +14 -0
- package/lib/types/harness-compat.d.ts +63 -16
- package/lib/types/mailbox.d.ts +2 -0
- package/lib/types/members.d.ts +5 -17
- package/lib/types/snapshot.d.ts +12 -7
- package/lib/types/state.d.ts +10 -3
- package/lib/types/types.d.ts +5 -0
- package/lib/types/web-routes.d.ts +2 -0
- package/lib/types/workspace-audit-service.d.ts +35 -0
- package/lib/types/workspace-audit-worker.d.ts +1 -0
- package/lib/web-routes.js +31 -0
- package/lib/workspace-audit-service.js +165 -0
- package/lib/workspace-audit-worker.js +11 -0
- package/lib/workspace-audit.js +6 -5
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +69 -64
- package/pnpm-workspace.yaml +306 -273
- package/release-notes/v0.1.25.md +16 -0
- package/release-notes/v0.1.26.md +19 -0
- package/release-notes/v0.1.27.md +42 -0
- package/release-notes/v0.1.28.md +45 -0
- package/release-notes/v0.1.29.md +23 -0
- package/release-notes/v1.1.0.md +42 -0
- package/release-notes/v2.0.0.md +17 -0
- package/scripts/artwork-role-match.test.mjs +517 -0
- package/scripts/capabilities.test.mjs +301 -0
- package/scripts/check-install-channel.mjs +55 -0
- package/scripts/check-install-channel.test.mjs +39 -0
- package/scripts/clean-build.mjs +14 -0
- package/scripts/client-harness-migration.test.mjs +46 -0
- package/scripts/compatibility.mjs +20 -0
- package/scripts/compatibility.test.mjs +187 -0
- package/scripts/corrupt-teamjson.test.mjs +180 -0
- package/scripts/custom-artwork.test.mjs +273 -0
- package/scripts/fallback-tdd.mjs +61 -0
- package/scripts/fixtures/harness-benchmark-scope.mjs +16 -0
- package/scripts/fixtures/harness-benchmark-scope.test.mjs +18 -0
- package/scripts/fixtures/harness-complex-case.mjs +201 -0
- package/scripts/fixtures/harness-complex-case.test.mjs +21 -0
- package/scripts/fixtures/harness-complex-oracle.mjs +63 -0
- package/scripts/fixtures/harness-issue-case.mjs +51 -0
- package/scripts/fixtures/harness-issue159-case.mjs +28 -0
- package/scripts/fixtures/harness-model-case.mjs +127 -0
- package/scripts/fixtures/harness-model-case.test.mjs +37 -0
- package/scripts/fixtures/harness-model-driver.mjs +100 -0
- package/scripts/fixtures/harness-runtime-credentials.mjs +23 -0
- package/scripts/fixtures/harness-runtime-entry.mjs +171 -0
- package/scripts/fixtures/harness-runtime-idle.mjs +42 -0
- package/scripts/fixtures/harness-runtime-llm.mjs +193 -0
- package/scripts/fixtures/harness-runtime-protocol.mjs +187 -0
- package/scripts/fixtures/harness-runtime-resume.mjs +24 -0
- package/scripts/fixtures/harness-runtime-stability.mjs +282 -0
- package/scripts/fixtures/harness-runtime-tools.mjs +13 -0
- package/scripts/fixtures/harness-runtime-web-approval.mjs +341 -0
- package/scripts/fixtures/issue-336-audit-worker.mjs +18 -0
- package/scripts/git-artifacts.mjs +64 -0
- package/scripts/git-artifacts.test.mjs +32 -0
- package/scripts/harness-compat-tdd.mjs +492 -0
- package/scripts/harness-issue-verify.mjs +26 -0
- package/scripts/harness-model-benchmark.mjs +163 -0
- package/scripts/harness-runtime-platform.test.mjs +31 -0
- package/scripts/harness-runtime-scenarios.mjs +297 -0
- package/scripts/harness-runtime-verify.mjs +169 -0
- package/scripts/harness-source-verify.mjs +211 -0
- package/scripts/harness-source-verify.test.mjs +97 -0
- package/scripts/harness-validation.mjs +68 -0
- package/scripts/harness-validation.test.mjs +95 -0
- package/scripts/http-body.test.mjs +72 -0
- package/scripts/import-vendor-artwork.mjs +78 -0
- package/scripts/inline-plan-blank-optional-tdd.mjs +121 -0
- package/scripts/issue-159.test.mjs +78 -0
- package/scripts/issue-188.test.mjs +148 -0
- package/scripts/issue-189.test.mjs +100 -0
- package/scripts/issue-203-card.test.mjs +181 -0
- package/scripts/issue-205.test.mjs +163 -0
- package/scripts/issue-234.test.mjs +424 -0
- package/scripts/issue-236-stale-module.test.mjs +63 -0
- package/scripts/issue-236.test.mjs +59 -0
- package/scripts/issue-262.test.mjs +98 -0
- package/scripts/issue-336.test.mjs +404 -0
- package/scripts/legacy-session-source-repair.test.mjs +201 -0
- package/scripts/lifecycle-verify.mjs +1573 -0
- package/scripts/lineage-identity.test.mjs +77 -0
- package/scripts/member-failure-tdd.mjs +451 -0
- package/scripts/member-spawn-recovery.test.mjs +92 -0
- package/scripts/quality-gates-amend.test.mjs +161 -0
- package/scripts/quality-gates-content-bound.test.mjs +572 -0
- package/scripts/quality-gates-cross-binding.test.mjs +184 -0
- package/scripts/quality-gates-excluded-scope.test.mjs +163 -0
- package/scripts/quality-gates-repair-scope.test.mjs +143 -0
- package/scripts/quality-gates-repair-wiring.test.mjs +189 -0
- package/scripts/quality-gates-tdd.mjs +1238 -0
- package/scripts/quality-gates-work-order.test.mjs +494 -0
- package/scripts/readme-version.mjs +89 -0
- package/scripts/readme-version.test.mjs +77 -0
- package/scripts/release-metadata.mjs +45 -0
- package/scripts/release-metadata.test.mjs +66 -0
- package/scripts/scoped-release.test.mjs +52 -0
- package/scripts/stability-tdd.mjs +144 -0
- package/scripts/stress-verify.mjs +548 -0
- package/scripts/symlink-support.mjs +46 -0
- package/scripts/sync-skill.mjs +103 -0
- package/scripts/tool-policies.test.mjs +280 -0
- package/scripts/update-skills.mjs +105 -0
- package/scripts/update-skills.test.mjs +79 -0
- package/scripts/upgrade-status.mjs +66 -0
- package/scripts/upgrade-status.test.mjs +83 -0
- package/scripts/verify-package.mjs +73 -0
- package/scripts/verify.mjs +2199 -0
- package/scripts/web-routes-verify.mjs +142 -0
- package/scripts/workspace-activity.test.mjs +346 -0
- package/scripts/workspace-summary.test.mjs +49 -0
- package/src/artifacts.ts +487 -0
- package/src/artwork-source.ts +262 -0
- package/src/capabilities.ts +113 -0
- package/src/client/ActivityPanel.module.css +2390 -0
- package/src/client/ActivityPanel.tsx +1507 -0
- package/src/client/AgentTeamsCard.module.css +148 -0
- package/src/client/AgentTeamsCard.tsx +155 -0
- package/src/client/StagingPlanEditor.tsx +829 -0
- package/src/client/TeamChatEntry.tsx +27 -0
- package/src/client/WorkspaceActivity.module.css +41 -0
- package/src/client/WorkspaceActivity.tsx +137 -0
- package/src/client/activity-model.ts +372 -0
- package/src/client/activity-monitor.ts +440 -0
- package/src/client/agent-teams-card-definition.ts +250 -0
- package/src/client/artwork.ts +374 -0
- package/src/client/icons.tsx +17 -0
- package/src/client/index.tsx +140 -0
- package/src/client/locales.ts +481 -0
- package/src/client/panel-geometry.ts +194 -0
- package/src/client/session-navigation.ts +73 -0
- package/src/client/workspace-state.ts +52 -0
- package/src/command.ts +145 -0
- package/src/css-modules.d.ts +4 -0
- package/src/event-types.ts +177 -0
- package/src/events.ts +78 -0
- package/src/harness-compat.ts +570 -0
- package/src/index.ts +599 -0
- package/src/lineage.ts +248 -0
- package/src/mailbox.ts +185 -0
- package/src/members.ts +1230 -0
- package/src/profiles.ts +765 -0
- package/src/quality-gates.ts +2124 -0
- package/src/scheduler.ts +554 -0
- package/src/snapshot.ts +333 -0
- package/src/state.ts +1317 -0
- package/src/tool-names.ts +14 -0
- package/src/tool-policies.ts +219 -0
- package/src/tools.ts +2939 -0
- package/src/types.ts +414 -0
- package/src/web-routes.ts +128 -0
- package/src/workspace-audit-service.ts +182 -0
- package/src/workspace-audit-worker.ts +12 -0
- package/src/workspace-audit.ts +57 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import assert from 'node:assert/strict'
|
|
2
|
+
import { readFileSync } from 'node:fs'
|
|
3
|
+
import test from 'node:test'
|
|
4
|
+
import { inspectUpgradeStatus, fetchUpgradeStatus } from './upgrade-status.mjs'
|
|
5
|
+
import { policy } from './compatibility.mjs'
|
|
6
|
+
|
|
7
|
+
const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'))
|
|
8
|
+
const fixture = () => ({ hostTags: { latest: policy.recommendedHost, next: '0.2.1-rc.3' }, pluginManifest: structuredClone(pkg) })
|
|
9
|
+
|
|
10
|
+
test('a known supported and published combination has no declaration gap', () => {
|
|
11
|
+
const result = inspectUpgradeStatus(fixture())
|
|
12
|
+
assert.equal(result.needsAttention, false)
|
|
13
|
+
assert.deepEqual(result.unpublishedSupport, [])
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
test('a published exact allowlist that rejects the host channels is reported as blocking users', () => {
|
|
17
|
+
// The 0.1.27 shape: npm latest moved to 0.2.1-rc.5 and the plugin could not be installed.
|
|
18
|
+
const input = fixture()
|
|
19
|
+
input.hostTags = { latest: '0.2.1-rc.5', next: '0.2.1-rc.5' }
|
|
20
|
+
delete input.pluginManifest.engines.dsh
|
|
21
|
+
for (const name of Object.keys(input.pluginManifest.peerDependencies)) {
|
|
22
|
+
if (name.startsWith('@deepseek-ai/dsh-')) input.pluginManifest.peerDependencies[name] = policy.supportedHosts.map(host => host.version).join(' || ')
|
|
23
|
+
}
|
|
24
|
+
const result = inspectUpgradeStatus(input)
|
|
25
|
+
assert.equal(result.needsAttention, true)
|
|
26
|
+
assert.deepEqual(result.blockedChannels, [{ channel: 'latest', version: '0.2.1-rc.5' }, { channel: 'next', version: '0.2.1-rc.5' }])
|
|
27
|
+
assert.deepEqual(result.unpublishedSupport, [])
|
|
28
|
+
assert.deepEqual(result.unrecognizedDeclarations, [])
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
test('same plugin version does not hide support merged into source but absent on npm', () => {
|
|
32
|
+
const input = fixture()
|
|
33
|
+
input.pluginManifest.engines.dsh = '>=0.2.1-rc.1'
|
|
34
|
+
const result = inspectUpgradeStatus(input)
|
|
35
|
+
assert.equal(result.pluginVersion, pkg.version)
|
|
36
|
+
assert.equal(result.needsAttention, true)
|
|
37
|
+
assert.deepEqual(result.blockedChannels, [])
|
|
38
|
+
assert.ok(result.unpublishedSupport.includes('0.2.0-rc.2'))
|
|
39
|
+
assert.ok(!result.unpublishedSupport.includes('0.2.1-rc.3'))
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
test('a new upstream host is installable but still asks maintainers to run the matrix', () => {
|
|
43
|
+
const input = fixture(), before = structuredClone(policy)
|
|
44
|
+
input.hostTags.next = '0.2.1-rc.999'
|
|
45
|
+
const result = inspectUpgradeStatus(input)
|
|
46
|
+
assert.equal(result.needsAttention, true)
|
|
47
|
+
assert.deepEqual(result.blockedChannels, [])
|
|
48
|
+
assert.deepEqual(result.unverifiedChannels, [{ channel: 'next', version: '0.2.1-rc.999' }])
|
|
49
|
+
assert.deepEqual(policy, before)
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
test('engines precedence, missing declarations and unfamiliar ranges cannot report a false all-clear', () => {
|
|
53
|
+
for (const dsh of [null, '^0.2.1-rc.2', '>=0.2.1-rc.2 <0.3.0', '0.2.1-rc.2']) {
|
|
54
|
+
const input = fixture()
|
|
55
|
+
input.pluginManifest.engines.dsh = dsh
|
|
56
|
+
const result = inspectUpgradeStatus(input)
|
|
57
|
+
assert.equal(result.needsAttention, true)
|
|
58
|
+
if (dsh !== '0.2.1-rc.2') assert.deepEqual(result.unrecognizedDeclarations, ['engines.dsh'])
|
|
59
|
+
else assert.ok(result.unpublishedSupport.includes('0.2.1-rc.3'))
|
|
60
|
+
}
|
|
61
|
+
// Without engines.dsh (hosts before 0.2.1-alpha.4 and older manifests) every DSH peer must be readable.
|
|
62
|
+
const input = fixture()
|
|
63
|
+
delete input.pluginManifest.engines.dsh
|
|
64
|
+
assert.equal(inspectUpgradeStatus(input).needsAttention, false, '* peers accept every host')
|
|
65
|
+
delete input.pluginManifest.peerDependencies['@deepseek-ai/dsh-agent']
|
|
66
|
+
assert.deepEqual(inspectUpgradeStatus(input).unrecognizedDeclarations, ['@deepseek-ai/dsh-agent'])
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
test('registry errors, invalid JSON and wrong identities fail instead of becoming a green empty status', async () => {
|
|
70
|
+
for (const input of [ { ...fixture(), hostTags: {} }, { ...fixture(), hostTags: { latest: policy.recommendedHost } }, { ...fixture(), hostTags: { next: '0.2.1-rc.3' } }, { ...fixture(), pluginManifest: { name: 'other', version: pkg.version } } ]) {
|
|
71
|
+
assert.throws(() => inspectUpgradeStatus(input))
|
|
72
|
+
}
|
|
73
|
+
await assert.rejects(fetchUpgradeStatus(async () => ({ ok: false, status: 503 })), /HTTP 503/)
|
|
74
|
+
await assert.rejects(fetchUpgradeStatus(async () => ({ ok: true, json: async () => { throw new Error('Invalid JSON') } })), /Invalid JSON/)
|
|
75
|
+
const requests = []
|
|
76
|
+
const result = await fetchUpgradeStatus(async url => {
|
|
77
|
+
requests.push(url)
|
|
78
|
+
return { ok: true, json: async () => url.endsWith('dist-tags') ? fixture().hostTags : fixture().pluginManifest }
|
|
79
|
+
})
|
|
80
|
+
assert.equal(result.needsAttention, false)
|
|
81
|
+
assert.equal(requests.length, 2)
|
|
82
|
+
assert.ok(requests.every(url => url.startsWith('https://registry.npmjs.org/')))
|
|
83
|
+
})
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { access, readFile } from 'node:fs/promises'
|
|
4
|
+
|
|
5
|
+
let failures = 0
|
|
6
|
+
|
|
7
|
+
function check(label, condition, detail = '') {
|
|
8
|
+
if (condition) {
|
|
9
|
+
console.log(` PASS ${label}`)
|
|
10
|
+
return
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
failures += 1
|
|
14
|
+
console.error(` FAIL ${label}${detail ? ` — ${detail}` : ''}`)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
console.log('dsh-agent-teams package verification')
|
|
18
|
+
|
|
19
|
+
const pkg = JSON.parse(await readFile(new URL('../package.json', import.meta.url), 'utf8'))
|
|
20
|
+
const patchText = await readFile(new URL('../cordis.patch.yml', import.meta.url), 'utf8')
|
|
21
|
+
const patchName = patchText
|
|
22
|
+
.split('\n')
|
|
23
|
+
.filter(line => !/^\s*#/.test(line))
|
|
24
|
+
.find(line => /^\s*name:\s*\S/.test(line))
|
|
25
|
+
?.match(/^\s*name:\s*(.+?)\s*$/)?.[1]
|
|
26
|
+
?.replace(/^(['"])(.*)\1$/, '$2')
|
|
27
|
+
|
|
28
|
+
check(
|
|
29
|
+
'cordis.patch.yml name matches the published package name',
|
|
30
|
+
patchName === pkg.name,
|
|
31
|
+
`patch has ${JSON.stringify(patchName)}, package.json has ${JSON.stringify(pkg.name)}`,
|
|
32
|
+
)
|
|
33
|
+
check(
|
|
34
|
+
'files[] ships the bundle patch and lib',
|
|
35
|
+
['lib', 'cordis.patch.yml'].every(entry => pkg.files?.includes(entry)),
|
|
36
|
+
`files = ${JSON.stringify(pkg.files)}`,
|
|
37
|
+
)
|
|
38
|
+
check(
|
|
39
|
+
'scoped package publishes publicly',
|
|
40
|
+
!pkg.name.startsWith('@') || pkg.publishConfig?.access === 'public',
|
|
41
|
+
'scoped packages default to restricted without publishConfig.access = "public"',
|
|
42
|
+
)
|
|
43
|
+
const requiredPeers = Object.keys(pkg.peerDependencies ?? {})
|
|
44
|
+
.filter(name => pkg.peerDependenciesMeta?.[name]?.optional !== true)
|
|
45
|
+
check(
|
|
46
|
+
'shared runtime peers are optional for standalone profile installs',
|
|
47
|
+
requiredPeers.length === 0,
|
|
48
|
+
`required peers trigger pnpm warnings: ${JSON.stringify(requiredPeers)}`,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
for (const path of ['../lib/index.js', '../lib/client.js']) {
|
|
52
|
+
try {
|
|
53
|
+
await access(new URL(path, import.meta.url))
|
|
54
|
+
check(`${path.slice(3)} exists`, true)
|
|
55
|
+
} catch {
|
|
56
|
+
check(`${path.slice(3)} exists`, false)
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const clientBundle = await readFile(new URL('../lib/client.js', import.meta.url), 'utf8')
|
|
61
|
+
const registeredId = clientBundle.match(/__ModuleLoader__\.load\(\{\s*id:\s*"([^"]*)"/)?.[1]
|
|
62
|
+
check(
|
|
63
|
+
'client bundle registers under the package name',
|
|
64
|
+
registeredId === pkg.name,
|
|
65
|
+
`bundle registers ${JSON.stringify(registeredId)}, package.json has ${JSON.stringify(pkg.name)}`,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
if (failures > 0) {
|
|
69
|
+
console.error(`\n${failures} package verification check(s) failed`)
|
|
70
|
+
process.exitCode = 1
|
|
71
|
+
} else {
|
|
72
|
+
console.log('\nPackage verification passed')
|
|
73
|
+
}
|