@noetic-tools/core 0.1.0 → 0.1.1

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 (198) hide show
  1. package/README.md +31 -11
  2. package/dist/adapters/in-memory-fs-adapter.d.ts +1 -1
  3. package/dist/adapters/in-memory-fs-adapter.js +1 -1
  4. package/dist/adapters/in-memory-shell-adapter.d.ts +1 -1
  5. package/dist/adapters/in-memory-subprocess/manifest-persistence.d.ts +3 -3
  6. package/dist/adapters/in-memory-subprocess/manifest-persistence.js +1 -1
  7. package/dist/adapters/in-memory-subprocess/metadata.d.ts +1 -1
  8. package/dist/adapters/in-memory-subprocess/step-completion.d.ts +1 -1
  9. package/dist/adapters/in-memory-subprocess/step-completion.js +1 -1
  10. package/dist/adapters/in-memory-subprocess/types.d.ts +2 -2
  11. package/dist/adapters/in-memory-subprocess-adapter.d.ts +3 -3
  12. package/dist/adapters/in-memory-subprocess-adapter.js +3 -3
  13. package/dist/adapters/openrouter.d.ts +7 -7
  14. package/dist/adapters/openrouter.js +5 -5
  15. package/dist/builders/channel-builder.d.ts +1 -1
  16. package/dist/builders/control-flow-builders.d.ts +3 -3
  17. package/dist/builders/control-flow-builders.js +3 -3
  18. package/dist/builders/every.d.ts +3 -3
  19. package/dist/builders/every.js +2 -2
  20. package/dist/builders/layer-provides-builders.d.ts +1 -1
  21. package/dist/builders/layer-provides-builders.js +1 -1
  22. package/dist/builders/loop-builder.d.ts +2 -2
  23. package/dist/builders/loop-builder.js +2 -2
  24. package/dist/builders/memory-builder.d.ts +1 -1
  25. package/dist/builders/memory-builder.js +1 -1
  26. package/dist/builders/provide-builder.d.ts +2 -2
  27. package/dist/builders/provide-builder.js +2 -2
  28. package/dist/builders/spawn-builder.d.ts +3 -3
  29. package/dist/builders/spawn-builder.js +2 -2
  30. package/dist/builders/step-builders.d.ts +6 -6
  31. package/dist/builders/step-builders.js +2 -2
  32. package/dist/builders/tool-builder.d.ts +3 -3
  33. package/dist/builders/tool-builder.js +1 -1
  34. package/dist/builders/workflow-hydrator.d.ts +4 -4
  35. package/dist/builders/workflow-hydrator.js +10 -10
  36. package/dist/conditions/conditions.d.ts +4 -4
  37. package/dist/conditions/conditions.js +2 -2
  38. package/dist/errors/noetic-error.d.ts +1 -1
  39. package/dist/harness/agent-harness.d.ts +6 -6
  40. package/dist/harness/agent-harness.js +13 -13
  41. package/dist/harness/deps/adapters.d.ts +3 -3
  42. package/dist/harness/deps/adapters.js +3 -3
  43. package/dist/harness/deps/interpreter.d.ts +5 -5
  44. package/dist/harness/deps/interpreter.js +4 -4
  45. package/dist/harness/deps/memory.d.ts +5 -5
  46. package/dist/harness/deps/memory.js +4 -4
  47. package/dist/harness/deps/runtime.d.ts +10 -10
  48. package/dist/harness/deps/runtime.js +7 -7
  49. package/dist/harness/deps/types.d.ts +16 -16
  50. package/dist/harness/deps/types.js +1 -1
  51. package/dist/harness/model-call.d.ts +4 -4
  52. package/dist/harness/model-call.js +5 -5
  53. package/dist/harness/model-schema.d.ts +4 -4
  54. package/dist/harness/model-schema.js +1 -1
  55. package/dist/harness/step-bootstrap.js +2 -2
  56. package/dist/index.d.ts +96 -94
  57. package/dist/index.js +57 -55
  58. package/dist/internal-test.d.ts +4 -4
  59. package/dist/internal-test.js +4 -4
  60. package/dist/interpreter/action-deps.d.ts +12 -12
  61. package/dist/interpreter/action-deps.js +10 -10
  62. package/dist/interpreter/action-types.d.ts +8 -8
  63. package/dist/interpreter/action-types.js +1 -1
  64. package/dist/interpreter/collect-tools.d.ts +2 -2
  65. package/dist/interpreter/collect-tools.js +1 -1
  66. package/dist/interpreter/execute-action.d.ts +2 -2
  67. package/dist/interpreter/execute-action.js +10 -10
  68. package/dist/interpreter/execute-control.d.ts +2 -2
  69. package/dist/interpreter/execute-control.js +7 -7
  70. package/dist/interpreter/execute.d.ts +3 -3
  71. package/dist/interpreter/execute.js +8 -8
  72. package/dist/interpreter/message-helpers.d.ts +1 -1
  73. package/dist/interpreter/message-helpers.js +1 -1
  74. package/dist/interpreter/step-dispatcher.d.ts +5 -5
  75. package/dist/interpreter/step-dispatcher.js +2 -2
  76. package/dist/interpreter/typeguards.d.ts +7 -7
  77. package/dist/interpreter/typeguards.js +2 -2
  78. package/dist/memory/budget.d.ts +2 -2
  79. package/dist/memory/budget.js +1 -1
  80. package/dist/memory/exec-context-factory.d.ts +2 -2
  81. package/dist/memory/exec-context-factory.js +1 -1
  82. package/dist/memory/function-call-utils.d.ts +1 -1
  83. package/dist/memory/function-call-utils.js +1 -1
  84. package/dist/memory/layer-api.d.ts +4 -4
  85. package/dist/memory/layer-api.js +2 -2
  86. package/dist/memory/layer-lifecycle.d.ts +6 -6
  87. package/dist/memory/layer-lifecycle.js +6 -6
  88. package/dist/memory/layer-provides.d.ts +1 -1
  89. package/dist/memory/layer-usage.d.ts +4 -4
  90. package/dist/memory/layer-usage.js +1 -1
  91. package/dist/memory/layers/durable-task-state.d.ts +8 -8
  92. package/dist/memory/layers/durable-task-state.js +2 -2
  93. package/dist/memory/layers/file-reference.d.ts +1 -1
  94. package/dist/memory/layers/file-reference.js +2 -2
  95. package/dist/memory/layers/history-window.d.ts +1 -1
  96. package/dist/memory/layers/history-window.js +4 -4
  97. package/dist/memory/layers/observational-memory.d.ts +5 -5
  98. package/dist/memory/layers/observational-memory.js +2 -2
  99. package/dist/memory/layers/plan.d.ts +2 -2
  100. package/dist/memory/layers/plan.js +5 -5
  101. package/dist/memory/layers/static-content.d.ts +2 -2
  102. package/dist/memory/layers/static-content.js +1 -1
  103. package/dist/memory/layers/steering.d.ts +7 -7
  104. package/dist/memory/layers/steering.js +5 -5
  105. package/dist/memory/layers/tool-memory-layer.d.ts +2 -2
  106. package/dist/memory/layers/tool-memory-layer.js +1 -1
  107. package/dist/memory/layers/working-memory.d.ts +7 -7
  108. package/dist/memory/layers/working-memory.js +4 -4
  109. package/dist/memory/projector.d.ts +2 -2
  110. package/dist/memory/scope.d.ts +1 -1
  111. package/dist/memory/strip-unresolved.d.ts +1 -1
  112. package/dist/observability/span-impl.d.ts +1 -1
  113. package/dist/observability/trace-exporter.d.ts +2 -2
  114. package/dist/observability/trace-exporter.js +1 -1
  115. package/dist/patterns/dynamic-workflow.d.ts +5 -5
  116. package/dist/patterns/dynamic-workflow.js +5 -5
  117. package/dist/patterns/flow.d.ts +2 -2
  118. package/dist/patterns/flow.js +1 -1
  119. package/dist/patterns/interview.d.ts +2 -2
  120. package/dist/patterns/interview.js +5 -5
  121. package/dist/patterns/plans.d.ts +3 -3
  122. package/dist/patterns/plans.js +2 -2
  123. package/dist/patterns/ralph-wiggum.d.ts +4 -4
  124. package/dist/patterns/ralph-wiggum.js +5 -5
  125. package/dist/patterns/react.d.ts +3 -3
  126. package/dist/patterns/react.js +5 -5
  127. package/dist/portable/adapters.d.ts +3 -3
  128. package/dist/portable/adapters.js +3 -3
  129. package/dist/portable/ask-user.d.ts +2 -2
  130. package/dist/portable/ask-user.js +1 -1
  131. package/dist/portable/builders.d.ts +6 -6
  132. package/dist/portable/builders.js +6 -6
  133. package/dist/portable/memory-layers.d.ts +6 -6
  134. package/dist/portable/memory-layers.js +6 -6
  135. package/dist/portable/runtime.d.ts +2 -2
  136. package/dist/portable/runtime.js +2 -2
  137. package/dist/portable/until.d.ts +2 -2
  138. package/dist/portable/until.js +2 -2
  139. package/dist/portable.d.ts +7 -7
  140. package/dist/portable.js +7 -7
  141. package/dist/runtime/broadcaster-utils.d.ts +2 -2
  142. package/dist/runtime/channel-store.d.ts +1 -1
  143. package/dist/runtime/channel-store.js +2 -2
  144. package/dist/runtime/context-deps.d.ts +4 -4
  145. package/dist/runtime/context-deps.js +2 -2
  146. package/dist/runtime/context-impl.d.ts +1 -1
  147. package/dist/runtime/context-impl.js +2 -2
  148. package/dist/runtime/context-type-deps.d.ts +14 -14
  149. package/dist/runtime/cwd-helpers.d.ts +1 -1
  150. package/dist/runtime/detached-handle.d.ts +3 -3
  151. package/dist/runtime/detached-handle.js +3 -3
  152. package/dist/runtime/durable/checkpoint-store.d.ts +2 -2
  153. package/dist/runtime/durable/checkpoint-store.js +2 -2
  154. package/dist/runtime/durable/harness-checkpoints.d.ts +6 -6
  155. package/dist/runtime/durable/harness-checkpoints.js +2 -2
  156. package/dist/runtime/durable/index.d.ts +10 -10
  157. package/dist/runtime/durable/index.js +5 -5
  158. package/dist/runtime/durable/runnable-loop.d.ts +4 -4
  159. package/dist/runtime/durable/session-seed.d.ts +1 -1
  160. package/dist/runtime/durable/stall-nudge.d.ts +3 -3
  161. package/dist/runtime/event-broadcaster.d.ts +1 -1
  162. package/dist/runtime/in-memory-storage.d.ts +1 -1
  163. package/dist/runtime/in-memory-storage.js +1 -1
  164. package/dist/runtime/item-log-impl.d.ts +3 -3
  165. package/dist/runtime/item-log-impl.js +1 -1
  166. package/dist/runtime/message-queue.d.ts +2 -2
  167. package/dist/runtime/session-runner.d.ts +7 -7
  168. package/dist/runtime/session-runner.js +3 -3
  169. package/dist/runtime/session-streams.d.ts +3 -3
  170. package/dist/runtime/session-streams.js +1 -1
  171. package/dist/runtime/step-registry.d.ts +2 -2
  172. package/dist/runtime/step-registry.js +3 -3
  173. package/dist/runtime/tool-memory.d.ts +3 -3
  174. package/dist/schemas/item.d.ts +1 -1
  175. package/dist/types/common.d.ts +1 -1
  176. package/dist/types/context-parts/item-log.d.ts +1 -1
  177. package/dist/types/context-parts/layer-usage.d.ts +1 -1
  178. package/dist/types/context.d.ts +23 -23
  179. package/dist/types/harness-result.d.ts +2 -2
  180. package/dist/types/memory-context.d.ts +4 -4
  181. package/dist/types/memory.d.ts +6 -6
  182. package/dist/types/mutable-context.d.ts +3 -3
  183. package/dist/types/runtime.d.ts +14 -14
  184. package/dist/types/steering.d.ts +2 -2
  185. package/dist/types/step-registrar.d.ts +1 -1
  186. package/dist/types/step.d.ts +7 -7
  187. package/dist/types/tool-context.d.ts +6 -6
  188. package/dist/types/tool.d.ts +1 -1
  189. package/dist/unstable.d.ts +8 -8
  190. package/dist/unstable.js +6 -6
  191. package/dist/until/combinators.d.ts +1 -1
  192. package/dist/until/never.d.ts +1 -1
  193. package/dist/until/predicates.d.ts +4 -4
  194. package/dist/until/predicates.js +2 -2
  195. package/dist/util/message-helpers.d.ts +3 -3
  196. package/package.json +6 -4
  197. package/dist/conditions/index.d.ts +0 -3
  198. package/dist/conditions/index.js +0 -2
