@primitive.ai/prim 0.1.0-alpha.38 → 0.1.0-alpha.41
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 +1 -1
- package/dist/index.js +23 -2
- package/package.json +1 -1
package/SKILL.md
CHANGED
|
@@ -46,7 +46,7 @@ When enabled, the gate fail-opens on its *own* infrastructure errors (no daemon,
|
|
|
46
46
|
## Read the graph before large or load-bearing edits
|
|
47
47
|
|
|
48
48
|
- `npx --yes @primitive.ai/prim decisions check --files "src/a.ts,src/b.ts"` -- which active decisions reference the files you're about to touch (comma-separated paths, one `--files` value). Run it before a big change.
|
|
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).
|
|
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
52
|
## Reconcile and the verdict footer
|
package/dist/index.js
CHANGED
|
@@ -1576,6 +1576,12 @@ async function fetchRecent(args, deps = defaultDeps2) {
|
|
|
1576
1576
|
if (res.authorHasDecisions !== void 0) {
|
|
1577
1577
|
result.authorHasDecisions = res.authorHasDecisions;
|
|
1578
1578
|
}
|
|
1579
|
+
if (res.windowTotal !== void 0) {
|
|
1580
|
+
result.windowTotal = res.windowTotal;
|
|
1581
|
+
}
|
|
1582
|
+
if (res.windowTotalCapped !== void 0) {
|
|
1583
|
+
result.windowTotalCapped = res.windowTotalCapped;
|
|
1584
|
+
}
|
|
1579
1585
|
if (res.unavailable !== void 0) {
|
|
1580
1586
|
result.unavailable = res.unavailable;
|
|
1581
1587
|
}
|
|
@@ -1628,13 +1634,26 @@ function formatRecentRow(row) {
|
|
|
1628
1634
|
const areaCol = row.area ? areaPlain.replace("\u2022", color("\u2022", colorForArea(row.area))) : areaPlain;
|
|
1629
1635
|
return ` ${clock} ${author}${areaCol}${row.intent}`;
|
|
1630
1636
|
}
|
|
1637
|
+
var RECENT_LIMIT_CEILING = 100;
|
|
1638
|
+
function remainingHint(result) {
|
|
1639
|
+
const { windowTotal } = result;
|
|
1640
|
+
if (windowTotal === void 0 || windowTotal <= result.decisions.length) {
|
|
1641
|
+
return;
|
|
1642
|
+
}
|
|
1643
|
+
const remaining = windowTotal - result.decisions.length;
|
|
1644
|
+
const remainingText = result.windowTotalCapped === true ? `${remaining}+` : String(remaining);
|
|
1645
|
+
if (windowTotal <= RECENT_LIMIT_CEILING) {
|
|
1646
|
+
return `${remainingText} more not shown \u2014 re-run with --limit ${windowTotal} to see all`;
|
|
1647
|
+
}
|
|
1648
|
+
return `${remainingText} more not shown \u2014 re-run with --limit ${RECENT_LIMIT_CEILING} for the newest ${RECENT_LIMIT_CEILING} (the full set exceeds the feed cap)`;
|
|
1649
|
+
}
|
|
1631
1650
|
function formatRecentHuman(result) {
|
|
1632
1651
|
if (result.unavailable !== void 0) {
|
|
1633
1652
|
return `[prim] recent \xB7 feed not verified \u2014 ${result.unavailable}`;
|
|
1634
1653
|
}
|
|
1635
1654
|
if (result.author !== void 0 && result.decisions.length === 0) {
|
|
1636
1655
|
if (result.authorHasDecisions === true) {
|
|
1637
|
-
return `[prim] recent \xB7 ${result.author.name} \xB7 0 decisions in this window (older decisions exist \u2014 widen --since
|
|
1656
|
+
return `[prim] recent \xB7 ${result.author.name} \xB7 0 decisions in this window (older decisions exist \u2014 widen --since)`;
|
|
1638
1657
|
}
|
|
1639
1658
|
if (result.authorHasDecisions === false) {
|
|
1640
1659
|
return `[prim] recent \xB7 ${result.author.name} \xB7 no feed-visible decisions yet (if unexpected, check prim setup/doctor on their machine and the repo they work in)`;
|
|
@@ -1645,7 +1664,9 @@ function formatRecentHuman(result) {
|
|
|
1645
1664
|
if (result.decisions.length === 0) {
|
|
1646
1665
|
return "[prim] recent \xB7 0 decisions";
|
|
1647
1666
|
}
|
|
1648
|
-
const
|
|
1667
|
+
const header = `[prim] ${label} \xB7 ${String(result.decisions.length)} decision(s)`;
|
|
1668
|
+
const hint = remainingHint(result);
|
|
1669
|
+
const lines = [hint === void 0 ? header : `${header} \xB7 ${hint}`];
|
|
1649
1670
|
for (const row of result.decisions) {
|
|
1650
1671
|
lines.push(formatRecentRow(row));
|
|
1651
1672
|
}
|
package/package.json
CHANGED