@noetic-tools/core 3.2.0 → 4.0.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.
Files changed (94) hide show
  1. package/dist/adapters/in-memory-subprocess/manifest-persistence.d.ts +1 -1
  2. package/dist/adapters/in-memory-subprocess/types.d.ts +1 -1
  3. package/dist/adapters/openrouter.d.ts +2 -2
  4. package/dist/adapters/openrouter.js +2 -2
  5. package/dist/builders/context-builder.d.ts +11 -0
  6. package/dist/builders/context-builder.js +15 -0
  7. package/dist/builders/context-option.d.ts +23 -0
  8. package/dist/builders/context-option.js +22 -0
  9. package/dist/builders/control-flow-builders.d.ts +19 -19
  10. package/dist/builders/every.d.ts +4 -4
  11. package/dist/builders/layer-provides-builders.d.ts +1 -1
  12. package/dist/builders/layer-provides-builders.js +1 -1
  13. package/dist/builders/loop-builder.d.ts +3 -3
  14. package/dist/builders/provide-builder.d.ts +14 -7
  15. package/dist/builders/provide-builder.js +15 -4
  16. package/dist/builders/spawn-builder.d.ts +8 -6
  17. package/dist/builders/spawn-builder.js +7 -2
  18. package/dist/builders/step-builders.d.ts +19 -20
  19. package/dist/builders/tool-builder.d.ts +9 -5
  20. package/dist/builders/tool-builder.js +3 -2
  21. package/dist/builders/workflow-hydrator.d.ts +17 -4
  22. package/dist/builders/workflow-hydrator.js +87 -8
  23. package/dist/builders/workflow-step.d.ts +61 -0
  24. package/dist/builders/workflow-step.js +126 -0
  25. package/dist/conditions/conditions.d.ts +17 -17
  26. package/dist/conditions/conditions.js +1 -1
  27. package/dist/deprecated.d.ts +30 -0
  28. package/dist/deprecated.js +28 -0
  29. package/dist/harness/agent-harness.d.ts +30 -26
  30. package/dist/harness/agent-harness.js +23 -19
  31. package/dist/harness/deps/{memory.d.ts → context.d.ts} +2 -2
  32. package/dist/harness/deps/{memory.js → context.js} +1 -1
  33. package/dist/harness/deps/types.d.ts +1 -1
  34. package/dist/harness/model-schema.d.ts +2 -2
  35. package/dist/index.d.ts +21 -17
  36. package/dist/index.js +14 -8
  37. package/dist/interpreter/action-deps.d.ts +3 -3
  38. package/dist/interpreter/action-deps.js +2 -2
  39. package/dist/interpreter/action-types.d.ts +1 -1
  40. package/dist/interpreter/collect-tools.d.ts +1 -1
  41. package/dist/interpreter/execute-action.d.ts +10 -10
  42. package/dist/interpreter/execute-action.js +13 -13
  43. package/dist/interpreter/execute-control.d.ts +4 -4
  44. package/dist/interpreter/execute-control.js +1 -1
  45. package/dist/interpreter/execute-sub-harness.d.ts +1 -1
  46. package/dist/interpreter/execute.d.ts +3 -3
  47. package/dist/interpreter/execute.js +78 -31
  48. package/dist/interpreter/step-dispatcher.d.ts +3 -3
  49. package/dist/interpreter/sub-harness-events.d.ts +2 -2
  50. package/dist/interpreter/typeguards.d.ts +4 -4
  51. package/dist/patterns/dynamic-workflow.d.ts +7 -4
  52. package/dist/patterns/dynamic-workflow.js +2 -0
  53. package/dist/patterns/interview.d.ts +2 -2
  54. package/dist/patterns/plans.d.ts +5 -5
  55. package/dist/patterns/ralph-wiggum.d.ts +2 -2
  56. package/dist/patterns/react.d.ts +7 -5
  57. package/dist/patterns/react.js +6 -4
  58. package/dist/portable/builders.js +2 -0
  59. package/dist/portable/context-layers.d.ts +8 -0
  60. package/dist/portable/context-layers.js +8 -0
  61. package/dist/portable.d.ts +2 -2
  62. package/dist/portable.js +2 -2
  63. package/dist/runtime/context-deps.d.ts +2 -2
  64. package/dist/runtime/context-deps.js +1 -1
  65. package/dist/runtime/context-impl.d.ts +10 -8
  66. package/dist/runtime/context-impl.js +11 -7
  67. package/dist/runtime/context-type-deps.d.ts +1 -1
  68. package/dist/runtime/durable/checkpoint-store.d.ts +1 -1
  69. package/dist/runtime/durable/harness-checkpoints.d.ts +2 -3
  70. package/dist/runtime/durable/harness-checkpoints.js +2 -3
  71. package/dist/runtime/durable/step-ledger.d.ts +1 -1
  72. package/dist/runtime/durable/step-ledger.js +1 -1
  73. package/dist/runtime/in-memory-storage.d.ts +1 -1
  74. package/dist/runtime/session-runner.d.ts +1 -1
  75. package/dist/runtime/step-registry.d.ts +3 -3
  76. package/dist/runtime/{tool-memory.d.ts → tool-context.d.ts} +1 -2
  77. package/dist/runtime/{tool-memory.js → tool-context.js} +5 -2
  78. package/dist/runtime/tool-ui.d.ts +1 -1
  79. package/dist/runtime/tool-ui.js +1 -1
  80. package/dist/schemas/workflow.d.ts +5 -279
  81. package/dist/schemas/workflow.js +4 -376
  82. package/dist/types/mutable-context.d.ts +2 -2
  83. package/dist/types/step-registrar.d.ts +1 -1
  84. package/dist/unstable.d.ts +5 -5
  85. package/dist/unstable.js +3 -3
  86. package/dist/until/predicates.d.ts +1 -1
  87. package/package.json +4 -4
  88. package/schema/noetic-workflow.schema.json +28 -0
  89. package/dist/builders/memory-builder.d.ts +0 -11
  90. package/dist/builders/memory-builder.js +0 -15
  91. package/dist/patterns/flow.d.ts +0 -2
  92. package/dist/patterns/flow.js +0 -1
  93. package/dist/portable/memory-layers.d.ts +0 -8
  94. package/dist/portable/memory-layers.js +0 -8
@@ -2,12 +2,13 @@ import { frameworkCast, ItemSchemaRegistry, NoeticConfigError } from '@noetic-to
2
2
  import { SpanImpl } from '../observability/span-impl.js';
3
3
  import { NoopExporter } from '../observability/trace-exporter.js';
