@wrongstack/core 0.277.1 → 0.280.0
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/dist/{agent-bridge-BFJ2ODzI.d.ts → agent-bridge-DXC6QDJ4.d.ts} +1 -1
- package/dist/{agent-subagent-runner-BimKihiC.d.ts → agent-subagent-runner-PoqNKiR4.d.ts} +563 -471
- package/dist/{compactor-D3BGw26y.d.ts → compactor-U3agvUIG.d.ts} +1 -1
- package/dist/{config-DAOjriz9.d.ts → config-Cr3312zc.d.ts} +102 -4
- package/dist/coordination/index.d.ts +1087 -998
- package/dist/coordination/index.js +12235 -12052
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +31 -30
- package/dist/defaults/index.js +403 -189
- package/dist/defaults/index.js.map +1 -1
- package/dist/{brain-CCfuEOdp.d.ts → events-Bs2fmldo.d.ts} +117 -112
- package/dist/execution/index.d.ts +27 -19
- package/dist/execution/index.js +216 -63
- package/dist/execution/index.js.map +1 -1
- package/dist/execution/prompt-enhancer.d.ts +1 -1
- package/dist/execution/prompt-enhancer.js.map +1 -1
- package/dist/extension/index.d.ts +8 -7
- package/dist/{global-mailbox-Dr4cTKqL.d.ts → global-mailbox-Ct7IorLJ.d.ts} +84 -6
- package/dist/{goal-store-C1uH4srH.d.ts → goal-store-C4F6DjC0.d.ts} +1 -1
- package/dist/hq/index.d.ts +504 -7
- package/dist/hq/index.js +1069 -20
- package/dist/hq/index.js.map +1 -1
- package/dist/{index-DJXj-dcr.d.ts → index-kidebiDh.d.ts} +8 -5
- package/dist/{index-cMEmzCVN.d.ts → index-nP09-oP2.d.ts} +2 -2
- package/dist/index.d.ts +153 -76
- package/dist/index.js +5791 -3163
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +7 -6
- package/dist/kernel/index.d.ts +14 -13
- package/dist/kernel/index.js +31 -15
- package/dist/kernel/index.js.map +1 -1
- package/dist/{mailbox-types-DTl7bRH3.d.ts → mailbox-types-BGZWrYTJ.d.ts} +38 -0
- package/dist/{mcp-servers-CFb60-pH.d.ts → mcp-servers-D910X5_r.d.ts} +3 -3
- package/dist/models/index.d.ts +5 -5
- package/dist/models/index.js.map +1 -1
- package/dist/{models-registry-5Ufn7f2m.d.ts → models-registry-CLkoOcHk.d.ts} +1 -1
- package/dist/{multi-agent-coordinator-CcrcncvG.d.ts → multi-agent-coordinator-CieyUoEL.d.ts} +1 -1
- package/dist/{null-fleet-bus-C9KsYyrI.d.ts → null-fleet-bus-DkdmZJ_W.d.ts} +464 -464
- package/dist/observability/index.d.ts +3 -2
- package/dist/{path-resolver-CEeX9I7O.d.ts → path-resolver-XfZ9eLxG.d.ts} +3 -3
- package/dist/{permission-DbsGOA1C.d.ts → permission-Dx6dIqS2.d.ts} +2 -7
- package/dist/{permission-policy-BpEea3r7.d.ts → permission-policy-C8vJcnX5.d.ts} +2 -2
- package/dist/{pipeline-CEjBjzVA.d.ts → pipeline-BwAP21_4.d.ts} +9 -4
- package/dist/{provider-model-resolve-BpfXp3Jj.d.ts → provider-model-resolve-CwQNZWt_.d.ts} +3 -3
- package/dist/{provider-runner-CnOSr5BN.d.ts → provider-runner-CYHFImzV.d.ts} +3 -3
- package/dist/{retry-policy-Git9WF6d.d.ts → retry-policy-D4feSLk3.d.ts} +1 -1
- package/dist/sdd/index.d.ts +11 -10
- package/dist/sdd/index.js +2 -2
- package/dist/sdd/index.js.map +1 -1
- package/dist/secret-scrubber-3MHDDAtm.d.ts +6 -0
- package/dist/{secret-vault-DDSMHqIm.d.ts → secret-vault-CImt2XrR.d.ts} +1 -1
- package/dist/security/index.d.ts +6 -5
- package/dist/security/index.js.map +1 -1
- package/dist/{selector-Cq72C0Oy.d.ts → selector-Dy-MzKp1.d.ts} +1 -1
- package/dist/{session-event-bridge-DG94B3Bk.d.ts → session-event-bridge-CqdiGnfU.d.ts} +1 -1
- package/dist/{session-reader-BzT-iMQT.d.ts → session-reader-Hk0WbNm9.d.ts} +1 -1
- package/dist/{skill-DGIXCtdv.d.ts → skill-DHniprNl.d.ts} +15 -1
- package/dist/skills/index.d.ts +472 -26
- package/dist/skills/index.js +872 -129
- package/dist/skills/index.js.map +1 -1
- package/dist/storage/index.d.ts +27 -14
- package/dist/storage/index.js +264 -85
- package/dist/storage/index.js.map +1 -1
- package/dist/{strategy-compactor-Bt_ZH6R0.d.ts → strategy-compactor-CQwhbErd.d.ts} +32 -17
- package/dist/{todos-checkpoint-CH1pcua9.d.ts → todos-checkpoint-Bk2uP7Ex.d.ts} +6 -6
- package/dist/{context-DPlA6kid.d.ts → tool-BkOgs_KL.d.ts} +306 -286
- package/dist/{tool-executor-SVFq7IOR.d.ts → tool-executor-SiE1wlZo.d.ts} +9 -9
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/types/index.d.ts +22 -21
- package/dist/types/index.js +7 -9
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +30 -4
- package/dist/utils/index.js +50 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/{worktree-manager-C4YIf1Fa.d.ts → worktree-manager-BjOFF6bt.d.ts} +1 -1
- package/dist/{wstack-paths-_NrRovdr.d.ts → wstack-paths-CMl_cYgq.d.ts} +8 -0
- package/package.json +1 -1
- package/skills/mailbox-bridge/SKILL.md +1 -0
- package/skills/plugin-author/SKILL.md +350 -0
- package/skills/sdd/SKILL.md +134 -134
- package/skills/skill-creator/SKILL.md +45 -7
- package/skills/wrongstack-mailbox/SKILL.md +40 -21
package/dist/storage/index.d.ts
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { M as MemoryBackend, j as FileMemoryBackendOptions } from '../todos-checkpoint-
|
|
2
|
-
export { A as AbandonedSession, a as AttachmentStoreOptions, C as ConfigLoaderOptions, b as ConfigMigration, c as ConfigMigrationError, d as ConfigSource, D as DEFAULT_CONFIG_MIGRATIONS, e as DefaultAttachmentStore, f as DefaultConfigLoader, g as DefaultConfigStore, h as DefaultMemoryStore, i as DefaultSessionStore, F as FileMemoryBackend, k as MemoryStoreOptions, l as MigrationContext, m as MigrationResult, P as PersistedQueueItem, n as PlanFile, o as PlanItem, p as PlanTemplate, Q as QueueStore, R as RecoveryLock, q as RecoveryLockOptions, S as SessionAnalyzer, r as SessionStoreOptions, T as TodosCheckpointFile, s as addPlanItem, t as attachPlanCheckpoint, u as attachTodosCheckpoint, v as clearPlan, w as deriveTodosFromPlanItem, x as emptyPlan, y as formatPlan, z as formatPlanTemplates, B as getPlanTemplate, E as listPlanTemplates, G as loadPlan, H as loadTodosCheckpoint, I as mutatePlan, J as parseEntries, K as removePlanItem, L as runConfigMigrations, N as savePlan, O as saveTodosCheckpoint, U as setPlanItemStatus } from '../todos-checkpoint-
|
|
3
|
-
import { M as MemoryScope, b as MemoryEntry, c as MemoryStore, E as EventBus } from '../
|
|
4
|
-
import { i as AgentExtension, k as AfterRunHook } from '../index-
|
|
5
|
-
import { P as Provider, c as Request, d as Response, S as SessionEvent } from '../
|
|
6
|
-
import { P as ProviderConfig,
|
|
1
|
+
import { M as MemoryBackend, j as FileMemoryBackendOptions } from '../todos-checkpoint-Bk2uP7Ex.js';
|
|
2
|
+
export { A as AbandonedSession, a as AttachmentStoreOptions, C as ConfigLoaderOptions, b as ConfigMigration, c as ConfigMigrationError, d as ConfigSource, D as DEFAULT_CONFIG_MIGRATIONS, e as DefaultAttachmentStore, f as DefaultConfigLoader, g as DefaultConfigStore, h as DefaultMemoryStore, i as DefaultSessionStore, F as FileMemoryBackend, k as MemoryStoreOptions, l as MigrationContext, m as MigrationResult, P as PersistedQueueItem, n as PlanFile, o as PlanItem, p as PlanTemplate, Q as QueueStore, R as RecoveryLock, q as RecoveryLockOptions, S as SessionAnalyzer, r as SessionStoreOptions, T as TodosCheckpointFile, s as addPlanItem, t as attachPlanCheckpoint, u as attachTodosCheckpoint, v as clearPlan, w as deriveTodosFromPlanItem, x as emptyPlan, y as formatPlan, z as formatPlanTemplates, B as getPlanTemplate, E as listPlanTemplates, G as loadPlan, H as loadTodosCheckpoint, I as mutatePlan, J as parseEntries, K as removePlanItem, L as runConfigMigrations, N as savePlan, O as saveTodosCheckpoint, U as setPlanItemStatus } from '../todos-checkpoint-Bk2uP7Ex.js';
|
|
3
|
+
import { M as MemoryScope, b as MemoryEntry, c as MemoryStore, E as EventBus } from '../events-Bs2fmldo.js';
|
|
4
|
+
import { i as AgentExtension, k as AfterRunHook } from '../index-kidebiDh.js';
|
|
5
|
+
import { P as Provider, c as Request, d as Response, S as SessionEvent, D as CompletedWorkEvidence } from '../tool-BkOgs_KL.js';
|
|
6
|
+
import { P as ProviderConfig, $ as SyncCategory, l as SyncConfig } from '../config-Cr3312zc.js';
|
|
7
7
|
import { S as SecretVault } from '../secret-vault-BAKpgFw_.js';
|
|
8
|
-
export { D as DefaultSessionReader, f as DefaultSessionReaderOptions, S as SessionReader } from '../session-reader-
|
|
8
|
+
export { D as DefaultSessionReader, f as DefaultSessionReaderOptions, S as SessionReader } from '../session-reader-Hk0WbNm9.js';
|
|
9
9
|
import { S as SessionRewinder, C as CheckpointInfo, a as RewindResultExtended } from '../session-rewinder-C9HnMkhP.js';
|
|
10
10
|
import { T as TaskItem } from '../task-format-vGOIftmK.js';
|
|
11
11
|
export { a as DirectorStateCheckpoint, D as DirectorStateSnapshot, b as DirectorSubagentState, c as DirectorTaskState, l as loadDirectorState } from '../director-state-BfeCUbmk.js';
|
|
12
|
-
export { G as GoalFile, J as JournalEntry, M as MAX_JOURNAL_ENTRIES, a as MAX_PROGRESS_HISTORY, P as ProgressSnapshot, b as appendJournal, e as emptyGoal, f as formatGoal, g as goalFilePath, l as loadGoal, p as parseProgressFromText, r as recordProgress, s as saveGoal, c as setProgress, d as summarizeUsage } from '../goal-store-
|
|
12
|
+
export { G as GoalFile, J as JournalEntry, M as MAX_JOURNAL_ENTRIES, a as MAX_PROGRESS_HISTORY, P as ProgressSnapshot, b as appendJournal, e as emptyGoal, f as formatGoal, g as goalFilePath, l as loadGoal, p as parseProgressFromText, r as recordProgress, s as saveGoal, c as setProgress, d as summarizeUsage } from '../goal-store-C4F6DjC0.js';
|
|
13
13
|
import { a as PromptEntry } from '../prompt-DLd35n4Q.js';
|
|
14
|
-
import { W as WstackPaths } from '../wstack-paths-
|
|
15
|
-
export { A as AuditLevel, C as CORE_RECONSTRUCT_EVENTS, a as STANDARD_AUDIT_EVENTS, S as SessionEventBridge, b as SessionEventBridgeOptions, c as SessionSamplingOptions, T as ToolProgressSamplingOptions, d as createSessionEventBridge, r as resolveAuditLevel, e as resolveSessionLoggingConfig } from '../session-event-bridge-
|
|
16
|
-
import '../
|
|
14
|
+
import { W as WstackPaths } from '../wstack-paths-CMl_cYgq.js';
|
|
15
|
+
export { A as AuditLevel, C as CORE_RECONSTRUCT_EVENTS, a as STANDARD_AUDIT_EVENTS, S as SessionEventBridge, b as SessionEventBridgeOptions, c as SessionSamplingOptions, T as ToolProgressSamplingOptions, d as createSessionEventBridge, r as resolveAuditLevel, e as resolveSessionLoggingConfig } from '../session-event-bridge-CqdiGnfU.js';
|
|
16
|
+
import '../secret-scrubber-3MHDDAtm.js';
|
|
17
|
+
import '../permission-Dx6dIqS2.js';
|
|
17
18
|
import '../logger-B63L5bTg.js';
|
|
18
|
-
import '../pipeline-
|
|
19
|
-
import '../mailbox-types-
|
|
19
|
+
import '../pipeline-BwAP21_4.js';
|
|
20
|
+
import '../mailbox-types-BGZWrYTJ.js';
|
|
20
21
|
import '../observability-D-HZN_mF.js';
|
|
21
22
|
import '../task-graph-u1q9Jkyk.js';
|
|
22
23
|
|
|
@@ -208,6 +209,9 @@ interface ProviderConfigSnapshot {
|
|
|
208
209
|
providers: Record<string, ProviderConfig>;
|
|
209
210
|
apiKey?: string;
|
|
210
211
|
baseUrl?: string;
|
|
212
|
+
/** Display language (Config.uiLocale), surfaced so a cross-process change
|
|
213
|
+
* (e.g. the desktop shell) propagates to running webui instances. */
|
|
214
|
+
uiLocale?: string;
|
|
211
215
|
}
|
|
212
216
|
interface WatchProviderConfigOptions {
|
|
213
217
|
/** Surface non-fatal read/parse/decrypt issues. */
|
|
@@ -912,6 +916,15 @@ declare class DefaultSessionRewinder implements SessionRewinder {
|
|
|
912
916
|
rewindToStart(sessionId: string): Promise<RewindResultExtended>;
|
|
913
917
|
}
|
|
914
918
|
|
|
919
|
+
interface CompletedWorkCheckpointFile {
|
|
920
|
+
version: 1;
|
|
921
|
+
sessionId: string;
|
|
922
|
+
updatedAt: string;
|
|
923
|
+
completedWork: CompletedWorkEvidence[];
|
|
924
|
+
}
|
|
925
|
+
declare function loadCompletedWorkCheckpoint(filePath: string, events?: EventBus, traceId?: string): Promise<CompletedWorkEvidence[] | null>;
|
|
926
|
+
declare function saveCompletedWorkCheckpoint(filePath: string, sessionId: string, completedWork: readonly CompletedWorkEvidence[], events?: EventBus, traceId?: string): Promise<void>;
|
|
927
|
+
|
|
915
928
|
interface TaskFile {
|
|
916
929
|
version: 1;
|
|
917
930
|
sessionId: string;
|
|
@@ -1048,4 +1061,4 @@ declare class CloudSync {
|
|
|
1048
1061
|
private walkDir;
|
|
1049
1062
|
}
|
|
1050
1063
|
|
|
1051
|
-
export { ALL_SYNC_CATEGORIES, type AgentEntry, type AgentLiveStatus, AgentStatusTracker, type AgentStatusTrackerOptions, type Annotation, AnnotationsStore, type AnnotationsStoreOptions, type AuditEntry, CloudSync, type ConsolidationOp, DefaultPromptStore, DefaultSessionRewinder, FileMemoryBackendOptions, FleetNotifier, type FleetNotifierOptions, GraphMemoryBackend, type GraphMemoryBackendOptions, MemoryBackend, type MemoryConsolidatorOptions, PromptEntry, type PromptStore, type PromptUsage, PromptUsageStore, type ProviderConfigSnapshot, type RecoveryPlan, type ReplayEntry, ReplayLogStore, type ReplayLogStoreOptions, type SessionLiveStatus, SessionMemoryConsolidator, SessionRecovery, SessionRegistry, type SessionRegistryEntry, type SessionRewinderOptions, type StaleSession, SyncCategory, SyncConfig, type SyncResult, type TaskFile, ToolAuditLog, type ToolAuditLogOptions, type VerifyResult, type WatchProviderConfigOptions, emptyTaskFile, generateSessionId, getSessionRegistry, hasSessionRegistry, loadTasks, migratePromptEntry, mutateTasks, promptChecksum, sanitizeModel, saveTasks, watchProviderConfig };
|
|
1064
|
+
export { ALL_SYNC_CATEGORIES, type AgentEntry, type AgentLiveStatus, AgentStatusTracker, type AgentStatusTrackerOptions, type Annotation, AnnotationsStore, type AnnotationsStoreOptions, type AuditEntry, CloudSync, type CompletedWorkCheckpointFile, type ConsolidationOp, DefaultPromptStore, DefaultSessionRewinder, FileMemoryBackendOptions, FleetNotifier, type FleetNotifierOptions, GraphMemoryBackend, type GraphMemoryBackendOptions, MemoryBackend, type MemoryConsolidatorOptions, PromptEntry, type PromptStore, type PromptUsage, PromptUsageStore, type ProviderConfigSnapshot, type RecoveryPlan, type ReplayEntry, ReplayLogStore, type ReplayLogStoreOptions, type SessionLiveStatus, SessionMemoryConsolidator, SessionRecovery, SessionRegistry, type SessionRegistryEntry, type SessionRewinderOptions, type StaleSession, SyncCategory, SyncConfig, type SyncResult, type TaskFile, ToolAuditLog, type ToolAuditLogOptions, type VerifyResult, type WatchProviderConfigOptions, emptyTaskFile, generateSessionId, getSessionRegistry, hasSessionRegistry, loadCompletedWorkCheckpoint, loadTasks, migratePromptEntry, mutateTasks, promptChecksum, sanitizeModel, saveCompletedWorkCheckpoint, saveTasks, watchProviderConfig };
|
package/dist/storage/index.js
CHANGED
|
@@ -331,16 +331,20 @@ function wstackGlobalRoot() {
|
|
|
331
331
|
}
|
|
332
332
|
function resolveWstackPaths(opts) {
|
|
333
333
|
const globalRoot = opts.globalRoot ?? (opts.userHome ? path2.join(opts.userHome, ".wrongstack") : wstackGlobalRoot());
|
|
334
|
+
const homeDir = opts.userHome ?? os.homedir();
|
|
334
335
|
const hash = projectHash(opts.projectRoot);
|
|
335
336
|
const slug = projectSlug(opts.projectRoot);
|
|
336
337
|
const projectDir = path2.join(globalRoot, "projects", slug);
|
|
337
338
|
return {
|
|
338
339
|
globalRoot,
|
|
340
|
+
projectRoot: opts.projectRoot,
|
|
341
|
+
homeDir,
|
|
339
342
|
configDir: globalRoot,
|
|
340
343
|
globalConfig: path2.join(globalRoot, "config.json"),
|
|
341
344
|
secretsKey: path2.join(globalRoot, ".key"),
|
|
342
345
|
globalMemory: path2.join(globalRoot, "memory.md"),
|
|
343
346
|
globalSkills: path2.join(globalRoot, "skills"),
|
|
347
|
+
globalClaudeSkills: path2.join(homeDir, ".claude", "skills"),
|
|
344
348
|
globalDesignKits: path2.join(globalRoot, "design-kits"),
|
|
345
349
|
globalPrompts: path2.join(globalRoot, "prompts"),
|
|
346
350
|
globalInstructions: path2.join(globalRoot, "instructions"),
|
|
@@ -360,6 +364,7 @@ function resolveWstackPaths(opts) {
|
|
|
360
364
|
inProjectConfig: path2.join(opts.projectRoot, ".wrongstack", "config.json"),
|
|
361
365
|
inProjectAgentsFile: path2.join(opts.projectRoot, ".wrongstack", "AGENTS.md"),
|
|
362
366
|
inProjectSkills: path2.join(opts.projectRoot, ".wrongstack", "skills"),
|
|
367
|
+
inProjectClaudeSkills: path2.join(opts.projectRoot, ".claude", "skills"),
|
|
363
368
|
inProjectPrompts: path2.join(opts.projectRoot, ".wrongstack", "prompts"),
|
|
364
369
|
inProjectInstructions: path2.join(opts.projectRoot, ".wrongstack", "instructions"),
|
|
365
370
|
inProjectDesignKits: path2.join(opts.projectRoot, ".wrongstack", "design-kits"),
|
|
@@ -3944,7 +3949,7 @@ function readBundledInstructionText(relativePath) {
|
|
|
3944
3949
|
function renderInstructionTemplate(template, values) {
|
|
3945
3950
|
return template.replace(
|
|
3946
3951
|
/\{\{\s*([a-zA-Z0-9_.-]+)\s*\}\}/g,
|
|
3947
|
-
(match, key) => Object.
|
|
3952
|
+
(match, key) => Object.hasOwn(values, key) ? values[key] ?? "" : match
|
|
3948
3953
|
);
|
|
3949
3954
|
}
|
|
3950
3955
|
function instructionRootCandidates() {
|
|
@@ -4218,13 +4223,16 @@ async function readProviderSnapshot(configPath, vault, warn) {
|
|
|
4218
4223
|
};
|
|
4219
4224
|
if (typeof decrypted.apiKey === "string") snapshot.apiKey = decrypted.apiKey;
|
|
4220
4225
|
if (typeof decrypted.baseUrl === "string") snapshot.baseUrl = decrypted.baseUrl;
|
|
4226
|
+
if (typeof decrypted.uiLocale === "string" && decrypted.uiLocale)
|
|
4227
|
+
snapshot.uiLocale = decrypted.uiLocale;
|
|
4221
4228
|
return snapshot;
|
|
4222
4229
|
}
|
|
4223
4230
|
function serializeSnapshot(s) {
|
|
4224
4231
|
return JSON.stringify({
|
|
4225
4232
|
providers: s.providers,
|
|
4226
4233
|
apiKey: s.apiKey ?? null,
|
|
4227
|
-
baseUrl: s.baseUrl ?? null
|
|
4234
|
+
baseUrl: s.baseUrl ?? null,
|
|
4235
|
+
uiLocale: s.uiLocale ?? null
|
|
4228
4236
|
});
|
|
4229
4237
|
}
|
|
4230
4238
|
function watchProviderConfig(configPath, vault, onChange, opts = {}) {
|
|
@@ -4283,6 +4291,9 @@ function watchProviderConfig(configPath, vault, onChange, opts = {}) {
|
|
|
4283
4291
|
};
|
|
4284
4292
|
}
|
|
4285
4293
|
|
|
4294
|
+
// src/types/config.ts
|
|
4295
|
+
var DEFAULT_TUI_THINKING_WORD = "thinking";
|
|
4296
|
+
|
|
4286
4297
|
// src/types/context-window.ts
|
|
4287
4298
|
var DEFAULT_CONTEXT_WINDOW_MODE_ID = "balanced";
|
|
4288
4299
|
var CONTEXT_WINDOW_MODES = Object.freeze([
|
|
@@ -4334,9 +4345,6 @@ function isContextWindowModeId(id) {
|
|
|
4334
4345
|
return CONTEXT_WINDOW_MODES.some((m) => m.id === id);
|
|
4335
4346
|
}
|
|
4336
4347
|
|
|
4337
|
-
// src/types/config.ts
|
|
4338
|
-
var DEFAULT_TUI_THINKING_WORD = "thinking";
|
|
4339
|
-
|
|
4340
4348
|
// src/types/default-config.ts
|
|
4341
4349
|
var DEFAULT_TOOLS_CONFIG = Object.freeze({
|
|
4342
4350
|
defaultExecutionStrategy: "smart",
|
|
@@ -4411,10 +4419,16 @@ var BEHAVIOR_DEFAULTS = {
|
|
|
4411
4419
|
tokenSavingMode: "off",
|
|
4412
4420
|
allowOutsideProjectRoot: true
|
|
4413
4421
|
},
|
|
4422
|
+
skills: { readClaudeSkills: true },
|
|
4414
4423
|
mcpServers: {},
|
|
4415
4424
|
fallbackAuto: true,
|
|
4416
4425
|
maxConcurrent: 4,
|
|
4417
|
-
|
|
4426
|
+
// YOLO on by default: auto-approve normal project work without a per-call
|
|
4427
|
+
// prompt. Destructive operations still gate through a confirmation. Users
|
|
4428
|
+
// who want the per-call prompts set `yolo: false`. Existing installs whose
|
|
4429
|
+
// config lacks this key pick it up via fillMissingDefaults; an explicit
|
|
4430
|
+
// `false` is preserved by the deep-merge (opt-out respected).
|
|
4431
|
+
yolo: true,
|
|
4418
4432
|
nextPrediction: false,
|
|
4419
4433
|
hints: true,
|
|
4420
4434
|
debugStream: false,
|
|
@@ -4427,12 +4441,19 @@ var BEHAVIOR_DEFAULTS = {
|
|
|
4427
4441
|
},
|
|
4428
4442
|
session: { ...DEFAULT_SESSION_LOGGING_CONFIG },
|
|
4429
4443
|
autonomy: {
|
|
4430
|
-
|
|
4444
|
+
// 'auto' by default: the agent self-drives (picks the top next-step after
|
|
4445
|
+
// each turn). This is a startup default, not a runtime flip — the
|
|
4446
|
+
// autoProceedMaxIterations cap + autoProceedDelayMs cooldown + destructive
|
|
4447
|
+
// gate + Ctrl+C / [GOAL_COMPLETE] stops remain in force. Explicit 'off'
|
|
4448
|
+
// in a config file is preserved (opt-out respected).
|
|
4449
|
+
defaultMode: "auto",
|
|
4431
4450
|
autoProceedDelayMs: DEFAULT_AUTONOMY_CONFIG.autoProceedDelayMs,
|
|
4432
4451
|
autoProceedMaxIterations: 50,
|
|
4433
4452
|
autonomyNextPrompt: "auto {{suggestion}}",
|
|
4434
4453
|
terminalTitleAnimation: true,
|
|
4435
|
-
yolo
|
|
4454
|
+
// Mirrored from the top-level yolo default so the autonomy subsystem
|
|
4455
|
+
// (which reads autonomy.yolo) stays consistent with config.yolo.
|
|
4456
|
+
yolo: true,
|
|
4436
4457
|
streamFleet: true,
|
|
4437
4458
|
chime: false,
|
|
4438
4459
|
confirmExit: true,
|
|
@@ -4468,7 +4489,7 @@ function fillMissingDefaults(target, defaults) {
|
|
|
4468
4489
|
function fillMissingDefaultsInPlace(target, defaults) {
|
|
4469
4490
|
let changed = false;
|
|
4470
4491
|
for (const [key, defaultValue] of Object.entries(defaults)) {
|
|
4471
|
-
if (!Object.
|
|
4492
|
+
if (!Object.hasOwn(target, key)) {
|
|
4472
4493
|
target[key] = cloneJsonValue(defaultValue);
|
|
4473
4494
|
changed = true;
|
|
4474
4495
|
continue;
|
|
@@ -4538,6 +4559,7 @@ var IN_PROJECT_ALLOWED_KEYS = /* @__PURE__ */ new Set([
|
|
|
4538
4559
|
"context",
|
|
4539
4560
|
"tools",
|
|
4540
4561
|
"features",
|
|
4562
|
+
"skills",
|
|
4541
4563
|
"autonomy",
|
|
4542
4564
|
"indexing",
|
|
4543
4565
|
"session",
|
|
@@ -4548,6 +4570,7 @@ var IN_PROJECT_ALLOWED_KEYS = /* @__PURE__ */ new Set([
|
|
|
4548
4570
|
"debugStream",
|
|
4549
4571
|
"configScope",
|
|
4550
4572
|
"maxConcurrent",
|
|
4573
|
+
"uiLocale",
|
|
4551
4574
|
"fallbackModels",
|
|
4552
4575
|
"fallbackProfiles",
|
|
4553
4576
|
"favoriteModels",
|
|
@@ -4580,6 +4603,7 @@ var KNOWN_CONFIG_TOP_LEVEL_KEYS = /* @__PURE__ */ new Set([
|
|
|
4580
4603
|
"apiKey",
|
|
4581
4604
|
"baseUrl",
|
|
4582
4605
|
"maxConcurrent",
|
|
4606
|
+
"uiLocale",
|
|
4583
4607
|
"providers",
|
|
4584
4608
|
"models",
|
|
4585
4609
|
"modelMatrix",
|
|
@@ -4595,6 +4619,7 @@ var KNOWN_CONFIG_TOP_LEVEL_KEYS = /* @__PURE__ */ new Set([
|
|
|
4595
4619
|
"plugins",
|
|
4596
4620
|
"log",
|
|
4597
4621
|
"features",
|
|
4622
|
+
"skills",
|
|
4598
4623
|
"yolo",
|
|
4599
4624
|
"nextPrediction",
|
|
4600
4625
|
"cwd",
|
|
@@ -4620,8 +4645,12 @@ function assertInProjectAllowListComplete() {
|
|
|
4620
4645
|
const denied = KNOWN_DENIED_IN_PROJECT.find((d) => d.key === key);
|
|
4621
4646
|
if (!denied) missingFromBoth.push(key);
|
|
4622
4647
|
}
|
|
4623
|
-
const staleDenials = KNOWN_DENIED_IN_PROJECT.filter(
|
|
4624
|
-
|
|
4648
|
+
const staleDenials = KNOWN_DENIED_IN_PROJECT.filter(
|
|
4649
|
+
(d) => !KNOWN_CONFIG_TOP_LEVEL_KEYS.has(d.key)
|
|
4650
|
+
).map((d) => d.key);
|
|
4651
|
+
const duplicate = KNOWN_DENIED_IN_PROJECT.filter((d) => IN_PROJECT_ALLOWED_KEYS.has(d.key)).map(
|
|
4652
|
+
(d) => d.key
|
|
4653
|
+
);
|
|
4625
4654
|
const problems = [];
|
|
4626
4655
|
if (missingFromBoth.length > 0) {
|
|
4627
4656
|
problems.push(
|
|
@@ -4663,14 +4692,41 @@ function stripUnsafeInProjectFields(inProject, sourcePath, warn = (msg) => conso
|
|
|
4663
4692
|
const outTools = out["tools"];
|
|
4664
4693
|
if (outTools && typeof outTools === "object") {
|
|
4665
4694
|
const execCfg = outTools["exec"];
|
|
4666
|
-
if (execCfg && typeof execCfg === "object"
|
|
4667
|
-
const
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
...
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4695
|
+
if (execCfg && typeof execCfg === "object") {
|
|
4696
|
+
const hasAllow = "allow" in execCfg;
|
|
4697
|
+
const hasDanger = "danger" in execCfg;
|
|
4698
|
+
if (hasAllow || hasDanger) {
|
|
4699
|
+
const clonedExec = { ...execCfg };
|
|
4700
|
+
if (hasAllow) {
|
|
4701
|
+
delete clonedExec["allow"];
|
|
4702
|
+
stripped.push("tools.exec.allow");
|
|
4703
|
+
}
|
|
4704
|
+
if (hasDanger) {
|
|
4705
|
+
delete clonedExec["danger"];
|
|
4706
|
+
stripped.push("tools.exec.danger");
|
|
4707
|
+
}
|
|
4708
|
+
out["tools"] = {
|
|
4709
|
+
...outTools,
|
|
4710
|
+
exec: clonedExec
|
|
4711
|
+
};
|
|
4712
|
+
}
|
|
4713
|
+
}
|
|
4714
|
+
}
|
|
4715
|
+
const outSkills = out["skills"];
|
|
4716
|
+
if (outSkills && typeof outSkills === "object") {
|
|
4717
|
+
const skillsRec = outSkills;
|
|
4718
|
+
const needsClone = "extraDirs" in skillsRec || "registryUrl" in skillsRec;
|
|
4719
|
+
if (needsClone) {
|
|
4720
|
+
const clonedSkills = { ...skillsRec };
|
|
4721
|
+
if ("extraDirs" in clonedSkills) {
|
|
4722
|
+
delete clonedSkills["extraDirs"];
|
|
4723
|
+
stripped.push("skills.extraDirs");
|
|
4724
|
+
}
|
|
4725
|
+
if ("registryUrl" in clonedSkills) {
|
|
4726
|
+
delete clonedSkills["registryUrl"];
|
|
4727
|
+
stripped.push("skills.registryUrl");
|
|
4728
|
+
}
|
|
4729
|
+
out["skills"] = clonedSkills;
|
|
4674
4730
|
}
|
|
4675
4731
|
}
|
|
4676
4732
|
if (stripped.length > 0) {
|
|
@@ -4705,7 +4761,11 @@ function deepMerge2(base, patch) {
|
|
|
4705
4761
|
);
|
|
4706
4762
|
};
|
|
4707
4763
|
}
|
|
4708
|
-
return deepMerge(
|
|
4764
|
+
return deepMerge(
|
|
4765
|
+
base,
|
|
4766
|
+
patch,
|
|
4767
|
+
opts
|
|
4768
|
+
);
|
|
4709
4769
|
}
|
|
4710
4770
|
var DefaultConfigLoader = class {
|
|
4711
4771
|
paths;
|
|
@@ -4751,13 +4811,15 @@ var DefaultConfigLoader = class {
|
|
|
4751
4811
|
cfg = deepMerge2(cfg, patch);
|
|
4752
4812
|
}
|
|
4753
4813
|
} catch (err) {
|
|
4754
|
-
console.warn(
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4814
|
+
console.warn(
|
|
4815
|
+
JSON.stringify({
|
|
4816
|
+
level: "warn",
|
|
4817
|
+
event: "config.source_load_failed",
|
|
4818
|
+
source: src.name,
|
|
4819
|
+
message: toErrorMessage(err),
|
|
4820
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
4821
|
+
})
|
|
4822
|
+
);
|
|
4761
4823
|
}
|
|
4762
4824
|
}
|
|
4763
4825
|
if (opts.cliFlags) {
|
|
@@ -4816,13 +4878,15 @@ var DefaultConfigLoader = class {
|
|
|
4816
4878
|
durationMs: Date.now() - t0,
|
|
4817
4879
|
...this.traceId !== void 0 ? { traceId: this.traceId } : {}
|
|
4818
4880
|
});
|
|
4819
|
-
console.warn(
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4881
|
+
console.warn(
|
|
4882
|
+
JSON.stringify({
|
|
4883
|
+
level: "warn",
|
|
4884
|
+
event: "config.defaults_read_failed",
|
|
4885
|
+
path: fp,
|
|
4886
|
+
message: toErrorMessage(err),
|
|
4887
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
4888
|
+
})
|
|
4889
|
+
);
|
|
4826
4890
|
return;
|
|
4827
4891
|
}
|
|
4828
4892
|
parsed = {};
|
|
@@ -4855,13 +4919,15 @@ var DefaultConfigLoader = class {
|
|
|
4855
4919
|
durationMs: Date.now() - t0,
|
|
4856
4920
|
...this.traceId !== void 0 ? { traceId: this.traceId } : {}
|
|
4857
4921
|
});
|
|
4858
|
-
console.warn(
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4922
|
+
console.warn(
|
|
4923
|
+
JSON.stringify({
|
|
4924
|
+
level: "warn",
|
|
4925
|
+
event: "config.defaults_write_failed",
|
|
4926
|
+
path: fp,
|
|
4927
|
+
message: toErrorMessage(err),
|
|
4928
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
4929
|
+
})
|
|
4930
|
+
);
|
|
4865
4931
|
}
|
|
4866
4932
|
}
|
|
4867
4933
|
/**
|
|
@@ -4963,12 +5029,14 @@ var DefaultConfigLoader = class {
|
|
|
4963
5029
|
error: storageErrorString(err),
|
|
4964
5030
|
...this.traceId !== void 0 ? { traceId: this.traceId } : {}
|
|
4965
5031
|
});
|
|
4966
|
-
console.warn(
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
5032
|
+
console.warn(
|
|
5033
|
+
JSON.stringify({
|
|
5034
|
+
level: "warn",
|
|
5035
|
+
event: "config.sync_load_failed",
|
|
5036
|
+
message: toErrorMessage(err),
|
|
5037
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
5038
|
+
})
|
|
5039
|
+
);
|
|
4972
5040
|
return null;
|
|
4973
5041
|
}
|
|
4974
5042
|
}
|
|
@@ -4997,13 +5065,15 @@ var DefaultConfigLoader = class {
|
|
|
4997
5065
|
error: storageErrorString(err),
|
|
4998
5066
|
...this.traceId !== void 0 ? { traceId: this.traceId } : {}
|
|
4999
5067
|
});
|
|
5000
|
-
console.warn(
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5068
|
+
console.warn(
|
|
5069
|
+
JSON.stringify({
|
|
5070
|
+
level: "warn",
|
|
5071
|
+
event: "config.read_failed",
|
|
5072
|
+
path: file,
|
|
5073
|
+
message: toErrorMessage(err),
|
|
5074
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
5075
|
+
})
|
|
5076
|
+
);
|
|
5007
5077
|
return {};
|
|
5008
5078
|
}
|
|
5009
5079
|
let raw;
|
|
@@ -5021,13 +5091,15 @@ var DefaultConfigLoader = class {
|
|
|
5021
5091
|
error: storageErrorString(err),
|
|
5022
5092
|
...this.traceId !== void 0 ? { traceId: this.traceId } : {}
|
|
5023
5093
|
});
|
|
5024
|
-
console.warn(
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5094
|
+
console.warn(
|
|
5095
|
+
JSON.stringify({
|
|
5096
|
+
level: "warn",
|
|
5097
|
+
event: "config.read_failed",
|
|
5098
|
+
path: file,
|
|
5099
|
+
message: toErrorMessage(err),
|
|
5100
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
5101
|
+
})
|
|
5102
|
+
);
|
|
5031
5103
|
}
|
|
5032
5104
|
this.jsonCache.set(file, { mtimeMs: null, value: {} });
|
|
5033
5105
|
return {};
|
|
@@ -5044,35 +5116,40 @@ var DefaultConfigLoader = class {
|
|
|
5044
5116
|
error: "parse error or empty file",
|
|
5045
5117
|
...this.traceId !== void 0 ? { traceId: this.traceId } : {}
|
|
5046
5118
|
});
|
|
5047
|
-
console.warn(
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5119
|
+
console.warn(
|
|
5120
|
+
JSON.stringify({
|
|
5121
|
+
level: "warn",
|
|
5122
|
+
event: "config.parse_failed",
|
|
5123
|
+
path: file,
|
|
5124
|
+
message: "invalid JSON \u2014 falling back to defaults for this layer",
|
|
5125
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
5126
|
+
})
|
|
5127
|
+
);
|
|
5054
5128
|
return {};
|
|
5055
5129
|
}
|
|
5056
5130
|
this.jsonCache.set(file, { mtimeMs, value: structuredClone(parsed.value) });
|
|
5057
5131
|
return parsed.value;
|
|
5058
5132
|
}
|
|
5059
5133
|
validateBehavior(cfg) {
|
|
5060
|
-
if (cfg.version === void 0)
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5134
|
+
if (cfg.version === void 0)
|
|
5135
|
+
throw new ConfigError({
|
|
5136
|
+
message: "Config: missing version field",
|
|
5137
|
+
code: ERROR_CODES.CONFIG_INVALID,
|
|
5138
|
+
context: { field: "version" }
|
|
5139
|
+
});
|
|
5140
|
+
if (cfg.version !== 1)
|
|
5141
|
+
throw new ConfigError({
|
|
5142
|
+
message: `Config: unsupported version ${cfg.version}`,
|
|
5143
|
+
code: ERROR_CODES.CONFIG_INVALID,
|
|
5144
|
+
context: { field: "version", actual: cfg.version }
|
|
5145
|
+
});
|
|
5070
5146
|
const c = cfg.context;
|
|
5071
|
-
if (!c)
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5147
|
+
if (!c)
|
|
5148
|
+
throw new ConfigError({
|
|
5149
|
+
message: "Config: missing context section",
|
|
5150
|
+
code: ERROR_CODES.CONFIG_INVALID,
|
|
5151
|
+
context: { field: "context" }
|
|
5152
|
+
});
|
|
5076
5153
|
const fields = ["warnThreshold", "softThreshold", "hardThreshold"];
|
|
5077
5154
|
for (const f of fields) {
|
|
5078
5155
|
const v = c[f];
|
|
@@ -7185,7 +7262,9 @@ var SessionRegistry = class {
|
|
|
7185
7262
|
try {
|
|
7186
7263
|
const [stat11, content] = await Promise.all([
|
|
7187
7264
|
fsp2.stat(lockPath),
|
|
7265
|
+
/* v8 ignore start -- best-effort lock-content read; .catch only fires if the lock vanished */
|
|
7188
7266
|
fsp2.readFile(lockPath, "utf8").catch(() => "")
|
|
7267
|
+
/* v8 ignore stop */
|
|
7189
7268
|
]);
|
|
7190
7269
|
const ageMs = Date.now() - stat11.mtimeMs;
|
|
7191
7270
|
const ownerPid = Number.parseInt(content.trim(), 10);
|
|
@@ -8030,6 +8109,104 @@ function attachTodosCheckpoint(state, filePath, sessionId, events, traceId) {
|
|
|
8030
8109
|
}
|
|
8031
8110
|
};
|
|
8032
8111
|
}
|
|
8112
|
+
async function loadCompletedWorkCheckpoint(filePath, events, traceId) {
|
|
8113
|
+
const t0 = Date.now();
|
|
8114
|
+
let raw;
|
|
8115
|
+
try {
|
|
8116
|
+
raw = await fsp2.readFile(filePath, "utf8");
|
|
8117
|
+
} catch (err) {
|
|
8118
|
+
events?.emit("storage.error", {
|
|
8119
|
+
sessionId: traceId ?? "~boot~",
|
|
8120
|
+
store: "completed-work",
|
|
8121
|
+
filePath,
|
|
8122
|
+
operation: "load",
|
|
8123
|
+
outcome: "failure",
|
|
8124
|
+
error: toErrorMessage(err),
|
|
8125
|
+
recoverable: true
|
|
8126
|
+
});
|
|
8127
|
+
return null;
|
|
8128
|
+
}
|
|
8129
|
+
try {
|
|
8130
|
+
const parsed = JSON.parse(raw);
|
|
8131
|
+
if (parsed?.version !== 1 || !Array.isArray(parsed.completedWork)) {
|
|
8132
|
+
events?.emit("storage.read", {
|
|
8133
|
+
sessionId: traceId ?? "~boot~",
|
|
8134
|
+
store: "completed-work",
|
|
8135
|
+
filePath,
|
|
8136
|
+
operation: "load",
|
|
8137
|
+
outcome: "failure",
|
|
8138
|
+
durationMs: Date.now() - t0,
|
|
8139
|
+
error: "invalid_schema",
|
|
8140
|
+
...traceId !== void 0 && { traceId }
|
|
8141
|
+
});
|
|
8142
|
+
return null;
|
|
8143
|
+
}
|
|
8144
|
+
events?.emit("storage.read", {
|
|
8145
|
+
sessionId: traceId ?? "~boot~",
|
|
8146
|
+
store: "completed-work",
|
|
8147
|
+
filePath,
|
|
8148
|
+
operation: "load",
|
|
8149
|
+
outcome: "success",
|
|
8150
|
+
durationMs: Date.now() - t0,
|
|
8151
|
+
...traceId !== void 0 && { traceId }
|
|
8152
|
+
});
|
|
8153
|
+
return parsed.completedWork.filter(isCompletedWorkEvidence);
|
|
8154
|
+
} catch {
|
|
8155
|
+
events?.emit("storage.read", {
|
|
8156
|
+
sessionId: traceId ?? "~boot~",
|
|
8157
|
+
store: "completed-work",
|
|
8158
|
+
filePath,
|
|
8159
|
+
operation: "load",
|
|
8160
|
+
outcome: "failure",
|
|
8161
|
+
durationMs: Date.now() - t0,
|
|
8162
|
+
error: "parse_failed",
|
|
8163
|
+
...traceId !== void 0 && { traceId }
|
|
8164
|
+
});
|
|
8165
|
+
return null;
|
|
8166
|
+
}
|
|
8167
|
+
}
|
|
8168
|
+
async function saveCompletedWorkCheckpoint(filePath, sessionId, completedWork, events, traceId) {
|
|
8169
|
+
const t0 = Date.now();
|
|
8170
|
+
const payload = {
|
|
8171
|
+
version: 1,
|
|
8172
|
+
sessionId,
|
|
8173
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
8174
|
+
completedWork: [...completedWork]
|
|
8175
|
+
};
|
|
8176
|
+
try {
|
|
8177
|
+
await atomicWrite(filePath, JSON.stringify(payload, null, 2), { mode: 384 });
|
|
8178
|
+
events?.emit("storage.write", {
|
|
8179
|
+
sessionId: traceId ?? sessionId,
|
|
8180
|
+
store: "completed-work",
|
|
8181
|
+
filePath,
|
|
8182
|
+
operation: "save",
|
|
8183
|
+
outcome: "success",
|
|
8184
|
+
durationMs: Date.now() - t0,
|
|
8185
|
+
...traceId !== void 0 && { traceId }
|
|
8186
|
+
});
|
|
8187
|
+
} catch (err) {
|
|
8188
|
+
events?.emit("storage.error", {
|
|
8189
|
+
sessionId: traceId ?? sessionId,
|
|
8190
|
+
store: "completed-work",
|
|
8191
|
+
filePath,
|
|
8192
|
+
operation: "save",
|
|
8193
|
+
outcome: "failure",
|
|
8194
|
+
error: toErrorMessage(err),
|
|
8195
|
+
recoverable: false
|
|
8196
|
+
});
|
|
8197
|
+
console.warn(JSON.stringify({
|
|
8198
|
+
level: "warn",
|
|
8199
|
+
event: "completed_work_checkpoint.save_failed",
|
|
8200
|
+
message: toErrorMessage(err),
|
|
8201
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
8202
|
+
}));
|
|
8203
|
+
}
|
|
8204
|
+
}
|
|
8205
|
+
function isCompletedWorkEvidence(value) {
|
|
8206
|
+
if (!value || typeof value !== "object") return false;
|
|
8207
|
+
const item = value;
|
|
8208
|
+
return typeof item.key === "string" && typeof item.source === "string" && ["todo", "plan", "task", "verification", "manual"].includes(item.source) && typeof item.summary === "string" && typeof item.completedAt === "number" && (item.evidence === void 0 || typeof item.evidence === "string");
|
|
8209
|
+
}
|
|
8033
8210
|
async function loadPlan(filePath, events) {
|
|
8034
8211
|
const t0 = Date.now();
|
|
8035
8212
|
let raw;
|
|
@@ -9421,7 +9598,9 @@ var STANDARD_AUDIT_EVENTS = /* @__PURE__ */ new Set([
|
|
|
9421
9598
|
"error",
|
|
9422
9599
|
"message_truncated",
|
|
9423
9600
|
"provider_retry",
|
|
9424
|
-
"provider_error"
|
|
9601
|
+
"provider_error",
|
|
9602
|
+
"skill_activated",
|
|
9603
|
+
"skill_deactivated"
|
|
9425
9604
|
]);
|
|
9426
9605
|
var FULL_ONLY_EVENTS = /* @__PURE__ */ new Set([
|
|
9427
9606
|
"tool_progress"
|
|
@@ -9512,6 +9691,6 @@ function resolveSessionLoggingConfig(cfg) {
|
|
|
9512
9691
|
};
|
|
9513
9692
|
}
|
|
9514
9693
|
|
|
9515
|
-
export { ALL_SYNC_CATEGORIES, AgentStatusTracker, AnnotationsStore, CORE_RECONSTRUCT_EVENTS, CloudSync, ConfigMigrationError, DEFAULT_CONFIG_MIGRATIONS, DefaultAttachmentStore, DefaultConfigLoader, DefaultConfigStore, DefaultMemoryStore, DefaultPromptStore, DefaultSessionReader, DefaultSessionRewinder, DefaultSessionStore, DirectorStateCheckpoint, FileMemoryBackend, FleetNotifier, GraphMemoryBackend, MAX_JOURNAL_ENTRIES, MAX_PROGRESS_HISTORY, PromptUsageStore, QueueStore, RecoveryLock, ReplayLogStore, STANDARD_AUDIT_EVENTS, SessionAnalyzer, SessionMemoryConsolidator, SessionRecovery, SessionRegistry, ToolAuditLog, addPlanItem, appendJournal, attachPlanCheckpoint, attachTodosCheckpoint, clearPlan, createSessionEventBridge, deriveTodosFromPlanItem, emptyGoal, emptyPlan, emptyTaskFile, formatGoal, formatPlan, formatPlanTemplates, generateSessionId, getPlanTemplate, getSessionRegistry, goalFilePath, hasSessionRegistry, listPlanTemplates, loadDirectorState, loadGoal, loadPlan, loadTasks, loadTodosCheckpoint, migratePromptEntry, mutatePlan, mutateTasks, parseEntries, parseProgressFromText, promptChecksum, recordProgress, removePlanItem, resolveAuditLevel, resolveSessionLoggingConfig, runConfigMigrations, sanitizeModel, saveGoal, savePlan, saveTasks, saveTodosCheckpoint, setPlanItemStatus, setProgress, summarizeUsage, watchProviderConfig };
|
|
9694
|
+
export { ALL_SYNC_CATEGORIES, AgentStatusTracker, AnnotationsStore, CORE_RECONSTRUCT_EVENTS, CloudSync, ConfigMigrationError, DEFAULT_CONFIG_MIGRATIONS, DefaultAttachmentStore, DefaultConfigLoader, DefaultConfigStore, DefaultMemoryStore, DefaultPromptStore, DefaultSessionReader, DefaultSessionRewinder, DefaultSessionStore, DirectorStateCheckpoint, FileMemoryBackend, FleetNotifier, GraphMemoryBackend, MAX_JOURNAL_ENTRIES, MAX_PROGRESS_HISTORY, PromptUsageStore, QueueStore, RecoveryLock, ReplayLogStore, STANDARD_AUDIT_EVENTS, SessionAnalyzer, SessionMemoryConsolidator, SessionRecovery, SessionRegistry, ToolAuditLog, addPlanItem, appendJournal, attachPlanCheckpoint, attachTodosCheckpoint, clearPlan, createSessionEventBridge, deriveTodosFromPlanItem, emptyGoal, emptyPlan, emptyTaskFile, formatGoal, formatPlan, formatPlanTemplates, generateSessionId, getPlanTemplate, getSessionRegistry, goalFilePath, hasSessionRegistry, listPlanTemplates, loadCompletedWorkCheckpoint, loadDirectorState, loadGoal, loadPlan, loadTasks, loadTodosCheckpoint, migratePromptEntry, mutatePlan, mutateTasks, parseEntries, parseProgressFromText, promptChecksum, recordProgress, removePlanItem, resolveAuditLevel, resolveSessionLoggingConfig, runConfigMigrations, sanitizeModel, saveCompletedWorkCheckpoint, saveGoal, savePlan, saveTasks, saveTodosCheckpoint, setPlanItemStatus, setProgress, summarizeUsage, watchProviderConfig };
|
|
9516
9695
|
//# sourceMappingURL=index.js.map
|
|
9517
9696
|
//# sourceMappingURL=index.js.map
|