snipara-companion 3.2.1 → 3.2.2

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
@@ -46,6 +46,7 @@ These commands are useful without hosted Snipara:
46
46
  | `reality-check` | Intent Ledger, Unknown Registry, and verification checks |
47
47
  | `code callers` / `imports` / `neighbors` / `shortest-path` | Structural repo questions from local files |
48
48
  | `workflow start` / `phase-start` / `phase-commit` / `resume` | Agent continuity that survives compaction |
49
+ | `workflow timeline` / `workflow session` | Append-only local activity log and Session Snapshot V0 |
49
50
  | `workflow decisions` / `workflow decide` | Local human decision requests and response receipts |
50
51
  | `workflow producer-triage` | Ask for human review of unreviewed Producer Loop samples |
51
52
  | `workflow producer-report` | Local Producer Loop adoption and calibration report |
@@ -69,6 +70,8 @@ npx -y snipara-companion workflow phase-commit audit --summary "mapped auth impa
69
70
  npx -y snipara-companion workflow producer-triage
70
71
  npx -y snipara-companion workflow decisions
71
72
  npx -y snipara-companion workflow decide decision-abc123 --choose accept_all --reviewer alice
73
+ npx -y snipara-companion workflow timeline
74
+ npx -y snipara-companion workflow session --json
72
75
  npx -y snipara-companion workflow producer-report
73
76
  npx -y snipara-companion workflow producer-review --latest --outcome useful --reviewer alice
74
77
  npx -y snipara-companion handoff --summary "auth impact mapped" --next "run auth tests"
@@ -78,7 +81,13 @@ npx -y snipara-companion handoff --summary "auth impact mapped" --next "run auth
78
81
  resume with the current phase, recent handoffs, timeline, context packs, and
79
82
  verification hints.
80
83
 
81
- Workflow `phase-commit` and `final-commit` also emit Producer Loop V0 artifacts
84
+ `workflow timeline` reads the append-only activity log at
85
+ `.snipara/activity/timeline.jsonl`. `workflow session` derives
86
+ `.snipara/activity/session.json` for fast local resume and Orchestrator dogfood;
87
+ Session Snapshot V0 is observational and keeps `hardRoutingAllowed=false` until
88
+ explicit routing policy and receipts exist.
89
+
90
+ Workflow `phase-commit` and `final-commit` also emit Producer Loop artifacts
82
91
  under `.snipara/producer-loop/`. These are local review evidence backed by the
83
92
  redacted Coding Intelligence Ledger, not automatic durable memory, worker
84
93
  execution, calibrated confidence, or server-side attestation. Use
@@ -92,12 +101,15 @@ Use `workflow producer-review --artifact <path|file|artifactId>` or
92
101
  `workflow producer-review --latest` after auditing embedded evidence to move a
93
102
  sample from `sample_unreviewed` to `sample_reviewed` or `sample_rejected`.
94
103
  For conversational human review, run `workflow producer-triage` to create a
95
- batched Decision Request V0 artifact, `workflow decisions --json` to give the
104
+ batched Decision Request artifact, `workflow decisions --json` to give the
96
105
  LLM client the exact question/evidence/options to ask, and `workflow decide`
97
106
  only after the human answers. Batched requests include readable evidence items
98
107
  with artifact summaries, statuses, file hints, and metadata instead of only
99
108
  opaque refs. Decision requests never resolve by timeout or default, and only
100
109
  `workflow decide` applies the existing `producer-review` path.
110
+ When repeated resolved receipts share the same human choice and rationale,
111
+ `workflow decide` may emit a new review-only policy suggestion decision request;
112
+ it still uses manual apply instructions and never writes policy automatically.
101
113
  Other producers such as `outcome-capture preview --emit-decisions`,
102
114
  `memory reviews --emit-decisions`, `workflow decision-producer memory`, and
103
115
  `workflow decision-producer context-risk` emit requests with their existing apply
package/dist/index.d.ts CHANGED
@@ -1505,6 +1505,102 @@ declare function getStagedFiles(root: string): string[];
1505
1505
  */
1506
1506
  declare function runMemoryGuardCheck(options?: MemoryGuardCheckOptions): Promise<MemoryGuardCheckResult>;
1507
1507
 
