@noetic-tools/core 5.20.0-next.1 → 5.21.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/dist/adapters/openrouter.d.ts +1 -48
- package/dist/adapters/openrouter.js +3 -204
- package/dist/builders/acp-agent-checks.d.ts +20 -0
- package/dist/builders/acp-agent-checks.js +68 -0
- package/dist/builders/acp-agent-tool.d.ts +4 -3
- package/dist/builders/acp-agent-tool.js +5 -2
- package/dist/builders/connection-ceiling.d.ts +13 -0
- package/dist/builders/connection-ceiling.js +17 -0
- package/dist/builders/document-entries.d.ts +13 -0
- package/dist/builders/document-entries.js +18 -0
- package/dist/builders/dynamic-workflow.d.ts +53 -8
- package/dist/builders/dynamic-workflow.js +53 -25
- package/dist/builders/mcp-url-pattern.d.ts +13 -0
- package/dist/builders/mcp-url-pattern.js +85 -0
- package/dist/builders/step-builders.d.ts +14 -6
- package/dist/builders/step-builders.js +25 -2
- package/dist/builders/workflow-acp-grants.d.ts +42 -0
- package/dist/builders/workflow-acp-grants.js +224 -0
- package/dist/builders/workflow-child-nodes.js +8 -0
- package/dist/builders/workflow-connection-nodes.d.ts +13 -3
- package/dist/builders/workflow-connection-nodes.js +129 -3
- package/dist/builders/workflow-connections.js +2 -1
- package/dist/builders/workflow-hydrator.d.ts +24 -1
- package/dist/builders/workflow-hydrator.js +8 -167
- package/dist/builders/workflow-mcp-servers.d.ts +44 -0
- package/dist/builders/workflow-mcp-servers.js +327 -0
- package/dist/builders/workflow-tool-entries.d.ts +84 -0
- package/dist/builders/workflow-tool-entries.js +216 -0
- package/dist/connections/durability.d.ts +11 -1
- package/dist/connections/durability.js +34 -0
- package/dist/connections/entries.d.ts +33 -0
- package/dist/connections/entries.js +118 -0
- package/dist/connections/errors.d.ts +6 -0
- package/dist/connections/errors.js +12 -0
- package/dist/connections/harness-wiring.d.ts +4 -4
- package/dist/connections/harness-wiring.js +1 -1
- package/dist/connections/in-memory-connection.d.ts +2 -0
- package/dist/connections/in-memory-connection.js +5 -0
- package/dist/connections/model-tools.d.ts +35 -12
- package/dist/connections/model-tools.js +348 -202
- package/dist/connections/registry-types.d.ts +7 -0
- package/dist/connections/registry.d.ts +35 -6
- package/dist/connections/registry.js +183 -39
- package/dist/connections/step-tools.d.ts +64 -0
- package/dist/connections/step-tools.js +154 -0
- package/dist/connections/views.d.ts +3 -2
- package/dist/connections/views.js +15 -6
- package/dist/harness/agent-harness.d.ts +11 -1
- package/dist/harness/agent-harness.js +69 -8
- package/dist/harness/connection-gate.d.ts +49 -8
- package/dist/harness/connection-gate.js +137 -26
- package/dist/harness/deps/interpreter.d.ts +3 -3
- package/dist/harness/deps/interpreter.js +3 -3
- package/dist/harness/harness-options.d.ts +4 -3
- package/dist/harness/model-call.d.ts +0 -1
- package/dist/harness/model-call.js +0 -48
- package/dist/harness/model-request.js +3 -1
- package/dist/harness/model-schema.d.ts +1 -19
- package/dist/harness/model-schema.js +0 -28
- package/dist/harness/model-tool-round.js +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1 -1
- package/dist/interpreter/acp-events.d.ts +25 -1
- package/dist/interpreter/acp-events.js +53 -1
- package/dist/interpreter/acp-layers.d.ts +20 -0
- package/dist/interpreter/acp-layers.js +55 -0
- package/dist/interpreter/acp-tools.d.ts +108 -0
- package/dist/interpreter/acp-tools.js +462 -0
- package/dist/interpreter/collect-tools.d.ts +28 -0
- package/dist/interpreter/collect-tools.js +112 -15
- package/dist/interpreter/connection-steps.d.ts +0 -2
- package/dist/interpreter/connection-steps.js +30 -8
- package/dist/interpreter/execute-acp-agent.js +263 -72
- package/dist/interpreter/execute-action.d.ts +76 -1
- package/dist/interpreter/execute-action.js +35 -42
- package/dist/interpreter/execute.d.ts +2 -0
- package/dist/interpreter/execute.js +24 -1
- package/dist/interpreter/verify-host.js +2 -1
- package/dist/runtime/tool-call.d.ts +67 -0
- package/dist/runtime/tool-call.js +244 -0
- package/dist/runtime/tool-context.d.ts +1 -2
- package/dist/runtime/tool-context.js +6 -2
- package/dist/schemas/workflow.d.ts +1 -1
- package/dist/types/connection-entry.d.ts +22 -0
- package/dist/types/connection-entry.js +8 -0
- package/dist/util/harness-internals.d.ts +2 -0
- package/dist/util/root-context.d.ts +3 -0
- package/dist/util/root-context.js +8 -0
- package/dist/util/tool-name.d.ts +8 -0
- package/dist/util/tool-name.js +10 -0
- package/package.json +3 -3
- package/schema/noetic-workflow.schema.json +498 -128
|
@@ -7,40 +7,63 @@
|
|
|
7
7
|
* `'ask'` read). A connection with no profile has no eager set, so its tools
|
|
8
8
|
* are exposed as they are.
|
|
9
9
|
* - `'all'`: every operation as its own tool.
|
|
10
|
+
* - `'call'`: only `<name>_ops` and `<name>_call`.
|
|
10
11
|
* - `'none'`: none; the connection is for steps and triggers only.
|
|
11
12
|
*
|
|
12
13
|
* Tools are named `<name>_<op>` (dots become underscores). When two
|
|
13
14
|
* connections offer the same profile operation, the model gets one tool named
|
|
14
15
|
* after the operation (`ui_tap`) with a `target` argument naming the
|
|
15
|
-
* connection
|
|
16
|
+
* connection; two or more `'call'` connections likewise share one `ops` and
|
|
17
|
+
* one `call`. Two operations that would still share a name are a
|
|
16
18
|
* `CONNECTION_TOOL_COLLISION`. Every call passes the same gates as a step.
|
|
17
19
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
+
* The tools are built once per turn, from the harness's connections and the
|
|
21
|
+
* ones the turn attached, so a connection gives the same tools wherever it is
|
|
22
|
+
* attached. `connectionTools(handle, { ops })` picks part of them for a step,
|
|
23
|
+
* and each tool cuts itself to what the step picked (`cutForStep`).
|
|
20
24
|
*/
|
|
21
|
-
import type { ConnectionHandle, Tool } from '@noetic-tools/types';
|
|
25
|
+
import type { ConnectionEntry, ConnectionHandle, ConnectionPick, Tool } from '@noetic-tools/types';
|
|
22
26
|
import type { ConnectionRuntime } from './registry.js';
|
|
23
27
|
/** `connectionTools()` options. */
|
|
24
28
|
export interface ConnectionToolsOptions {
|
|
25
29
|
/** Operation globs to offer; default every operation. */
|
|
26
30
|
readonly ops?: ReadonlyArray<string>;
|
|
27
31
|
}
|
|
32
|
+
/** Whether a step may run operation, or read resource, `name` of `connection`. */
|
|
33
|
+
export type StepAllows = (connection: string, name: string) => boolean;
|
|
28
34
|
/** `<connection>_<op>` with dots and other characters a tool name cannot carry as `_`. */
|
|
29
35
|
export declare function connectionToolName(connection: string, op: string): string;
|
|
30
36
|
/** The registry a harness exposes, if it has one. */
|
|
31
37
|
export declare function runtimeOf(harness: unknown): ConnectionRuntime | undefined;
|
|
32
38
|
/**
|
|
33
|
-
* The model tools for every ready connection
|
|
34
|
-
*
|
|
35
|
-
* mid-turn.
|
|
39
|
+
* The model tools for every ready connection of a turn — the harness's, and
|
|
40
|
+
* the ones attached under `rootId` — built fresh each turn so a renegotiated
|
|
41
|
+
* connection's tools change at the next turn, never mid-turn.
|
|
36
42
|
*
|
|
37
43
|
* @throws NoeticConfigError `CONNECTION_TOOL_COLLISION` when two operations would share a tool name.
|
|
38
44
|
*/
|
|
39
|
-
export declare function buildConnectionTools(runtime: ConnectionRuntime): Tool[];
|
|
45
|
+
export declare function buildConnectionTools(runtime: ConnectionRuntime, rootId?: string): Tool[];
|
|
46
|
+
/**
|
|
47
|
+
* Cuts a tool built by `buildConnectionTools` to what a step may use (see
|
|
48
|
+
* `StepCut`): a merged tool keeps only the targets the step may use, its
|
|
49
|
+
* `target` enum and routing with them, and `<name>_ops` / `<name>_call` only
|
|
50
|
+
* the operations and reads. Returns `'not-connection'` for any other tool.
|
|
51
|
+
*/
|
|
52
|
+
export declare function cutForStep(tool: Tool, allows: StepAllows): Tool | undefined | 'not-connection';
|
|
40
53
|
/**
|
|
41
54
|
* @public
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
55
|
+
* Picks part of one connection's model tools for a step: the tools the turn
|
|
56
|
+
* built for it, under the same names — `<name>_<op>`, `<name>_ops` /
|
|
57
|
+
* `<name>_call`, and merged profile tools that take `target` — narrowed to the
|
|
58
|
+
* operations matching `ops`. A step that lists the pick is offered a tool only
|
|
59
|
+
* when every operation the tool can run matches, so `<name>_call` comes with a
|
|
60
|
+
* pick only when every operation behind it does. Picking from an entry
|
|
61
|
+
* (`mcp({ name, … })`) attaches it to the step, as listing the entry would.
|
|
62
|
+
* A name picks a connection the harness or the turn attaches; it is checked
|
|
63
|
+
* when the turn's tool set is built.
|
|
64
|
+
*
|
|
65
|
+
* @throws NoeticConfigError `CONNECTION_INVALID` for a handle with `fresh` (a
|
|
66
|
+
* pool has no model tools), an entry with no name, or a malformed name. The
|
|
67
|
+
* turn fails with `CONNECTION_UNKNOWN` when no connection has the name.
|
|
45
68
|
*/
|
|
46
|
-
export declare function connectionTools(
|
|
69
|
+
export declare function connectionTools(target: string | ConnectionHandle | ConnectionEntry, options?: ConnectionToolsOptions): ConnectionPick;
|