package/dist/index.js CHANGED
@@ -1,134 +1,136 @@
1
1
  //#region Adapters
2
2
  /** @public */
3
- export { createInMemoryFsAdapter } from './adapters/in-memory-fs-adapter';
3
+ export { createInMemoryFsAdapter } from './adapters/in-memory-fs-adapter.js';
4
4
  /** @public */
5
- export { createInMemoryShellAdapter } from './adapters/in-memory-shell-adapter';
5
+ export { createInMemoryShellAdapter } from './adapters/in-memory-shell-adapter.js';
6
6
  /** @public */
7
- export { createInMemorySubprocessAdapter } from './adapters/in-memory-subprocess-adapter';
7
+ export { createInMemorySubprocessAdapter } from './adapters/in-memory-subprocess-adapter.js';
8
8
  /** @public */
9
- export { createOpenRouterEmbed } from './adapters/openrouter';
9
+ export { createOpenRouterEmbed } from './adapters/openrouter.js';
10
10
  //#endregion
11
11
  //#region Builders
12
12
  /** @public */
13
- export { channel } from './builders/channel-builder';
13
+ export { channel } from './builders/channel-builder.js';
14
14
  /** @public */
15
- export { branch, fork } from './builders/control-flow-builders';
15
+ export { branch, fork } from './builders/control-flow-builders.js';
16
16
  /** @public */
