@noetic-tools/core 0.1.0 → 0.1.2

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
@@ -1,10 +1,10 @@
1
1
  import type { ZodType } from 'zod';
2
- import type { LLMResponse } from './common';
3
- import type { ItemLog } from './context-parts/item-log';
4
- import type { Item, ItemSchemaExtensions } from './items';
5
- import type { ExecutionContext, ExecutionOutcome, MemoryScope } from './memory-context';
6
- import type { AfterModelCallParams, AfterModelCallResult, BeforeToolCallParams, BeforeToolCallResult } from './steering';
7
- export type { ExecutionContext, ExecutionOutcome, MemoryCallModelRequest, MemoryScope, } from './memory-context';
2
+ import type { LLMResponse } from './common.js';
3
+ import type { ItemLog } from './context-parts/item-log.js';
4
+ import type { Item, ItemSchemaExtensions } from './items.js';
5
+ import type { ExecutionContext, ExecutionOutcome, MemoryScope } from './memory-context.js';
6
+ import type { AfterModelCallParams, AfterModelCallResult, BeforeToolCallParams, BeforeToolCallResult } from './steering.js';
7
+ export type { ExecutionContext, ExecutionOutcome, MemoryCallModelRequest, MemoryScope, } from './memory-context.js';
8
8
  /** @public Isolation scope controlling how a memory layer's state is keyed and shared. */
