snipara-companion 3.2.5 → 3.2.7
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 +4 -3
- package/dist/index.d.ts +4 -1
- package/dist/index.js +174 -67
- package/docs/FULL_REFERENCE.md +10 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -133,9 +133,10 @@ verification hints.
|
|
|
133
133
|
Session Snapshot V0 includes latest activity, risk reasons, touched files, a
|
|
134
134
|
next action, and advisory Intent Detection V0. Intent Detection V0 reports the
|
|
135
135
|
inferred intent, confidence, reason-code signals, local evidence counts, and a
|
|
136
|
-
suggested workflow mode
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
suggested workflow mode. `workflow run --mode auto` uses that same Control Plane
|
|
137
|
+
principle to choose lite, standard, full, or orchestrate. Lite runs with zero
|
|
138
|
+
mandatory hosted context calls; recall/context/code-impact are on-demand
|
|
139
|
+
escalations, not an entry toll.
|
|
139
140
|
`workflow timeline --export md` prints a compact redacted Markdown timeline for
|
|
140
141
|
handoff or publication.
|
|
141
142
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1440,6 +1440,7 @@ interface MemoryGuardCheckOptions {
|
|
|
1440
1440
|
confirmedByUser?: string;
|
|
1441
1441
|
strict?: boolean;
|
|
1442
1442
|
json?: boolean;
|
|
1443
|
+
verbose?: boolean;
|
|
1443
1444
|
limit?: number;
|
|
1444
1445
|
categories?: string[];
|
|
1445
1446
|
includeContext?: boolean;
|
|
@@ -3385,6 +3386,7 @@ declare function buildWorkflowPhaseCommitSummary(args: {
|
|
|
3385
3386
|
phase: Pick<ManagedWorkflowPhase, "id" | "title">;
|
|
3386
3387
|
summary: string;
|
|
3387
3388
|
}): string;
|
|
3389
|
+
declare function resolveAutoWorkflowMode(query: string): Exclude<WorkflowMode, "auto">;
|
|
3388
3390
|
/**
|
|
3389
3391
|
* Compute the impact gate for committed-but-unpushed workflow phases.
|
|
3390
3392
|
*
|
|
@@ -3869,6 +3871,7 @@ interface CollaborationCommandOptions {
|
|
|
3869
3871
|
ackReviewOnly?: boolean;
|
|
3870
3872
|
dir?: string;
|
|
3871
3873
|
json?: boolean;
|
|
3874
|
+
verbose?: boolean;
|
|
3872
3875
|
}
|
|
3873
3876
|
interface CollaborationHooksInstallOptions {
|
|
3874
3877
|
dir?: string;
|
|
@@ -4255,4 +4258,4 @@ declare function buildOrchestratorHandoff(options: OrchestratorHandoffOptions):
|
|
|
4255
4258
|
declare function buildAdaptiveWorkRoutingRecommendation(options: AdaptiveWorkRoutingOptions): AdaptiveWorkRoutingRecommendation;
|
|
4256
4259
|
declare function writeOrchestratorHandoff(options: OrchestratorHandoffOptions): WrittenOrchestratorHandoff;
|
|
4257
4260
|
|
|
4258
|
-
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, readSessionSnapshot, realityCheckCommand, referencesIngestCommand, referencesScanCommand, resolveContextPackRecord, resolveFullWorkflowTokenBudget, resolveLocalWorkerRoutingDefaults, resolveQueryFromToolInput, retrieveContextPack, runMemoryGuardCheck, saveCollaborationState, saveConfig, saveTeamSyncState, scanReferences, shouldSuggestOrchestratorForWorkflow, shouldSuggestRuntimeForWorkflow, summarizeLocalCodeOverlay, teamSyncSweepCommand, validatePlanResult, verifyCommand, workersLocalAddCommand, workersLocalListCommand, workersLocalProbePrintCommand, workersLocalRemoveCommand, workersLocalStatusCommand, writeLocalCodeOverlayCache, writeLocalCodePromotionState, writeLocalSourceSnapshot, writeOrchestratorHandoff, writeProducerLoopArtifact, writeSessionSnapshot };
|
|
4261
|
+
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, readSessionSnapshot, realityCheckCommand, referencesIngestCommand, referencesScanCommand, resolveAutoWorkflowMode, resolveContextPackRecord, resolveFullWorkflowTokenBudget, resolveLocalWorkerRoutingDefaults, resolveQueryFromToolInput, retrieveContextPack, runMemoryGuardCheck, saveCollaborationState, saveConfig, saveTeamSyncState, scanReferences, shouldSuggestOrchestratorForWorkflow, shouldSuggestRuntimeForWorkflow, summarizeLocalCodeOverlay, teamSyncSweepCommand, validatePlanResult, verifyCommand, workersLocalAddCommand, workersLocalListCommand, workersLocalProbePrintCommand, workersLocalRemoveCommand, workersLocalStatusCommand, writeLocalCodeOverlayCache, writeLocalCodePromotionState, writeLocalSourceSnapshot, writeOrchestratorHandoff, writeProducerLoopArtifact, writeSessionSnapshot };
|
package/dist/index.js
CHANGED
|
@@ -192,6 +192,7 @@ __export(index_exports, {
|
|
|
192
192
|
realityCheckCommand: () => realityCheckCommand,
|
|
193
193
|
referencesIngestCommand: () => referencesIngestCommand,
|
|
194
194
|
referencesScanCommand: () => referencesScanCommand,
|
|
195
|
+
resolveAutoWorkflowMode: () => resolveAutoWorkflowMode,
|
|
195
196
|
resolveContextPackRecord: () => resolveContextPackRecord,
|
|
196
197
|
resolveFullWorkflowTokenBudget: () => resolveFullWorkflowTokenBudget,
|
|
197
198
|
resolveLocalWorkerRoutingDefaults: () => resolveLocalWorkerRoutingDefaults,
|
|
@@ -8361,6 +8362,9 @@ function printMemoryGuardResult(result) {
|
|
|
8361
8362
|
}
|
|
8362
8363
|
}
|
|
8363
8364
|
}
|
|
8365
|
+
function shouldPrintCompactMemoryGuardSuccess(result, options) {
|
|
8366
|
+
return !options.verbose && result.triggered && !result.shouldBlock && !result.requiresConfirmation && result.contradictions.length === 0 && result.recentFailures.length === 0 && result.warnings.length === 0;
|
|
8367
|
+
}
|
|
8364
8368
|
async function runMemoryGuardCheck(options = {}) {
|
|
8365
8369
|
const cwd = process.env.SNIPARA_WORKSPACE_DIR || process.cwd();
|
|
8366
8370
|
const root = findWorkspaceRoot(cwd, true) || cwd;
|
|
@@ -8572,6 +8576,8 @@ async function memoryGuardCheckCommand(options) {
|
|
|
8572
8576
|
const result = await runMemoryGuardCheck(options);
|
|
8573
8577
|
if (options.json) {
|
|
8574
8578
|
console.log(JSON.stringify(result, null, 2));
|
|
8579
|
+
} else if (shouldPrintCompactMemoryGuardSuccess(result, options)) {
|
|
8580
|
+
console.log(`Snipara Memory Guard: checked (${result.trigger})`);
|
|
8575
8581
|
} else if (result.triggered || options.trigger === "manual") {
|
|
8576
8582
|
printMemoryGuardResult(result);
|
|
8577
8583
|
}
|
|
@@ -18868,11 +18874,42 @@ function shellQuote2(value) {
|
|
|
18868
18874
|
function phaseQuery(state, phase) {
|
|
18869
18875
|
return phase.query || `${state.goal}: ${phase.title}`;
|
|
18870
18876
|
}
|
|
18871
|
-
function
|
|
18872
|
-
|
|
18877
|
+
function resolveAutoWorkflowMode(query) {
|
|
18878
|
+
const normalized = query.toLowerCase();
|
|
18879
|
+
if (/\b(orchestrate|swarm|htask|handoff|multi-agent|multi agent|worker|proof gate|proof-gate|drift check|release gate|production gate)\b/.test(
|
|
18880
|
+
normalized
|
|
18881
|
+
)) {
|
|
18882
|
+
return "orchestrate";
|
|
18883
|
+
}
|
|
18884
|
+
if (/\b(deploy|deployment|release|merge|push|migration|schema|auth|billing|security|architecture|architectural|multi-phase|multiphase|phase commit|final commit|managed workflow|roadmap|plan)\b/.test(
|
|
18885
|
+
normalized
|
|
18886
|
+
)) {
|
|
18887
|
+
return "full";
|
|
18888
|
+
}
|
|
18889
|
+
if (/\b(why|pourquoi|decision|décision|rationale|positioning|positionnement|strategy|stratégie|cross-session|previous decision|prior decision|historical context)\b/.test(
|
|
18890
|
+
normalized
|
|
18891
|
+
)) {
|
|
18892
|
+
return "standard";
|
|
18893
|
+
}
|
|
18894
|
+
if (/\b(status|show|list|read|lookup|recall|brief|summarize|summary|what changed|question|docs?|documentation)\b/.test(
|
|
18895
|
+
normalized
|
|
18896
|
+
) && !/\b(implement|change|fix|ship|code|refactor|test|write|create|build)\b/.test(normalized)) {
|
|
18897
|
+
return "lite";
|
|
18898
|
+
}
|
|
18899
|
+
if (/\b(typo|copy edit|small diff|tiny diff|one-line|one line|known file|obvious fix|quick fix|format|formatting|rename)\b/.test(
|
|
18900
|
+
normalized
|
|
18901
|
+
) && !/\b(architecture|release|deploy|migration|schema|auth|billing|security|multi-file|many files|5\+ files|cross-session|decision|décision)\b/.test(
|
|
18902
|
+
normalized
|
|
18903
|
+
)) {
|
|
18904
|
+
return "lite";
|
|
18905
|
+
}
|
|
18906
|
+
return "standard";
|
|
18873
18907
|
}
|
|
18874
|
-
function
|
|
18875
|
-
|
|
18908
|
+
function effectiveWorkflowMode(mode, query = "") {
|
|
18909
|
+
return mode === "auto" ? resolveAutoWorkflowMode(query) : mode;
|
|
18910
|
+
}
|
|
18911
|
+
function shouldFollowWorkflowRecommendations(mode, query = "") {
|
|
18912
|
+
const effectiveMode = effectiveWorkflowMode(mode, query);
|
|
18876
18913
|
return effectiveMode === "standard" || effectiveMode === "full";
|
|
18877
18914
|
}
|
|
18878
18915
|
function printManagedWorkflowState(state) {
|
|
@@ -18914,14 +18951,15 @@ function safeDecisionPendingCount() {
|
|
|
18914
18951
|
function printManagedWorkflowDiscipline() {
|
|
18915
18952
|
console.log(import_chalk6.default.bold("Coding workflow mode"));
|
|
18916
18953
|
console.log(
|
|
18917
|
-
"- LITE: small single-phase edits
|
|
18954
|
+
"- LITE: small single-phase edits have no mandatory Snipara calls; use local verification and escalate on demand."
|
|
18918
18955
|
);
|
|
18919
18956
|
console.log(
|
|
18920
|
-
"- STANDARD: normal coding work uses context
|
|
18957
|
+
"- STANDARD: normal coding work uses context or code graph when the task needs source truth or prior rationale."
|
|
18921
18958
|
);
|
|
18922
18959
|
console.log(
|
|
18923
18960
|
"- FULL: use this managed workflow with phases/chunks for multi-file, risky, release/deploy, architectural, or compaction-prone coding work."
|
|
18924
18961
|
);
|
|
18962
|
+
console.log("- --mode auto routes by task intent; a nudge is advisory, not a gate.");
|
|
18925
18963
|
console.log(
|
|
18926
18964
|
"- FULL + ORCHESTRATED: use explicit snipara-orchestrator handoff only for production gates, drift checks, htasks, or multi-agent coordination."
|
|
18927
18965
|
);
|
|
@@ -20001,6 +20039,17 @@ function printRuntimeHint(query, mode) {
|
|
|
20001
20039
|
console.log("Fresh setup: npx create-snipara --profile full-stack --advanced");
|
|
20002
20040
|
console.log("Manual install: pip install 'snipara-sandbox[all]'");
|
|
20003
20041
|
}
|
|
20042
|
+
function printLiteWorkflowRun(query, requestedMode) {
|
|
20043
|
+
console.log(import_chalk6.default.bold("Workflow Lite"));
|
|
20044
|
+
printKeyValue2("Requested mode:", requestedMode);
|
|
20045
|
+
printKeyValue2("Effective mode:", "lite");
|
|
20046
|
+
printKeyValue2("Task:", query);
|
|
20047
|
+
console.log("No Snipara recall, context query, or bootstrap call was run.");
|
|
20048
|
+
console.log(
|
|
20049
|
+
"Escalate with recall, context_query, code impact, or task-commit only when the task creates that need."
|
|
20050
|
+
);
|
|
20051
|
+
console.log("");
|
|
20052
|
+
}
|
|
20004
20053
|
function runtimeHintVersionLabel(report) {
|
|
20005
20054
|
if (!report.runtime.cliVersion) {
|
|
20006
20055
|
return report.runtime.version ? ` (${report.runtime.version})` : "";
|
|
@@ -20697,37 +20746,29 @@ function printChunkResult(chunkId, result) {
|
|
|
20697
20746
|
function readSessionEntryPreview(entry) {
|
|
20698
20747
|
return toPreview(entry.text ?? entry.content ?? entry.summary ?? entry.title, 220);
|
|
20699
20748
|
}
|
|
20700
|
-
function
|
|
20701
|
-
|
|
20702
|
-
|
|
20703
|
-
}
|
|
20704
|
-
console.log(import_chalk6.default.bold(label));
|
|
20705
|
-
for (const entry of tier.memories.slice(0, 5)) {
|
|
20706
|
-
console.log(`- ${readSessionEntryPreview(entry)}`);
|
|
20707
|
-
}
|
|
20708
|
-
console.log("");
|
|
20749
|
+
function compactSessionEntryLine(entry) {
|
|
20750
|
+
const label = typeof entry.type === "string" && entry.type.trim().length > 0 ? entry.type.trim() : typeof entry.category === "string" && entry.category.trim().length > 0 ? entry.category.trim() : "memory";
|
|
20751
|
+
return `- ${label}: ${readSessionEntryPreview(entry)}`;
|
|
20709
20752
|
}
|
|
20710
20753
|
function printSessionBootstrap(result, options) {
|
|
20711
20754
|
const normalized = normalizeSessionMemoriesResult(result);
|
|
20712
|
-
|
|
20713
|
-
|
|
20714
|
-
|
|
20715
|
-
|
|
20716
|
-
)
|
|
20717
|
-
|
|
20718
|
-
printKeyValue2("Tokens:", normalized.total_tokens);
|
|
20719
|
-
}
|
|
20720
|
-
if (typeof normalized.message === "string" && normalized.message.length > 0) {
|
|
20721
|
-
printKeyValue2("Message:", normalized.message);
|
|
20755
|
+
const entries = [
|
|
20756
|
+
...normalized.critical.memories,
|
|
20757
|
+
...options.includeSessionContext ? normalized.daily.memories : []
|
|
20758
|
+
].slice(0, 5);
|
|
20759
|
+
if (entries.length === 0) {
|
|
20760
|
+
return false;
|
|
20722
20761
|
}
|
|
20723
|
-
console.log("");
|
|
20724
|
-
|
|
20725
|
-
|
|
20726
|
-
printSessionTier("Session Context (weak carryover)", normalized.daily);
|
|
20762
|
+
console.log(import_chalk6.default.bold("Snipara Bootstrap Brief"));
|
|
20763
|
+
for (const entry of entries) {
|
|
20764
|
+
console.log(compactSessionEntryLine(entry));
|
|
20727
20765
|
}
|
|
20728
|
-
|
|
20729
|
-
|
|
20766
|
+
const hiddenCount = normalized.critical.count + (options.includeSessionContext ? normalized.daily.count : 0) - entries.length;
|
|
20767
|
+
if (hiddenCount > 0) {
|
|
20768
|
+
console.log(`- ${hiddenCount} more available on demand via recall/session-bootstrap --json.`);
|
|
20730
20769
|
}
|
|
20770
|
+
console.log("");
|
|
20771
|
+
return true;
|
|
20731
20772
|
}
|
|
20732
20773
|
function printSessionBootstrapQuality(report) {
|
|
20733
20774
|
if (report.warnings.length === 0) {
|
|
@@ -22014,10 +22055,11 @@ async function sharedContextCommand(options) {
|
|
|
22014
22055
|
}
|
|
22015
22056
|
async function workflowRunCommand(options) {
|
|
22016
22057
|
const hostedConfigured = isConfigured();
|
|
22058
|
+
const effectiveMode = effectiveWorkflowMode(options.mode, options.query);
|
|
22017
22059
|
const localAdaptiveRoutingPolicy = readLocalAdaptiveRoutingProjectPolicy();
|
|
22018
22060
|
const localAdaptiveRoutingRequested = shouldBuildAdaptiveRouting(options);
|
|
22019
|
-
const canRunLocalAdaptiveRouting = !hostedConfigured &&
|
|
22020
|
-
if (!hostedConfigured && !canRunLocalAdaptiveRouting) {
|
|
22061
|
+
const canRunLocalAdaptiveRouting = !hostedConfigured && effectiveMode !== "orchestrate" && (localAdaptiveRoutingRequested || localAdaptiveRoutingPolicy !== null && localAdaptiveRoutingPolicy.mode !== "off");
|
|
22062
|
+
if (!hostedConfigured && !canRunLocalAdaptiveRouting && effectiveMode !== "lite") {
|
|
22021
22063
|
ensureConfigured();
|
|
22022
22064
|
}
|
|
22023
22065
|
const client = hostedConfigured ? createClient(2e4) : null;
|
|
@@ -22043,7 +22085,7 @@ async function workflowRunCommand(options) {
|
|
|
22043
22085
|
routingOptions,
|
|
22044
22086
|
adaptiveRoutingWithCatalog
|
|
22045
22087
|
) ? enrichAdaptiveRoutingWithLocalOrchestrator(adaptiveRoutingWithCatalog, routingOptions) : adaptiveRoutingWithCatalog;
|
|
22046
|
-
const orchestratorRecommendation = getOrchestratorRecommendation(options.query,
|
|
22088
|
+
const orchestratorRecommendation = getOrchestratorRecommendation(options.query, effectiveMode, {
|
|
22047
22089
|
policyAutoRoute: options.autoRouteOrchestrator,
|
|
22048
22090
|
policySource: options.orchestratorPolicySource,
|
|
22049
22091
|
adaptiveRoutingDryRun: Boolean(adaptiveRouting)
|
|
@@ -22055,20 +22097,25 @@ async function workflowRunCommand(options) {
|
|
|
22055
22097
|
query: options.query,
|
|
22056
22098
|
summary: options.query,
|
|
22057
22099
|
title: options.query,
|
|
22058
|
-
mode:
|
|
22100
|
+
mode: effectiveMode,
|
|
22059
22101
|
adaptiveRouting
|
|
22060
22102
|
}) : null;
|
|
22061
22103
|
if (!hostedConfigured) {
|
|
22062
22104
|
const payload2 = {
|
|
22063
22105
|
mode: options.mode,
|
|
22064
|
-
effective_mode:
|
|
22106
|
+
effective_mode: effectiveMode,
|
|
22065
22107
|
local_only: true,
|
|
22066
22108
|
local_policy_path: localAdaptiveRoutingPolicy ? ADAPTIVE_ROUTING_POLICY_RELATIVE_PATH2 : null,
|
|
22109
|
+
retrieval_policy: effectiveMode === "lite" ? {
|
|
22110
|
+
mandatory_calls: [],
|
|
22111
|
+
escalation: "Run recall, context_query, or code impact only when the task needs them.",
|
|
22112
|
+
persistence: "Use task-commit only when reusable durable knowledge was learned."
|
|
22113
|
+
} : void 0,
|
|
22067
22114
|
orchestrator_recommendation: orchestratorRecommendation,
|
|
22068
22115
|
orchestrator_handoff: preparedHandoff,
|
|
22069
22116
|
adaptive_routing: adaptiveRouting,
|
|
22070
22117
|
local_worker: localWorkerRoutingDefaults?.worker,
|
|
22071
|
-
warnings: [
|
|
22118
|
+
warnings: effectiveMode === "lite" ? [] : [
|
|
22072
22119
|
"Hosted Snipara is not configured; workflow run is limited to local Adaptive Work Routing metadata."
|
|
22073
22120
|
]
|
|
22074
22121
|
};
|
|
@@ -22076,10 +22123,44 @@ async function workflowRunCommand(options) {
|
|
|
22076
22123
|
printJson2(payload2);
|
|
22077
22124
|
return;
|
|
22078
22125
|
}
|
|
22079
|
-
|
|
22080
|
-
|
|
22081
|
-
|
|
22082
|
-
|
|
22126
|
+
if (effectiveMode === "lite") {
|
|
22127
|
+
printLiteWorkflowRun(options.query, options.mode);
|
|
22128
|
+
} else {
|
|
22129
|
+
console.log(import_chalk6.default.bold("Local Adaptive Work Routing"));
|
|
22130
|
+
console.log(
|
|
22131
|
+
"Hosted Snipara is not configured; no context query, hosted catalog, or planner call ran."
|
|
22132
|
+
);
|
|
22133
|
+
}
|
|
22134
|
+
if (adaptiveRouting) {
|
|
22135
|
+
printAdaptiveRoutingRecommendation(adaptiveRouting);
|
|
22136
|
+
}
|
|
22137
|
+
if (preparedHandoff) {
|
|
22138
|
+
printPreparedOrchestratorHandoff2(preparedHandoff);
|
|
22139
|
+
}
|
|
22140
|
+
return;
|
|
22141
|
+
}
|
|
22142
|
+
if (effectiveMode === "lite") {
|
|
22143
|
+
const payload2 = {
|
|
22144
|
+
mode: options.mode,
|
|
22145
|
+
effective_mode: effectiveMode,
|
|
22146
|
+
retrieval_policy: {
|
|
22147
|
+
mandatory_calls: [],
|
|
22148
|
+
escalation: "Run recall, context_query, or code impact only when the task needs them.",
|
|
22149
|
+
persistence: "Use task-commit only when reusable durable knowledge was learned."
|
|
22150
|
+
},
|
|
22151
|
+
orchestrator_recommendation: orchestratorRecommendation,
|
|
22152
|
+
orchestrator_handoff: preparedHandoff,
|
|
22153
|
+
adaptive_routing: adaptiveRouting,
|
|
22154
|
+
local_worker: localWorkerRoutingDefaults?.worker
|
|
22155
|
+
};
|
|
22156
|
+
if (options.json) {
|
|
22157
|
+
printJson2(payload2);
|
|
22158
|
+
return;
|
|
22159
|
+
}
|
|
22160
|
+
printLiteWorkflowRun(options.query, options.mode);
|
|
22161
|
+
if (options.runtimeHint !== false) {
|
|
22162
|
+
printRuntimeHint(options.query, effectiveMode);
|
|
22163
|
+
}
|
|
22083
22164
|
if (adaptiveRouting) {
|
|
22084
22165
|
printAdaptiveRoutingRecommendation(adaptiveRouting);
|
|
22085
22166
|
}
|
|
@@ -22091,7 +22172,7 @@ async function workflowRunCommand(options) {
|
|
|
22091
22172
|
if (!client) {
|
|
22092
22173
|
throw new Error("Hosted Snipara client unavailable after configuration check.");
|
|
22093
22174
|
}
|
|
22094
|
-
if (
|
|
22175
|
+
if (effectiveMode === "orchestrate") {
|
|
22095
22176
|
const result = await client.orchestrate(options.query, options.maxTokens);
|
|
22096
22177
|
if (options.json) {
|
|
22097
22178
|
printJson2({
|
|
@@ -22106,8 +22187,8 @@ async function workflowRunCommand(options) {
|
|
|
22106
22187
|
}
|
|
22107
22188
|
printOrchestrateResult(result);
|
|
22108
22189
|
if (options.runtimeHint !== false) {
|
|
22109
|
-
printRuntimeHint(options.query,
|
|
22110
|
-
printOrchestratorHandoffHint(options.query,
|
|
22190
|
+
printRuntimeHint(options.query, effectiveMode);
|
|
22191
|
+
printOrchestratorHandoffHint(options.query, effectiveMode, orchestratorRecommendation);
|
|
22111
22192
|
}
|
|
22112
22193
|
if (adaptiveRouting) {
|
|
22113
22194
|
printAdaptiveRoutingRecommendation(adaptiveRouting);
|
|
@@ -22117,8 +22198,7 @@ async function workflowRunCommand(options) {
|
|
|
22117
22198
|
}
|
|
22118
22199
|
return;
|
|
22119
22200
|
}
|
|
22120
|
-
const
|
|
22121
|
-
const shouldRequestSharedContext = shouldFollowWorkflowRecommendations(options.mode) && hasSharedContextIntent(options.query);
|
|
22201
|
+
const shouldRequestSharedContext = shouldFollowWorkflowRecommendations(options.mode, options.query) && hasSharedContextIntent(options.query);
|
|
22122
22202
|
const workflowBudget = effectiveMode === "full" ? resolveFullWorkflowTokenBudget({
|
|
22123
22203
|
maxTokens: options.maxTokens,
|
|
22124
22204
|
includeSessionContext: options.includeSessionContext,
|
|
@@ -22162,7 +22242,7 @@ async function workflowRunCommand(options) {
|
|
|
22162
22242
|
includeContent: true
|
|
22163
22243
|
});
|
|
22164
22244
|
}
|
|
22165
|
-
if (context.recommended_tool && shouldFollowWorkflowRecommendations(options.mode)) {
|
|
22245
|
+
if (context.recommended_tool && shouldFollowWorkflowRecommendations(options.mode, options.query)) {
|
|
22166
22246
|
payload.executed_recommended_tool = await runRecommendedTool(context);
|
|
22167
22247
|
}
|
|
22168
22248
|
if (effectiveMode === "full") {
|
|
@@ -22206,11 +22286,13 @@ async function workflowRunCommand(options) {
|
|
|
22206
22286
|
return;
|
|
22207
22287
|
}
|
|
22208
22288
|
if (effectiveMode === "full" && payload.session_bootstrap) {
|
|
22209
|
-
|
|
22210
|
-
|
|
22211
|
-
|
|
22212
|
-
|
|
22213
|
-
|
|
22289
|
+
const printedBootstrap = printSessionBootstrap(
|
|
22290
|
+
payload.session_bootstrap,
|
|
22291
|
+
{
|
|
22292
|
+
includeSessionContext: Boolean(workflowBudget?.include_session_context)
|
|
22293
|
+
}
|
|
22294
|
+
);
|
|
22295
|
+
if (printedBootstrap && payload.session_bootstrap_quality && typeof payload.session_bootstrap_quality === "object") {
|
|
22214
22296
|
printSessionBootstrapQuality(
|
|
22215
22297
|
payload.session_bootstrap_quality
|
|
22216
22298
|
);
|
|
@@ -22256,8 +22338,8 @@ async function workflowRunCommand(options) {
|
|
|
22256
22338
|
printManagedWorkflowStarted(payload.managed_workflow);
|
|
22257
22339
|
}
|
|
22258
22340
|
if (options.runtimeHint !== false) {
|
|
22259
|
-
printRuntimeHint(options.query,
|
|
22260
|
-
printOrchestratorHandoffHint(options.query,
|
|
22341
|
+
printRuntimeHint(options.query, effectiveMode);
|
|
22342
|
+
printOrchestratorHandoffHint(options.query, effectiveMode, orchestratorRecommendation);
|
|
22261
22343
|
}
|
|
22262
22344
|
if (adaptiveRouting) {
|
|
22263
22345
|
printAdaptiveRoutingRecommendation(adaptiveRouting);
|
|
@@ -23156,10 +23238,12 @@ async function workflowResumeCommand(options) {
|
|
|
23156
23238
|
}
|
|
23157
23239
|
console.log(import_chalk6.default.bold("Workflow Resume"));
|
|
23158
23240
|
printManagedWorkflowState(state);
|
|
23159
|
-
printSessionBootstrap(bootstrap, {
|
|
23241
|
+
const printedBootstrap = printSessionBootstrap(bootstrap, {
|
|
23160
23242
|
includeSessionContext: resolvedContextTokens > 0
|
|
23161
23243
|
});
|
|
23162
|
-
|
|
23244
|
+
if (printedBootstrap) {
|
|
23245
|
+
printSessionBootstrapQuality(bootstrapQuality);
|
|
23246
|
+
}
|
|
23163
23247
|
printWorkflowLocalSessionSnapshot(localSessionSnapshot);
|
|
23164
23248
|
printWorkflowTeamSyncResume(teamSyncResume);
|
|
23165
23249
|
printWorkflowRuntimeResumePlan(runtimeResume);
|
|
@@ -23681,11 +23765,13 @@ async function sessionBootstrapCommand(options) {
|
|
|
23681
23765
|
});
|
|
23682
23766
|
return;
|
|
23683
23767
|
}
|
|
23684
|
-
printSessionBootstrap(result, {
|
|
23768
|
+
const printedBootstrap = printSessionBootstrap(result, {
|
|
23685
23769
|
includeSessionContext: resolvedContextTokens > 0
|
|
23686
23770
|
});
|
|
23687
|
-
|
|
23688
|
-
|
|
23771
|
+
if (printedBootstrap) {
|
|
23772
|
+
printSessionBootstrapQuality(bootstrapQuality);
|
|
23773
|
+
}
|
|
23774
|
+
if (printedBootstrap && warmSnapshot.storedEntries > 0) {
|
|
23689
23775
|
printKeyValue2(
|
|
23690
23776
|
"Warm cache:",
|
|
23691
23777
|
`${warmSnapshot.storedEntries} bootstrap memory/context entries primed locally`
|
|
@@ -30045,7 +30131,8 @@ async function collaborationStartCommand(options) {
|
|
|
30045
30131
|
state,
|
|
30046
30132
|
hosted
|
|
30047
30133
|
},
|
|
30048
|
-
options.json
|
|
30134
|
+
options.json,
|
|
30135
|
+
options.verbose
|
|
30049
30136
|
);
|
|
30050
30137
|
}
|
|
30051
30138
|
async function collaborationClaimCommand(options) {
|
|
@@ -30087,7 +30174,8 @@ async function collaborationClaimCommand(options) {
|
|
|
30087
30174
|
state,
|
|
30088
30175
|
hosted
|
|
30089
30176
|
},
|
|
30090
|
-
options.json
|
|
30177
|
+
options.json,
|
|
30178
|
+
options.verbose
|
|
30091
30179
|
);
|
|
30092
30180
|
}
|
|
30093
30181
|
async function collaborationGuardCommand(options) {
|
|
@@ -30145,7 +30233,8 @@ async function collaborationGuardCommand(options) {
|
|
|
30145
30233
|
failed: guardFailed
|
|
30146
30234
|
}
|
|
30147
30235
|
},
|
|
30148
|
-
options.json
|
|
30236
|
+
options.json,
|
|
30237
|
+
options.verbose
|
|
30149
30238
|
);
|
|
30150
30239
|
}
|
|
30151
30240
|
function buildCollaborationHooksInstallPlan(options = {}) {
|
|
@@ -30960,7 +31049,7 @@ function resolveReleaseLeaseIds(state, options) {
|
|
|
30960
31049
|
}
|
|
30961
31050
|
throw new Error("No collaboration lease id provided and no active local lease was found");
|
|
30962
31051
|
}
|
|
30963
|
-
function printCollaborationResult(payload, json) {
|
|
31052
|
+
function printCollaborationResult(payload, json, verbose) {
|
|
30964
31053
|
if (json) {
|
|
30965
31054
|
console.log(JSON.stringify(payload, null, 2));
|
|
30966
31055
|
return;
|
|
@@ -30968,6 +31057,10 @@ function printCollaborationResult(payload, json) {
|
|
|
30968
31057
|
const action = String(payload.action ?? "status");
|
|
30969
31058
|
const state = payload.state;
|
|
30970
31059
|
const hosted = payload.hosted;
|
|
31060
|
+
if (!verbose && action === "guard" && isQuietCollaborationGuardSuccess(payload, hosted)) {
|
|
31061
|
+
console.log("Collaboration guard: go");
|
|
31062
|
+
return;
|
|
31063
|
+
}
|
|
30971
31064
|
console.log(getCollaborationHeading(action));
|
|
30972
31065
|
console.log(`State: ${payload.statePath}`);
|
|
30973
31066
|
console.log(`Work session: ${state.workSessionId ?? "none"}`);
|
|
@@ -30995,6 +31088,17 @@ function printCollaborationResult(payload, json) {
|
|
|
30995
31088
|
printGuardActionCards(payload.actionCards);
|
|
30996
31089
|
}
|
|
30997
31090
|
}
|
|
31091
|
+
function isQuietCollaborationGuardSuccess(payload, hosted) {
|
|
31092
|
+
const guard = hosted?.status === "ok" ? hosted.data : void 0;
|
|
31093
|
+
if (!guard || guard.evaluation.decision !== "CLEAR") {
|
|
31094
|
+
return false;
|
|
31095
|
+
}
|
|
31096
|
+
if (guard.evaluation.conflicts.length > 0 || guard.evaluation.recommendedActions.length > 0) {
|
|
31097
|
+
return false;
|
|
31098
|
+
}
|
|
31099
|
+
const actionCards = payload.actionCards;
|
|
31100
|
+
return !actionCards || actionCards.length === 0;
|
|
31101
|
+
}
|
|
30998
31102
|
function printHostedCollaboration(action, data) {
|
|
30999
31103
|
if (!data) {
|
|
31000
31104
|
return;
|
|
@@ -32060,7 +32164,7 @@ program.command("memory-guard").description(
|
|
|
32060
32164
|
new import_commander.Command("check").description("Check whether memory/context guidance is required before continuing").option("--trigger <trigger>", "failure|pre-commit|commit|pre-final|manual", "manual").option("--file <file>", "Touched file").option("--files <files...>", "Touched files").option("--staged", "Use git staged files").option("--command <command>", "Command or action that failed").option("--intent <intent>", "Proposed user intent or action to check before mutating").option("--result <result>", "Command result preview").option("--exit-code <code>", "Command exit code").option("--status <status>", "Command status").option("--destructive", "Treat the proposed action as destructive or irreversible").option("--require-confirmation", "Require explicit user confirmation before continuing").option(
|
|
32061
32165
|
"--confirmed-by-user <confirmation>",
|
|
32062
32166
|
"Explicit user confirmation text that permits a strict destructive/contradictory override"
|
|
32063
|
-
).option("--strict", "Exit non-zero if guidance is required but unavailable").option("--category <categories...>", "Additional memory categories to recall").option("--no-context", "Skip source context query").option("--no-recent-failures", "Skip recent Companion event failure inspection").option("--json", "Print raw JSON").action(async (options) => {
|
|
32167
|
+
).option("--strict", "Exit non-zero if guidance is required but unavailable").option("--category <categories...>", "Additional memory categories to recall").option("--no-context", "Skip source context query").option("--no-recent-failures", "Skip recent Companion event failure inspection").option("--json", "Print raw JSON").option("--verbose", "Print full non-blocking guard details instead of one-line success").action(async (options) => {
|
|
32064
32168
|
await memoryGuardCheckCommand({
|
|
32065
32169
|
trigger: options.trigger,
|
|
32066
32170
|
files: [
|
|
@@ -32080,7 +32184,8 @@ program.command("memory-guard").description(
|
|
|
32080
32184
|
categories: options.category,
|
|
32081
32185
|
includeContext: options.context,
|
|
32082
32186
|
recentFailures: options.recentFailures,
|
|
32083
|
-
json: options.json
|
|
32187
|
+
json: options.json,
|
|
32188
|
+
verbose: options.verbose
|
|
32084
32189
|
});
|
|
32085
32190
|
})
|
|
32086
32191
|
).addCommand(
|
|
@@ -32988,7 +33093,7 @@ collaboration.command("guard").description("Check files or resources against act
|
|
|
32988
33093
|
).option("-a, --action <action>", "Guarded action label", "edit").option("--actor <actor>", "Developer or agent display name").option("--actor-id <actorId>", "Stable developer or agent id").option("--actor-type <actorType>", "HUMAN|AGENT|SYSTEM", "AGENT").option("--session-id <sessionId>", "Automation/session id").option("--work-session-id <workSessionId>", "Existing hosted work session id").option("--client <client>", "Client label", "snipara-companion").option("--repository <repository>", "Repository id").option("-b, --branch <branch>", "Current branch name").option("--worktree <worktree>", "Worktree path").option("--max-files <number>", "Maximum files for local code resource expansion", "2000").option("--no-persist", "Evaluate without storing a guard event").option("--enforce", "Exit non-zero for REVIEW_REQUIRED or REQUIRES_ACK, not only BLOCKED").option(
|
|
32989
33094
|
"--ack-review-only",
|
|
32990
33095
|
"Under --enforce, acknowledge review-only stale-state and decision-consistency warnings"
|
|
32991
|
-
).option("-d, --dir <directory>", "Repository directory (default: current)").option("--json", "Print raw JSON").action(async (options) => {
|
|
33096
|
+
).option("-d, --dir <directory>", "Repository directory (default: current)").option("--json", "Print raw JSON").option("--verbose", "Print the full guard report even when the guard passes").action(async (options) => {
|
|
32992
33097
|
await collaborationGuardCommand({
|
|
32993
33098
|
files: options.files,
|
|
32994
33099
|
resources: options.resource,
|
|
@@ -33008,7 +33113,8 @@ collaboration.command("guard").description("Check files or resources against act
|
|
|
33008
33113
|
enforce: Boolean(options.enforce),
|
|
33009
33114
|
ackReviewOnly: Boolean(options.ackReviewOnly),
|
|
33010
33115
|
dir: options.dir,
|
|
33011
|
-
json: options.json
|
|
33116
|
+
json: options.json,
|
|
33117
|
+
verbose: Boolean(options.verbose || process.argv.includes("--verbose"))
|
|
33012
33118
|
});
|
|
33013
33119
|
});
|
|
33014
33120
|
collaboration.command("hooks").description("Install blocking Git hooks that run the hosted collaboration guard").addCommand(
|
|
@@ -33766,6 +33872,7 @@ if (require.main === module) {
|
|
|
33766
33872
|
realityCheckCommand,
|
|
33767
33873
|
referencesIngestCommand,
|
|
33768
33874
|
referencesScanCommand,
|
|
33875
|
+
resolveAutoWorkflowMode,
|
|
33769
33876
|
resolveContextPackRecord,
|
|
33770
33877
|
resolveFullWorkflowTokenBudget,
|
|
33771
33878
|
resolveLocalWorkerRoutingDefaults,
|
package/docs/FULL_REFERENCE.md
CHANGED
|
@@ -930,7 +930,9 @@ without an extra LLM provider key because your AI client supplies the reasoning;
|
|
|
930
930
|
runtime-bound phases it also restores the recorded Sandbox binding and prints a reattach or
|
|
931
931
|
rehydrate plan. It does not snapshot or exactly restore a live Snipara Sandbox or REPL process.
|
|
932
932
|
Short-lived session context is skipped unless you pass `--include-session-context`
|
|
933
|
-
or an explicit `--max-context-tokens
|
|
933
|
+
or an explicit `--max-context-tokens`. Text output is a compact bootstrap brief
|
|
934
|
+
and is silent when no high-signal item is available; use `--json` for the full
|
|
935
|
+
payload.
|
|
934
936
|
`workflow run --mode full --json` also reports `workflow_budget`,
|
|
935
937
|
`session_bootstrap_quality`, and `plan_quality.warnings` so agents can detect
|
|
936
938
|
oversized bootstrap context or weak generated-plan file hints before editing.
|
|
@@ -1121,16 +1123,16 @@ snipara-companion workflow scaffold \
|
|
|
1121
1123
|
### Context vs Memory
|
|
1122
1124
|
|
|
1123
1125
|
- Use `snipara-companion query`, `shared-context`, and `load-document` for source truth.
|
|
1124
|
-
- Use `snipara-companion recall`, `session-bootstrap`, and `task-commit` for durable memory.
|
|
1126
|
+
- Use `snipara-companion recall`, `session-bootstrap`, and `task-commit` for durable memory when the task needs it.
|
|
1125
1127
|
- Do not use memory as a substitute for document retrieval.
|
|
1126
1128
|
- Do not upload specs or raw documents into memory.
|
|
1127
1129
|
|
|
1128
1130
|
Semantics:
|
|
1129
1131
|
|
|
1130
1132
|
- `snipara-companion query --follow-recommendation` = execute the hosted recommended structural tool instead of only printing it
|
|
1131
|
-
- `snipara-companion workflow run --mode lite` =
|
|
1133
|
+
- `snipara-companion workflow run --mode lite` = zero mandatory hosted calls for small known-file work
|
|
1132
1134
|
- `snipara-companion workflow run --mode standard` = context query plus automatic `snipara_code_*` follow-up when Snipara recommends one
|
|
1133
|
-
- `snipara-companion workflow run --mode auto` =
|
|
1135
|
+
- `snipara-companion workflow run --mode auto` = routes to lite, standard, full, or orchestrate from task intent
|
|
1134
1136
|
- `snipara-companion workflow run --mode full` = budgeted durable bootstrap + optional session context + context query + automatic structural follow-up + hosted plan with quality diagnostics
|
|
1135
1137
|
- `snipara-companion plan --write-plan-file ./plan.json` = convert hosted `snipara_plan` output into managed workflow JSON
|
|
1136
1138
|
- `snipara-companion plan --start-workflow` or `workflow run --mode full --start-workflow-from-plan` = create local `.snipara/workflow/current.json` from a valid generated plan
|
|
@@ -1193,13 +1195,15 @@ Semantics:
|
|
|
1193
1195
|
- `snipara-companion reindex` = trigger or poll hosted `snipara_reindex`; use after uploads when immediate chunk availability matters
|
|
1194
1196
|
- `snipara-companion code *` = direct access to the code graph tools without routing through `snipara_context_query`
|
|
1195
1197
|
- `snipara-companion recall` = direct durable memory lookup for decisions, learnings, preferences, and carryover
|
|
1196
|
-
- `snipara-companion session-bootstrap` = durable memory first, optional weak session carryover second
|
|
1198
|
+
- `snipara-companion session-bootstrap` = pushed compact brief of durable memory first, optional weak session carryover second; empty brief is silent in text mode
|
|
1197
1199
|
- `snipara-companion task-commit` = durable task/phase/workflow outcomes only, not a mechanical mirror of every Git commit
|
|
1198
|
-
- `snipara-companion memory-guard check` =
|
|
1200
|
+
- `snipara-companion memory-guard check` = deterministic guard recall/context before retries, commits, or finalization when a command failed or a publishable package surface is touched
|
|
1199
1201
|
- `snipara-companion memory-guard check --intent "<action>" --destructive --strict` = contradiction check before irreversible actions; blocks until the user explicitly confirms when memory/context disagrees or the action is destructive
|
|
1200
1202
|
- `snipara-companion memory-guard remember --guard-tag pre-commit --text "..."` = create a project/team memory in a guard category such as `pre-commit`, `commit`, `failure`, `pre-final`, or `workflow-policy`
|
|
1201
1203
|
- `--max-daily-tokens` is still accepted as a compatibility alias for `--max-context-tokens`
|
|
1202
1204
|
|
|
1205
|
+
Use Outcome Loop data to calibrate these defaults: for small tasks, compare whether entry recall/context actually preceded retained commits before promoting a nudge into a gate.
|
|
1206
|
+
|
|
1203
1207
|
### Memory Guard Before Commit Or Destructive Actions
|
|
1204
1208
|
|
|
1205
1209
|
Memory Guard is deterministic, not a user preference. It detects two global signals:
|