@wrongstack/core 0.7.5 → 0.7.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.
Files changed (36) hide show
  1. package/dist/agent-subagent-runner-B2zguWzh.d.ts +174 -0
  2. package/dist/coordination/index.d.ts +6 -5
  3. package/dist/defaults/index.d.ts +10 -9
  4. package/dist/defaults/index.js +324 -38
  5. package/dist/defaults/index.js.map +1 -1
  6. package/dist/execution/index.d.ts +6 -5
  7. package/dist/execution/index.js +11 -9
  8. package/dist/execution/index.js.map +1 -1
  9. package/dist/extension/index.d.ts +1 -1
  10. package/dist/{goal-store-HHgaq5ue.d.ts → goal-store-C7jcumEh.d.ts} +2 -1
  11. package/dist/{index-BUHs7xJ9.d.ts → index-BtNRyJft.d.ts} +10 -0
  12. package/dist/index.d.ts +52 -11
  13. package/dist/index.js +404 -57
  14. package/dist/index.js.map +1 -1
  15. package/dist/{multi-agent-coordinator-D8PLzfz6.d.ts → multi-agent-coordinator-3Ypfg-hr.d.ts} +2 -173
  16. package/dist/{null-fleet-bus-Bkk3gafb.d.ts → null-fleet-bus-BZUrXVcd.d.ts} +2 -1
  17. package/dist/permission-policy-D5Gj1o2K.d.ts +111 -0
  18. package/dist/{plan-templates-DWbEIJvV.d.ts → plan-templates-C-IOLJ8Q.d.ts} +1 -1
  19. package/dist/sdd/index.d.ts +173 -2
  20. package/dist/sdd/index.js +3619 -1
  21. package/dist/sdd/index.js.map +1 -1
  22. package/dist/security/index.d.ts +6 -109
  23. package/dist/security/index.js +35 -11
  24. package/dist/security/index.js.map +1 -1
  25. package/dist/storage/index.d.ts +3 -3
  26. package/dist/storage/index.js +5 -4
  27. package/dist/storage/index.js.map +1 -1
  28. package/dist/{tool-executor-Tutu4ePV.d.ts → tool-executor-CSwXjifK.d.ts} +1 -1
  29. package/dist/types/index.d.ts +2 -2
  30. package/dist/types/index.js +25 -10
  31. package/dist/types/index.js.map +1 -1
  32. package/dist/utils/index.d.ts +1 -1
  33. package/dist/utils/index.js +6 -1
  34. package/dist/utils/index.js.map +1 -1
  35. package/dist/{wstack-paths-BGu2INTm.d.ts → wstack-paths-gCrJ631C.d.ts} +10 -0
  36. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- export { A as AfterIterationHook, a as AfterRunHook, b as AfterToolExecutionHook, d as AgentExtension, B as BeforeIterationHook, h as BeforeRunHook, i as BeforeToolExecutionHook, E as ExtensionRegistry, O as OnErrorHook, s as ProviderRunnerFn, t as ProviderRunnerWrapper } from '../index-BUHs7xJ9.js';
1
+ export { A as AfterIterationHook, a as AfterRunHook, b as AfterToolExecutionHook, d as AgentExtension, B as BeforeIterationHook, h as BeforeRunHook, i as BeforeToolExecutionHook, E as ExtensionRegistry, O as OnErrorHook, s as ProviderRunnerFn, t as ProviderRunnerWrapper } from '../index-BtNRyJft.js';
2
2
  import '../context-z2x5gv_V.js';
3
3
  import '../logger-DDd5C--Z.js';
4
4
  import '../system-prompt-CWA6ml-d.js';
@@ -3,7 +3,7 @@
3
3
  * drives the EternalAutonomyEngine — every iteration of the engine
4
4
  * consults the goal to choose what to do next.
5
5
  *
6
- * Storage: `<projectRoot>/.wrongstack/goal.json`. Persistent and
6
+ * Storage: `~/.wrongstack/projects/<hash>/goal.json`. Persistent and
7
7
  * project-scoped on purpose: the goal belongs to the codebase, not the
8
8
  * REPL session.
9
9
  */
@@ -68,6 +68,7 @@ declare const MAX_JOURNAL_ENTRIES = 500;
68
68
  /**
69
69
  * Resolve the goal file path for a given project root.
70
70
  * Exposed so the engine and CLI use one canonical path.
71
+ * Uses `~/.wrongstack/projects/<hash>/goal.json` .<hash>/`.
71
72
  */
72
73
  declare function goalFilePath(projectRoot: string): string;