1508
+ declare const ACTIVITY_TIMELINE_VERSION: "snipara.activity_timeline.v0";
1509
+ declare const SESSION_SNAPSHOT_VERSION: "snipara.session_snapshot.v0";
1510
+ type ActivityEventSource = "workflow" | "team-sync" | "decision" | "producer-loop" | "journal" | "orchestrator";
1511
+ interface ActivityTimelineEvent {
1512
+ schemaVersion: typeof ACTIVITY_TIMELINE_VERSION;
1513
+ eventId: string;
1514
+ timestamp: string;
1515
+ source: ActivityEventSource;
1516
+ kind: string;
1517
+ title: string;
1518
+ summary?: string;
1519
+ workflowId?: string;
1520
+ phaseId?: string;
1521
+ actor?: string;
1522
+ outcome?: string;
1523
+ files: string[];
1524
+ refs: string[];
1525
+ metadata: Record<string, unknown>;
1526
+ }
1527
+ interface SessionSnapshot {
1528
+ schemaVersion: typeof SESSION_SNAPSHOT_VERSION;
1529
+ generatedAt: string;
1530
+ source: {
1531
+ cwd: string;
1532
+ timelinePath: string;
1533
+ snapshotPath: string;
1534
+ };
1535
+ workflow: {
1536
+ id?: string;
1537
+ goal?: string;
1538
+ status?: string;
1539
+ currentPhaseId?: string;
1540
+ currentPhaseTitle?: string;
1541
+ } | null;
1542
+ activity: {
1543
+ totalEvents: number;
1544
+ latestEventAt?: string;
1545
+ latestEvents: ActivityTimelineEvent[];
1546
+ countsBySource: Record<string, number>;
1547
+ countsByKind: Record<string, number>;
1548
+ };
1549
+ decisions: {
1550
+ pendingCount: number;
1551
+ resolvedCount: number;
1552
+ recurringResolvedFingerprintCount: number;
1553
+ };
1554
+ producerLoop: {
1555
+ artifactCount: number;
1556
+ reviewedCount: number;
1557
+ rejectedCount: number;
1558
+ unreviewedCount: number;
1559
+ hardGateReady: false;
1560
+ };
1561
+ teamSync: {
1562
+ activeWorkCount: number;
1563
+ handoffCount: number;
1564
+ latestHandoffAt?: string;
1565
+ };
1566
+ routing: {
1567
+ hardRoutingAllowed: false;
1568
+ reason: string;
1569
+ };
1570
+ performance: {
1571
+ buildMs: number;
1572
+ };
1573
+ caveats: string[];
1574
+ }
1575
+ interface AppendActivityInput {
1576
+ source: ActivityEventSource;
1577
+ kind: string;
1578
+ title: string;
1579
+ summary?: string;
1580
+ workflowId?: string;
1581
+ phaseId?: string;
1582
+ actor?: string;
1583
+ outcome?: string;
1584
+ files?: string[];
1585
+ refs?: string[];
1586
+ metadata?: Record<string, unknown>;
1587
+ timestamp?: string;
1588
+ cwd?: string;
1589
+ }
1590
+ declare function appendActivityEvent(input: AppendActivityInput): ActivityTimelineEvent;
1591
+ declare function readActivityTimeline(options?: {
1592
+ cwd?: string;
1593
+ limit?: number;
1594
+ }): ActivityTimelineEvent[];
1595
+ declare function buildSessionSnapshot(options?: {
1596
+ cwd?: string;
1597
+ limit?: number;
1598
+ }): SessionSnapshot;
1599
+ declare function writeSessionSnapshot(options?: {
1600
+ cwd?: string;
1601
+ limit?: number;
1602
+ }): SessionSnapshot;
1603
+
1508
1604
  type LocalCodeOverlayMode = "working_tree" | "local_commit";
1509
1605
  type LocalCodeOverlayKind = "none" | "local_commit" | "working_tree" | "mixed";
