@finalai/final-agent-provider 0.10.1 → 0.11.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/HOSTING.md +334 -245
- package/README.md +126 -40
- package/WORKSPACE-EGRESS.md +11 -11
- package/dist/modules/catalog.d.mts +9 -0
- package/dist/modules/catalog.mjs +21 -0
- package/dist/modules/catalog.mjs.map +7 -0
- package/dist/modules/harnesses/acp-agent.d.mts +4 -0
- package/dist/modules/harnesses/acp-agent.mjs +35 -0
- package/dist/modules/harnesses/acp-agent.mjs.map +7 -0
- package/dist/modules/harnesses/adapters.d.mts +7 -0
- package/dist/modules/harnesses/adapters.mjs +74 -0
- package/dist/modules/harnesses/adapters.mjs.map +7 -0
- package/dist/modules/harnesses/claude-code.d.mts +14 -0
- package/dist/modules/harnesses/claude-code.mjs +79 -0
- package/dist/modules/harnesses/claude-code.mjs.map +7 -0
- package/dist/modules/harnesses/codex.d.mts +12 -0
- package/dist/modules/harnesses/codex.mjs +90 -0
- package/dist/modules/harnesses/codex.mjs.map +7 -0
- package/dist/modules/harnesses/config-fields.d.mts +98 -57
- package/dist/modules/harnesses/config-fields.mjs +58 -35
- package/dist/modules/harnesses/config-fields.mjs.map +3 -3
- package/dist/modules/harnesses/definitions.d.mts +3 -0
- package/dist/modules/harnesses/definitions.mjs +21 -0
- package/dist/modules/harnesses/definitions.mjs.map +7 -0
- package/dist/modules/harnesses/fidelity.d.mts +1 -1
- package/dist/modules/harnesses/fidelity.mjs +17 -14
- package/dist/modules/harnesses/fidelity.mjs.map +2 -2
- package/dist/modules/harnesses/final.d.mts +12 -0
- package/dist/modules/harnesses/final.mjs +70 -0
- package/dist/modules/harnesses/final.mjs.map +7 -0
- package/dist/modules/harnesses/index.d.mts +13 -12
- package/dist/modules/harnesses/index.mjs +86 -45
- package/dist/modules/harnesses/index.mjs.map +3 -3
- package/dist/modules/harnesses/names.d.mts +43 -0
- package/dist/modules/harnesses/names.mjs +59 -0
- package/dist/modules/harnesses/names.mjs.map +7 -0
- package/dist/modules/harnesses/nanocode-claude.d.mts +18 -0
- package/dist/modules/harnesses/nanocode-claude.mjs +101 -0
- package/dist/modules/harnesses/nanocode-claude.mjs.map +7 -0
- package/dist/modules/harnesses/nanocode-codex.d.mts +13 -0
- package/dist/modules/harnesses/nanocode-codex.mjs +64 -0
- package/dist/modules/harnesses/nanocode-codex.mjs.map +7 -0
- package/dist/modules/harnesses/pi.d.mts +12 -0
- package/dist/modules/harnesses/pi.mjs +71 -0
- package/dist/modules/harnesses/pi.mjs.map +7 -0
- package/dist/modules/integrations.d.mts +9 -0
- package/dist/modules/integrations.mjs +29 -0
- package/dist/modules/integrations.mjs.map +7 -0
- package/dist/modules/provider/general.bundle.d.mts +1 -0
- package/dist/modules/provider/general.bundle.mjs +5 -0
- package/dist/modules/provider/general.bundle.mjs.map +7 -0
- package/dist/modules/provider/general.d.mts +11 -0
- package/dist/modules/provider/general.mjs +130 -0
- package/dist/modules/provider/general.mjs.map +7 -0
- package/dist/modules/provider/index.d.mts +3 -0
- package/dist/modules/provider/index.mjs +13 -0
- package/dist/modules/provider/index.mjs.map +7 -0
- package/dist/modules/sandboxes/access.d.mts +34 -0
- package/dist/modules/sandboxes/access.mjs +15 -0
- package/dist/modules/sandboxes/access.mjs.map +7 -0
- package/dist/modules/sandboxes/computer.d.mts +24 -51
- package/dist/modules/sandboxes/computer.mjs +523 -888
- package/dist/modules/sandboxes/computer.mjs.map +3 -3
- package/dist/modules/sandboxes/computers-api.d.mts +3 -2
- package/dist/modules/sandboxes/computers-api.mjs +2 -4
- package/dist/modules/sandboxes/computers-api.mjs.map +2 -2
- package/dist/modules/sandboxes/device-api.d.mts +4 -3
- package/dist/modules/sandboxes/device-api.mjs +2 -4
- package/dist/modules/sandboxes/device-api.mjs.map +2 -2
- package/dist/modules/sandboxes/device.d.mts +6 -6
- package/dist/modules/sandboxes/device.mjs +126 -121
- package/dist/modules/sandboxes/device.mjs.map +3 -3
- package/dist/modules/sandboxes/egress.d.mts +10 -9
- package/dist/modules/sandboxes/egress.mjs +73 -56
- package/dist/modules/sandboxes/egress.mjs.map +2 -2
- package/dist/modules/sandboxes/environment.d.mts +35 -269
- package/dist/modules/sandboxes/environment.mjs +27 -104
- package/dist/modules/sandboxes/environment.mjs.map +3 -3
- package/dist/modules/sandboxes/index.d.mts +9 -69
- package/dist/modules/sandboxes/index.mjs +35 -95
- package/dist/modules/sandboxes/index.mjs.map +3 -3
- package/dist/modules/sandboxes/local.d.mts +28 -0
- package/dist/modules/sandboxes/local.mjs +499 -0
- package/dist/modules/sandboxes/local.mjs.map +7 -0
- package/dist/modules/sandboxes/session.d.mts +0 -3
- package/dist/modules/sandboxes/session.mjs +2 -22
- package/dist/modules/sandboxes/session.mjs.map +2 -2
- package/dist/modules/sandboxes/testing/fake-machine.mjs +0 -28
- package/dist/modules/sandboxes/testing/fake-machine.mjs.map +2 -2
- package/package.json +76 -104
- package/dist/modules/connections.d.mts +0 -11
- package/dist/modules/connections.mjs +0 -16
- package/dist/modules/connections.mjs.map +0 -7
- package/dist/modules/harnesses/acp-describe.d.mts +0 -20
- package/dist/modules/harnesses/acp-describe.mjs +0 -110
- package/dist/modules/harnesses/acp-describe.mjs.map +0 -7
- package/dist/modules/harnesses/local-stdio.d.mts +0 -47
- package/dist/modules/harnesses/local-stdio.mjs +0 -41
- package/dist/modules/harnesses/local-stdio.mjs.map +0 -7
- package/dist/modules/harnesses/remote-acp.d.mts +0 -76
- package/dist/modules/harnesses/remote-acp.mjs +0 -83
- package/dist/modules/harnesses/remote-acp.mjs.map +0 -7
- package/dist/modules/harnesses/remote-claude-code.d.mts +0 -88
- package/dist/modules/harnesses/remote-claude-code.mjs +0 -113
- package/dist/modules/harnesses/remote-claude-code.mjs.map +0 -7
- package/dist/modules/harnesses/remote-client-tls.d.mts +0 -35
- package/dist/modules/harnesses/remote-client-tls.mjs +0 -37
- package/dist/modules/harnesses/remote-client-tls.mjs.map +0 -7
- package/dist/modules/harnesses/remote-codex.d.mts +0 -98
- package/dist/modules/harnesses/remote-codex.mjs +0 -128
- package/dist/modules/harnesses/remote-codex.mjs.map +0 -7
- package/dist/modules/harnesses/remote-pi.d.mts +0 -78
- package/dist/modules/harnesses/remote-pi.mjs +0 -104
- package/dist/modules/harnesses/remote-pi.mjs.map +0 -7
- package/dist/modules/harnesses/remote-url.d.mts +0 -5
- package/dist/modules/harnesses/remote-url.mjs +0 -19
- package/dist/modules/harnesses/remote-url.mjs.map +0 -7
- package/dist/modules/harnesses/serverless-final.d.mts +0 -63
- package/dist/modules/harnesses/serverless-final.mjs +0 -88
- package/dist/modules/harnesses/serverless-final.mjs.map +0 -7
- package/dist/modules/harnesses/serverless-nanocode-claude.d.mts +0 -64
- package/dist/modules/harnesses/serverless-nanocode-claude.mjs +0 -105
- package/dist/modules/harnesses/serverless-nanocode-claude.mjs.map +0 -7
- package/dist/modules/harnesses/serverless-nanocode-codex.d.mts +0 -66
- package/dist/modules/harnesses/serverless-nanocode-codex.mjs +0 -113
- package/dist/modules/harnesses/serverless-nanocode-codex.mjs.map +0 -7
- package/dist/modules/harnesses/serverless-pi.d.mts +0 -64
- package/dist/modules/harnesses/serverless-pi.mjs +0 -98
- package/dist/modules/harnesses/serverless-pi.mjs.map +0 -7
- package/dist/modules/runtime/index.d.mts +0 -7
- package/dist/modules/runtime/index.mjs +0 -18
- package/dist/modules/runtime/index.mjs.map +0 -7
- package/dist/modules/runtime/local-stdio.d.mts +0 -10
- package/dist/modules/runtime/local-stdio.mjs +0 -106
- package/dist/modules/runtime/local-stdio.mjs.map +0 -7
- package/dist/modules/runtime/remote-acp.d.mts +0 -16
- package/dist/modules/runtime/remote-acp.mjs +0 -152
- package/dist/modules/runtime/remote-acp.mjs.map +0 -7
- package/dist/modules/runtime/remote-claude-code.d.mts +0 -5
- package/dist/modules/runtime/remote-claude-code.mjs +0 -47
- package/dist/modules/runtime/remote-claude-code.mjs.map +0 -7
- package/dist/modules/runtime/remote-codex.d.mts +0 -5
- package/dist/modules/runtime/remote-codex.mjs +0 -47
- package/dist/modules/runtime/remote-codex.mjs.map +0 -7
- package/dist/modules/runtime/remote-host.d.mts +0 -127
- package/dist/modules/runtime/remote-host.mjs +0 -387
- package/dist/modules/runtime/remote-host.mjs.map +0 -7
- package/dist/modules/runtime/remote-pi.d.mts +0 -5
- package/dist/modules/runtime/remote-pi.mjs +0 -44
- package/dist/modules/runtime/remote-pi.mjs.map +0 -7
- package/dist/modules/sandboxes/guide.d.mts +0 -35
- package/dist/modules/sandboxes/guide.mjs +0 -119
- package/dist/modules/sandboxes/guide.mjs.map +0 -7
- package/dist/modules/sandboxes/workspace-setup.d.mts +0 -42
- package/dist/modules/sandboxes/workspace-setup.mjs +0 -242
- package/dist/modules/sandboxes/workspace-setup.mjs.map +0 -7
- package/dist/modules/testing/harness.d.mts +0 -9
- package/dist/modules/testing/harness.mjs +0 -123
- package/dist/modules/testing/harness.mjs.map +0 -7
package/README.md
CHANGED
|
@@ -1,41 +1,130 @@
|
|
|
1
1
|
# @finalai/final-agent-provider
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
3
|
+
Final's harness and ACP adapter definitions, the general harness provider,
|
|
4
|
+
sandbox providers and MCP gateway integration, as a caller provides them to an
|
|
5
|
+
agent, plus the Final room surface and external channels.
|
|
6
|
+
|
|
7
|
+
## Harness settings
|
|
8
|
+
|
|
9
|
+
`/harnesses` exports one settings builder per Final harness. Each returns plain
|
|
10
|
+
harness settings, `{ harness, configuration, environment? }`, the wire form a
|
|
11
|
+
caller passes as `provide.harness`:
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import {
|
|
15
|
+
apiKey,
|
|
16
|
+
finalCredits,
|
|
17
|
+
serverlessNanocodeClaude,
|
|
18
|
+
subscription,
|
|
19
|
+
} from '@finalai/final-agent-provider/harnesses';
|
|
20
|
+
|
|
21
|
+
serverlessNanocodeClaude({
|
|
22
|
+
model: 'claude-opus-5-5',
|
|
23
|
+
inference: [subscription(), apiKey('ANTHROPIC_API_KEY'), finalCredits()],
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
- `FinalHarness` names the definitions as settings reach them, qualified by
|
|
28
|
+
Final's publisher handle (`final/pi`); `FinalHarnessName` is the name each is
|
|
29
|
+
published under. `final`, `pi`, `nanocode-claude` and
|
|
30
|
+
`nanocode-codex` run as worker programs (`serverlessFinal`, `serverlessPi`,
|
|
31
|
+
`serverlessNanocodeClaude`, `serverlessNanocodeCodex`); `claude-code` and
|
|
32
|
+
`codex` run as processes on a machine (`claudeCode`, `codex`); `acp-agent` is
|
|
33
|
+
any agent that already speaks ACP v2 with Final's ACP extensions, reached at its
|
|
34
|
+
URL with no adapter (`acpAgent({ url, hop })`).
|
|
35
|
+
- `inference` is one source or an ordered list (`subscription`, `apiKey`,
|
|
36
|
+
`finalCredits`, `harnessLogin`); a single source is stored as a one-item list.
|
|
37
|
+
- Worker harnesses require `model`, an open reference the harness validates
|
|
38
|
+
(`openrouter/deepseek/deepseek-v4.1-flash` included). There is no default model.
|
|
39
|
+
- `permissionMode` is `ask`, `review` or `auto`, within the agent's ceiling; each
|
|
40
|
+
harness's adapter maps it to its program's own mode.
|
|
41
|
+
- `environment` is the sandbox the harness runs in, or `atUrl({ url, hop })` for
|
|
42
|
+
an ACP endpoint already running it (`hop` names the project secret holding its
|
|
43
|
+
bearer token). Absent, a process harness runs in the sandbox provided for
|
|
44
|
+
`shell`, and the client gives a worker harness a sandbox created from
|
|
45
|
+
`workers()`, owned by the session or conversation.
|
|
46
|
+
|
|
47
|
+
Instructions, skills and tool policy come from the agent's document, never from
|
|
48
|
+
harness settings.
|
|
49
|
+
|
|
50
|
+
## Definitions and the general provider
|
|
51
|
+
|
|
52
|
+
Each harness is a definition (`FINAL_HARNESS_DEFINITIONS`): its configuration
|
|
53
|
+
schema, the features it supports, the lowest permission it can be held to, the
|
|
54
|
+
inference it can use, what it uses natively where it runs, its default ACP
|
|
55
|
+
adapter, and how it runs (a worker program, or a process command derived from
|
|
56
|
+
its configuration). Each ACP adapter (`FINAL_ACP_ADAPTERS`) maps one harness
|
|
57
|
+
interface to ACP v2 and Final's ACP extensions:
|
|
58
|
+
|
|
59
|
+
| Adapter | Adapts | Runs as |
|
|
60
|
+
| ----------------- | ----------------------------------- | -------------------------------------------------------------- |
|
|
61
|
+
| `pi-acp` | `pi`, `final` | worker program `pi` |
|
|
62
|
+
| `nanocode-acp` | `nanocode-claude`, `nanocode-codex` | worker program `nanocode` |
|
|
63
|
+
| `claude-code-acp` | `claude-code` | `npx -y @finalai/acp-adapter-claude-code -- <harness command>` |
|
|
64
|
+
| `codex-acp` | `codex` | `npx -y @finalai/acp-adapter-codex -- <harness command>` |
|
|
65
|
+
|
|
66
|
+
Pi has no process adapter, so it runs only as a worker program or at a URL.
|
|
67
|
+
`acp-agent` speaks ACP v2 itself and has no run entry: it runs only at a URL.
|
|
68
|
+
|
|
69
|
+
`validateHarnessConfiguration` (from `@finalai/agent-provider`) checks harness
|
|
70
|
+
settings' configuration against a definition: its configuration schema with the
|
|
71
|
+
shared `final://schemas/*` fragments, its lowest permission and the inference it
|
|
72
|
+
can use.
|
|
73
|
+
|
|
74
|
+
`/provider` is the general harness provider, one self-contained module built
|
|
75
|
+
with `defineHarnessProvider` on the public provider contract. It starts
|
|
76
|
+
adapter(harness) in the environment (a process over the sandbox's process
|
|
77
|
+
streams, or a worker program on a worker runtime) and hands over the ACP
|
|
78
|
+
stream, or hands over the URL of an endpoint already running. It refuses an
|
|
79
|
+
adapter that does not implement Final's ACP extensions (observe, authorMeta,
|
|
80
|
+
resumeReplay, afterSeqReplay), and every endpoint it hands over must advertise
|
|
81
|
+
them in `initialize`.
|
|
82
|
+
|
|
83
|
+
`/catalog` exports all of it as documents to publish: `finalCatalog` holds the
|
|
84
|
+
harness definitions, the adapter definitions and the provider.
|
|
85
|
+
|
|
86
|
+
## Sandboxes
|
|
87
|
+
|
|
88
|
+
`/sandboxes` exports environments as plain data:
|
|
89
|
+
`project.sandboxes.create(computer({ image }), { setup })`.
|
|
90
|
+
|
|
91
|
+
- `computer({ image, build, machine, region, idleTimeoutSeconds })`: a Final
|
|
92
|
+
computer from the public Computers API. `build` steps are baked into a base once.
|
|
93
|
+
- `device({ deviceId })` or `device({ pairing })`: a person's own computer running
|
|
94
|
+
Final Device. It takes no sandbox setup.
|
|
95
|
+
- `workers()`: Final's Workers runtime, where the worker harnesses run. It runs
|
|
96
|
+
only their worker programs, offers the model no files or shell, and takes no
|
|
97
|
+
sandbox setup.
|
|
98
|
+
- `defineSandboxSetup` describes what should be on any provider's machine
|
|
99
|
+
(repositories, variables, steps, services, commands, network, notes); the
|
|
100
|
+
platform applies it after the provider attaches.
|
|
101
|
+
|
|
102
|
+
The providers (`/sandboxes/computer`, `/sandboxes/device`) follow the resource
|
|
103
|
+
lifecycle: `create` records a sandbox and boots nothing, `attach` reports whether
|
|
104
|
+
the disk is new and whether the machine booted, then `detach`, `park` and `delete`.
|
|
105
|
+
They take the API's origin (`computersApiUrl`, `deviceApiUrl`) and authenticate
|
|
106
|
+
with the provider's platform identity for it (`ctx.identity`), which the
|
|
107
|
+
registration must be granted. A `computer` with no `idleTimeoutSeconds` outlasts
|
|
108
|
+
the platform's idle parking (`ctx.lifecycle.parkAfterIdleMs`) by five minutes.
|
|
109
|
+
|
|
110
|
+
`/sandboxes/local` (Node only) is the sandbox a client serves from its own
|
|
111
|
+
process: files under one directory and commands run in it, confined to that
|
|
112
|
+
directory, inheriting only a short list of environment variables.
|
|
113
|
+
|
|
114
|
+
## Final's MCP gateway
|
|
115
|
+
|
|
116
|
+
`finalGateway({ url })` from `/integrations` is the create-integration request
|
|
117
|
+
for Final's MCP gateway: `project.integrations.create(finalGateway({ url }))`,
|
|
118
|
+
where `url` is the gateway's MCP endpoint, for example
|
|
119
|
+
`https://gateway.example.com/api/mcp/tools`. The URL is required; the platform
|
|
120
|
+
resolves no placeholder for it. It authenticates with the platform's identity
|
|
121
|
+
assertion for the calling session.
|
|
33
122
|
|
|
34
123
|
## Durable processes
|
|
35
124
|
|
|
36
125
|
The `computer` and `device` sandboxes offer durable processes
|
|
37
|
-
(`SandboxCapability.DurableProcesses`: `spawn({ durable: true })` and `attachProcess`)
|
|
38
|
-
|
|
126
|
+
(`SandboxCapability.DurableProcesses`: `spawn({ durable: true })` and `attachProcess`) to
|
|
127
|
+
grants that run commands. A ref names the sandbox, the process and its boot (and, on a
|
|
39
128
|
Device, the lease generation), so a ref from another sandbox, boot or generation attaches
|
|
40
129
|
to nothing. A dropped handle stops polling and never terminates the process; `timeoutMs`
|
|
41
130
|
is enforced by the computer or Device itself.
|
|
@@ -52,19 +141,16 @@ is enforced by the computer or Device itself.
|
|
|
52
141
|
|
|
53
142
|
## Workspace Device egress
|
|
54
143
|
|
|
55
|
-
`/sandboxes/egress` supplies provider-neutral Linux TCP/UDP/DNS routing through approved Final Devices. Hosts compose `createWorkspaceDeviceNetworking({ api, needed })` through the generic provider `networking` option.
|
|
144
|
+
`/sandboxes/egress` supplies provider-neutral Linux TCP/UDP/DNS routing through approved Final Devices. Hosts compose `createWorkspaceDeviceNetworking({ api, access, needed })` through the generic provider `networking` option. A sandbox's id is its workspace identity; hosts supply durable networking registration, the current actor, and the raw privileged sandbox session. Preserve the direct policy before boot fencing; restore it on Disable. Configure and Disable ask for consent by default.
|
|
56
145
|
|
|
57
|
-
The [integration reference](WORKSPACE-EGRESS.md) specifies required hooks, boot/resume fallback,
|
|
146
|
+
The [integration reference](WORKSPACE-EGRESS.md) specifies required hooks, boot/resume fallback, grant authority, teardown, MCP transports, failure behavior, prerequisites, and provider acceptance. Read it before enabling this capability. Final Computer and Daytona use their public APIs; custom providers can compose the same controller and manager.
|
|
58
147
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
cache deferred setup failures per handle; reconnect to retry rather than replaying
|
|
62
|
-
partially completed user setup commands on each MCP poll.
|
|
148
|
+
A passive attach serves a read-only viewer and never boots or changes the
|
|
149
|
+
computer; use an ordinary attach for execution.
|
|
63
150
|
|
|
64
151
|
## Authored channels
|
|
65
152
|
|
|
66
153
|
External integrations are ordinary authored modules built with `defineChannel`
|
|
67
154
|
from `@finalai/agent-provider`. The SDK provides scoped platform capabilities and
|
|
68
155
|
opaque credential operations; application implementations live with their source.
|
|
69
|
-
Final chat customization uses `finalChannel` from `/channels/final
|
|
70
|
-
into the authored bundle in the same way as other customization code.
|
|
156
|
+
Final chat customization uses `finalChannel` from `/channels/final`.
|
package/WORKSPACE-EGRESS.md
CHANGED
|
@@ -17,7 +17,7 @@ const daytona = createDaytonaSandboxProvider({ networking });
|
|
|
17
17
|
|
|
18
18
|
The factories are exported from `/sandboxes/egress`, `/sandboxes/computer`, and
|
|
19
19
|
`@finalai/daytona-agent-provider/sandboxes/daytona`, respectively. Keep the trusted
|
|
20
|
-
Device access
|
|
20
|
+
Device access through the extension's configured `access`. A custom provider accepts
|
|
21
21
|
the same generic extension: call `enabled`, validate its workspace identity, call
|
|
22
22
|
`prepare` before provider fencing, and use `attachSandboxNetworking` after
|
|
23
23
|
obtaining its raw handle. Supply the saved policy, restore/fence callbacks,
|
|
@@ -25,8 +25,8 @@ namespace existence check and deferred setup. Physical teardown calls `suspend`
|
|
|
25
25
|
even if another cleanup step fails. Providers needing earlier namespace setup can
|
|
26
26
|
use `controller` and `withSandboxNetworking` directly, as Final Computer does.
|
|
27
27
|
|
|
28
|
-
The
|
|
29
|
-
origin and a token. Device
|
|
28
|
+
The extension's configured `access({ organizationId, projectId, actingUserId })`
|
|
29
|
+
returns the Device API origin and a token. Device
|
|
30
30
|
operations use the current actor; background lease reconciliation may use the stored
|
|
31
31
|
lease owner instead of a present turn author. Hosts must authorize both forms of work.
|
|
32
32
|
Admission, policy persistence, and cleanup also make trusted service calls with
|
|
@@ -35,7 +35,7 @@ accepted by those service endpoints for that case, separate from user-bound gran
|
|
|
35
35
|
Returning `null` refuses the call before HTTP; a user-token-only configuration cannot
|
|
36
36
|
start or clean up networked workspaces. Its host must add service authentication
|
|
37
37
|
before enabling this extension. The SDK never reuses a user's cached grant for a
|
|
38
|
-
service call or another user: it asks the
|
|
38
|
+
service call or another user: it asks the configured access on every call.
|
|
39
39
|
|
|
40
40
|
The extension owns Device authorization, enrollment, helper installation, leases
|
|
41
41
|
and failover. Providers need no Device networking implementation. Its generic
|
|
@@ -49,7 +49,7 @@ an older API rejecting the field cannot silently grant longer access.
|
|
|
49
49
|
|
|
50
50
|
1. Assign one stable host-owned identity per logical workspace and persist whether networking is managed. Supply that identity to start, resume, editors and teardown.
|
|
51
51
|
2. Save the actual direct policy before a boot fence. Prefer a provider fence; explicitly unsupported providers use the logged startup-window fallback.
|
|
52
|
-
3. Construct the manager with the raw session and privileged executor, then declare its policy on the provider handle with
|
|
52
|
+
3. Construct the manager with the raw session and privileged executor, then declare its policy on the provider handle with the connection's grant and current-actor reader.
|
|
53
53
|
4. Detach on runtime shutdown. On physical stop/deletion, attempt fencing, lease cleanup and provider cleanup independently; retain saved desired settings for recreation.
|
|
54
54
|
|
|
55
55
|
Inject the Device API URL, trusted Device credential callback, stable workspace ID, current acting user, and the raw Linux sandbox session. Pass that unguarded session into `createWorkspaceEgressManager`, then use `withWorkspaceEgress` to declare its execution policy and lifecycle hooks on the returned handle. `withWorkspaceEgress` constructs a checked handle through the generic SDK constructor, so direct callers are safe too. `defineSandboxProvider` automatically adds any host admission policy on start and resume without reinstalling the Device policy. Using a guarded session for privileged controller execution recursively deadlocks. `/sandboxes/egress-bootstrap` exports the exact controller source for custom privileged executors and manual acceptance. Custom executors run `python3 -I -c source source` with JSON on stdin, or execute a root-owned file providing `__file__`; the source argument permits persistence for later controller launches.
|
|
@@ -60,13 +60,13 @@ Supply the extension's `enabled` predicate through `createWorkspaceDeviceNetwork
|
|
|
60
60
|
|
|
61
61
|
Before creating or booting a fenced namespace, call `preserveWorkspaceNetworkPolicy` with its actual current provider policy. This atomically saves only a missing policy; a temporary boot fence must never replace a saved choice. Both providers call the extension's `prepare` hook for durable create-if-absent behavior, and its `suspend` hook during physical teardown. The Final Device extension implements those hooks through the Device API. The initialization endpoint is deliberately separate: an older Device API rejects boot before changing provider policy rather than misinterpreting the operation as a policy update.
|
|
62
62
|
|
|
63
|
-
Custom networking hooks own resources allocated before they reject and must clean up those resources. A failed attachment must not revoke another
|
|
63
|
+
Custom networking hooks own resources allocated before they reject and must clean up those resources. A failed attachment must not revoke another connection’s shared lease. The Device API must expire provisioning leases whose create acknowledgement is lost; a client cannot revoke an ID it never received, and cannot activate it without the acknowledged enrollment.
|
|
64
64
|
|
|
65
65
|
Adapters must supply `afterGuard` to restore restrictive saved policies or undo an outer fence. Missing restoration refuses Configure/Disable rather than acknowledging an unrestricted direct route. Provider instances retain remembered managed-workspace and prepared-policy identifiers for their lifetime; include that inventory in host capacity planning. Durable host registration remains required across process replacement.
|
|
66
66
|
|
|
67
67
|
## Boot, resume and saved policy
|
|
68
68
|
|
|
69
|
-
Prefer provider networking fences before boot or rebase, then apply the transport policy only after the manager guards the namespace. Daytona defaults to a structured-warning fallback only when the account explicitly rejects custom networking; `workspaceNetworkingBootFence: true` requires the provider fence, and `false` deliberately selects command-readiness protection. Startup/resumed background traffic before controller initialization is outside the fallback guarantee. A
|
|
69
|
+
Prefer provider networking fences before boot or rebase, then apply the transport policy only after the manager guards the namespace. Daytona defaults to a structured-warning fallback only when the account explicitly rejects custom networking; `workspaceNetworkingBootFence: true` requires the provider fence, and `false` deliberately selects command-readiness protection. Startup/resumed background traffic before controller initialization is outside the fallback guarantee. A connection whose grant does not both write files and run commands is passive for networking: it records nothing, never recovers a route, and cannot wake a managed paused/stopped Computer or stopped/archived Daytona sandbox; a connection whose grant does both must resume it through guarded initialization. A sandbox's id is its workspace identity for Device egress; provider resource names remain private. A new sandbox starts from its setup's network policy. Missing or unreadable provider policy is denied. Fallback identities escape delimiters; Device egress identities must fit the 256-character protocol limit without restricting ordinary sandbox identities; supply a bounded host identity for longer provider names. Disable before capturing an image; do not clone a live managed identity.
|
|
70
70
|
|
|
71
71
|
Device configuration and Disable ask for approval by default through the public sandbox tool policy, and can be explicitly preauthorized. Consent selects the Device’s destination controls, including private access; provider destination allowlists do not constrain traffic inside the tunnel. Retain the saved direct-access policy and restore it on Disable. Unknown initial policy prevents configuration because restoration would be undefined. Disable before changing the saved direct-access policy. In-tunnel destination allowlists are unsupported. Configure failures intentionally retain a blocked route and desired settings until successful configuration or explicit disable; they never silently restore direct access.
|
|
72
72
|
|
|
@@ -93,13 +93,13 @@ A workspace shares one network namespace; checks on new operations do not isolat
|
|
|
93
93
|
already-running processes by user. The Linux firewall independently enforces
|
|
94
94
|
physical-egress denial.
|
|
95
95
|
|
|
96
|
-
## Authority,
|
|
96
|
+
## Authority, grants and shutdown
|
|
97
97
|
|
|
98
|
-
Device Configure/Disable require write access and lifecycle authority. Direct network-policy operations require execute or write access plus lifecycle authority;
|
|
98
|
+
Device Configure/Disable require write access and lifecycle authority. Direct network-policy operations require execute or write access plus lifecycle authority; a grant without files write and shell execute cannot mutate networking. MCP projections enforce tool consent; hosts exposing handle RPC must install their own operation-consent hook. Configure and Disable default to Ask. Only exact `network.egress.configure`/`network.egress.disable` action preauthorization can waive the default; broad lifecycle/network Allow cannot. Status honors `network.egress.status` and `egress` policy. MCP hosts pass lifecycle authority and action input to the policy-key helper, then use `resolveSandboxToolPolicy` so any applicable Ask wins for Configure/Disable. Status retains ordinary first-match read-policy precedence for `network.egress.status` and `egress`. This release exposes status to grants that write files and run commands, with lifecycle authority. Foreground actor changes suspend as the currently acting user, including a trusted userless host, and block until an explicit route choice; background connections do not revoke another actor's chosen route. Userless execution cannot inherit someone else's Device access.
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
Passive connections skip recovery and deferred setup. Pass the connection's grant to `withWorkspaceEgress`; never initialize a manager for a passive connection. They may inspect files but cannot repair a blocked route or run setup. A connection whose grant writes files and runs commands must configure or explicitly disable first. Networking changes do not run deferred repository/setup work; that runs before the next guarded execution, write, or foreground MCP endpoint/channel acquisition.
|
|
101
101
|
|
|
102
|
-
The manager owns renewal; failure observers cannot interrupt networking or claim cleanup. Editor access by another actor is refused before changing the owner’s route. A successful direct-policy retry clears a previous provider-update failure, including for userless workspaces. `close()` detaches a handle; runtime shutdown must not disrupt another
|
|
102
|
+
The manager owns renewal; failure observers cannot interrupt networking or claim cleanup. Editor access by another actor is refused before changing the owner’s route. A successful direct-policy retry clears a previous provider-update failure, including for userless workspaces. `close()` detaches a handle; runtime shutdown must not disrupt another connection sharing the workspace. `close(true)` attempts the namespace fence and suspends every lease for an explicit workspace stop/deletion, even if its cached lease has been replaced. Failure cleanup revokes only a lease that this handle created. Provider teardown independently attempts the fence, resource cleanup and lease revocation, and reports failures after cleanup. Removing boot admission must still permit teardown; hosts distinguish it with the predicate's `teardown` flag. Desired settings survive stop and lease expiry.
|
|
103
103
|
|
|
104
104
|
Teardown preserves the current provider policy before applying a fence. If eligibility or initial-policy persistence is unavailable for an unknown workspace, teardown still stops the resource, attempts suspension, and reports the error; it does not overwrite an unrelated policy. Host-managed boot waits for eligibility and saved policy recovery. Managed Computer creation and write/resume disable automatic wake. Passive read attachments do not change provider settings; migrate existing resources through a write attachment before relying on managed wake protection. Daytona’s preferred-fence fallback retains the documented startup window.
|
|
105
105
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DefinedHarnessProviderIface } from '@finalai/agent-definition/authoring';
|
|
2
|
+
import type { AcpAdapterDefinitionIface, HarnessDefinitionIface } from '@finalai/agent-provider';
|
|
3
|
+
import { FinalHarnessName, type FinalAcpAdapter } from "./harnesses/names.mjs";
|
|
4
|
+
export interface FinalCatalogIface {
|
|
5
|
+
harnesses: Record<FinalHarnessName, HarnessDefinitionIface>;
|
|
6
|
+
adapters: Record<FinalAcpAdapter, AcpAdapterDefinitionIface>;
|
|
7
|
+
provider: DefinedHarnessProviderIface;
|
|
8
|
+
}
|
|
9
|
+
export declare const finalCatalog: FinalCatalogIface;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FINAL_ACP_ADAPTERS } from "./harnesses/adapters.mjs";
|
|
2
|
+
import { FINAL_HARNESS_DEFINITIONS } from "./harnesses/definitions.mjs";
|
|
3
|
+
import { FinalHarness, FinalHarnessName } from "./harnesses/names.mjs";
|
|
4
|
+
import { GENERAL_HARNESS_PROVIDER } from "./provider/index.mjs";
|
|
5
|
+
const finalCatalog = {
|
|
6
|
+
harnesses: {
|
|
7
|
+
[FinalHarnessName.Final]: FINAL_HARNESS_DEFINITIONS[FinalHarness.Final],
|
|
8
|
+
[FinalHarnessName.Pi]: FINAL_HARNESS_DEFINITIONS[FinalHarness.Pi],
|
|
9
|
+
[FinalHarnessName.NanocodeClaude]: FINAL_HARNESS_DEFINITIONS[FinalHarness.NanocodeClaude],
|
|
10
|
+
[FinalHarnessName.NanocodeCodex]: FINAL_HARNESS_DEFINITIONS[FinalHarness.NanocodeCodex],
|
|
11
|
+
[FinalHarnessName.ClaudeCode]: FINAL_HARNESS_DEFINITIONS[FinalHarness.ClaudeCode],
|
|
12
|
+
[FinalHarnessName.Codex]: FINAL_HARNESS_DEFINITIONS[FinalHarness.Codex],
|
|
13
|
+
[FinalHarnessName.AcpAgent]: FINAL_HARNESS_DEFINITIONS[FinalHarness.AcpAgent]
|
|
14
|
+
},
|
|
15
|
+
adapters: FINAL_ACP_ADAPTERS,
|
|
16
|
+
provider: GENERAL_HARNESS_PROVIDER
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
finalCatalog
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=catalog.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/catalog.ts"],
|
|
4
|
+
"sourcesContent": ["import type { DefinedHarnessProviderIface } from '@finalai/agent-definition/authoring';\nimport type { AcpAdapterDefinitionIface, HarnessDefinitionIface } from '@finalai/agent-provider';\nimport { FINAL_ACP_ADAPTERS } from \"./harnesses/adapters.mjs\";\nimport { FINAL_HARNESS_DEFINITIONS } from \"./harnesses/definitions.mjs\";\nimport { FinalHarness, FinalHarnessName, type FinalAcpAdapter } from \"./harnesses/names.mjs\";\nimport { GENERAL_HARNESS_PROVIDER } from \"./provider/index.mjs\";\n\n// Everything Final publishes for harnesses, as documents: its harness and ACP\n// adapter definitions by the names they are published under (settings reach\n// them qualified, `final/<name>`), and the general provider that runs any\n// definition carrying no provider of its own.\nexport interface FinalCatalogIface {\n harnesses: Record<FinalHarnessName, HarnessDefinitionIface>;\n adapters: Record<FinalAcpAdapter, AcpAdapterDefinitionIface>;\n provider: DefinedHarnessProviderIface;\n}\n\nexport const finalCatalog: FinalCatalogIface = {\n harnesses: {\n [FinalHarnessName.Final]: FINAL_HARNESS_DEFINITIONS[FinalHarness.Final],\n [FinalHarnessName.Pi]: FINAL_HARNESS_DEFINITIONS[FinalHarness.Pi],\n [FinalHarnessName.NanocodeClaude]: FINAL_HARNESS_DEFINITIONS[FinalHarness.NanocodeClaude],\n [FinalHarnessName.NanocodeCodex]: FINAL_HARNESS_DEFINITIONS[FinalHarness.NanocodeCodex],\n [FinalHarnessName.ClaudeCode]: FINAL_HARNESS_DEFINITIONS[FinalHarness.ClaudeCode],\n [FinalHarnessName.Codex]: FINAL_HARNESS_DEFINITIONS[FinalHarness.Codex],\n [FinalHarnessName.AcpAgent]: FINAL_HARNESS_DEFINITIONS[FinalHarness.AcpAgent],\n },\n adapters: FINAL_ACP_ADAPTERS,\n provider: GENERAL_HARNESS_PROVIDER,\n};\n"],
|
|
5
|
+
"mappings": "AAEA,SAAS,0BAA0B;AACnC,SAAS,iCAAiC;AAC1C,SAAS,cAAc,wBAA8C;AACrE,SAAS,gCAAgC;AAYlC,MAAM,eAAkC;AAAA,EAC7C,WAAW;AAAA,IACT,CAAC,iBAAiB,KAAK,GAAG,0BAA0B,aAAa,KAAK;AAAA,IACtE,CAAC,iBAAiB,EAAE,GAAG,0BAA0B,aAAa,EAAE;AAAA,IAChE,CAAC,iBAAiB,cAAc,GAAG,0BAA0B,aAAa,cAAc;AAAA,IACxF,CAAC,iBAAiB,aAAa,GAAG,0BAA0B,aAAa,aAAa;AAAA,IACtF,CAAC,iBAAiB,UAAU,GAAG,0BAA0B,aAAa,UAAU;AAAA,IAChF,CAAC,iBAAiB,KAAK,GAAG,0BAA0B,aAAa,KAAK;AAAA,IACtE,CAAC,iBAAiB,QAAQ,GAAG,0BAA0B,aAAa,QAAQ;AAAA,EAC9E;AAAA,EACA,UAAU;AAAA,EACV,UAAU;AACZ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type HarnessDefinitionIface, type HarnessSettingsIface } from '@finalai/agent-provider';
|
|
2
|
+
import { type AtUrlInputIface } from "./names.mjs";
|
|
3
|
+
export declare const ACP_AGENT_HARNESS: HarnessDefinitionIface;
|
|
4
|
+
export declare const acpAgent: (input: AtUrlInputIface) => HarnessSettingsIface;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineHarness } from "@finalai/agent-definition/authoring";
|
|
2
|
+
import {
|
|
3
|
+
ACP_V2_INTERFACE,
|
|
4
|
+
CredentialDelivery,
|
|
5
|
+
HarnessFeature,
|
|
6
|
+
InferenceSourceKind,
|
|
7
|
+
McpTransportKind,
|
|
8
|
+
PermissionLevel,
|
|
9
|
+
PromptWhileRunning
|
|
10
|
+
} from "@finalai/agent-provider";
|
|
11
|
+
import { configObjectJson, harnessSettings } from "./config-fields.mjs";
|
|
12
|
+
import { atUrl, FinalHarness } from "./names.mjs";
|
|
13
|
+
const ACP_AGENT_HARNESS = defineHarness({
|
|
14
|
+
title: "ACP agent",
|
|
15
|
+
description: "An agent that speaks ACP v2 with Final's ACP extensions, at its URL.",
|
|
16
|
+
configurationSchema: configObjectJson({ title: "ACP agent", properties: {} }),
|
|
17
|
+
features: [HarnessFeature.McpTools],
|
|
18
|
+
// Final cannot hold an agent it does not run to asking first.
|
|
19
|
+
lowestPermission: PermissionLevel.Auto,
|
|
20
|
+
inference: { kinds: [InferenceSourceKind.Harness], delivery: CredentialDelivery.AtOpen },
|
|
21
|
+
interface: ACP_V2_INTERFACE,
|
|
22
|
+
adapter: null,
|
|
23
|
+
run: {},
|
|
24
|
+
mcp: [McpTransportKind.Http],
|
|
25
|
+
// The extensions every endpoint Final dials must advertise.
|
|
26
|
+
supports: { observe: true, resumeReplay: true, authorMeta: true, fork: false },
|
|
27
|
+
promptWhileRunning: PromptWhileRunning.Queue,
|
|
28
|
+
sessionSurvivesDisconnect: false
|
|
29
|
+
});
|
|
30
|
+
const acpAgent = (input) => harnessSettings({ harness: FinalHarness.AcpAgent, configuration: {}, environment: atUrl(input) });
|
|
31
|
+
export {
|
|
32
|
+
ACP_AGENT_HARNESS,
|
|
33
|
+
acpAgent
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=acp-agent.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/harnesses/acp-agent.ts"],
|
|
4
|
+
"sourcesContent": ["import { defineHarness } from '@finalai/agent-definition/authoring';\nimport {\n ACP_V2_INTERFACE,\n CredentialDelivery,\n HarnessFeature,\n InferenceSourceKind,\n McpTransportKind,\n PermissionLevel,\n PromptWhileRunning,\n type HarnessDefinitionIface,\n type HarnessSettingsIface,\n} from '@finalai/agent-provider';\nimport { configObjectJson, harnessSettings } from \"./config-fields.mjs\";\nimport { atUrl, FinalHarness, type AtUrlInputIface } from \"./names.mjs\";\n\n// Any agent that already speaks ACP v2 with Final's ACP extensions, running\n// elsewhere: it needs no adapter, nothing is started, and it is reached at its\n// URL (an `atUrl` environment). It brings its own model access and is told\n// nothing about Final's credentials; what it does beyond ACP is its own, so\n// the definition promises no more than ACP and the required extensions give.\n\nexport const ACP_AGENT_HARNESS: HarnessDefinitionIface = defineHarness({\n title: 'ACP agent',\n description: \"An agent that speaks ACP v2 with Final's ACP extensions, at its URL.\",\n configurationSchema: configObjectJson({ title: 'ACP agent', properties: {} }),\n features: [HarnessFeature.McpTools],\n // Final cannot hold an agent it does not run to asking first.\n lowestPermission: PermissionLevel.Auto,\n inference: { kinds: [InferenceSourceKind.Harness], delivery: CredentialDelivery.AtOpen },\n interface: ACP_V2_INTERFACE,\n adapter: null,\n run: {},\n mcp: [McpTransportKind.Http],\n // The extensions every endpoint Final dials must advertise.\n supports: { observe: true, resumeReplay: true, authorMeta: true, fork: false },\n promptWhileRunning: PromptWhileRunning.Queue,\n sessionSurvivesDisconnect: false,\n});\n\n// An ACP agent at `url`; `hop` names the project secret holding its bearer token.\nexport const acpAgent = (input: AtUrlInputIface): HarnessSettingsIface =>\n harnessSettings({ harness: FinalHarness.AcpAgent, configuration: {}, environment: atUrl(input) });\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,qBAAqB;AAC9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,kBAAkB,uBAAuB;AAClD,SAAS,OAAO,oBAA0C;AAQnD,MAAM,oBAA4C,cAAc;AAAA,EACrE,OAAO;AAAA,EACP,aAAa;AAAA,EACb,qBAAqB,iBAAiB,EAAE,OAAO,aAAa,YAAY,CAAC,EAAE,CAAC;AAAA,EAC5E,UAAU,CAAC,eAAe,QAAQ;AAAA;AAAA,EAElC,kBAAkB,gBAAgB;AAAA,EAClC,WAAW,EAAE,OAAO,CAAC,oBAAoB,OAAO,GAAG,UAAU,mBAAmB,OAAO;AAAA,EACvF,WAAW;AAAA,EACX,SAAS;AAAA,EACT,KAAK,CAAC;AAAA,EACN,KAAK,CAAC,iBAAiB,IAAI;AAAA;AAAA,EAE3B,UAAU,EAAE,SAAS,MAAM,cAAc,MAAM,YAAY,MAAM,MAAM,MAAM;AAAA,EAC7E,oBAAoB,mBAAmB;AAAA,EACvC,2BAA2B;AAC7B,CAAC;AAGM,MAAM,WAAW,CAAC,UACvB,gBAAgB,EAAE,SAAS,aAAa,UAAU,eAAe,CAAC,GAAG,aAAa,MAAM,KAAK,EAAE,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type AcpAdapterDefinitionIface } from '@finalai/agent-provider';
|
|
2
|
+
import { FinalAcpAdapter } from "./names.mjs";
|
|
3
|
+
export declare const PI_ACP_ADAPTER: AcpAdapterDefinitionIface;
|
|
4
|
+
export declare const NANOCODE_ACP_ADAPTER: AcpAdapterDefinitionIface;
|
|
5
|
+
export declare const CLAUDE_CODE_ACP_ADAPTER: AcpAdapterDefinitionIface;
|
|
6
|
+
export declare const CODEX_ACP_ADAPTER: AcpAdapterDefinitionIface;
|
|
7
|
+
export declare const FINAL_ACP_ADAPTERS: Record<FinalAcpAdapter, AcpAdapterDefinitionIface>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { defineAcpAdapter } from "@finalai/agent-definition/authoring";
|
|
2
|
+
import { FinalExtension } from "@finalai/agent-provider";
|
|
3
|
+
import { REQUIRED_FINAL_EXTENSIONS } from "../provider/general.mjs";
|
|
4
|
+
import { FinalAcpAdapter, FinalHarnessInterface } from "./names.mjs";
|
|
5
|
+
const PI_ACP_ADAPTER = defineAcpAdapter({
|
|
6
|
+
title: "Pi ACP adapter",
|
|
7
|
+
description: "Maps the Pi agent loop (Pi and the Final harness) to ACP v2 on a worker runtime.",
|
|
8
|
+
adapts: [FinalHarnessInterface.PiAgent],
|
|
9
|
+
run: { worker: { program: "pi" } },
|
|
10
|
+
extensions: [...REQUIRED_FINAL_EXTENSIONS]
|
|
11
|
+
});
|
|
12
|
+
const NANOCODE_ACP_ADAPTER = defineAcpAdapter({
|
|
13
|
+
title: "nanocode ACP adapter",
|
|
14
|
+
description: "Maps nanocode's Claude and Codex engines to ACP v2 on a worker runtime.",
|
|
15
|
+
adapts: [FinalHarnessInterface.Nanocode],
|
|
16
|
+
run: { worker: { program: "nanocode" } },
|
|
17
|
+
extensions: [...REQUIRED_FINAL_EXTENSIONS]
|
|
18
|
+
});
|
|
19
|
+
const permissionArgs = {
|
|
20
|
+
when: "configuration.permissionMode",
|
|
21
|
+
args: ["--permission-mode", "{{configuration.permissionMode}}"]
|
|
22
|
+
};
|
|
23
|
+
const CLAUDE_CODE_ACP_ADAPTER = defineAcpAdapter({
|
|
24
|
+
title: "Claude Code ACP adapter",
|
|
25
|
+
description: "Runs Claude Code through the Claude Agent SDK and speaks ACP v2 on stdio.",
|
|
26
|
+
adapts: [FinalHarnessInterface.ClaudeAgentSdk],
|
|
27
|
+
run: {
|
|
28
|
+
process: {
|
|
29
|
+
command: "npx",
|
|
30
|
+
args: [
|
|
31
|
+
"-y",
|
|
32
|
+
"@finalai/acp-adapter-claude-code",
|
|
33
|
+
permissionArgs,
|
|
34
|
+
"--",
|
|
35
|
+
"{{harness.command}}",
|
|
36
|
+
{ spread: "harness.args" }
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
extensions: [...REQUIRED_FINAL_EXTENSIONS, FinalExtension.Fork]
|
|
41
|
+
});
|
|
42
|
+
const CODEX_ACP_ADAPTER = defineAcpAdapter({
|
|
43
|
+
title: "Codex ACP adapter",
|
|
44
|
+
description: "Runs the Codex app-server and speaks ACP v2 on stdio.",
|
|
45
|
+
adapts: [FinalHarnessInterface.CodexAppServer],
|
|
46
|
+
run: {
|
|
47
|
+
process: {
|
|
48
|
+
command: "npx",
|
|
49
|
+
args: [
|
|
50
|
+
"-y",
|
|
51
|
+
"@finalai/acp-adapter-codex",
|
|
52
|
+
permissionArgs,
|
|
53
|
+
"--",
|
|
54
|
+
"{{harness.command}}",
|
|
55
|
+
{ spread: "harness.args" }
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
extensions: [...REQUIRED_FINAL_EXTENSIONS]
|
|
60
|
+
});
|
|
61
|
+
const FINAL_ACP_ADAPTERS = {
|
|
62
|
+
[FinalAcpAdapter.Pi]: PI_ACP_ADAPTER,
|
|
63
|
+
[FinalAcpAdapter.Nanocode]: NANOCODE_ACP_ADAPTER,
|
|
64
|
+
[FinalAcpAdapter.ClaudeCode]: CLAUDE_CODE_ACP_ADAPTER,
|
|
65
|
+
[FinalAcpAdapter.Codex]: CODEX_ACP_ADAPTER
|
|
66
|
+
};
|
|
67
|
+
export {
|
|
68
|
+
CLAUDE_CODE_ACP_ADAPTER,
|
|
69
|
+
CODEX_ACP_ADAPTER,
|
|
70
|
+
FINAL_ACP_ADAPTERS,
|
|
71
|
+
NANOCODE_ACP_ADAPTER,
|
|
72
|
+
PI_ACP_ADAPTER
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=adapters.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/harnesses/adapters.ts"],
|
|
4
|
+
"sourcesContent": ["import { defineAcpAdapter } from '@finalai/agent-definition/authoring';\nimport { FinalExtension, type AcpAdapterDefinitionIface } from '@finalai/agent-provider';\nimport { REQUIRED_FINAL_EXTENSIONS } from \"../provider/general.mjs\";\nimport { FinalAcpAdapter, FinalHarnessInterface } from \"./names.mjs\";\n\n// Final's ACP adapters. Each implements ACP v2 and Final's ACP extensions and\n// advertises them in `initialize`; the general harness provider refuses an\n// adapter that does not (../provider/general.ts). Fork is optional.\n\n// The worker runtime's engines that map a harness program to ACP v2. The\n// worker program started is the engine; the harness's own program comes in\n// its input (`{ harness: { program }, configuration }`).\nexport const PI_ACP_ADAPTER: AcpAdapterDefinitionIface = defineAcpAdapter({\n title: 'Pi ACP adapter',\n description: 'Maps the Pi agent loop (Pi and the Final harness) to ACP v2 on a worker runtime.',\n adapts: [FinalHarnessInterface.PiAgent],\n run: { worker: { program: 'pi' } },\n extensions: [...REQUIRED_FINAL_EXTENSIONS],\n});\n\nexport const NANOCODE_ACP_ADAPTER: AcpAdapterDefinitionIface = defineAcpAdapter({\n title: 'nanocode ACP adapter',\n description: \"Maps nanocode's Claude and Codex engines to ACP v2 on a worker runtime.\",\n adapts: [FinalHarnessInterface.Nanocode],\n run: { worker: { program: 'nanocode' } },\n extensions: [...REQUIRED_FINAL_EXTENSIONS],\n});\n\n// The process adapters are published packages. Each takes the harness's\n// command line after `--` and launches it as the program it adapts; the\n// permission level is Final's (`ask`, `review`, `auto`), mapped by the\n// adapter onto the program's own modes.\nconst permissionArgs = {\n when: 'configuration.permissionMode',\n args: ['--permission-mode', '{{configuration.permissionMode}}'],\n};\n\nexport const CLAUDE_CODE_ACP_ADAPTER: AcpAdapterDefinitionIface = defineAcpAdapter({\n title: 'Claude Code ACP adapter',\n description: 'Runs Claude Code through the Claude Agent SDK and speaks ACP v2 on stdio.',\n adapts: [FinalHarnessInterface.ClaudeAgentSdk],\n run: {\n process: {\n command: 'npx',\n args: [\n '-y',\n '@finalai/acp-adapter-claude-code',\n permissionArgs,\n '--',\n '{{harness.command}}',\n { spread: 'harness.args' },\n ],\n },\n },\n extensions: [...REQUIRED_FINAL_EXTENSIONS, FinalExtension.Fork],\n});\n\nexport const CODEX_ACP_ADAPTER: AcpAdapterDefinitionIface = defineAcpAdapter({\n title: 'Codex ACP adapter',\n description: 'Runs the Codex app-server and speaks ACP v2 on stdio.',\n adapts: [FinalHarnessInterface.CodexAppServer],\n run: {\n process: {\n command: 'npx',\n args: [\n '-y',\n '@finalai/acp-adapter-codex',\n permissionArgs,\n '--',\n '{{harness.command}}',\n { spread: 'harness.args' },\n ],\n },\n },\n extensions: [...REQUIRED_FINAL_EXTENSIONS],\n});\n\nexport const FINAL_ACP_ADAPTERS: Record<FinalAcpAdapter, AcpAdapterDefinitionIface> = {\n [FinalAcpAdapter.Pi]: PI_ACP_ADAPTER,\n [FinalAcpAdapter.Nanocode]: NANOCODE_ACP_ADAPTER,\n [FinalAcpAdapter.ClaudeCode]: CLAUDE_CODE_ACP_ADAPTER,\n [FinalAcpAdapter.Codex]: CODEX_ACP_ADAPTER,\n};\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,wBAAwB;AACjC,SAAS,sBAAsD;AAC/D,SAAS,iCAAiC;AAC1C,SAAS,iBAAiB,6BAA6B;AAShD,MAAM,iBAA4C,iBAAiB;AAAA,EACxE,OAAO;AAAA,EACP,aAAa;AAAA,EACb,QAAQ,CAAC,sBAAsB,OAAO;AAAA,EACtC,KAAK,EAAE,QAAQ,EAAE,SAAS,KAAK,EAAE;AAAA,EACjC,YAAY,CAAC,GAAG,yBAAyB;AAC3C,CAAC;AAEM,MAAM,uBAAkD,iBAAiB;AAAA,EAC9E,OAAO;AAAA,EACP,aAAa;AAAA,EACb,QAAQ,CAAC,sBAAsB,QAAQ;AAAA,EACvC,KAAK,EAAE,QAAQ,EAAE,SAAS,WAAW,EAAE;AAAA,EACvC,YAAY,CAAC,GAAG,yBAAyB;AAC3C,CAAC;AAMD,MAAM,iBAAiB;AAAA,EACrB,MAAM;AAAA,EACN,MAAM,CAAC,qBAAqB,kCAAkC;AAChE;AAEO,MAAM,0BAAqD,iBAAiB;AAAA,EACjF,OAAO;AAAA,EACP,aAAa;AAAA,EACb,QAAQ,CAAC,sBAAsB,cAAc;AAAA,EAC7C,KAAK;AAAA,IACH,SAAS;AAAA,MACP,SAAS;AAAA,MACT,MAAM;AAAA,QACJ;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,EAAE,QAAQ,eAAe;AAAA,MAC3B;AAAA,IACF;AAAA,EACF;AAAA,EACA,YAAY,CAAC,GAAG,2BAA2B,eAAe,IAAI;AAChE,CAAC;AAEM,MAAM,oBAA+C,iBAAiB;AAAA,EAC3E,OAAO;AAAA,EACP,aAAa;AAAA,EACb,QAAQ,CAAC,sBAAsB,cAAc;AAAA,EAC7C,KAAK;AAAA,IACH,SAAS;AAAA,MACP,SAAS;AAAA,MACT,MAAM;AAAA,QACJ;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,EAAE,QAAQ,eAAe;AAAA,MAC3B;AAAA,IACF;AAAA,EACF;AAAA,EACA,YAAY,CAAC,GAAG,yBAAyB;AAC3C,CAAC;AAEM,MAAM,qBAAyE;AAAA,EACpF,CAAC,gBAAgB,EAAE,GAAG;AAAA,EACtB,CAAC,gBAAgB,QAAQ,GAAG;AAAA,EAC5B,CAAC,gBAAgB,UAAU,GAAG;AAAA,EAC9B,CAAC,gBAAgB,KAAK,GAAG;AAC3B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type HarnessDefinitionIface, type HarnessEnvironmentIface, type HarnessSettingsIface } from '@finalai/agent-provider';
|
|
2
|
+
import { type InferenceInput, type PermissionInput } from "./config-fields.mjs";
|
|
3
|
+
export declare const CLAUDE_CODE_NATIVE_TOOLS: {
|
|
4
|
+
files: string[];
|
|
5
|
+
shell: string[];
|
|
6
|
+
};
|
|
7
|
+
export declare const CLAUDE_CODE_HARNESS: HarnessDefinitionIface;
|
|
8
|
+
export interface ClaudeCodeInputIface {
|
|
9
|
+
model?: string;
|
|
10
|
+
inference?: InferenceInput;
|
|
11
|
+
permissionMode?: PermissionInput;
|
|
12
|
+
environment?: HarnessEnvironmentIface;
|
|
13
|
+
}
|
|
14
|
+
export declare const claudeCode: ({ environment, ...configuration }?: ClaudeCodeInputIface) => HarnessSettingsIface;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { defineHarness } from "@finalai/agent-definition/authoring";
|
|
2
|
+
import {
|
|
3
|
+
CredentialDelivery,
|
|
4
|
+
HarnessFeature,
|
|
5
|
+
InferenceSourceKind,
|
|
6
|
+
McpTransportKind,
|
|
7
|
+
PermissionLevel,
|
|
8
|
+
PromptWhileRunning,
|
|
9
|
+
SandboxWire
|
|
10
|
+
} from "@finalai/agent-provider";
|
|
11
|
+
import {
|
|
12
|
+
configObjectJson,
|
|
13
|
+
harnessSettings,
|
|
14
|
+
inferenceJson,
|
|
15
|
+
permissionModeJson
|
|
16
|
+
} from "./config-fields.mjs";
|
|
17
|
+
import { ModelVendor } from "./model-reference.mjs";
|
|
18
|
+
import { FinalAcpAdapter, FinalHarness, FinalHarnessInterface } from "./names.mjs";
|
|
19
|
+
const CLAUDE_CODE_NATIVE_TOOLS = {
|
|
20
|
+
files: ["Read", "Write", "Edit", "Glob", "Grep", "NotebookEdit"],
|
|
21
|
+
shell: ["Bash", "BashOutput", "KillShell"]
|
|
22
|
+
};
|
|
23
|
+
const CLAUDE_CODE_HARNESS = defineHarness({
|
|
24
|
+
title: "Claude Code",
|
|
25
|
+
description: "Claude Code, run as a process on the machine it works on.",
|
|
26
|
+
configurationSchema: configObjectJson({
|
|
27
|
+
title: "Claude Code",
|
|
28
|
+
properties: {
|
|
29
|
+
model: { $ref: "final://schemas/model-picker", type: "string", minLength: 1 },
|
|
30
|
+
inference: inferenceJson(),
|
|
31
|
+
permissionMode: permissionModeJson()
|
|
32
|
+
}
|
|
33
|
+
}),
|
|
34
|
+
// Claude Code takes no skills, and its allow-lists cannot carry an agent's
|
|
35
|
+
// per-tool approvals.
|
|
36
|
+
features: [HarnessFeature.McpTools, HarnessFeature.SystemInstructions],
|
|
37
|
+
lowestPermission: PermissionLevel.Ask,
|
|
38
|
+
inference: {
|
|
39
|
+
vendors: [ModelVendor.Anthropic],
|
|
40
|
+
kinds: [
|
|
41
|
+
InferenceSourceKind.Harness,
|
|
42
|
+
InferenceSourceKind.Subscription,
|
|
43
|
+
InferenceSourceKind.ApiKey,
|
|
44
|
+
InferenceSourceKind.Final
|
|
45
|
+
],
|
|
46
|
+
delivery: CredentialDelivery.AtOpen
|
|
47
|
+
},
|
|
48
|
+
native: {
|
|
49
|
+
files: { tools: CLAUDE_CODE_NATIVE_TOOLS.files },
|
|
50
|
+
shell: { tools: CLAUDE_CODE_NATIVE_TOOLS.shell }
|
|
51
|
+
},
|
|
52
|
+
interface: FinalHarnessInterface.ClaudeAgentSdk,
|
|
53
|
+
adapter: FinalAcpAdapter.ClaudeCode,
|
|
54
|
+
run: {
|
|
55
|
+
process: {
|
|
56
|
+
command: "claude",
|
|
57
|
+
args: [{ when: "configuration.model", args: ["--model", "{{configuration.model}}"] }]
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
// The adapter proxies every MCP server it is handed (acp ones over the ACP connection)
|
|
61
|
+
// and reports full tool results.
|
|
62
|
+
mcp: [McpTransportKind.Acp, McpTransportKind.Http, McpTransportKind.Stdio],
|
|
63
|
+
consumes: [SandboxWire.Mcp],
|
|
64
|
+
supports: { observe: true, resumeReplay: true, fork: true, authorMeta: true },
|
|
65
|
+
// The adapter pushes it into the running query; Claude Code takes it at its next step; one idle ends both.
|
|
66
|
+
promptWhileRunning: PromptWhileRunning.Inject,
|
|
67
|
+
// Its stdio belongs to the session service's connection to the sandbox.
|
|
68
|
+
sessionSurvivesDisconnect: false
|
|
69
|
+
});
|
|
70
|
+
const claudeCode = ({
|
|
71
|
+
environment,
|
|
72
|
+
...configuration
|
|
73
|
+
} = {}) => harnessSettings({ harness: FinalHarness.ClaudeCode, configuration, environment });
|
|
74
|
+
export {
|
|
75
|
+
CLAUDE_CODE_HARNESS,
|
|
76
|
+
CLAUDE_CODE_NATIVE_TOOLS,
|
|
77
|
+
claudeCode
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=claude-code.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/harnesses/claude-code.ts"],
|
|
4
|
+
"sourcesContent": ["import { defineHarness } from '@finalai/agent-definition/authoring';\nimport {\n CredentialDelivery,\n HarnessFeature,\n InferenceSourceKind,\n McpTransportKind,\n PermissionLevel,\n PromptWhileRunning,\n SandboxWire,\n type HarnessDefinitionIface,\n type HarnessEnvironmentIface,\n type HarnessSettingsIface,\n} from '@finalai/agent-provider';\nimport {\n configObjectJson,\n harnessSettings,\n inferenceJson,\n permissionModeJson,\n type InferenceInput,\n type PermissionInput,\n} from \"./config-fields.mjs\";\nimport { ModelVendor } from \"./model-reference.mjs\";\nimport { FinalAcpAdapter, FinalHarness, FinalHarnessInterface } from \"./names.mjs\";\n\n// Claude Code as a process on a machine (a computer, a device, your own host),\n// behind Final's ACP adapter on the Claude Agent SDK. Its own file and shell\n// tools work on the machine it runs on, which is therefore the sandbox\n// provided for `files` and `shell`; provided screens reach it as the sandbox\n// MCP projection.\n\nexport const CLAUDE_CODE_NATIVE_TOOLS = {\n files: ['Read', 'Write', 'Edit', 'Glob', 'Grep', 'NotebookEdit'],\n shell: ['Bash', 'BashOutput', 'KillShell'],\n};\n\nexport const CLAUDE_CODE_HARNESS: HarnessDefinitionIface = defineHarness({\n title: 'Claude Code',\n description: 'Claude Code, run as a process on the machine it works on.',\n configurationSchema: configObjectJson({\n title: 'Claude Code',\n properties: {\n model: { $ref: 'final://schemas/model-picker', type: 'string', minLength: 1 },\n inference: inferenceJson(),\n permissionMode: permissionModeJson(),\n },\n }),\n // Claude Code takes no skills, and its allow-lists cannot carry an agent's\n // per-tool approvals.\n features: [HarnessFeature.McpTools, HarnessFeature.SystemInstructions],\n lowestPermission: PermissionLevel.Ask,\n inference: {\n vendors: [ModelVendor.Anthropic],\n kinds: [\n InferenceSourceKind.Harness,\n InferenceSourceKind.Subscription,\n InferenceSourceKind.ApiKey,\n InferenceSourceKind.Final,\n ],\n delivery: CredentialDelivery.AtOpen,\n },\n native: {\n files: { tools: CLAUDE_CODE_NATIVE_TOOLS.files },\n shell: { tools: CLAUDE_CODE_NATIVE_TOOLS.shell },\n },\n interface: FinalHarnessInterface.ClaudeAgentSdk,\n adapter: FinalAcpAdapter.ClaudeCode,\n run: {\n process: {\n command: 'claude',\n args: [{ when: 'configuration.model', args: ['--model', '{{configuration.model}}'] }],\n },\n },\n // The adapter proxies every MCP server it is handed (acp ones over the ACP connection)\n // and reports full tool results.\n mcp: [McpTransportKind.Acp, McpTransportKind.Http, McpTransportKind.Stdio],\n consumes: [SandboxWire.Mcp],\n supports: { observe: true, resumeReplay: true, fork: true, authorMeta: true },\n // The adapter pushes it into the running query; Claude Code takes it at its next step; one idle ends both.\n promptWhileRunning: PromptWhileRunning.Inject,\n // Its stdio belongs to the session service's connection to the sandbox.\n sessionSurvivesDisconnect: false,\n});\n\nexport interface ClaudeCodeInputIface {\n model?: string;\n // Absent: only the CLI's own login on the machine.\n inference?: InferenceInput;\n permissionMode?: PermissionInput;\n // The sandbox it runs in (absent: the one provided for `shell`), or an ACP\n // endpoint already running it: `atUrl({ url, hop })`.\n environment?: HarnessEnvironmentIface;\n}\n\nexport const claudeCode = ({\n environment,\n ...configuration\n}: ClaudeCodeInputIface = {}): HarnessSettingsIface =>\n harnessSettings({ harness: FinalHarness.ClaudeCode, configuration, environment });\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,qBAAqB;AAC9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,mBAAmB;AAC5B,SAAS,iBAAiB,cAAc,6BAA6B;AAQ9D,MAAM,2BAA2B;AAAA,EACtC,OAAO,CAAC,QAAQ,SAAS,QAAQ,QAAQ,QAAQ,cAAc;AAAA,EAC/D,OAAO,CAAC,QAAQ,cAAc,WAAW;AAC3C;AAEO,MAAM,sBAA8C,cAAc;AAAA,EACvE,OAAO;AAAA,EACP,aAAa;AAAA,EACb,qBAAqB,iBAAiB;AAAA,IACpC,OAAO;AAAA,IACP,YAAY;AAAA,MACV,OAAO,EAAE,MAAM,gCAAgC,MAAM,UAAU,WAAW,EAAE;AAAA,MAC5E,WAAW,cAAc;AAAA,MACzB,gBAAgB,mBAAmB;AAAA,IACrC;AAAA,EACF,CAAC;AAAA;AAAA;AAAA,EAGD,UAAU,CAAC,eAAe,UAAU,eAAe,kBAAkB;AAAA,EACrE,kBAAkB,gBAAgB;AAAA,EAClC,WAAW;AAAA,IACT,SAAS,CAAC,YAAY,SAAS;AAAA,IAC/B,OAAO;AAAA,MACL,oBAAoB;AAAA,MACpB,oBAAoB;AAAA,MACpB,oBAAoB;AAAA,MACpB,oBAAoB;AAAA,IACtB;AAAA,IACA,UAAU,mBAAmB;AAAA,EAC/B;AAAA,EACA,QAAQ;AAAA,IACN,OAAO,EAAE,OAAO,yBAAyB,MAAM;AAAA,IAC/C,OAAO,EAAE,OAAO,yBAAyB,MAAM;AAAA,EACjD;AAAA,EACA,WAAW,sBAAsB;AAAA,EACjC,SAAS,gBAAgB;AAAA,EACzB,KAAK;AAAA,IACH,SAAS;AAAA,MACP,SAAS;AAAA,MACT,MAAM,CAAC,EAAE,MAAM,uBAAuB,MAAM,CAAC,WAAW,yBAAyB,EAAE,CAAC;AAAA,IACtF;AAAA,EACF;AAAA;AAAA;AAAA,EAGA,KAAK,CAAC,iBAAiB,KAAK,iBAAiB,MAAM,iBAAiB,KAAK;AAAA,EACzE,UAAU,CAAC,YAAY,GAAG;AAAA,EAC1B,UAAU,EAAE,SAAS,MAAM,cAAc,MAAM,MAAM,MAAM,YAAY,KAAK;AAAA;AAAA,EAE5E,oBAAoB,mBAAmB;AAAA;AAAA,EAEvC,2BAA2B;AAC7B,CAAC;AAYM,MAAM,aAAa,CAAC;AAAA,EACzB;AAAA,EACA,GAAG;AACL,IAA0B,CAAC,MACzB,gBAAgB,EAAE,SAAS,aAAa,YAAY,eAAe,YAAY,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type HarnessDefinitionIface, type HarnessEnvironmentIface, type HarnessSettingsIface } from '@finalai/agent-provider';
|
|
2
|
+
import { ReasoningLevel, type InferenceInput, type PermissionInput } from "./config-fields.mjs";
|
|
3
|
+
export declare const CODEX_APP_SERVER_REASONING_LEVELS: readonly [ReasoningLevel.Minimal, ReasoningLevel.Low, ReasoningLevel.Medium, ReasoningLevel.High];
|
|
4
|
+
export declare const CODEX_HARNESS: HarnessDefinitionIface;
|
|
5
|
+
export interface CodexInputIface {
|
|
6
|
+
model?: string;
|
|
7
|
+
reasoning?: (typeof CODEX_APP_SERVER_REASONING_LEVELS)[number] | `${(typeof CODEX_APP_SERVER_REASONING_LEVELS)[number]}`;
|
|
8
|
+
inference?: InferenceInput;
|
|
9
|
+
permissionMode?: PermissionInput;
|
|
10
|
+
environment?: HarnessEnvironmentIface;
|
|
11
|
+
}
|
|
12
|
+
export declare const codex: ({ environment, ...configuration }?: CodexInputIface) => HarnessSettingsIface;
|