snipara-companion 3.2.29 → 3.2.31

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,29 @@
2
2
 
3
3
  Release notes for `snipara-companion`, newest first.
4
4
 
5
+ ## New In 3.2.31
6
+
7
+ - Sends phase commits, final commits, and Team Sync handoffs to project-scoped
8
+ Why Capture with the existing goal, summary, files, verification commands,
9
+ session reference, and commit SHA.
10
+ - Preserves reviewed-memory governance with an automatic read-only preview
11
+ followed by confirmation only when durable rationale candidates exist; filed
12
+ candidates remain `PENDING` in the review queue.
13
+ - Keeps capture best-effort and observable in JSON receipts and the activity
14
+ timeline, so a Why Capture outage never rolls back a completed workflow or
15
+ handoff and never introduces a documentation prompt.
16
+
17
+ ## New In 3.2.30
18
+
19
+ - Persists an explicit `--ack-review-only` as a 15-minute, one-use
20
+ acknowledgement bound to the exact guard profile, action, and finding
21
+ fingerprint, so the immediately following Git hook can consume it safely.
22
+ - Invalidates that acknowledgement when findings change and never applies it
23
+ to required acknowledgements, active conflicts, or hard blocks.
24
+ - Resolves collaboration state from `SNIPARA_WORKSPACE_DIR` or the Git
25
+ top-level directory, preventing filtered package commands from writing a
26
+ nested `packages/cli/.snipara/` session.
27
+
5
28
  ## New In 3.2.29
6
29
 
7
30
  - Extends `workflow producer-report` with attributed gated-execution samples
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;
@@ -2831,6 +2853,7 @@ declare function buildCodingIntelligenceLedger(options?: CodingLedgerBuildOption
2831
2853
  declare function codingLedgerExportCommand(options: CodingLedgerExportCommandOptions): Promise<void>;
2832
2854
 
2833
2855
  declare const COLLABORATION_STATE_RELATIVE_PATH: string;
2856
+ type CollaborationGuardProfile = "edit" | "pre-commit" | "pre-push" | "pre-deploy" | "migration" | "schema" | "release-package";
2834
2857
  type CollaborationGuardActionKind = "safe_to_ack" | "needs_handoff" | "needs_test" | "needs_package_review" | "blocking_conflict" | "guard_unavailable";
2835
2858
  interface CollaborationGuardActionCard {
2836
2859
  kind: CollaborationGuardActionKind;
@@ -2910,6 +2933,13 @@ interface CollaborationLocalLeaseRecord {
2910
2933
  expiresAt?: string | null;
2911
2934
  workSessionId?: string;
2912
2935
  }
2936
+ interface CollaborationReviewOnlyAcknowledgement {
2937
+ profile: CollaborationGuardProfile;
2938
+ action: string;
2939
+ findingFingerprint: string;
2940
+ acknowledgedAt: string;
2941
+ expiresAt: string;
2942
+ }
2913
2943
  interface CollaborationLocalState {
2914
2944
  schemaVersion: "snipara.collaboration.v1";
2915
2945
  updatedAt: string;
@@ -2926,6 +2956,7 @@ interface CollaborationLocalState {
2926
2956
  files: string[];
2927
2957
  resources: CollaborationResource[];
2928
2958
  leases: CollaborationLocalLeaseRecord[];
2959
+ reviewOnlyAcknowledgements: CollaborationReviewOnlyAcknowledgement[];
2929
2960
  lastGuard?: {
2930
2961
  decision: CollaborationGuardDecision;
2931
2962
  severity: string;