@primitive.ai/prim 0.1.0-alpha.46 → 0.1.0-alpha.48
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/SKILL.md +5 -3
- package/dist/{chunk-ESLX7ISX.js → chunk-5K725K35.js} +1 -1
- package/dist/{chunk-JT4Q333I.js → chunk-CK75QBCB.js} +1 -1
- package/dist/{chunk-VQ2ZV2D5.js → chunk-TPROV45L.js} +1 -1
- package/dist/{chunk-Z4VI6TNX.js → chunk-WRPKAPVE.js} +1 -1
- package/dist/daemon/server.js +1 -1
- package/dist/hooks/post-commit.js +2 -2
- package/dist/hooks/post-tool-use.js +2 -2
- package/dist/hooks/pre-commit.js +2 -2
- package/dist/hooks/pre-tool-use.js +1 -1
- package/dist/hooks/prim-hook.js +3 -3
- package/dist/hooks/session-start.js +2 -2
- package/dist/index.js +4 -4
- package/package.json +1 -1
package/SKILL.md
CHANGED
|
@@ -49,7 +49,9 @@ When enabled, the gate fail-opens on its *own* infrastructure errors (no daemon,
|
|
|
49
49
|
- `npx --yes @primitive.ai/prim decisions recent` -- the team's recent decisions, each row badged by author and agent (`Your Claude Code` / `Your Codex` / `Your Hermes`); `--limit <n>` and `--since <dur>` narrow it. `--author "<name>"` filters to one teammate (feed name, `"First Last"`, last name, username, email, or email local-part) -- the way to answer "what has X decided?"; an unknown or ambiguous name comes back as `unavailable` with the reason, and `authorHasDecisions` in the JSON distinguishes "no feed-visible decisions" (false) from "has decisions, none in this window" (true). The page defaults to the 10 most recent, so it can hide older ones: on an author query the JSON's `windowTotal` is how many that teammate has in the window. When `windowTotal` exceeds the rows returned, don't present the page as complete -- tell the user you're showing the most recent N of `windowTotal` and offer to pull the rest, which is a re-run with `--limit <windowTotal>` (capped at 100; `windowTotalCapped` means the count is a floor rendered `N+`, and a window past 100 can't be fetched whole).
|
|
50
50
|
- `npx --yes @primitive.ai/prim decisions show <idOrShortId>` and `npx --yes @primitive.ai/prim decisions cascade <idOrShortId>` -- full detail, and the downstream blast radius a change would disturb.
|
|
51
51
|
|
|
52
|
-
Before presenting decision reads, use the current conversation, task, and available memory to understand what matters to the requester. Do not dump the API's chronological rows unchanged. Group related decisions around goals or workstreams, lead with decisions that affect the requester's current work, and surface conflicts, supersessions, or consequential tradeoffs before background activity. Explain why an item is relevant when the connection is supported; do not invent relevance or rationale. Preserve the response's `unavailable`, truncation, and count semantics when reshaping it.
|
|
52
|
+
Before presenting decision reads, use the current conversation, task, and available memory to understand what matters to the requester and how they want it delivered. Do not dump the API's chronological rows unchanged. Group related decisions around goals or workstreams, lead with decisions that affect the requester's current work, and surface conflicts, supersessions, or consequential tradeoffs before background activity. Explain why an item is relevant when the connection is supported; do not invent relevance or rationale. Preserve the response's `unavailable`, truncation, and count semantics when reshaping it.
|
|
53
|
+
|
|
54
|
+
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.
|
|
53
55
|
|
|
54
56
|
## Reconcile and the verdict footer
|
|
55
57
|
|
|
@@ -79,9 +81,9 @@ Capture is automatic for low-level choices made while coding. Use the deliberate
|
|
|
79
81
|
|
|
80
82
|
A decision worth deliberately recording is a genuine **fork in the road**: the user or agent encountered multiple plausible paths, selected one, and that selection should inform future work. Record the chosen behavior, direction, constraint, or tradeoff—not routine implementation needed to finish the task or follow an existing convention. A teammate working elsewhere should benefit from knowing it.
|
|
81
83
|
|
|
82
|
-
### Ground the rationale in
|
|
84
|
+
### Ground the rationale in real sources
|
|
83
85
|
|
|
84
|
-
Before deliberately recording a decision,
|
|
86
|
+
Before deliberately recording a decision, actively gather the real context behind **why this path was chosen** — aim to populate the decision with as much genuine, source-grounded rationale as you can find, never a plausible-sounding guess. Start with the current conversation, then reach for every tool, connector, and MCP server available to you to pull from the actual sources the decision or task points to: Slack threads, Granola or other meeting notes, Linear issues, Zoom transcripts, email, and repository docs or skills. Don't limit yourself to that list — use whatever integrations you have. Read the source directly instead of inferring from memory, and target the specific thread, meeting, ticket, or document the user referenced rather than a broad, scattershot search.
|
|
85
87
|
|
|
86
88
|
Record only rationale supported by those sources. Do not mistake the implementation method, the task request, or a restatement of the decision for its rationale. If the rationale remains unclear or the relevant source is unavailable, omit `--rationale` rather than inventing one.
|
|
87
89
|
|
|
@@ -386,7 +386,7 @@ async function performTokenRefresh(options = {}) {
|
|
|
386
386
|
const record = typeof data === "object" && data !== null && !Array.isArray(data) ? data : void 0;
|
|
387
387
|
const accessToken = typeof record?.access_token === "string" ? record.access_token.trim() : "";
|
|
388
388
|
const replacementRefreshToken = typeof record?.refresh_token === "string" ? record.refresh_token.trim() : "";
|
|
389
|
-
if (!(accessToken && replacementRefreshToken)
|
|
389
|
+
if (!(accessToken && replacementRefreshToken)) {
|
|
390
390
|
if (readTrimmed(REFRESH_TOKEN_PATH) === currentGeneration) {
|
|
391
391
|
writeTerminalFingerprint(currentGeneration);
|
|
392
392
|
}
|
package/dist/daemon/server.js
CHANGED
|
@@ -356,7 +356,7 @@ async function performTokenRefresh(options = {}) {
|
|
|
356
356
|
const record = typeof data === "object" && data !== null && !Array.isArray(data) ? data : void 0;
|
|
357
357
|
const accessToken = typeof record?.access_token === "string" ? record.access_token.trim() : "";
|
|
358
358
|
const replacementRefreshToken = typeof record?.refresh_token === "string" ? record.refresh_token.trim() : "";
|
|
359
|
-
if (!(accessToken && replacementRefreshToken)
|
|
359
|
+
if (!(accessToken && replacementRefreshToken)) {
|
|
360
360
|
if (readTrimmed(REFRESH_TOKEN_PATH) === currentGeneration) {
|
|
361
361
|
writeTerminalFingerprint(currentGeneration);
|
|
362
362
|
}
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
appendMove,
|
|
7
7
|
resolveOrg
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-5K725K35.js";
|
|
9
|
+
import "../chunk-TPROV45L.js";
|
|
10
10
|
|
|
11
11
|
// src/hooks/post-commit.ts
|
|
12
12
|
import { execSync, spawn } from "child_process";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
appendMove,
|
|
15
15
|
resolveOrg
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-5K725K35.js";
|
|
17
17
|
import {
|
|
18
18
|
getOrCreateWorkspaceId
|
|
19
19
|
} from "../chunk-IMAIBPUC.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "../chunk-F7O7V6ZM.js";
|
|
24
24
|
import {
|
|
25
25
|
getClient
|
|
26
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-TPROV45L.js";
|
|
27
27
|
import {
|
|
28
28
|
normalizeEnvelope,
|
|
29
29
|
parseAgent
|
package/dist/hooks/pre-commit.js
CHANGED
package/dist/hooks/prim-hook.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
appendMove,
|
|
11
11
|
resolveOrg
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-5K725K35.js";
|
|
13
13
|
import {
|
|
14
14
|
buildHookOutput,
|
|
15
15
|
handoffHookOutput
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
acknowledgeDecisionFeedback,
|
|
20
20
|
leaseDecisionFeedback,
|
|
21
21
|
renderFeedback
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-CK75QBCB.js";
|
|
23
23
|
import {
|
|
24
24
|
getOrCreateWorkspaceId
|
|
25
25
|
} from "../chunk-IMAIBPUC.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
isRepoActiveForCapture,
|
|
28
28
|
warmBinCache
|
|
29
29
|
} from "../chunk-F7O7V6ZM.js";
|
|
30
|
-
import "../chunk-
|
|
30
|
+
import "../chunk-TPROV45L.js";
|
|
31
31
|
import {
|
|
32
32
|
normalizeEnvelope,
|
|
33
33
|
parseAgent
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
acknowledgeDecisionFeedback,
|
|
9
9
|
leaseDecisionFeedback,
|
|
10
10
|
renderFeedback
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-CK75QBCB.js";
|
|
12
12
|
import {
|
|
13
13
|
getOrCreateWorkspaceId
|
|
14
14
|
} from "../chunk-IMAIBPUC.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "../chunk-F7O7V6ZM.js";
|
|
20
20
|
import {
|
|
21
21
|
getSiteUrl
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-TPROV45L.js";
|
|
23
23
|
import {
|
|
24
24
|
daemonRequest
|
|
25
25
|
} from "../chunk-UTKQTZHL.js";
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
checkAffectedDecisions,
|
|
13
13
|
daemonOrDirectGet,
|
|
14
14
|
formatDecisionsWarning
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WRPKAPVE.js";
|
|
16
16
|
import {
|
|
17
17
|
JOURNAL_DIR,
|
|
18
18
|
SESSIONS_DIR,
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
listFlushing,
|
|
22
22
|
pendingJournalStats,
|
|
23
23
|
readMovesFromPath
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-5K725K35.js";
|
|
25
25
|
import {
|
|
26
26
|
fetchFeedbackCapability
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-CK75QBCB.js";
|
|
28
28
|
import {
|
|
29
29
|
inspectWorkspaceId
|
|
30
30
|
} from "./chunk-IMAIBPUC.js";
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
resolveAuthCredential,
|
|
53
53
|
setStoredToken,
|
|
54
54
|
withFileLock
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-TPROV45L.js";
|
|
56
56
|
import {
|
|
57
57
|
daemonIsLive,
|
|
58
58
|
daemonRequest
|
package/package.json
CHANGED