@hy-sde-org/dsh-tool-git 0.1.1-rc.2 → 0.1.5-rc.1

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/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAenD,OAAO,EACL,qBAAqB,GACtB,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE/E,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAG7C,iDAAiD;AACjD,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAAA;AAE9B,4EAA4E;AAC5E,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,CAAC,CAAA;AAEtD;;;;GAIG;AACH,MAAM,UAAU,KAAK,CAAC,GAAY,EAAE,SAAiB,EAAE;IACrD,eAAe,CAAC,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IAC3G,oBAAoB,CAAC,GAAG,CAAC,CAAA;IACzB,eAAe,CAAC,GAAG,EAAE;QACnB,GAAG,MAAM,CAAC,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE;QACjF,GAAG,MAAM,CAAC,YAAY,K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,YAAY,CAAC,OAAO,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAA;AACzD,CAAC;AAED,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAA"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Minimal local stand-in for the unpublished `@deepseek-ai/dsh-orchestration-policy`
3
+ * package.
4
+ *
5
+ * The real package exists only inside the DeepSeek Harness fork and is NOT
6
+ * published to npm (404), so the standalone cannot declare it. This module
7
+ * carries the narrow surface this plugin consumes — the `orchestrationPolicy`
8
+ * service shape (`config.enabled` / `config.reviewGate`), `resolvePosture`,
9
+ * and the review-gate config types — with behavior ported from the fork. A
10
+ * host that installs the real package still provides the same service shape,
11
+ * and the tool resolves it opportunistically via `ctx.get('orchestrationPolicy')`.
12
+ * @module @hy-sde-org/dsh-tool-git/orchestration-policy
13
+ */
14
+ import { Service, type Context } from '@deepseek-ai/cordis';
15
+ /** Push-posture values recognized by the review gate. */
16
+ export type PushPosture = 'review-gated' | 'fast';
17
+ /** The P2 same-quality gate: no unreviewed change leaves the repo under a gated posture. */
18
+ export interface ReviewGateConfig {
19
+ /** Gate active whenever the policy is enabled; explicitly `false` exits it (default: active). */
20
+ enabled?: boolean;
21
+ /** Standing posture for repositories without an explicit entry (default `review-gated`). */
22
+ default?: PushPosture;
23
+ /** Explicit standing posture per repository-root prefix (`*` = global default; longest prefix wins). */
24
+ posture?: Record<string, PushPosture>;
25
+ /** Only this verdict releases a push (default `ship`). */
26
+ requireVerdict?: 'ship';
27
+ /** `block` (fail-closed, default) or `warn` (loud degrade) when no current `ship` verdict exists. */
28
+ onUnavailable?: 'block' | 'warn';
29
+ }
30
+ /** Fully-resolved review-gate config (every knob present). */
31
+ export interface ResolvedReviewGateConfig {
32
+ enabled: boolean;
33
+ default: PushPosture;
34
+ posture: Record<string, PushPosture>;
35
+ requireVerdict: 'ship';
36
+ onUnavailable: 'block' | 'warn';
37
+ }
38
+ /** Policy config accepted by the service plugin (narrowed surface). */
39
+ export interface OrchestrationPolicyConfig {
40
+ /** Master switch (default false). */
41
+ enabled?: boolean;
42
+ /** Same-quality gate on `commit_apply --push` (see {@link ReviewGateConfig}). */
43
+ reviewGate?: ReviewGateConfig;
44
+ }
45
+ /** Resolved policy config: everything this plugin reads, with defaults filled. */
46
+ export interface ResolvedPolicyConfig extends OrchestrationPolicyConfig {
47
+ enabled: boolean;
48
+ reviewGate: ResolvedReviewGateConfig;
49
+ }
50
+ /** Resolve policy config: fill defaults and validate the review-gate knobs. */
51
+ export declare function resolvePolicyConfig(config?: OrchestrationPolicyConfig): ResolvedPolicyConfig;
52
+ /**
53
+ * Resolve one repository's standing push posture.
54
+ * @param posture - the configured posture map (`*` = global default).
55
+ * @param repoRoot - absolute repository root (`git rev-parse --show-toplevel`).
56
+ * @param defaultPosture - the configured default for unlisted repositories.
57
+ * @returns the most-specific matching posture: longest matching key prefix wins,
58
+ * then `*`, then `defaultPosture`.
59
+ */
60
+ export declare function resolvePosture(posture: Readonly<Record<string, PushPosture>>, repoRoot: string, defaultPosture: PushPosture): PushPosture;
61
+ /** The optional seam service this plugin reads via `ctx.get('orchestrationPolicy')`. */
62
+ export declare class OrchestrationPolicyService extends Service {
63
+ readonly config: ResolvedPolicyConfig;
64
+ constructor(ctx: Context, config?: OrchestrationPolicyConfig);
65
+ }
66
+ /** Cordis plugin name for loader diagnostics. */
67
+ export declare const name = "orchestration-policy";
68
+ /**
69
+ * Register the `orchestrationPolicy` service (resolves eagerly so malformed
70
+ * config fails at load, not at first start). No prompt section: the real
71
+ * package registers one, but this stand-in only covers the gate surface.
72
+ * @param ctx - the host or test context.
73
+ * @param config - policy configuration (see {@link OrchestrationPolicyConfig}).
74
+ */
75
+ export declare function apply(ctx: Context, config?: OrchestrationPolicyConfig): void;
76
+ declare const _default: {
77
+ name: string;
78
+ apply: typeof apply;
79
+ };
80
+ export default _default;
81
+ //# sourceMappingURL=orchestration-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3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,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,EAC9C,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,WAAW,GAC1B,WAAW,CAQb;AAED,wFAAwF;AACxF,qBAAa,0BAA2B,SAAQ,OAAO;IACrD,SAAgB,MAAM,EAAE,oBAAoB,CAAA;gBAEhC,GAAG,EAAE,OAAO,EAAE,MAAM,GAAE,yBAA8B;CAIjE;AAED,iDAAiD;AACjD,eAAO,MAAM,IAAI,yBAAyB,CAAA;AAE1C;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,GAAE,yBAA8B,GAAG,IAAI,CAEhF;;;;;AAED,wBAA8B"}
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Minimal local stand-in for the unpublished `@deepseek-ai/dsh-orchestration-policy`
3
+ * package.
4
+ *
5
+ * The real package exists only inside the DeepSeek Harness fork and is NOT
6
+ * published to npm (404), so the standalone cannot declare it. This module
7
+ * carries the narrow surface this plugin consumes — the `orchestrationPolicy`
8
+ * service shape (`config.enabled` / `config.reviewGate`), `resolvePosture`,
9
+ * and the review-gate config types — with behavior ported from the fork. A
10
+ * host that installs the real package still provides the same service shape,
11
+ * and the tool resolves it opportunistically via `ctx.get('orchestrationPolicy')`.
12
+ * @module @hy-sde-org/dsh-tool-git/orchestration-policy
13
+ */
14
+ import { Service } from '@deepseek-ai/cordis';
15
+ const PUSH_POSTURES = ['review-gated', 'fast'];
16
+ const GATE_UNAVAILABLE_MODES = ['block', 'warn'];
17
+ /** The schema-default review gate (mirrors the fork's `defaultReviewGate`). */
18
+ function defaultReviewGate() {
19
+ return {
20
+ enabled: true,
21
+ default: 'review-gated',
22
+ posture: {},
23
+ requireVerdict: 'ship',
24
+ onUnavailable: 'block',
25
+ };
26
+ }
27
+ /** Resolve policy config: fill defaults and validate the review-gate knobs. */
28
+ export function resolvePolicyConfig(config = {}) {
29
+ let reviewGate = defaultReviewGate();
30
+ if (config.reviewGate !== undefined) {
31
+ const gate = config.reviewGate;
32
+ if (gate === null || typeof gate !== 'object' || Array.isArray(gate)) {
33
+ throw new Error('orchestration-policy: `reviewGate` must be an object');
34
+ }
35
+ if (gate.enabled !== undefined && typeof gate.enabled !== 'boolean') {
36
+ throw new Error(`orchestration-policy: \`reviewGate.enabled\` must be a boolean (got ${JSON.stringify(gate.enabled)})`);
37
+ }
38
+ if (gate.default !== undefined && !PUSH_POSTURES.includes(gate.default)) {
39
+ throw new Error(`orchestration-policy: \`reviewGate.default\` must be 'review-gated' or 'fast' (got ${JSON.stringify(gate.default)})`);
40
+ }
41
+ const requireVerdict = gate.requireVerdict;
42
+ if (requireVerdict !== undefined && requireVerdict !== 'ship') {
43
+ throw new Error(`orchestration-policy: \`reviewGate.requireVerdict\` must be 'ship' (got ${JSON.stringify(gate.requireVerdict)})`);
44
+ }
45
+ if (gate.onUnavailable !== undefined && !GATE_UNAVAILABLE_MODES.includes(gate.onUnavailable)) {
46
+ throw new Error(`orchestration-policy: \`reviewGate.onUnavailable\` must be 'block' or 'warn' (got ${JSON.stringify(gate.onUnavailable)})`);
47
+ }
48
+ const posture = { ...gate.posture };
49
+ for (const [key, value] of Object.entries(posture)) {
50
+ if (!PUSH_POSTURES.includes(value)) {
51
+ throw new Error(`orchestration-policy: posture for ${JSON.stringify(key)} must be 'review-gated' or 'fast' (got ${JSON.stringify(value)})`);
52
+ }
53
+ }
54
+ reviewGate = {
55
+ enabled: gate.enabled ?? true,
56
+ default: gate.default ?? 'review-gated',
57
+ posture,
58
+ requireVerdict: gate.requireVerdict ?? 'ship',
59
+ onUnavailable: gate.onUnavailable ?? 'block',
60
+ };
61
+ }
62
+ return { enabled: config.enabled ?? false, reviewGate };
63
+ }
64
+ /**
65
+ * Resolve one repository's standing push posture.
66
+ * @param posture - the configured posture map (`*` = global default).
67
+ * @param repoRoot - absolute repository root (`git rev-parse --show-toplevel`).
68
+ * @param defaultPosture - the configured default for unlisted repositories.
69
+ * @returns the most-specific matching posture: longest matching key prefix wins,
70
+ * then `*`, then `defaultPosture`.
71
+ */
72
+ export function resolvePosture(posture, repoRoot, defaultPosture) {
73
+ let best;
74
+ for (const key of Object.keys(posture)) {
75
+ if (key === '*')
76
+ continue;
77
+ if (repoRoot.startsWith(key) && (best === undefined || key.length > best.length))
78
+ best = key;
79
+ }
80
+ if (best !== undefined)
81
+ return posture[best];
82
+ return posture['*'] ?? defaultPosture;
83
+ }
84
+ /** The optional seam service this plugin reads via `ctx.get('orchestrationPolicy')`. */
85
+ export class OrchestrationPolicyService extends Service {
86
+ config;
87
+ constructor(ctx, config = {}) {
88
+ super(ctx, 'orchestrationPolicy');
89
+ this.config = resolvePolicyConfig(config);
90
+ }
91
+ }
92
+ /** Cordis plugin name for loader diagnostics. */
93
+ export const name = 'orchestration-policy';
94
+ /**
95
+ * Register the `orchestrationPolicy` service (resolves eagerly so malformed
96
+ * config fails at load, not at first start). No prompt section: the real
97
+ * package registers one, but this stand-in only covers the gate surface.
98
+ * @param ctx - the host or test context.
99
+ * @param config - policy configuration (see {@link OrchestrationPolicyConfig}).
100
+ */
101
+ export function apply(ctx, config = {}) {
102
+ new OrchestrationPolicyService(ctx, config);
103
+ }
104
+ export default { name, apply };
105
+ //# sourceMappingURL=orchestration-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestration-policy.js","sourceRoot":"","sources":["../src/orchestration-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAgB,MAAM,qBAAqB,CAAA;AA0C3D,MAAM,aAAa,GAAG,CAAC,cAAc,EAAE,MAAM,CAAU,CAAA;AACvD,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,MAAM,CAAU,CAAA;AAEzD,+EAA+E;AAC/E,SAAS,iBAAiB;IACxB,OAAO;QACL,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,cAAc;QACvB,OAAO,EAAE,EAAE;QACX,cAAc,EAA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AAG,CAAA;IAC9F,CAAC;IACD,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,OAAO,CAAC,IAAI,CAAgB,CAAA;IAC3D,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,cAAc,CAAA;AACvC,CAAC;AAED,wFAAwF;AACxF,MAAM,OAAO,0BAA2B,SAAQ,OAAO;IACrC,MAAM,CAAsB;IAE5C,YAAY,GAAY,EAAE,SAAoC,EAAE;QAC9D,KAAK,CAAC,GAAG,EAAE,qBAAqB,CAAC,CAAA;QACjC,IAAI,CAAC,MAAM,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAA;IAC3C,CAAC;CACF;AAED,iDAAiD;AACjD,MAAM,CAAC,MAAM,IAAI,GAAG,sBAAsB,CAAA;AAE1C;;;;;;GAMG;AACH,MAAM,UAAU,KAAK,CAAC,GAAY,EAAE,SAAoC,EAAE;IACxE,IAAI,0BAA0B,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;AAC7C,CAAC;AAED,eAAe,EAAE,IAAI,EAAE,KAAK,EAAE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../src/prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAEnE,8DAA8D;AAC9D,MAAM,WAAW,eAAe;IAC9B,2DAA2D;IAC3D,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAUD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,GAAE,eAAoB,GAAG,aAAa,CAMjF"}
1
+ {"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../src/prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAEnE,8DAA8D;AAC9D,MAAM,WAAW,eAAe;IAC9B,2DAA2D;IAC3D,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAWD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,GAAE,eAAoB,GAAG,aAAa,CAMjF"}
package/dist/prompt.js CHANGED
@@ -7,7 +7,8 @@
7
7
  const SECTION_NAME = 'git:tools';
