snipara-companion 3.0.12 → 3.0.13

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 CHANGED
@@ -77,6 +77,9 @@ redacted Coding Intelligence Ledger, not automatic durable memory, worker
77
77
  execution, calibrated confidence, or server-side attestation. Use
78
78
  `workflow producer-report` to inspect local adoption, reason-code counts, sample
79
79
  size, invalid artifacts, and calibration caveats before any future hard gate.
80
+ The report also recognizes exported PR Answer Pack decision-capture artifacts
81
+ with producer kind `pr_answer_pack_decision_capture`, so calibration can track
82
+ more than the workflow producer once those artifacts are present locally.
80
83
 
81
84
  ## Local First, Hosted When Useful
82
85
 
package/dist/index.d.ts CHANGED
@@ -2794,7 +2794,7 @@ declare const WORKFLOW_PLANS_RELATIVE_DIR: string;
2794
2794
  declare const PRODUCER_LOOP_ARTIFACT_VERSION: "snipara.producer_loop_artifact.v0";
2795
2795
  declare const PRODUCER_LOOP_REPORT_VERSION: "snipara.producer_loop_report.v0";
2796
2796
  declare const PRODUCER_LOOP_RELATIVE_DIR: string;
2797
- type ProducerLoopProducerKind = "workflow_phase_commit" | "workflow_final_commit";
2797
+ type ProducerLoopProducerKind = "workflow_phase_commit" | "workflow_final_commit" | "pr_answer_pack_decision_capture";
2798
2798
  interface ProducerLoopArtifactWriteResult {
2799
2799
  status: "written" | "error";
2800
2800
  schemaVersion: typeof PRODUCER_LOOP_ARTIFACT_VERSION;
package/dist/index.js CHANGED
@@ -14603,7 +14603,7 @@ function countStringOccurrences(values) {
14603
14603
  }, {});
14604
14604
  }
14605
14605
  function isProducerLoopProducerKind(value) {
14606
- return value === "workflow_phase_commit" || value === "workflow_final_commit";
14606
+ return value === "workflow_phase_commit" || value === "workflow_final_commit" || value === "pr_answer_pack_decision_capture";
14607
14607
  }