73
74
  declare function loadGoal(filePath: string): Promise<GoalFile | null>;
@@ -621,6 +621,16 @@ declare class Agent {
621
621
  * single tool.
622
622
  */
623
623
  private executeTools;
624
+ /**
625
+ * Fold any pending `/btw` notes into the conversation. Called at the top of
626
+ * each iteration so a note set mid-run reaches the model on its next turn.
627
+ *
628
+ * To stay valid across all provider wire families we never create two
629
+ * consecutive user messages: if the last message is a user turn (e.g. the
630
+ * tool_result block from the previous iteration) we append the note as an
631
+ * extra text block on that turn; otherwise we add a fresh user message.
632
+ */
633
+ private injectPendingBtwNotes;
624
634
  private waitForConfirm;
625
635
  private executeSingleWithDecision;
626
636
  /**
package/dist/index.d.ts CHANGED
@@ -19,12 +19,12 @@ export { D as DefaultLogger, a as DefaultLoggerOptions } from './logger-bOzkF5LL
19
19
  export { D as DefaultPathResolver, a as DefaultTokenCounter } from './path-resolver-DPUjF10O.js';
20
20
  import { b as MemoryStore } from './memory-CEXuo7sz.js';
21
21
  export { M as MemoryEntry, a as MemoryScope } from './memory-CEXuo7sz.js';
22
- export { C as CompactorOptions, D as DEFAULT_RECOVERY_STRATEGIES, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, R as RecoveryStrategy, T as ToolExecutor, c as buildRecoveryStrategies } from './tool-executor-Tutu4ePV.js';
22
+ export { C as CompactorOptions, D as DEFAULT_RECOVERY_STRATEGIES, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, R as RecoveryStrategy, T as ToolExecutor, c as buildRecoveryStrategies } from './tool-executor-CSwXjifK.js';
23
23
  import { a as SkillLoader } from './skill-CxuWrsKK.js';
24
24
  export { S as SkillEntry, b as SkillManifest } from './skill-CxuWrsKK.js';
25
25
  export { I as InputReader, P as PromptOption } from './input-reader-E-ffP2ee.js';
26
- import { u as SlashCommand, w as SystemPromptContributor, k as PluginAPI, n as PluginPipelines, C as ToolRegistryView, r as ProviderRegistryView, M as MCPRegistryView, v as SlashCommandRegistryView, E as ExtensionRegistry, S as SessionWriterView, j as MetricsSinkView, z as ToolRegistry, q as ProviderRegistry, P as Plugin } from './index-BUHs7xJ9.js';
27
- export { A as AfterIterationHook, a as AfterRunHook, b as AfterToolExecutionHook, c as Agent, d as AgentExtension, e as AgentInit, f as AgentInput, g as AgentPipelines, B as BeforeIterationHook, h as BeforeRunHook, i as BeforeToolExecutionHook, D as DEFAULT_MAX_ITERATIONS, O as OnErrorHook, l as PluginCapabilities, m as PluginDependency, p as ProviderFactory, t as ProviderRunnerWrapper, R as RunResult, F as ToolWrapper, U as UserInputPayload, G as createDefaultPipelines } from './index-BUHs7xJ9.js';
26
+ import { u as SlashCommand, w as SystemPromptContributor, k as PluginAPI, n as PluginPipelines, C as ToolRegistryView, r as ProviderRegistryView, M as MCPRegistryView, v as SlashCommandRegistryView, E as ExtensionRegistry, S as SessionWriterView, j as MetricsSinkView, z as ToolRegistry, q as ProviderRegistry, P as Plugin } from './index-BtNRyJft.js';
27
+ export { A as AfterIterationHook, a as AfterRunHook, b as AfterToolExecutionHook, c as Agent, d as AgentExtension, e as AgentInit, f as AgentInput, g as AgentPipelines, B as BeforeIterationHook, h as BeforeRunHook, i as BeforeToolExecutionHook, D as DEFAULT_MAX_ITERATIONS, O as OnErrorHook, l as PluginCapabilities, m as PluginDependency, p as ProviderFactory, t as ProviderRunnerWrapper, R as RunResult, F as ToolWrapper, U as UserInputPayload, G as createDefaultPipelines } from './index-BtNRyJft.js';
28
28
  export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from './models-registry-OG_30xqZ.js';
29
29
  import { c as ModeStore } from './mode-CV077NjV.js';
30
30
  export { D as DEFAULT_MODES, M as Mode, a as ModeConfig, b as ModeManifest } from './mode-CV077NjV.js';
@@ -33,21 +33,22 @@ export { c as BudgetExceededError, d as BudgetKind, e as BudgetLimits, i as Budg
33
33
  export { C as CriticalPathResult, D as DEFAULT_SPEC_TEMPLATE, S as SpecAnalysis, a as SpecApiEndpoint, b as SpecRequirement, c as SpecSection, d as SpecSectionType, e as SpecStatus, f as SpecTemplate, g as SpecValidationResult, h as Specification, T as TaskAssignment, i as TaskDependency, j as TaskEdge, k as TaskFilter, l as TaskGraph, m as TaskNode, n as TaskPriority, o as TaskProgress, p as TaskSort, q as TaskStatus, r as TaskType, s as computeTaskProgress, t as findCriticalPath, u as topologicalSort } from './task-graph-D1YQbpxF.js';
34
34
  export { A as AggregateHealth, H as HealthCheck, a as HealthCheckResult, b as HealthRegistry, c as HealthStatus, M as MetricLabels, d as MetricSeries, e as MetricsSink, f as MetricsSnapshot, S as Span, T as Tracer } from './observability-BhnVLBLS.js';
35
35
  export { AtomicWriteOptions, BuildChildEnvOptions, CompileFail, CompileResult, MessageRepairReport, MessageRepairResult, NewlineStyle, RequestTokenBreakdown, SafeParseResult, ToolOutputSerializerOptions, UnifiedDiffOptions, ValidationError, ValidationResult, atomicWrite, buildChildEnv, color, compileGlob, compileUserRegex, createToolOutputSerializer, detectNewlineStyle, ensureDir, estimateRequestTokens, estimateTextTokens, estimateToolDefTokens, estimateToolInputTokens, estimateToolResultTokens, formatTodosList, matchAny, matchGlob, normalizeToLf, repairToolUseAdjacency, safeParse, safeStringify, sanitizeJsonString, stripAnsi, toStyle, unifiedDiff, validateAgainstSchema } from './utils/index.js';
36
- export { W as WstackPathOptions, a as WstackPaths, p as projectHash, r as resolveWstackPaths } from './wstack-paths-BGu2INTm.js';
37
- 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-DWbEIJvV.js';
36
+ export { W as WstackPathOptions, a as WstackPaths, p as projectHash, r as resolveWstackPaths } from './wstack-paths-gCrJ631C.js';
37
+ 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-C-IOLJ8Q.js';
38
38
  export { D as DirectorStateCheckpoint, a as DirectorStateSnapshot, b as DirectorSubagentState, c as DirectorTaskState, l as loadDirectorState } from './director-state-BmYi3DGA.js';
39
- export { AutoApprovePermissionPolicy, DefaultPermissionPolicy, PermissionPolicyOptions } from './security/index.js';
39
+ export { A as AutoApprovePermissionPolicy, D as DefaultPermissionPolicy, P as PermissionPolicyOptions } from './permission-policy-D5Gj1o2K.js';
40
40
  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';
41
41
  export { DefaultProviderRunner } from './defaults/index.js';
42
- 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, q as FleetManager, r as FleetManagerOptions, 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-Bkk3gafb.js';
43
- export { A as AgentBudgetTier, a as AgentCapability, b as AgentDefinition, c as AgentFactory, d as AgentFactoryResult, e as AgentPhase, f as AgentRunnerOptions, D as DEFAULT_DISPATCH_ROLE, g as DefaultMultiAgentCoordinator, h as DispatchCandidate, i as DispatchClassifier, j as DispatchMethod, k as DispatchOptions, l as DispatchResult, F as FleetBus, m as FleetEvent, n as FleetHandler, o as FleetUsage, p as FleetUsageAggregator, q as MultiAgentCoordinatorOptions, S as SubagentUsageSnapshot, r as dispatchAgent, s as makeAgentSubagentRunner, t as makeLLMClassifier, u as scoreAgents } from './multi-agent-coordinator-D8PLzfz6.js';
42
+ 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, q as FleetManager, r as FleetManagerOptions, 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-BZUrXVcd.js';
43
+ 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-3Ypfg-hr.js';
44
+ 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-B2zguWzh.js';
44
45
  export { DefaultModeStore, LLMSelector, LLMSelectorOptions, ModeLoaderOptions, loadProjectModes, loadUserModes } from './models/index.js';
45
- export { AISpecBuilder, AISpecBuilderOptions, AISpecPhase, AISpecSession, AutoExecutor, AutoExecutorOptions, BottleneckTask, CollectedAnswer, CriticalPathAnalysis, DefaultTaskStore, ExecutionSummary, GeneratedTask, SPEC_TEMPLATES, SpecDiff, SpecDrivenDev, SpecDrivenDevOptions, SpecIndexEntry, SpecParser, SpecStore, SpecStoreOptions, SpecVersion, SpecVersioning, TaskExecutionContext, TaskExecutionResult, TaskFlow, TaskFlowEventMap, TaskFlowEventName, TaskFlowExecutionContext, TaskFlowOptions, TaskFlowPhase, TaskGenerator, TaskGeneratorOptions, TaskGraphIndexEntry, TaskGraphStore, TaskGraphStoreOptions, TaskStore, TaskTracker, TaskTrackerOptions, TaskTransition, analyzeCriticalPath, createAutoExecutor, getTemplate, listTemplates, renderProgress, renderSpecAnalysis, renderTaskGraph, renderTaskList, templateToMarkdown } from './sdd/index.js';
46
+ export { AISpecBuilder, AISpecBuilderOptions, AISpecPhase, AISpecSession, AutoExecutor, AutoExecutorOptions, BottleneckTask, CollectedAnswer, CriticalPathAnalysis, DefaultTaskStore, ExecutionSummary, GeneratedTask, 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';
46
47
  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';
47
48
  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-n2L9ohMX.js';
48
49
  export { DownloadResult, InstallResult, InstalledSkillEntry, ManifestData, ParsedRef, SkillInstaller, SkillInstallerOptions, SkillManifestStore, UpdateResult, downloadGitHubTarball, parseSkillRef } from './skills/index.js';
49
50
  export { DefaultSessionRewinder, SessionRewinderOptions } from './storage/index.js';
50
- export { G as GoalFile, J as JournalEntry, M as MAX_JOURNAL_ENTRIES, a as appendJournal, e as emptyGoal, f as formatGoal, g as goalFilePath, l as loadGoal, s as saveGoal, b as summarizeUsage } from './goal-store-HHgaq5ue.js';
51
+ export { G as GoalFile, J as JournalEntry, M as MAX_JOURNAL_ENTRIES, a as appendJournal, e as emptyGoal, f as formatGoal, g as goalFilePath, l as loadGoal, s as saveGoal, b as summarizeUsage } from './goal-store-C7jcumEh.js';
51
52
  import { a as RetryPolicy, E as ErrorHandler } from './retry-policy-OwtKNxo8.js';
52
53
  import { a as Logger } from './logger-DDd5C--Z.js';
53
54
  export { L as LogLevel } from './logger-DDd5C--Z.js';
@@ -472,6 +473,46 @@ declare function parseContinueDirective(text: string): ContinueDirective;
472
473
  */
473
474
  declare function makeContinueToNextIterationTool(): Tool;
474
475
 
476
+ /**
477
+ * `/btw` — non-aborting mid-run steering ("by the way").
478
+ *
479
+ * Unlike `/steer` (which aborts the current iteration and prepends a heavy
480
+ * STEERING preamble), `/btw` stashes a short note on the live `Context` and
481
+ * lets the agent pick it up at the NEXT iteration boundary — between tool
482
+ * batches — without tearing down in-flight work.
483
+ *
484
+ * Flow:
485
+ * 1. The `/btw <text>` slash command calls `setBtwNote(ctx, text)` on the
486
+ * live run context. Multiple notes accumulate in order.
487
+ * 2. At the top of each agent iteration (before the request is built),
488
+ * `Agent` drains the queue via `consumeBtwNotes(ctx)` and folds the
489
+ * notes into the conversation as a user-visible block.
490
+ *
491
+ * The notes live in `ctx.meta` so the slash command and the agent loop share
492
+ * one source of truth, the same way `_autonomousContinue` is plumbed in
493
+ * {@link ./continue-to-next-iteration.ts}.
494
+ */
495
+
496
+ /**
497
+ * Stash a "by the way" note on the context. The agent surfaces it at the
498
+ * start of its next iteration. Blank notes are ignored. Returns the number
499
+ * of notes now pending.
500
+ */
501
+ declare function setBtwNote(ctx: Context, text: string): number;
502
+ /** Number of notes currently waiting to be delivered. */
503
+ declare function pendingBtwCount(ctx: Context): number;
504
+ /**
505
+ * Read and clear all pending notes in one call. Returns them in the order
506
+ * they were added (empty array when none).
507
+ */
508
+ declare function consumeBtwNotes(ctx: Context): string[];
509
+ /**
510
+ * Format pending notes as the text the agent reads. Kept deliberately light
511
+ * (no "I interrupted you" framing) so the model folds the note into its
512
+ * current work rather than restarting.
513
+ */
514
+ declare function buildBtwBlock(notes: string[]): string;
515
+
475
516
  interface InputBuilderOptions {
476
517
  store: AttachmentStore;
477
518
  /**
@@ -767,4 +808,4 @@ declare function loadPlugins(plugins: Plugin[], opts: LoadPluginsOptions): Promi
767
808
  */
768
809
  declare function unloadPlugins(loadedPlugins: Plugin[], opts: LoadPluginsOptions): Promise<void>;
769
810
 
770
- export { AddAttachmentInput, AttachmentRef, AttachmentStore, BuildContext, Config, Container, ContentBlock, Context, type ContinueDirective, DefaultPluginAPI, DefaultSystemPromptBuilder, type DefaultSystemPromptBuilderOptions, type DetectedDependency, type DetectionResult, EventBus, EventName, ExtensionRegistry, type Finding, type FullScanResult, type GeneratedSecuritySkill, type GeneratedSkill, type GeneratedSkillContent, GitignoreUpdater, InputBuilder, type InputBuilderEvent, type InputBuilderOptions, KERNEL_API_VERSION, LAYER_1_IDENTITY, Listener, type LoadPluginsOptions, Logger, type MCPRegistryHandle, MCPRegistryView, MCPServerConfig, MemoryStore, MetricsSinkView, ModeStore, ModelCapabilities, type PackageManager, Plugin, PluginAPI, type PluginAPIInit, PluginPipelines, Provider, ProviderRegistry, ProviderRegistryView, ReportGenerator, type ReportOptions, type ScanOptions, type ScanResult, type ScanScope, type SecurityPattern, SecurityScanner, type SecurityScannerContext, type SecurityScannerOptions, SecurityScannerOrchestrator, SessionWriterView, type SeverityLevel, type SkillGenerationContext, SkillGenerator, type SkillGeneratorOptions, SkillLoader, SlashCommand, SlashCommandRegistry, SlashCommandRegistryView, SystemPromptBuilder, SystemPromptContributor, type TechStack, TechStackDetector, type TechStackInfo, TextBlock, Tool, ToolRegistry, ToolRegistryView, createMcpControlTool, createSecuritySlashCommand, defaultGitignoreUpdater, defaultOrchestrator, defaultReportGenerator, defaultSecurityScanner, defaultSkillGenerator, defaultTechStackDetector, loadPlugins, makeContinueToNextIterationTool, parseContinueDirective, securitySlashCommand, unloadPlugins };
811
+ export { AddAttachmentInput, AttachmentRef, AttachmentStore, BuildContext, Config, Container, ContentBlock, Context, type ContinueDirective, DefaultPluginAPI, DefaultSystemPromptBuilder, type DefaultSystemPromptBuilderOptions, type DetectedDependency, type DetectionResult, EventBus, EventName, ExtensionRegistry, type Finding, type FullScanResult, type GeneratedSecuritySkill, type GeneratedSkill, type GeneratedSkillContent, GitignoreUpdater, InputBuilder, type InputBuilderEvent, type InputBuilderOptions, KERNEL_API_VERSION, LAYER_1_IDENTITY, Listener, type LoadPluginsOptions, Logger, type MCPRegistryHandle, MCPRegistryView, MCPServerConfig, MemoryStore, MetricsSinkView, ModeStore, ModelCapabilities, type PackageManager, Plugin, PluginAPI, type PluginAPIInit, PluginPipelines, Provider, ProviderRegistry, ProviderRegistryView, ReportGenerator, type ReportOptions, type ScanOptions, type ScanResult, type ScanScope, type SecurityPattern, SecurityScanner, type SecurityScannerContext, type SecurityScannerOptions, SecurityScannerOrchestrator, SessionWriterView, type SeverityLevel, type SkillGenerationContext, SkillGenerator, type SkillGeneratorOptions, SkillLoader, SlashCommand, SlashCommandRegistry, SlashCommandRegistryView, SystemPromptBuilder, SystemPromptContributor, type TechStack, TechStackDetector, type TechStackInfo, TextBlock, Tool, ToolRegistry, ToolRegistryView, buildBtwBlock, consumeBtwNotes, createMcpControlTool, createSecuritySlashCommand, defaultGitignoreUpdater, defaultOrchestrator, defaultReportGenerator, defaultSecurityScanner, defaultSkillGenerator, defaultTechStackDetector, loadPlugins, makeContinueToNextIterationTool, parseContinueDirective, pendingBtwCount, securitySlashCommand, setBtwNote, unloadPlugins };