8
8
  const SECTION_ORDER = 118;
9
9
  const TEXT = [
10
- 'Agentic git (port of omp): `commit` analyzes the staged/working tree and returns ground truth (per-file numstat, bounded diff, lock-file hints, a suggested plan skeleton); `commit_apply` executes a `SplitCommitPlan` you author (types/scopes/summaries/dependencies) with validation — every staged file planned exactly once, lock files placed automatically, hunks validated, dependency order topological, cycles rejected before anything is written; `review` fans out read-only reviewer subagents over worktree/staged/commit-range diffs and returns P0–P3 findings plus a ship/reject verdict.',
10
+ 'Agentic git (port of omp): `commit` analyzes the staged/working tree and returns ground truth (per-file numstat, bounded diff, lock-file hints, a suggested plan skeleton); `commit_apply` executes a `SplitCommitPlan` you author (types/scopes/summaries/dependencies) with validation — every staged file planned exactly once, lock files placed automatically, hunks validated, dependency order topological, cycles rejected before anything is written, and `push: true` pushes the current branch to `origin` recording upstream (`--set-upstream`) — which needs a named-branch HEAD (`worktree acquire --branch`), since detached HEAD is refused with guidance; `review` fans out read-only reviewer subagents over worktree/staged/commit-range diffs and returns P0–P3 findings plus a ship/reject verdict.',
11
+ '`worktree` manages isolated per-task git worktrees with durable leases (restart-proof, treehouse model): `acquire` returns a `path` + `leaseId` (pass `branch` to cut a named-branch HEAD for `commit_apply --push`/PRs), work inside `path` like any checkout, then `release` it — dirty slots are refused unless `force`; `list` shows pool status, `prune`/`destroy` are dry-runs unless `yes` and never touch leased or dirty work automatically. For one task per worktree, pass the lease `path` as the `subagent` tool\'s `workspace` argument, then `release` after the child settles.',
11
12
  'Flow: `commit` → author the plan → `commit_apply` (dryRun first for exact messages). commit/commit_apply never lose changes: failures unstage rather than drop.',
12
13
  ].join('\n');