14608
14608
  function isTaskCommitOutcome(value) {
14609
14609
  return ["completed", "partial", "blocked", "abandoned"].includes(value ?? "");
@@ -14711,7 +14711,7 @@ function buildProducerLoopReport(options = {}) {
14711
14711
  const latestArtifact = artifacts[artifacts.length - 1];
14712
14712
  const calibrationStatus = producerLoopCalibrationStatus(artifacts.length, minReviewSampleSize);
14713
14713
  const recommendedActions = [
14714
- artifacts.length === 0 ? "Run workflow phase-commit or final-commit with a current snipara-companion build to create Producer Loop samples." : void 0,
14714
+ artifacts.length === 0 ? "Run a current Producer Loop producer, such as workflow phase-commit/final-commit or PR Answer Pack decision capture, to create samples." : void 0,
14715
14715
  artifacts.length > 0 && artifacts.length < minReviewSampleSize ? `Collect and review at least ${minReviewSampleSize} local workflow samples before considering any hard gate.` : void 0,
14716
14716
  invalidArtifacts.length > 0 ? "Inspect invalid Producer Loop artifacts before trusting adoption counts." : void 0,
14717
14717
  "Review false positives, missing outcomes, and reason-code drift before any future enforcement."
@@ -14741,7 +14741,7 @@ function buildProducerLoopReport(options = {}) {
14741
14741
  minReviewSampleSize,
14742
14742
  hardGateReady: false,
14743
14743
  notes: [
14744
- "Producer Loop V0 reports local workflow samples only.",
14744
+ "Producer Loop V0 reports local or exported producer samples only.",
14745
14745
  "Samples are unreviewed unless an operator separately audits them.",
14746
14746
  "hardGateReady remains false in V0 even when enough samples exist."
14747
14747
  ]
@@ -14750,7 +14750,7 @@ function buildProducerLoopReport(options = {}) {
14750
14750
  caveats: [
14751
14751
  "Local report only; this is not server-side compliance attestation.",
14752
14752
  "Reason-code counts describe observed artifacts, not calibrated probabilities.",
14753
- "Producer Loop V0 does not prove command execution beyond the workflow evidence embedded in each artifact."
14753
+ "Producer Loop V0 does not prove command execution beyond the evidence embedded in each artifact."
14754
14754
  ]
14755
14755
  };
14756
14756
  }
@@ -21702,6 +21702,9 @@ function renderProjectRealityCheckMarkdown(result) {
21702
21702
  return lines.join("\n");
21703
21703
  }
21704
21704
 
21705
+ // ../project-intelligence-contracts/src/producer-loop.ts
21706
+ var import_node_crypto4 = require("crypto");
21707
+
21705
21708
  // src/commands/execution-receipts.ts
21706
21709
  var ENGINEERING_LEAD_PROOF_VERIFICATION_MAX_AGE_MS = 14 * 24 * 60 * 60 * 1e3;
21707
21710
  function proofVerificationHasSourceEvidence(verification) {
@@ -23161,7 +23164,7 @@ async function leadPlanCommand(options) {
23161
23164
  // src/commands/outcome-capture.ts
23162
23165
  var fs23 = __toESM(require("fs"));
23163
23166
  var path22 = __toESM(require("path"));
23164
- var import_node_crypto4 = require("crypto");
23167
+ var import_node_crypto5 = require("crypto");
23165
23168
  var WHY_OUTCOME_CAPTURE_VERSION = "snipara.why_outcome_capture.v1";
23166
23169
  var DEFAULT_MAX_CANDIDATES = 20;
23167
23170
  var MAX_EVENTS = 50;
@@ -23491,7 +23494,7 @@ function readEventsFromFile(filePath) {
23491
23494
  return [];
23492
23495
  }
23493
23496
  function stableHash2(parts) {
23494
- return (0, import_node_crypto4.createHash)("sha256").update(parts.join("\0")).digest("hex");
23497
+ return (0, import_node_crypto5.createHash)("sha256").update(parts.join("\0")).digest("hex");
23495
23498
  }
23496
23499
  function uniqueStrings10(values) {
23497
23500
  return Array.from(new Set(values.filter(Boolean)));
@@ -26548,7 +26551,7 @@ async function projectIntelligenceRunCommand(options) {
26548
26551
 
26549
26552
  // src/commands/collaboration.ts
26550
26553
  var import_node_child_process10 = require("child_process");
26551
- var import_node_crypto5 = require("crypto");
26554
+ var import_node_crypto6 = require("crypto");
26552
26555
  var fs26 = __toESM(require("fs"));
26553
26556
  var os6 = __toESM(require("os"));
26554
26557
  var path26 = __toESM(require("path"));
@@ -28053,7 +28056,7 @@ function printGuardActionCards(cards) {
28053
28056
  }
28054
28057
  }
28055
28058
  function buildLocalSessionId(context, task, files) {
28056
- const hash = (0, import_node_crypto5.createHash)("sha1").update([context.actor.actorId, context.branch ?? "", task ?? "", files.join(",")].join("\n")).digest("hex").slice(0, 12);
28059
+ const hash = (0, import_node_crypto6.createHash)("sha1").update([context.actor.actorId, context.branch ?? "", task ?? "", files.join(",")].join("\n")).digest("hex").slice(0, 12);
28057
28060
  return `local_${hash}`;
28058
28061
  }
28059
28062
  function normalizeFiles2(files) {
@@ -214,9 +214,10 @@ snipara-companion workflow resume --include-session-context
214
214
  of upstream but not pushed. It does not push, and dirty working-tree files are
215
215
  reported separately from the committed diff.
216
216
  - `workflow producer-report` scans local Producer Loop artifacts emitted by
217
- workflow phase/final commits and reports adoption, producer kinds, workflow
218
- ids, reason-code counts, invalid artifacts, sample size, and calibration
219
- caveats with `hardGateReady=false`.
217
+ workflow phase/final commits or exported PR Answer Pack decision-capture
218
+ producers, then reports adoption, producer kinds, workflow ids, reason-code
219
+ counts, invalid artifacts, sample size, and calibration caveats with
220
+ `hardGateReady=false`.
220
221
  - `workflow run --adaptive-routing-dry-run` prints an Adaptive Work Routing
221
222
  card. Add `--route-local-workers` when a strong planner should keep deep
222
223
  reasoning while a local worker handles scoped execution.
@@ -999,10 +1000,12 @@ each section, and keeps caveats explicit: the artifact is structured review
999
1000
  data, not approved memory, causal proof, or a full evidence dump.
1000
1001
 
1001
1002
  Workflow `phase-commit` and `final-commit` use the same ledger model to produce
1002
- local Producer Loop artifacts automatically during real agent work. Use
1003
- `workflow producer-report` to inspect whether those samples exist, how many are
1004
- valid, which reason codes appear, and whether the sample set is still too small
1005
- for future enforcement.
1003
+ local Producer Loop artifacts automatically during real agent work. PR Answer
1004
+ Pack decision capture can use the same artifact schema with producer kind
1005
+ `pr_answer_pack_decision_capture`. Use `workflow producer-report` to inspect
1006
+ whether those samples exist locally, how many are valid, which producer kinds and
1007
+ reason codes appear, and whether the sample set is still too small for future
1008
+ enforcement.
1006
1009
 
1007
1010
  Use top-level `run` when the agent should make a production-oriented go/no-go
1008
1011
  judgment in one pass:
@@ -1068,7 +1071,7 @@ Semantics:
1068
1071
  - `snipara-companion workflow phase-start` = marks the current phase and prints the required Snipara context gate plus code-impact / symbol-card gates; runtime-marked phases also get a stable Snipara Sandbox session binding
1069
1072
  - `snipara-companion workflow runtime-checkpoint` = captures a resume-ready Snipara Sandbox checkpoint for one phase using local workflow state plus a hosted automation event when configured
1070
1073
  - `snipara-companion workflow phase-commit` = calls hosted `snipara_end_of_task_commit` for that phase, updates local state, and advances the next phase; if the hosted commit times out or hits a transient network failure, local workflow state still advances with an explicit local fallback record
1071
- - `snipara-companion workflow phase-commit` and `workflow final-commit` also emit local Producer Loop V0 artifacts under `.snipara/producer-loop/`, backed by the redacted Coding Intelligence Ledger. These artifacts are local review evidence only: they do not launch workers, approve durable memory, claim calibrated confidence, or provide server-side attestation.
1074
+ - `snipara-companion workflow phase-commit` and `workflow final-commit` also emit local Producer Loop V0 artifacts under `.snipara/producer-loop/`, backed by the redacted Coding Intelligence Ledger. PR Answer Pack decision capture uses the same schema with producer kind `pr_answer_pack_decision_capture` when the artifact is exported or embedded by the hosted PR pack producer. These artifacts are review evidence only: they do not launch workers, approve durable memory, claim calibrated confidence, or provide server-side attestation.
1072
1075
  - `snipara-companion workflow producer-report` = scans local Producer Loop artifacts and reports adoption, producer kinds, workflow ids, latest artifact, reason-code counts, invalid artifacts, sample size, and calibration caveats with `hardGateReady=false`
1073
1076
  - `snipara-companion workflow phase-commit` and `workflow final-commit` complete matching local Team Sync active work when the workflow is completed. Matching is conservative: exact workflow goal/summary text wins, and file overlap plus meaningful token overlap handles slug-like workflow goals without closing unrelated active work.
1074
1077
  - `snipara-companion workflow impact-gate` = local pre-push gate for completed workflow phases in `upstream..HEAD`; it keeps dirty files out of the committed impact analysis and reports phase/file coverage before hosted reindex catches up
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snipara-companion",
3
- "version": "3.0.12",
3
+ "version": "3.0.13",
4
4
  "description": "Local-first CLI that asks your repo what breaks before an AI coding agent edits it.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {