@wrongstack/core 0.9.0 → 0.9.4
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-Bad3ZGQ7.d.ts → agent-bridge-DMVOX0cF.d.ts} +1 -1
- package/dist/{agent-subagent-runner-Cc8sRJOF.d.ts → agent-subagent-runner-DaF_EgRG.d.ts} +3 -3
- package/dist/{compactor-Mw7-rNyb.d.ts → compactor-DVTKL7XD.d.ts} +1 -1
- package/dist/{config-Bi4Q0fnz.d.ts → config-SkMIDN9L.d.ts} +22 -2
- package/dist/{context-z2x5gv_V.d.ts → context-BRNbHmRM.d.ts} +6 -0
- package/dist/coordination/index.d.ts +12 -12
- package/dist/coordination/index.js +58 -37
- package/dist/coordination/index.js.map +1 -1
- package/dist/{default-config-DvRSTELf.d.ts → default-config-Uzla85H-.d.ts} +5 -1
- package/dist/defaults/index.d.ts +23 -23
- package/dist/defaults/index.js +102 -72
- package/dist/defaults/index.js.map +1 -1
- package/dist/{events-yCpJD4wa.d.ts → events-CiG9qUM_.d.ts} +1 -1
- package/dist/execution/index.d.ts +14 -14
- package/dist/execution/index.js.map +1 -1
- package/dist/extension/index.d.ts +6 -6
- package/dist/{index-Dl3PaD7f.d.ts → index-Bsha5K4D.d.ts} +8 -8
- package/dist/{index-SxpnwRlJ.d.ts → index-CP8638Wm.d.ts} +5 -5
- package/dist/index.d.ts +148 -39
- package/dist/index.js +1545 -98
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +6 -6
- package/dist/kernel/index.d.ts +9 -9
- package/dist/{mcp-servers-n2L9ohMX.d.ts → mcp-servers-BouUWYW6.d.ts} +3 -3
- package/dist/models/index.d.ts +2 -2
- package/dist/{multi-agent-C8uY45AY.d.ts → multi-agent-3ZnTB1aT.d.ts} +2 -2
- package/dist/{multi-agent-coordinator-C7YbZUY8.d.ts → multi-agent-coordinator-DTXF2aAl.d.ts} +2 -2
- package/dist/{null-fleet-bus-Bb2jVLKr.d.ts → null-fleet-bus-Chrc_3Pp.d.ts} +6 -6
- package/dist/observability/index.d.ts +2 -2
- package/dist/{path-resolver-DnC1nOjb.d.ts → path-resolver-TcJfc29Y.d.ts} +2 -2
- package/dist/{permission-policy-BBa1M1xc.d.ts → permission-policy-BpCGYBud.d.ts} +2 -2
- package/dist/{plan-templates-Cc-04Z8o.d.ts → plan-templates-envSmNlZ.d.ts} +10 -5
- package/dist/{provider-runner-C4ouU7--.d.ts → provider-runner-BEpikbbN.d.ts} +3 -3
- package/dist/{retry-policy-OwtKNxo8.d.ts → retry-policy-BYkq0ugs.d.ts} +1 -1
- package/dist/sdd/index.d.ts +8 -8
- package/dist/{secret-scrubber-CyE1-EMG.d.ts → secret-scrubber-DttNiGYA.d.ts} +1 -1
- package/dist/{secret-scrubber-C0n1EqrC.d.ts → secret-scrubber-QSeI0ADi.d.ts} +1 -1
- package/dist/security/index.d.ts +4 -4
- package/dist/security/index.js +5 -2
- package/dist/security/index.js.map +1 -1
- package/dist/{selector-DkvgYVS4.d.ts → selector-pox8abg0.d.ts} +1 -1
- package/dist/{session-reader-DsadjyF9.d.ts → session-reader-CSWcb5Ga.d.ts} +1 -1
- package/dist/storage/index.d.ts +77 -8
- package/dist/storage/index.js +433 -62
- package/dist/storage/index.js.map +1 -1
- package/dist/{system-prompt-CWA6ml-d.d.ts → system-prompt-Bs-Wliab.d.ts} +1 -1
- package/dist/{tool-executor-Ch25BDwa.d.ts → tool-executor-CsktM3h9.d.ts} +4 -4
- package/dist/types/index.d.ts +16 -16
- package/dist/types/index.js +8 -2
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js +3 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/{wstack-paths-CJYrjQU8.d.ts → wstack-paths-BCgmTNlG.d.ts} +4 -0
- package/package.json +1 -1
|
@@ -16,5 +16,9 @@ declare const DEFAULT_CONTEXT_CONFIG: Readonly<{
|
|
|
16
16
|
preserveK: 10;
|
|
17
17
|
eliseThreshold: 2000;
|
|
18
18
|
}>;
|
|
19
|
+
/** Default autonomy config — auto-proceed delay etc. */
|
|
20
|
+
declare const DEFAULT_AUTONOMY_CONFIG: Readonly<{
|
|
21
|
+
autoProceedDelayMs: 45000;
|
|
22
|
+
}>;
|
|
19
23
|
|
|
20
|
-
export {
|
|
24
|
+
export { DEFAULT_AUTONOMY_CONFIG as D, DEFAULT_CONTEXT_CONFIG as a, DEFAULT_TOOLS_CONFIG as b };
|
package/dist/defaults/index.d.ts
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
export { D as DefaultLogger, a as DefaultLoggerOptions } from '../logger-bOzkF5LL.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, M as MemoryStoreOptions, j as MigrationContext, k as MigrationResult, P as PersistedQueueItem, l as PlanFile, m as PlanItem, n as PlanTemplate, Q as QueueStore, R as RecoveryLock, o as RecoveryLockOptions, S as SessionAnalyzer, p as SessionStoreOptions, T as TodosCheckpointFile, q as addPlanItem, r as attachPlanCheckpoint, s as attachTodosCheckpoint, t as clearPlan, u as deriveTodosFromPlanItem, v as emptyPlan, w as formatPlan, x as formatPlanTemplates, y as getPlanTemplate, z as listPlanTemplates, B as loadPlan, E as loadTodosCheckpoint, F as removePlanItem, G as runConfigMigrations, H as savePlan, I as saveTodosCheckpoint, J as setPlanItemStatus } from '../plan-templates-
|
|
3
|
-
export { D as DefaultSessionReader } from '../session-reader-
|
|
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, M as MemoryStoreOptions, j as MigrationContext, k as MigrationResult, P as PersistedQueueItem, l as PlanFile, m as PlanItem, n as PlanTemplate, Q as QueueStore, R as RecoveryLock, o as RecoveryLockOptions, S as SessionAnalyzer, p as SessionStoreOptions, T as TodosCheckpointFile, q as addPlanItem, r as attachPlanCheckpoint, s as attachTodosCheckpoint, t as clearPlan, u as deriveTodosFromPlanItem, v as emptyPlan, w as formatPlan, x as formatPlanTemplates, y as getPlanTemplate, z as listPlanTemplates, B as loadPlan, E as loadTodosCheckpoint, F as removePlanItem, G as runConfigMigrations, H as savePlan, I as saveTodosCheckpoint, J as setPlanItemStatus } from '../plan-templates-envSmNlZ.js';
|
|
3
|
+
export { D as DefaultSessionReader } from '../session-reader-CSWcb5Ga.js';
|
|
4
4
|
export { D as DirectorStateCheckpoint, a as DirectorStateSnapshot, b as DirectorSubagentState, c as DirectorTaskState, l as loadDirectorState } from '../director-state-BmYi3DGA.js';
|
|
5
|
-
export { D as DefaultSecretScrubber, a as DefaultSecretVault, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, m as migratePlaintextSecrets, r as rewriteConfigEncrypted } from '../secret-scrubber-
|
|
6
|
-
export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from '../permission-policy-
|
|
7
|
-
export { C as CompactorOptions, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, T as ToolExecutor } from '../tool-executor-
|
|
5
|
+
export { D as DefaultSecretScrubber, a as DefaultSecretVault, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, m as migratePlaintextSecrets, r as rewriteConfigEncrypted } from '../secret-scrubber-QSeI0ADi.js';
|
|
6
|
+
export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from '../permission-policy-BpCGYBud.js';
|
|
7
|
+
export { C as CompactorOptions, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, T as ToolExecutor } from '../tool-executor-CsktM3h9.js';
|
|
8
8
|
export { AutoCompactionMiddleware, AutonomousRunner, AutonomousRunnerOptions, AutonomyPromptContributorOptions, DefaultSkillLoader, DoneCheckResult, DoneConditionChecker, EternalAutonomyEngine, EternalAutonomyOptions, EternalEngineState, IntelligentCompactor, IntelligentCompactorOptions, ParallelEngineState, ParallelEternalEngine, ParallelEternalOptions, SelectiveCompactor, SelectiveCompactorOptions, SkillLoaderOptions, buildGoalPreamble, makeAutonomyPromptContributor } from '../execution/index.js';
|
|
9
|
-
import { P as ProviderRunner, R as RunProviderOptions } from '../provider-runner-
|
|
10
|
-
import { q as Response } from '../context-
|
|
11
|
-
export { a as AGENTS_BY_PHASE, b as AGENT_CATALOG, c as ALL_AGENT_DEFINITIONS, d as ALL_FLEET_AGENTS, e as AUDIT_LOG_AGENT, f as AutoExtendCeiling, g as AutoExtendPolicy, B as BUG_HUNTER_AGENT, C as CreateDelegateToolOptions, D as DEFAULT_DIRECTOR_PREAMBLE, h as DEFAULT_SUBAGENT_BASELINE, i as DelegateHost, j as Director, k as DirectorPromptParts, l as DirectorSessionFactory, m as DirectorSessionFactoryOptions, F as FLEET_ROSTER, n as FLEET_ROSTER_BUDGETS, s as FleetRosterBudget, t as FleetSpawnBudgetError, I as ICoordinator, u as IFleetManager, N as NULL_FLEET_BUS, R as REFACTOR_PLANNER_AGENT, S as SECURITY_SCANNER_AGENT, v as SubagentPromptParts, w as applyRosterBudget, x as attachAutoExtend, y as composeDirectorPrompt, z as composeSubagentPrompt, E as createDelegateTool, G as getAgentDefinition, H as makeDirectorSessionFactory, J as rosterSummaryFromConfigs } from '../null-fleet-bus-
|
|
12
|
-
export { A as AgentBudgetTier, a as AgentCapability, b as AgentDefinition, c as AgentPhase, D as DEFAULT_DISPATCH_ROLE, d as DefaultMultiAgentCoordinator, e as DispatchCandidate, f as DispatchClassifier, g as DispatchMethod, h as DispatchOptions, i as DispatchResult, j as MultiAgentCoordinatorOptions, k as dispatchAgent, m as makeLLMClassifier, s as scoreAgents } from '../multi-agent-coordinator-
|
|
13
|
-
export { c as BudgetExceededError, d as BudgetKind, e as BudgetLimits, j as BudgetUsage, m as SubagentBudget } from '../multi-agent-
|
|
14
|
-
export { A as AgentFactory, a as AgentFactoryResult, b as AgentRunnerOptions, F as FleetBus, c as FleetEvent, d as FleetHandler, e as FleetUsage, f as FleetUsageAggregator, S as SubagentUsageSnapshot, m as makeAgentSubagentRunner } from '../agent-subagent-runner-
|
|
15
|
-
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-
|
|
9
|
+
import { P as ProviderRunner, R as RunProviderOptions } from '../provider-runner-BEpikbbN.js';
|
|
10
|
+
import { q as Response } from '../context-BRNbHmRM.js';
|
|
11
|
+
export { a as AGENTS_BY_PHASE, b as AGENT_CATALOG, c as ALL_AGENT_DEFINITIONS, d as ALL_FLEET_AGENTS, e as AUDIT_LOG_AGENT, f as AutoExtendCeiling, g as AutoExtendPolicy, B as BUG_HUNTER_AGENT, C as CreateDelegateToolOptions, D as DEFAULT_DIRECTOR_PREAMBLE, h as DEFAULT_SUBAGENT_BASELINE, i as DelegateHost, j as Director, k as DirectorPromptParts, l as DirectorSessionFactory, m as DirectorSessionFactoryOptions, F as FLEET_ROSTER, n as FLEET_ROSTER_BUDGETS, s as FleetRosterBudget, t as FleetSpawnBudgetError, I as ICoordinator, u as IFleetManager, N as NULL_FLEET_BUS, R as REFACTOR_PLANNER_AGENT, S as SECURITY_SCANNER_AGENT, v as SubagentPromptParts, w as applyRosterBudget, x as attachAutoExtend, y as composeDirectorPrompt, z as composeSubagentPrompt, E as createDelegateTool, G as getAgentDefinition, H as makeDirectorSessionFactory, J as rosterSummaryFromConfigs } from '../null-fleet-bus-Chrc_3Pp.js';
|
|
12
|
+
export { A as AgentBudgetTier, a as AgentCapability, b as AgentDefinition, c as AgentPhase, D as DEFAULT_DISPATCH_ROLE, d as DefaultMultiAgentCoordinator, e as DispatchCandidate, f as DispatchClassifier, g as DispatchMethod, h as DispatchOptions, i as DispatchResult, j as MultiAgentCoordinatorOptions, k as dispatchAgent, m as makeLLMClassifier, s as scoreAgents } from '../multi-agent-coordinator-DTXF2aAl.js';
|
|
13
|
+
export { c as BudgetExceededError, d as BudgetKind, e as BudgetLimits, j as BudgetUsage, m as SubagentBudget } from '../multi-agent-3ZnTB1aT.js';
|
|
14
|
+
export { A as AgentFactory, a as AgentFactoryResult, b as AgentRunnerOptions, F as FleetBus, c as FleetEvent, d as FleetHandler, e as FleetUsage, f as FleetUsageAggregator, S as SubagentUsageSnapshot, m as makeAgentSubagentRunner } from '../agent-subagent-runner-DaF_EgRG.js';
|
|
15
|
+
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-DMVOX0cF.js';
|
|
16
16
|
export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from '../models-registry-OG_30xqZ.js';
|
|
17
17
|
export { DefaultModeStore, LLMSelector, LLMSelectorOptions, ModeLoaderOptions, loadProjectModes, loadUserModes } from '../models/index.js';
|
|
18
18
|
export { AISpecBuilder, AISpecBuilderOptions, AISpecPhase, AISpecSession, AutoExecutor, AutoExecutorOptions, BottleneckTask, CollectedAnswer, CriticalPathAnalysis, DefaultTaskStore, ExecutionSummary, GeneratedTask, RunResult, SPEC_TEMPLATES, SddParallelRun, SddParallelRunOptions, SddProgress, SddTaskDecomposer, SddTaskDecomposerOptions, SpecDiff, SpecDrivenDev, SpecDrivenDevOptions, SpecIndexEntry, SpecParser, SpecStore, SpecStoreOptions, SpecVersion, SpecVersioning, TaskBatch, TaskExecutionContext, TaskExecutionResult, TaskFlow, TaskFlowEventMap, TaskFlowEventName, TaskFlowExecutionContext, TaskFlowOptions, TaskFlowPhase, TaskGenerator, TaskGeneratorOptions, TaskGraphIndexEntry, TaskGraphStore, TaskGraphStoreOptions, TaskStore, TaskTracker, TaskTrackerOptions, TaskTransition, WaveResult, analyzeCriticalPath, createAutoExecutor, getTemplate, listTemplates, renderProgress, renderSpecAnalysis, renderTaskGraph, renderTaskList, templateToMarkdown } from '../sdd/index.js';
|
|
19
19
|
export { DefaultHealthRegistry, InMemoryMetricsSink, MetricsServerHandle, MetricsServerOptions, NoopMetricsSink, NoopTracer, OTelTracer, OtlpMetricsExporterHandle, OtlpMetricsExporterOptions, OtlpTraceExporterHandle, OtlpTraceExporterOptions, PROMETHEUS_CONTENT_TYPE, buildOtlpMetricsRequest, buildOtlpTracesRequest, renderPrometheus, startMetricsServer, startOtlpMetricsExporter, startOtlpTraceExporter, wireMetricsToEvents } from '../observability/index.js';
|
|
20
|
-
export { C as ContextManagerAction, a as ContextManagerInput, b as ContextManagerResult, c as ContextManagerToolOptions, d as allServers, e as awsServer, f as blockServer, g as braveSearchServer, h as context7Server, i as contextManagerTool, j as createContextManagerTool, k as everArtServer, l as filesystemServer, m as githubServer, n as googleMapsServer, o as miniMaxVisionServer, s as sentinelServer, p as slackServer, z as zaiVisionServer } from '../mcp-servers-
|
|
21
|
-
export { D as
|
|
20
|
+
export { C as ContextManagerAction, a as ContextManagerInput, b as ContextManagerResult, c as ContextManagerToolOptions, d as allServers, e as awsServer, f as blockServer, g as braveSearchServer, h as context7Server, i as contextManagerTool, j as createContextManagerTool, k as everArtServer, l as filesystemServer, m as githubServer, n as googleMapsServer, o as miniMaxVisionServer, s as sentinelServer, p as slackServer, z as zaiVisionServer } from '../mcp-servers-BouUWYW6.js';
|
|
21
|
+
export { D as DEFAULT_AUTONOMY_CONFIG, a as DEFAULT_CONTEXT_CONFIG, b as DEFAULT_TOOLS_CONFIG } from '../default-config-Uzla85H-.js';
|
|
22
22
|
import '../logger-DDd5C--Z.js';
|
|
23
|
-
import '../events-
|
|
23
|
+
import '../events-CiG9qUM_.js';
|
|
24
24
|
import '../memory-CEXuo7sz.js';
|
|
25
|
-
import '../wstack-paths-
|
|
26
|
-
import '../config-
|
|
25
|
+
import '../wstack-paths-BCgmTNlG.js';
|
|
26
|
+
import '../config-SkMIDN9L.js';
|
|
27
27
|
import '../models-registry-BcYJDKLm.js';
|
|
28
28
|
import '../secret-vault-DoISxaKO.js';
|
|
29
|
-
import '../secret-scrubber-
|
|
29
|
+
import '../secret-scrubber-DttNiGYA.js';
|
|
30
30
|
import '../input-reader-E-ffP2ee.js';
|
|
31
|
-
import '../compactor-
|
|
32
|
-
import '../retry-policy-
|
|
33
|
-
import '../index-
|
|
34
|
-
import '../system-prompt-
|
|
31
|
+
import '../compactor-DVTKL7XD.js';
|
|
32
|
+
import '../retry-policy-BYkq0ugs.js';
|
|
33
|
+
import '../index-CP8638Wm.js';
|
|
34
|
+
import '../system-prompt-Bs-Wliab.js';
|
|
35
35
|
import '../observability-BhnVLBLS.js';
|
|
36
|
-
import '../selector-
|
|
36
|
+
import '../selector-pox8abg0.js';
|
|
37
37
|
import '../goal-store-C7jcumEh.js';
|
|
38
38
|
import '../skill-CxuWrsKK.js';
|
|
39
39
|
import 'node:events';
|
package/dist/defaults/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as crypto2 from 'crypto';
|
|
2
2
|
import { randomBytes, randomUUID, createCipheriv, createDecipheriv, createHash } from 'crypto';
|
|
3
3
|
import * as fsp from 'fs/promises';
|
|
4
|
-
import * as
|
|
4
|
+
import * as path15 from 'path';
|
|
5
5
|
import * as fs5 from 'fs';
|
|
6
6
|
import * as os from 'os';
|
|
7
7
|
import { execFile } from 'child_process';
|
|
@@ -31,9 +31,9 @@ __export(atomic_write_exports, {
|
|
|
31
31
|
ensureDir: () => ensureDir
|
|
32
32
|
});
|
|
33
33
|
async function atomicWrite(targetPath, content, opts = {}) {
|
|
34
|
-
const dir =
|
|
34
|
+
const dir = path15.dirname(targetPath);
|
|
35
35
|
await fsp.mkdir(dir, { recursive: true });
|
|
36
|
-
const tmp =
|
|
36
|
+
const tmp = path15.join(dir, `.${path15.basename(targetPath)}.${randomBytes(6).toString("hex")}.tmp`);
|
|
37
37
|
try {
|
|
38
38
|
if (typeof content === "string") {
|
|
39
39
|
await fsp.writeFile(tmp, content, { flag: "wx", encoding: opts.encoding ?? "utf8" });
|
|
@@ -154,7 +154,7 @@ var DefaultLogger = class _DefaultLogger {
|
|
|
154
154
|
this.pretty = opts.pretty ?? true;
|
|
155
155
|
if (this.file) {
|
|
156
156
|
try {
|
|
157
|
-
fs5.mkdirSync(
|
|
157
|
+
fs5.mkdirSync(path15.dirname(this.file), { recursive: true });
|
|
158
158
|
} catch {
|
|
159
159
|
}
|
|
160
160
|
}
|
|
@@ -323,24 +323,30 @@ var DefaultSessionStore = class {
|
|
|
323
323
|
this.dir = opts.dir;
|
|
324
324
|
this.events = opts.events;
|
|
325
325
|
}
|
|
326
|
-
|
|
326
|
+
/** Join session ID to its absolute path within the store directory. */
|
|
327
|
+
sessionPath(id, ext) {
|
|
328
|
+
return path15.join(this.dir, `${id}${ext}`);
|
|
329
|
+
}
|
|
330
|
+
async ensureShardDir(_id) {
|
|
327
331
|
await ensureDir(this.dir);
|
|
332
|
+
return this.dir;
|
|
333
|
+
}
|
|
334
|
+
async create(meta) {
|
|
328
335
|
const startedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
329
336
|
const id = meta.id ?? `${startedAt.replace(/[:.]/g, "-")}-${randomBytes(2).toString("hex")}`;
|
|
330
|
-
const
|
|
337
|
+
const shardDir = await this.ensureShardDir(id);
|
|
338
|
+
const file = path15.join(shardDir, `${id}.jsonl`);
|
|
331
339
|
let handle;
|
|
332
340
|
try {
|
|
333
341
|
handle = await fsp.open(file, "a", 384);
|
|
334
342
|
} catch (err) {
|
|
335
343
|
throw new Error(
|
|
336
344
|
`Failed to open session file: ${err instanceof Error ? err.message : String(err)}`,
|
|
337
|
-
{
|
|
338
|
-
cause: err
|
|
339
|
-
}
|
|
345
|
+
{ cause: err }
|
|
340
346
|
);
|
|
341
347
|
}
|
|
342
348
|
try {
|
|
343
|
-
return new FileSessionWriter(id, handle, startedAt, meta, this.events, { dir:
|
|
349
|
+
return new FileSessionWriter(id, handle, startedAt, meta, this.events, { dir: shardDir, filePath: file });
|
|
344
350
|
} catch (err) {
|
|
345
351
|
await handle.close().catch(() => {
|
|
346
352
|
});
|
|
@@ -348,15 +354,7 @@ var DefaultSessionStore = class {
|
|
|
348
354
|
}
|
|
349
355
|
}
|
|
350
356
|
async resume(id) {
|
|
351
|
-
const file =
|
|
352
|
-
try {
|
|
353
|
-
await fsp.access(file, fsp.constants.R_OK);
|
|
354
|
-
} catch {
|
|
355
|
-
throw new Error(
|
|
356
|
-
`Session "${id}" not found \u2014 the session file does not exist or was deleted.`,
|
|
357
|
-
{ cause: new Error("ENOENT") }
|
|
358
|
-
);
|
|
359
|
-
}
|
|
357
|
+
const file = this.sessionPath(id, ".jsonl");
|
|
360
358
|
const data = await this.load(id);
|
|
361
359
|
let handle;
|
|
362
360
|
try {
|
|
@@ -388,7 +386,7 @@ var DefaultSessionStore = class {
|
|
|
388
386
|
}
|
|
389
387
|
}
|
|
390
388
|
async load(id) {
|
|
391
|
-
const file =
|
|
389
|
+
const file = this.sessionPath(id, ".jsonl");
|
|
392
390
|
const raw = await fsp.readFile(file, "utf8");
|
|
393
391
|
const lines = raw.split("\n").filter((l) => l.trim());
|
|
394
392
|
const events = [];
|
|
@@ -408,8 +406,7 @@ var DefaultSessionStore = class {
|
|
|
408
406
|
async list(limit = 20) {
|
|
409
407
|
try {
|
|
410
408
|
await ensureDir(this.dir);
|
|
411
|
-
const
|
|
412
|
-
const ids = files.filter((f) => f.endsWith(".jsonl")).map((f) => f.replace(/\.jsonl$/, ""));
|
|
409
|
+
const ids = await this.collectSessionIds(this.dir);
|
|
413
410
|
const sessions = await Promise.all(ids.map((id) => this.summaryFor(id).catch(() => null)));
|
|
414
411
|
const out = sessions.filter((s) => s !== null);
|
|
415
412
|
out.sort((a, b) => {
|
|
@@ -422,13 +419,27 @@ var DefaultSessionStore = class {
|
|
|
422
419
|
return [];
|
|
423
420
|
}
|
|
424
421
|
}
|
|
422
|
+
/** Recursively collect all session IDs from shard subdirectories. */
|
|
423
|
+
async collectSessionIds(dir) {
|
|
424
|
+
const ids = [];
|
|
425
|
+
const entries = await fsp.readdir(dir, { withFileTypes: true });
|
|
426
|
+
for (const entry of entries) {
|
|
427
|
+
const full = path15.join(dir, entry.name);
|
|
428
|
+
if (entry.isDirectory()) {
|
|
429
|
+
ids.push(...await this.collectSessionIds(full));
|
|
430
|
+
} else if (entry.isFile() && entry.name.endsWith(".jsonl")) {
|
|
431
|
+
ids.push(entry.name.replace(/\.jsonl$/, ""));
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
return ids;
|
|
435
|
+
}
|
|
425
436
|
async summaryFor(id) {
|
|
426
|
-
const manifest =
|
|
437
|
+
const manifest = this.sessionPath(id, ".summary.json");
|
|
427
438
|
try {
|
|
428
439
|
const raw = await fsp.readFile(manifest, "utf8");
|
|
429
440
|
return JSON.parse(raw);
|
|
430
441
|
} catch {
|
|
431
|
-
const full =
|
|
442
|
+
const full = this.sessionPath(id, ".jsonl");
|
|
432
443
|
const stat4 = await fsp.stat(full);
|
|
433
444
|
const summary = await this.summarize(id, stat4.mtime.toISOString());
|
|
434
445
|
await atomicWrite(manifest, JSON.stringify(summary), { mode: 384 }).catch((err) => {
|
|
@@ -441,12 +452,13 @@ var DefaultSessionStore = class {
|
|
|
441
452
|
}
|
|
442
453
|
}
|
|
443
454
|
async delete(id) {
|
|
444
|
-
await fsp.unlink(
|
|
445
|
-
await fsp.unlink(
|
|
455
|
+
await fsp.unlink(this.sessionPath(id, ".jsonl"));
|
|
456
|
+
await fsp.unlink(this.sessionPath(id, ".summary.json")).catch(() => void 0);
|
|
446
457
|
}
|
|
447
458
|
async clearHistory(id) {
|
|
448
|
-
|
|
449
|
-
const
|
|
459
|
+
await this.ensureShardDir(id);
|
|
460
|
+
const file = this.sessionPath(id, ".jsonl");
|
|
461
|
+
const meta = this.sessionPath(id, ".summary.json");
|
|
450
462
|
const record = `${JSON.stringify({
|
|
451
463
|
type: "session_start",
|
|
452
464
|
ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -490,7 +502,8 @@ var DefaultSessionStore = class {
|
|
|
490
502
|
startedAt: start?.ts ?? (/* @__PURE__ */ new Date(0)).toISOString(),
|
|
491
503
|
endedAt: end?.ts,
|
|
492
504
|
model: start?.model,
|
|
493
|
-
provider: start?.provider
|
|
505
|
+
provider: start?.provider,
|
|
506
|
+
pendingToolUses: end?.pendingToolUses
|
|
494
507
|
};
|
|
495
508
|
}
|
|
496
509
|
replay(events, sessionId = "unknown") {
|
|
@@ -567,7 +580,7 @@ var FileSessionWriter = class {
|
|
|
567
580
|
this.meta = meta;
|
|
568
581
|
this.events = events;
|
|
569
582
|
this.resumed = opts.resumed ?? false;
|
|
570
|
-
this.manifestFile = opts.dir ?
|
|
583
|
+
this.manifestFile = opts.dir ? path15.join(opts.dir, `${id}.summary.json`) : "";
|
|
571
584
|
this.filePath = opts.filePath ?? "";
|
|
572
585
|
this.summary = {
|
|
573
586
|
id,
|
|
@@ -590,9 +603,6 @@ var FileSessionWriter = class {
|
|
|
590
603
|
tokenIn = 0;
|
|
591
604
|
tokenOut = 0;
|
|
592
605
|
filePath;
|
|
593
|
-
/** Public accessor for the JSONL path — required by SessionWriter so
|
|
594
|
-
* observability surfaces (`/fleet log`, FleetPanel) can locate the
|
|
595
|
-
* transcript without recomputing the path from session metadata. */
|
|
596
606
|
get transcriptPath() {
|
|
597
607
|
return this.filePath || void 0;
|
|
598
608
|
}
|
|
@@ -600,13 +610,16 @@ var FileSessionWriter = class {
|
|
|
600
610
|
resumed;
|
|
601
611
|
appendFailCount = 0;
|
|
602
612
|
lastAppendWarnAt = 0;
|
|
603
|
-
// Rewind support: track pending file changes and prompt index
|
|
604
613
|
promptIndex = 0;
|
|
605
614
|
pendingFileSnapshots = [];
|
|
606
|
-
|
|
615
|
+
/** Tracks open tool_use IDs during the current run to serialize on close for resume. */
|
|
616
|
+
openToolUses = /* @__PURE__ */ new Set();
|
|
607
617
|
recordFileChange(input) {
|
|
608
618
|
this.pendingFileSnapshots.push(input);
|
|
609
619
|
}
|
|
620
|
+
get pendingToolUses() {
|
|
621
|
+
return Array.from(this.openToolUses);
|
|
622
|
+
}
|
|
610
623
|
async writeSessionStartLazy() {
|
|
611
624
|
const record = `${JSON.stringify({
|
|
612
625
|
type: this.resumed ? "session_resumed" : "session_start",
|
|
@@ -649,13 +662,12 @@ var FileSessionWriter = class {
|
|
|
649
662
|
}
|
|
650
663
|
}
|
|
651
664
|
}
|
|
652
|
-
/**
|
|
653
|
-
* Watch events as they're appended and keep the summary state hot, so
|
|
654
|
-
* `close()` can flush a `<id>.summary.json` manifest without re-reading
|
|
655
|
-
* the JSONL. `list()` reads only manifests, turning a per-session full
|
|
656
|
-
* parse into a single stat+read.
|
|
657
|
-
*/
|
|
658
665
|
observeForSummary(event) {
|
|
666
|
+
if (event.type === "tool_use") {
|
|
667
|
+
this.openToolUses.add(event.id);
|
|
668
|
+
} else if (event.type === "tool_result") {
|
|
669
|
+
this.openToolUses.delete(event.id);
|
|
670
|
+
}
|
|
659
671
|
if (event.type === "user_input" && this.summary.title === "(empty session)") {
|
|
660
672
|
this.summary = { ...this.summary, title: userInputTitle(event.content) };
|
|
661
673
|
} else if (event.type === "llm_response") {
|
|
@@ -749,7 +761,16 @@ var FileSessionWriter = class {
|
|
|
749
761
|
}
|
|
750
762
|
}
|
|
751
763
|
const truncated = kept.join("\n");
|
|
752
|
-
|
|
764
|
+
const tmpPath = `${this.filePath}.rewind.tmp`;
|
|
765
|
+
await fsp.writeFile(tmpPath, truncated + "\n", "utf8");
|
|
766
|
+
try {
|
|
767
|
+
await this.handle.close();
|
|
768
|
+
await fsp.rename(tmpPath, this.filePath);
|
|
769
|
+
this.handle = await fsp.open(this.filePath, "a", 384);
|
|
770
|
+
} catch (err) {
|
|
771
|
+
await fsp.unlink(tmpPath).catch(() => void 0);
|
|
772
|
+
throw err;
|
|
773
|
+
}
|
|
753
774
|
await this.append({
|
|
754
775
|
type: "rewound",
|
|
755
776
|
ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -786,7 +807,7 @@ init_atomic_write();
|
|
|
786
807
|
var QueueStore = class {
|
|
787
808
|
file;
|
|
788
809
|
constructor(opts) {
|
|
789
|
-
this.file =
|
|
810
|
+
this.file = path15.join(opts.dir, "queue.json");
|
|
790
811
|
}
|
|
791
812
|
async write(items) {
|
|
792
813
|
if (items.length === 0) {
|
|
@@ -856,7 +877,7 @@ var DefaultAttachmentStore = class {
|
|
|
856
877
|
let data = input.data;
|
|
857
878
|
if (this.spoolDir && bytes >= this.spoolThreshold) {
|
|
858
879
|
await fsp.mkdir(this.spoolDir, { recursive: true });
|
|
859
|
-
spooledPath =
|
|
880
|
+
spooledPath = path15.join(this.spoolDir, `${id}.bin`);
|
|
860
881
|
await atomicWrite(spooledPath, input.data, {
|
|
861
882
|
encoding: input.kind === "image" ? "base64" : "utf8"
|
|
862
883
|
});
|
|
@@ -1029,7 +1050,7 @@ ${body.trim()}`);
|
|
|
1029
1050
|
async remember(text, scope = "project-memory") {
|
|
1030
1051
|
return this.runSerialized(scope, async () => {
|
|
1031
1052
|
const file = this.files[scope];
|
|
1032
|
-
await ensureDir(
|
|
1053
|
+
await ensureDir(path15.dirname(file));
|
|
1033
1054
|
let existing = "";
|
|
1034
1055
|
try {
|
|
1035
1056
|
existing = await fsp.readFile(file, "utf8");
|
|
@@ -1324,6 +1345,9 @@ var DEFAULT_CONTEXT_CONFIG = Object.freeze({
|
|
|
1324
1345
|
preserveK: 10,
|
|
1325
1346
|
eliseThreshold: 2e3
|
|
1326
1347
|
});
|
|
1348
|
+
var DEFAULT_AUTONOMY_CONFIG = Object.freeze({
|
|
1349
|
+
autoProceedDelayMs: 45e3
|
|
1350
|
+
});
|
|
1327
1351
|
|
|
1328
1352
|
// src/storage/config-loader.ts
|
|
1329
1353
|
var BEHAVIOR_DEFAULTS = {
|
|
@@ -1522,7 +1546,10 @@ var DefaultConfigLoader = class {
|
|
|
1522
1546
|
}
|
|
1523
1547
|
if (c.mode !== void 0 && !isContextWindowModeId(c.mode)) {
|
|
1524
1548
|
const known = listContextWindowModes().map((m) => m.id).join(", ");
|
|
1525
|
-
|
|
1549
|
+
console.warn(
|
|
1550
|
+
`[config] Ignoring unknown context.mode "${c.mode}" (expected one of: ${known}); falling back to "${DEFAULT_CONTEXT_WINDOW_MODE_ID}".`
|
|
1551
|
+
);
|
|
1552
|
+
c.mode = DEFAULT_CONTEXT_WINDOW_MODE_ID;
|
|
1526
1553
|
}
|
|
1527
1554
|
}
|
|
1528
1555
|
validateIdentity(cfg) {
|
|
@@ -1601,7 +1628,7 @@ var RecoveryLock = class {
|
|
|
1601
1628
|
sessionStore;
|
|
1602
1629
|
probe;
|
|
1603
1630
|
constructor(opts) {
|
|
1604
|
-
this.file =
|
|
1631
|
+
this.file = path15.join(opts.dir, LOCK_FILE);
|
|
1605
1632
|
this.pid = opts.pid ?? process.pid;
|
|
1606
1633
|
this.hostname = opts.hostname ?? os.hostname();
|
|
1607
1634
|
this.maxAgeMs = opts.maxAgeMs ?? DEFAULT_MAX_AGE_MS;
|
|
@@ -1659,7 +1686,7 @@ var RecoveryLock = class {
|
|
|
1659
1686
|
* null return before calling this.
|
|
1660
1687
|
*/
|
|
1661
1688
|
async write(sessionId) {
|
|
1662
|
-
await ensureDir(
|
|
1689
|
+
await ensureDir(path15.dirname(this.file));
|
|
1663
1690
|
const lock = {
|
|
1664
1691
|
v: 1,
|
|
1665
1692
|
sessionId,
|
|
@@ -2653,7 +2680,10 @@ var PATTERNS = [
|
|
|
2653
2680
|
type: "bearer_token",
|
|
2654
2681
|
// Anchored with alternation instead of negative lookahead — avoids V8
|
|
2655
2682
|
// backtracking risk on adversarial input. Bounded at 512 chars.
|
|
2656
|
-
|
|
2683
|
+
// Min 12 chars: some OAuth providers issue shorter-lived tokens (< 20
|
|
2684
|
+
// chars). A 12-char base64 string has ~71 bits of entropy — above the
|
|
2685
|
+
// threshold where random strings are unlikely to produce false matches.
|
|
2686
|
+
regex: /(?:^|[^A-Za-z0-9_.~+/-])Bearer\s+[A-Za-z0-9._~+/-]{12,512}=*(?:$|[^A-Za-z0-9_.~+/-])/g
|
|
2657
2687
|
},
|
|
2658
2688
|
{
|
|
2659
2689
|
type: "high_entropy_env",
|
|
@@ -2772,7 +2802,7 @@ var DefaultSecretVault = class {
|
|
|
2772
2802
|
} catch (err) {
|
|
2773
2803
|
if (err.code !== "ENOENT") throw err;
|
|
2774
2804
|
}
|
|
2775
|
-
fs5.mkdirSync(
|
|
2805
|
+
fs5.mkdirSync(path15.dirname(this.keyFile), { recursive: true });
|
|
2776
2806
|
const key = randomBytes(KEY_BYTES);
|
|
2777
2807
|
try {
|
|
2778
2808
|
fs5.writeFileSync(this.keyFile, key, { mode: 384, flag: "wx" });
|
|
@@ -2841,7 +2871,7 @@ async function rewriteConfigEncrypted(configPath, vault, patch) {
|
|
|
2841
2871
|
}
|
|
2842
2872
|
const merged = deepMerge2(current, patch ?? {});
|
|
2843
2873
|
const encrypted = encryptConfigSecrets(merged, vault);
|
|
2844
|
-
await fsp.mkdir(
|
|
2874
|
+
await fsp.mkdir(path15.dirname(configPath), { recursive: true });
|
|
2845
2875
|
await atomicWrite(configPath, JSON.stringify(encrypted, null, 2), { mode: 384 });
|
|
2846
2876
|
await restrictFilePermissions(configPath);
|
|
2847
2877
|
}
|
|
@@ -3133,7 +3163,7 @@ var DefaultPermissionPolicy = class {
|
|
|
3133
3163
|
return { permission: "auto", source: "context", reason: "file already read in this session" };
|
|
3134
3164
|
}
|
|
3135
3165
|
}
|
|
3136
|
-
if (tool.permission === "auto") {
|
|
3166
|
+
if (tool.permission === "auto" && !tool.mutating) {
|
|
3137
3167
|
return { permission: "auto", source: "default" };
|
|
3138
3168
|
}
|
|
3139
3169
|
if (this.promptDelegate) {
|
|
@@ -3556,7 +3586,7 @@ var DefaultSkillLoader = class {
|
|
|
3556
3586
|
const entries = await fsp.readdir(dir, { withFileTypes: true });
|
|
3557
3587
|
for (const e of entries) {
|
|
3558
3588
|
if (!e.isDirectory()) continue;
|
|
3559
|
-
const skillFile =
|
|
3589
|
+
const skillFile = path15.join(dir, e.name, "SKILL.md");
|
|
3560
3590
|
try {
|
|
3561
3591
|
const raw = await fsp.readFile(skillFile, "utf8");
|
|
3562
3592
|
const meta = parseFrontmatter(raw);
|
|
@@ -5530,8 +5560,8 @@ var AutonomousRunner = class {
|
|
|
5530
5560
|
init_atomic_write();
|
|
5531
5561
|
var MAX_JOURNAL_ENTRIES = 500;
|
|
5532
5562
|
function goalFilePath(projectRoot) {
|
|
5533
|
-
const hash = createHash("sha256").update(
|
|
5534
|
-
return
|
|
5563
|
+
const hash = createHash("sha256").update(path15.resolve(projectRoot)).digest("hex").slice(0, 12);
|
|
5564
|
+
return path15.join(os.homedir(), ".wrongstack", "projects", hash, "goal.json");
|
|
5535
5565
|
}
|
|
5536
5566
|
async function loadGoal(filePath) {
|
|
5537
5567
|
let raw;
|
|
@@ -11470,7 +11500,7 @@ var Director = class {
|
|
|
11470
11500
|
})),
|
|
11471
11501
|
usage: this.usage.snapshot()
|
|
11472
11502
|
};
|
|
11473
|
-
await fsp.mkdir(
|
|
11503
|
+
await fsp.mkdir(path15.dirname(this.manifestPath), { recursive: true });
|
|
11474
11504
|
await atomicWrite(this.manifestPath, JSON.stringify(manifest, null, 2), { mode: 384 });
|
|
11475
11505
|
return this.manifestPath;
|
|
11476
11506
|
}
|
|
@@ -11636,7 +11666,7 @@ var Director = class {
|
|
|
11636
11666
|
*/
|
|
11637
11667
|
async readSession(subagentId, tail) {
|
|
11638
11668
|
if (!this.sessionsRoot) return null;
|
|
11639
|
-
const filePath =
|
|
11669
|
+
const filePath = path15.join(this.sessionsRoot, this.directorRunId, `${subagentId}.jsonl`);
|
|
11640
11670
|
let raw;
|
|
11641
11671
|
try {
|
|
11642
11672
|
raw = await fsp.readFile(filePath, "utf8");
|
|
@@ -12039,13 +12069,13 @@ async function readSubagentPartial(opts, subagentId) {
|
|
|
12039
12069
|
if (!opts.sessionsRoot) return void 0;
|
|
12040
12070
|
const candidates = [];
|
|
12041
12071
|
if (opts.directorRunId) {
|
|
12042
|
-
candidates.push(
|
|
12072
|
+
candidates.push(path15.join(opts.sessionsRoot, opts.directorRunId, `${subagentId}.jsonl`));
|
|
12043
12073
|
} else {
|
|
12044
12074
|
try {
|
|
12045
12075
|
const entries = await fsp.readdir(opts.sessionsRoot, { withFileTypes: true });
|
|
12046
12076
|
for (const entry of entries) {
|
|
12047
12077
|
if (entry.isDirectory()) {
|
|
12048
|
-
candidates.push(
|
|
12078
|
+
candidates.push(path15.join(opts.sessionsRoot, entry.name, `${subagentId}.jsonl`));
|
|
12049
12079
|
}
|
|
12050
12080
|
}
|
|
12051
12081
|
} catch {
|
|
@@ -12092,9 +12122,9 @@ function makeDirectorSessionFactory(opts) {
|
|
|
12092
12122
|
let dir;
|
|
12093
12123
|
if (opts.store) {
|
|
12094
12124
|
store = opts.store;
|
|
12095
|
-
dir = opts.sessionsRoot ?
|
|
12125
|
+
dir = opts.sessionsRoot ? path15.join(opts.sessionsRoot, runId) : "(caller-managed)";
|
|
12096
12126
|
} else if (opts.sessionsRoot) {
|
|
12097
|
-
dir =
|
|
12127
|
+
dir = path15.join(opts.sessionsRoot, runId);
|
|
12098
12128
|
store = new DefaultSessionStore({ dir });
|
|
12099
12129
|
} else {
|
|
12100
12130
|
throw new Error("makeDirectorSessionFactory requires either `store` or `sessionsRoot`");
|
|
@@ -12340,7 +12370,7 @@ var DefaultModelsRegistry = class {
|
|
|
12340
12370
|
}
|
|
12341
12371
|
/** Used by `wstack models refresh` to expose where the cache lives. */
|
|
12342
12372
|
cacheLocation() {
|
|
12343
|
-
return
|
|
12373
|
+
return path15.resolve(this.cacheFile);
|
|
12344
12374
|
}
|
|
12345
12375
|
};
|
|
12346
12376
|
|
|
@@ -12624,7 +12654,7 @@ var DefaultModeStore = class {
|
|
|
12624
12654
|
}
|
|
12625
12655
|
async loadActiveMode() {
|
|
12626
12656
|
try {
|
|
12627
|
-
const configPath =
|
|
12657
|
+
const configPath = path15.join(this.configDir, "mode.json");
|
|
12628
12658
|
const content = await fsp.readFile(configPath, "utf8");
|
|
12629
12659
|
const data = JSON.parse(content);
|
|
12630
12660
|
this.activeModeId = data.activeMode ?? null;
|
|
@@ -12635,7 +12665,7 @@ var DefaultModeStore = class {
|
|
|
12635
12665
|
async saveActiveMode() {
|
|
12636
12666
|
try {
|
|
12637
12667
|
await fsp.mkdir(this.configDir, { recursive: true });
|
|
12638
|
-
const configPath =
|
|
12668
|
+
const configPath = path15.join(this.configDir, "mode.json");
|
|
12639
12669
|
await atomicWrite(
|
|
12640
12670
|
configPath,
|
|
12641
12671
|
JSON.stringify({ activeMode: this.activeModeId }, null, 2)
|
|
@@ -12650,11 +12680,11 @@ async function loadProjectModes(modesDir) {
|
|
|
12650
12680
|
const entries = await fsp.readdir(modesDir);
|
|
12651
12681
|
for (const entry of entries) {
|
|
12652
12682
|
if (!entry.endsWith(".md") && !entry.endsWith(".txt")) continue;
|
|
12653
|
-
const filePath =
|
|
12683
|
+
const filePath = path15.join(modesDir, entry);
|
|
12654
12684
|
const stat4 = await fsp.stat(filePath);
|
|
12655
12685
|
if (!stat4.isFile()) continue;
|
|
12656
12686
|
const content = await fsp.readFile(filePath, "utf8");
|
|
12657
|
-
const id =
|
|
12687
|
+
const id = path15.basename(entry, path15.extname(entry));
|
|
12658
12688
|
modes.push({
|
|
12659
12689
|
id,
|
|
12660
12690
|
name: id.replace(/[-_]/g, " ").replace(/\b\w/g, (c) => c.toUpperCase()),
|
|
@@ -12670,7 +12700,7 @@ async function loadProjectModes(modesDir) {
|
|
|
12670
12700
|
async function loadUserModes(modesDir) {
|
|
12671
12701
|
const modes = [];
|
|
12672
12702
|
try {
|
|
12673
|
-
const manifestPath =
|
|
12703
|
+
const manifestPath = path15.join(modesDir, "modes.json");
|
|
12674
12704
|
const content = await fsp.readFile(manifestPath, "utf8");
|
|
12675
12705
|
const manifest = JSON.parse(content);
|
|
12676
12706
|
for (const mode of manifest.modes) {
|
|
@@ -13587,7 +13617,7 @@ var SpecStore = class {
|
|
|
13587
13617
|
indexPath;
|
|
13588
13618
|
constructor(opts) {
|
|
13589
13619
|
this.baseDir = opts.baseDir;
|
|
13590
|
-
this.indexPath =
|
|
13620
|
+
this.indexPath = path15.join(this.baseDir, "_index.json");
|
|
13591
13621
|
}
|
|
13592
13622
|
async save(spec) {
|
|
13593
13623
|
await ensureDir(this.baseDir);
|
|
@@ -13656,7 +13686,7 @@ var SpecStore = class {
|
|
|
13656
13686
|
return updated;
|
|
13657
13687
|
}
|
|
13658
13688
|
filePath(id) {
|
|
13659
|
-
return
|
|
13689
|
+
return path15.join(this.baseDir, `${id}.json`);
|
|
13660
13690
|
}
|
|
13661
13691
|
async readIndex() {
|
|
13662
13692
|
try {
|
|
@@ -13713,7 +13743,7 @@ var TaskGraphStore = class {
|
|
|
13713
13743
|
indexPath;
|
|
13714
13744
|
constructor(opts) {
|
|
13715
13745
|
this.baseDir = opts.baseDir;
|
|
13716
|
-
this.indexPath =
|
|
13746
|
+
this.indexPath = path15.join(this.baseDir, "_index.json");
|
|
13717
13747
|
}
|
|
13718
13748
|
async save(graph) {
|
|
13719
13749
|
await ensureDir(this.baseDir);
|
|
@@ -13751,7 +13781,7 @@ var TaskGraphStore = class {
|
|
|
13751
13781
|
}
|
|
13752
13782
|
}
|
|
13753
13783
|
filePath(id) {
|
|
13754
|
-
return
|
|
13784
|
+
return path15.join(this.baseDir, `${id}.json`);
|
|
13755
13785
|
}
|
|
13756
13786
|
async readIndex() {
|
|
13757
13787
|
try {
|
|
@@ -16390,6 +16420,6 @@ var allServers = () => ({
|
|
|
16390
16420
|
"minimax-vision": { ...miniMaxVisionServer(), enabled: false }
|
|
16391
16421
|
});
|
|
16392
16422
|
|
|
16393
|
-
export { AGENTS_BY_PHASE, AGENT_CATALOG, AISpecBuilder, ALL_AGENT_DEFINITIONS, ALL_FLEET_AGENTS, AUDIT_LOG_AGENT, AutoApprovePermissionPolicy, AutoCompactionMiddleware, AutoExecutor, AutonomousRunner, BUG_HUNTER_AGENT, BudgetExceededError, ConfigMigrationError, DEFAULT_CONFIG_MIGRATIONS, DEFAULT_CONTEXT_CONFIG, DEFAULT_DIRECTOR_PREAMBLE, DEFAULT_DISPATCH_ROLE, DEFAULT_SUBAGENT_BASELINE, DEFAULT_TOOLS_CONFIG, DefaultAttachmentStore, DefaultConfigLoader, DefaultConfigStore, DefaultErrorHandler, DefaultHealthRegistry, DefaultLogger, DefaultMemoryStore, DefaultModeStore, DefaultModelsRegistry, DefaultMultiAgentCoordinator, DefaultPermissionPolicy, DefaultProviderRunner, DefaultRetryPolicy, DefaultSecretScrubber, DefaultSecretVault, DefaultSessionReader, DefaultSessionStore, DefaultSkillLoader, DefaultTaskStore, Director, DirectorStateCheckpoint, DoneConditionChecker, EternalAutonomyEngine, FLEET_ROSTER, FLEET_ROSTER_BUDGETS, FleetBus, FleetSpawnBudgetError, FleetUsageAggregator, HybridCompactor, InMemoryAgentBridge, InMemoryBridgeTransport, InMemoryMetricsSink, IntelligentCompactor, LLMSelector, NULL_FLEET_BUS, NoopMetricsSink, NoopTracer, OTelTracer, PROMETHEUS_CONTENT_TYPE, ParallelEternalEngine, QueueStore, REFACTOR_PLANNER_AGENT, RecoveryLock, SECURITY_SCANNER_AGENT, SPEC_TEMPLATES, SddParallelRun, SddTaskDecomposer, SelectiveCompactor, SessionAnalyzer, SpecDrivenDev, SpecParser, SpecStore, SpecVersioning, SubagentBudget, TaskFlow, TaskGenerator, TaskGraphStore, TaskTracker, ToolExecutor, addPlanItem, allServers, analyzeCriticalPath, applyRosterBudget, attachAutoExtend, attachPlanCheckpoint, attachTodosCheckpoint, awsServer, blockServer, braveSearchServer, buildGoalPreamble, buildOtlpMetricsRequest, buildOtlpTracesRequest, classifyFamily, clearPlan, composeDirectorPrompt, composeSubagentPrompt, context7Server, contextManagerTool, createAutoExecutor, createContextManagerTool, createDelegateTool, createMessage, decryptConfigSecrets2 as decryptConfigSecrets, deriveTodosFromPlanItem, dispatchAgent, emptyPlan, encryptConfigSecrets, everArtServer, filesystemServer, formatPlan, formatPlanTemplates, getAgentDefinition, getPlanTemplate, getTemplate, githubServer, googleMapsServer, listPlanTemplates, listTemplates, loadDirectorState, loadPlan, loadProjectModes, loadTodosCheckpoint, loadUserModes, makeAgentSubagentRunner, makeAutonomyPromptContributor, makeDirectorSessionFactory, makeLLMClassifier, migratePlaintextSecrets, miniMaxVisionServer, removePlanItem, renderProgress, renderPrometheus, renderSpecAnalysis, renderTaskGraph, renderTaskList, rewriteConfigEncrypted, rosterSummaryFromConfigs, runConfigMigrations, savePlan, saveTodosCheckpoint, scoreAgents, sentinelServer, setPlanItemStatus, slackServer, startMetricsServer, startOtlpMetricsExporter, startOtlpTraceExporter, templateToMarkdown, wireMetricsToEvents, zaiVisionServer };
|
|
16423
|
+
export { AGENTS_BY_PHASE, AGENT_CATALOG, AISpecBuilder, ALL_AGENT_DEFINITIONS, ALL_FLEET_AGENTS, AUDIT_LOG_AGENT, AutoApprovePermissionPolicy, AutoCompactionMiddleware, AutoExecutor, AutonomousRunner, BUG_HUNTER_AGENT, BudgetExceededError, ConfigMigrationError, DEFAULT_AUTONOMY_CONFIG, DEFAULT_CONFIG_MIGRATIONS, DEFAULT_CONTEXT_CONFIG, DEFAULT_DIRECTOR_PREAMBLE, DEFAULT_DISPATCH_ROLE, DEFAULT_SUBAGENT_BASELINE, DEFAULT_TOOLS_CONFIG, DefaultAttachmentStore, DefaultConfigLoader, DefaultConfigStore, DefaultErrorHandler, DefaultHealthRegistry, DefaultLogger, DefaultMemoryStore, DefaultModeStore, DefaultModelsRegistry, DefaultMultiAgentCoordinator, DefaultPermissionPolicy, DefaultProviderRunner, DefaultRetryPolicy, DefaultSecretScrubber, DefaultSecretVault, DefaultSessionReader, DefaultSessionStore, DefaultSkillLoader, DefaultTaskStore, Director, DirectorStateCheckpoint, DoneConditionChecker, EternalAutonomyEngine, FLEET_ROSTER, FLEET_ROSTER_BUDGETS, FleetBus, FleetSpawnBudgetError, FleetUsageAggregator, HybridCompactor, InMemoryAgentBridge, InMemoryBridgeTransport, InMemoryMetricsSink, IntelligentCompactor, LLMSelector, NULL_FLEET_BUS, NoopMetricsSink, NoopTracer, OTelTracer, PROMETHEUS_CONTENT_TYPE, ParallelEternalEngine, QueueStore, REFACTOR_PLANNER_AGENT, RecoveryLock, SECURITY_SCANNER_AGENT, SPEC_TEMPLATES, SddParallelRun, SddTaskDecomposer, SelectiveCompactor, SessionAnalyzer, SpecDrivenDev, SpecParser, SpecStore, SpecVersioning, SubagentBudget, TaskFlow, TaskGenerator, TaskGraphStore, TaskTracker, ToolExecutor, addPlanItem, allServers, analyzeCriticalPath, applyRosterBudget, attachAutoExtend, attachPlanCheckpoint, attachTodosCheckpoint, awsServer, blockServer, braveSearchServer, buildGoalPreamble, buildOtlpMetricsRequest, buildOtlpTracesRequest, classifyFamily, clearPlan, composeDirectorPrompt, composeSubagentPrompt, context7Server, contextManagerTool, createAutoExecutor, createContextManagerTool, createDelegateTool, createMessage, decryptConfigSecrets2 as decryptConfigSecrets, deriveTodosFromPlanItem, dispatchAgent, emptyPlan, encryptConfigSecrets, everArtServer, filesystemServer, formatPlan, formatPlanTemplates, getAgentDefinition, getPlanTemplate, getTemplate, githubServer, googleMapsServer, listPlanTemplates, listTemplates, loadDirectorState, loadPlan, loadProjectModes, loadTodosCheckpoint, loadUserModes, makeAgentSubagentRunner, makeAutonomyPromptContributor, makeDirectorSessionFactory, makeLLMClassifier, migratePlaintextSecrets, miniMaxVisionServer, removePlanItem, renderProgress, renderPrometheus, renderSpecAnalysis, renderTaskGraph, renderTaskList, rewriteConfigEncrypted, rosterSummaryFromConfigs, runConfigMigrations, savePlan, saveTodosCheckpoint, scoreAgents, sentinelServer, setPlanItemStatus, slackServer, startMetricsServer, startOtlpMetricsExporter, startOtlpTraceExporter, templateToMarkdown, wireMetricsToEvents, zaiVisionServer };
|
|
16394
16424
|
//# sourceMappingURL=index.js.map
|
|
16395
16425
|
//# sourceMappingURL=index.js.map
|