@noetic-tools/core 3.1.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 (101) 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 +84 -27
  30. package/dist/harness/agent-harness.js +101 -20
  31. package/dist/harness/deps/context.d.ts +2 -0
  32. package/dist/harness/deps/context.js +1 -0
  33. package/dist/harness/deps/runtime.d.ts +4 -4
  34. package/dist/harness/deps/runtime.js +3 -3
  35. package/dist/harness/deps/types.d.ts +1 -1
  36. package/dist/harness/model-schema.d.ts +2 -2
  37. package/dist/index.d.ts +23 -19
  38. package/dist/index.js +15 -9
  39. package/dist/interpreter/action-deps.d.ts +3 -3
  40. package/dist/interpreter/action-deps.js +2 -2
  41. package/dist/interpreter/action-types.d.ts +1 -1
  42. package/dist/interpreter/collect-tools.d.ts +1 -1
  43. package/dist/interpreter/execute-action.d.ts +10 -10
  44. package/dist/interpreter/execute-action.js +33 -14
  45. package/dist/interpreter/execute-control.d.ts +4 -4
  46. package/dist/interpreter/execute-control.js +25 -16
  47. package/dist/interpreter/execute-sub-harness.d.ts +1 -1
  48. package/dist/interpreter/execute-sub-harness.js +22 -1
  49. package/dist/interpreter/execute.d.ts +3 -3
  50. package/dist/interpreter/execute.js +78 -31
  51. package/dist/interpreter/step-dispatcher.d.ts +3 -3
  52. package/dist/interpreter/sub-harness-events.d.ts +2 -2
  53. package/dist/interpreter/typeguards.d.ts +4 -4
  54. package/dist/patterns/dynamic-workflow.d.ts +7 -4
  55. package/dist/patterns/dynamic-workflow.js +2 -0
  56. package/dist/patterns/interview.d.ts +2 -2
  57. package/dist/patterns/plans.d.ts +5 -5
  58. package/dist/patterns/ralph-wiggum.d.ts +2 -2
  59. package/dist/patterns/react.d.ts +7 -5
  60. package/dist/patterns/react.js +6 -4
  61. package/dist/portable/builders.js +2 -0
  62. package/dist/portable/context-layers.d.ts +8 -0
  63. package/dist/portable/context-layers.js +8 -0
  64. package/dist/portable.d.ts +2 -2
  65. package/dist/portable.js +2 -2
  66. package/dist/runtime/context-deps.d.ts +2 -2
  67. package/dist/runtime/context-deps.js +1 -1
  68. package/dist/runtime/context-impl.d.ts +48 -9
  69. package/dist/runtime/context-impl.js +95 -10
  70. package/dist/runtime/context-type-deps.d.ts +1 -1
  71. package/dist/runtime/durable/checkpoint-store.d.ts +1 -1
  72. package/dist/runtime/durable/harness-checkpoints.d.ts +17 -4
  73. package/dist/runtime/durable/harness-checkpoints.js +21 -3
  74. package/dist/runtime/durable/index.d.ts +2 -0
  75. package/dist/runtime/durable/index.js +1 -0
  76. package/dist/runtime/durable/step-ledger.d.ts +107 -5
  77. package/dist/runtime/durable/step-ledger.js +179 -10
  78. package/dist/runtime/in-memory-storage.d.ts +1 -1
  79. package/dist/runtime/session-runner.d.ts +1 -1
  80. package/dist/runtime/step-registry.d.ts +3 -3
  81. package/dist/runtime/{tool-memory.d.ts → tool-context.d.ts} +1 -2
  82. package/dist/runtime/{tool-memory.js → tool-context.js} +5 -2
  83. package/dist/runtime/tool-ui.d.ts +1 -1
  84. package/dist/runtime/tool-ui.js +1 -1
  85. package/dist/schemas/workflow.d.ts +5 -279
  86. package/dist/schemas/workflow.js +4 -376
  87. package/dist/types/mutable-context.d.ts +2 -2
  88. package/dist/types/step-registrar.d.ts +1 -1
  89. package/dist/unstable.d.ts +5 -5
  90. package/dist/unstable.js +3 -3
  91. package/dist/until/predicates.d.ts +1 -1
  92. package/package.json +4 -4
  93. package/schema/noetic-workflow.schema.json +28 -0
  94. package/dist/builders/memory-builder.d.ts +0 -11
  95. package/dist/builders/memory-builder.js +0 -15
  96. package/dist/harness/deps/memory.d.ts +0 -2
  97. package/dist/harness/deps/memory.js +0 -1
  98. package/dist/patterns/flow.d.ts +0 -2
  99. package/dist/patterns/flow.js +0 -1
  100. package/dist/portable/memory-layers.d.ts +0 -8
  101. package/dist/portable/memory-layers.js +0 -8