13
14
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"prompt.js","sourceRoot":"","sources":["../src/prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,MAAM,YAAY,GAAG,WAAW,CAAA;AAChC,MAAM,aAAa,GAAG,GAAG,CAAA;AAEzB,MAAM,IAAI,GAAG;IACX,8kBAA8kB;IAC9kB,iKAAiK;CAClK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAEZ;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,SAA0B,EAAE;IAChE,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,MAAM,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;KAC3C,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"prompt.js","sourceRoot":"","sources":["../src/prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,MAAM,YAAY,GAAG,WAAW,CAAA;AAChC,MAAM,aAAa,GAAG,GAAG,CAAA;AAEzB,MAAM,IAAI,GAAG;IACX,0xBAA0xB;IAC1xB,gkBAAgkB;IAChkB,iKAAiK;CAClK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAEZ;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,SAA0B,EAAE;IAChE,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,MAAM,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;KAC3C,CAAA;AACH,CAAC"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * P2 same-quality gate: no unreviewed change leaves the repository under a
3
+ * `review-gated` posture. `review --target staged` records a verdict over the
4
+ * exact staged range (pre-commit HEAD + index tree identity); `commit_apply
5
+ * --push` consults it before touching `origin` and refuses when the verdict is
6
+ * missing, stale, non-staged, or `reject`. Fail-closed by default.
7
+ *
8
+ * Verdicts live in this process (one host = one tool-git instance). A host
9
+ * restart forgets them — that is deliberately fail-closed: a deployment must
10
+ * re-review after a restart before the gate releases a push.
11
+ * @module @hy-sde-org/dsh-tool-git/push-gate
12
+ */
13
+ import type { GitService } from '@hy-sde-org/dsh-git';
14
+ /** The review targets that can produce a verdict. */
15
+ export type ReviewTarget = 'worktree' | 'staged' | 'commits';
16
+ /** One review verdict, keyed by repository root + target. */
17
+ export interface ReviewVerdictRecord {
18
+ /** Repository root (`git rev-parse --show-toplevel`) of the reviewed checkout. */
19
+ root: string;
20
+ /** Which diff the reviewers actually saw. */
21
+ target: ReviewTarget;
22
+ verdict: 'ship' | 'reject';
23
+ /** HEAD hash when the review ran — part of the staged-range identity. */
24
+ beforeHead: string;
25
+ /** Index tree (`git write-tree`) when the review ran — null when unreadable. */
26
+ indexTree: string | null;
27
+ /** Epoch ms of the review run (diagnostics only; staleness is identity-based). */
28
+ at: number;
29
+ }
30
+ /** Record (or replace) one review verdict. */
31
+ export declare function recordReviewVerdict(record: ReviewVerdictRecord): void;
32
+ /** Latest staged-target verdict for a repository root, if any. */
33
+ export declare function latestStagedVerdict(root: string): ReviewVerdictRecord | undefined;
34
+ /** Test-only: drop all recorded verdicts. */
35
+ export declare function clearReviewVerdicts(): void;
36
+ /** Read the index tree identity; null when the index is unreadable (e.g. conflicts). */
37
+ export declare function indexTreeOf(git: GitService, cwd: string, signal: AbortSignal | undefined): Promise<string | null>;
38
+ /** Current HEAD hash identity; '' when unborn. */
39
+ export declare function headOf(git: GitService, cwd: string, signal: AbortSignal | undefined): Promise<string>;
40
+ export interface PushGateDecision {
41
+ allowed: boolean;
42
+ /** Success path note (recorded in tool `warnings`) or the refusal reason. */
43
+ reason: string;
44
+ }
45
+ /**
46
+ * Decide whether one `commit_apply --push` may proceed under the review gate.
47
+ * @param posture - the repository's resolved standing posture.
48
+ * @param record - the latest staged review verdict (undefined = never reviewed).
49
+ * @param beforeHead - HEAD identity at `commit_apply` start.
50
+ * @param indexTree - index tree identity at `commit_apply` start (null = unreadable).
51
+ * @param requireVerdict - the verdict that releases a push.
52
+ * @param onUnavailable - `block` (fail-closed) or `warn` (loud degrade) when no
53
+ * current `ship` verdict exists. A `reject` verdict or a
54
+ * stale/mismatched identity ALWAYS blocks.
55
+ */
56
+ export declare function decidePushGate(args: {
57
+ posture: 'review-gated' | 'fast';
58
+ record: ReviewVerdictRecord | undefined;
59
+ beforeHead: string;
60
+ indexTree: string | null;
61
+ requireVerdict: 'ship';
62
+ onUnavailable: 'block' | 'warn';
63
+ }): PushGateDecision;
64
+ //# sourceMappingURL=push-gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"push-gate.d.ts","sourceRoot":"","sources":["../src/push-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD,qDAAqD;AACrD,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAA;AAE5D,6DAA6D;AAC7D,MAAM,WAAW,mBAAmB;IAClC,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAA;IACZ,6CAA6C;IAC7C,MAAM,EAAE,YAAY,CAAA;IACpB,OAAO,EAAE,MAAM,GAAG,QAAQ,CAAA;IAC1B,yEAAyE;IACzE,UAAU,EAAE,MAAM,CAAA;IAClB,gFAAgF;IAChF,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,kFAAkF;IAClF,EAAE,EAAE,MAAM,CAAA;CACX;AAOD,8CAA8C;AAC9C,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAIrE;AAED,kEAAkE;AAClE,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAEjF;AAED,6CAA6C;AAC7C,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C;AAED,wFAAwF;AACxF,wBAAsB,WAAW,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAGvH;AAED,kDAAkD;AAClD,wBAAsB,MAAM,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAK3G;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAA;IAChB,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE;IACnC,OAAO,EAAE,cAAc,GAAG,MAAM,CAAA;IAChC,MAAM,EAAE,mBAAmB,GAAG,SAAS,CAAA;IACvC,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,cAAc,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,OAAO,GAAG,MAAM,CAAA;CAChC,GAAG,gBAAgB,CAkCnB"}
@@ -0,0 +1,86 @@
1
+ /**
2
+ * P2 same-quality gate: no unreviewed change leaves the repository under a
3
+ * `review-gated` posture. `review --target staged` records a verdict over the
4
+ * exact staged range (pre-commit HEAD + index tree identity); `commit_apply
5
+ * --push` consults it before touching `origin` and refuses when the verdict is
6
+ * missing, stale, non-staged, or `reject`. Fail-closed by default.
7
+ *
8
+ * Verdicts live in this process (one host = one tool-git instance). A host
9
+ * restart forgets them — that is deliberately fail-closed: a deployment must
10
+ * re-review after a restart before the gate releases a push.
11
+ * @module @hy-sde-org/dsh-tool-git/push-gate
12
+ */
13
+ const verdicts = new Map();
14
+ /** Record (or replace) one review verdict. */
15
+ export function recordReviewVerdict(record) {
16
+ const set = verdicts.get(record.root) ?? {};
17
+ set[record.target] = record;
18
+ verdicts.set(record.root, set);
19
+ }
20
+ /** Latest staged-target verdict for a repository root, if any. */
21
+ export function latestStagedVerdict(root) {
22
+ return verdicts.get(root)?.staged;
23
+ }
24
+ /** Test-only: drop all recorded verdicts. */
25
+ export function clearReviewVerdicts() {
26
+ verdicts.clear();
27
+ }
28
+ /** Read the index tree identity; null when the index is unreadable (e.g. conflicts). */
29
+ export async function indexTreeOf(git, cwd, signal) {
30
+ const run = await git.run(['write-tree'], { cwd, signal });
31
+ return run.exitCode === 0 ? run.stdout.trim() : null;
32
+ }
33
+ /** Current HEAD hash identity; '' when unborn. */
34
+ export async function headOf(git, cwd, signal) {
35
+ // Unborn branches (no commits yet) exit non-zero: report '' so the gate can
36
+ // never match a recorded verdict on a repo that had no HEAD at review time.
37
+ const run = await git.run(['log', '-1', '--format=%H'], { cwd, signal });
38
+ return run.exitCode === 0 ? run.stdout.trim() : '';
39
+ }
40
+ /**
41
+ * Decide whether one `commit_apply --push` may proceed under the review gate.
42
+ * @param posture - the repository's resolved standing posture.
43
+ * @param record - the latest staged review verdict (undefined = never reviewed).
44
+ * @param beforeHead - HEAD identity at `commit_apply` start.
45
+ * @param indexTree - index tree identity at `commit_apply` start (null = unreadable).
46
+ * @param requireVerdict - the verdict that releases a push.
47
+ * @param onUnavailable - `block` (fail-closed) or `warn` (loud degrade) when no
48
+ * current `ship` verdict exists. A `reject` verdict or a
49
+ * stale/mismatched identity ALWAYS blocks.
50
+ */
51
+ export function decidePushGate(args) {
52
+ const { posture, record, beforeHead, indexTree, requireVerdict, onUnavailable } = args;
53
+ if (posture === 'fast') {
54
+ return { allowed: true, reason: 'push gate skipped: this repository has an explicit `fast` posture' };
55
+ }
56
+ if (record === undefined) {
57
+ const reason = 'commit_apply --push is gated but this staged range has never been reviewed — run `review --target staged` first';
58
+ return onUnavailable === 'block'
59
+ ? { allowed: false, reason: `${reason} (or record an explicit \`fast\` posture for this repository)` }
60
+ : { allowed: true, reason: `${reason}; pushing anyway because \`reviewGate.onUnavailable: warn\`` };
61
+ }
62
+ if (record.target !== 'staged') {
63
+ const reason = `the latest review targeted \`${record.target}\`, not the staged range — run \`review --target staged\``;
64
+ return onUnavailable === 'block'
65
+ ? { allowed: false, reason }
66
+ : { allowed: true, reason: `${reason}; pushing anyway because \`reviewGate.onUnavailable: warn\`` };
67
+ }
68
+ const stale = record.beforeHead !== beforeHead || record.indexTree !== indexTree;
69
+ if (stale) {
70
+ const identity = record.beforeHead !== beforeHead
71
+ ? 'HEAD moved since the review'
72
+ : 'the staged tree changed since the review';
73
+ return { allowed: false, reason: `stale review verdict — ${identity}; re-run \`review --target staged\`` };
74
+ }
75
+ if (record.verdict !== requireVerdict) {
76
+ return {
77
+ allowed: false,
78
+ reason: `the review verdict was \`${record.verdict}\`, not \`${requireVerdict}\` — fix the findings and re-run \`review --target staged\``,
79
+ };
80
+ }
81
+ return {
82
+ allowed: true,
83
+ reason: `push gated: latest staged review returned \`${record.verdict}\` for the current staged range`,
84
+ };
85
+ }
86
+ //# sourceMappingURL=push-gate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"push-gate.js","sourceRoot":"","sources":["../src/push-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAyBH,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAqB,CAAA;AAE7C,8CAA8C;AAC9C,MAAM,UAAU,mBAAmB,CAAC,MAA2B;IAC7D,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAA;IAC3C,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAA;IAC3B,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;AAChC,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,OAAO,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;AACnC,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,mBAAmB;IACjC,QAAQ,CAAC,KAAK,EAAE,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E,GAAG,MAAM,+DAA+D,EAAE;YACtG,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,6DAA6D,EAAE,CAAA;IACvG,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC/B,MAAM,MAAM,GAAG,gCAAgC,MAAM,CAAC,MAAM,2DAA2D,CAAA;QACvH,OAAO,aAAa,KAAK,OAAO;YAC9B,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE;YAC5B,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,6DAA6D,EAAE,CAAA;IACvG,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,KAAK,UAAU,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS,CAAA;IAChF,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,KAAK,UAAU;YAC/C,CAAC,CAAC,6BAA6B;YAC/B,CAAC,CAAC,0CAA0C,CAAA;QAC9C,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,0BAA0B,QAAQ,qCAAqC,EAAE,CAAA;IAC5G,CAAC;IACD,IAAI,MAAM,CAAC,OAAO,KAAK,cAAc,EAAE,CAAC;QACtC,OAAO;YACL,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,4BAA4B,MAAM,CAAC,OAAO,aAAa,cAAc,6DAA6D;SAC3I,CAAA;IACH,CAAC;IACD,OAAO;QACL,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,+CAA+C,MAAM,CAAC,OAAO,iCAAiC;KACvG,CAAA;AACH,CAAC"}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Read-preference routing for the git tools (see LICENSE): every commit /
3
+ * review READ surface resolves through the native `pi-vcs` CLI (`ctx.vcs`)
4
+ * when its probe is clean, with the TS/git-CLI `ctx.git` service as the
5
+ * fallback. Mutation inputs — `stageHunks` raw diffs, `commit` trees —
6
+ * always stay on `ctx.git`; this facade deliberately has no add/commit/apply.
7
+ *
8
+ * The facade is created once per tool execution (a single probe), so the
9
+ * read surfaces share one backend decision for that call.
10
+ * @module @hy-sde-org/dsh-tool-git/reads
11
+ */
12
+ import type { Context } from '@deepseek-ai/cordis';
13
+ import type { GitStatusSummary, NumstatEntry } from '@hy-sde-org/dsh-git';
14
+ /**
15
+ * Minimal structural shape of a host `ctx.vcs` service as this facade
16
+ * consumes it. `@deepseek-ai/dsh-vcs` is NOT published to npm (it exists only
17
+ * inside the DeepSeek Harness fork), so the standalone declares the narrow
18
+ * surface it needs instead of importing the package; any host that registers
19
+ * a compatible `vcs` service (probe + repo-info + diff verbs) satisfies this
20
+ * type, and the facade degrades to `ctx.git` when the service is absent.
21
+ */
22
+ export interface VcsService {
23
+ /** Whether the native CLI is reachable and answers a version probe. */
24
+ probe(): Promise<{
25
+ available: boolean;
26
+ version?: string;
27
+ reason?: string;
28
+ }>;
29
+ /** Repository discovery; `null` when `dir` is outside any checkout. */
30
+ repoInfo(dir: string): Promise<{
31
+ root: string;
32
+ gitDir: string;
33
+ branch?: string | null;
34
+ } | null>;
35
+ changedFiles(dir: string, options?: ReadRange, signal?: AbortSignal): Promise<string[]>;
36
+ status(dir: string, signal?: AbortSignal): Promise<GitStatusSummary>;
37
+ numstat(dir: string, options?: ReadRange, signal?: AbortSignal): Promise<string>;
38
+ branch(dir: string): Promise<string | undefined>;
39
+ diff(dir: string, options?: ReadRange, signal?: AbortSignal): Promise<string>;
40
+ }
41
+ /** Range selectors shared by the read surfaces (mirrors `git` diff options). */
42
+ export interface ReadRange {
43
+ /** True for index→HEAD when `base`/`head` are unset. */
44
+ cached?: boolean;
45
+ /** Base revision; head omitted → base→worktree. */
46
+ base?: string;
47
+ /** Head revision (only with `base`). */
48
+ head?: string;
49
+ }
50
+ /** The read-only git surface the commit/review tools consume. */
51
+ export interface ReadSurface {
52
+ /** Which backend served this facade (for diagnostics/tests). */
53
+ readonly backend: 'vcs' | 'git';
54
+ /** Whether `cwd` is inside a git working tree. */
55
+ isRepo(): Promise<boolean>;
56
+ /** Changed file names (destination path for renames). */
57
+ changedFiles(options?: ReadRange): Promise<string[]>;
58
+ /** Staged/unstaged/untracked status counts. */
59
+ status(): Promise<GitStatusSummary>;
60
+ /** Parsed numstat entries (binary rows carry `-` counts). */
61
+ numstat(options?: ReadRange): Promise<NumstatEntry[]>;
62
+ /** Current branch name, or undefined when detached. */
63
+ branch(): Promise<string | undefined>;
64
+ /** Raw git-compatible unified diff text for one range. */
65
+ diffText(options?: ReadRange): Promise<string>;
66
+ }
67
+ /**
68
+ * Open a read facade for one tool execution: prefer `ctx.vcs` when the host
69
+ * bundle registered it and its probe reports a clean `pi-vcs` binary, else
70
+ * fall back to `ctx.git`. Never throws on the probe.
71
+ * @param ctx - the agent-plane plugin context (injects `git`; `vcs` optional).
72
+ * @param cwd - working directory inside the repository under review.
73
+ * @param signal - optional abort, forwarded to the active backend.
74
+ * @returns a read facade bound to the chosen backend (`vcs` when its probe
75
+ * is clean, else `git`).
76
+ */
77
+ export declare function openReads(ctx: Context, cwd: string, signal: AbortSignal | undefined): Promise<ReadSurface>;
78
+ //# sourceMappingURL=reads.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reads.d.ts","sourceRoot":"","sources":["../src/reads.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAc,gBAAgB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAGrF;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU;IACzB,uEAAuE;IACvE,KAAK,IAAI,OAAO,CAAC;QAAE,SAAS,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAA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E,SAAS,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IACpD,+CAA+C;IAC/C,MAAM,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAAA;IACnC,6DAA6D;IAC7D,OAAO,CAAC,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAA;IACrD,uDAAuD;IACvD,MAAM,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACrC,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;CAC/C;AA6ED;;;;;;;;;GASG;AACH,wBAAsB,SAAS,CAC7B,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,WAAW,GAAG,SAAS,GAC9B,OAAO,CAAC,WAAW,CAAC,CAOtB"}
package/dist/reads.js ADDED
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Read-preference routing for the git tools (see LICENSE): every commit /
3
+ * review READ surface resolves through the native `pi-vcs` CLI (`ctx.vcs`)
4
+ * when its probe is clean, with the TS/git-CLI `ctx.git` service as the
5
+ * fallback. Mutation inputs — `stageHunks` raw diffs, `commit` trees —
6
+ * always stay on `ctx.git`; this facade deliberately has no add/commit/apply.
7
+ *
8
+ * The facade is created once per tool execution (a single probe), so the
9
+ * read surfaces share one backend decision for that call.
10
+ * @module @hy-sde-org/dsh-tool-git/reads
11
+ */
12
+ import { parseNumstat } from '@hy-sde-org/dsh-git';
13
+ /** Backend over `ctx.vcs` (native `pi-vcs` CLI; probe already clean). */
14
+ class VcsReads {
15
+ vcs;
16
+ cwd;
17
+ signal;
18
+ backend = 'vcs';
19
+ constructor(vcs, cwd, signal) {
20
+ this.vcs = vcs;
21
+ this.cwd = cwd;
22
+ this.signal = signal;
23
+ }
24
+ async isRepo() {
25
+ return (await this.vcs.repoInfo(this.cwd)) !== null;
26
+ }
27
+ async changedFiles(options = {}) {
28
+ return this.vcs.changedFiles(this.cwd, options, this.signal);
29
+ }
30
+ async status() {
31
+ return this.vcs.status(this.cwd, this.signal);
32
+ }
33
+ async numstat(options = {}) {
34
+ return parseNumstat(await this.vcs.numstat(this.cwd, options, this.signal));
35
+ }
36
+ async branch() {
37
+ return this.vcs.branch(this.cwd);
38
+ }
39
+ async diffText(options = {}) {
40
+ return this.vcs.diff(this.cwd, options, this.signal);
41
+ }
42
+ }
43
+ /** Backend over `ctx.git` (TS/git-CLI). */
44
+ class GitBackendReads {
45
+ git;
46
+ cwd;
47
+ signal;
48
+ backend = 'git';
49
+ constructor(git, cwd, signal) {
50
+ this.git = git;
51
+ this.cwd = cwd;
52
+ this.signal = signal;
53
+ }
54
+ async isRepo() {
55
+ return this.git.isRepo(this.cwd, this.signal);
56
+ }
57
+ async changedFiles(options = {}) {
58
+ const all = { ...options };
59
+ if (this.signal !== undefined)
60
+ all.signal = this.signal;
61
+ return this.git.diff.changedFiles(this.cwd, all);
62
+ }
63
+ async status() {
64
+ return this.git.status(this.cwd, this.signal);
65
+ }
66
+ async numstat(options = {}) {
67
+ const all = { ...options };
68
+ if (this.signal !== undefined)
69
+ all.signal = this.signal;
70
+ return this.git.diff.numstat(this.cwd, all);
71
+ }
72
+ async branch() {
73
+ return this.git.branch(this.cwd, this.signal);
74
+ }
75
+ async diffText(options = {}) {
76
+ return this.git.diffText(this.cwd, { ...options, binary: true }, this.signal);
77
+ }
78
+ }
79
+ /**
80
+ * Open a read facade for one tool execution: prefer `ctx.vcs` when the host
81
+ * bundle registered it and its probe reports a clean `pi-vcs` binary, else
82
+ * fall back to `ctx.git`. Never throws on the probe.
83
+ * @param ctx - the agent-plane plugin context (injects `git`; `vcs` optional).
84
+ * @param cwd - working directory inside the repository under review.
85
+ * @param signal - optional abort, forwarded to the active backend.
86
+ * @returns a read facade bound to the chosen backend (`vcs` when its probe
87
+ * is clean, else `git`).
88
+ */
89
+ export async function openReads(ctx, cwd, signal) {
90
+ const vcs = ctx.get('vcs');
91
+ if (vcs !== undefined) {
92
+ const probe = await vcs.probe();
93
+ if (probe.available)
94
+ return new VcsReads(vcs, cwd, signal);
95
+ }
96
+ return new GitBackendReads(ctx.git, cwd, signal);
97
+ }
98
+ //# sourceMappingURL=reads.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reads.js","sourceRoot":"","sources":["../src/reads.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAkDlD,yEAAyE;AACzE,MAAM,QAAQ;IAGO;IACA;IACA;IAJV,OAAO,GAAG,KAAc,CAAA;IACjC,YACmB,GAAe,EACf,GAAW,EACX,MAA+B;QAF/B,QAAG,GAAH,GAAG,CAAY;QACf,QAAG,GAAH,GAAG,CAAQ;QACX,WAAM,GAAN,MAAM,CAAyB;IAC/C,CAAC;IAEJ,KAAK,CAAC,MAAM;QACV,OAAO,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,CAAA;IACrD,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,UAAqB,EAAE;QACxC,OAAO,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;IAC9D,CAAC;IAED,KAAK,CAAC,MAAM;QACV,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;IAC/C,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,UAAqB,EAAE;QACnC,OAAO,YAAY,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;IAC7E,CAAC;IAED,KAAK,CAAC,MAAM;QACV,OAAO,IAA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CAAC,MAAM,CAAA;QACvD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;IAC7C,CAAC;IAED,KAAK,CAAC,MAAM;QACV,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;IAC/C,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,UAAqB,EAAE;QACpC,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;IAC/E,CAAC;CACF;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,GAAY,EACZ,GAAW,EACX,MAA+B;IAE/B,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IAC1B,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,MAAM,KAAK,GAAG,MAAM,GAAG,CAAC,KAAK,EAAE,CAAA;QAC/B,IAAI,KAAK,CAAC,SAAS;YAAE,OAAO,IAAI,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAA;IAC5D,CAAC;IACD,OAAO,IAAI,eAAe,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAA;AAClD,CAAC"}
package/dist/review.d.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  * (`prompts/agents/reviewer.md`) is adapted into a plain prompt handed to
8
8
  * `ctx.subagents` children with a typed `outputSchema`, so each reviewer
9
9
  * returns structured verdict + findings instead of prose; aggregation is local.
10
- * See port_omp.md item: commit/review.
10
+ * See LICENSE.
11
11
  * @module @hy-sde-org/dsh-tool-git/review
12
12
  */
13
13
  import type { Context } from '@deepse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