@noetic-tools/core 5.3.0 → 5.4.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.
- package/README.md +8 -6
- package/dist/adapters/in-memory-subprocess/step-completion.js +1 -1
- package/dist/adapters/openrouter.d.ts +12 -1
- package/dist/adapters/openrouter.js +79 -5
- package/dist/builders/control-flow-builders.d.ts +13 -13
- package/dist/builders/control-flow-builders.js +11 -11
- package/dist/{patterns → builders}/dynamic-workflow.d.ts +1 -1
- package/dist/{patterns → builders}/dynamic-workflow.js +18 -12
- package/dist/builders/every.d.ts +14 -14
- package/dist/builders/every.js +16 -16
- package/dist/builders/layer-provides-builders.d.ts +1 -1
- package/dist/builders/layer-provides-builders.js +1 -1
- package/dist/builders/provide-builder.d.ts +5 -12
- package/dist/builders/provide-builder.js +9 -10
- package/dist/builders/spawn-builder.d.ts +0 -2
- package/dist/builders/spawn-builder.js +2 -3
- package/dist/builders/step-builders.d.ts +66 -55
- package/dist/builders/step-builders.js +118 -111
- package/dist/builders/tool-builder.d.ts +18 -22
- package/dist/builders/tool-builder.js +6 -4
- package/dist/builders/workflow-hydrator.d.ts +3 -3
- package/dist/builders/workflow-hydrator.js +59 -63
- package/dist/builders/workflow-step.d.ts +13 -25
- package/dist/builders/workflow-step.js +13 -18
- package/dist/conditions/conditions.d.ts +2 -2
- package/dist/conditions/conditions.js +1 -1
- package/dist/harness/agent-harness.d.ts +54 -40
- package/dist/harness/agent-harness.js +44 -33
- package/dist/harness/deps/types.d.ts +1 -1
- package/dist/harness/model-call.d.ts +1 -1
- package/dist/harness/model-call.js +23 -18
- package/dist/index.d.ts +21 -33
- package/dist/index.js +10 -26
- package/dist/interpreter/action-types.d.ts +1 -1
- package/dist/interpreter/collect-tools.js +7 -7
- package/dist/interpreter/execute-action.d.ts +5 -5
- package/dist/interpreter/execute-action.js +284 -218
- package/dist/interpreter/execute-control.d.ts +9 -9
- package/dist/interpreter/execute-control.js +27 -27
- package/dist/interpreter/execute-sub-harness.d.ts +1 -1
- package/dist/interpreter/execute-sub-harness.js +7 -26
- package/dist/interpreter/execute.d.ts +1 -1
- package/dist/interpreter/execute.js +26 -25
- package/dist/interpreter/step-dispatcher.d.ts +1 -1
- package/dist/interpreter/step-dispatcher.js +3 -3
- package/dist/interpreter/structured-output.d.ts +14 -0
- package/dist/interpreter/structured-output.js +40 -0
- package/dist/interpreter/typeguards.d.ts +1 -1
- package/dist/interpreter/typeguards.js +1 -1
- package/dist/portable/builders.d.ts +3 -3
- package/dist/portable/builders.js +6 -5
- package/dist/portable/context-layers.d.ts +1 -1
- package/dist/portable/context-layers.js +1 -1
- package/dist/runtime/broadcaster-utils.d.ts +1 -1
- package/dist/runtime/broadcaster-utils.js +1 -1
- package/dist/runtime/context-impl.d.ts +8 -10
- package/dist/runtime/context-impl.js +8 -12
- package/dist/runtime/durable/step-ledger.d.ts +2 -2
- package/dist/runtime/durable/step-ledger.js +3 -3
- package/dist/runtime/session-runner.d.ts +12 -1
- package/dist/runtime/session-runner.js +33 -1
- package/dist/runtime/tool-context.js +0 -2
- package/dist/schemas/workflow.d.ts +3 -3
- package/dist/schemas/workflow.js +2 -2
- package/dist/types/checkpoint.d.ts +11 -2
- package/dist/types/checkpoint.js +10 -1
- package/dist/{runtime → util}/detached-handle.js +1 -1
- package/package.json +6 -4
- package/schema/noetic-workflow.schema.json +24 -11
- package/dist/builders/context-option.d.ts +0 -23
- package/dist/builders/context-option.js +0 -22
- package/dist/deprecated.d.ts +0 -30
- package/dist/deprecated.js +0 -28
- package/dist/patterns/interview.d.ts +0 -53
- package/dist/patterns/interview.js +0 -113
- package/dist/patterns/plans.d.ts +0 -44
- package/dist/patterns/plans.js +0 -125
- package/dist/patterns/ralph-wiggum.d.ts +0 -19
- package/dist/patterns/ralph-wiggum.js +0 -37
- package/dist/patterns/react.d.ts +0 -19
- package/dist/patterns/react.js +0 -41
- /package/dist/{runtime → util}/detached-handle.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -14,23 +14,25 @@ export { channel } from './builders/channel-builder.js';
|
|
|
14
14
|
/** @public */
|
|
15
15
|
export { context } from './builders/context-builder.js';
|
|
16
16
|
/** @public */
|
|
17
|
-
export {
|
|
17
|
+
export { conditional, inParallel } from './builders/control-flow-builders.js';
|
|
18
18
|
/** @public */
|
|
19
|
-
export {
|
|
19
|
+
export { schedule } from './builders/every.js';
|
|
20
20
|
/** @public */
|
|
21
|
-
export { layerData,
|
|
21
|
+
export { layerData, layerFunction } from './builders/layer-provides-builders.js';
|
|
22
22
|
/** @public */
|
|
23
23
|
export { loop } from './builders/loop-builder.js';
|
|
24
24
|
/** @public */
|
|
25
|
-
export {
|
|
25
|
+
export { withContext } from './builders/provide-builder.js';
|
|
26
26
|
/** @public */
|
|
27
27
|
export { spawn } from './builders/spawn-builder.js';
|
|
28
28
|
/** @public */
|
|
29
|
+
export { callModel, invokeTool, runCode, step } from './builders/step-builders.js';
|
|
30
|
+
/** @public */
|
|
29
31
|
export { tool, toolWithGenerator } from './builders/tool-builder.js';
|
|
30
32
|
/** @public */
|
|
31
33
|
export { hydrateNode, hydrateWorkflow } from './builders/workflow-hydrator.js';
|
|
32
34
|
/** @public */
|
|
33
|
-
export {
|
|
35
|
+
export { workflow } from './builders/workflow-step.js';
|
|
34
36
|
/** @public */
|
|
35
37
|
export { aiCondition, allCondition, anyCondition, embeddingMatch, otherwise, semanticRoute, semanticSwitch, when, } from './conditions/conditions.js';
|
|
36
38
|
/** @public */
|
|
@@ -58,7 +60,7 @@ export { execute } from './interpreter/execute.js';
|
|
|
58
60
|
/** @public */
|
|
59
61
|
/** @public */
|
|
60
62
|
/** @public */
|
|
61
|
-
export {
|
|
63
|
+
export { filesystem, findFunctionCall, history, instructions, observations, PlanPhase, PlanStyle, plan, scratchpad, steering, storageGetMany, stripUnresolvedToolCalls, taskState, temporal, toolCalls, } from '@noetic-tools/context';
|
|
62
64
|
//#endregion
|
|
63
65
|
//#region Message Utilities
|
|
64
66
|
/** @public */
|
|
@@ -72,17 +74,7 @@ export { InMemoryExporter, NoopExporter } from './observability/trace-exporter.j
|
|
|
72
74
|
/** @public */
|
|
73
75
|
export { createInMemoryStorage } from './runtime/in-memory-storage.js';
|
|
74
76
|
/** @public */
|
|
75
|
-
export { dynamicWorkflow, parseAndRunWorkflow } from './
|
|
76
|
-
/** @public */
|
|
77
|
-
export { interview } from './patterns/interview.js';
|
|
78
|
-
/** @public */
|
|
79
|
-
export { adaptivePlan, compilePlan, PlanNodeSchema } from './patterns/plans.js';
|
|
80
|
-
/** @public */
|
|
81
|
-
export { ralphWiggum } from './patterns/ralph-wiggum.js';
|
|
82
|
-
/** @public */
|
|
83
|
-
export { react } from './patterns/react.js';
|
|
84
|
-
//#endregion
|
|
85
|
-
//#region Runtime
|
|
77
|
+
export { dynamicWorkflow, parseAndRunWorkflow } from './builders/dynamic-workflow.js';
|
|
86
78
|
/** @public */
|
|
87
79
|
export { AgentHarness } from './harness/agent-harness.js';
|
|
88
80
|
/** @public */
|
|
@@ -96,7 +88,7 @@ export { defaultItemSchemaRegistry, ItemSchema, ItemSchemaRegistry } from '@noet
|
|
|
96
88
|
/** @public */
|
|
97
89
|
export { MergeStrategySchema, UntilPredicateSchema, validateWorkflow, WorkflowDocumentSchema, WorkflowNodeSchema, walkWorkflow, workflowDepth, } from './schemas/workflow.js';
|
|
98
90
|
/** @public */
|
|
99
|
-
export { isServerToolSpec } from '@noetic-tools/types';
|
|
91
|
+
export { isServerToolSpec, isStandardJsonSchema, isZodSchema, standardIssuesToZodError, validateSchema, } from '@noetic-tools/types';
|
|
100
92
|
/** @public */
|
|
101
93
|
export { getToolCwd, setToolCwd, snapshotCwdState } from './runtime/cwd-helpers.js';
|
|
102
94
|
/** @public */
|
|
@@ -120,11 +112,3 @@ export { all, any } from './until/combinators.js';
|
|
|
120
112
|
/** @public */
|
|
121
113
|
export { until } from './until/predicates.js';
|
|
122
114
|
//#endregion
|
|
123
|
-
//#region Deprecated aliases
|
|
124
|
-
/**
|
|
125
|
-
* Pre-rename names for the context layer system — `MemoryLayer`, `memory()`,
|
|
126
|
-
* `workingMemory`, and friends. Each carries its own `@deprecated` pointer to
|
|
127
|
-
* its replacement in `./deprecated`. Removed in the next major.
|
|
128
|
-
*/
|
|
129
|
-
export * from './deprecated.js';
|
|
130
|
-
//#endregion
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export type { ContextConfig, ContextData, ContextLayer, ExecutionContext, } from '@noetic-tools/context';
|
|
2
|
-
export type { AgentHarnessContract, Context, ContextRerenderRequest, ExecuteStepFn, FunctionCallItem, InputMessageItem, Item, ProjectionPolicy, RecallLayerOutput, RetryPolicy, ServerToolSpec,
|
|
2
|
+
export type { AgentHarnessContract, CallModelRequest, Context, ContextRerenderRequest, ExecuteStepFn, FunctionCallItem, InputMessageItem, Item, LLMResponse, ProjectionPolicy, RecallLayerOutput, RetryPolicy, ServerToolSpec, StepCallModel, StepInvokeTool, StepMeta, StepRunCode, StepSpawn, StepWithContext, Tool, } from '@noetic-tools/types';
|
|
3
3
|
export { isServerToolSpec, SteeringAction } from '@noetic-tools/types';
|
|
@@ -27,7 +27,7 @@ export function deduplicateTools(tools) {
|
|
|
27
27
|
}
|
|
28
28
|
function walkStep(step, out) {
|
|
29
29
|
switch (step.kind) {
|
|
30
|
-
case '
|
|
30
|
+
case 'callModel':
|
|
31
31
|
// Skip function-form tools: they're resolved per execution from `ctx`
|
|
32
32
|
// and cannot contribute to the pre-computed unified set. Consumers that
|
|
33
33
|
// need those tools in the pool should register them via
|
|
@@ -41,8 +41,8 @@ function walkStep(step, out) {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
return;
|
|
44
|
-
case '
|
|
45
|
-
case '
|
|
44
|
+
case 'runCode':
|
|
45
|
+
case 'invokeTool':
|
|
46
46
|
// SubHarness steps run their own built-in tools inside the external agent;
|
|
47
47
|
// they contribute nothing to the host unified tool set.
|
|
48
48
|
case 'claude-code':
|
|
@@ -50,21 +50,21 @@ function walkStep(step, out) {
|
|
|
50
50
|
case 'opencode':
|
|
51
51
|
case 'pi':
|
|
52
52
|
return;
|
|
53
|
-
case '
|
|
53
|
+
case 'conditional':
|
|
54
54
|
if (step._optimizable) {
|
|
55
55
|
for (const child of step._optimizable) {
|
|
56
56
|
walkStep(child, out);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
return;
|
|
60
|
-
case '
|
|
60
|
+
case 'inParallel':
|
|
61
61
|
if (step._optimizable) {
|
|
62
62
|
for (const child of step._optimizable) {
|
|
63
63
|
walkStep(child, out);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
return;
|
|
67
|
-
case '
|
|
67
|
+
case 'withContext':
|
|
68
68
|
walkStep(step.child, out);
|
|
69
69
|
return;
|
|
70
70
|
case 'spawn':
|
|
@@ -75,7 +75,7 @@ function walkStep(step, out) {
|
|
|
75
75
|
walkStep(child, out);
|
|
76
76
|
}
|
|
77
77
|
return;
|
|
78
|
-
case '
|
|
78
|
+
case 'schedule':
|
|
79
79
|
walkStep(step.step, out);
|
|
80
80
|
return;
|
|
81
81
|
default:
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Action step handlers: run, llm, spawn, provide, tool.
|
|
3
3
|
*/
|
|
4
4
|
import type { ItemSchemaRegistry, LayerStateStore } from './action-deps.js';
|
|
5
|
-
import type { AgentHarnessContract, Context, ContextLayer, ExecuteStepFn,
|
|
6
|
-
export declare function
|
|
5
|
+
import type { AgentHarnessContract, Context, ContextLayer, ExecuteStepFn, StepCallModel, StepInvokeTool, StepRunCode, StepSpawn, StepWithContext } from './action-types.js';
|
|
6
|
+
export declare function executeRunCode<TContext, I, O>(step: StepRunCode<TContext, I, O>, input: I, ctx: Context<TContext>): Promise<O>;
|
|
7
7
|
/**
|
|
8
8
|
* Resolves a `Lazy<T>` step field. If the value is a function, it is invoked
|
|
9
9
|
* with the current context; otherwise the value is returned as-is. Supports
|
|
@@ -14,7 +14,7 @@ export declare function executeRun<TContext, I, O>(step: StepRun<TContext, I, O>
|
|
|
14
14
|
* tools) without baking them in at build time.
|
|
15
15
|
*/
|
|
16
16
|
export declare function resolveLazy<T, TContext>(value: T | ((ctx: Context<TContext>) => T | Promise<T>), ctx: Context<TContext>): Promise<T>;
|
|
17
|
-
export declare function
|
|
17
|
+
export declare function executeCallModel<TContext, I, O>(step: StepCallModel<TContext, I, O>, input: I, ctx: Context<TContext>, layers?: ContextLayer[]): Promise<O>;
|
|
18
18
|
export interface ExecuteSpawnOpts {
|
|
19
19
|
layerStore?: LayerStateStore;
|
|
20
20
|
parentLayers?: ContextLayer[];
|
|
@@ -28,5 +28,5 @@ export declare function executeSpawn<TContext, I, O>(step: StepSpawn<TContext, I
|
|
|
28
28
|
* Unlike spawn, provide does not create a new itemLog or clone state.
|
|
29
29
|
* Events flow through to the parent in real-time.
|
|
30
30
|
*/
|
|
31
|
-
export declare function
|
|
32
|
-
export declare function
|
|
31
|
+
export declare function executeWithContext<TContext, I, O>(step: StepWithContext<TContext, I, O>, input: I, ctx: Context<TContext>, executeStep: ExecuteStepFn): Promise<O>;
|
|
32
|
+
export declare function executeInvokeTool<TContext, I, O>(step: StepInvokeTool<TContext, I, O>, input: I, ctx: Context<TContext>, harness: AgentHarnessContract, layers?: ContextLayer[]): Promise<O>;
|