4
4
  import { createInMemoryFsAdapter, createInMemoryShellAdapter, createInMemorySubprocessAdapter, OpenRouter, } from './deps/adapters.js';
5
+ import { afterModelCallLayers, allocateBudgets, assembleView, beforeToolCallLayers, completeLayers, contextToExecCtx, createLayerStateStore, createRecallCache, DEFAULT_PROJECTION, disposeLayers, executeRerender, initLayers, projectHistoryLayers, recallLayers, recallLayersAtomic, recallLayersEventual, resolveLayerTools, runAppendPipeline, storeLayers, } from './deps/context.js';
5
6
  import { collectAllTools, deduplicateTools, dispatchStepThroughAdapter, execute, } from './deps/interpreter.js';
6
- import { afterModelCallLayers, allocateBudgets, assembleView, beforeToolCallLayers, completeLayers, contextToExecCtx, createLayerStateStore, createRecallCache, DEFAULT_PROJECTION, disposeLayers, executeRerender, initLayers, projectHistoryLayers, recallLayers, recallLayersAtomic, recallLayersEventual, resolveLayerTools, runAppendPipeline, storeLayers, } from './deps/memory.js';
7
7
  import { buildItemStream, ChannelStore, ContextImpl, captureCheckpoint, clearCheckpoint, collectContextTree, createInMemoryStorage, createStepLedgerStore, filterReasoningStream, filterTextStream, resolveStepLedgerRetention, restoreFromCheckpoint, SessionRunner, StepLedger, snapshotCwdState, } from './deps/runtime.js';
8
8
  import { SteeringAction } from './deps/types.js';
9
9
  import { AgentHarnessModelCaller } from './model-call.js';
10
10
  export { createStreamIdleWatchdog } from './model-call.js';
11
+ import { resolveContextOption } from '../builders/context-option.js';
11
12
  import { buildItemSchemaRegistry } from './model-schema.js';
12
13
  //#endregion
13
14
  const DEFAULT_THREAD_ID = '__default__';
@@ -104,8 +105,8 @@ function createClient(config) {
104
105
  }
105
106
  //#region AgentHarness
106
107
  /**
107
- * Default agent harness for executing agent steps with built-in channel, memory, and trace support.
108
- * Provides channel store, memory layer lifecycle, and trace export with no external dependencies.
108
+ * Default agent harness for executing agent steps with built-in channel, context, and trace support.
109
+ * Provides channel store, context layer lifecycle, and trace export with no external dependencies.
109
110
  *
110
111
  * Messages submitted via `execute()` are enqueued on a per-thread session and
111
112
  * processed by a `SessionRunner`. Consumers observe responses via the session-
@@ -139,10 +140,10 @@ export class AgentHarness {
139
140
  initialStep;
140
141
  /** Harness-wide tool pool merged into every context's `unifiedTools`. */
141
142
  harnessTools;
142
- /** @internal Memory layers configured for this harness. Exposed non-private
143
+ /** @internal Context layers configured for this harness. Exposed non-private
143
144
  * so free functions in `runtime/durable/` (checkpoint/restore) can read it
144
145
  * without friend-class gymnastics. Do not access from outside core. */
145
- _memory;
146
+ _contextLayers;
146
147
  client;
147
148
  channelStore;
148
149
  callModelOverride;
@@ -201,7 +202,7 @@ export class AgentHarness {
201
202
  this.stepLedgerRetention = resolveStepLedgerRetention(opts.stepLedgerRetention);
202
203
  this.initialStep = opts.initialStep;
203
204
  this.harnessTools = opts.tools ?? [];
204
- this._memory = opts.memory;
205
+ this._contextLayers = resolveContextOption(opts);
205
206
  this.callModelOverride = opts._testCallModel;
206
207
  this.client = opts._testCallModel ? undefined : createClient(opts.llm);
207
208
  this.channelStore = new ChannelStore();
@@ -209,7 +210,7 @@ export class AgentHarness {
209
210
  this.layerStateStore =
210
211
  opts.layerStateStore ??
211
212
  createLayerStateStore((layerId, hook, error) => {
212
- console.warn(`[noetic] memory layer '${layerId}' ${hook} error:`, error);
213
+ console.warn(`[noetic] context layer '${layerId}' ${hook} error:`, error);
213
214
  });
214
215
  this.recallCache = createRecallCache();
215
216
  this.defaultDeliveryMode = opts.defaultDeliveryMode ?? 'next-turn';
@@ -322,7 +323,7 @@ export class AgentHarness {
322
323
  threadId,
323
324
  agentName: this.config.name,
324
325
  // The first queued message in a batch establishes `resourceId` /
325
- // `state` / `memory` for the turn. If multiple messages are drained
326
+ // `state` / `context` for the turn. If multiple messages are drained
326
327
  // together (queue flush), later messages' values for these fields
327
328
  // are ignored. `deliveryMode` is resolved per-message at enqueue
328
329
  // time and doesn't apply here.
@@ -337,7 +338,7 @@ export class AgentHarness {
337
338
  threadId,
338
339
  resourceId: perTurnOptions.resourceId,
339
340
  state: perTurnOptions.state,
340
- memory: perTurnOptions.memory,
341
+ context: resolveContextOption(perTurnOptions),
341
342
  _broadcaster: session.runner.broadcaster,
342
343
  });
343
344
  const ext = frameworkCast(ctx);
@@ -419,8 +420,8 @@ export class AgentHarness {
419
420
  ...this.harnessTools,
420
421
  ]);
421
422
  }
422
- // Hydrate/recall/persist memory on the bare `run()` path too (issue #48):
423
- // configuring `memory` + `storage` must "just work" without going through
423
+ // Hydrate/recall/persist context on the bare `run()` path too (issue #48):
424
+ // configuring `context` + `storage` must "just work" without going through
424
425
  // `execute()`/`seedSessionHistory`. Idempotent — see `ensureLayersInit`.
425
426
  await this.ensureLayersInit(ctx);
426
427
  return execute(s, input, ctx);
@@ -458,11 +459,14 @@ export class AgentHarness {
458
459
  return dispatchStepThroughAdapter(this, s, input, parentCtx, overrides);
459
460
  }