1510
1606
  interface LocalCodeOverlayOptions {
@@ -3013,10 +3109,10 @@ interface AgenticWorkStatus {
3013
3109
  }
3014
3110
  interface AgenticTimelineEvent {
3015
3111
  time: string;
3016
- kind: "workflow-start" | "phase-start" | "phase-commit" | "final-commit" | "team-sync-start" | "team-sync-complete" | "team-sync-handoff";
3112
+ kind: string;
3017
3113
  title: string;
3018
3114
  detail?: string;
3019
- source: "workflow" | "team-sync";
3115
+ source: ActivityEventSource;
3020
3116
  files?: string[];
3021
3117
  }
3022
3118
  interface AgenticTimeline {
@@ -4116,4 +4212,4 @@ declare function buildOrchestratorHandoff(options: OrchestratorHandoffOptions):
4116
4212
  declare function buildAdaptiveWorkRoutingRecommendation(options: AdaptiveWorkRoutingOptions): AdaptiveWorkRoutingRecommendation;
4117
4213
  declare function writeOrchestratorHandoff(options: OrchestratorHandoffOptions): WrittenOrchestratorHandoff;
4118
4214
 
4119
- export { AUTOMATION_MANIFEST_RELATIVE_PATH, AutomationInstallConflictError, AutomationUnsupportedHookBundleError, CODING_INTELLIGENCE_LEDGER_VERSION, COLLABORATION_STATE_RELATIVE_PATH, ENGINEERING_LEAD_EXECUTION_RECEIPT_STAGES, ENGINEERING_LEAD_EXECUTION_RECEIPT_STATUSES, ENGINEERING_LEAD_POSTURES, ENGINEERING_LEAD_PROOF_VERIFICATION_SOURCES, ENGINEERING_LEAD_PROOF_VERIFICATION_STATUSES, ENGINEERING_LEAD_ROUTING_MODES, ENGINEERING_LEAD_STATUSES, ENGINEERING_LEAD_SUPERVISION_STATUSES, ENGINEERING_LEAD_WORKER_ROLES, ENGINEERING_LEAD_WORK_PACKAGE_STATUSES, ORCHESTRATOR_HANDOFF_RELATIVE_PATH, PRODUCER_LOOP_ARTIFACT_VERSION, PRODUCER_LOOP_RELATIVE_DIR, PRODUCER_LOOP_REPORT_VERSION, TEAM_SYNC_STATE_RELATIVE_PATH, WHY_OUTCOME_CAPTURE_VERSION, WORKFLOW_PLANS_RELATIVE_DIR, WORKFLOW_STATE_RELATIVE_PATH, addLocalWorker, agentReadinessAuditCommand, archiveInactiveTeamSyncWork, attachLocalContextPackReceipts, autoArchiveTeamSyncState, buildAdaptiveWorkRoutingRecommendation, buildAgentReadinessAuditReport, buildAgenticHandoffMarkdown, buildAgenticTimeline, buildAgenticWorkStatus, buildAutomationInstallPlan, buildCanonicalEvent, buildCodeHooksInstallPlan, buildCodePromotionResult, buildCodeStatusResult, buildCodeSyncResult, buildCodingIntelligenceLedger, buildCollaborationActor, buildCollaborationGuardActionCards, buildCollaborationHooksInstallPlan, buildCompanionEngineeringLeadPlanReport, buildContextPackStats, buildEvalCaseArtifact, buildGeneratedWorkflowPlanDocument, buildHostedCodeOverlayUploadPayload, buildHostedGuardPayload, buildJournalCheckpointEntry, buildLocalCallersResult, buildLocalCodeOverlay, buildLocalContextPackReceipt, buildLocalContextPackReceipts, buildLocalImpactResult, buildLocalImportsResult, buildLocalNeighborsResult, buildLocalProjectRealityCheck, buildLocalShortestPathResult, buildLocalSourceSnapshot, buildLocalSourceStatus, buildLocalSourceSyncResult, buildMemoryAudit, buildOnboardFolderManifest, buildOrchestratorHandoff, buildProducerLoopReport, buildProjectIntelligenceBrief, buildProjectIntelligenceRun, buildProjectJudgmentCard, buildSessionBootstrapQuality, buildSyncDocumentsDryRun, buildTeamSyncHandoffRecord, buildTeamSyncStartWorkRecord, buildTeamSyncSummary, buildToolCallPayload, buildToolResultPayload, buildVerificationPlan, buildWhyOutcomeCaptureReport, buildWorkflowImpactGate, buildWorkflowPhaseCommitSummary, buildWorkflowPlanScaffold, categoryFromGuardTag, classifyToolResult, cleanContextPacks, codingLedgerExportCommand, collaborationIdeStatusCommand, collectAgentReadinessLocalSignals, collectSyncDocuments, collectSyncDocumentsInput, compactHostedGuardResources, compareLocalSourceSnapshots, completeTeamSyncStateFromEvidence, completeTeamSyncWorkFromEvidence, contextPackCleanCommand, contextPackPackCommand, contextPackRetrieveCommand, contextPackStatsCommand, createClient, createEmptyCollaborationState, createEmptyTeamSyncState, createLocalQueryCache, deriveLocalCollaborationResourcesFromFiles, detectReleaseSurfacesFromFiles, detectRuntimeEnvironment, evalExportCommand, evalRunCommand, evaluateProjectPolicyGates, extractCommandFromToolInput, extractFilesFromToolInput, formatAgentReadinessAuditReport, formatCompanionEngineeringLeadPlanReport, formatOrchestratorRecommendationReason, formatPolicyGateDecision, formatProjectJudgmentCard, formatStuckGuardDecision, getAutomationManifestPath, getAutomationStatus, getCollaborationStatePath, getConfigPath, getContextPackStoragePaths, getLocalCodeOverlayCachePath, getLocalCodePromotionStatePath, getLocalSourceSnapshotPath, getOrchestratorRecommendation, getPlanStepDisplayTitle, getStagedFiles, getStuckGuardInjection, getTeamSyncStatePath, ingestReferences, installAutomationBundle, leadPlanCommand, listProjectsForApiKey, loadAutomationManifest, loadCollaborationState, loadConfig, loadTeamSyncState, memoryAuditCommand, memoryCleanCandidatesCommand, memoryCompactCommand, memoryHealthCommand, memoryLocalCommand, memoryReviewsCommand, normalizeCollaborationFiles, normalizeGuardTag, normalizeWorkflowPlanInput, outcomeCapturePreviewCommand, packContext, parseCollaborationResources, projectIntelligenceBriefCommand, projectIntelligenceRunCommand, readLocalCodeOverlayCache, readLocalCodePromotionState, readLocalSourceSnapshot, readLocalWorkersConfig, realityCheckCommand, referencesIngestCommand, referencesScanCommand, resolveContextPackRecord, resolveFullWorkflowTokenBudget, resolveLocalWorkerRoutingDefaults, resolveQueryFromToolInput, retrieveContextPack, runMemoryGuardCheck, saveCollaborationState, saveConfig, saveTeamSyncState, scanReferences, shouldSuggestOrchestratorForWorkflow, shouldSuggestRuntimeForWorkflow, summarizeLocalCodeOverlay, teamSyncSweepCommand, validatePlanResult, verifyCommand, workersLocalAddCommand, workersLocalStatusCommand, writeLocalCodeOverlayCache, writeLocalCodePromotionState, writeLocalSourceSnapshot, writeOrchestratorHandoff, writeProducerLoopArtifact };
4215
+ export { AUTOMATION_MANIFEST_RELATIVE_PATH, AutomationInstallConflictError, AutomationUnsupportedHookBundleError, CODING_INTELLIGENCE_LEDGER_VERSION, COLLABORATION_STATE_RELATIVE_PATH, ENGINEERING_LEAD_EXECUTION_RECEIPT_STAGES, ENGINEERING_LEAD_EXECUTION_RECEIPT_STATUSES, ENGINEERING_LEAD_POSTURES, ENGINEERING_LEAD_PROOF_VERIFICATION_SOURCES, ENGINEERING_LEAD_PROOF_VERIFICATION_STATUSES, ENGINEERING_LEAD_ROUTING_MODES, ENGINEERING_LEAD_STATUSES, ENGINEERING_LEAD_SUPERVISION_STATUSES, ENGINEERING_LEAD_WORKER_ROLES, ENGINEERING_LEAD_WORK_PACKAGE_STATUSES, ORCHESTRATOR_HANDOFF_RELATIVE_PATH, PRODUCER_LOOP_ARTIFACT_VERSION, PRODUCER_LOOP_RELATIVE_DIR, PRODUCER_LOOP_REPORT_VERSION, TEAM_SYNC_STATE_RELATIVE_PATH, WHY_OUTCOME_CAPTURE_VERSION, WORKFLOW_PLANS_RELATIVE_DIR, WORKFLOW_STATE_RELATIVE_PATH, addLocalWorker, agentReadinessAuditCommand, appendActivityEvent, archiveInactiveTeamSyncWork, attachLocalContextPackReceipts, autoArchiveTeamSyncState, buildAdaptiveWorkRoutingRecommendation, buildAgentReadinessAuditReport, buildAgenticHandoffMarkdown, buildAgenticTimeline, buildAgenticWorkStatus, buildAutomationInstallPlan, buildCanonicalEvent, buildCodeHooksInstallPlan, buildCodePromotionResult, buildCodeStatusResult, buildCodeSyncResult, buildCodingIntelligenceLedger, buildCollaborationActor, buildCollaborationGuardActionCards, buildCollaborationHooksInstallPlan, buildCompanionEngineeringLeadPlanReport, buildContextPackStats, buildEvalCaseArtifact, buildGeneratedWorkflowPlanDocument, buildHostedCodeOverlayUploadPayload, buildHostedGuardPayload, buildJournalCheckpointEntry, buildLocalCallersResult, buildLocalCodeOverlay, buildLocalContextPackReceipt, buildLocalContextPackReceipts, buildLocalImpactResult, buildLocalImportsResult, buildLocalNeighborsResult, buildLocalProjectRealityCheck, buildLocalShortestPathResult, buildLocalSourceSnapshot, buildLocalSourceStatus, buildLocalSourceSyncResult, buildMemoryAudit, buildOnboardFolderManifest, buildOrchestratorHandoff, buildProducerLoopReport, buildProjectIntelligenceBrief, buildProjectIntelligenceRun, buildProjectJudgmentCard, buildSessionBootstrapQuality, buildSessionSnapshot, buildSyncDocumentsDryRun, buildTeamSyncHandoffRecord, buildTeamSyncStartWorkRecord, buildTeamSyncSummary, buildToolCallPayload, buildToolResultPayload, buildVerificationPlan, buildWhyOutcomeCaptureReport, buildWorkflowImpactGate, buildWorkflowPhaseCommitSummary, buildWorkflowPlanScaffold, categoryFromGuardTag, classifyToolResult, cleanContextPacks, codingLedgerExportCommand, collaborationIdeStatusCommand, collectAgentReadinessLocalSignals, collectSyncDocuments, collectSyncDocumentsInput, compactHostedGuardResources, compareLocalSourceSnapshots, completeTeamSyncStateFromEvidence, completeTeamSyncWorkFromEvidence, contextPackCleanCommand, contextPackPackCommand, contextPackRetrieveCommand, contextPackStatsCommand, createClient, createEmptyCollaborationState, createEmptyTeamSyncState, createLocalQueryCache, deriveLocalCollaborationResourcesFromFiles, detectReleaseSurfacesFromFiles, detectRuntimeEnvironment, evalExportCommand, evalRunCommand, evaluateProjectPolicyGates, extractCommandFromToolInput, extractFilesFromToolInput, formatAgentReadinessAuditReport, formatCompanionEngineeringLeadPlanReport, formatOrchestratorRecommendationReason, formatPolicyGateDecision, formatProjectJudgmentCard, formatStuckGuardDecision, getAutomationManifestPath, getAutomationStatus, getCollaborationStatePath, getConfigPath, getContextPackStoragePaths, getLocalCodeOverlayCachePath, getLocalCodePromotionStatePath, getLocalSourceSnapshotPath, getOrchestratorRecommendation, getPlanStepDisplayTitle, getStagedFiles, getStuckGuardInjection, getTeamSyncStatePath, ingestReferences, installAutomationBundle, leadPlanCommand, listProjectsForApiKey, loadAutomationManifest, loadCollaborationState, loadConfig, loadTeamSyncState, memoryAuditCommand, memoryCleanCandidatesCommand, memoryCompactCommand, memoryHealthCommand, memoryLocalCommand, memoryReviewsCommand, normalizeCollaborationFiles, normalizeGuardTag, normalizeWorkflowPlanInput, outcomeCapturePreviewCommand, packContext, parseCollaborationResources, projectIntelligenceBriefCommand, projectIntelligenceRunCommand, readActivityTimeline, readLocalCodeOverlayCache, readLocalCodePromotionState, readLocalSourceSnapshot, readLocalWorkersConfig, realityCheckCommand, referencesIngestCommand, referencesScanCommand, resolveContextPackRecord, resolveFullWorkflowTokenBudget, resolveLocalWorkerRoutingDefaults, resolveQueryFromToolInput, retrieveContextPack, runMemoryGuardCheck, saveCollaborationState, saveConfig, saveTeamSyncState, scanReferences, shouldSuggestOrchestratorForWorkflow, shouldSuggestRuntimeForWorkflow, summarizeLocalCodeOverlay, teamSyncSweepCommand, validatePlanResult, verifyCommand, workersLocalAddCommand, workersLocalStatusCommand, writeLocalCodeOverlayCache, writeLocalCodePromotionState, writeLocalSourceSnapshot, writeOrchestratorHandoff, writeProducerLoopArtifact, writeSessionSnapshot };