snipara-companion 3.7.2 → 3.7.3

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/CHANGELOG.md CHANGED
@@ -4,6 +4,15 @@ Release notes for `snipara-companion`, newest first.
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## New In 3.7.3
8
+
9
+ - Restores source-bound Controller return projection for exact runtime context:
10
+ re-reads the bound context map, checks its hash and version, and reconstructs
11
+ the complete bridge identity. Verifies the Controller task context while
12
+ accepting Python's null representation of an omitted optional target attempt.
13
+ Regression qualification covers the corrected 3.7.2 candidate and the 3.7.3
14
+ release artifact; public round-trip tests assert the selected CLI version.
15
+
7
16
  ## New In 3.7.2
8
17
 
9
18
  - Bundles the ESM-only runtime dependency graphs for the CommonJS Node 18
package/dist/index.js CHANGED
@@ -44556,6 +44556,16 @@ function projectControllerBridge(options) {
44556
44556
  throw new Error("Unsupported bridge artifact schema or authority");
44557
44557
  if (artifact2.taskContextVersion != null && artifact2.taskContextVersion !== "source-context-v1")
44558
44558
  throw new Error("Unsupported task context version");
44559
+ const hasRuntimeContext = "runtimeSourceContextVersion" in artifact2 || "sourceRuntimeContext" in artifact2;
44560
+ let runtimeRef;
44561
+ let runtimeSource;
44562
+ if (hasRuntimeContext) {
44563
+ if (artifact2.runtimeSourceContextVersion !== "runtime-source-context-v1")
44564
+ throw new Error("Unsupported runtime source context version");
44565
+ runtimeRef = object2(artifact2.sourceRuntimeContext);
44566
+ runtimeSource = source(cwd, runtimeRef.path);
44567
+ same(runtimeSource.hash, runtimeRef.sha256, "runtime context source hash");
44568
+ }
44559
44569
  const leadRef = object2(artifact2.sourceLeadPlan);
44560
44570
  const policyRef = object2(artifact2.sourcePolicy);
44561
44571
  const workflowRef = object2(artifact2.workflowPlan);
@@ -44563,6 +44573,7 @@ function projectControllerBridge(options) {
44563
44573
  {
44564
44574
  leadPlanFile: String(leadRef.path),
44565
44575
  policyFile: String(policyRef.path),
44576
+ ...runtimeRef ? { taskContextFile: String(runtimeRef.path) } : {},
44566
44577
  reviewerId: bridgeId(object2(artifact2.review).reviewedBy),
44567
44578
  outDir: path42.relative(
44568
44579
  cwd,
@@ -44582,6 +44593,10 @@ function projectControllerBridge(options) {
44582
44593
  same(workflow2.hash, workflowRef.sha256, "workflow source hash");
44583
44594
  const identity = {
44584
44595
  ...artifact2.taskContextVersion ? { taskContextVersion: artifact2.taskContextVersion } : {},
44596
+ ...runtimeRef ? {
44597
+ runtimeSourceContextVersion: artifact2.runtimeSourceContextVersion,
44598
+ sourceRuntimeContext: runtimeRef
44599
+ } : {},
44585
44600
  sourceLeadPlan: leadRef,
44586
44601
  sourcePolicy: policyRef,
44587
44602
  controllerId: artifact2.controllerId,
@@ -44645,6 +44660,8 @@ function projectControllerBridge(options) {
44645
44660
  { kind: "workflow_plan", id: String(workflowRef.path), sha256: workflow2.hash },
44646
44661
  { kind: "controller", id: controllerId, sha256: stateRead.hash }
44647
44662
  ];
44663
+ if (runtimeRef && runtimeSource)
44664
+ sourceHashes.push({ kind: "runtime_context", id: String(runtimeRef.path), sha256: runtimeSource.hash });
44648
44665
  const acceptedProposals = /* @__PURE__ */ new Map();
44649
44666
  const tasks = mappings.map((mapping) => {
44650
44667
  const taskId = bridgeId(mapping.taskId);
@@ -44665,6 +44682,13 @@ function projectControllerBridge(options) {
44665
44682
  "effectScope"
44666
44683
  ])
44667
44684
  same(actual[key], expected[key], `task ${key}`);
44685
+ if (expected.sourceContext != null || actual.sourceContext != null) {
44686
+ const expectedContext = object2(expected.sourceContext);
44687
+ const actualContext = { ...object2(actual.sourceContext) };
44688
+ if (expectedContext.targetAttempt === void 0 && actualContext.targetAttempt === null)
44689
+ delete actualContext.targetAttempt;
44690
+ same(actualContext, expectedContext, "task sourceContext");
44691
+ }
44668
44692
  same(expected.runtimeProfileId, mapping.runtimeProfileId, "runtime profile binding");
44669
44693
  const reportedStatus = String(actual.status);
44670
44694
  let proposalId = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snipara-companion",
3
- "version": "3.7.2",
3
+ "version": "3.7.3",
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": {