@primitive.ai/prim 0.1.0-alpha.111 → 0.1.0-alpha.113
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/README.md +18 -5
- package/SKILL.md +20 -16
- package/dist/{chunk-KQ4WBK5R.js → chunk-3KKEV7VI.js} +2 -2
- package/dist/{chunk-2IRLFOEL.js → chunk-6JHKKLA2.js} +79 -1
- package/dist/{chunk-IQZA65NV.js → chunk-7DVEH7FO.js} +1 -1
- package/dist/{chunk-W4ZEPZLK.js → chunk-BXLH4LDU.js} +1 -1
- package/dist/{chunk-GA2RXPJL.js → chunk-DWAXFXDG.js} +2 -2
- package/dist/{chunk-7VIMU2HR.js → chunk-FTW4ZCBA.js} +2 -2
- package/dist/{chunk-JJI7FU24.js → chunk-HMD5K6W7.js} +1 -1
- package/dist/{chunk-HTRFPXMD.js → chunk-IW5HCCOW.js} +3 -3
- package/dist/{chunk-UDBBJWQH.js → chunk-IZXLH3R5.js} +930 -582
- package/dist/{chunk-5LRKJTLA.js → chunk-J5HBSRAV.js} +7 -5
- package/dist/{chunk-5BLGBSDM.js → chunk-JDIAPBY7.js} +1 -1
- package/dist/{chunk-2Q3OGSTV.js → chunk-NEQI2VLM.js} +2 -2
- package/dist/{chunk-AOJ254C2.js → chunk-PJW6JZMH.js} +4 -4
- package/dist/{chunk-43ZKL27W.js → chunk-RTULPLS7.js} +1 -1
- package/dist/{chunk-CTRAJCPN.js → chunk-XV6C5ZV2.js} +1 -1
- package/dist/daemon/server.js +1184 -754
- package/dist/hook-runtime/daemon/server.js +1184 -754
- package/dist/hook-runtime/hooks/post-commit.js +929 -581
- package/dist/hook-runtime/hooks/post-rewrite.js +929 -581
- package/dist/hook-runtime/hooks/post-tool-use.js +1015 -588
- package/dist/hook-runtime/hooks/pre-commit.js +85 -6
- package/dist/hook-runtime/hooks/pre-tool-use.js +1047 -597
- package/dist/hook-runtime/hooks/prim-hook.js +1016 -589
- package/dist/hook-runtime/hooks/session-end.js +14 -12
- package/dist/hook-runtime/hooks/session-start.js +1016 -589
- package/dist/hook-runtime/index.js +1283 -915
- package/dist/hook-runtime/statusline-main.js +7 -5
- package/dist/hooks/post-commit.js +5 -5
- package/dist/hooks/post-rewrite.js +5 -5
- package/dist/hooks/post-tool-use.js +12 -12
- package/dist/hooks/pre-commit.js +3 -3
- package/dist/hooks/pre-tool-use.js +40 -17
- package/dist/hooks/prim-hook.js +12 -12
- package/dist/hooks/session-end.js +1 -1
- package/dist/hooks/session-start.js +7 -7
- package/dist/index.js +189 -247
- package/dist/statusline-main.js +7 -5
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ presence — from the command line and via session + git hooks.
|
|
|
10
10
|
> [!NOTE]
|
|
11
11
|
> **Conflict Gates** check each edit against the decision graph and surface any
|
|
12
12
|
> load-bearing decision it conflicts with. When **Enforcement** is enabled for your
|
|
13
|
-
> organization, gates can warn, pause, or block a conflicting edit until you
|
|
13
|
+
> organization, gates can warn, pause, or block a conflicting edit until you resolve
|
|
14
14
|
> the decision and retry. Automatic decision capture in active repositories is separate.
|
|
15
15
|
|
|
16
16
|
## Installation
|
|
@@ -330,7 +330,7 @@ prim decisions link <child> --on <parent> # Relate: <child> depends on <paren
|
|
|
330
330
|
prim decisions unlink <child> --on <parent> # Remove that dependency
|
|
331
331
|
```
|
|
332
332
|
|
|
333
|
-
`<id>`
|
|
333
|
+
`<id>` uses the canonical `dec_<8 hex>` Decision ID; bare short IDs and legacy full IDs remain accepted as inputs. STDOUT is machine-readable
|
|
334
334
|
JSON; human-readable status goes to STDERR.
|
|
335
335
|
|
|
336
336
|
`decisions check` uses the checkout's current Primitive repository binding and
|
|
@@ -365,7 +365,7 @@ would create a cycle (exit 2); an unresolved id exits 4.
|
|
|
365
365
|
### Reconcile
|
|
366
366
|
|
|
367
367
|
```bash
|
|
368
|
-
prim reconcile <id> #
|
|
368
|
+
prim reconcile <id> # Rejected: human_approval_required (exit 2)
|
|
369
369
|
```
|
|
370
370
|
|
|
371
371
|
Record what happened after resolving a specific conflict:
|
|
@@ -381,8 +381,11 @@ The conflict output supplies the check ID. Only the person whose edit was
|
|
|
381
381
|
checked can resolve that check. Repeating the same outcome is safe; changing an
|
|
382
382
|
already recorded outcome is rejected. These declarations do not issue a bypass.
|
|
383
383
|
|
|
384
|
-
|
|
385
|
-
|
|
384
|
+
Bypasses are disabled until an agent host can supply verifiable human approval.
|
|
385
|
+
Bare `prim reconcile <id>` rejects locally, including with `--yes`,
|
|
386
|
+
`--non-interactive`, or `--flag`. Sandbox escalation and automatic approval
|
|
387
|
+
review do not authorize an override. A blocked edit must remain blocked or be
|
|
388
|
+
changed to respect the governing Decisions.
|
|
386
389
|
|
|
387
390
|
### Hooks
|
|
388
391
|
|
|
@@ -521,3 +524,13 @@ pnpm lint # Lint
|
|
|
521
524
|
## License
|
|
522
525
|
|
|
523
526
|
[MIT](LICENSE)
|
|
527
|
+
|
|
528
|
+
### Decision identifiers
|
|
529
|
+
|
|
530
|
+
Decision IDs printed by prim are `dec_` followed by eight lowercase hexadecimal
|
|
531
|
+
characters. Use the same ID in commands and at
|
|
532
|
+
`https://app.getprimitive.ai/decisions/dec_<short>`. Public JSON fields such as
|
|
533
|
+
`id`, `decisionId`, and relationship references use this prefixed ID; the
|
|
534
|
+
`shortId` compatibility field contains the eight characters without the prefix.
|
|
535
|
+
Existing full record IDs remain accepted as inputs. Upgrade the backend before
|
|
536
|
+
this CLI; an unavailable identity produces an error rather than a storage ID.
|
package/SKILL.md
CHANGED
|
@@ -9,7 +9,7 @@ description: Use the prim CLI for Primitive’s decision graph. MUST INVOKE befo
|
|
|
9
9
|
|
|
10
10
|
## Mental model
|
|
11
11
|
|
|
12
|
-
In an active repo, prim passively captures the **decisions** your team makes -- which library, which pattern, which config value -- into a queryable graph, and links them: a decision can depend on earlier decisions (auto-linked from shared files, or related by hand — see *Relate decisions*) and reference the files it touched. **Conflict Gates** can check a later change against that graph and surface any load-bearing decision it conflicts with. When **Enforcement** is enabled for an organization, prim can warn, pause, or block the edit until you
|
|
12
|
+
In an active repo, prim passively captures the **decisions** your team makes -- which library, which pattern, which config value -- into a queryable graph, and links them: a decision can depend on earlier decisions (auto-linked from shared files, or related by hand — see *Relate decisions*) and reference the files it touched. **Conflict Gates** can check a later change against that graph and surface any load-bearing decision it conflicts with. When **Enforcement** is enabled for an organization, prim can warn, pause, or block the edit until you resolve the conflict. Capture in active repos runs independently.
|
|
13
13
|
|
|
14
14
|
Low-level capture runs automatically in active repos through the session hooks installed by `npx --yes @primitive.ai/prim claude install` (Claude Code), `npx --yes @primitive.ai/prim cursor install` (Cursor), `npx --yes @primitive.ai/prim codex install` (Codex), or `npx --yes @primitive.ai/prim hermes install` (Hermes). An inactive repo is not passively captured. Deliberately record higher-order forks in the road through `prim decisions create` as described below. Your job is also to **read** the graph before load-bearing edits and **answer** the occasional rationale confirmation. (Responding to Conflict Gates applies only once Enforcement is enabled — see below.)
|
|
15
15
|
|
|
@@ -29,17 +29,17 @@ The CLI auto-refreshes a still-valid session from the stored refresh token (proa
|
|
|
29
29
|
|
|
30
30
|
1. Every command accepts `--help`. When unsure of flags, run `npx --yes @primitive.ai/prim <cmd> --help` rather than guessing.
|
|
31
31
|
2. The CLI prints API errors as one-liners to stderr and exits non-zero. Treat any non-zero exit as actionable. If auth-related, re-check `auth status`.
|
|
32
|
-
3. `<idOrShortId>` arguments
|
|
32
|
+
3. `<idOrShortId>` arguments use the `dec_<8 hex>` ID shown in feeds and gate reasons. Bare short IDs and legacy full IDs remain accepted as inputs.
|
|
33
33
|
4. In `npx --yes @primitive.ai/prim ...`, `npx --yes` is npm's flag and only skips npm's package-install confirmation. It is not user consent for a Primitive action. Prim's global flag appears after the package name: `npx --yes @primitive.ai/prim --yes ...`.
|
|
34
34
|
|
|
35
35
|
## Conflict Gates & Enforcement
|
|
36
36
|
|
|
37
|
-
**Conflict Gates** check each edit against the decision graph before it lands and surface any load-bearing decision it conflicts with. When **Enforcement** is enabled for an organization, a conflicting edit can be warned, blocked, or paused for confirmation until you
|
|
37
|
+
**Conflict Gates** check each edit against the decision graph before it lands and surface any load-bearing decision it conflicts with. When **Enforcement** is enabled for an organization, a conflicting edit can be warned, blocked, or paused for confirmation until you resolve the conflict. Automatic decision capture in active repos (above) runs independently.
|
|
38
38
|
|
|
39
39
|
When Enforcement is enabled, before an edit (Claude Code: Edit/Write/MultiEdit; Cursor: Write/Delete/Shell; Codex: apply_patch; Hermes: write_file/patch) a PreToolUse hook scores the target file against the graph:
|
|
40
40
|
|
|
41
|
-
- **deny** -- the edit is blocked
|
|
42
|
-
- **warn / additional context** -- the edit proceeds, but a relevant prior decision is surfaced. Read it. Cursor, Codex, and Hermes
|
|
41
|
+
- **deny** -- the edit is blocked. Name each governing Decision and the proposed conflicting edit. Overriding a Decision requires explicit human approval for that specific override. Reconcile bypasses are disabled until a host can provide verifiable human approval; keep the edit blocked and choose a compatible approach.
|
|
42
|
+
- **warn / additional context** -- the edit proceeds, but a relevant prior decision is surfaced. Read it. Cursor, Codex, and Hermes map a would-be `ask` to **deny**. Do not change gate settings, use sandbox escalation, or request prefix permissions to evade the block. Automatic approval review, `--yes`, and an agent assertion are not human approval.
|
|
43
43
|
- **"decision check skipped / not verified" or "... partial / truncated"** -- the check could not fully run. Treat constraints as UNKNOWN, not clear; never read silence as approval.
|
|
44
44
|
|
|
45
45
|
When enabled, the gate sends its preflight check directly to Primitive and fail-opens on infrastructure errors (for example, a network failure or org-unbound token) -- a service problem would not block your edit. That is why an "unavailable" note matters: it is the honest signal that the check, not your edit, is what failed.
|
|
@@ -54,17 +54,21 @@ Before presenting decision reads, use the current conversation, task, and availa
|
|
|
54
54
|
|
|
55
55
|
Then tailor the delivery to this requester, not a generic reader. Take your cues from the signals actually present — durable preferences in memory, the format and depth they've used or asked for earlier in the conversation, and the shape of their current goal — and match the form (a one-line answer, a table, grouped headers, or prose), the depth (a bare intent versus full rationale, alternatives, and tradeoffs), the altitude (strategic direction versus specific ids and files), the fields they actually track, and the register of the exchange. Where a preference isn't evidenced, default to a concise, skimmable summary — read taste from signal the way you read rationale, never conjuring a persona from thin air. Tailoring changes how the facts land, never which facts: keep every conflict, supersession, and consequential tradeoff in view even when the requester wants it terse, and never let style override the `unavailable`, truncation, and count semantics above.
|
|
56
56
|
|
|
57
|
-
##
|
|
57
|
+
## Referring to Decisions
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
A Decision's public ID is `dec_<8 lowercase hex characters>`. Use it in commands,
|
|
60
|
+
written references, and links: `https://app.getprimitive.ai/decisions/dec_<short>`.
|
|
61
|
+
Use `webUrl` when present; otherwise build that URL from the public `id` or
|
|
62
|
+
`decisionId`. Intent-labelled Markdown links are supported. No lookup of an
|
|
63
|
+
internal record ID is needed to construct a link. Full IDs remain accepted only
|
|
64
|
+
as legacy inputs; never ask for or print them. Public JSON identity fields contain
|
|
65
|
+
prefixed short IDs; `shortId` remains a bare eight-character compatibility alias.
|
|
60
66
|
|
|
61
|
-
|
|
67
|
+
## Record a resolution
|
|
62
68
|
|
|
63
|
-
|
|
64
|
-
✓ Conflict caught before merge · N decisions saved · <author>'s intent preserved
|
|
65
|
-
```
|
|
69
|
+
Bare `prim reconcile <idOrShortId>` rejects with `human_approval_required` and exit 2. It cannot grant permission to edit, including with `--flag`, `--yes`, or `--non-interactive`.
|
|
66
70
|
|
|
67
|
-
|
|
71
|
+
After resolving a conflict, record the actual outcome with `prim reconcile <id> --check <checkId> --outcome followed|superseded`. Use `followed` when you retained the Decision. Use `superseded` only after an explicitly authorized replacement has already been persisted. Recording an outcome does not bypass the gate or change a Decision.
|
|
68
72
|
|
|
69
73
|
## Answer rationale confirmations
|
|
70
74
|
|
|
@@ -307,7 +311,7 @@ Safe to run repeatedly:
|
|
|
307
311
|
|
|
308
312
|
- **Idempotent** — re-linking an existing edge (or unlinking a missing one) is a no-op that still exits 0 (`already_linked` / `not_linked`).
|
|
309
313
|
- **Acyclic** — a self-loop, or any link that would close a dependency cycle, is refused with exit 2 (with the offending chain when it's short enough to render); the graph stays a DAG.
|
|
310
|
-
- **Exit codes** (treat non-zero as actionable): `0` success or no-op; `2` a refused link (self-loop, cycle, or an
|
|
314
|
+
- **Exit codes** (treat non-zero as actionable): `0` success or no-op; `2` a refused link (self-loop, cycle, or an unavailable identity — retry after identity repair); `4` an id that doesn't resolve. After a non-zero exit, branch on the exit code and the `[prim]` STDERR verdict, **not** on STDOUT keys: only the exit-0 outcomes carry the full `{ outcome, childId, childShortId, parentId, parentShortId }`; a refused link prints a smaller `{ outcome, … }`, and an unresolved id (exit 4) prints nothing to STDOUT.
|
|
311
315
|
|
|
312
316
|
Like authoring, relate only what the user asks for — don't invent relationships they didn't state.
|
|
313
317
|
|
|
@@ -354,8 +358,8 @@ Examples:
|
|
|
354
358
|
## Pitfalls
|
|
355
359
|
|
|
356
360
|
- **An "unavailable" / "not verified" decision check is not an all-clear.** Treat constraints as UNKNOWN and proceed deliberately; never read the silence as approval — the same holds for Conflict Gates once enabled.
|
|
357
|
-
- **When Enforcement is enabled, a `deny` means a real prior decision conflicts.**
|
|
358
|
-
- **Reconcile bypasses are
|
|
361
|
+
- **When Enforcement is enabled, a `deny` means a real prior decision conflicts.** Keep the edit blocked and pick an approach that respects it; intention alone never authorizes an override.
|
|
362
|
+
- **Reconcile bypasses are disabled.** Human approval cannot be inferred from tool execution or automatic review.
|
|
359
363
|
- **Capture of coding activity is automatic only in active repos; never inject moves by hand.** If an active repo's decisions aren't showing up, check that the session hooks are installed (`claude status` / `cursor status` / `codex status` / `hermes status`) and the daemon is running. Deliberately authoring a higher-order fork—either at the user's request or under the conservative proactive policy above—is a separate, supported path through `decisions create`; in an inactive repo, honor the per-invocation approval boundary above.
|
|
360
364
|
- **Don't fabricate rationale on a confirmation.** If you don't know why a decision was made, say so rather than guessing.
|
|
361
365
|
|
|
@@ -363,4 +367,4 @@ Examples:
|
|
|
363
367
|
|
|
364
368
|
If the user clearly made a durable fork-in-the-road decision, check recent decisions and record it now if it is not already present when capture is active — asking the single rationale question first when the why is not deducible from available context. When capture is inactive, record it only if the user explicitly requested that create; otherwise present it for the per-invocation approval above. If a strong higher-order decision was only inferred, decide whether it clears the interruption budget; if so, ask the single concise confirmation question after reporting the completed work. Otherwise say nothing about Primitive.
|
|
365
369
|
|
|
366
|
-
If Conflict Gates are enabled and one denied or warned you, report which decision(s) it named and
|
|
370
|
+
If Conflict Gates are enabled and one denied or warned you, report which decision(s) it named and how the conflict was resolved or why the edit remains blocked. If you read the graph before a load-bearing change, note what you found so the user can verify in the dashboard.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
boundedHealthError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IZXLH3R5.js";
|
|
4
4
|
import {
|
|
5
5
|
terminalSafeLine
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6JHKKLA2.js";
|
|
7
7
|
|
|
8
8
|
// src/hooks/redact.ts
|
|
9
9
|
import { existsSync, readFileSync, statSync } from "fs";
|
|
@@ -25,6 +25,83 @@ import {
|
|
|
25
25
|
workosConnectTokenEndpoint
|
|
26
26
|
} from "./chunk-XG7S3LIL.js";
|
|
27
27
|
|
|
28
|
+
// src/decisions/identity.ts
|
|
29
|
+
var PUBLIC_ID = /^dec_[0-9a-f]{8}$/u;
|
|
30
|
+
var BARE_ID = /^[0-9a-f]{8}$/u;
|
|
31
|
+
var OPAQUE_FIELDS = /* @__PURE__ */ new Set([
|
|
32
|
+
"cursor",
|
|
33
|
+
"continueCursor",
|
|
34
|
+
"nextCursor",
|
|
35
|
+
"reviewToken",
|
|
36
|
+
"bypassToken"
|
|
37
|
+
]);
|
|
38
|
+
function decisionIdentifier(id, shortId) {
|
|
39
|
+
if (typeof id === "string" && PUBLIC_ID.test(id)) return id;
|
|
40
|
+
if (typeof shortId === "string" && BARE_ID.test(shortId)) return `dec_${shortId}`;
|
|
41
|
+
if (typeof id === "string" && BARE_ID.test(id)) return `dec_${id}`;
|
|
42
|
+
return void 0;
|
|
43
|
+
}
|
|
44
|
+
function publicDecisionResponse(value) {
|
|
45
|
+
const replacements = /* @__PURE__ */ new Map();
|
|
46
|
+
const referenceKeys = /* @__PURE__ */ new Set([
|
|
47
|
+
"decisionId",
|
|
48
|
+
"childId",
|
|
49
|
+
"parentId",
|
|
50
|
+
"supersededBy",
|
|
51
|
+
"activationDecisionId"
|
|
52
|
+
]);
|
|
53
|
+
function visit(input, field = "") {
|
|
54
|
+
if (OPAQUE_FIELDS.has(field) || input === null || input === void 0) return input;
|
|
55
|
+
if (Array.isArray(input)) return input.map((item) => visit(item, field));
|
|
56
|
+
if (typeof input === "string" && (referenceKeys.has(field) || /DecisionIds$/u.test(field))) {
|
|
57
|
+
const id = decisionIdentifier(input);
|
|
58
|
+
if (!id) throw new Error("Decision identity unavailable; update Primitive and retry");
|
|
59
|
+
return id;
|
|
60
|
+
}
|
|
61
|
+
if (typeof input !== "object") return input;
|
|
62
|
+
const row = { ...input };
|
|
63
|
+
for (const [idKey, shortKey] of [
|
|
64
|
+
["id", "shortId"],
|
|
65
|
+
["_id", "shortId"],
|
|
66
|
+
["decisionId", "shortId"],
|
|
67
|
+
["childId", "childShortId"],
|
|
68
|
+
["parentId", "parentShortId"]
|
|
69
|
+
]) {
|
|
70
|
+
if (!(idKey in row) || (idKey === "id" || idKey === "_id") && !("intent" in row || "shortId" in row))
|
|
71
|
+
continue;
|
|
72
|
+
const id = decisionIdentifier(
|
|
73
|
+
row[idKey],
|
|
74
|
+
row[shortKey] ?? (idKey === "decisionId" ? row.decisionShortId : void 0)
|
|
75
|
+
);
|
|
76
|
+
if (!id) throw new Error("Decision identity unavailable; update Primitive and retry");
|
|
77
|
+
const previous = row[idKey];
|
|
78
|
+
if (typeof previous === "string" && !PUBLIC_ID.test(previous) && !BARE_ID.test(previous)) {
|
|
79
|
+
replacements.set(previous, id);
|
|
80
|
+
}
|
|
81
|
+
if (shortKey in row) row[shortKey] = id.slice(4);
|
|
82
|
+
if (idKey === "decisionId" && "decisionShortId" in row) row.decisionShortId = id.slice(4);
|
|
83
|
+
row[idKey] = id;
|
|
84
|
+
}
|
|
85
|
+
return Object.fromEntries(Object.entries(row).map(([key, item]) => [key, visit(item, key)]));
|
|
86
|
+
}
|
|
87
|
+
const projected = visit(value);
|
|
88
|
+
function replace(input, field = "") {
|
|
89
|
+
if (OPAQUE_FIELDS.has(field)) return input;
|
|
90
|
+
if (typeof input === "string") {
|
|
91
|
+
let output = input;
|
|
92
|
+
for (const [raw, id] of replacements) if (raw !== id) output = output.replaceAll(raw, id);
|
|
93
|
+
return output;
|
|
94
|
+
}
|
|
95
|
+
if (Array.isArray(input)) return input.map((item) => replace(item, field));
|
|
96
|
+
if (input && typeof input === "object")
|
|
97
|
+
return Object.fromEntries(
|
|
98
|
+
Object.entries(input).map(([key, item]) => [key, replace(item, key)])
|
|
99
|
+
);
|
|
100
|
+
return input;
|
|
101
|
+
}
|
|
102
|
+
return replace(projected);
|
|
103
|
+
}
|
|
104
|
+
|
|
28
105
|
// src/client.ts
|
|
29
106
|
import { createHash } from "crypto";
|
|
30
107
|
import { chmodSync as chmodSync2, existsSync, mkdirSync, readFileSync as readFileSync2, rmSync } from "fs";
|
|
@@ -656,7 +733,7 @@ async function responseValue(response) {
|
|
|
656
733
|
const message = typeof errorRecord?.error === "string" ? errorRecord.error : `HTTP ${response.status}`;
|
|
657
734
|
throw new HttpError(response.status, message, errorBody);
|
|
658
735
|
}
|
|
659
|
-
return response.json();
|
|
736
|
+
return publicDecisionResponse(await response.json());
|
|
660
737
|
}
|
|
661
738
|
async function request(method, path, body, options) {
|
|
662
739
|
const siteUrl = getSiteUrl();
|
|
@@ -746,6 +823,7 @@ async function getPinnedManagementClient(options = {}) {
|
|
|
746
823
|
}
|
|
747
824
|
|
|
748
825
|
export {
|
|
826
|
+
decisionIdentifier,
|
|
749
827
|
terminalSafeText,
|
|
750
828
|
terminalSafeLine,
|
|
751
829
|
isTerminalSafeText,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
isTerminalSafeText,
|
|
4
4
|
terminalSafeLine,
|
|
5
5
|
terminalSafeText
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6JHKKLA2.js";
|
|
7
7
|
|
|
8
8
|
// src/decisions/feedback.ts
|
|
9
9
|
var FEEDBACK_PROTOCOL_VERSION = 2;
|
|
@@ -19,7 +19,7 @@ var SHORT_ID = /^[0-9a-f]{8}$/u;
|
|
|
19
19
|
var MAX_EVENT_ID_CHARS = 128;
|
|
20
20
|
var MAX_RAW_INTENT_CODE_UNITS = 512;
|
|
21
21
|
var MAX_FEEDBACK_WEB_URL_CHARS = 2048;
|
|
22
|
-
var SAFE_PUBLISH_DECISION_ID = /^[
|
|
22
|
+
var SAFE_PUBLISH_DECISION_ID = /^dec_[0-9a-f]{8}$/u;
|
|
23
23
|
function isRecord(value) {
|
|
24
24
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
25
25
|
}
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
analyzeShellTargets,
|
|
6
6
|
extractFileTargets
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XV6C5ZV2.js";
|
|
8
8
|
import {
|
|
9
9
|
scrubEnvironmentPaths
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3KKEV7VI.js";
|
|
11
11
|
import {
|
|
12
12
|
cachedCollectScopeAdmits
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-IZXLH3R5.js";
|
|
14
14
|
import {
|
|
15
15
|
canonicalRepositoryPath,
|
|
16
16
|
currentBranch,
|