@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.
- package/README.md +31 -11
- package/dist/adapters/in-memory-fs-adapter.d.ts +1 -1
- package/dist/adapters/in-memory-fs-adapter.js +1 -1
- package/dist/adapters/in-memory-shell-adapter.d.ts +1 -1
- package/dist/adapters/in-memory-subprocess/manifest-persistence.d.ts +3 -3
- package/dist/adapters/in-memory-subprocess/manifest-persistence.js +1 -1
- package/dist/adapters/in-memory-subprocess/metadata.d.ts +1 -1
- package/dist/adapters/in-memory-subprocess/step-completion.d.ts +1 -1
- package/dist/adapters/in-memory-subprocess/step-completion.js +1 -1
- package/dist/adapters/in-memory-subprocess/types.d.ts +2 -2
- package/dist/adapters/in-memory-subprocess-adapter.d.ts +3 -3
- package/dist/adapters/in-memory-subprocess-adapter.js +3 -3
- package/dist/adapters/openrouter.d.ts +7 -7
- package/dist/adapters/openrouter.js +5 -5
- package/dist/builders/channel-builder.d.ts +1 -1
- package/dist/builders/control-flow-builders.d.ts +3 -3
- package/dist/builders/control-flow-builders.js +3 -3
- package/dist/builders/every.d.ts +3 -3
- package/dist/builders/every.js +2 -2
- package/dist/builders/layer-provides-builders.d.ts +1 -1
- package/dist/builders/layer-provides-builders.js +1 -1
- package/dist/builders/loop-builder.d.ts +2 -2
- package/dist/builders/loop-builder.js +2 -2
- package/dist/builders/memory-builder.d.ts +1 -1
- package/dist/builders/memory-builder.js +1 -1
- package/dist/builders/provide-builder.d.ts +2 -2
- package/dist/builders/provide-builder.js +2 -2
- package/dist/builders/spawn-builder.d.ts +3 -3
- package/dist/builders/spawn-builder.js +2 -2
- package/dist/builders/step-builders.d.ts +6 -6
- package/dist/builders/step-builders.js +2 -2
- package/dist/builders/tool-builder.d.ts +3 -3
- package/dist/builders/tool-builder.js +1 -1
- package/dist/builders/workflow-hydrator.d.ts +4 -4
- package/dist/builders/workflow-hydrator.js +10 -10
- package/dist/conditions/conditions.d.ts +4 -4
- package/dist/conditions/conditions.js +2 -2
- package/dist/errors/noetic-error.d.ts +1 -1
- package/dist/harness/agent-harness.d.ts +6 -6
- package/dist/harness/agent-harness.js +13 -13
- package/dist/harness/deps/adapters.d.ts +3 -3
- package/dist/harness/deps/adapters.js +3 -3
- package/dist/harness/deps/interpreter.d.ts +5 -5
- package/dist/harness/deps/interpreter.js +4 -4
- package/dist/harness/deps/memory.d.ts +5 -5
- package/dist/harness/deps/memory.js +4 -4
- package/dist/harness/deps/runtime.d.ts +10 -10
- package/dist/harness/deps/runtime.js +7 -7
- package/dist/harness/deps/types.d.ts +16 -16
- package/dist/harness/deps/types.js +1 -1
- package/dist/harness/model-call.d.ts +4 -4
- package/dist/harness/model-call.js +5 -5
- package/dist/harness/model-schema.d.ts +4 -4
- package/dist/harness/model-schema.js +1 -1
- package/dist/harness/step-bootstrap.js +2 -2
- package/dist/index.d.ts +96 -94
- package/dist/index.js +57 -55
- package/dist/internal-test.d.ts +4 -4
- package/dist/internal-test.js +4 -4
- package/dist/interpreter/action-deps.d.ts +12 -12
- package/dist/interpreter/action-deps.js +10 -10
- package/dist/interpreter/action-types.d.ts +8 -8
- package/dist/interpreter/action-types.js +1 -1
- package/dist/interpreter/collect-tools.d.ts +2 -2
- package/dist/interpreter/collect-tools.js +1 -1
- package/dist/interpreter/execute-action.d.ts +2 -2
- package/dist/interpreter/execute-action.js +10 -10
- package/dist/interpreter/execute-control.d.ts +2 -2
- package/dist/interpreter/execute-control.js +7 -7
- package/dist/interpreter/execute.d.ts +3 -3
- package/dist/interpreter/execute.js +8 -8
- package/dist/interpreter/message-helpers.d.ts +1 -1
- package/dist/interpreter/message-helpers.js +1 -1
- package/dist/interpreter/step-dispatcher.d.ts +5 -5
- package/dist/interpreter/step-dispatcher.js +2 -2
- package/dist/interpreter/typeguards.d.ts +7 -7
- package/dist/interpreter/typeguards.js +2 -2
- package/dist/memory/budget.d.ts +2 -2
- package/dist/memory/budget.js +1 -1
- package/dist/memory/exec-context-factory.d.ts +2 -2
- package/dist/memory/exec-context-factory.js +1 -1
- package/dist/memory/function-call-utils.d.ts +1 -1
- package/dist/memory/function-call-utils.js +1 -1
- package/dist/memory/layer-api.d.ts +4 -4
- package/dist/memory/layer-api.js +2 -2
- package/dist/memory/layer-lifecycle.d.ts +6 -6
- package/dist/memory/layer-lifecycle.js +6 -6
- package/dist/memory/layer-provides.d.ts +1 -1
- package/dist/memory/layer-usage.d.ts +4 -4
- package/dist/memory/layer-usage.js +1 -1
- package/dist/memory/layers/durable-task-state.d.ts +8 -8
- package/dist/memory/layers/durable-task-state.js +2 -2
- package/dist/memory/layers/file-reference.d.ts +1 -1
- package/dist/memory/layers/file-reference.js +2 -2
- package/dist/memory/layers/history-window.d.ts +1 -1
- package/dist/memory/layers/history-window.js +4 -4
- package/dist/memory/layers/observational-memory.d.ts +5 -5
- package/dist/memory/layers/observational-memory.js +2 -2
- package/dist/memory/layers/plan.d.ts +2 -2
- package/dist/memory/layers/plan.js +5 -5
- package/dist/memory/layers/static-content.d.ts +2 -2
- package/dist/memory/layers/static-content.js +1 -1
- package/dist/memory/layers/steering.d.ts +7 -7
- package/dist/memory/layers/steering.js +5 -5
- package/dist/memory/layers/tool-memory-layer.d.ts +2 -2
- package/dist/memory/layers/tool-memory-layer.js +1 -1
- package/dist/memory/layers/working-memory.d.ts +7 -7
- package/dist/memory/layers/working-memory.js +4 -4
- package/dist/memory/projector.d.ts +2 -2
- package/dist/memory/scope.d.ts +1 -1
- package/dist/memory/strip-unresolved.d.ts +1 -1
- package/dist/observability/span-impl.d.ts +1 -1
- package/dist/observability/trace-exporter.d.ts +2 -2
- package/dist/observability/trace-exporter.js +1 -1
- package/dist/patterns/dynamic-workflow.d.ts +5 -5
- package/dist/patterns/dynamic-workflow.js +5 -5
- package/dist/patterns/flow.d.ts +2 -2
- package/dist/patterns/flow.js +1 -1
- package/dist/patterns/interview.d.ts +2 -2
- package/dist/patterns/interview.js +5 -5
- package/dist/patterns/plans.d.ts +3 -3
- package/dist/patterns/plans.js +2 -2
- package/dist/patterns/ralph-wiggum.d.ts +4 -4
- package/dist/patterns/ralph-wiggum.js +5 -5
- package/dist/patterns/react.d.ts +3 -3
- package/dist/patterns/react.js +5 -5
- package/dist/portable/adapters.d.ts +3 -3
- package/dist/portable/adapters.js +3 -3
- package/dist/portable/ask-user.d.ts +2 -2
- package/dist/portable/ask-user.js +1 -1
- package/dist/portable/builders.d.ts +6 -6
- package/dist/portable/builders.js +6 -6
- package/dist/portable/memory-layers.d.ts +6 -6
- package/dist/portable/memory-layers.js +6 -6
- package/dist/portable/runtime.d.ts +2 -2
- package/dist/portable/runtime.js +2 -2
- package/dist/portable/until.d.ts +2 -2
- package/dist/portable/until.js +2 -2
- package/dist/portable.d.ts +7 -7
- package/dist/portable.js +7 -7
- package/dist/runtime/broadcaster-utils.d.ts +2 -2
- package/dist/runtime/channel-store.d.ts +1 -1
- package/dist/runtime/channel-store.js +2 -2
- package/dist/runtime/context-deps.d.ts +4 -4
- package/dist/runtime/context-deps.js +2 -2
- package/dist/runtime/context-impl.d.ts +1 -1
- package/dist/runtime/context-impl.js +2 -2
- package/dist/runtime/context-type-deps.d.ts +14 -14
- package/dist/runtime/cwd-helpers.d.ts +1 -1
- package/dist/runtime/detached-handle.d.ts +3 -3
- package/dist/runtime/detached-handle.js +3 -3
- package/dist/runtime/durable/checkpoint-store.d.ts +2 -2
- package/dist/runtime/durable/checkpoint-store.js +2 -2
- package/dist/runtime/durable/harness-checkpoints.d.ts +6 -6
- package/dist/runtime/durable/harness-checkpoints.js +2 -2
- package/dist/runtime/durable/index.d.ts +10 -10
- package/dist/runtime/durable/index.js +5 -5
- package/dist/runtime/durable/runnable-loop.d.ts +4 -4
- package/dist/runtime/durable/session-seed.d.ts +1 -1
- package/dist/runtime/durable/stall-nudge.d.ts +3 -3
- package/dist/runtime/event-broadcaster.d.ts +1 -1
- package/dist/runtime/in-memory-storage.d.ts +1 -1
- package/dist/runtime/in-memory-storage.js +1 -1
- package/dist/runtime/item-log-impl.d.ts +3 -3
- package/dist/runtime/item-log-impl.js +1 -1
- package/dist/runtime/message-queue.d.ts +2 -2
- package/dist/runtime/session-runner.d.ts +7 -7
- package/dist/runtime/session-runner.js +3 -3
- package/dist/runtime/session-streams.d.ts +3 -3
- package/dist/runtime/session-streams.js +1 -1
- package/dist/runtime/step-registry.d.ts +2 -2
- package/dist/runtime/step-registry.js +3 -3
- package/dist/runtime/tool-memory.d.ts +3 -3
- package/dist/schemas/item.d.ts +1 -1
- package/dist/types/common.d.ts +1 -1
- package/dist/types/context-parts/item-log.d.ts +1 -1
- package/dist/types/context-parts/layer-usage.d.ts +1 -1
- package/dist/types/context.d.ts +23 -23
- package/dist/types/harness-result.d.ts +2 -2
- package/dist/types/memory-context.d.ts +4 -4
- package/dist/types/memory.d.ts +6 -6
- package/dist/types/mutable-context.d.ts +3 -3
- package/dist/types/runtime.d.ts +14 -14
- package/dist/types/steering.d.ts +2 -2
- package/dist/types/step-registrar.d.ts +1 -1
- package/dist/types/step.d.ts +7 -7
- package/dist/types/tool-context.d.ts +6 -6
- package/dist/types/tool.d.ts +1 -1
- package/dist/unstable.d.ts +8 -8
- package/dist/unstable.js +6 -6
- package/dist/until/combinators.d.ts +1 -1
- package/dist/until/never.d.ts +1 -1
- package/dist/until/predicates.d.ts +4 -4
- package/dist/until/predicates.js +2 -2
- package/dist/util/message-helpers.d.ts +3 -3
- package/package.json +6 -4
- package/dist/conditions/index.d.ts +0 -3
- 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,
|
|
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
|
package/dist/internal-test.d.ts
CHANGED
|
@@ -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';
|
package/dist/internal-test.js
CHANGED
|
@@ -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,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) {
|
package/dist/memory/budget.d.ts
CHANGED
|
@@ -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;
|
package/dist/memory/budget.js
CHANGED
|
@@ -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,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).
|
package/dist/memory/layer-api.js
CHANGED
|
@@ -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;
|