@ran-sh/dsh-crew 2.2.13 → 2.2.15

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-crew",
3
- "version": "2.2.13",
3
+ "version": "2.2.15",
4
4
  "description": "Dispatch subtasks to DeepSeek Harness (DSH) agents as native subagents with live progress",
5
5
  "author": {
6
6
  "name": "ZSeven-W"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ran-sh/dsh-crew",
3
- "version": "2.2.13",
3
+ "version": "2.2.15",
4
4
  "type": "module",
5
5
  "main": "./src/hub/entry.mjs",
6
6
  "bin": {
@@ -42,30 +42,29 @@
42
42
  "./package.json": "./package.json"
43
43
  },
44
44
  "peerDependencies": {
45
- "@deepseek-ai/dsh": "0.1.6-alpha.1",
46
- "@deepseek-ai/dsh-agent": "0.1.6-alpha.1",
47
- "@deepseek-ai/dsh-agent-loop": "0.1.6-alpha.1",
48
- "@deepseek-ai/dsh-agent-presets": "0.1.6-alpha.1",
49
- "@deepseek-ai/dsh-bash-local": "0.1.6-alpha.1",
50
- "@deepseek-ai/dsh-client-locale": "0.1.6-alpha.1",
51
- "@deepseek-ai/dsh-client-ui-renderer": "0.1.6-alpha.1",
52
- "@deepseek-ai/dsh-client-ui-settings": "0.1.6-alpha.1",
53
- "@deepseek-ai/dsh-compaction-basic": "0.1.6-alpha.1",
54
- "@deepseek-ai/dsh-fs-local": "0.1.6-alpha.1",
55
- "@deepseek-ai/dsh-fs-observation-policy": "0.1.6-alpha.1",
56
- "@deepseek-ai/dsh-llm": "0.1.6-alpha.1",
57
- "@deepseek-ai/dsh-llm-deepseek": "0.1.6-alpha.1",
58
- "@deepseek-ai/dsh-sandbox-local": "0.1.6-alpha.1",
59
- "@deepseek-ai/dsh-sandbox-policy": "0.1.6-alpha.1",
60
- "@deepseek-ai/dsh-sdk-client": "0.1.6-alpha.1",
61
- "@deepseek-ai/dsh-sdk-jsonrpc-server": "0.1.6-alpha.1",
62
- "@deepseek-ai/dsh-sdk-minimal": "0.1.6-alpha.1",
63
- "@deepseek-ai/dsh-session": "0.1.6-alpha.1",
64
- "@deepseek-ai/dsh-session-persistence-jsonl": "0.1.6-alpha.1",
65
- "@deepseek-ai/dsh-subprocess-local": "0.1.6-alpha.1",
66
- "@deepseek-ai/dsh-token-meter": "0.1.6-alpha.1",
67
- "@deepseek-ai/dsh-tool-fs": "0.1.6-alpha.1",
68
- "@deepseek-ai/dsh-tool-todo": "0.1.6-alpha.1",
45
+ "@deepseek-ai/dsh": "^0.1.0 || ^0.2.0-rc.1",
46
+ "@deepseek-ai/dsh-agent": "^0.1.0 || ^0.2.0-rc.1",
47
+ "@deepseek-ai/dsh-agent-loop": "^0.1.0 || ^0.2.0-rc.1",
48
+ "@deepseek-ai/dsh-bash-local": "^0.1.0 || ^0.2.0-rc.1",
49
+ "@deepseek-ai/dsh-client-locale": "^0.1.0 || ^0.2.0-rc.1",
50
+ "@deepseek-ai/dsh-client-ui-renderer": "^0.1.0 || ^0.2.0-rc.1",
51
+ "@deepseek-ai/dsh-client-ui-settings": "^0.1.0 || ^0.2.0-rc.1",
52
+ "@deepseek-ai/dsh-compaction-basic": "^0.1.0 || ^0.2.0-rc.1",
53
+ "@deepseek-ai/dsh-fs-local": "^0.1.0 || ^0.2.0-rc.1",
54
+ "@deepseek-ai/dsh-fs-observation-policy": "^0.1.0 || ^0.2.0-rc.1",
55
+ "@deepseek-ai/dsh-llm": "^0.1.0 || ^0.2.0-rc.1",
56
+ "@deepseek-ai/dsh-llm-deepseek": "^0.1.0 || ^0.2.0-rc.1",
57
+ "@deepseek-ai/dsh-sandbox-local": "^0.1.0 || ^0.2.0-rc.1",
58
+ "@deepseek-ai/dsh-sandbox-policy": "^0.1.0 || ^0.2.0-rc.1",
59
+ "@deepseek-ai/dsh-sdk-client": "^0.1.0 || ^0.2.0-rc.1",
60
+ "@deepseek-ai/dsh-sdk-jsonrpc-server": "^0.1.0 || ^0.2.0-rc.1",
61
+ "@deepseek-ai/dsh-sdk-minimal": "^0.1.0 || ^0.2.0-rc.1",
62
+ "@deepseek-ai/dsh-session": "^0.1.0 || ^0.2.0-rc.1",
63
+ "@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.0 || ^0.2.0-rc.1",
64
+ "@deepseek-ai/dsh-subprocess-local": "^0.1.0 || ^0.2.0-rc.1",
65
+ "@deepseek-ai/dsh-token-meter": "^0.1.0 || ^0.2.0-rc.1",
66
+ "@deepseek-ai/dsh-tool-fs": "^0.1.0 || ^0.2.0-rc.1",
67
+ "@deepseek-ai/dsh-tool-todo": "^0.1.0 || ^0.2.0-rc.1",
69
68
  "react": "^18.0.0",
70
69
  "react-dom": "^18.0.0"
71
70
  },
@@ -79,9 +78,6 @@
79
78
  "@deepseek-ai/dsh-agent-loop": {
80
79
  "optional": true
81
80
  },
82
- "@deepseek-ai/dsh-agent-presets": {
83
- "optional": true
84
- },
85
81
  "@deepseek-ai/dsh-bash-local": {
86
82
  "optional": true
87
83
  },
@@ -7,6 +7,62 @@ export const DSH_CLI_PACKAGE = '@deepseek-ai/dsh';
7
7
  export const TARGET_DSH_VERSION = '0.1.6-alpha.1';
8
8
  export const TARGET_DSH_SPEC = `${DSH_CLI_PACKAGE}@${TARGET_DSH_VERSION}`;
9
9
 
10
+ export const DSH_SCOPE = '@deepseek-ai/';
11
+
12
+ /** Cohort namespace: the CLI plus every `@deepseek-ai/dsh-*` package. */
13
+ export function isDshCohortPackage(name) {
14
+ return name === DSH_CLI_PACKAGE || name.startsWith(`${DSH_CLI_PACKAGE}-`);
15
+ }
16
+
17
+ // The packages a persisted Crew payload vendors, at TARGET_DSH_VERSION.
18
+ //
19
+ // This list — not `package.json`'s DSH peer keys — decides what the standalone
20
+ // payload installs. The two answer different questions: a peer key declares
21
+ // which hosts will load the plugin, so it carries a RANGE that a host gate
22
+ // compares against the running version, while a released payload must resolve
23
+ // ONE exact cohort, because a half-upgraded tree is the failure it exists to
24
+ // prevent. Reading the payload cohort out of the peer block conflated them, so
25
+ // widening a peer range silently unlocked the cohort: nothing stayed pinned,
26
+ // `exactSpecOverrides` produced no overrides, and npm materialized the newest
27
+ // matching release instead of the one the embedded runtime runs.
28
+ //
29
+ // Names here are the cohort of TARGET_DSH_VERSION. A package that exists only
30
+ // in a later cohort (a rename, for example) belongs in the peer block for that
31
+ // host and must NOT be added here until TARGET_DSH_VERSION moves with it.
32
+ export const DSH_COHORT_PACKAGES = Object.freeze([
33
+ DSH_CLI_PACKAGE,
34
+ '@deepseek-ai/dsh-agent',
35
+ '@deepseek-ai/dsh-agent-loop',
36
+ '@deepseek-ai/dsh-agent-presets',
37
+ '@deepseek-ai/dsh-bash-local',
38
+ '@deepseek-ai/dsh-client-locale',
39
+ '@deepseek-ai/dsh-client-ui-renderer',
40
+ '@deepseek-ai/dsh-client-ui-settings',
41
+ '@deepseek-ai/dsh-compaction-basic',
42
+ '@deepseek-ai/dsh-fs-local',
43
+ '@deepseek-ai/dsh-fs-observation-policy',
44
+ '@deepseek-ai/dsh-llm',
45
+ '@deepseek-ai/dsh-llm-deepseek',
46
+ '@deepseek-ai/dsh-sandbox-local',
47
+ '@deepseek-ai/dsh-sandbox-policy',
48
+ '@deepseek-ai/dsh-sdk-client',
49
+ '@deepseek-ai/dsh-sdk-jsonrpc-server',
50
+ '@deepseek-ai/dsh-sdk-minimal',
51
+ '@deepseek-ai/dsh-session',
52
+ '@deepseek-ai/dsh-session-persistence-jsonl',
53
+ '@deepseek-ai/dsh-subprocess-local',
54
+ '@deepseek-ai/dsh-token-meter',
55
+ '@deepseek-ai/dsh-tool-fs',
56
+ '@deepseek-ai/dsh-tool-todo',
57
+ ]);
58
+
59
+ /** Exact `name -> TARGET_DSH_VERSION` specs for the vendored payload cohort. */
60
+ export function dshCohortPins(version = TARGET_DSH_VERSION) {
61
+ const pins = {};
62
+ for (const name of DSH_COHORT_PACKAGES) pins[name] = version;
63
+ return pins;
64
+ }
65
+
10
66
  // Retained-cohort support: when a release's manifest pins an older DSH
11
67
  // cohort than the current TARGET, the old runtime is retained on disk so a
12
68
  // rollback can restore it offline (no registry round-trip).
@@ -45,7 +45,7 @@ import { crewDshHome, crewProfileDir, claudeIntegrationLine } from './install.mj
45
45
  import { integrationRoot } from './crew-paths.mjs';
46
46
  import { releaseClaimsState } from '../release-in-use.mjs';
47
47
  import { compareProcessToken, processStartToken } from '../process-identity.mjs';
48
- import { RELEASE_COHORT_FILENAME } from '../dsh-cohort.mjs';
48
+ import { DSH_SCOPE, RELEASE_COHORT_FILENAME, dshCohortPins } from '../dsh-cohort.mjs';
49
49
  import { renameTree } from './tree-move.mjs';
50
50
  import { checkRuntimeAdvance, normalizeRuntimeState, runtimeStateMayHaveStarted } from './runtime-lifecycle.mjs';
51
51
  import { ensureCrewDshRuntime, ensureCrewPluginRegistration, ensureCrewWebProfile, removeCrewPluginRegistration, migrateCrewDshRuntime, installDshInto, restoreRetainedRuntime, crewDshRuntimeRoot, payloadDshVersion, gcRetainedRuntimes, TARGET_DSH_VERSION } from '../dsh-cli-runtime.mjs';
@@ -1042,19 +1042,38 @@ export function stageCandidatePayload({
1042
1042
  writeFileSync(destination, bytes, { mode: content.modes.get(entry) });
1043
1043
  }
1044
1044
 
1045
- // Persist an adjusted manifest: identity/runtime fields stay; production
1046
- // dependencies gain the exact-pinned peer cohort so the payload runs
1047
- // standalone (src/server.mjs statically imports DSH peers). Optional
1048
- // dependencies keep their own section so npm reconciles them per-platform.
1045
+ // Persist an adjusted manifest: identity/runtime fields stay; declared DSH
1046
+ // peers are re-pinned to the cohort in src/dsh-cohort.mjs so the standalone
1047
+ // payload resolves exactly one cohort; optional dependencies keep their own
1048
+ // section so npm reconciles them per-platform.
1049
+ //
1050
+ // The peer VALUES are deliberately not the payload's cohort. A peer key declares
1051
+ // which hosts will load the plugin, so it carries a range; a released payload
1052
+ // has to resolve one exact cohort, and exact specs are the only ones
1053
+ // `exactSpecOverrides` can pin. A scoped peer outside TARGET_DSH_VERSION — a
1054
+ // later-cohort rename, or the Cordis framework — is therefore a host-gate
1055
+ // declaration only: the running host supplies it, as it supplies every other
1056
+ // shared module. Without this pin the payload stops carrying a resolvable
1057
+ // cohort at all, and `payloadDshVersion` fails closed on the range.
1049
1058
  const stagedManifest = { ...manifest };
1050
1059
  delete stagedManifest.devDependencies;
1051
1060
  delete stagedManifest.peerDependencies;
1052
1061
  delete stagedManifest.peerDependenciesMeta;
1053
1062
  const optionalNames = new Set(Object.keys(manifest.optionalDependencies ?? {}));
1054
- stagedManifest.dependencies = {
1055
- ...(manifest.peerDependencies ?? {}),
1056
- ...(manifest.dependencies ?? {}),
1057
- };
1063
+ const cohortPins = dshCohortPins();
1064
+ const explicitDependencies = new Set(Object.keys(manifest.dependencies ?? {}));
1065
+ const stagedDependencies = { ...(manifest.dependencies ?? {}) };
1066
+ for (const [name, spec] of Object.entries(manifest.peerDependencies ?? {})) {
1067
+ if (!name.startsWith(DSH_SCOPE)) {
1068
+ if (!(name in stagedDependencies)) stagedDependencies[name] = spec;
1069
+ continue;
1070
+ }
1071
+ // An explicit runtime dependency wins over the peer shorthand.
1072
+ if (explicitDependencies.has(name)) continue;
1073
+ if (!Object.hasOwn(cohortPins, name)) continue;
1074
+ stagedDependencies[name] = cohortPins[name];
1075
+ }
1076
+ stagedManifest.dependencies = stagedDependencies;
1058
1077
  const overrides = exactSpecOverrides(stagedManifest.dependencies);
1059
1078
  if (overrides) stagedManifest.overrides = overrides;
1060
1079
  writeFileSync(join(stageDir, 'package.json'), JSON.stringify(stagedManifest, null, 2) + '\n');
@@ -36,7 +36,7 @@ export {
36
36
  // included in the identity contract.
37
37
  const RUNTIME_ID = randomUUID();
38
38
 
39
- export const RUNTIME_VERSION = '2.2.13';
39
+ export const RUNTIME_VERSION = '2.2.15';
40
40
  export const HUB_PROTOCOL_VERSION = 1;
41
41
 
42
42
  export const HUB_CAPABILITIES = Object.freeze([