snipara-companion 1.3.2 → 1.3.3

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.
Files changed (3) hide show
  1. package/dist/index.d.ts +159 -1
  2. package/dist/index.js +2028 -359
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1140,6 +1140,164 @@ interface BuildVerificationPlanOptions extends VerifyCommandOptions {
1140
1140
  declare function buildVerificationPlan(options: BuildVerificationPlanOptions): VerificationPlan;
1141
1141
  declare function verifyCommand(options: VerifyCommandOptions): Promise<void>;
1142
1142
 
1143
+ type LocalCodeOverlayMode = "working_tree" | "local_commit";
1144
+ type LocalCodeOverlayKind = "none" | "local_commit" | "working_tree" | "mixed";
1145
+ interface LocalCodeOverlayOptions {
1146
+ cwd?: string;
1147
+ mode?: LocalCodeOverlayMode;
1148
+ commit?: string;
1149
+ maxFiles?: number;
1150
+ maxFileBytes?: number;
1151
+ }
1152
+ interface LocalCodeOverlayFile {
1153
+ path: string;
1154
+ language: "typescript" | "python" | "go";
1155
+ sizeBytes: number;
1156
+ sha256: string;
1157
+ symbolCount: number;
1158
+ importCount: number;
1159
+ }
1160
+ interface LocalCodeOverlaySymbol {
1161
+ name: string;
1162
+ kind: "function" | "class" | "interface" | "type" | "variable" | "method";
1163
+ filePath: string;
1164
+ line: number;
1165
+ localKey: string;
1166
+ }
1167
+ interface LocalCodeOverlayImport {
1168
+ filePath: string;
1169
+ specifier: string;
1170
+ line: number;
1171
+ }
1172
+ interface LocalCodeOverlayExcludedFile {
1173
+ path: string;
1174
+ reason: "ignored" | "unsupported_language" | "too_large" | "secret_pattern" | "read_error";
1175
+ }
1176
+ interface LocalCodeOverlayManifest {
1177
+ version: "snipara.local_code_overlay.v1";
1178
+ generatedAt: string;
1179
+ indexedAt: string;
1180
+ repoRoot: string;
1181
+ repositoryId: string;
1182
+ branch: string | null;
1183
+ baseSha: string | null;
1184
+ localHeadSha: string | null;
1185
+ commit: string | null;
1186
+ dirtyTreeHash: string | null;
1187
+ overlayKind: LocalCodeOverlayKind;
1188
+ canonicalIndexedSha: null;
1189
+ currentWorkingTreeVisible: boolean;
1190
+ canonical: false;
1191
+ mode: LocalCodeOverlayMode;
1192
+ files: LocalCodeOverlayFile[];
1193
+ symbols: LocalCodeOverlaySymbol[];
1194
+ imports: LocalCodeOverlayImport[];
1195
+ excluded: {
1196
+ total: number;
1197
+ byReason: Record<LocalCodeOverlayExcludedFile["reason"], number>;
1198
+ samples: LocalCodeOverlayExcludedFile[];
1199
+ };
1200
+ warnings: Array<{
1201
+ code: string;
1202
+ severity: "info" | "warning";
1203
+ message: string;
1204
+ }>;
1205
+ }
1206
+ interface CodeStatusCommandOptions {
1207
+ dir?: string;
1208
+ maxFiles?: number;
1209
+ includeGraph?: boolean;
1210
+ json?: boolean;
1211
+ }
1212
+ interface CodeSyncCommandOptions extends CodeStatusCommandOptions {
1213
+ commit?: string;
1214
+ workingTree?: boolean;
1215
+ }
1216
+ interface LocalCodeQueryCommandOptions extends CodeStatusCommandOptions {
1217
+ cached?: boolean;
1218
+ qualifiedName?: string;
1219
+ symbolKey?: string;
1220
+ filePath?: string;
1221
+ changedFiles?: string[];
1222
+ from?: string;
1223
+ to?: string;
1224
+ maxHops?: number;
1225
+ }
1226
+ interface CodeHooksInstallCommandOptions {
1227
+ dir?: string;
1228
+ maxFiles?: number;
1229
+ requestReindex?: boolean;
1230
+ dryRun?: boolean;
1231
+ json?: boolean;
1232
+ }
1233
+ interface CodePromoteCommandOptions extends CodeStatusCommandOptions {
1234
+ pushedSha?: string;
1235
+ indexedSha?: string;
1236
+ requestReindex?: boolean;
1237
+ fromHook?: "pre-push";
1238
+ strict?: boolean;
1239
+ }
1240
+ interface LocalCodePromotionState {
1241
+ version: "snipara.local_code_promotion.v1";
1242
+ updatedAt: string;
1243
+ repoRoot: string;
1244
+ repositoryId: string;
1245
+ branch: string | null;
1246
+ pushedSha: string | null;
1247
+ localHeadSha: string | null;
1248
+ indexedSha: string | null;
1249
+ overlayCachePath: string;
1250
+ status: "local_commit_cached" | "reindex_requested" | "reindex_skipped_unconfigured" | "reindex_failed" | "superseded_by_hosted_index";
1251
+ canonical: false;
1252
+ hostedCanonicalVisible: boolean;
1253
+ reindexRequestedAt: string | null;
1254
+ reindexResult?: Record<string, unknown>;
1255
+ warnings: LocalCodeOverlayManifest["warnings"];
1256
+ }
1257
+ interface LocalCodeOverlaySummary {
1258
+ version: LocalCodeOverlayManifest["version"];
1259
+ generatedAt: string;
1260
+ indexedAt: string;
1261
+ repoRoot: string;
1262
+ repositoryId: string;
1263
+ branch: string | null;
1264
+ baseSha: string | null;
1265
+ localHeadSha: string | null;
1266
+ commit: string | null;
1267
+ dirtyTreeHash: string | null;
1268
+ overlayKind: LocalCodeOverlayKind;
1269
+ canonicalIndexedSha: null;
1270
+ currentWorkingTreeVisible: boolean;
1271
+ canonical: false;
1272
+ mode: LocalCodeOverlayMode;
1273
+ counts: {
1274
+ files: number;
1275
+ symbols: number;
1276
+ imports: number;
1277
+ excluded: number;
1278
+ };
1279
+ excludedByReason: Record<LocalCodeOverlayExcludedFile["reason"], number>;
1280
+ fileSamples: string[];
1281
+ warnings: LocalCodeOverlayManifest["warnings"];
1282
+ }
1283
+ declare function getLocalCodeOverlayCachePath(cwd?: string): string;
1284
+ declare function getLocalCodePromotionStatePath(cwd?: string): string;
1285
+ declare function buildLocalCodeOverlay(options?: LocalCodeOverlayOptions): LocalCodeOverlayManifest;
1286
+ declare function summarizeLocalCodeOverlay(manifest: LocalCodeOverlayManifest): LocalCodeOverlaySummary;
1287
+ declare function writeLocalCodeOverlayCache(manifest: LocalCodeOverlayManifest): string;
1288
+ declare function readLocalCodeOverlayCache(cwd?: string): LocalCodeOverlayManifest | null;
1289
+ declare function writeLocalCodePromotionState(state: LocalCodePromotionState): string;
1290
+ declare function readLocalCodePromotionState(cwd?: string): LocalCodePromotionState | null;
1291
+ declare function buildCodeStatusResult(options: CodeStatusCommandOptions): Record<string, unknown>;
1292
+ declare function buildCodeSyncResult(options: CodeSyncCommandOptions): Record<string, unknown>;
1293
+ declare function buildLocalImportsResult(options: LocalCodeQueryCommandOptions): Record<string, unknown>;
1294
+ declare function buildLocalCallersResult(options: LocalCodeQueryCommandOptions): Record<string, unknown>;
1295
+ declare function buildLocalNeighborsResult(options: LocalCodeQueryCommandOptions): Record<string, unknown>;
1296
+ declare function buildLocalShortestPathResult(options: LocalCodeQueryCommandOptions): Record<string, unknown>;
1297
+ declare function buildLocalImpactResult(options: LocalCodeQueryCommandOptions): Record<string, unknown>;
1298
+ declare function buildCodeHooksInstallPlan(options?: CodeHooksInstallCommandOptions): Record<string, unknown>;
1299
+ declare function buildCodePromotionResult(options?: CodePromoteCommandOptions): Promise<Record<string, unknown>>;
1300
+
1143
1301
  type SyncDocumentKind = "DOC" | "BINARY";
1144
1302
  type WorkflowMode = "lite" | "standard" | "auto" | "full" | "orchestrate";
1145
1303
  type OnboardFolderMode = "auto" | "business_context" | "code_project" | "mixed";
@@ -1817,4 +1975,4 @@ interface WrittenOrchestratorHandoff {
1817
1975
  declare function buildOrchestratorHandoff(options: OrchestratorHandoffOptions): OrchestratorHandoffArtifact;
1818
1976
  declare function writeOrchestratorHandoff(options: OrchestratorHandoffOptions): WrittenOrchestratorHandoff;
1819
1977
 
1820
- export { AUTOMATION_MANIFEST_RELATIVE_PATH, AutomationInstallConflictError, AutomationUnsupportedHookBundleError, ORCHESTRATOR_HANDOFF_RELATIVE_PATH, TEAM_SYNC_STATE_RELATIVE_PATH, WORKFLOW_PLANS_RELATIVE_DIR, WORKFLOW_STATE_RELATIVE_PATH, archiveInactiveTeamSyncWork, autoArchiveTeamSyncState, buildAgenticHandoffMarkdown, buildAgenticTimeline, buildAgenticWorkStatus, buildAutomationInstallPlan, buildCanonicalEvent, buildJournalCheckpointEntry, buildOnboardFolderManifest, buildOrchestratorHandoff, buildProjectIntelligenceBrief, buildSyncDocumentsDryRun, buildTeamSyncHandoffRecord, buildTeamSyncStartWorkRecord, buildTeamSyncSummary, buildToolCallPayload, buildToolResultPayload, buildVerificationPlan, buildWorkflowPhaseCommitSummary, buildWorkflowPlanScaffold, categoryFromGuardTag, classifyToolResult, collectSyncDocuments, collectSyncDocumentsInput, createClient, createEmptyTeamSyncState, createLocalQueryCache, detectReleaseSurfacesFromFiles, detectRuntimeEnvironment, extractCommandFromToolInput, extractFilesFromToolInput, formatOrchestratorRecommendationReason, formatStuckGuardDecision, getAutomationManifestPath, getAutomationStatus, getConfigPath, getOrchestratorRecommendation, getPlanStepDisplayTitle, getStagedFiles, getStuckGuardInjection, getTeamSyncStatePath, installAutomationBundle, listProjectsForApiKey, loadAutomationManifest, loadConfig, loadTeamSyncState, normalizeGuardTag, normalizeWorkflowPlanInput, projectIntelligenceBriefCommand, resolveQueryFromToolInput, runMemoryGuardCheck, saveConfig, saveTeamSyncState, shouldSuggestOrchestratorForWorkflow, shouldSuggestRuntimeForWorkflow, teamSyncSweepCommand, verifyCommand, writeOrchestratorHandoff };
1978
+ export { AUTOMATION_MANIFEST_RELATIVE_PATH, AutomationInstallConflictError, AutomationUnsupportedHookBundleError, ORCHESTRATOR_HANDOFF_RELATIVE_PATH, TEAM_SYNC_STATE_RELATIVE_PATH, WORKFLOW_PLANS_RELATIVE_DIR, WORKFLOW_STATE_RELATIVE_PATH, archiveInactiveTeamSyncWork, autoArchiveTeamSyncState, buildAgenticHandoffMarkdown, buildAgenticTimeline, buildAgenticWorkStatus, buildAutomationInstallPlan, buildCanonicalEvent, buildCodeHooksInstallPlan, buildCodePromotionResult, buildCodeStatusResult, buildCodeSyncResult, buildJournalCheckpointEntry, buildLocalCallersResult, buildLocalCodeOverlay, buildLocalImpactResult, buildLocalImportsResult, buildLocalNeighborsResult, buildLocalShortestPathResult, buildOnboardFolderManifest, buildOrchestratorHandoff, buildProjectIntelligenceBrief, buildSyncDocumentsDryRun, buildTeamSyncHandoffRecord, buildTeamSyncStartWorkRecord, buildTeamSyncSummary, buildToolCallPayload, buildToolResultPayload, buildVerificationPlan, buildWorkflowPhaseCommitSummary, buildWorkflowPlanScaffold, categoryFromGuardTag, classifyToolResult, collectSyncDocuments, collectSyncDocumentsInput, createClient, createEmptyTeamSyncState, createLocalQueryCache, detectReleaseSurfacesFromFiles, detectRuntimeEnvironment, extractCommandFromToolInput, extractFilesFromToolInput, formatOrchestratorRecommendationReason, formatStuckGuardDecision, getAutomationManifestPath, getAutomationStatus, getConfigPath, getLocalCodeOverlayCachePath, getLocalCodePromotionStatePath, getOrchestratorRecommendation, getPlanStepDisplayTitle, getStagedFiles, getStuckGuardInjection, getTeamSyncStatePath, installAutomationBundle, listProjectsForApiKey, loadAutomationManifest, loadConfig, loadTeamSyncState, normalizeGuardTag, normalizeWorkflowPlanInput, projectIntelligenceBriefCommand, readLocalCodeOverlayCache, readLocalCodePromotionState, resolveQueryFromToolInput, runMemoryGuardCheck, saveConfig, saveTeamSyncState, shouldSuggestOrchestratorForWorkflow, shouldSuggestRuntimeForWorkflow, summarizeLocalCodeOverlay, teamSyncSweepCommand, verifyCommand, writeLocalCodeOverlayCache, writeLocalCodePromotionState, writeOrchestratorHandoff };