17
- export { every } from './builders/every';
17
+ export { every } from './builders/every.js';
18
18
  /** @public */
19
- export { layerData, layerFn } from './builders/layer-provides-builders';
19
+ export { layerData, layerFn } from './builders/layer-provides-builders.js';
20
20
  /** @public */
21
- export { loop } from './builders/loop-builder';
21
+ export { loop } from './builders/loop-builder.js';
22
22
  /** @public */
23
- export { memory } from './builders/memory-builder';
23
+ export { memory } from './builders/memory-builder.js';
24
24
  /** @public */
25
- export { provide } from './builders/provide-builder';
25
+ export { provide } from './builders/provide-builder.js';
26
26
  /** @public */
27
- export { spawn } from './builders/spawn-builder';
27
+ export { spawn } from './builders/spawn-builder.js';
28
28
  /** @public */
29
- export { step } from './builders/step-builders';
29
+ export { step } from './builders/step-builders.js';
30
30
  /** @public */
31
- export { tool, toolWithGenerator } from './builders/tool-builder';
31
+ export { tool, toolWithGenerator } from './builders/tool-builder.js';
32
32
  /** @public */
33
- export { hydrateNode, hydrateWorkflow } from './builders/workflow-hydrator';
33
+ export { hydrateNode, hydrateWorkflow } from './builders/workflow-hydrator.js';
34
34
  /** @public */
35
- export { aiCondition, allCondition, anyCondition, cosineSimilarity, embeddingMatch, otherwise, semanticRoute, semanticSwitch, when, } from './conditions';
35
+ export { aiCondition, allCondition, anyCondition, embeddingMatch, otherwise, semanticRoute, semanticSwitch, when, } from './conditions/conditions.js';
36
+ /** @public */
37
+ export { cosineSimilarity } from './conditions/cosine-similarity.js';
36
38
  //#endregion
37
39
  //#region Errors
38
40
  /** @public */
39
- export { isNoeticConfigError, NoeticConfigError } from './errors/noetic-config-error';
41
+ export { isNoeticConfigError, NoeticConfigError } from './errors/noetic-config-error.js';
40
42
  /** @public */
41
- export { isNoeticError, NoeticErrorImpl } from './errors/noetic-error';
43
+ export { isNoeticError, NoeticErrorImpl } from './errors/noetic-error.js';
42
44
  /** @public */
43
- export { AskUserAnnotationSchema, AskUserInputSchema, AskUserOptionSchema, AskUserOutputSchema, AskUserQuestionSchema, } from './types/ask-user-types';
45
+ export { AskUserAnnotationSchema, AskUserInputSchema, AskUserOptionSchema, AskUserOutputSchema, AskUserQuestionSchema, } from './types/ask-user-types.js';
44
46
  //#endregion
45
47
  //#region Execution
46
48
  /** @public */
47
- export { execute } from './interpreter/execute';
49
+ export { execute } from './interpreter/execute.js';
48
50
  //#endregion
49
51
  //#region Memory Layers
50
52
  /** @public */
51
- export { findFunctionCall } from './memory/function-call-utils';
53
+ export { findFunctionCall } from './memory/function-call-utils.js';
52
54
  /** @public */
53
- export { durableTaskState } from './memory/layers/durable-task-state';
55
+ export { durableTaskState } from './memory/layers/durable-task-state.js';
54
56
  /** @public */
55
- export { fileReference } from './memory/layers/file-reference';
57
+ export { fileReference } from './memory/layers/file-reference.js';
56
58
  /** @public */
57
- export { historyWindow } from './memory/layers/history-window';
59
+ export { historyWindow } from './memory/layers/history-window.js';
58
60
  /** @public */
59
- export { observationalMemory } from './memory/layers/observational-memory';
61
+ export { observationalMemory } from './memory/layers/observational-memory.js';
60
62
  /** @public */
61
- export { PlanPhase, planMemory } from './memory/layers/plan';
63
+ export { PlanPhase, planMemory } from './memory/layers/plan.js';
62
64
  /** @public */
63
- export { staticContent } from './memory/layers/static-content';
65
+ export { staticContent } from './memory/layers/static-content.js';
64
66
  /** @public */
