snipara-companion 3.0.4 → 3.0.6

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
@@ -47,6 +47,7 @@ These commands are useful without hosted Snipara:
47
47
  | `workflow start` / `phase-start` / `phase-commit` / `resume` | Agent continuity that survives compaction |
48
48
  | `context-pack` | Reversible local packs for long logs, diffs, and tool output |
49
49
  | `judgment-card`, `verify`, `lead-plan`, `agent-readiness` | Local review artifacts and delegation contracts |
50
+ | `intelligence ledger-export` | Structured redacted ledger JSON for replay and review |
50
51
  | `stuck-guard`, `memory-guard`, `pre-tool`, `post-tool` | Fail-soft local guards and hook helpers |
51
52
 
52
53
  ## Agent Continuity
package/dist/index.d.ts CHANGED
@@ -2366,6 +2366,195 @@ interface ProjectIntelligenceRunResult {
2366
2366
  declare function buildProjectIntelligenceRun(options: ProjectRunCommandOptions): Promise<ProjectIntelligenceRunResult>;
2367
2367
  declare function projectIntelligenceRunCommand(options: ProjectRunCommandOptions): Promise<void>;
2368
2368
 
2369
+ declare const WHY_OUTCOME_CAPTURE_VERSION: "snipara.why_outcome_capture.v1";
2370
+ type WhyOutcomeCaptureEventKind = "commit" | "pull_request" | "phase_commit" | "handoff" | "final_commit" | "guard_decision" | "test_result" | "deploy_health" | "review_result" | "feedback";
2371
+ type WhyOutcomeCandidateKind = "decision" | "outcome";
2372
+ type WhyOutcomeCandidateOutcomeStatus = "positive" | "negative" | "blocked" | "neutral" | "unknown";
2373
+ interface WhyOutcomeCaptureEvent {
2374
+ kind?: WhyOutcomeCaptureEventKind | string;
2375
+ event?: WhyOutcomeCaptureEventKind | string;
2376
+ summary?: string;
2377
+ reason?: string | string[];
2378
+ outcome?: string;
2379
+ status?: string;
2380
+ feedback?: string;
2381
+ sourceRef?: string;
2382
+ actor?: string;
2383
+ files?: string[];
2384
+ evidence?: string[];
2385
+ commands?: string[];
2386
+ reviewResult?: string;
2387
+ observedAt?: string;
2388
+ metadata?: Record<string, unknown>;
2389
+ }
2390
+ interface WhyOutcomeCaptureCandidate {
2391
+ id: string;
2392
+ kind: WhyOutcomeCandidateKind;
2393
+ reviewStatus: "review_pending";
2394
+ authorityStatus: "candidate";
2395
+ content: string;
2396
+ confidence: number;
2397
+ source: {
2398
+ kind: WhyOutcomeCaptureEventKind;
2399
+ ref: string | null;
2400
+ actor: string | null;
2401
+ observedAt: string;
2402
+ };
2403
+ outcome?: {
2404
+ status: WhyOutcomeCandidateOutcomeStatus;
2405
+ label: string;
2406
+ };
2407
+ provenance: {
2408
+ files: string[];
2409
+ evidence: string[];
2410
+ commands: string[];
2411
+ reasonCodes: string[];
2412
+ dedupeKey: string;
2413
+ };
2414
+ redaction: {
2415
+ redacted: boolean;
2416
+ patterns: string[];
2417
+ };
2418
+ }
2419
+ interface WhyOutcomeCaptureReport {
2420
+ version: typeof WHY_OUTCOME_CAPTURE_VERSION;
2421
+ generatedAt: string;
2422
+ reviewStatus: "review_pending";
2423
+ eventCount: number;
2424
+ candidateCount: number;
2425
+ skippedDuplicateCount: number;
2426
+ candidates: WhyOutcomeCaptureCandidate[];
2427
+ caveats: string[];
2428
+ }
2429
+ interface WhyOutcomeCaptureOptions {
2430
+ events: WhyOutcomeCaptureEvent[];
2431
+ now?: Date;
2432
+ maxCandidates?: number;
2433
+ }
2434
+ interface OutcomeCapturePreviewCommandOptions {
2435
+ fromFile?: string;
2436
+ event?: string;
2437
+ summary?: string;
2438
+ outcome?: string;
2439
+ status?: string;
2440
+ sourceRef?: string;
2441
+ actor?: string;
2442
+ files?: string[];
2443
+ evidence?: string[];
2444
+ command?: string[];
2445
+ reason?: string[];
2446
+ feedback?: string;
2447
+ maxCandidates?: string;
2448
+ json?: boolean;
2449
+ }
2450
+ declare function buildWhyOutcomeCaptureReport(options: WhyOutcomeCaptureOptions): WhyOutcomeCaptureReport;
2451
+ declare function outcomeCapturePreviewCommand(options: OutcomeCapturePreviewCommandOptions): Promise<void>;
2452
+
2453
+ declare const CODING_INTELLIGENCE_LEDGER_VERSION: "snipara.coding_intelligence_ledger.v0";
2454
+ type CodingLedgerSectionName = "served_context" | "plans" | "diffs" | "tests" | "ci" | "reviews" | "outcomes" | "influence_receipts";
2455
+ type CodingLedgerConfidenceBand = "high" | "medium" | "low" | "unknown";
2456
+ interface CodingLedgerEvidenceItem {
2457
+ id: string;
2458
+ kind: CodingLedgerSectionName;
2459
+ title?: string;
2460
+ summary: string;
2461
+ sourceRef?: string;
2462
+ status?: string;
2463
+ confidence?: number;
2464
+ reasonCodes: string[];
2465
+ files: string[];
2466
+ commands: string[];
2467
+ observedAt?: string;
2468
+ }
2469
+ interface CodingLedgerPrompt {
2470
+ task?: string;
2471
+ prompt?: string;
2472
+ sourceRef?: string;
2473
+ }
2474
+ interface CodingLedgerRepoState {
2475
+ branch?: string;
2476
+ commit?: string;
2477
+ dirty?: boolean;
2478
+ stagedFileCount?: number;
2479
+ unstagedFileCount?: number;
2480
+ changedFiles: string[];
2481
+ recentFiles: string[];
2482
+ diffSummary?: string;
2483
+ }
2484
+ interface CodingLedgerConfidence {
2485
+ score?: number;
2486
+ band: CodingLedgerConfidenceBand;
2487
+ rationale?: string;
2488
+ }
2489
+ interface CodingLedgerCalibrationMetadata {
2490
+ sampleSize?: number;
2491
+ reliability?: number;
2492
+ status?: string;
2493
+ notes: string[];
2494
+ caveats: string[];
2495
+ }
2496
+ interface CodingLedgerRedactionSummary {
2497
+ redacted: boolean;
2498
+ redactedValueCount: number;
2499
+ patterns: string[];
2500
+ }
2501
+ interface CodingIntelligenceLedger {
2502
+ version: typeof CODING_INTELLIGENCE_LEDGER_VERSION;
2503
+ generatedAt: string;
2504
+ portability: {
2505
+ format: "json";
2506
+ schema: typeof CODING_INTELLIGENCE_LEDGER_VERSION;
2507
+ generatedBy: "snipara-companion";
2508
+ contentModel: "structured_redacted_ledger";
2509
+ };
2510
+ prompt: CodingLedgerPrompt;
2511
+ repoState: CodingLedgerRepoState;
2512
+ servedContext: CodingLedgerEvidenceItem[];
2513
+ plans: CodingLedgerEvidenceItem[];
2514
+ diffs: CodingLedgerEvidenceItem[];
2515
+ tests: CodingLedgerEvidenceItem[];
2516
+ ci: CodingLedgerEvidenceItem[];
2517
+ reviews: CodingLedgerEvidenceItem[];
2518
+ outcomes: CodingLedgerEvidenceItem[];
2519
+ influenceReceipts: CodingLedgerEvidenceItem[];
2520
+ reasonCodes: string[];
2521
+ confidence: CodingLedgerConfidence;
2522
+ calibrationMetadata: CodingLedgerCalibrationMetadata;
2523
+ redaction: CodingLedgerRedactionSummary;
2524
+ caveats: string[];
2525
+ }
2526
+ interface CodingLedgerBuildOptions {
2527
+ input?: unknown;
2528
+ fromFile?: string;
2529
+ dir?: string;
2530
+ now?: Date;
2531
+ task?: string;
2532
+ prompt?: string;
2533
+ sourceRef?: string;
2534
+ branch?: string;
2535
+ commit?: string;
2536
+ changedFiles?: string[];
2537
+ recentFiles?: string[];
2538
+ diffSummary?: string;
2539
+ servedContext?: string[];
2540
+ plan?: string[];
2541
+ diff?: string[];
2542
+ test?: string[];
2543
+ ci?: string[];
2544
+ review?: string[];
2545
+ outcome?: string[];
2546
+ influenceReceipt?: string[];
2547
+ reasonCode?: string[];
2548
+ confidence?: string;
2549
+ calibration?: string[];
2550
+ }
2551
+ interface CodingLedgerExportCommandOptions extends CodingLedgerBuildOptions {
2552
+ output?: string;
2553
+ json?: boolean;
2554
+ }
2555
+ declare function buildCodingIntelligenceLedger(options?: CodingLedgerBuildOptions): CodingIntelligenceLedger;
2556
+ declare function codingLedgerExportCommand(options: CodingLedgerExportCommandOptions): Promise<void>;
2557
+
2369
2558
  declare const TEAM_SYNC_STATE_RELATIVE_PATH: string;
2370
2559
  type TeamSyncAttention = "note" | "watch" | "review" | "proof";
2371
2560
  type TeamSyncWorkStatus = "active" | "completed" | "archived";
@@ -2497,7 +2686,9 @@ interface AgenticHandoffAdapterPack {
2497
2686
  target: {
2498
2687
  id: AgenticHandoffAdapterTarget;
2499
2688
  label: string;
2689
+ profile: string;
2500
2690
  instruction: string;
2691
+ runtimeControl: "handoff_only";
2501
2692
  };
2502
2693
  contextPack: {
2503
2694
  summary: string;
@@ -3744,4 +3935,4 @@ declare function buildOrchestratorHandoff(options: OrchestratorHandoffOptions):
3744
3935
  declare function buildAdaptiveWorkRoutingRecommendation(options: AdaptiveWorkRoutingOptions): AdaptiveWorkRoutingRecommendation;
3745
3936
  declare function writeOrchestratorHandoff(options: OrchestratorHandoffOptions): WrittenOrchestratorHandoff;
3746
3937
 
3747
- export { AUTOMATION_MANIFEST_RELATIVE_PATH, AutomationInstallConflictError, AutomationUnsupportedHookBundleError, 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, TEAM_SYNC_STATE_RELATIVE_PATH, WORKFLOW_PLANS_RELATIVE_DIR, WORKFLOW_STATE_RELATIVE_PATH, addLocalWorker, agentReadinessAuditCommand, archiveInactiveTeamSyncWork, attachLocalContextPackReceipts, autoArchiveTeamSyncState, buildAdaptiveWorkRoutingRecommendation, buildAgentReadinessAuditReport, buildAgenticHandoffMarkdown, buildAgenticTimeline, buildAgenticWorkStatus, buildAutomationInstallPlan, buildCanonicalEvent, buildCodeHooksInstallPlan, buildCodePromotionResult, buildCodeStatusResult, buildCodeSyncResult, buildCollaborationActor, buildCollaborationGuardActionCards, buildCollaborationHooksInstallPlan, buildCompanionEngineeringLeadPlanReport, buildContextPackStats, buildEvalCaseArtifact, buildGeneratedWorkflowPlanDocument, buildHostedCodeOverlayUploadPayload, buildHostedGuardPayload, buildJournalCheckpointEntry, buildLocalCallersResult, buildLocalCodeOverlay, buildLocalContextPackReceipt, buildLocalContextPackReceipts, buildLocalImpactResult, buildLocalImportsResult, buildLocalNeighborsResult, buildLocalShortestPathResult, buildLocalSourceSnapshot, buildLocalSourceStatus, buildLocalSourceSyncResult, buildMemoryAudit, buildOnboardFolderManifest, buildOrchestratorHandoff, buildProjectIntelligenceBrief, buildProjectIntelligenceRun, buildProjectJudgmentCard, buildSessionBootstrapQuality, buildSyncDocumentsDryRun, buildTeamSyncHandoffRecord, buildTeamSyncStartWorkRecord, buildTeamSyncSummary, buildToolCallPayload, buildToolResultPayload, buildVerificationPlan, buildWorkflowImpactGate, buildWorkflowPhaseCommitSummary, buildWorkflowPlanScaffold, categoryFromGuardTag, classifyToolResult, cleanContextPacks, 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, normalizeCollaborationFiles, normalizeGuardTag, normalizeWorkflowPlanInput, packContext, parseCollaborationResources, projectIntelligenceBriefCommand, projectIntelligenceRunCommand, readLocalCodeOverlayCache, readLocalCodePromotionState, readLocalSourceSnapshot, readLocalWorkersConfig, referencesIngestCommand, referencesScanCommand, resolveContextPackRecord, resolveFullWorkflowTokenBudget, resolveLocalWorkerRoutingDefaults, resolveQueryFromToolInput, retrieveContextPack, runMemoryGuardCheck, saveCollaborationState, saveConfig, saveTeamSyncState, scanReferences, shouldSuggestOrchestratorForWorkflow, shouldSuggestRuntimeForWorkflow, summarizeLocalCodeOverlay, teamSyncSweepCommand, validatePlanResult, verifyCommand, workersLocalAddCommand, workersLocalStatusCommand, writeLocalCodeOverlayCache, writeLocalCodePromotionState, writeLocalSourceSnapshot, writeOrchestratorHandoff };
3938
+ 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, 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, buildLocalShortestPathResult, buildLocalSourceSnapshot, buildLocalSourceStatus, buildLocalSourceSyncResult, buildMemoryAudit, buildOnboardFolderManifest, buildOrchestratorHandoff, 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, normalizeCollaborationFiles, normalizeGuardTag, normalizeWorkflowPlanInput, outcomeCapturePreviewCommand, packContext, parseCollaborationResources, projectIntelligenceBriefCommand, projectIntelligenceRunCommand, readLocalCodeOverlayCache, readLocalCodePromotionState, readLocalSourceSnapshot, readLocalWorkersConfig, referencesIngestCommand, referencesScanCommand, resolveContextPackRecord, resolveFullWorkflowTokenBudget, resolveLocalWorkerRoutingDefaults, resolveQueryFromToolInput, retrieveContextPack, runMemoryGuardCheck, saveCollaborationState, saveConfig, saveTeamSyncState, scanReferences, shouldSuggestOrchestratorForWorkflow, shouldSuggestRuntimeForWorkflow, summarizeLocalCodeOverlay, teamSyncSweepCommand, validatePlanResult, verifyCommand, workersLocalAddCommand, workersLocalStatusCommand, writeLocalCodeOverlayCache, writeLocalCodePromotionState, writeLocalSourceSnapshot, writeOrchestratorHandoff };