@primitive.ai/prim 0.1.0-alpha.81 → 0.1.0-alpha.83

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 CHANGED
@@ -16824,16 +16824,26 @@ var CascadeNotFoundError = class extends Error {
16824
16824
  this.name = "CascadeNotFoundError";
16825
16825
  }
16826
16826
  };
16827
+ function normalizeCascade(raw) {
16828
+ return {
16829
+ ...raw,
16830
+ upstream: {
16831
+ files: raw.upstream.files ?? [],
16832
+ contexts: raw.upstream.contexts ?? []
16833
+ }
16834
+ };
16835
+ }
16827
16836
  async function fetchCascade(idOrShortId, deps = defaultDeps) {
16828
16837
  const params = new URLSearchParams({ id: idOrShortId });
16829
16838
  const client = deps.getClient();
16830
16839
  try {
16831
- return await daemonOrDirectGet(
16840
+ const raw = await daemonOrDirectGet(
16832
16841
  "decisions_cascade",
16833
16842
  `/api/cli/decisions/cascade?${params.toString()}`,
16834
16843
  client,
16835
16844
  CASCADE_TIMEOUT_MS
16836
16845
  );
16846
+ return normalizeCascade(raw);
16837
16847
  } catch (err) {
16838
16848
  if (err instanceof Error && NOT_FOUND_RE.test(err.message)) {
16839
16849
  throw new CascadeNotFoundError(idOrShortId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primitive.ai/prim",
3
- "version": "0.1.0-alpha.81",
3
+ "version": "0.1.0-alpha.83",
4
4
  "description": "CLI for Primitive's decision graph — passive decision capture, conflict gate, and team presence",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -53,7 +53,7 @@
53
53
  "contracts:check": "node scripts/generate-cli-contract.mjs --check",
54
54
  "contracts:provenance": "node scripts/update-cli-contract.mjs --check",
55
55
  "contracts:update": "node scripts/update-cli-contract.mjs",
56
- "postbuild": "chmod +x ./dist/index.js ./dist/statusline-main.js ./dist/hooks/pre-commit.js ./dist/hooks/post-commit.js ./dist/hooks/post-rewrite.js ./dist/hooks/prim-hook.js ./dist/hooks/pre-tool-use.js ./dist/hooks/post-tool-use.js ./dist/hooks/session-start.js ./dist/hooks/session-end.js ./dist/daemon/server.js",
56
+ "postbuild": "chmod +x ./dist/index.js ./dist/statusline-main.js ./dist/hooks/pre-commit.js ./dist/hooks/post-commit.js ./dist/hooks/post-rewrite.js ./dist/hooks/prim-hook.js ./dist/hooks/pre-tool-use.js ./dist/hooks/post-tool-use.js ./dist/hooks/session-start.js ./dist/hooks/session-end.js ./dist/daemon/server.js && node scripts/check-hook-runtime.mjs",
57
57
  "dev": "tsup src/index.ts src/statusline-main.ts src/hooks/pre-commit.ts src/hooks/post-commit.ts src/hooks/post-rewrite.ts src/hooks/prim-hook.ts src/hooks/pre-tool-use.ts src/hooks/post-tool-use.ts src/hooks/session-start.ts src/hooks/session-end.ts src/daemon/server.ts --format esm --watch --clean --splitting false",
58
58
  "clean": "rm -rf dist coverage",
59
59
  "lint": "biome check src/ scripts/",