65
- export { steering } from './memory/layers/steering';
67
+ export { steering } from './memory/layers/steering.js';
66
68
  /** @public */
67
- export { toolMemoryLayer } from './memory/layers/tool-memory-layer';
69
+ export { toolMemoryLayer } from './memory/layers/tool-memory-layer.js';
68
70
  /** @public */
69
- export { workingMemory } from './memory/layers/working-memory';
71
+ export { workingMemory } from './memory/layers/working-memory.js';
70
72
  /** @public */
71
- export { stripUnresolvedToolCalls } from './memory/strip-unresolved';
73
+ export { stripUnresolvedToolCalls } from './memory/strip-unresolved.js';
72
74
  //#endregion
73
75
  //#region Message Utilities
74
76
  /** @public */
75
- export { createMessage, estimateTokens } from './util/message-helpers';
77
+ export { createMessage, estimateTokens } from './util/message-helpers.js';
76
78
  //#endregion
77
79
  //#region Observability
78
80
  /** @public */
79
- export { GenAI, ToolAttr } from './observability/genai-attributes';
81
+ export { GenAI, ToolAttr } from './observability/genai-attributes.js';
80
82
  /** @public */
81
- export { InMemoryExporter, NoopExporter } from './observability/trace-exporter';
83
+ export { InMemoryExporter, NoopExporter } from './observability/trace-exporter.js';
82
84
  /** @public */
83
- export { createInMemoryStorage } from './runtime/in-memory-storage';
85
+ export { createInMemoryStorage } from './runtime/in-memory-storage.js';
84
86
  /** @public */
85
- export { dynamicWorkflow, parseAndRunWorkflow } from './patterns/dynamic-workflow';
87
+ export { dynamicWorkflow, parseAndRunWorkflow } from './patterns/dynamic-workflow.js';
86
88
  /** @public */
87
- export { FlowSchema, flowDepth, validateFlow, walkFlow } from './patterns/flow';
89
+ export { FlowSchema, flowDepth, validateFlow, walkFlow } from './patterns/flow.js';
88
90
  /** @public */
89
- export { interview } from './patterns/interview';
91
+ export { interview } from './patterns/interview.js';
90
92
  /** @public */
91
- export { adaptivePlan, compilePlan, PlanNodeSchema } from './patterns/plans';
93
+ export { adaptivePlan, compilePlan, PlanNodeSchema } from './patterns/plans.js';
92
94
  /** @public */
93
- export { ralphWiggum } from './patterns/ralph-wiggum';
95
+ export { ralphWiggum } from './patterns/ralph-wiggum.js';
94
96
  /** @public */
95
- export { react } from './patterns/react';
97
+ export { react } from './patterns/react.js';
96
98
  //#endregion
97
99
  //#region Runtime
98
100
  /** @public */
99
- export { AgentHarness } from './harness/agent-harness';
101
+ export { AgentHarness } from './harness/agent-harness.js';
100
102
  /** @public */
101
- export { CheckpointKeys, createCheckpointStore, createDetachedSignal, createNudgeMessage, createStallNudgeHook, DEFAULT_NUDGE_MESSAGE_TEXT, runnableLoop, seedFromItems, } from './runtime/durable';
103
+ export { CheckpointKeys, createCheckpointStore, createDetachedSignal, createNudgeMessage, createStallNudgeHook, DEFAULT_NUDGE_MESSAGE_TEXT, runnableLoop, seedFromItems, } from './runtime/durable/index.js';
102
104
  /** @public */
103
- export { getRegistry, lookupStep, registerStep } from './runtime/step-registry';
105
+ export { getRegistry, lookupStep, registerStep } from './runtime/step-registry.js';
104
106
  //#endregion
105
107
  //#region Schemas
106
108
  /** @public */
107
- export { defaultItemSchemaRegistry, ItemSchema, ItemSchemaRegistry } from './schemas/item';
109
+ export { defaultItemSchemaRegistry, ItemSchema, ItemSchemaRegistry } from './schemas/item.js';
108
110
  /** @public */
109
- export { MergeStrategySchema, UntilPredicateSchema, validateWorkflow, WorkflowDocumentSchema, WorkflowNodeSchema, walkWorkflow, workflowDepth, } from './schemas/workflow';
111
+ export { MergeStrategySchema, UntilPredicateSchema, validateWorkflow, WorkflowDocumentSchema, WorkflowNodeSchema, walkWorkflow, workflowDepth, } from './schemas/workflow.js';
110
112
  //#endregion
111
113
  //#region Types — Context
112
114
  /** @public */
113
- export { getToolCwd, setToolCwd, snapshotCwdState } from './runtime/cwd-helpers';
115
+ export { getToolCwd, setToolCwd, snapshotCwdState } from './runtime/cwd-helpers.js';
114
116
  /** @public */
115
- export { DetachedStatus } from './types/detached';
117
+ export { DetachedStatus } from './types/detached.js';
116
118
  /** @public */
117
- export { CheckpointSchemaVersion, CheckpointSnapshotSchema, CwdSnapshotSchema, FrontierFrameSchema, ItemLogSnapshotSchema, PendingAskUserSnapshotSchema, } from './types/checkpoint';
119
+ export { CheckpointSchemaVersion, CheckpointSnapshotSchema, CwdSnapshotSchema, FrontierFrameSchema, ItemLogSnapshotSchema, PendingAskUserSnapshotSchema, } from './types/checkpoint.js';
118
120
  /** @public */
119
- export { Slot } from './types/memory';
121
+ export { Slot } from './types/memory.js';
120
122
  /** @public */
121
- export { LedgerEntryKind, SteeringAction } from './types/steering';
123
+ export { LedgerEntryKind, SteeringAction } from './types/steering.js';
122
124
  //#endregion
123
125
  //#region Types — Shell
124
126
  /** @public Reusable error-serialiser used by custom SubprocessAdapter implementations. */
125
- export { serializeError } from './adapters/in-memory-subprocess/metadata';
127
+ export { serializeError } from './adapters/in-memory-subprocess/metadata.js';
126
128
  /** @public */