460
461
  createContext(opts) {
461
- const { memory: memoryLayers, cwdInit, ...rest } = opts ?? {};
462
- const effectiveMemory = memoryLayers ?? this._memory;
462
+ const resolved = opts ?? {};
463
+ // `ContextImpl` takes the layers as `layers`, so both option spellings are
464
+ // dropped from `rest` rather than spread through under the wrong name.
465
+ const { context: _context, memory: _memory, cwdInit, ...rest } = resolved;
466
+ const effectiveLayers = resolveContextOption(resolved) ?? this._contextLayers;
463
467
  const itemSchemas = buildItemSchemaRegistry({
464
468
  base: this.itemSchemas,
465
- layers: effectiveMemory,
469
+ layers: effectiveLayers,
466
470
  });
467
471
  /* The execution id is chosen here rather than inside ContextImpl so the ledger
468
472
  * can be keyed to it — the ledger's storage keys and `ctx.id` must agree for a
@@ -473,7 +477,7 @@ export class AgentHarness {
473
477
  id: executionId,
474
478
  harness: this,
475
479
  channelStore: this.channelStore,
476
- layers: effectiveMemory,
480
+ layers: effectiveLayers,
477
481
  itemSchemas,
478
482
  cwdState: resolveContextCwdState(this.rootCwdState, opts?.parent, cwdInit),
479
483
  // Without this `ctx.checkpoint()` is inert, and the boundaries below never
@@ -586,7 +590,7 @@ export class AgentHarness {
586
590
  }
587
591
  /**
588
592
  * Compute the items array that would be sent to the model on the next turn —
589
- * the same arrangement `executeLLM` builds: harness-level memory layers'
593
+ * the same arrangement `executeLLM` builds: harness-level context layers'
590
594
  * recall outputs concatenated with the session's accumulated history.
591
595
  *
592
596
  * Read-mostly: `recallLayers` writes layer-state snapshots to
@@ -606,7 +610,7 @@ export class AgentHarness {
606
610
  const ctx = this.createContext({
607
611
  items: historyItems,
608
612
  threadId,
609
- memory: this._memory,
613
+ context: this._contextLayers,
610
614
  });
611
615
  const layers = ctx.layers ?? [];
612
616
  if (layers.length === 0) {
@@ -679,7 +683,7 @@ export class AgentHarness {
679
683
  * checkpoint via `CheckpointStore.clear()` and start a fresh execution.
680
684
  *
681
685
  * `opts` is the `createContext`-shaped wiring the host attached to the
682
- * original context (broadcaster, parent, state, memory overrides). A
686
+ * original context (broadcaster, parent, state, context overrides). A
683
687
  * snapshot recovers data, not live objects — pass the same wiring here or
684
688
  * the resumed run gets an undecorated context and whatever depended on that
685
689
  * wiring (event streaming, mid-turn injection) stops working without
@@ -712,7 +716,7 @@ export class AgentHarness {
712
716
  //#endregion
713
717
  /**
714
718
  * Cancel an execution: abort `ctx` and every live descendant context, then
715
- * run the memory-layer teardown for each (spec 09, Cancellation).
719
+ * run the context-layer teardown for each (spec 09, Cancellation).
716
720
  *
717
721
  * The abort itself fans out top-down and synchronously — `ctx.abort()`
718
722
  * cascades into every live fork path and spawn child, so no corner of the
@@ -1,2 +1,2 @@
1
- export type { LayerStateStore, RecallCache } from '@noetic-tools/memory';
2
- export { afterModelCallLayers, allocateBudgets, assembleView, beforeToolCallLayers, completeLayers, contextToExecCtx, createLayerStateStore, createRecallCache, DEFAULT_PROJECTION, disposeLayers, executeRerender, initLayers, projectHistoryLayers, recallLayers, recallLayersAtomic, recallLayersEventual, resolveLayerTools, runAppendPipeline, storeLayers, } from '@noetic-tools/memory';
1
+ export type { LayerStateStore, RecallCache } from '@noetic-tools/context';
2
+ export { afterModelCallLayers, allocateBudgets, assembleView, beforeToolCallLayers, completeLayers, contextToExecCtx, createLayerStateStore, createRecallCache, DEFAULT_PROJECTION, disposeLayers, executeRerender, initLayers, projectHistoryLayers, recallLayers, recallLayersAtomic, recallLayersEventual, resolveLayerTools, runAppendPipeline, storeLayers, } from '@noetic-tools/context';
@@ -1 +1 @@
1
- export { afterModelCallLayers, allocateBudgets, assembleView, beforeToolCallLayers, completeLayers, contextToExecCtx, createLayerStateStore, createRecallCache, DEFAULT_PROJECTION, disposeLayers, executeRerender, initLayers, projectHistoryLayers, recallLayers, recallLayersAtomic, recallLayersEventual, resolveLayerTools, runAppendPipeline, storeLayers, } from '@noetic-tools/memory';
1
+ export { afterModelCallLayers, allocateBudgets, assembleView, beforeToolCallLayers, completeLayers, contextToExecCtx, createLayerStateStore, createRecallCache, DEFAULT_PROJECTION, disposeLayers, executeRerender, initLayers, projectHistoryLayers, recallLayers, recallLayersAtomic, recallLayersEventual, resolveLayerTools, runAppendPipeline, storeLayers, } from '@noetic-tools/context';
@@ -1,4 +1,4 @@
1
- export type { ContextMemory, ExecutionContext, MemoryLayer, ProjectionPolicy, StorageAdapter, } from '@noetic-tools/memory';
1
+ export type { ContextData, ContextLayer, ExecutionContext, ProjectionPolicy, StorageAdapter, } from '@noetic-tools/context';
2
2
  export type { AgentConfig, AgentHarnessContract, AgentHooks, CallModelRequest, Channel, ChannelHandle, Context, CwdState, DeliveryMode, DetachedHandle, ExecuteInput, ExecuteOptions, ExternalChannel, FsAdapter, HarnessResponse, HarnessStatus, Item, ItemSchemaExtensions, LLMResponse, LlmProviderConfig, RecallLayerOutput, SessionScope, ShellAdapter, Span, SteeringDecision, Step, StreamEvent, StreamingItem, SubHarnessSession, SubprocessAdapter, Tool, TraceExporter, } from '@noetic-tools/types';
3
3
  export { SteeringAction } from '@noetic-tools/types';
4
4
  export type { ZodType } from 'zod';
@@ -1,8 +1,8 @@
1
- import type { MemoryLayer } from '@noetic-tools/memory';
1
+ import type { ContextLayer } from '@noetic-tools/context';
2
2
  import type { Item, ItemSchemaRegistry, Tool } from '@noetic-tools/types';
3
3
  export declare function buildItemSchemaRegistry({ base, layers, tools, }: {
4
4
  base: ItemSchemaRegistry;
5
- layers?: ReadonlyArray<MemoryLayer>;
5
+ layers?: ReadonlyArray<ContextLayer>;
6
6
  tools?: ReadonlyArray<Tool>;
7
7
  }): ItemSchemaRegistry;
8
8
  /**
package/dist/index.d.ts CHANGED
@@ -9,6 +9,8 @@ export { createOpenRouterEmbed } from './adapters/openrouter.js';
9
9
  /** @public */
10
10
  export { channel } from './builders/channel-builder.js';
11
11
  /** @public */
12
+ export { context } from './builders/context-builder.js';
13
+ /** @public */
12
14
  export { branch, fork } from './builders/control-flow-builders.js';
13
15
  /** @public */
14
16
  export type { EveryOptions } from './builders/every.js';
@@ -21,20 +23,20 @@ export type { LoopConfig } from './builders/loop-builder.js';
21
23
  /** @public */
22
24
  export { loop } from './builders/loop-builder.js';
23
25
  /** @public */
24
- export { memory } from './builders/memory-builder.js';
25
- /** @public */
26
26
  export { provide } from './builders/provide-builder.js';
27
27
  /** @public */
28
28
  export { spawn } from './builders/spawn-builder.js';
29
29
  /** @public */
30
- export { step } from './builders/step-builders.js';
31
- /** @public */
32
30
  export { tool, toolWithGenerator } from './builders/tool-builder.js';
33
31
  /** @public */
34
32
  export type { HydrationContext } from './builders/workflow-hydrator.js';
35
33
  /** @public */
36
34
  export { hydrateNode, hydrateWorkflow } from './builders/workflow-hydrator.js';
37
35
  /** @public */
36
+ export type { StepWorkflowOpts } from './builders/workflow-step.js';
37
+ /** @public */
38
+ export { step } from './builders/workflow-step.js';
39
+ /** @public */
38
40
  export type { Condition, OtherwiseClause, WhenClause } from './conditions/conditions.js';
39
41
  /** @public */
40
42
  export { aiCondition, allCondition, anyCondition, embeddingMatch, otherwise, semanticRoute, semanticSwitch, when, } from './conditions/conditions.js';
@@ -55,7 +57,7 @@ export { execute } from './interpreter/execute.js';
55
57
  /** @public */
56
58
  /** @public */
57
59
  /** @public */
58
- export type { DurableTaskState, FactExtractor, FactSearcher, HistoryWindowConfig, ObservationalMemoryConfig, ObservationalState, PlanEnterSessionCallback, PlanExecutionEntry, PlanExitCallback, PlanMemoryConfig, PlanState, TemporalFact, TemporalMemoryConfig, TemporalSearchResult, WorkingMemoryConfig, WorkingMemoryState, } from '@noetic-tools/memory';
60
+ export type { DurableTaskState, FactExtractor, FactSearcher, HistoryWindowConfig, ObservationalContextConfig, ObservationalState, PlanContextConfig, PlanEnterSessionCallback, PlanExecutionEntry, PlanExitCallback, PlanState, TemporalContextConfig, TemporalFact, TemporalSearchResult, WorkingMemoryContextConfig, WorkingMemoryContextState, } from '@noetic-tools/context';
59
61
  /** @public */
60
62
  /** @public */
61
63
  /** @public */
@@ -68,7 +70,7 @@ export type { DurableTaskState, FactExtractor, FactSearcher, HistoryWindowConfig
68
70
  /** @public */
69
71
  /** @public */
70
72
  /** @public */
71
- export { durableTaskState, fileReference, findFunctionCall, historyWindow, observationalMemory, PlanPhase, planMemory, staticContent, steering, storageGetMany, stripUnresolvedToolCalls, temporalMemory, toolMemoryLayer, workingMemory, } from '@noetic-tools/memory';
73
+ export { durableTaskState, fileReference, findFunctionCall, historyWindow, observationalContext, PlanPhase, planContext, staticContent, steering, storageGetMany, stripUnresolvedToolCalls, temporalContext, toolContextLayer, workingMemoryContext, } from '@noetic-tools/context';
72
74
  /** @public */
73
75
  export { createMessage, estimateTokens } from '@noetic-tools/types';
74
76
  /** @public */
@@ -82,10 +84,6 @@ export type { DynamicWorkflowOpts, ParseAndRunWorkflowOpts } from './patterns/dy
82
84
  /** @public */
83
85
  export { dynamicWorkflow, parseAndRunWorkflow } from './patterns/dynamic-workflow.js';
84
86
  /** @public */
85
- export type { FlowNode, ForkFlowNode, LlmFlowNode, SequenceFlowNode, SpawnFlowNode, SubagentFlowNode, } from './patterns/flow.js';
86
- /** @public */
87
- export { FlowSchema, flowDepth, validateFlow, walkFlow } from './patterns/flow.js';
88
- /** @public */
89
87
  export type { InterviewOpts, InterviewQuestionAnswer, InterviewResult } from './patterns/interview.js';
90
88
  /** @public */
91
89
  export { interview } from './patterns/interview.js';
@@ -108,14 +106,14 @@ export { getRegistry, lookupStep, registerStep } from './runtime/step-registry.j
108
106
  /** @public */
109
107
  export { defaultItemSchemaRegistry, ItemSchema, ItemSchemaRegistry } from '@noetic-tools/types';
110
108
  /** @public */
111
- export type { BranchRoute, BranchWorkflowNode, EveryWorkflowNode, ForkWorkflowNode, LlmWorkflowNode, LoopWorkflowNode, MergeStrategy, ProvideWorkflowNode, SequenceWorkflowNode, SpawnWorkflowNode, SubHarnessWorkflowNode, ToolWorkflowNode, UntilPredicate, WorkflowDocument, WorkflowNode, } from './schemas/workflow.js';
109
+ export type { BranchRoute, BranchWorkflowNode, EveryWorkflowNode, ForkWorkflowNode, LlmWorkflowNode, LoopWorkflowNode, MergeStrategy, ProvideWorkflowNode, SequenceWorkflowNode, SpawnWorkflowNode, SubflowWorkflowNode, SubHarnessWorkflowNode, ToolWorkflowNode, UntilPredicate, WorkflowDocument, WorkflowNode, } from './schemas/workflow.js';
112
110
  /** @public */
113
111
  export { MergeStrategySchema, UntilPredicateSchema, validateWorkflow, WorkflowDocumentSchema, WorkflowNodeSchema, walkWorkflow, workflowDepth, } from './schemas/workflow.js';
114
112
  /** @public */
115
113
  export type { Channel, ChannelHandle, ExternalChannel } from '@noetic-tools/types';
116
114
  /** @public */
117
115
  /** @public */
118
- export type { LLMResponse, LlmProviderConfig, ModelParams, RetryPolicy, ServerToolSpec, StepMeta, TokenUsage, Tool, ToolMemoryDeclaration, } from '@noetic-tools/types';
116
+ export type { LLMResponse, LlmProviderConfig, ModelParams, RetryPolicy, ServerToolSpec, StepMeta, TokenUsage, Tool, ToolContextDeclaration, } from '@noetic-tools/types';
119
117
  /** @public */
120
118
  export { isServerToolSpec } from '@noetic-tools/types';
121
119
  /** @public */
@@ -139,13 +137,13 @@ export type { NoeticError } from '@noetic-tools/types';
139
137
  /** @public */
140
138
  export type { ContentPart, DeveloperMessageExtensionItem, ExecuteInput, ExtendedItem, ExtensionItem, FileSearchItem, FunctionCallItem, FunctionCallOutputItem, ImageGenerationItem, InferExtendedItem, InputContentPart, InputFilePart, InputImagePart, InputMessageItem, InputTextPart, Item, ItemBase, ItemSchemaExtensions, MessageItem, OutputItem, OutputTextPart, ReasoningItem, ReasoningTextPart, RefusalPart, ServerToolItem, SummaryTextPart, WebSearchItem, } from '@noetic-tools/types';
141
139
  /** @public */
142
- export type { BudgetConfig, CompleteParams, ContextMemory, DisposeParams, InferMemory, InferMemoryShape, InitParams, InitResult, LayerDataDecl, LayerFunctionDecl, LayerProvides, LayerTimeouts, MemoryConfig, MemoryHooks, MemoryLayer, ProjectionPolicy, RecallParams, RecallResult, ReturnParams, ReturnResult, ScopedStorage, SpawnParams, SpawnResult, StorageAdapter, StoreParams, StoreResult, } from '@noetic-tools/memory';
140
+ export type { BudgetConfig, CompleteParams, ContextConfig, ContextData, ContextLayer, ContextLayerHooks, DisposeParams, InferContext, InferContextShape, InitParams, InitResult, LayerDataDecl, LayerFunctionDecl, LayerProvides, LayerTimeouts, ProjectionPolicy, RecallParams, RecallResult, ReturnParams, ReturnResult, ScopedStorage, SpawnParams, SpawnResult, StorageAdapter, StoreParams, StoreResult, } from '@noetic-tools/context';
143
141
  /** @public */
144
- export { Slot } from '@noetic-tools/memory';
142
+ export { Slot } from '@noetic-tools/context';
145
143
  /** @public */
146
- export type { ExecutionContext, ExecutionOutcome, MemoryCallModelRequest, MemoryScope, } from '@noetic-tools/types';
144
+ export type { ContextScope, ExecutionContext, ExecutionOutcome, LayerCallModelRequest, } from '@noetic-tools/types';
147
145
  /** @public */
148
- export type { MemoryTraceSpan, Span, TraceExporter } from '@noetic-tools/types';
146
+ export type { LayerTraceSpan, Span, TraceExporter } from '@noetic-tools/types';
149
147
  /** @public */
150
148
  export type { FrameworkStreamEvent, HarnessResponse, SdkStreamEvent, StreamEvent, StreamingItem, } from '@noetic-tools/types';
151
149
  /** @public */
@@ -170,10 +168,16 @@ export { TIMEOUT_ERROR_PREFIX } from '@noetic-tools/types';
170
168
  /** @public Reusable error-serialiser used by custom SubprocessAdapter implementations. */
171
169
  export { serializeError } from './adapters/in-memory-subprocess/metadata.js';
172
170
  /** @public */
173
- export type { ToolExecutionContext, ToolMemory } from '@noetic-tools/types';
171
+ export type { ToolContext, ToolExecutionContext } from '@noetic-tools/types';
174
172
  /** @public */
175
173
  export { all, any } from './until/combinators.js';
176
174
  /** @public */
177
175
  export type { ConvergeConfig, VerifyFn } from './until/predicates.js';
178
176
  /** @public */
179
177
  export { until } from './until/predicates.js';
178
+ /**
179
+ * Pre-rename names for the context layer system — `MemoryLayer`, `memory()`,
180
+ * `workingMemory`, and friends. Each carries its own `@deprecated` pointer to
181
+ * its replacement in `./deprecated`. Removed in the next major.
182
+ */
183
+ export * from './deprecated.js';
package/dist/index.js CHANGED
@@ -12,6 +12,8 @@ export { createOpenRouterEmbed } from './adapters/openrouter.js';
12
12
  /** @public */
13
13
  export { channel } from './builders/channel-builder.js';
14
14
  /** @public */
15
+ export { context } from './builders/context-builder.js';
16
+ /** @public */
15
17
  export { branch, fork } from './builders/control-flow-builders.js';
16
18
  /** @public */
17
19
  export { every } from './builders/every.js';
@@ -20,18 +22,16 @@ export { layerData, layerFn } from './builders/layer-provides-builders.js';
20
22
  /** @public */
21
23
  export { loop } from './builders/loop-builder.js';
22
24
  /** @public */
23
- export { memory } from './builders/memory-builder.js';
24
- /** @public */
25
25
  export { provide } from './builders/provide-builder.js';
26
26
  /** @public */
27
27
  export { spawn } from './builders/spawn-builder.js';
28
28
  /** @public */
29
- export { step } from './builders/step-builders.js';
30
- /** @public */
31
29
  export { tool, toolWithGenerator } from './builders/tool-builder.js';
32
30
  /** @public */
33
31
  export { hydrateNode, hydrateWorkflow } from './builders/workflow-hydrator.js';
34
32
  /** @public */
33
+ export { step } from './builders/workflow-step.js';
34
+ /** @public */
35
35
  export { aiCondition, allCondition, anyCondition, embeddingMatch, otherwise, semanticRoute, semanticSwitch, when, } from './conditions/conditions.js';
36
36
  /** @public */
37
37
  export { cosineSimilarity } from './conditions/cosine-similarity.js';
@@ -58,7 +58,7 @@ export { execute } from './interpreter/execute.js';
58
58
  /** @public */
59
59
  /** @public */
60
60
  /** @public */
61
- export { durableTaskState, fileReference, findFunctionCall, historyWindow, observationalMemory, PlanPhase, planMemory, staticContent, steering, storageGetMany, stripUnresolvedToolCalls, temporalMemory, toolMemoryLayer, workingMemory, } from '@noetic-tools/memory';
61
+ export { durableTaskState, fileReference, findFunctionCall, historyWindow, observationalContext, PlanPhase, planContext, staticContent, steering, storageGetMany, stripUnresolvedToolCalls, temporalContext, toolContextLayer, workingMemoryContext, } from '@noetic-tools/context';
62
62
  //#endregion
63
63
  //#region Message Utilities
64
64
  /** @public */
@@ -74,8 +74,6 @@ export { createInMemoryStorage } from './runtime/in-memory-storage.js';
74
74
  /** @public */
75
75
  export { dynamicWorkflow, parseAndRunWorkflow } from './patterns/dynamic-workflow.js';
76
76
  /** @public */
77
- export { FlowSchema, flowDepth, validateFlow, walkFlow } from './patterns/flow.js';
78
- /** @public */
79
77
  export { interview } from './patterns/interview.js';
80
78
  /** @public */
81
79
  export { adaptivePlan, compilePlan, PlanNodeSchema } from './patterns/plans.js';
@@ -106,7 +104,7 @@ export { DetachedStatus } from '@noetic-tools/types';
106
104
  /** @public */
107
105
  export { CheckpointSchemaVersion, CheckpointSnapshotSchema, CwdSnapshotSchema, FrontierFrameSchema, ItemLogSnapshotSchema, PendingAskUserSnapshotSchema, } from './types/checkpoint.js';
108
106
  /** @public */
109
- export { Slot } from '@noetic-tools/memory';
107
+ export { Slot } from '@noetic-tools/context';
110
108
  /** @public */
111
109
  export { LedgerEntryKind, SteeringAction } from '@noetic-tools/types';
112
110
  /** @public */
@@ -122,3 +120,11 @@ export { all, any } from './until/combinators.js';
122
120
  /** @public */
123
121
  export { until } from './until/predicates.js';
124
122
  //#endregion
123
+ //#region Deprecated aliases
124
+ /**
125
+ * Pre-rename names for the context layer system — `MemoryLayer`, `memory()`,
126
+ * `workingMemory`, and friends. Each carries its own `@deprecated` pointer to
127
+ * its replacement in `./deprecated`. Removed in the next major.
128
+ */
129
+ export * from './deprecated.js';
130
+ //#endregion
@@ -1,8 +1,8 @@
1
- export type { LayerStateStore } from '@noetic-tools/memory';
2
- export { allocateBudgets, assembleView, commitLayerUsage, computeLayerUsage, contextToExecCtx, DEFAULT_PROJECTION, resolveLayerTools, returnLayers, spawnLayers, } from '@noetic-tools/memory';
1
+ export type { LayerStateStore } from '@noetic-tools/context';
2
+ export { allocateBudgets, assembleView, commitLayerUsage, computeLayerUsage, contextToExecCtx, DEFAULT_PROJECTION, resolveLayerTools, returnLayers, spawnLayers, } from '@noetic-tools/context';
3
3
  export type { ItemSchemaRegistry } from '@noetic-tools/types';
4
4
  export { defaultItemSchemaRegistry } from '@noetic-tools/types';
5
5
  export { emitFrameworkEvent, getBroadcaster, shouldEmit } from '../runtime/broadcaster-utils.js';
6
6
  export { ContextImpl } from '../runtime/context-impl.js';
7
7
  export { snapshotCwdState } from '../runtime/cwd-helpers.js';
8
- export { buildToolExecutionContext } from '../runtime/tool-memory.js';
8
+ export { buildToolExecutionContext } from '../runtime/tool-context.js';
@@ -1,6 +1,6 @@
1
- export { allocateBudgets, assembleView, commitLayerUsage, computeLayerUsage, contextToExecCtx, DEFAULT_PROJECTION, resolveLayerTools, returnLayers, spawnLayers, } from '@noetic-tools/memory';
1
+ export { allocateBudgets, assembleView, commitLayerUsage, computeLayerUsage, contextToExecCtx, DEFAULT_PROJECTION, resolveLayerTools, returnLayers, spawnLayers, } from '@noetic-tools/context';
2
2
  export { defaultItemSchemaRegistry } from '@noetic-tools/types';
3
3
  export { emitFrameworkEvent, getBroadcaster, shouldEmit } from '../runtime/broadcaster-utils.js';
4
4
  export { ContextImpl } from '../runtime/context-impl.js';
5
5
  export { snapshotCwdState } from '../runtime/cwd-helpers.js';
6
- export { buildToolExecutionContext } from '../runtime/tool-memory.js';
6
+ export { buildToolExecutionContext } from '../runtime/tool-context.js';
@@ -1,3 +1,3 @@
1
- export type { ContextMemory, ExecutionContext, MemoryConfig, MemoryLayer, } from '@noetic-tools/memory';
1
+ export type { ContextConfig, ContextData, ContextLayer, ExecutionContext, } from '@noetic-tools/context';
2
2
  export type { AgentHarnessContract, Context, ContextRerenderRequest, ExecuteStepFn, FunctionCallItem, Item, ProjectionPolicy, RecallLayerOutput, RetryPolicy, ServerToolSpec, StepLLM, StepMeta, StepProvide, StepRun, StepSpawn, StepTool, Tool, } from '@noetic-tools/types';
3
3
  export { isServerToolSpec, SteeringAction } from '@noetic-tools/types';
@@ -4,7 +4,7 @@ import type { Step, Tool } from '@noetic-tools/types';
4
4
  * declared on LLM steps. Used to build the unified tool set
5
5
  * that gets sent with every LLM call for prompt cache efficiency.
6
6
  */
7
- export declare function collectAllTools<TMemory = unknown, I = unknown, O = unknown>(step: Step<TMemory, I, O>): Tool[];
7
+ export declare function collectAllTools<TContext = unknown, I = unknown, O = unknown>(step: Step<TContext, I, O>): Tool[];
8
8
  /**
9
9
  * Deduplicates tools by name, keeping the first occurrence.
10
10
  */
@@ -2,31 +2,31 @@
2
2
  * Action step handlers: run, llm, spawn, provide, tool.
3
3
  */
4
4
  import type { ItemSchemaRegistry, LayerStateStore } from './action-deps.js';
5
- import type { AgentHarnessContract, Context, ExecuteStepFn, MemoryLayer, StepLLM, StepProvide, StepRun, StepSpawn, StepTool } from './action-types.js';
6
- export declare function executeRun<TMemory, I, O>(step: StepRun<TMemory, I, O>, input: I, ctx: Context<TMemory>): Promise<O>;
5
+ import type { AgentHarnessContract, Context, ContextLayer, ExecuteStepFn, StepLLM, StepProvide, StepRun, StepSpawn, StepTool } from './action-types.js';
6
+ export declare function executeRun<TContext, I, O>(step: StepRun<TContext, I, O>, input: I, ctx: Context<TContext>): Promise<O>;
7
7
  /**
8
8
  * Resolves a `Lazy<T>` step field. If the value is a function, it is invoked
9
9
  * with the current context; otherwise the value is returned as-is. Supports
10
10
  * both sync and async getters.
11
11
  *
12
12
  * Lazy fields let a step inspect `ctx.harness.config.params`, `ctx.unifiedTools`,
13
- * or memory layer state to produce per-execution values (model, instructions,
13
+ * or context layer state to produce per-execution values (model, instructions,
14
14
  * tools) without baking them in at build time.
15
15
  */
16
- export declare function resolveLazy<T, TMemory>(value: T | ((ctx: Context<TMemory>) => T | Promise<T>), ctx: Context<TMemory>): Promise<T>;
17
- export declare function executeLLM<TMemory, I, O>(step: StepLLM<TMemory, I, O>, input: I, ctx: Context<TMemory>, layers?: MemoryLayer[]): Promise<O>;
16
+ export declare function resolveLazy<T, TContext>(value: T | ((ctx: Context<TContext>) => T | Promise<T>), ctx: Context<TContext>): Promise<T>;
17
+ export declare function executeLLM<TContext, I, O>(step: StepLLM<TContext, I, O>, input: I, ctx: Context<TContext>, layers?: ContextLayer[]): Promise<O>;
18
18
  export interface ExecuteSpawnOpts {
19
19
  layerStore?: LayerStateStore;
20
- parentLayers?: MemoryLayer[];
20
+ parentLayers?: ContextLayer[];
21
21
  itemSchemas?: ItemSchemaRegistry;
22
22
  }
23
- export declare function executeSpawn<TMemory, I, O>(step: StepSpawn<TMemory, I, O>, input: I, ctx: Context<TMemory>, executeStep: ExecuteStepFn, opts?: ExecuteSpawnOpts): Promise<O>;
23
+ export declare function executeSpawn<TContext, I, O>(step: StepSpawn<TContext, I, O>, input: I, ctx: Context<TContext>, executeStep: ExecuteStepFn, opts?: ExecuteSpawnOpts): Promise<O>;
24
24
  /**
25
- * Executes a provide step by attaching memory layers to the current context
25
+ * Executes a provide step by attaching context layers to the current context
26
26
  * without creating an isolated child context.
27
27
  *
28
28
  * Unlike spawn, provide does not create a new itemLog or clone state.
29
29
  * Events flow through to the parent in real-time.
30
30
  */
31
- export declare function executeProvide<TMemory, I, O>(step: StepProvide<TMemory, I, O>, input: I, ctx: Context<TMemory>, executeStep: ExecuteStepFn): Promise<O>;
32
- export declare function executeTool<TMemory, I, O>(step: StepTool<TMemory, I, O>, input: I, ctx: Context<TMemory>, harness: AgentHarnessContract, layers?: MemoryLayer[]): Promise<O>;
31
+ export declare function executeProvide<TContext, I, O>(step: StepProvide<TContext, I, O>, input: I, ctx: Context<TContext>, executeStep: ExecuteStepFn): Promise<O>;
32
+ export declare function executeTool<TContext, I, O>(step: StepTool<TContext, I, O>, input: I, ctx: Context<TContext>, harness: AgentHarnessContract, layers?: ContextLayer[]): Promise<O>;
@@ -93,7 +93,7 @@ function mergeRecallResults(base, overrides, slotOf) {
93
93
  * both sync and async getters.
94
94
  *
95
95
  * Lazy fields let a step inspect `ctx.harness.config.params`, `ctx.unifiedTools`,
96
- * or memory layer state to produce per-execution values (model, instructions,
96
+ * or context layer state to produce per-execution values (model, instructions,
97
97
  * tools) without baking them in at build time.
98
98
  */
99
99
  export async function resolveLazy(value, ctx) {
@@ -266,7 +266,7 @@ export async function executeLLM(step, input, ctx, layers) {
266
266
  const hasLayers = layers !== undefined && layers.length > 0;
267
267
  // Resolve lazy step fields up-front. Function-form getters run once per
268
268
  // step execution with the live context, so `ctx.harness.config.params`,
269
- // `ctx.unifiedTools`, and memory layer state are all visible at resolution.
269
+ // `ctx.unifiedTools`, and context layer state are all visible at resolution.
270
270
  const resolvedModel = await resolveLazy(step.model, ctx);
271
271
  if (!resolvedModel || resolvedModel.trim() === '') {
272
272
  throw new NoeticConfigError({
@@ -509,19 +509,19 @@ export async function executeLLM(step, input, ctx, layers) {
509
509
  retriesExhausted: true,
510
510
  });
511
511
  }
512
- function isMemoryConfig(value) {
512
+ function isContextConfig(value) {
513
513
  return typeof value === 'object' && value !== null && 'layers' in value;
514
514
  }
515
515
  function resolveLayersForSpawn(step, parentLayers) {
516
- if (!step.memory) {
516
+ if (!step.context) {
517
517
  return parentLayers ?? [];
518
518
  }
519
- if (isMemoryConfig(step.memory)) {
519
+ if (isContextConfig(step.context)) {
520
520
  return [
521
- ...step.memory.layers,
521
+ ...step.context.layers,
522
522
  ];
523
523
  }
524
- return step.memory;
524
+ return step.context;
525
525
  }
526
526
  async function collectSpawnItems({ layers, parentExecutionCtx, childExecutionCtx, layerStore, itemSchemas = defaultItemSchemaRegistry, }) {
527
527
  const spawnResults = await spawnLayers({
@@ -563,7 +563,7 @@ export async function executeSpawn(step, input, ctx, executeStep, opts) {
563
563
  });
564
564
  const layerStore = opts?.layerStore;
565
565
  const hasLayers = layers.length > 0 && layerStore !== undefined;
566
- // Collect items from memory layers via onSpawn hooks
566
+ // Collect items from context layers via onSpawn hooks
567
567
  let childItems = [];
568
568
  let parentExecutionCtx;
569
569
  if (hasLayers) {
@@ -594,7 +594,7 @@ export async function executeSpawn(step, input, ctx, executeStep, opts) {
594
594
  // Create child context — empty by default, layers provide items via onSpawn.
595
595
  // `id: childId` keeps the ContextImpl's id in sync with the executionId
596
596
  // used by spawnLayers/returnLayers in the layer-state store, so writes via
597
- // `ctx.memory[layerId]` and spawn-boundary hooks read from the same key.
597
+ // `ctx.context[layerId]` and spawn-boundary hooks read from the same key.
598
598
  const childCtx = new ContextImpl({
599
599
  harness: baseCtx.harness,
600
600
  parent: baseCtx,
@@ -648,12 +648,12 @@ export async function executeSpawn(step, input, ctx, executeStep, opts) {
648
648
  //#endregion
649
649
  //#region provide
650
650
  function resolveLayers(step) {
651
- if (isMemoryConfig(step.memory)) {
651
+ if (isContextConfig(step.context)) {
652
652
  return [
653
- ...step.memory.layers,
653
+ ...step.context.layers,
654
654
  ];
655
655
  }
656
- return step.memory;
656
+ return step.context;
657
657
  }
658
658
  function mergeLayers(existing, provided) {
659
659
  if (!existing || existing.length === 0) {
@@ -668,7 +668,7 @@ function mergeLayers(existing, provided) {
668
668
  ];
669
669
  }
670
670
  /**
671
- * Executes a provide step by attaching memory layers to the current context
671
+ * Executes a provide step by attaching context layers to the current context
672
672
  * without creating an isolated child context.
673
673
  *
674
674
  * Unlike spawn, provide does not create a new itemLog or clone state.
@@ -3,14 +3,14 @@
3
3
  */
4
4
  import type { Context, ExecuteStepFn, StepBranch, StepEvery, StepFork, StepLoop } from '@noetic-tools/types';
5
5
  import type { ItemSchemaRegistry, LayerStateStore } from './action-deps.js';
6
- export declare function executeBranch<TMemory, I, O>(step: StepBranch<TMemory, I, O>, input: I, ctx: Context<TMemory>, executeStep: ExecuteStepFn): Promise<O>;
6
+ export declare function executeBranch<TContext, I, O>(step: StepBranch<TContext, I, O>, input: I, ctx: Context<TContext>, executeStep: ExecuteStepFn): Promise<O>;
7
7
  /** Layer-boundary wiring supplied by the interpreter (see `buildSpawnOpts`). */
8
8
  export interface ExecuteForkOpts {
9
9
  layerStore?: LayerStateStore;
10
10
  itemSchemas?: ItemSchemaRegistry;
11
11
  }
12
- export declare function executeFork<TMemory, I, O>(step: StepFork<TMemory, I, O>, input: I, ctx: Context<TMemory>, rawExecuteStep: ExecuteStepFn, opts?: ExecuteForkOpts): Promise<O>;
13
- export declare function executeLoop<TMemory, I, O>(step: StepLoop<TMemory, I, O>, input: I, ctx: Context<TMemory>, executeStep: ExecuteStepFn): Promise<O>;
12
+ export declare function executeFork<TContext, I, O>(step: StepFork<TContext, I, O>, input: I, ctx: Context<TContext>, rawExecuteStep: ExecuteStepFn, opts?: ExecuteForkOpts): Promise<O>;
13
+ export declare function executeLoop<TContext, I, O>(step: StepLoop<TContext, I, O>, input: I, ctx: Context<TContext>, executeStep: ExecuteStepFn): Promise<O>;
14
14
  /**
15
15
  * Executes an `every` step: runs the body step forever, paced by `ms ± jitter`,
16
16
  * woken early by `wakeOn`. Throws `cancelled` when the context is aborted.
@@ -23,4 +23,4 @@ export declare function executeLoop<TMemory, I, O>(step: StepLoop<TMemory, I, O>
23
23
  * The body's output is discarded — `every` runs forever and does not accumulate
24
24
  * iteration outputs. Only ever returns by throwing on cancellation or `fail`.
25
25
  */
26
- export declare function executeEvery<TMemory, I, O>(step: StepEvery<TMemory, I, O>, input: I, ctx: Context<TMemory>, executeStep: ExecuteStepFn): Promise<O>;
26
+ export declare function executeEvery<TContext, I, O>(step: StepEvery<TContext, I, O>, input: I, ctx: Context<TContext>, executeStep: ExecuteStepFn): Promise<O>;
@@ -44,7 +44,7 @@ function createChildContexts(ctx, count, stepId) {
44
44
  channelStore,
45
45
  cwdState: snapshotCwdState(ctx),
46
46
  // Layers and the harness tool pool cross the fork boundary: without
47
- // them an `llm` step inside a path would run with no memory
47
+ // them an `llm` step inside a path would run with no context
48
48
  // projection and no layer tools, and a nested `spawn` would have no
49
49
  // parent layers to inherit. Per-path layer STATE is still isolated —
50
50
  // see `createForkLayerBridge`.
@@ -5,4 +5,4 @@
5
5
  * `executeLLM`.
6
6
  */
7
7
  import type { Context, StepSubHarness } from '@noetic-tools/types';
8
- export declare function executeSubHarness<TMemory, I, O>(step: StepSubHarness<TMemory, I, O>, input: I, ctx: Context<TMemory>): Promise<O>;
8
+ export declare function executeSubHarness<TContext, I, O>(step: StepSubHarness<TContext, I, O>, input: I, ctx: Context<TContext>): Promise<O>;
@@ -1,4 +1,4 @@
1
- import type { ContextMemory } from '@noetic-tools/memory';
1
+ import type { ContextData } from '@noetic-tools/context';
2
2
  import type { Context, Step } from '@noetic-tools/types';
3
3
  /**
4
4
  * @internal
@@ -12,7 +12,7 @@ import type { Context, Step } from '@noetic-tools/types';
12
12
  * through the adapter as normal, so per-step overrides on descendants
13
13
  * continue to work.
14
14
  */
15
- export declare function executeNoAdapter<TMemory, I, O>(step: Step<TMemory, I, O>, input: I, ctx: Context<TMemory>): Promise<O>;
15
+ export declare function executeNoAdapter<TContext, I, O>(step: Step<TContext, I, O>, input: I, ctx: Context<TContext>): Promise<O>;
16
16
  /**
17
17
  * Executes a step within the interpreter, dispatching to the appropriate handler by step kind.
18
18
  *
@@ -23,4 +23,4 @@ export declare function executeNoAdapter<TMemory, I, O>(step: Step<TMemory, I, O
23
23
  * @throws `NoeticError` with kind `step_failed` if max depth is exceeded or an unknown step kind is encountered.
24
24
  * @throws `NoeticError` with kind `cancelled` if the context is aborted.
25
25
  */
26
- export declare function execute<TMemory = ContextMemory, I = unknown, O = unknown>(step: Step<TMemory, I, O>, input: I, ctx: Context<TMemory>): Promise<O>;
26
+ export declare function execute<TContext = ContextData, I = unknown, O = unknown>(step: Step<TContext, I, O>, input: I, ctx: Context<TContext>): Promise<O>;