snipara-companion 2.3.1 → 3.0.1
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 +15 -1
- package/dist/index.d.ts +101 -1
- package/dist/index.js +13546 -12709
- package/docs/FULL_REFERENCE.md +31 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,10 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
**Ask your repo what breaks if you touch this.**
|
|
9
9
|
|
|
10
|
-
No global install. No
|
|
10
|
+
No global install. No account. Your code stays on your machine.
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
13
|
npx -y snipara-companion impact src/auth/session.ts --source local
|
|
14
|
+
npx -y snipara-companion source init .
|
|
14
15
|
```
|
|
15
16
|
|
|
16
17
|
Example output excerpt:
|
|
@@ -40,6 +41,7 @@ These commands are useful without hosted Snipara:
|
|
|
40
41
|
|
|
41
42
|
| Command | What it gives you locally |
|
|
42
43
|
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
|
44
|
+
| `source init` / `source sync` / `source status` | Local source snapshot, document preview, and code overlay |
|
|
43
45
|
| `impact` / `code impact` | File-level blast-radius from the local code overlay |
|
|
44
46
|
| `code callers` / `imports` / `neighbors` / `shortest-path` | Structural repo questions from local files |
|
|
45
47
|
| `workflow start` / `phase-start` / `phase-commit` / `resume` | Agent continuity that survives compaction |
|
|
@@ -73,6 +75,7 @@ Snipara is the upgrade path for team and cross-project intelligence.
|
|
|
73
75
|
| Need | Local companion | Hosted Snipara |
|
|
74
76
|
| ----------------------------------------------- | ------------------------- | ----------------------------------- |
|
|
75
77
|
| Inspect this repo before editing | Yes, no account | Optional hosted code graph |
|
|
78
|
+
| Activate docs and code without GitHub | Yes, `source init` | Provider sync after approval |
|
|
76
79
|
| Keep code private on this machine | Yes | Use only when explicitly configured |
|
|
77
80
|
| Preserve agent workflow state | Yes, `.snipara/` files | Syncs across machines and agents |
|
|
78
81
|
| Store/retrieve long tool output | Yes, `context-pack` | Metadata and receipts can be shared |
|
|
@@ -85,6 +88,17 @@ graph, cross-machine presence, outcome learning, team coordination, or dashboard
|
|
|
85
88
|
proof. Keep local mode when the question is simply: "what does this repo say
|
|
86
89
|
will break if I touch this file?"
|
|
87
90
|
|
|
91
|
+
For folders without Git metadata or users who have not approved GitHub yet, run:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
npx -y snipara-companion source init .
|
|
95
|
+
npx -y snipara-companion source status --json
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
This writes `.snipara/source/latest.json`, builds a local document sync preview,
|
|
99
|
+
and refreshes `.snipara/code-overlay/latest.json`. The hosted code graph remains
|
|
100
|
+
the canonical shared graph after provider sync.
|
|
101
|
+
|
|
88
102
|
## Install
|
|
89
103
|
|
|
90
104
|
Use `npx` for one-off checks:
|
package/dist/index.d.ts
CHANGED
|
@@ -2750,6 +2750,105 @@ declare function buildAgenticTimeline(options?: {
|
|
|
2750
2750
|
cwd?: string;
|
|
2751
2751
|
}): AgenticTimeline;
|
|
2752
2752
|
|
|
2753
|
+
type LocalSourceProvider = "local_folder";
|
|
2754
|
+
type LocalSourceFileKind = "DOC" | "BINARY" | "CODE" | "CONFIG" | "OTHER";
|
|
2755
|
+
type LocalSourceSkippedReason = "ignored" | "too_large" | "read_error";
|
|
2756
|
+
type LocalSourceReindexKind = "doc" | "code";
|
|
2757
|
+
type LocalSourceReindexMode = "incremental" | "full";
|
|
2758
|
+
interface LocalSourceFile {
|
|
2759
|
+
path: string;
|
|
2760
|
+
kind: LocalSourceFileKind;
|
|
2761
|
+
format: string | null;
|
|
2762
|
+
sizeBytes: number;
|
|
2763
|
+
modifiedAt: string;
|
|
2764
|
+
sha256: string;
|
|
2765
|
+
}
|
|
2766
|
+
interface LocalSourceSkippedFile {
|
|
2767
|
+
path: string;
|
|
2768
|
+
reason: LocalSourceSkippedReason;
|
|
2769
|
+
sizeBytes?: number;
|
|
2770
|
+
}
|
|
2771
|
+
interface LocalSourceSummary {
|
|
2772
|
+
totalFiles: number;
|
|
2773
|
+
totalBytes: number;
|
|
2774
|
+
byKind: Record<LocalSourceFileKind, number>;
|
|
2775
|
+
skipped: number;
|
|
2776
|
+
}
|
|
2777
|
+
interface LocalSourceSnapshot {
|
|
2778
|
+
version: "snipara.local_source_snapshot.v1";
|
|
2779
|
+
generatedAt: string;
|
|
2780
|
+
root: string;
|
|
2781
|
+
provider: LocalSourceProvider;
|
|
2782
|
+
revision: string;
|
|
2783
|
+
recursive: boolean;
|
|
2784
|
+
maxFiles: number;
|
|
2785
|
+
maxFileBytes: number;
|
|
2786
|
+
summary: LocalSourceSummary;
|
|
2787
|
+
files: LocalSourceFile[];
|
|
2788
|
+
skipped: {
|
|
2789
|
+
total: number;
|
|
2790
|
+
byReason: Record<LocalSourceSkippedReason, number>;
|
|
2791
|
+
samples: LocalSourceSkippedFile[];
|
|
2792
|
+
};
|
|
2793
|
+
warnings: string[];
|
|
2794
|
+
}
|
|
2795
|
+
interface LocalSourceSnapshotOptions {
|
|
2796
|
+
dir?: string;
|
|
2797
|
+
recursive?: boolean;
|
|
2798
|
+
maxFiles?: number;
|
|
2799
|
+
maxFileBytes?: number;
|
|
2800
|
+
}
|
|
2801
|
+
interface LocalSourceComparison {
|
|
2802
|
+
added: string[];
|
|
2803
|
+
modified: string[];
|
|
2804
|
+
deleted: string[];
|
|
2805
|
+
unchanged: number;
|
|
2806
|
+
}
|
|
2807
|
+
interface LocalSourceStatusResult {
|
|
2808
|
+
root: string;
|
|
2809
|
+
snapshotPath: string;
|
|
2810
|
+
previous: LocalSourceSnapshot | null;
|
|
2811
|
+
current: LocalSourceSnapshot;
|
|
2812
|
+
comparison: LocalSourceComparison;
|
|
2813
|
+
}
|
|
2814
|
+
interface LocalSourceSyncOptions extends LocalSourceSnapshotOptions {
|
|
2815
|
+
prefix?: string;
|
|
2816
|
+
mode?: OnboardFolderMode;
|
|
2817
|
+
deleteMissing?: boolean;
|
|
2818
|
+
apply?: boolean;
|
|
2819
|
+
reindex?: boolean;
|
|
2820
|
+
reindexKind?: LocalSourceReindexKind;
|
|
2821
|
+
reindexMode?: LocalSourceReindexMode;
|
|
2822
|
+
includeGraph?: boolean;
|
|
2823
|
+
json?: boolean;
|
|
2824
|
+
}
|
|
2825
|
+
interface LocalSourceSyncResult {
|
|
2826
|
+
root: string;
|
|
2827
|
+
snapshotPath: string;
|
|
2828
|
+
snapshot: LocalSourceSnapshot;
|
|
2829
|
+
comparison: LocalSourceComparison;
|
|
2830
|
+
documents: {
|
|
2831
|
+
onboarding: Pick<OnboardFolderManifest, "source" | "classification" | "summary" | "warnings">;
|
|
2832
|
+
dryRun: OnboardFolderManifest["dryRun"];
|
|
2833
|
+
};
|
|
2834
|
+
codeOverlay: {
|
|
2835
|
+
cachePath: string;
|
|
2836
|
+
summary: LocalCodeOverlaySummary;
|
|
2837
|
+
};
|
|
2838
|
+
apply: null | {
|
|
2839
|
+
sync: Record<string, unknown>;
|
|
2840
|
+
reindex?: Record<string, unknown>;
|
|
2841
|
+
};
|
|
2842
|
+
warnings: string[];
|
|
2843
|
+
}
|
|
2844
|
+
declare function getLocalSourceSnapshotPath(cwd?: string): string;
|
|
2845
|
+
declare function buildLocalSourceSnapshot(options?: LocalSourceSnapshotOptions): LocalSourceSnapshot;
|
|
2846
|
+
declare function writeLocalSourceSnapshot(snapshot: LocalSourceSnapshot): string;
|
|
2847
|
+
declare function readLocalSourceSnapshot(cwd?: string): LocalSourceSnapshot | null;
|
|
2848
|
+
declare function compareLocalSourceSnapshots(previous: LocalSourceSnapshot | null, current: LocalSourceSnapshot): LocalSourceComparison;
|
|
2849
|
+
declare function buildLocalSourceStatus(options?: LocalSourceSnapshotOptions): LocalSourceStatusResult;
|
|
2850
|
+
declare function buildLocalSourceSyncResult(options?: LocalSourceSyncOptions): Promise<LocalSourceSyncResult>;
|
|
2851
|
+
|
|
2753
2852
|
declare const MANIFEST_VERSION = "snipara.references.v1";
|
|
2754
2853
|
type ReferenceStatus = "allowed" | "pending" | "denied" | "unsupported";
|
|
2755
2854
|
interface ReferenceOccurrence {
|
|
@@ -3529,6 +3628,7 @@ interface OrchestratorHandoffOptions {
|
|
|
3529
3628
|
rootDir?: string;
|
|
3530
3629
|
changedFiles?: string[];
|
|
3531
3630
|
contextRefs?: string[];
|
|
3631
|
+
decisionIds?: string[];
|
|
3532
3632
|
resumeSummary?: string;
|
|
3533
3633
|
featureTitle?: string;
|
|
3534
3634
|
workstreams?: string[];
|
|
@@ -3544,4 +3644,4 @@ declare function buildOrchestratorHandoff(options: OrchestratorHandoffOptions):
|
|
|
3544
3644
|
declare function buildAdaptiveWorkRoutingRecommendation(options: AdaptiveWorkRoutingOptions): AdaptiveWorkRoutingRecommendation;
|
|
3545
3645
|
declare function writeOrchestratorHandoff(options: OrchestratorHandoffOptions): WrittenOrchestratorHandoff;
|
|
3546
3646
|
|
|
3547
|
-
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_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, 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, 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, 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, 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, referencesIngestCommand, referencesScanCommand, resolveContextPackRecord, resolveFullWorkflowTokenBudget, resolveQueryFromToolInput, retrieveContextPack, runMemoryGuardCheck, saveCollaborationState, saveConfig, saveTeamSyncState, scanReferences, shouldSuggestOrchestratorForWorkflow, shouldSuggestRuntimeForWorkflow, summarizeLocalCodeOverlay, teamSyncSweepCommand, validatePlanResult, verifyCommand, writeLocalCodeOverlayCache, writeLocalCodePromotionState, writeOrchestratorHandoff };
|
|
3647
|
+
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_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, 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, referencesIngestCommand, referencesScanCommand, resolveContextPackRecord, resolveFullWorkflowTokenBudget, resolveQueryFromToolInput, retrieveContextPack, runMemoryGuardCheck, saveCollaborationState, saveConfig, saveTeamSyncState, scanReferences, shouldSuggestOrchestratorForWorkflow, shouldSuggestRuntimeForWorkflow, summarizeLocalCodeOverlay, teamSyncSweepCommand, validatePlanResult, verifyCommand, writeLocalCodeOverlayCache, writeLocalCodePromotionState, writeLocalSourceSnapshot, writeOrchestratorHandoff };
|