127
- export { TIMEOUT_ERROR_PREFIX } from './types/shell-adapter';
129
+ export { TIMEOUT_ERROR_PREFIX } from './types/shell-adapter.js';
128
130
  //#endregion
129
131
  //#region Until
130
132
  /** @public */
131
- export { all, any } from './until/combinators';
133
+ export { all, any } from './until/combinators.js';
132
134
  /** @public */
133
- export { until } from './until/predicates';
135
+ export { until } from './until/predicates.js';
134
136
  //#endregion
@@ -5,7 +5,7 @@
5
5
  * These are implementation classes that tests need to construct mock instances.
6
6
  * Application code should NEVER import from this path.
7
7
  */
8
- export { SpanImpl } from './observability/span-impl';
9
- export { ChannelStore } from './runtime/channel-store';
10
- export { ContextImpl } from './runtime/context-impl';
11
- export { ItemLogImpl } from './runtime/item-log-impl';
8
+ export { SpanImpl } from './observability/span-impl.js';
9
+ export { ChannelStore } from './runtime/channel-store.js';
10
+ export { ContextImpl } from './runtime/context-impl.js';
11
+ export { ItemLogImpl } from './runtime/item-log-impl.js';
@@ -5,7 +5,7 @@
5
5
  * These are implementation classes that tests need to construct mock instances.
6
6
  * Application code should NEVER import from this path.
7
7
  */
8
- export { SpanImpl } from './observability/span-impl';
9
- export { ChannelStore } from './runtime/channel-store';
10
- export { ContextImpl } from './runtime/context-impl';
11
- export { ItemLogImpl } from './runtime/item-log-impl';
8
+ export { SpanImpl } from './observability/span-impl.js';
9
+ export { ChannelStore } from './runtime/channel-store.js';
10
+ export { ContextImpl } from './runtime/context-impl.js';
11
+ export { ItemLogImpl } from './runtime/item-log-impl.js';
@@ -1,12 +1,12 @@
1
- export { contextToExecCtx } from '../memory/exec-context-factory';
2
- export { resolveLayerTools } from '../memory/layer-api';
3
- export type { LayerStateStore } from '../memory/layer-lifecycle';
4
- export { returnLayers, spawnLayers } from '../memory/layer-lifecycle';
5
- export { commitLayerUsage, computeLayerUsage } from '../memory/layer-usage';
6
- export { assembleView } from '../memory/projector';
7
- export { emitFrameworkEvent, getBroadcaster } from '../runtime/broadcaster-utils';
8
- export { ContextImpl } from '../runtime/context-impl';
9
- export { snapshotCwdState } from '../runtime/cwd-helpers';
10
- export { buildToolExecutionContext } from '../runtime/tool-memory';
11
- export type { ItemSchemaRegistry } from '../schemas/item';
12
- export { defaultItemSchemaRegistry } from '../schemas/item';
1
+ export { contextToExecCtx } from '../memory/exec-context-factory.js';
2
+ export { resolveLayerTools } from '../memory/layer-api.js';
3
+ export type { LayerStateStore } from '../memory/layer-lifecycle.js';
4
+ export { returnLayers, spawnLayers } from '../memory/layer-lifecycle.js';
5
+ export { commitLayerUsage, computeLayerUsage } from '../memory/layer-usage.js';
6
+ export { assembleView } from '../memory/projector.js';
7
+ export { emitFrameworkEvent, getBroadcaster } from '../runtime/broadcaster-utils.js';
8
+ export { ContextImpl } from '../runtime/context-impl.js';
9
+ export { snapshotCwdState } from '../runtime/cwd-helpers.js';
10
+ export { buildToolExecutionContext } from '../runtime/tool-memory.js';
11
+ export type { ItemSchemaRegistry } from '../schemas/item.js';
12
+ export { defaultItemSchemaRegistry } from '../schemas/item.js';
@@ -1,10 +1,10 @@
1
- export { contextToExecCtx } from '../memory/exec-context-factory';
2
- export { resolveLayerTools } from '../memory/layer-api';
3
- export { returnLayers, spawnLayers } from '../memory/layer-lifecycle';
4
- export { commitLayerUsage, computeLayerUsage } from '../memory/layer-usage';
5
- export { assembleView } from '../memory/projector';
6
- export { emitFrameworkEvent, getBroadcaster } from '../runtime/broadcaster-utils';
7
- export { ContextImpl } from '../runtime/context-impl';
8
- export { snapshotCwdState } from '../runtime/cwd-helpers';
9
- export { buildToolExecutionContext } from '../runtime/tool-memory';
10
- export { defaultItemSchemaRegistry } from '../schemas/item';
1
+ export { contextToExecCtx } from '../memory/exec-context-factory.js';
2
+ export { resolveLayerTools } from '../memory/layer-api.js';
3
+ export { returnLayers, spawnLayers } from '../memory/layer-lifecycle.js';
4
+ export { commitLayerUsage, computeLayerUsage } from '../memory/layer-usage.js';
5
+ export { assembleView } from '../memory/projector.js';
6
+ export { emitFrameworkEvent, getBroadcaster } from '../runtime/broadcaster-utils.js';
7
+ export { ContextImpl } from '../runtime/context-impl.js';
8
+ export { snapshotCwdState } from '../runtime/cwd-helpers.js';
9
+ export { buildToolExecutionContext } from '../runtime/tool-memory.js';
10
+ export { defaultItemSchemaRegistry } from '../schemas/item.js';
@@ -1,8 +1,8 @@
1
- export type { RetryPolicy, StepMeta } from '../types/common';
2
- export type { Context } from '../types/context';
3
- export type { FunctionCallItem, Item } from '../types/items';
4
- export type { ContextMemory, ExecutionContext, MemoryConfig, MemoryLayer } from '../types/memory';
5
- export type { AgentHarnessContract, RecallLayerOutput } from '../types/runtime';
6
- export { SteeringAction } from '../types/steering';
7
- export type { ExecuteStepFn, StepLLM, StepProvide, StepRun, StepSpawn, StepTool, } from '../types/step';
8
- export type { Tool } from '../types/tool';
1
+ export type { RetryPolicy, StepMeta } from '../types/common.js';
2
+ export type { Context } from '../types/context.js';
3
+ export type { FunctionCallItem, Item } from '../types/items.js';
4
+ export type { ContextMemory, ExecutionContext, MemoryConfig, MemoryLayer } from '../types/memory.js';
5
+ export type { AgentHarnessContract, RecallLayerOutput } from '../types/runtime.js';
6
+ export { SteeringAction } from '../types/steering.js';
7
+ export type { ExecuteStepFn, StepLLM, StepProvide, StepRun, StepSpawn, StepTool, } from '../types/step.js';
8
+ export type { Tool } from '../types/tool.js';
@@ -1 +1 @@
1
- export { SteeringAction } from '../types/steering';
1
+ export { SteeringAction } from '../types/steering.js';
@@ -1,5 +1,5 @@
1
- import type { Step } from '../types/step';
2
- import type { Tool } from '../types/tool';
1
+ import type { Step } from '../types/step.js';
2
+ import type { Tool } from '../types/tool.js';
3
3
  /**
4
4
  * Recursively walks a step tree and collects all Tool instances
5
5
  * declared on LLM steps. Used to build the unified tool set
@@ -1,4 +1,4 @@
1
- import { frameworkCast } from '../util/framework-cast';
1
+ import { frameworkCast } from '../util/framework-cast.js';
2
2
  /**
3
3
  * Recursively walks a step tree and collects all Tool instances
4
4
  * declared on LLM steps. Used to build the unified tool set
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Action step handlers: run, llm, spawn, provide, tool.
3
3
  */
