snipara-companion 3.2.30 → 3.2.32

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
@@ -2,6 +2,34 @@
2
2
 
3
3
  Release notes for `snipara-companion`, newest first.
4
4
 
5
+ ## New In 3.2.32
6
+
7
+ - Promotes a Hosted MCP `servedJudgmentId` into the first-class Project
8
+ Intelligence brief so `run` can persist Advisor Influence receipts without a
9
+ fragile nested lookup or manual flag when the hosted brief already supplies
10
+ the identity.
11
+ - Adds an explicit Advisor measurement funnel to JSON and text output:
12
+ identity linked/missing, targeted versus unscoped, acknowledged, applied,
13
+ verified, blocked, unmeasured, and receipt coverage.
14
+ - Stores a bounded measurement state with each first-party receipt so a runtime
15
+ acknowledgement is never presented as recommendation-scoped application.
16
+ - Emits one stable `project-intelligence.judgment-run-envelope.v1` per `run`
17
+ invocation. It reuses a bounded Snipara or Codex session id when available,
18
+ otherwise generates an opaque run id, and attaches the same envelope to every
19
+ first-party Advisor receipt.
20
+
21
+ ## New In 3.2.31
22
+
23
+ - Sends phase commits, final commits, and Team Sync handoffs to project-scoped
24
+ Why Capture with the existing goal, summary, files, verification commands,
25
+ session reference, and commit SHA.
26
+ - Preserves reviewed-memory governance with an automatic read-only preview
27
+ followed by confirmation only when durable rationale candidates exist; filed
28
+ candidates remain `PENDING` in the review queue.
29
+ - Keeps capture best-effort and observable in JSON receipts and the activity
30
+ timeline, so a Why Capture outage never rolls back a completed workflow or
31
+ handoff and never introduces a documentation prompt.
32
+
5
33
  ## New In 3.2.30
6
34
 
7
35
  - Persists an explicit `--ack-review-only` as a 15-minute, one-use
package/README.md CHANGED
@@ -359,3 +359,9 @@ Launch assets, demo scripts, and post drafts live in
359
359
  [docs/launch/LAUNCH_KIT.md](./docs/launch/LAUNCH_KIT.md).
360
360
 
361
361
  Release notes live in [CHANGELOG.md](./CHANGELOG.md).
362
+ When project auth is configured, `workflow phase-commit`, `final-commit`, and
363
+ `team-sync handoff` also run reviewed Why Capture. The Companion first sends a
364
+ read-only preview and confirms only when the server detects durable rationale.
365
+ Confirmed candidates enter the pending review queue; capture failures remain
366
+ visible but do not block the primary workflow command. No documentation prompt
367
+ is shown.
package/dist/index.d.ts CHANGED
@@ -441,6 +441,27 @@ interface SessionPersistResult {
441
441
  session_id: string;
442
442
  files_tracked: number;
443
443
  }
444
+ type WhyCaptureSourceKind = "phase_commit" | "final_commit" | "handoff";
445
+ interface WhyCaptureInput {
446
+ decision?: string;
447
+ why?: string;
448
+ rationale?: string;
449
+ sourceText?: string;
450
+ sourceKind: WhyCaptureSourceKind;
451
+ sourceSessionId?: string;
452
+ task?: string;
453
+ changedFiles?: string[];
454
+ commands?: string[];
455
+ commitSha?: string;
456
+ confirmed?: boolean;
457
+ previewOnly?: boolean;
458
+ }
459
+ interface WhyCaptureResult {
460
+ previewOnly: boolean;
461
+ confirmed: boolean;
462
+ candidateCount: number;
463
+ capturedCount?: number;
464
+ }
444
465
  interface JournalAppendResult {
445
466
  success?: boolean;
446
467
  date?: string;
@@ -1273,6 +1294,7 @@ declare class RLMClient {
1273
1294
  payload?: Record<string, unknown>;
1274
1295
  }): Promise<EmitEventResult>;
1275
1296
  recordAdvisorInfluenceReceipt(input: RecordAdvisorInfluenceReceiptInput): Promise<RecordAdvisorInfluenceReceiptResult>;
