@ran-sh/dsh-crew 1.7.1 → 1.7.2
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/.claude-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/src/install/install-legacy.mjs +1 -8
- package/src/runtime-identity.mjs +1 -1
- package/codex/AGENTS.md +0 -53
- package/zcode/AGENTS.md +0 -38
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ import { createHash } from 'node:crypto';
|
|
|
7
7
|
import { dirname, join, resolve, relative } from 'node:path';
|
|
8
8
|
import { fileURLToPath } from 'node:url';
|
|
9
9
|
import { homedir } from 'node:os';
|
|
10
|
-
import { normalizeModelPriority } from '../model-routing.mjs';
|
|
10
|
+
import { normalizeModelPriority } from '../model-routing.mjs';
|
|
11
11
|
import { crewSkillFiles, installCrewSkill, readCrewSkill, removeCrewSkill } from './crew-skill.mjs';
|
|
12
12
|
import { zcodeStatus } from './zcode.mjs';
|
|
13
13
|
|
|
@@ -70,17 +70,10 @@ function renderedCodexRole(root, file) {
|
|
|
70
70
|
return source.replace(/args = \[.*server\.mjs"\]/, `args = ["${renderedPath}"]`);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
function managedPolicyBlock(root) {
|
|
74
|
-
const policy = readText(join(root, 'codex', 'AGENTS.md'))?.trim();
|
|
75
|
-
if (!policy) return null;
|
|
76
|
-
return `${POLICY_START}\n${policy}\n${POLICY_END}`;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
73
|
export function codexLegacyPolicyDigest(text) {
|
|
80
74
|
const canonical = typeof text === 'string' ? text.replace(/\r\n/g, '\n').trim() : '';
|
|
81
75
|
return canonical ? createHash('sha256').update(canonical, 'utf8').digest('hex') : null;
|
|
82
76
|
}
|
|
83
|
-
|
|
84
77
|
export function stripKnownLegacyCodexPolicy(text, { knownHashes = CODEX_LEGACY_POLICY_HASHES } = {}) {
|
|
85
78
|
if (typeof text !== 'string') return text;
|
|
86
79
|
const start = POLICY_START.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
package/src/runtime-identity.mjs
CHANGED
|
@@ -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 = '1.7.
|
|
39
|
+
export const RUNTIME_VERSION = '1.7.2';
|
|
40
40
|
export const HUB_PROTOCOL_VERSION = 1;
|
|
41
41
|
|
|
42
42
|
export const HUB_CAPABILITIES = Object.freeze([
|
package/codex/AGENTS.md
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
# Global capability-aware delegation policy
|
|
2
|
-
|
|
3
|
-
The main Codex agent owns the task through final delivery. DSH Crew is an optional
|
|
4
|
-
execution/review capability, not an automatic replacement for the main agent.
|
|
5
|
-
|
|
6
|
-
## Discover and choose
|
|
7
|
-
|
|
8
|
-
Before substantial delegation, read the live Crew configuration, capability and
|
|
9
|
-
readiness contracts. Discover roles, models, modes and constraints dynamically;
|
|
10
|
-
installed, configured, enabled and callable are different states. Refresh the
|
|
11
|
-
snapshot after relevant configuration or availability changes, not every small step.
|
|
12
|
-
|
|
13
|
-
Delegate bounded, independently verifiable units when isolation, specialization,
|
|
14
|
-
parallel work or independent review provides a benefit. Give each unit its objective,
|
|
15
|
-
owned files, workspace, constraints and acceptance evidence. Respect concurrency
|
|
16
|
-
limits and manual/disabled capabilities. Keep ambiguity, integration, external
|
|
17
|
-
effects and final communication in the main agent. Trivial work stays local.
|
|
18
|
-
|
|
19
|
-
## Operator decision gate when DSH Crew is unavailable
|
|
20
|
-
|
|
21
|
-
Once Crew is selected for a work unit, any required capability becoming unavailable
|
|
22
|
-
or non-callable is a mandatory pause, regardless of cause. Do not implement further,
|
|
23
|
-
repair/reconfigure Crew, silently fall back or switch execution paths. Perform only
|
|
24
|
-
bounded read-only diagnosis, report the evidence and completed work, and wait for
|
|
25
|
-
new operator direction: **repair Crew and continue through Crew**, or **do not repair
|
|
26
|
-
Crew and continue with the main agent**. After repair, verify live readiness again;
|
|
27
|
-
after local authorization, disclose that the affected work is not independently delegated.
|
|
28
|
-
|
|
29
|
-
This gate does not apply when initial planning chooses local work without selecting
|
|
30
|
-
Crew. A nonterminal wait is not an outage; continue the same workflow without duplicate
|
|
31
|
-
dispatch. Review findings and failing code tests are task results to address, not by
|
|
32
|
-
themselves evidence that Crew is unavailable.
|
|
33
|
-
|
|
34
|
-
## Verify and finish
|
|
35
|
-
|
|
36
|
-
Consume compact structured results and canonical events. Check changed scope,
|
|
37
|
-
delivery completeness, tests, risks and the actual review verdict. Use independent
|
|
38
|
-
review for non-trivial code when available and its invocation policy allows it;
|
|
39
|
-
never bypass manual/disabled review. Requested changes or missing evidence are not
|
|
40
|
-
approval. If selected review cannot run, use the operator gate above.
|
|
41
|
-
|
|
42
|
-
Continue authorized work after a successful subtask; do not stop at its checkpoint.
|
|
43
|
-
Delegation grants no new authority to push, publish, message, change credentials or
|
|
44
|
-
delete data. Do not forward credentials, raw provider payloads or unbounded transcripts.
|
|
45
|
-
|
|
46
|
-
## Harness upgrade redlines
|
|
47
|
-
|
|
48
|
-
- Never install, update, register, unlink, repair, or mutate anything under ~/.dsh.
|
|
49
|
-
- DSH Crew runtime upgrades must go through the Crew-owned installer and DSH_HOME.
|
|
50
|
-
- Never use direct pnpm/npm/dsh plugin operations against the official web profile.
|
|
51
|
-
- Preparing a Harness upgrade must not restart 3080 or 3210.
|
|
52
|
-
- Standalone workers launch through the official DSH SDK profile contract; dsh-sdk-jsonrpc-demo is obsolete.
|
|
53
|
-
- Legacy 3080 bridge must never be used for 3210 lifecycle/restart/rollback.
|
package/zcode/AGENTS.md
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# Global capability-aware delegation policy for ZCode
|
|
2
|
-
|
|
3
|
-
ZCode is a host adapter for DSH Crew. Use the `dsh-crew` MCP server for Crew
|
|
4
|
-
work only after its live capability and readiness surfaces have been checked.
|
|
5
|
-
|
|
6
|
-
- Discover the current Crew configuration, capabilities, activation state and
|
|
7
|
-
readiness before delegating substantial work. Installed, configured, enabled
|
|
8
|
-
and callable are different states; do not infer one from another.
|
|
9
|
-
- Match a bounded work unit to an available Crew role/model and preserve the
|
|
10
|
-
repository/worktree and Result Contract boundaries. Keep planning, ambiguous
|
|
11
|
-
requirements, integration, external side effects and final communication in
|
|
12
|
-
the host agent.
|
|
13
|
-
- Dispatch selected work asynchronously with `dsh_spawn_worker`, save its
|
|
14
|
-
workflow ID, and poll that same workflow with `dsh_worker_result` using
|
|
15
|
-
`wait_seconds: 10`. A bounded wait that returns a nonterminal state is not a
|
|
16
|
-
failure when `dsh_worker_status` confirms that workflow is still running;
|
|
17
|
-
continue polling it and never start a duplicate workflow.
|
|
18
|
-
- If Crew is selected and any required capability is unavailable, non-callable,
|
|
19
|
-
or returns an unknown/runtime/configuration/credential/routing/timeout error,
|
|
20
|
-
pause. Report the evidence and wait for the operator to choose repair Crew or
|
|
21
|
-
continue locally; do not repair/reconfigure, silently fall back or retry blindly
|
|
22
|
-
before that decision. A nonterminal bounded wait is not a transport timeout.
|
|
23
|
-
- Validate returned evidence, changed scope, tests and completion state before
|
|
24
|
-
accepting delegated work. Do not expose credentials or raw provider payloads.
|
|
25
|
-
- Continue the authorized task after a successful subtask; do not stop at its
|
|
26
|
-
checkpoint. Missing evidence or requested review changes are not approval.
|
|
27
|
-
|
|
28
|
-
## Harness upgrade redlines
|
|
29
|
-
|
|
30
|
-
- Never install, update, register, unlink, repair, or mutate anything under ~/.dsh.
|
|
31
|
-
- DSH Crew runtime upgrades must go through the Crew-owned installer and DSH_HOME.
|
|
32
|
-
- Never use direct pnpm/npm/dsh plugin operations against the official web profile.
|
|
33
|
-
- Preparing a Harness upgrade must not restart 3080 or 3210.
|
|
34
|
-
- Standalone workers launch through the official DSH SDK profile contract; dsh-sdk-jsonrpc-demo is obsolete.
|
|
35
|
-
- Legacy 3080 bridge must never be used for 3210 lifecycle/restart/rollback.
|
|
36
|
-
|
|
37
|
-
This file is installed as a managed block in `~/.zcode/AGENTS.md`; user-authored
|
|
38
|
-
instructions outside the block are preserved.
|