@@ -3,17 +3,17 @@
3
3
  * Unstable exports for framework extenders.
4
4
  *
5
5
  * Symbols exported from this module may change in any minor release.
6
- * They are intended for authors of custom memory layers, runtime backends,
6
+ * They are intended for authors of custom context layers, runtime backends,
7
7
  * and other framework extensions. Do not depend on them in application code.
8
8
  */
9
- /** @unstable Budget allocation algorithm for memory layer token budgets. */
9
+ /** @unstable Budget allocation algorithm for context layer token budgets. */
10
10
  /** @unstable Layer state store type for managing per-layer state during execution. */
11
- export type { BudgetAllocation, BudgetLimits, LayerStateStore } from '@noetic-tools/memory';
11
+ export type { BudgetAllocation, BudgetLimits, LayerStateStore } from '@noetic-tools/context';
12
12
  /** @unstable Budget allocation and checking utilities. */
13
13
  /** @unstable Factory for creating layer state stores. */
14
- /** @unstable View assembly algorithm that converges memory layer outputs into the LLM context. */
14
+ /** @unstable View assembly algorithm that converges context layer outputs into the LLM context. */
15
15
  /** @unstable Factory for creating scoped storage wrappers around a StorageAdapter. */
16
- export { allocateBudgets, assembleView, checkBudget, createLayerStateStore, createScopedStorage, } from '@noetic-tools/memory';
16
+ export { allocateBudgets, assembleView, checkBudget, createLayerStateStore, createScopedStorage, } from '@noetic-tools/context';
17
17
  /** @unstable Unsafe cast utility for bridging internal type boundaries. */
18
18
  export { frameworkCast } from '@noetic-tools/types';
19
19
  /**
package/dist/unstable.js CHANGED
@@ -3,14 +3,14 @@
3
3
  * Unstable exports for framework extenders.
4
4
  *
5
5
  * Symbols exported from this module may change in any minor release.
6
- * They are intended for authors of custom memory layers, runtime backends,
6
+ * They are intended for authors of custom context layers, runtime backends,
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
10
  /** @unstable Factory for creating layer state stores. */
11
- /** @unstable View assembly algorithm that converges memory layer outputs into the LLM context. */
11
+ /** @unstable View assembly algorithm that converges context layer outputs into the LLM context. */
12
12
  /** @unstable Factory for creating scoped storage wrappers around a StorageAdapter. */
13
- export { allocateBudgets, assembleView, checkBudget, createLayerStateStore, createScopedStorage, } from '@noetic-tools/memory';
13
+ export { allocateBudgets, assembleView, checkBudget, createLayerStateStore, createScopedStorage, } from '@noetic-tools/context';
14
14
  /** @unstable Unsafe cast utility for bridging internal type boundaries. */
15
15
  export { frameworkCast } from '@noetic-tools/types';
