@noetic-tools/core 0.0.1 → 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 +8 -0
- package/dist/adapters/in-memory-subprocess/manifest-persistence.js +56 -0
- package/dist/adapters/in-memory-subprocess/metadata.d.ts +12 -0
- package/dist/adapters/in-memory-subprocess/metadata.js +58 -0
- package/dist/adapters/in-memory-subprocess/step-completion.d.ts +3 -0
- package/dist/adapters/in-memory-subprocess/step-completion.js +86 -0
- package/dist/adapters/in-memory-subprocess/types.d.ts +88 -0
- package/dist/adapters/in-memory-subprocess/types.js +2 -0
- package/dist/adapters/in-memory-subprocess-adapter.d.ts +12 -4
- package/dist/adapters/in-memory-subprocess-adapter.js +164 -55
- package/dist/adapters/openrouter.d.ts +16 -7
- package/dist/adapters/openrouter.js +68 -7
- 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 +9 -4
- package/dist/builders/every.d.ts +3 -3
- package/dist/builders/every.js +5 -2
- package/dist/builders/layer-provides-builders.d.ts +1 -32
- package/dist/builders/layer-provides-builders.js +1 -33
- package/dist/builders/loop-builder.d.ts +2 -2
- package/dist/builders/loop-builder.js +5 -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 +5 -2
- package/dist/builders/spawn-builder.d.ts +22 -9
- package/dist/builders/spawn-builder.js +17 -3
- package/dist/builders/step-builders.d.ts +51 -30
- package/dist/builders/step-builders.js +31 -12
- package/dist/builders/tool-builder.d.ts +7 -3
- package/dist/builders/tool-builder.js +3 -1
- package/dist/builders/workflow-hydrator.d.ts +38 -0
- package/dist/builders/workflow-hydrator.js +336 -0
- 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/errors/noetic-error.js +2 -0
- package/dist/{runtime → harness}/agent-harness.d.ts +65 -45
- package/dist/harness/agent-harness.js +576 -0
- package/dist/harness/deps/adapters.d.ts +4 -0
- package/dist/harness/deps/adapters.js +4 -0
- package/dist/harness/deps/interpreter.d.ts +5 -0
- package/dist/harness/deps/interpreter.js +4 -0
- package/dist/harness/deps/memory.d.ts +5 -0
- package/dist/harness/deps/memory.js +4 -0
- package/dist/harness/deps/runtime.d.ts +10 -0
- package/dist/harness/deps/runtime.js +7 -0
- package/dist/harness/deps/types.d.ts +17 -0
- package/dist/harness/deps/types.js +1 -0
- package/dist/harness/model-call.d.ts +50 -0
- package/dist/harness/model-call.js +694 -0
- package/dist/harness/model-schema.d.ts +19 -0
- package/dist/harness/model-schema.js +46 -0
- package/dist/harness/step-bootstrap.d.ts +25 -0
- package/dist/harness/step-bootstrap.js +170 -0
- package/dist/index.d.ts +114 -76
- package/dist/index.js +74 -50
- package/dist/internal-test.d.ts +4 -4
- package/dist/internal-test.js +4 -4
- package/dist/interpreter/action-deps.d.ts +12 -0
- package/dist/interpreter/action-deps.js +10 -0
- package/dist/interpreter/action-types.d.ts +8 -0
- package/dist/interpreter/action-types.js +1 -0
- package/dist/interpreter/collect-tools.d.ts +2 -2
- package/dist/interpreter/collect-tools.js +6 -2
- package/dist/interpreter/execute-action.d.ts +22 -0
- package/dist/interpreter/execute-action.js +527 -0
- package/dist/interpreter/{execute-every.d.ts → execute-control.d.ts} +8 -2
- package/dist/interpreter/execute-control.js +530 -0
- package/dist/interpreter/execute.d.ts +16 -3
- package/dist/interpreter/execute.js +154 -51
- package/dist/interpreter/message-helpers.d.ts +1 -9
- package/dist/interpreter/message-helpers.js +1 -42
- package/dist/interpreter/step-dispatcher.d.ts +61 -0
- package/dist/interpreter/step-dispatcher.js +67 -0
- package/dist/interpreter/typeguards.d.ts +8 -15
- package/dist/interpreter/typeguards.js +4 -21
- package/dist/memory/budget.d.ts +2 -2
- package/dist/memory/budget.js +1 -1
- package/dist/{runtime → memory}/exec-context-factory.d.ts +2 -2
- package/dist/{runtime → memory}/exec-context-factory.js +1 -1
- package/dist/memory/flow-schema.d.ts +52 -0
- package/dist/memory/flow-schema.js +102 -0
- package/dist/memory/function-call-utils.d.ts +1 -1
- package/dist/memory/function-call-utils.js +4 -2
- 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 +32 -0
- package/dist/memory/layer-provides.js +33 -0
- package/dist/memory/layer-usage.d.ts +4 -3
- package/dist/memory/layer-usage.js +9 -3
- 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 +303 -247
- 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 -3
- package/dist/memory/layers/plan.d.ts +2 -2
- package/dist/memory/layers/plan.js +15 -10
- 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 +55 -0
- package/dist/patterns/dynamic-workflow.js +194 -0
- package/dist/patterns/flow.d.ts +2 -52
- package/dist/patterns/flow.js +1 -103
- package/dist/patterns/interview.d.ts +2 -2
- package/dist/patterns/interview.js +5 -5
- package/dist/patterns/plans.d.ts +6 -6
- package/dist/patterns/plans.js +4 -4
- 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 +6 -0
- package/dist/portable/adapters.js +6 -0
- package/dist/portable/ask-user.d.ts +4 -0
- package/dist/portable/ask-user.js +2 -0
- package/dist/portable/builders.d.ts +12 -0
- package/dist/portable/builders.js +12 -0
- package/dist/portable/memory-layers.d.ts +12 -0
- package/dist/portable/memory-layers.js +12 -0
- package/dist/portable/runtime.d.ts +4 -0
- package/dist/portable/runtime.js +4 -0
- package/dist/portable/until.d.ts +4 -0
- package/dist/portable/until.js +4 -0
- package/dist/portable.d.ts +8 -26
- package/dist/portable.js +8 -34
- package/dist/runtime/broadcaster-utils.d.ts +7 -3
- package/dist/runtime/broadcaster-utils.js +11 -6
- 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 -0
- package/dist/runtime/context-deps.js +2 -0
- package/dist/runtime/context-impl.d.ts +42 -12
- package/dist/runtime/context-impl.js +52 -5
- package/dist/runtime/context-type-deps.d.ts +14 -0
- package/dist/runtime/context-type-deps.js +1 -0
- package/dist/runtime/cwd-helpers.d.ts +1 -1
- package/dist/runtime/detached-handle.d.ts +52 -4
- package/dist/runtime/detached-handle.js +218 -14
- package/dist/runtime/durable/checkpoint-store.d.ts +38 -0
- package/dist/runtime/durable/checkpoint-store.js +101 -0
- package/dist/runtime/durable/detached-signal.d.ts +37 -0
- package/dist/runtime/durable/detached-signal.js +52 -0
- package/dist/runtime/durable/harness-checkpoints.d.ts +51 -0
- package/dist/runtime/durable/harness-checkpoints.js +104 -0
- package/dist/runtime/durable/index.d.ts +10 -0
- package/dist/runtime/durable/index.js +5 -0
- package/dist/runtime/durable/runnable-loop.d.ts +100 -0
- package/dist/runtime/durable/runnable-loop.js +90 -0
- package/dist/runtime/durable/session-seed.d.ts +28 -0
- package/dist/runtime/durable/session-seed.js +27 -0
- package/dist/runtime/durable/stall-nudge.d.ts +82 -0
- package/dist/runtime/durable/stall-nudge.js +87 -0
- 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 +42 -0
- package/dist/runtime/step-registry.js +77 -0
- package/dist/runtime/tool-memory.d.ts +3 -3
- package/dist/schemas/item.d.ts +1 -1
- package/dist/schemas/workflow.d.ts +139 -0
- package/dist/schemas/workflow.js +232 -0
- package/dist/types/ask-user-types.d.ts +57 -0
- package/dist/types/ask-user-types.js +74 -0
- package/dist/types/checkpoint.d.ts +98 -0
- package/dist/types/checkpoint.js +81 -0
- package/dist/types/common.d.ts +1 -50
- package/dist/types/context-parts/item-log.d.ts +6 -0
- package/dist/types/context-parts/item-log.js +1 -0
- package/dist/types/context-parts/layer-usage.d.ts +18 -0
- package/dist/types/context-parts/layer-usage.js +1 -0
- package/dist/types/context.d.ts +140 -31
- package/dist/types/error.d.ts +15 -0
- package/dist/types/harness-result.d.ts +2 -2
- package/dist/types/items.d.ts +18 -2
- package/dist/types/memory-context.d.ts +39 -0
- package/dist/types/memory-context.js +1 -0
- package/dist/types/memory.d.ts +38 -68
- package/dist/types/mutable-context.d.ts +3 -3
- package/dist/types/runtime.d.ts +14 -13
- package/dist/types/steering.d.ts +2 -2
- package/dist/types/step-registrar.d.ts +46 -0
- package/dist/types/step-registrar.js +56 -0
- package/dist/types/step.d.ts +34 -9
- package/dist/types/subprocess-adapter.d.ts +119 -3
- package/dist/types/subprocess-adapter.js +2 -0
- package/dist/types/tool-context.d.ts +6 -6
- package/dist/types/tool.d.ts +64 -0
- package/dist/types/tool.js +1 -0
- package/dist/unstable.d.ts +9 -9
- package/dist/unstable.js +7 -7
- package/dist/until/combinators.d.ts +1 -1
- package/dist/until/never.d.ts +1 -1
- package/dist/until/predicates.d.ts +13 -4
- package/dist/until/predicates.js +16 -2
- package/dist/util/message-helpers.d.ts +17 -0
- package/dist/util/message-helpers.js +64 -0
- package/package.json +6 -4
- package/dist/adapters/local-fs-adapter.d.ts +0 -3
- package/dist/adapters/local-fs-adapter.js +0 -43
- package/dist/adapters/local-shell-adapter.d.ts +0 -51
- package/dist/adapters/local-shell-adapter.js +0 -167
- package/dist/adapters/local-subprocess-adapter.d.ts +0 -16
- package/dist/adapters/local-subprocess-adapter.js +0 -187
- package/dist/conditions/index.d.ts +0 -3
- package/dist/conditions/index.js +0 -2
- package/dist/interpreter/execute-branch.d.ts +0 -3
- package/dist/interpreter/execute-branch.js +0 -10
- package/dist/interpreter/execute-every.js +0 -143
- package/dist/interpreter/execute-fork.d.ts +0 -3
- package/dist/interpreter/execute-fork.js +0 -215
- package/dist/interpreter/execute-llm.d.ts +0 -4
- package/dist/interpreter/execute-llm.js +0 -217
- package/dist/interpreter/execute-loop.d.ts +0 -3
- package/dist/interpreter/execute-loop.js +0 -171
- package/dist/interpreter/execute-provide.d.ts +0 -10
- package/dist/interpreter/execute-provide.js +0 -64
- package/dist/interpreter/execute-run.d.ts +0 -3
- package/dist/interpreter/execute-run.js +0 -39
- package/dist/interpreter/execute-spawn.d.ts +0 -11
- package/dist/interpreter/execute-spawn.js +0 -113
- package/dist/interpreter/execute-tool.d.ts +0 -5
- package/dist/interpreter/execute-tool.js +0 -81
- package/dist/runtime/agent-harness.js +0 -1170
- /package/dist/{interpreter → util}/framework-cast.d.ts +0 -0
- /package/dist/{interpreter → util}/framework-cast.js +0 -0
package/dist/index.js
CHANGED
|
@@ -1,112 +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 {
|
|
10
|
-
/** @public */
|
|
11
|
-
export { createLocalShellAdapter, } from './adapters/local-shell-adapter';
|
|
12
|
-
/** @public */
|
|
13
|
-
export { createLocalSubprocessAdapter, defaultProcessSignaller, } from './adapters/local-subprocess-adapter';
|
|
14
|
-
/** @public */
|
|
15
|
-
export { createOpenRouterEmbed } from './adapters/openrouter';
|
|
9
|
+
export { createOpenRouterEmbed } from './adapters/openrouter.js';
|
|
16
10
|
//#endregion
|
|
17
11
|
//#region Builders
|
|
18
12
|
/** @public */
|
|
19
|
-
export { channel } from './builders/channel-builder';
|
|
13
|
+
export { channel } from './builders/channel-builder.js';
|
|
14
|
+
/** @public */
|
|
15
|
+
export { branch, fork } from './builders/control-flow-builders.js';
|
|
16
|
+
/** @public */
|
|
17
|
+
export { every } from './builders/every.js';
|
|
20
18
|
/** @public */
|
|
21
|
-
export {
|
|
19
|
+
export { layerData, layerFn } from './builders/layer-provides-builders.js';
|
|
22
20
|
/** @public */
|
|
23
|
-
export {
|
|
21
|
+
export { loop } from './builders/loop-builder.js';
|
|
24
22
|
/** @public */
|
|
25
|
-
export {
|
|
23
|
+
export { memory } from './builders/memory-builder.js';
|
|
26
24
|
/** @public */
|
|
27
|
-
export {
|
|
25
|
+
export { provide } from './builders/provide-builder.js';
|
|
28
26
|
/** @public */
|
|
29
|
-
export {
|
|
27
|
+
export { spawn } from './builders/spawn-builder.js';
|
|
30
28
|
/** @public */
|
|
31
|
-
export {
|
|
29
|
+
export { step } from './builders/step-builders.js';
|
|
32
30
|
/** @public */
|
|
33
|
-
export {
|
|
31
|
+
export { tool, toolWithGenerator } from './builders/tool-builder.js';
|
|
34
32
|
/** @public */
|
|
35
|
-
export {
|
|
33
|
+
export { hydrateNode, hydrateWorkflow } from './builders/workflow-hydrator.js';
|
|
36
34
|
/** @public */
|
|
37
|
-
export {
|
|
35
|
+
export { aiCondition, allCondition, anyCondition, embeddingMatch, otherwise, semanticRoute, semanticSwitch, when, } from './conditions/conditions.js';
|
|
38
36
|
/** @public */
|
|
39
|
-
export {
|
|
37
|
+
export { cosineSimilarity } from './conditions/cosine-similarity.js';
|
|
40
38
|
//#endregion
|
|
41
39
|
//#region Errors
|
|
42
40
|
/** @public */
|
|
43
|
-
export { isNoeticConfigError, NoeticConfigError } from './errors/noetic-config-error';
|
|
41
|
+
export { isNoeticConfigError, NoeticConfigError } from './errors/noetic-config-error.js';
|
|
44
42
|
/** @public */
|
|
45
|
-
export { isNoeticError, NoeticErrorImpl } from './errors/noetic-error';
|
|
43
|
+
export { isNoeticError, NoeticErrorImpl } from './errors/noetic-error.js';
|
|
44
|
+
/** @public */
|
|
45
|
+
export { AskUserAnnotationSchema, AskUserInputSchema, AskUserOptionSchema, AskUserOutputSchema, AskUserQuestionSchema, } from './types/ask-user-types.js';
|
|
46
46
|
//#endregion
|
|
47
47
|
//#region Execution
|
|
48
48
|
/** @public */
|
|
49
|
-
export { execute } from './interpreter/execute';
|
|
49
|
+
export { execute } from './interpreter/execute.js';
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region Memory Layers
|
|
52
|
+
/** @public */
|
|
53
|
+
export { findFunctionCall } from './memory/function-call-utils.js';
|
|
50
54
|
/** @public */
|
|
51
|
-
export { durableTaskState } from './memory/layers/durable-task-state';
|
|
55
|
+
export { durableTaskState } from './memory/layers/durable-task-state.js';
|
|
52
56
|
/** @public */
|
|
53
|
-
export { fileReference } from './memory/layers/file-reference';
|
|
57
|
+
export { fileReference } from './memory/layers/file-reference.js';
|
|
54
58
|
/** @public */
|
|
55
|
-
export { historyWindow } from './memory/layers/history-window';
|
|
59
|
+
export { historyWindow } from './memory/layers/history-window.js';
|
|
56
60
|
/** @public */
|
|
57
|
-
export { observationalMemory } from './memory/layers/observational-memory';
|
|
61
|
+
export { observationalMemory } from './memory/layers/observational-memory.js';
|
|
58
62
|
/** @public */
|
|
59
|
-
export { PlanPhase, planMemory } from './memory/layers/plan';
|
|
63
|
+
export { PlanPhase, planMemory } from './memory/layers/plan.js';
|
|
60
64
|
/** @public */
|
|
61
|
-
export { staticContent } from './memory/layers/static-content';
|
|
65
|
+
export { staticContent } from './memory/layers/static-content.js';
|
|
62
66
|
/** @public */
|
|
63
|
-
export { steering } from './memory/layers/steering';
|
|
67
|
+
export { steering } from './memory/layers/steering.js';
|
|
64
68
|
/** @public */
|
|
65
|
-
export { toolMemoryLayer } from './memory/layers/tool-memory-layer';
|
|
69
|
+
export { toolMemoryLayer } from './memory/layers/tool-memory-layer.js';
|
|
66
70
|
/** @public */
|
|
67
|
-
export { workingMemory } from './memory/layers/working-memory';
|
|
71
|
+
export { workingMemory } from './memory/layers/working-memory.js';
|
|
68
72
|
/** @public */
|
|
69
|
-
export { stripUnresolvedToolCalls } from './memory/strip-unresolved';
|
|
73
|
+
export { stripUnresolvedToolCalls } from './memory/strip-unresolved.js';
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region Message Utilities
|
|
76
|
+
/** @public */
|
|
77
|
+
export { createMessage, estimateTokens } from './util/message-helpers.js';
|
|
70
78
|
//#endregion
|
|
71
79
|
//#region Observability
|
|
72
80
|
/** @public */
|
|
73
|
-
export {
|
|
81
|
+
export { GenAI, ToolAttr } from './observability/genai-attributes.js';
|
|
82
|
+
/** @public */
|
|
83
|
+
export { InMemoryExporter, NoopExporter } from './observability/trace-exporter.js';
|
|
74
84
|
/** @public */
|
|
75
|
-
export { createInMemoryStorage } from './runtime/in-memory-storage';
|
|
85
|
+
export { createInMemoryStorage } from './runtime/in-memory-storage.js';
|
|
76
86
|
/** @public */
|
|
77
|
-
export {
|
|
87
|
+
export { dynamicWorkflow, parseAndRunWorkflow } from './patterns/dynamic-workflow.js';
|
|
78
88
|
/** @public */
|
|
79
|
-
export {
|
|
89
|
+
export { FlowSchema, flowDepth, validateFlow, walkFlow } from './patterns/flow.js';
|
|
80
90
|
/** @public */
|
|
81
|
-
export {
|
|
91
|
+
export { interview } from './patterns/interview.js';
|
|
82
92
|
/** @public */
|
|
83
|
-
export {
|
|
93
|
+
export { adaptivePlan, compilePlan, PlanNodeSchema } from './patterns/plans.js';
|
|
84
94
|
/** @public */
|
|
85
|
-
export {
|
|
95
|
+
export { ralphWiggum } from './patterns/ralph-wiggum.js';
|
|
96
|
+
/** @public */
|
|
97
|
+
export { react } from './patterns/react.js';
|
|
86
98
|
//#endregion
|
|
87
99
|
//#region Runtime
|
|
88
100
|
/** @public */
|
|
89
|
-
export { AgentHarness } from './
|
|
101
|
+
export { AgentHarness } from './harness/agent-harness.js';
|
|
102
|
+
/** @public */
|
|
103
|
+
export { CheckpointKeys, createCheckpointStore, createDetachedSignal, createNudgeMessage, createStallNudgeHook, DEFAULT_NUDGE_MESSAGE_TEXT, runnableLoop, seedFromItems, } from './runtime/durable/index.js';
|
|
104
|
+
/** @public */
|
|
105
|
+
export { getRegistry, lookupStep, registerStep } from './runtime/step-registry.js';
|
|
90
106
|
//#endregion
|
|
91
107
|
//#region Schemas
|
|
92
108
|
/** @public */
|
|
93
|
-
export { defaultItemSchemaRegistry, ItemSchema, ItemSchemaRegistry } from './schemas/item';
|
|
109
|
+
export { defaultItemSchemaRegistry, ItemSchema, ItemSchemaRegistry } from './schemas/item.js';
|
|
110
|
+
/** @public */
|
|
111
|
+
export { MergeStrategySchema, UntilPredicateSchema, validateWorkflow, WorkflowDocumentSchema, WorkflowNodeSchema, walkWorkflow, workflowDepth, } from './schemas/workflow.js';
|
|
94
112
|
//#endregion
|
|
95
113
|
//#region Types — Context
|
|
96
114
|
/** @public */
|
|
97
|
-
export { getToolCwd, setToolCwd, snapshotCwdState } from './runtime/cwd-helpers';
|
|
115
|
+
export { getToolCwd, setToolCwd, snapshotCwdState } from './runtime/cwd-helpers.js';
|
|
98
116
|
/** @public */
|
|
99
|
-
export { DetachedStatus } from './types/detached';
|
|
117
|
+
export { DetachedStatus } from './types/detached.js';
|
|
100
118
|
/** @public */
|
|
101
|
-
export {
|
|
119
|
+
export { CheckpointSchemaVersion, CheckpointSnapshotSchema, CwdSnapshotSchema, FrontierFrameSchema, ItemLogSnapshotSchema, PendingAskUserSnapshotSchema, } from './types/checkpoint.js';
|
|
102
120
|
/** @public */
|
|
103
|
-
export {
|
|
121
|
+
export { Slot } from './types/memory.js';
|
|
122
|
+
/** @public */
|
|
123
|
+
export { LedgerEntryKind, SteeringAction } from './types/steering.js';
|
|
124
|
+
//#endregion
|
|
125
|
+
//#region Types — Shell
|
|
126
|
+
/** @public Reusable error-serialiser used by custom SubprocessAdapter implementations. */
|
|
127
|
+
export { serializeError } from './adapters/in-memory-subprocess/metadata.js';
|
|
104
128
|
/** @public */
|
|
105
|
-
export { TIMEOUT_ERROR_PREFIX } from './types/shell-adapter';
|
|
129
|
+
export { TIMEOUT_ERROR_PREFIX } from './types/shell-adapter.js';
|
|
106
130
|
//#endregion
|
|
107
131
|
//#region Until
|
|
108
132
|
/** @public */
|
|
109
|
-
export { all, any } from './until/combinators';
|
|
133
|
+
export { all, any } from './until/combinators.js';
|
|
110
134
|
/** @public */
|
|
111
|
-
export { until } from './until/predicates';
|
|
135
|
+
export { until } from './until/predicates.js';
|
|
112
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';
|
|
@@ -0,0 +1,12 @@
|
|
|
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';
|
|
@@ -0,0 +1,10 @@
|
|
|
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';
|
|
@@ -0,0 +1,8 @@
|
|
|
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';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SteeringAction } from '../types/steering.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
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 '
|
|
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
|
|
@@ -28,7 +28,11 @@ export function deduplicateTools(tools) {
|
|
|
28
28
|
function walkStep(step, out) {
|
|
29
29
|
switch (step.kind) {
|
|
30
30
|
case 'llm':
|
|
31
|
-
|
|
31
|
+
// Skip function-form tools: they're resolved per execution from `ctx`
|
|
32
|
+
// and cannot contribute to the pre-computed unified set. Consumers that
|
|
33
|
+
// need those tools in the pool should register them via
|
|
34
|
+
// `AgentHarness.tools` instead.
|
|
35
|
+
if (Array.isArray(step.tools)) {
|
|
32
36
|
out.push(...step.tools);
|
|
33
37
|
}
|
|
34
38
|
return;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Action step handlers: run, llm, spawn, provide, tool.
|
|
3
|
+
*/
|
|
4
|
+
import type { ItemSchemaRegistry, LayerStateStore } from './action-deps.js';
|
|
5
|
+
import type { AgentHarnessContract, Context, ExecuteStepFn, MemoryLayer, StepLLM, StepProvide, StepRun, StepSpawn, StepTool } from './action-types.js';
|
|
6
|
+
export declare function executeRun<TMemory, I, O>(step: StepRun<TMemory, I, O>, input: I, ctx: Context<TMemory>): Promise<O>;
|
|
7
|
+
export declare function executeLLM<TMemory, I, O>(step: StepLLM<TMemory, I, O>, input: I, ctx: Context<TMemory>, layers?: MemoryLayer[]): Promise<O>;
|
|
8
|
+
export interface ExecuteSpawnOpts {
|
|
9
|
+
layerStore?: LayerStateStore;
|
|
10
|
+
parentLayers?: MemoryLayer[];
|
|
11
|
+
itemSchemas?: ItemSchemaRegistry;
|
|
12
|
+
}
|
|
13
|
+
export declare function executeSpawn<TMemory, I, O>(step: StepSpawn<TMemory, I, O>, input: I, ctx: Context<TMemory>, executeStep: ExecuteStepFn, opts?: ExecuteSpawnOpts): Promise<O>;
|
|
14
|
+
/**
|
|
15
|
+
* Executes a provide step by attaching memory layers to the current context
|
|
16
|
+
* without creating an isolated child context.
|
|
17
|
+
*
|
|
18
|
+
* Unlike spawn, provide does not create a new itemLog or clone state.
|
|
19
|
+
* Events flow through to the parent in real-time.
|
|
20
|
+
*/
|
|
21
|
+
export declare function executeProvide<TMemory, I, O>(step: StepProvide<TMemory, I, O>, input: I, ctx: Context<TMemory>, executeStep: ExecuteStepFn): Promise<O>;
|
|
22
|
+
export declare function executeTool<TMemory, I, O>(step: StepTool<TMemory, I, O>, input: I, ctx: Context<TMemory>, harness: AgentHarnessContract, layers?: MemoryLayer[]): Promise<O>;
|