9
9
  export type BudgetConfig = number | {
10
10
  min: number;
@@ -1,6 +1,6 @@
1
- import type { StepMeta, TokenUsage } from './common';
2
- import type { Context } from './context';
3
- import type { ContextMemory } from './memory';
1
+ import type { StepMeta, TokenUsage } from './common.js';
2
+ import type { Context } from './context.js';
3
+ import type { ContextMemory } from './memory.js';
4
4
  /**
5
5
  * Internal-only interface for interpreter code that needs to mutate Context fields.
6
6
  * NOT exported from the package public API.
@@ -1,18 +1,18 @@
1
1
  import type { ZodType } from 'zod';
2
- import type { Channel, ChannelHandle, ExternalChannel } from './channel';
3
- import type { LLMResponse, ModelParams } from './common';
4
- import type { Context, CwdState } from './context';
5
- import type { DetachedHandle } from './detached';
6
- import type { FsAdapter } from './fs-adapter';
7
- import type { HarnessResponse, StreamEvent, StreamingItem } from './harness-result';
8
- import type { ExecuteInput, Item, ItemSchemaExtensions } from './items';
9
- import type { ContextMemory, MemoryLayer, StorageAdapter } from './memory';
10
- import type { Span } from './observability';
11
- import type { ShellAdapter } from './shell-adapter';
12
- import type { SteeringDecision } from './steering';
13
- import type { Step } from './step';
14
- import type { SubprocessAdapter } from './subprocess-adapter';
15
- import type { Tool } from './tool';
2
+ import type { Channel, ChannelHandle, ExternalChannel } from './channel.js';
3
+ import type { LLMResponse, ModelParams } from './common.js';
4
+ import type { Context, CwdState } from './context.js';
5
+ import type { DetachedHandle } from './detached.js';
6
+ import type { FsAdapter } from './fs-adapter.js';
7
+ import type { HarnessResponse, StreamEvent, StreamingItem } from './harness-result.js';
8
+ import type { ExecuteInput, Item, ItemSchemaExtensions } from './items.js';
9
+ import type { ContextMemory, MemoryLayer, StorageAdapter } from './memory.js';
10
+ import type { Span } from './observability.js';
11
+ import type { ShellAdapter } from './shell-adapter.js';
12
+ import type { SteeringDecision } from './steering.js';
13
+ import type { Step } from './step.js';
14
+ import type { SubprocessAdapter } from './subprocess-adapter.js';
15
+ import type { Tool } from './tool.js';
16
16
  /** @public Optional lifecycle hooks invoked before and after each step execution. */
17
17
  export interface AgentHooks {
18
18
  beforeStep?: (step: Step, ctx: Context) => Promise<void>;
@@ -1,5 +1,5 @@
1
- import type { LLMResponse } from './common';
2
- import type { ExecutionContext, MemoryScope } from './memory-context';
1
+ import type { LLMResponse } from './common.js';
2
+ import type { ExecutionContext, MemoryScope } from './memory-context.js';
3
3
  /** @public Enumeration of actions a steering rule can take on a tool call or model response. */
4
4
  export declare const SteeringAction: {
5
5
  Allow: string;
@@ -13,7 +13,7 @@
13
13
  * when an out-of-process child needs to look up a step by id. In-process
14
14
  * execution walks the step tree directly and never touches either side.
15
15
  */
16
- import type { Step } from './step';
16
+ import type { Step } from './step.js';
17
17
  /**
18
18
  * @public
19
19
  * Registers a step under its `id` so the subprocess adapter can later
@@ -1,11 +1,11 @@
1
1
  import type { ZodType } from 'zod';
2
- import type { Channel } from './channel';
3
- import type { ModelParams, RetryPolicy, StepMeta } from './common';
4
- import type { Context } from './context';
5
- import type { NoeticError } from './error';
6
- import type { ContextMemory, MemoryConfig, MemoryLayer } from './memory';
7
- import type { SubprocessAdapter } from './subprocess-adapter';
8
- import type { Tool } from './tool';
2
+ import type { Channel } from './channel.js';
3
+ import type { ModelParams, RetryPolicy, StepMeta } from './common.js';
4
+ import type { Context } from './context.js';
5
+ import type { NoeticError } from './error.js';
6
+ import type { ContextMemory, MemoryConfig, MemoryLayer } from './memory.js';
7
+ import type { SubprocessAdapter } from './subprocess-adapter.js';
8
+ import type { Tool } from './tool.js';
9
9
  /**
10
10
  * Cumulative execution snapshot passed to loop `until` predicates.
11
11
  * @public
@@ -1,10 +1,10 @@
1
1
  import type { TurnContext } from '@openrouter/agent';
2
- import type { StepMeta } from './common';
3
- import type { Context } from './context';
4
- import type { FsAdapter } from './fs-adapter';
5
- import type { Item } from './items';
6
- import type { AgentHarnessContract } from './runtime';
7
- import type { ShellAdapter } from './shell-adapter';
2
+ import type { StepMeta } from './common.js';
3
+ import type { Context } from './context.js';
4
+ import type { FsAdapter } from './fs-adapter.js';
5
+ import type { Item } from './items.js';
6
+ import type { AgentHarnessContract } from './runtime.js';
7
+ import type { ShellAdapter } from './shell-adapter.js';
8
8
  /** @public Accessor for reading and writing per-layer state from within a tool execution. */
9
9
  export interface ToolMemory {
10
10
  get<T>(layerId: string): T | undefined;
@@ -1,5 +1,5 @@
1
1
  import type { ZodTypeAny, z } from 'zod';
2
- import type { FunctionCallItem, FunctionCallOutputItem, Item, ItemSchemaExtensions, ToolResultExtensionItem } from './items';
2
+ import type { FunctionCallItem, FunctionCallOutputItem, Item, ItemSchemaExtensions, ToolResultExtensionItem } from './items.js';
3
3
  type ToolExecutionResult<O extends ZodTypeAny> = Promise<z.infer<O>> | AsyncGenerator<unknown, z.infer<O>>;
4
4
  /**
5
5
  * Declares tool-owned memory that the runtime materializes into a MemoryLayer.
@@ -7,22 +7,22 @@
7
7
  * and other framework extensions. Do not depend on them in application code.
8
8
  */
9
9
  /** @unstable Budget allocation algorithm for memory layer token budgets. */
10
- export type { BudgetAllocation, BudgetLimits } from './memory/budget';
10
+ export type { BudgetAllocation, BudgetLimits } from './memory/budget.js';
11
11
  /** @unstable Budget allocation and checking utilities. */
12
- export { allocateBudgets, checkBudget } from './memory/budget';
12
+ export { allocateBudgets, checkBudget } from './memory/budget.js';
13
13
  /** @unstable Layer state store type for managing per-layer state during execution. */
14
- export type { LayerStateStore } from './memory/layer-lifecycle';
14
+ export type { LayerStateStore } from './memory/layer-lifecycle.js';
15
15
  /** @unstable Factory for creating layer state stores. */
16
- export { createLayerStateStore } from './memory/layer-lifecycle';
16
+ export { createLayerStateStore } from './memory/layer-lifecycle.js';
17
17
  /** @unstable View assembly algorithm that converges memory layer outputs into the LLM context. */
18
- export { assembleView } from './memory/projector';
18
+ export { assembleView } from './memory/projector.js';
19
19
  /** @unstable Factory for creating scoped storage wrappers around a StorageAdapter. */
20
- export { createScopedStorage } from './memory/scope';
20
+ export { createScopedStorage } from './memory/scope.js';
21
21
  /**
22
22
  * @unstable Internal helper used by sync agent-spawn paths (worktree isolation)
23
23
  * to seed a child's cwd snapshot without touching `previousCwd`. Not part of
24
24
  * the public surface — call sites must hold exclusive use of the parent ctx.
25
25
  */
26
- export { retargetCwdForSpawn } from './runtime/cwd-helpers';
26
+ export { retargetCwdForSpawn } from './runtime/cwd-helpers.js';
27
27
  /** @unstable Unsafe cast utility for bridging internal type boundaries. */
28
- export { frameworkCast } from './util/framework-cast';
28
+ export { frameworkCast } from './util/framework-cast.js';
package/dist/unstable.js CHANGED
@@ -7,18 +7,18 @@
7
7
  * and other framework extensions. Do not depend on them in application code.
8
8
  */
9
9
  /** @unstable Budget allocation and checking utilities. */
10
- export { allocateBudgets, checkBudget } from './memory/budget';
10
+ export { allocateBudgets, checkBudget } from './memory/budget.js';
11
11
  /** @unstable Factory for creating layer state stores. */
12
- export { createLayerStateStore } from './memory/layer-lifecycle';
12
+ export { createLayerStateStore } from './memory/layer-lifecycle.js';
13
13
  /** @unstable View assembly algorithm that converges memory layer outputs into the LLM context. */
14
- export { assembleView } from './memory/projector';
14
+ export { assembleView } from './memory/projector.js';
15
15
  /** @unstable Factory for creating scoped storage wrappers around a StorageAdapter. */
16
- export { createScopedStorage } from './memory/scope';
16
+ export { createScopedStorage } from './memory/scope.js';
17
17
  /**
18
18
  * @unstable Internal helper used by sync agent-spawn paths (worktree isolation)
19
19
  * to seed a child's cwd snapshot without touching `previousCwd`. Not part of
20
20
  * the public surface — call sites must hold exclusive use of the parent ctx.
21
21
  */
22
- export { retargetCwdForSpawn } from './runtime/cwd-helpers';
22
+ export { retargetCwdForSpawn } from './runtime/cwd-helpers.js';
23
23
  /** @unstable Unsafe cast utility for bridging internal type boundaries. */
24
- export { frameworkCast } from './util/framework-cast';
24
+ export { frameworkCast } from './util/framework-cast.js';
@@ -1,4 +1,4 @@
1
- import type { Until } from '../types/step';
1
+ import type { Until } from '../types/step.js';
2
2
  /**
3
3
  * Combines predicates with OR semantics; stops the loop when any predicate says stop.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { Until } from '../types/step';
1
+ import type { Until } from '../types/step.js';
2
2
  /**
3
3
  * Termination predicate that never stops the loop. Use with `every`-like
4
4
  * forever-loops or with explicit cancellation paths.
@@ -1,7 +1,7 @@
1
- import type { EmbedFn } from '../types/embed';
2
- import type { StorageAdapter } from '../types/memory';
3
- import type { Until } from '../types/step';
4
- import { never } from './never';
1
+ import type { EmbedFn } from '../types/embed.js';
2
+ import type { StorageAdapter } from '../types/memory.js';
3
+ import type { Until } from '../types/step.js';
4
+ import { never } from './never.js';
5
5
  /** @public Async verification function that checks loop output and optionally returns feedback. */
6
6
  export type VerifyFn = (output: unknown) => Promise<{
7
7
  pass: boolean;
@@ -1,5 +1,5 @@
1
- import { cosineSimilarity } from '../conditions/cosine-similarity';
2
- import { never } from './never';
1
+ import { cosineSimilarity } from '../conditions/cosine-similarity.js';
2
+ import { never } from './never.js';
3
3
  const CONVERGE_CACHE_KEY = 'converge:previousVector';
4
4
  /**
5
5
  * Namespace of built-in loop termination predicates.
@@ -1,6 +1,6 @@
1
- import type { LLMResponse } from '../types/common';
2
- import type { Context } from '../types/context';
3
- import type { InputMessageItem, Item, MessageItem } from '../types/items';
1
+ import type { LLMResponse } from '../types/common.js';
2
+ import type { Context } from '../types/context.js';
3
+ import type { InputMessageItem, Item, MessageItem } from '../types/items.js';
4
4
  export declare function isAssistantMessage(item: unknown): item is MessageItem;
5
5
  export declare function isUserMessage(item: unknown): item is MessageItem;
6
6
  export declare function isOutputText(part: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noetic-tools/core",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "description": "Step primitives, interpreter, runtime, and memory layer contract for Noetic agents.",
6
6
  "license": "Apache-2.0",
@@ -39,7 +39,8 @@
39
39
  "./internal/test": {
40
40
  "types": "./dist/internal-test.d.ts",
41
41
  "default": "./dist/internal-test.js"
42
- }
42
+ },
43
+ "./package.json": "./package.json"
43
44
  },
44
45
  "files": [
45
46
  "dist",
@@ -67,8 +68,9 @@
67
68
  "zod": "^4.0.0"
68
69
  },
69
70
  "scripts": {
70
- "build": "bunx tsc -p tsconfig.build.json",
71
- "prepublishOnly": "rm -rf dist && bun run build",
71
+ "build": "bunx tsc -p tsconfig.build.json && bun scripts/add-js-extensions.ts",
72
+ "verify:esm": "bun scripts/verify-node-esm.ts",
73
+ "prepublishOnly": "rm -rf dist && bun run build && bun run verify:esm",
72
74
  "test": "bun test",
73
75
  "test:coverage": "bun test --coverage --coverage-reporter=text --coverage-reporter=json",
74
76
  "test:ci": "bun test --coverage --coverage-reporter=json",
@@ -1,3 +0,0 @@
1
- export type { Condition, OtherwiseClause, WhenClause } from './conditions';
2
- export { aiCondition, allCondition, anyCondition, embeddingMatch, otherwise, semanticRoute, semanticSwitch, when, } from './conditions';
3
- export { cosineSimilarity } from './cosine-similarity';
@@ -1,2 +0,0 @@
1
- export { aiCondition, allCondition, anyCondition, embeddingMatch, otherwise, semanticRoute, semanticSwitch, when, } from './conditions';
2
- export { cosineSimilarity } from './cosine-similarity';