4
- import type { ItemSchemaRegistry, LayerStateStore } from './action-deps';
5
- import type { AgentHarnessContract, Context, ExecuteStepFn, MemoryLayer, StepLLM, StepProvide, StepRun, StepSpawn, StepTool } from './action-types';
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
6
  export declare function executeRun<TMemory, I, O>(step: StepRun<TMemory, I, O>, input: I, ctx: Context<TMemory>): Promise<O>;
7
7
  export declare function executeLLM<TMemory, I, O>(step: StepLLM<TMemory, I, O>, input: I, ctx: Context<TMemory>, layers?: MemoryLayer[]): Promise<O>;
8
8
  export interface ExecuteSpawnOpts {
@@ -2,16 +2,16 @@
2
2
  * Action step handlers: run, llm, spawn, provide, tool.
3
3
  */
4
4
  import { ZodError } from 'zod';
5
- import { NoeticConfigError } from '../errors/noetic-config-error';
6
- import { NoeticErrorImpl } from '../errors/noetic-error';
7
- import { frameworkCast } from '../util/framework-cast';
8
- import { createMessage, extractAssistantText } from '../util/message-helpers';
9
- import { assembleView, buildToolExecutionContext, ContextImpl, commitLayerUsage, computeLayerUsage, contextToExecCtx, defaultItemSchemaRegistry, emitFrameworkEvent, getBroadcaster, resolveLayerTools, returnLayers, snapshotCwdState, spawnLayers, } from './action-deps';
10
- import { SteeringAction } from './action-types';
11
- import { cloneWithGuard } from './clone-guard';
12
- import { collectAllTools, deduplicateTools } from './collect-tools';
13
- import { trackUsage } from './message-helpers';
14
- import { getContextChannelStore, isFunctionCall, isMutableContext } from './typeguards';
5
+ import { NoeticConfigError } from '../errors/noetic-config-error.js';
6
+ import { NoeticErrorImpl } from '../errors/noetic-error.js';
7
+ import { frameworkCast } from '../util/framework-cast.js';
8
+ import { createMessage, extractAssistantText } from '../util/message-helpers.js';
9
+ import { assembleView, buildToolExecutionContext, ContextImpl, commitLayerUsage, computeLayerUsage, contextToExecCtx, defaultItemSchemaRegistry, emitFrameworkEvent, getBroadcaster, resolveLayerTools, returnLayers, snapshotCwdState, spawnLayers, } from './action-deps.js';
10
+ import { SteeringAction } from './action-types.js';
11
+ import { cloneWithGuard } from './clone-guard.js';
12
+ import { collectAllTools, deduplicateTools } from './collect-tools.js';
13
+ import { trackUsage } from './message-helpers.js';
14
+ import { getContextChannelStore, isFunctionCall, isMutableContext } from './typeguards.js';
15
15
  //#region run
16
16
  export async function executeRun(step, input, ctx) {
17
17
  const retry = step.retry;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Control-flow step handlers: branch, fork, loop, every.
3
3
  */
4
- import type { Context } from '../types/context';
5
- import type { ExecuteStepFn, StepBranch, StepEvery, StepFork, StepLoop } from '../types/step';
4
+ import type { Context } from '../types/context.js';
5
+ import type { ExecuteStepFn, StepBranch, StepEvery, StepFork, StepLoop } from '../types/step.js';
6
6
  export declare function executeBranch<TMemory, I, O>(step: StepBranch<TMemory, I, O>, input: I, ctx: Context<TMemory>, executeStep: ExecuteStepFn): Promise<O>;
7
7
  export declare function executeFork<TMemory, I, O>(step: StepFork<TMemory, I, O>, input: I, ctx: Context<TMemory>, executeStep: ExecuteStepFn): Promise<O>;
8
8
  export declare function executeLoop<TMemory, I, O>(step: StepLoop<TMemory, I, O>, input: I, ctx: Context<TMemory>, executeStep: ExecuteStepFn): Promise<O>;
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * Control-flow step handlers: branch, fork, loop, every.
3
3
  */
4
- import { isNoeticError, NoeticErrorImpl } from '../errors/noetic-error';
5
- import { ContextImpl } from '../runtime/context-impl';
6
- import { snapshotCwdState } from '../runtime/cwd-helpers';
7
- import { frameworkCast } from '../util/framework-cast';
8
- import { createMessage } from '../util/message-helpers';
9
- import { cloneWithGuard } from './clone-guard';
10
- import { getContextChannelStore, isContextImpl, isMutableContext } from './typeguards';
4
+ import { isNoeticError, NoeticErrorImpl } from '../errors/noetic-error.js';
5
+ import { ContextImpl } from '../runtime/context-impl.js';
6
+ import { snapshotCwdState } from '../runtime/cwd-helpers.js';
7
+ import { frameworkCast } from '../util/framework-cast.js';
8
+ import { createMessage } from '../util/message-helpers.js';
9
+ import { cloneWithGuard } from './clone-guard.js';
10
+ import { getContextChannelStore, isContextImpl, isMutableContext } from './typeguards.js';
11
11
  //#region branch
12
12
  export async function executeBranch(step, input, ctx, executeStep) {
13
13
  const selected = await step.route(input, ctx);
@@ -1,6 +1,6 @@
1
- import type { Context } from '../types/context';
2
- import type { ContextMemory } from '../types/memory';
3
- import type { Step } from '../types/step';
1
+ import type { Context } from '../types/context.js';
2
+ import type { ContextMemory } from '../types/memory.js';
3
+ import type { Step } from '../types/step.js';
4
4
  /**
5
5
  * @internal
6
6
  * Dispatch a step at the per-kind handler level without adapter routing.
@@ -1,11 +1,11 @@
1
- import { NoeticErrorImpl } from '../errors/noetic-error';
2
- import { emitFrameworkEvent, getBroadcaster, shouldEmit } from '../runtime/broadcaster-utils';
3
- import { ContextImpl } from '../runtime/context-impl';
4
- import { DetachedHandleImpl } from '../runtime/detached-handle';
5
- import { frameworkCast } from '../util/framework-cast';
6
- import { executeLLM, executeProvide, executeRun, executeSpawn, executeTool, } from './execute-action';
7
- import { executeBranch, executeEvery, executeFork, executeLoop } from './execute-control';
8
- import { isMutableContext } from './typeguards';
1
+ import { NoeticErrorImpl } from '../errors/noetic-error.js';
2
+ import { emitFrameworkEvent, getBroadcaster, shouldEmit } from '../runtime/broadcaster-utils.js';
3
+ import { ContextImpl } from '../runtime/context-impl.js';
4
+ import { DetachedHandleImpl } from '../runtime/detached-handle.js';
5
+ import { frameworkCast } from '../util/framework-cast.js';
6
+ import { executeLLM, executeProvide, executeRun, executeSpawn, executeTool, } from './execute-action.js';
7
+ import { executeBranch, executeEvery, executeFork, executeLoop } from './execute-control.js';
8
+ import { isMutableContext } from './typeguards.js';
9
9
  //#region Constants
10
10
  const MAX_DEPTH = 64;
11
11
  //#endregion
@@ -1 +1 @@
1
- export { trackUsage } from '../util/message-helpers';
1
+ export { trackUsage } from '../util/message-helpers.js';
@@ -1 +1 @@
1
- export { trackUsage } from '../util/message-helpers';
1
+ export { trackUsage } from '../util/message-helpers.js';
@@ -1,8 +1,8 @@
1
- import type { Context } from '../types/context';
2
- import type { DetachedHandle } from '../types/detached';
3
- import type { ContextMemory } from '../types/memory';
4
- import type { Step } from '../types/step';
5
- import type { SubprocessAdapter } from '../types/subprocess-adapter';
1
+ import type { Context } from '../types/context.js';
2
+ import type { DetachedHandle } from '../types/detached.js';
3
+ import type { ContextMemory } from '../types/memory.js';
4
+ import type { Step } from '../types/step.js';
5
+ import type { SubprocessAdapter } from '../types/subprocess-adapter.js';
6
6
  /**
7
7
  * Resolve the subprocess adapter used for a given step dispatch.
8
8
  *
@@ -1,5 +1,5 @@
1
- import { DetachedHandleImpl } from '../runtime/detached-handle';
2
- import { executeNoAdapter } from './execute';
1
+ import { DetachedHandleImpl } from '../runtime/detached-handle.js';
2
+ import { executeNoAdapter } from './execute.js';
3
3
  //#region Adapter resolution
4
4
  /**
5
5
  * Resolve the subprocess adapter used for a given step dispatch.
@@ -1,10 +1,10 @@
1
- import type { ChannelStore } from '../runtime/channel-store';
2
- import { ContextImpl } from '../runtime/context-impl';
3
- import type { Context } from '../types/context';
4
- import type { FunctionCallItem, Item } from '../types/items';
5
- import type { ContextMemory } from '../types/memory';
6
- import type { MutableContext } from '../types/mutable-context';
7
- export { isAssistantMessage, isOutputText, isUserMessage } from '../util/message-helpers';
1
+ import type { ChannelStore } from '../runtime/channel-store.js';
2
+ import { ContextImpl } from '../runtime/context-impl.js';
3
+ import type { Context } from '../types/context.js';
4
+ import type { FunctionCallItem, Item } from '../types/items.js';
5
+ import type { ContextMemory } from '../types/memory.js';
6
+ import type { MutableContext } from '../types/mutable-context.js';
7
+ export { isAssistantMessage, isOutputText, isUserMessage } from '../util/message-helpers.js';
8
8
  export declare function isMutableContext(ctx: Context<ContextMemory>): ctx is MutableContext;
9
9
  export declare function isContextImpl(ctx: Context<ContextMemory>): ctx is ContextImpl;
10
10
  /**
@@ -1,6 +1,6 @@
1
- import { ContextImpl } from '../runtime/context-impl';
1
+ import { ContextImpl } from '../runtime/context-impl.js';
2
2
  // Re-exports for backward compatibility; the pure variants live in util/.
3
- export { isAssistantMessage, isOutputText, isUserMessage } from '../util/message-helpers';
3
+ export { isAssistantMessage, isOutputText, isUserMessage } from '../util/message-helpers.js';
4
4
  export function isMutableContext(ctx) {
5
5
  // Check if the context has writable mutable fields (ContextImpl or compatible mock)
6
6
  if (ctx instanceof ContextImpl) {
@@ -1,5 +1,5 @@
1
- import type { Context } from '../types/context';
2
- import type { MemoryLayer } from '../types/memory';
1
+ import type { Context } from '../types/context.js';
2
+ import type { MemoryLayer } from '../types/memory.js';
3
3
  export interface BudgetAllocation {
4
4
  layerId: string;
5
5
  allocated: number;
@@ -1,4 +1,4 @@
1
- import { NoeticErrorImpl } from '../errors/noetic-error';
1
+ import { NoeticErrorImpl } from '../errors/noetic-error.js';
2
2
  function extractMin(config) {
3
3
  if (config && typeof config === 'object' && 'min' in config) {
4
4
  return config.min;
@@ -1,5 +1,5 @@
1
- import type { Context } from '../types/context';
2
- import type { ExecutionContext } from '../types/memory';
1
+ import type { Context } from '../types/context.js';
2
+ import type { ExecutionContext } from '../types/memory.js';
3
3
  /**
4
4
  * Optional overrides for `contextToExecCtx`. Used by `executeSpawn` to build
5
5
  * parent and child execution contexts that reuse the same tokenize / trace /
@@ -1,4 +1,4 @@
1
- import { estimateTokens } from '../util/message-helpers';
1
+ import { estimateTokens } from '../util/message-helpers.js';
2
2
  /**
3
3
  * Maps a full `Context` to the lightweight `ExecutionContext` consumed by memory layer hooks.
4
4
  * Centralised here so the mapping stays consistent across agent-harness, layer-api, and the
@@ -1,4 +1,4 @@
1
- import type { Item } from '../types/items';
1
+ import type { Item } from '../types/items.js';
2
2
  /**
3
3
  * Finds the first function_call item matching `name`, parses its JSON arguments,
4
4
  * and returns the result as a record. Returns null if no match or invalid data.
@@ -1,4 +1,4 @@
1
- import { frameworkCast } from '../util/framework-cast';
1
+ import { frameworkCast } from '../util/framework-cast.js';
2
2
  function isFunctionCall(item) {
3
3
  return item.type === 'function_call' && 'callId' in item && 'name' in item;
4
4
  }
@@ -1,7 +1,7 @@
1
- import type { Context } from '../types/context';
2
- import type { ContextMemory, MemoryLayer } from '../types/memory';
3
- import type { AgentHarnessContract } from '../types/runtime';
4
- import type { Tool } from '../types/tool';
1
+ import type { Context } from '../types/context.js';
2
+ import type { ContextMemory, MemoryLayer } from '../types/memory.js';
3
+ import type { AgentHarnessContract } from '../types/runtime.js';
4
+ import type { Tool } from '../types/tool.js';
5
5
  /**
6
6
  * Build the `ctx.memory` object — a readonly map of layer ID → resolved handle.
7
7
  * Handles use getters for data (live reads) and closures for functions (lazy state).
@@ -1,5 +1,5 @@
1
- import { frameworkCast } from '../util/framework-cast';
2
- import { contextToExecCtx } from './exec-context-factory';
1
+ import { frameworkCast } from '../util/framework-cast.js';
2
+ import { contextToExecCtx } from './exec-context-factory.js';
3
3
  function executeLayerFn(params) {
4
4
  const { fn, args, layerId, harness, ctx } = params;
5
5
  const validated = fn.input.parse(args);
@@ -1,9 +1,9 @@
1
- import type { ItemSchemaRegistry } from '../schemas/item';
2
- import type { LLMResponse } from '../types/common';
3
- import type { ItemLog } from '../types/context-parts/item-log';
4
- import type { Item } from '../types/items';
5
- import type { ExecutionContext, MemoryLayer, StorageAdapter } from '../types/memory';
6
- import type { SteeringDecision } from '../types/steering';
1
+ import type { ItemSchemaRegistry } from '../schemas/item.js';
2
+ import type { LLMResponse } from '../types/common.js';
3
+ import type { ItemLog } from '../types/context-parts/item-log.js';
4
+ import type { Item } from '../types/items.js';
5
+ import type { ExecutionContext, MemoryLayer, StorageAdapter } from '../types/memory.js';
6
+ import type { SteeringDecision } from '../types/steering.js';
7
7
  export interface LayerStateStore {
8
8
  get<T>(executionId: string, layerId: string): T | undefined;
9
9
  set<T>(executionId: string, layerId: string, state: T): void;
@@ -1,9 +1,9 @@
1
- import { NoeticConfigError } from '../errors/noetic-config-error';
2
- import { defaultItemSchemaRegistry } from '../schemas/item';
3
- import { SteeringAction } from '../types/steering';
4
- import { frameworkCast } from '../util/framework-cast';
5
- import { createMessage, estimateTokens } from '../util/message-helpers';
6
- import { createScopedStorage, resolveScopeKey } from './scope';
1
+ import { NoeticConfigError } from '../errors/noetic-config-error.js';
2
+ import { defaultItemSchemaRegistry } from '../schemas/item.js';
3
+ import { SteeringAction } from '../types/steering.js';
4
+ import { frameworkCast } from '../util/framework-cast.js';
5
+ import { createMessage, estimateTokens } from '../util/message-helpers.js';
6
+ import { createScopedStorage, resolveScopeKey } from './scope.js';
7
7
  /** Maximum allowed re-render depth to prevent infinite loops */
8
8
  const MAX_RERENDER_DEPTH = 3;
9
9
  /**
@@ -1,5 +1,5 @@
1
1
  import type { ZodType } from 'zod';
2
- import type { ExecutionContext, LayerDataDecl, LayerFunctionDecl } from '../types/memory';
2
+ import type { ExecutionContext, LayerDataDecl, LayerFunctionDecl } from '../types/memory.js';
3
3
  /**
4
4
  * Creates a read-only data declaration for a memory layer's `provides` map.
5
5
  *
@@ -1,7 +1,7 @@
1
- import type { Context } from '../types/context';
2
- import type { LastLayerUsage } from '../types/context-parts/layer-usage';
3
- import type { RecallLayerOutput } from '../types/runtime';
4
- import type { Tool } from '../types/tool';
1
+ import type { Context } from '../types/context.js';
2
+ import type { LastLayerUsage } from '../types/context-parts/layer-usage.js';
3
+ import type { RecallLayerOutput } from '../types/runtime.js';
4
+ import type { Tool } from '../types/tool.js';
5
5
  interface ComputeLayerUsageParams {
6
6
  ctx: Context;
7
7
  modelId: string;