16
16
  /**
@@ -1,4 +1,4 @@
1
- import type { StorageAdapter } from '@noetic-tools/memory';
1
+ import type { StorageAdapter } from '@noetic-tools/context';
2
2
  import type { Until } from '@noetic-tools/types';
3
3
  import type { EmbedFn } from '../types/embed.js';
4
4
  import { never } from './never.js';
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@noetic-tools/core",
3
- "version": "3.1.0",
3
+ "version": "4.0.0",
4
4
  "type": "module",
5
- "description": "Step primitives, interpreter, runtime, and memory layer contract for Noetic agents.",
5
+ "description": "Step primitives, interpreter, runtime, and context layer contract for Noetic agents.",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",
@@ -66,8 +66,8 @@
66
66
  }
67
67
  },
68
68
  "dependencies": {
69
- "@noetic-tools/memory": "^2.0.0",
70
- "@noetic-tools/types": "^2.1.0",
69
+ "@noetic-tools/context": "^1.0.0",
70
+ "@noetic-tools/types": "^2.3.0",
71
71
  "@openrouter/agent": "^0.6.0",
72
72
  "zod": "^4.0.0"
73
73
  },
@@ -455,6 +455,34 @@
455
455
  ],
456
456
  "additionalProperties": false
457
457
  },
458
+ {
459
+ "type": "object",
460
+ "properties": {
461
+ "kind": {
462
+ "type": "string",
463
+ "const": "subflow"
464
+ },
465
+ "id": {
466
+ "type": "string",
467
+ "minLength": 1
468
+ },
469
+ "document": {
470
+ "$ref": "#"
471
+ },
472
+ "ref": {
473
+ "type": "string",
474
+ "minLength": 1
475
+ },
476
+ "input": {
477
+ "type": "string"
478
+ }
479
+ },
480
+ "required": [
481
+ "kind",
482
+ "id"
483
+ ],
484
+ "additionalProperties": false
485
+ },
458
486
  {
459
487
  "type": "object",
460
488
  "properties": {
@@ -1,11 +0,0 @@
1
- import type { MemoryConfig, MemoryLayer } from '@noetic-tools/memory';
2
- /**
3
- * Creates a type-safe memory configuration from a tuple of memory layers.
4
- * The returned config preserves literal layer types for compile-time inference
5
- * via `InferMemory<typeof config>`.
6
- *
7
- * @public
8
- * @param layers - Tuple of memory layers to include in the configuration.
9
- * @returns A `MemoryConfig` carrying the inferred memory shape as a phantom type.
10
- */
11
- export declare function memory<const T extends readonly MemoryLayer[]>(layers: T): MemoryConfig<T>;
@@ -1,15 +0,0 @@
1
- import { frameworkCast } from '@noetic-tools/types';
2
- /**
3
- * Creates a type-safe memory configuration from a tuple of memory layers.
4
- * The returned config preserves literal layer types for compile-time inference
5
- * via `InferMemory<typeof config>`.
6
- *
7
- * @public
8
- * @param layers - Tuple of memory layers to include in the configuration.
9
- * @returns A `MemoryConfig` carrying the inferred memory shape as a phantom type.
10
- */
11
- export function memory(layers) {
12
- return frameworkCast({
13
- layers,
14
- });
15
- }
@@ -1,2 +0,0 @@
1
- export type { LayerStateStore, RecallCache } from '@noetic-tools/memory';
2
- export { afterModelCallLayers, allocateBudgets, assembleView, beforeToolCallLayers, contextToExecCtx, createLayerStateStore, createRecallCache, DEFAULT_PROJECTION, disposeLayers, executeRerender, initLayers, projectHistoryLayers, recallLayers, recallLayersAtomic, recallLayersEventual, resolveLayerTools, runAppendPipeline, storeLayers, } from '@noetic-tools/memory';
@@ -1 +0,0 @@
1
- export { afterModelCallLayers, allocateBudgets, assembleView, beforeToolCallLayers, contextToExecCtx, createLayerStateStore, createRecallCache, DEFAULT_PROJECTION, disposeLayers, executeRerender, initLayers, projectHistoryLayers, recallLayers, recallLayersAtomic, recallLayersEventual, resolveLayerTools, runAppendPipeline, storeLayers, } from '@noetic-tools/memory';
@@ -1,2 +0,0 @@
1
- export type { FlowNode, ForkFlowNode, LlmFlowNode, SequenceFlowNode, SpawnFlowNode, SubagentFlowNode, } from '@noetic-tools/memory';
2
- export { FlowSchema, flowDepth, validateFlow, walkFlow } from '@noetic-tools/memory';
@@ -1 +0,0 @@
1
- export { FlowSchema, flowDepth, validateFlow, walkFlow } from '@noetic-tools/memory';
@@ -1,8 +0,0 @@
1
- /** @public */
2
- /** @public */
3
- /** @public */
4
- /** @public */
5
- /** @public */
6
- /** @public */
7
- /** @public */
8
- export { durableTaskState, historyWindow, observationalMemory, planMemory, temporalMemory, toolMemoryLayer, workingMemory, } from '@noetic-tools/memory';
@@ -1,8 +0,0 @@
1
- /** @public */
2
- /** @public */
3
- /** @public */
4
- /** @public */
5
- /** @public */
6
- /** @public */
7
- /** @public */
8
- export { durableTaskState, historyWindow, observationalMemory, planMemory, temporalMemory, toolMemoryLayer, workingMemory, } from '@noetic-tools/memory';