1297
+ captureWhy(input: WhyCaptureInput): Promise<WhyCaptureResult>;
1276
1298
  getAutomationEvents(args?: {
1277
1299
  sessionId?: string;
1278
1300
  limit?: number;
@@ -2064,6 +2086,7 @@ interface ProjectIntelligenceBriefOptions {
2064
2086
  interface ProjectIntelligenceBrief {
2065
2087
  version: "project-intelligence-brief-v1";
2066
2088
  generatedAt: string;
2089
+ servedJudgmentId?: string;
2067
2090
  branch?: string;
2068
2091
  task?: string;
2069
2092
  changedFiles: string[];
@@ -2594,10 +2617,27 @@ interface ProjectRunAdvisorReceiptWrite {
2594
2617
  agentDecision?: AdvisorInfluenceAgentDecision;
2595
2618
  changedBecauseOfRecommendation?: boolean;
2596
2619
  lifecycleState?: AdvisorInfluenceLifecycleState;
2620
+ measurementState?: ProjectRunAdvisorMeasurementState;
2621
+ targeted?: boolean;
2597
2622
  result?: RecordAdvisorInfluenceReceiptResult;
2598
2623
  reason?: ProjectRunAdvisorReceiptSkipReason;
2599
2624
  error?: string;
2600
2625
  }
2626
+ type ProjectRunAdvisorMeasurementState = "unmeasured" | "acknowledged_unscoped" | "acknowledged" | "applied" | "verified" | "blocked";
2627
+ interface ProjectRunAdvisorMeasurementCoverage {
2628
+ version: "project-intelligence.advisor-measurement-coverage.v1";
2629
+ identityStatus: "linked" | "missing";
2630
+ recommendationCount: number;
2631
+ recordedCount: number;
2632
+ targetedCount: number;
2633
+ unscopedCount: number;
2634
+ acknowledgedCount: number;
2635
+ appliedCount: number;
2636
+ verifiedCount: number;
2637
+ blockedCount: number;
2638
+ unmeasuredCount: number;
2639
+ receiptCoverage: number | null;
2640
+ }
2601
2641
  type ProjectRunAdvisorReceiptSkipReason = "explicitly_skipped" | "no_advisor_recommendations" | "missing_served_judgment_id" | "no_plan_adaptation" | "write_limit_exceeded";
2602
2642
  interface ProjectRunAdvisorReceiptCapture {
2603
2643
  status: "skipped" | "recorded" | "partial" | "error";
@@ -2608,11 +2648,13 @@ interface ProjectRunAdvisorReceiptCapture {
2608
2648
  recordedCount: number;
2609
2649
  skippedCount: number;
2610
2650
  writes: ProjectRunAdvisorReceiptWrite[];
2651
+ measurement: ProjectRunAdvisorMeasurementCoverage;
2611
2652
  reason?: ProjectRunAdvisorReceiptSkipReason;
2612
2653
  }
2613
2654
  interface ProjectIntelligenceRunResult {
2614
2655
  version: "project-intelligence.production-run.v1";
2615
2656
  generatedAt: string;
2657
+ runEnvelope: ProjectIntelligenceRunEnvelope;
2616
2658
  release: boolean;
2617
2659
  brief: ProjectIntelligenceBrief;
2618
2660
  guard?: ProjectRunGuardResult;
@@ -2624,6 +2666,12 @@ interface ProjectIntelligenceRunResult {
2624
2666
  judgmentCard: ProjectIntelligenceJudgmentCard;
2625
2667
  suggestedCommands: string[];
2626
2668
  }
2669
+ interface ProjectIntelligenceRunEnvelope {
2670
+ version: "project-intelligence.judgment-run-envelope.v1";
2671
+ runId: string;
2672
+ identitySource: "snipara_session" | "codex_session" | "generated";
2673
+ startedAt: string;
2674
+ }
2627
2675
  interface ProjectRunPolicyDecisionRequests {
2628
2676
  version: "project-intelligence.policy-decision-requests.v1";
2629
2677
  emitted: boolean;