@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.
Files changed (159) hide show
  1. package/HOSTING.md +334 -245
  2. package/README.md +126 -40
  3. package/WORKSPACE-EGRESS.md +11 -11
  4. package/dist/modules/catalog.d.mts +9 -0
  5. package/dist/modules/catalog.mjs +21 -0
  6. package/dist/modules/catalog.mjs.map +7 -0
  7. package/dist/modules/harnesses/acp-agent.d.mts +4 -0
  8. package/dist/modules/harnesses/acp-agent.mjs +35 -0
  9. package/dist/modules/harnesses/acp-agent.mjs.map +7 -0
  10. package/dist/modules/harnesses/adapters.d.mts +7 -0
  11. package/dist/modules/harnesses/adapters.mjs +74 -0
  12. package/dist/modules/harnesses/adapters.mjs.map +7 -0
  13. package/dist/modules/harnesses/claude-code.d.mts +14 -0
  14. package/dist/modules/harnesses/claude-code.mjs +79 -0
  15. package/dist/modules/harnesses/claude-code.mjs.map +7 -0
  16. package/dist/modules/harnesses/codex.d.mts +12 -0
  17. package/dist/modules/harnesses/codex.mjs +90 -0
  18. package/dist/modules/harnesses/codex.mjs.map +7 -0
  19. package/dist/modules/harnesses/config-fields.d.mts +98 -57
  20. package/dist/modules/harnesses/config-fields.mjs +58 -35
  21. package/dist/modules/harnesses/config-fields.mjs.map +3 -3
  22. package/dist/modules/harnesses/definitions.d.mts +3 -0
  23. package/dist/modules/harnesses/definitions.mjs +21 -0
  24. package/dist/modules/harnesses/definitions.mjs.map +7 -0
  25. package/dist/modules/harnesses/fidelity.d.mts +1 -1
  26. package/dist/modules/harnesses/fidelity.mjs +17 -14
  27. package/dist/modules/harnesses/fidelity.mjs.map +2 -2
  28. package/dist/modules/harnesses/final.d.mts +12 -0
  29. package/dist/modules/harnesses/final.mjs +70 -0
  30. package/dist/modules/harnesses/final.mjs.map +7 -0
  31. package/dist/modules/harnesses/index.d.mts +13 -12
  32. package/dist/modules/harnesses/index.mjs +86 -45
  33. package/dist/modules/harnesses/index.mjs.map +3 -3
  34. package/dist/modules/harnesses/names.d.mts +43 -0
  35. package/dist/modules/harnesses/names.mjs +59 -0
  36. package/dist/modules/harnesses/names.mjs.map +7 -0
  37. package/dist/modules/harnesses/nanocode-claude.d.mts +18 -0
  38. package/dist/modules/harnesses/nanocode-claude.mjs +101 -0
  39. package/dist/modules/harnesses/nanocode-claude.mjs.map +7 -0
  40. package/dist/modules/harnesses/nanocode-codex.d.mts +13 -0
  41. package/dist/modules/harnesses/nanocode-codex.mjs +64 -0
  42. package/dist/modules/harnesses/nanocode-codex.mjs.map +7 -0
  43. package/dist/modules/harnesses/pi.d.mts +12 -0
  44. package/dist/modules/harnesses/pi.mjs +71 -0
  45. package/dist/modules/harnesses/pi.mjs.map +7 -0
  46. package/dist/modules/integrations.d.mts +9 -0
  47. package/dist/modules/integrations.mjs +29 -0
  48. package/dist/modules/integrations.mjs.map +7 -0
  49. package/dist/modules/provider/general.bundle.d.mts +1 -0
  50. package/dist/modules/provider/general.bundle.mjs +5 -0
  51. package/dist/modules/provider/general.bundle.mjs.map +7 -0
  52. package/dist/modules/provider/general.d.mts +11 -0
  53. package/dist/modules/provider/general.mjs +130 -0
  54. package/dist/modules/provider/general.mjs.map +7 -0
  55. package/dist/modules/provider/index.d.mts +3 -0
  56. package/dist/modules/provider/index.mjs +13 -0
  57. package/dist/modules/provider/index.mjs.map +7 -0
  58. package/dist/modules/sandboxes/access.d.mts +34 -0
  59. package/dist/modules/sandboxes/access.mjs +15 -0
  60. package/dist/modules/sandboxes/access.mjs.map +7 -0
  61. package/dist/modules/sandboxes/computer.d.mts +24 -51
  62. package/dist/modules/sandboxes/computer.mjs +523 -888
  63. package/dist/modules/sandboxes/computer.mjs.map +3 -3
  64. package/dist/modules/sandboxes/computers-api.d.mts +3 -2
  65. package/dist/modules/sandboxes/computers-api.mjs +2 -4
  66. package/dist/modules/sandboxes/computers-api.mjs.map +2 -2
  67. package/dist/modules/sandboxes/device-api.d.mts +4 -3
  68. package/dist/modules/sandboxes/device-api.mjs +2 -4
  69. package/dist/modules/sandboxes/device-api.mjs.map +2 -2
  70. package/dist/modules/sandboxes/device.d.mts +6 -6
  71. package/dist/modules/sandboxes/device.mjs +126 -121
  72. package/dist/modules/sandboxes/device.mjs.map +3 -3
  73. package/dist/modules/sandboxes/egress.d.mts +10 -9
  74. package/dist/modules/sandboxes/egress.mjs +73 -56
  75. package/dist/modules/sandboxes/egress.mjs.map +2 -2
  76. package/dist/modules/sandboxes/environment.d.mts +35 -269
  77. package/dist/modules/sandboxes/environment.mjs +27 -104
  78. package/dist/modules/sandboxes/environment.mjs.map +3 -3
  79. package/dist/modules/sandboxes/index.d.mts +9 -69
  80. package/dist/modules/sandboxes/index.mjs +35 -95
  81. package/dist/modules/sandboxes/index.mjs.map +3 -3
  82. package/dist/modules/sandboxes/local.d.mts +28 -0
  83. package/dist/modules/sandboxes/local.mjs +499 -0
  84. package/dist/modules/sandboxes/local.mjs.map +7 -0
  85. package/dist/modules/sandboxes/session.d.mts +0 -3
  86. package/dist/modules/sandboxes/session.mjs +2 -22
  87. package/dist/modules/sandboxes/session.mjs.map +2 -2
  88. package/dist/modules/sandboxes/testing/fake-machine.mjs +0 -28
  89. package/dist/modules/sandboxes/testing/fake-machine.mjs.map +2 -2
  90. package/package.json +76 -104
  91. package/dist/modules/connections.d.mts +0 -11
  92. package/dist/modules/connections.mjs +0 -16
  93. package/dist/modules/connections.mjs.map +0 -7
  94. package/dist/modules/harnesses/acp-describe.d.mts +0 -20
  95. package/dist/modules/harnesses/acp-describe.mjs +0 -110
  96. package/dist/modules/harnesses/acp-describe.mjs.map +0 -7
  97. package/dist/modules/harnesses/local-stdio.d.mts +0 -47
  98. package/dist/modules/harnesses/local-stdio.mjs +0 -41
  99. package/dist/modules/harnesses/local-stdio.mjs.map +0 -7
  100. package/dist/modules/harnesses/remote-acp.d.mts +0 -76
  101. package/dist/modules/harnesses/remote-acp.mjs +0 -83
  102. package/dist/modules/harnesses/remote-acp.mjs.map +0 -7
  103. package/dist/modules/harnesses/remote-claude-code.d.mts +0 -88
  104. package/dist/modules/harnesses/remote-claude-code.mjs +0 -113
  105. package/dist/modules/harnesses/remote-claude-code.mjs.map +0 -7
  106. package/dist/modules/harnesses/remote-client-tls.d.mts +0 -35
  107. package/dist/modules/harnesses/remote-client-tls.mjs +0 -37
  108. package/dist/modules/harnesses/remote-client-tls.mjs.map +0 -7
  109. package/dist/modules/harnesses/remote-codex.d.mts +0 -98
  110. package/dist/modules/harnesses/remote-codex.mjs +0 -128
  111. package/dist/modules/harnesses/remote-codex.mjs.map +0 -7
  112. package/dist/modules/harnesses/remote-pi.d.mts +0 -78
  113. package/dist/modules/harnesses/remote-pi.mjs +0 -104
  114. package/dist/modules/harnesses/remote-pi.mjs.map +0 -7
  115. package/dist/modules/harnesses/remote-url.d.mts +0 -5
  116. package/dist/modules/harnesses/remote-url.mjs +0 -19
  117. package/dist/modules/harnesses/remote-url.mjs.map +0 -7
  118. package/dist/modules/harnesses/serverless-final.d.mts +0 -63
  119. package/dist/modules/harnesses/serverless-final.mjs +0 -88
  120. package/dist/modules/harnesses/serverless-final.mjs.map +0 -7
  121. package/dist/modules/harnesses/serverless-nanocode-claude.d.mts +0 -64
  122. package/dist/modules/harnesses/serverless-nanocode-claude.mjs +0 -105
  123. package/dist/modules/harnesses/serverless-nanocode-claude.mjs.map +0 -7
  124. package/dist/modules/harnesses/serverless-nanocode-codex.d.mts +0 -66
  125. package/dist/modules/harnesses/serverless-nanocode-codex.mjs +0 -113
  126. package/dist/modules/harnesses/serverless-nanocode-codex.mjs.map +0 -7
  127. package/dist/modules/harnesses/serverless-pi.d.mts +0 -64
  128. package/dist/modules/harnesses/serverless-pi.mjs +0 -98
  129. package/dist/modules/harnesses/serverless-pi.mjs.map +0 -7
  130. package/dist/modules/runtime/index.d.mts +0 -7
  131. package/dist/modules/runtime/index.mjs +0 -18
  132. package/dist/modules/runtime/index.mjs.map +0 -7
  133. package/dist/modules/runtime/local-stdio.d.mts +0 -10
  134. package/dist/modules/runtime/local-stdio.mjs +0 -106
  135. package/dist/modules/runtime/local-stdio.mjs.map +0 -7
  136. package/dist/modules/runtime/remote-acp.d.mts +0 -16
  137. package/dist/modules/runtime/remote-acp.mjs +0 -152
  138. package/dist/modules/runtime/remote-acp.mjs.map +0 -7
  139. package/dist/modules/runtime/remote-claude-code.d.mts +0 -5
  140. package/dist/modules/runtime/remote-claude-code.mjs +0 -47
  141. package/dist/modules/runtime/remote-claude-code.mjs.map +0 -7
  142. package/dist/modules/runtime/remote-codex.d.mts +0 -5
  143. package/dist/modules/runtime/remote-codex.mjs +0 -47
  144. package/dist/modules/runtime/remote-codex.mjs.map +0 -7
  145. package/dist/modules/runtime/remote-host.d.mts +0 -127
  146. package/dist/modules/runtime/remote-host.mjs +0 -387
  147. package/dist/modules/runtime/remote-host.mjs.map +0 -7
  148. package/dist/modules/runtime/remote-pi.d.mts +0 -5
  149. package/dist/modules/runtime/remote-pi.mjs +0 -44
  150. package/dist/modules/runtime/remote-pi.mjs.map +0 -7
  151. package/dist/modules/sandboxes/guide.d.mts +0 -35
  152. package/dist/modules/sandboxes/guide.mjs +0 -119
  153. package/dist/modules/sandboxes/guide.mjs.map +0 -7
  154. package/dist/modules/sandboxes/workspace-setup.d.mts +0 -42
  155. package/dist/modules/sandboxes/workspace-setup.mjs +0 -242
  156. package/dist/modules/sandboxes/workspace-setup.mjs.map +0 -7
  157. package/dist/modules/testing/harness.d.mts +0 -9
  158. package/dist/modules/testing/harness.mjs +0 -123
  159. package/dist/modules/testing/harness.mjs.map +0 -7
@@ -1,110 +0,0 @@
1
- import {
2
- client,
3
- methods,
4
- PROTOCOL_VERSION
5
- } from "@agentclientprotocol/sdk/experimental/v2";
6
- import {
7
- advertisedFinalExtensions,
8
- AdvertisedSandboxWire,
9
- requireProtocolV2,
10
- watchInitializeVersion
11
- } from "@finalai/acp-session";
12
- import {
13
- CredentialDelivery,
14
- DEFAULT_PROMPT_WHILE_RUNNING,
15
- DEFAULT_SESSION_SURVIVES_DISCONNECT,
16
- InferenceCredentialKind,
17
- McpTransportKind,
18
- SandboxWire
19
- } from "@finalai/agent-provider";
20
- const sandboxWireOf = {
21
- [AdvertisedSandboxWire.HandleRpc]: SandboxWire.HandleRpc,
22
- [AdvertisedSandboxWire.Mcp]: SandboxWire.Mcp
23
- };
24
- const FINAL_CLIENT_INFO = { name: "final-agent-sdk", version: "1.0.0" };
25
- const DEFAULT_CONNECT_TIMEOUT_MS = 1e4;
26
- const describeFromInitialize = (args) => {
27
- const session = args.response.capabilities?.session;
28
- const mcpCapabilities = session?.mcp;
29
- const mcp = [];
30
- if (mcpCapabilities?.acp != null) mcp.push(McpTransportKind.Acp);
31
- if (mcpCapabilities?.http != null) mcp.push(McpTransportKind.Http);
32
- if (mcpCapabilities?.stdio != null) mcp.push(McpTransportKind.Stdio);
33
- const supports = advertisedFinalExtensions(args.response);
34
- return {
35
- configSchema: args.configSchema,
36
- acp: { transports: args.transports, mcp },
37
- // Native tools of an unknown program are its own business; bound targets
38
- // reach it only as the sandbox MCP projection.
39
- baseTools: {},
40
- consumes: supports.consumes == null ? mcp.length > 0 ? [SandboxWire.Mcp] : [] : (
41
- // The projection is an MCP server: it needs an MCP transport to arrive.
42
- [...new Set(supports.consumes.map((wire) => sandboxWireOf[wire]))].filter(
43
- (wire) => wire !== SandboxWire.Mcp || mcp.length > 0
44
- )
45
- ),
46
- inference: {
47
- vendors: [],
48
- kinds: [InferenceCredentialKind.HarnessOwned],
49
- delivery: CredentialDelivery.AtOpen
50
- },
51
- supports: {
52
- observe: supports.observe,
53
- // session/resume with replayFrom is base ACP v2; an agent can opt out through _meta.
54
- resumeReplay: supports.resumeReplay ?? true,
55
- fork: session?.fork != null,
56
- authorMeta: supports.authorMeta
57
- },
58
- // Nothing in a plain ACP v2 `initialize` declares these; assume the
59
- // conservative profile.
60
- promptWhileRunning: DEFAULT_PROMPT_WHILE_RUNNING,
61
- sessionSurvivesDisconnect: DEFAULT_SESSION_SURVIVES_DISCONNECT
62
- };
63
- };
64
- const unprobedDescription = (args) => ({
65
- configSchema: args.configSchema,
66
- acp: { transports: args.transports, mcp: [] },
67
- baseTools: {},
68
- consumes: [],
69
- inference: {
70
- vendors: [],
71
- kinds: [InferenceCredentialKind.HarnessOwned],
72
- delivery: CredentialDelivery.AtOpen
73
- },
74
- supports: { observe: false, resumeReplay: false, fork: false, authorMeta: false },
75
- promptWhileRunning: DEFAULT_PROMPT_WHILE_RUNNING,
76
- sessionSurvivesDisconnect: DEFAULT_SESSION_SURVIVES_DISCONNECT
77
- });
78
- const initializeOver = async (args) => {
79
- const watch = watchInitializeVersion(args.stream);
80
- const connection = client().connect(watch.stream);
81
- const timeout = Promise.withResolvers();
82
- const timer = setTimeout(
83
- () => timeout.reject(new Error(`initialize did not complete within ${args.timeoutMs} ms`)),
84
- args.timeoutMs
85
- );
86
- try {
87
- return await Promise.race([
88
- requireProtocolV2({
89
- watch,
90
- initialize: connection.agent.request(methods.agent.initialize, {
91
- protocolVersion: PROTOCOL_VERSION,
92
- info: FINAL_CLIENT_INFO,
93
- capabilities: {}
94
- })
95
- }),
96
- timeout.promise
97
- ]);
98
- } finally {
99
- clearTimeout(timer);
100
- connection.close();
101
- }
102
- };
103
- export {
104
- DEFAULT_CONNECT_TIMEOUT_MS,
105
- FINAL_CLIENT_INFO,
106
- describeFromInitialize,
107
- initializeOver,
108
- unprobedDescription
109
- };
110
- //# sourceMappingURL=acp-describe.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../src/harnesses/acp-describe.ts"],
4
- "sourcesContent": ["import {\n client,\n methods,\n PROTOCOL_VERSION,\n type InitializeResponse,\n type Stream,\n} from '@agentclientprotocol/sdk/experimental/v2';\nimport {\n advertisedFinalExtensions,\n AdvertisedSandboxWire,\n requireProtocolV2,\n watchInitializeVersion,\n} from '@finalai/acp-session';\nimport {\n CredentialDelivery,\n DEFAULT_PROMPT_WHILE_RUNNING,\n DEFAULT_SESSION_SURVIVES_DISCONNECT,\n InferenceCredentialKind,\n McpTransportKind,\n SandboxWire,\n type AcpTransport,\n type HarnessDescriptionIface,\n type JsonSchema,\n} from '@finalai/agent-provider';\n\n// Describes an arbitrary ACP v2 agent from its `initialize` response: MCP\n// transports from `capabilities.session.mcp`, fork from\n// `capabilities.session.fork`, and Final's optional extensions from\n// `_meta[\"final.ai\"].supports`. A plain agent with no Final extension still\n// gets a complete description (\"a harness that implements no Final\n// extension works completely\"). The sandbox wires are `_meta[\"final.ai\"].consumes`\n// when the agent declares them, else the MCP projection whenever it takes MCP\n// servers.\n\nconst sandboxWireOf = {\n [AdvertisedSandboxWire.HandleRpc]: SandboxWire.HandleRpc,\n [AdvertisedSandboxWire.Mcp]: SandboxWire.Mcp,\n} satisfies Record<AdvertisedSandboxWire, SandboxWire>;\n\nexport const FINAL_CLIENT_INFO = { name: 'final-agent-sdk', version: '1.0.0' };\nexport const DEFAULT_CONNECT_TIMEOUT_MS = 10_000;\n\nexport const describeFromInitialize = (args: {\n response: InitializeResponse;\n transports: AcpTransport[];\n configSchema: JsonSchema;\n}): HarnessDescriptionIface => {\n const session = args.response.capabilities?.session;\n const mcpCapabilities = session?.mcp;\n const mcp: McpTransportKind[] = [];\n if (mcpCapabilities?.acp != null) mcp.push(McpTransportKind.Acp);\n if (mcpCapabilities?.http != null) mcp.push(McpTransportKind.Http);\n if (mcpCapabilities?.stdio != null) mcp.push(McpTransportKind.Stdio);\n const supports = advertisedFinalExtensions(args.response);\n return {\n configSchema: args.configSchema,\n acp: { transports: args.transports, mcp },\n // Native tools of an unknown program are its own business; bound targets\n // reach it only as the sandbox MCP projection.\n baseTools: {},\n consumes:\n supports.consumes == null\n ? mcp.length > 0\n ? [SandboxWire.Mcp]\n : []\n : // The projection is an MCP server: it needs an MCP transport to arrive.\n [...new Set(supports.consumes.map((wire) => sandboxWireOf[wire]))].filter(\n (wire) => wire !== SandboxWire.Mcp || mcp.length > 0,\n ),\n inference: {\n vendors: [],\n kinds: [InferenceCredentialKind.HarnessOwned],\n delivery: CredentialDelivery.AtOpen,\n },\n supports: {\n observe: supports.observe,\n // session/resume with replayFrom is base ACP v2; an agent can opt out through _meta.\n resumeReplay: supports.resumeReplay ?? true,\n fork: session?.fork != null,\n authorMeta: supports.authorMeta,\n },\n // Nothing in a plain ACP v2 `initialize` declares these; assume the\n // conservative profile.\n promptWhileRunning: DEFAULT_PROMPT_WHILE_RUNNING,\n sessionSurvivesDisconnect: DEFAULT_SESSION_SURVIVES_DISCONNECT,\n };\n};\n\n// Static description used before the remote has been reached (Build's config\n// form): nothing about the remote is known yet.\nexport const unprobedDescription = (args: {\n transports: AcpTransport[];\n configSchema: JsonSchema;\n}): HarnessDescriptionIface => ({\n configSchema: args.configSchema,\n acp: { transports: args.transports, mcp: [] },\n baseTools: {},\n consumes: [],\n inference: {\n vendors: [],\n kinds: [InferenceCredentialKind.HarnessOwned],\n delivery: CredentialDelivery.AtOpen,\n },\n supports: { observe: false, resumeReplay: false, fork: false, authorMeta: false },\n promptWhileRunning: DEFAULT_PROMPT_WHILE_RUNNING,\n sessionSurvivesDisconnect: DEFAULT_SESSION_SURVIVES_DISCONNECT,\n});\n\n// Runs `initialize` over a fresh stream and closes the connection. Any reply\n// but ACP v2 is `unsupported_protocol_version`: nothing in the plane\n// negotiates or converts v1.\nexport const initializeOver = async (args: {\n stream: Stream;\n timeoutMs: number;\n}): Promise<InitializeResponse> => {\n const watch = watchInitializeVersion(args.stream);\n const connection = client().connect(watch.stream);\n const timeout = Promise.withResolvers<never>();\n const timer = setTimeout(\n () => timeout.reject(new Error(`initialize did not complete within ${args.timeoutMs} ms`)),\n args.timeoutMs,\n );\n try {\n return await Promise.race([\n requireProtocolV2({\n watch,\n initialize: connection.agent.request(methods.agent.initialize, {\n protocolVersion: PROTOCOL_VERSION,\n info: FINAL_CLIENT_INFO,\n capabilities: {},\n }),\n }),\n timeout.promise,\n ]);\n } finally {\n clearTimeout(timer);\n connection.close();\n }\n};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,EACnB;AACF;",
6
- "names": []
7
- }
@@ -1,47 +0,0 @@
1
- import { type HarnessDescriptionIface, type JsonSchema } from '@finalai/agent-provider';
2
- import * as z from 'zod';
3
- import { type CredentialsInput, type HarnessBindingOutputIface } from "./config-fields.mjs";
4
- export declare const SPECIFIER = "@finalai/final-agent-provider/harnesses/local-stdio";
5
- export declare const localStdioConfigSchema: z.ZodObject<{
6
- credentials: z.ZodObject<{
7
- payer: z.ZodEnum<typeof import("@finalai/agent-provider").CredentialPayer>;
8
- tryInOrder: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
9
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.Subscription>;
10
- owner: z.ZodEnum<typeof import("@finalai/agent-provider").CredentialOwner>;
11
- vendor: z.ZodOptional<z.ZodString>;
12
- pin: z.ZodOptional<z.ZodString>;
13
- }, z.core.$strip>, z.ZodObject<{
14
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.ApiKey>;
15
- secret: z.ZodString;
16
- baseUrl: z.ZodOptional<z.ZodString>;
17
- vendor: z.ZodOptional<z.ZodString>;
18
- }, z.core.$strip>, z.ZodObject<{
19
- pin: z.ZodOptional<z.ZodString>;
20
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.ApiKey>;
21
- owner: z.ZodEnum<typeof import("@finalai/agent-provider").CredentialOwner>;
22
- vendor: z.ZodOptional<z.ZodString>;
23
- }, z.core.$strip>, z.ZodObject<{
24
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.Platform>;
25
- budget: z.ZodOptional<z.ZodString>;
26
- }, z.core.$strip>, z.ZodObject<{
27
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.HarnessOwned>;
28
- }, z.core.$strip>, z.ZodObject<{
29
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.Custom>;
30
- resolver: z.ZodString;
31
- events: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof import("@finalai/agent-provider").DynamicEvent>>>;
32
- }, z.core.$strip>]>>;
33
- }, z.core.$strip>;
34
- command: z.ZodString;
35
- args: z.ZodDefault<z.ZodArray<z.ZodString>>;
36
- env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
37
- }, z.core.$strict>;
38
- export type LocalStdioConfigIface = z.output<typeof localStdioConfigSchema>;
39
- export declare const LOCAL_STDIO_CONFIG_JSON_SCHEMA: JsonSchema;
40
- export declare const LOCAL_STDIO_DESCRIPTION: HarnessDescriptionIface;
41
- export interface LocalStdioConfigInputIface {
42
- credentials: CredentialsInput;
43
- command: string;
44
- args?: string[];
45
- env?: Record<string, string>;
46
- }
47
- export declare const localStdio: (config: LocalStdioConfigInputIface) => HarnessBindingOutputIface;
@@ -1,41 +0,0 @@
1
- import {
2
- AcpTransport
3
- } from "@finalai/agent-provider";
4
- import * as z from "zod";
5
- import { unprobedDescription } from "./acp-describe.mjs";
6
- import {
7
- configObjectJson,
8
- credentialsJson,
9
- credentialsZod,
10
- harnessBinding
11
- } from "./config-fields.mjs";
12
- const SPECIFIER = "@finalai/final-agent-provider/harnesses/local-stdio";
13
- const localStdioConfigSchema = z.strictObject({
14
- credentials: credentialsZod(),
15
- command: z.string().min(1),
16
- args: z.array(z.string()).default([]),
17
- env: z.record(z.string(), z.string()).default({})
18
- });
19
- const LOCAL_STDIO_CONFIG_JSON_SCHEMA = configObjectJson({
20
- title: "Local stdio agent",
21
- required: ["command", "credentials"],
22
- properties: {
23
- credentials: credentialsJson(),
24
- command: { type: "string", title: "Command", minLength: 1 },
25
- args: { type: "array", title: "Arguments", items: { type: "string" } },
26
- env: { type: "object", title: "Environment", additionalProperties: { type: "string" } }
27
- }
28
- });
29
- const LOCAL_STDIO_DESCRIPTION = unprobedDescription({
30
- transports: [AcpTransport.Stdio],
31
- configSchema: LOCAL_STDIO_CONFIG_JSON_SCHEMA
32
- });
33
- const localStdio = (config) => harnessBinding(SPECIFIER, config);
34
- export {
35
- LOCAL_STDIO_CONFIG_JSON_SCHEMA,
36
- LOCAL_STDIO_DESCRIPTION,
37
- SPECIFIER,
38
- localStdio,
39
- localStdioConfigSchema
40
- };
41
- //# sourceMappingURL=local-stdio.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../src/harnesses/local-stdio.ts"],
4
- "sourcesContent": ["import {\n AcpTransport,\n type HarnessDescriptionIface,\n type JsonSchema,\n} from '@finalai/agent-provider';\nimport * as z from 'zod';\nimport { unprobedDescription } from \"./acp-describe.mjs\";\nimport {\n configObjectJson,\n credentialsJson,\n credentialsZod,\n harnessBinding,\n type CredentialsInput,\n type HarnessBindingOutputIface,\n} from \"./config-fields.mjs\";\n\n// Any stdio ACP v2 agent, spawned by the session service. Development, CI and\n// conformance only; never enabled for an organization.\n\nexport const SPECIFIER = '@finalai/final-agent-provider/harnesses/local-stdio';\n\nexport const localStdioConfigSchema = z.strictObject({\n credentials: credentialsZod(),\n command: z.string().min(1),\n args: z.array(z.string()).default([]),\n env: z.record(z.string(), z.string()).default({}),\n});\n\nexport type LocalStdioConfigIface = z.output<typeof localStdioConfigSchema>;\n\nexport const LOCAL_STDIO_CONFIG_JSON_SCHEMA: JsonSchema = configObjectJson({\n title: 'Local stdio agent',\n required: ['command', 'credentials'],\n properties: {\n credentials: credentialsJson(),\n command: { type: 'string', title: 'Command', minLength: 1 },\n args: { type: 'array', title: 'Arguments', items: { type: 'string' } },\n env: { type: 'object', title: 'Environment', additionalProperties: { type: 'string' } },\n },\n});\n\nexport const LOCAL_STDIO_DESCRIPTION: HarnessDescriptionIface = unprobedDescription({\n transports: [AcpTransport.Stdio],\n configSchema: LOCAL_STDIO_CONFIG_JSON_SCHEMA,\n});\n\nexport interface LocalStdioConfigInputIface {\n credentials: CredentialsInput;\n command: string;\n args?: string[];\n env?: Record<string, string>;\n}\n\nexport const localStdio = (config: LocalStdioConfigInputIface): HarnessBindingOutputIface =>\n harnessBinding(SPECIFIER, config);\n"],
5
- "mappings": "AAAA;AAAA,EACE;AAAA,OAGK;AACP,YAAY,OAAO;AACnB,SAAS,2BAA2B;AACpC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAKA,MAAM,YAAY;AAElB,MAAM,yBAAyB,EAAE,aAAa;AAAA,EACnD,aAAa,eAAe;AAAA,EAC5B,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACzB,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC;AAAA,EACpC,KAAK,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC;AAClD,CAAC;AAIM,MAAM,iCAA6C,iBAAiB;AAAA,EACzE,OAAO;AAAA,EACP,UAAU,CAAC,WAAW,aAAa;AAAA,EACnC,YAAY;AAAA,IACV,aAAa,gBAAgB;AAAA,IAC7B,SAAS,EAAE,MAAM,UAAU,OAAO,WAAW,WAAW,EAAE;AAAA,IAC1D,MAAM,EAAE,MAAM,SAAS,OAAO,aAAa,OAAO,EAAE,MAAM,SAAS,EAAE;AAAA,IACrE,KAAK,EAAE,MAAM,UAAU,OAAO,eAAe,sBAAsB,EAAE,MAAM,SAAS,EAAE;AAAA,EACxF;AACF,CAAC;AAEM,MAAM,0BAAmD,oBAAoB;AAAA,EAClF,YAAY,CAAC,aAAa,KAAK;AAAA,EAC/B,cAAc;AAChB,CAAC;AASM,MAAM,aAAa,CAAC,WACzB,eAAe,WAAW,MAAM;",
6
- "names": []
7
- }
@@ -1,76 +0,0 @@
1
- import { PromptWhileRunning, type HarnessDescriptionIface, type JsonSchema } from '@finalai/agent-provider';
2
- import * as z from 'zod';
3
- import { type CredentialsInput, type HarnessBindingOutputIface, type SecretRefIface } from "./config-fields.mjs";
4
- import { type RemoteClientTlsInputIface } from "./remote-client-tls.mjs";
5
- export declare const SPECIFIER = "@finalai/final-agent-provider/harnesses/remote-acp";
6
- export declare enum HeaderValueKind {
7
- Literal = "literal",
8
- Secret = "secret"
9
- }
10
- export declare const remoteAcpConfigSchema: z.ZodObject<{
11
- url: z.ZodString;
12
- credentials: z.ZodObject<{
13
- payer: z.ZodEnum<typeof import("@finalai/agent-provider").CredentialPayer>;
14
- tryInOrder: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
15
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.Subscription>;
16
- owner: z.ZodEnum<typeof import("@finalai/agent-provider").CredentialOwner>;
17
- vendor: z.ZodOptional<z.ZodString>;
18
- pin: z.ZodOptional<z.ZodString>;
19
- }, z.core.$strip>, z.ZodObject<{
20
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.ApiKey>;
21
- secret: z.ZodString;
22
- baseUrl: z.ZodOptional<z.ZodString>;
23
- vendor: z.ZodOptional<z.ZodString>;
24
- }, z.core.$strip>, z.ZodObject<{
25
- pin: z.ZodOptional<z.ZodString>;
26
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.ApiKey>;
27
- owner: z.ZodEnum<typeof import("@finalai/agent-provider").CredentialOwner>;
28
- vendor: z.ZodOptional<z.ZodString>;
29
- }, z.core.$strip>, z.ZodObject<{
30
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.Platform>;
31
- budget: z.ZodOptional<z.ZodString>;
32
- }, z.core.$strip>, z.ZodObject<{
33
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.HarnessOwned>;
34
- }, z.core.$strip>, z.ZodObject<{
35
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.Custom>;
36
- resolver: z.ZodString;
37
- events: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof import("@finalai/agent-provider").DynamicEvent>>>;
38
- }, z.core.$strip>]>>;
39
- }, z.core.$strip>;
40
- promptWhileRunning: z.ZodOptional<z.ZodEnum<typeof PromptWhileRunning>>;
41
- tls: z.ZodOptional<z.ZodObject<{
42
- cert: z.ZodObject<{
43
- secretKey: z.ZodString;
44
- }, z.core.$strip>;
45
- key: z.ZodObject<{
46
- secretKey: z.ZodString;
47
- }, z.core.$strip>;
48
- ca: z.ZodOptional<z.ZodObject<{
49
- secretKey: z.ZodString;
50
- }, z.core.$strip>>;
51
- }, z.core.$strict>>;
52
- headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<{
53
- kind: HeaderValueKind.Literal;
54
- value: string;
55
- }, string>>, z.ZodPipe<z.ZodObject<{
56
- secretKey: z.ZodString;
57
- }, z.core.$strip>, z.ZodTransform<{
58
- kind: HeaderValueKind.Secret;
59
- ref: {
60
- secretKey: string;
61
- };
62
- }, {
63
- secretKey: string;
64
- }>>]>>>;
65
- }, z.core.$strict>;
66
- export type RemoteAcpConfigIface = z.output<typeof remoteAcpConfigSchema>;
67
- export declare const REMOTE_ACP_CONFIG_JSON_SCHEMA: JsonSchema;
68
- export declare const REMOTE_ACP_DESCRIPTION: HarnessDescriptionIface;
69
- export interface RemoteAcpConfigInputIface {
70
- credentials: CredentialsInput;
71
- url: string;
72
- promptWhileRunning?: `${PromptWhileRunning}`;
73
- tls?: RemoteClientTlsInputIface;
74
- headers?: Record<string, string | SecretRefIface>;
75
- }
76
- export declare const remoteAcp: (config: RemoteAcpConfigInputIface) => HarnessBindingOutputIface;
@@ -1,83 +0,0 @@
1
- import {
2
- AcpTransport,
3
- PromptWhileRunning
4
- } from "@finalai/agent-provider";
5
- import * as z from "zod";
6
- import { unprobedDescription } from "./acp-describe.mjs";
7
- import {
8
- configObjectJson,
9
- credentialsJson,
10
- credentialsZod,
11
- harnessBinding,
12
- secretRefZod
13
- } from "./config-fields.mjs";
14
- import {
15
- remoteClientTlsJson,
16
- remoteClientTlsSchema
17
- } from "./remote-client-tls.mjs";
18
- import { remoteUrlJson, remoteUrlZod } from "./remote-url.mjs";
19
- const SPECIFIER = "@finalai/final-agent-provider/harnesses/remote-acp";
20
- var HeaderValueKind = /* @__PURE__ */ ((HeaderValueKind2) => {
21
- HeaderValueKind2["Literal"] = "literal";
22
- HeaderValueKind2["Secret"] = "secret";
23
- return HeaderValueKind2;
24
- })(HeaderValueKind || {});
25
- const remoteAcpConfigSchema = z.strictObject({
26
- url: remoteUrlZod(),
27
- credentials: credentialsZod(),
28
- // Plain ACP does not advertise this behavior; the host author declares its measured profile.
29
- promptWhileRunning: z.nativeEnum(PromptWhileRunning).optional(),
30
- tls: remoteClientTlsSchema.optional(),
31
- // Literal values, or secret references resolved through the definition's bound secrets.
32
- headers: z.record(
33
- z.string().min(1),
34
- z.union([
35
- z.string().transform((value) => ({ kind: "literal" /* Literal */, value })),
36
- secretRefZod().transform((ref) => ({ kind: "secret" /* Secret */, ref }))
37
- ])
38
- ).default({})
39
- });
40
- const REMOTE_ACP_CONFIG_JSON_SCHEMA = configObjectJson({
41
- title: "ACP agent (URL)",
42
- required: ["url", "credentials"],
43
- properties: {
44
- url: remoteUrlJson("ACP URL"),
45
- credentials: credentialsJson(),
46
- promptWhileRunning: {
47
- type: "string",
48
- title: "Prompt behavior while running",
49
- description: "Measured host behavior; defaults to queue when omitted.",
50
- enum: Object.values(PromptWhileRunning)
51
- },
52
- tls: remoteClientTlsJson(),
53
- headers: {
54
- type: "object",
55
- title: "Headers",
56
- additionalProperties: {
57
- anyOf: [
58
- { type: "string" },
59
- {
60
- type: "object",
61
- required: ["secretKey"],
62
- additionalProperties: false,
63
- properties: { secretKey: { type: "string", minLength: 1 } }
64
- }
65
- ]
66
- }
67
- }
68
- }
69
- });
70
- const REMOTE_ACP_DESCRIPTION = unprobedDescription({
71
- transports: [AcpTransport.Ws, AcpTransport.Http],
72
- configSchema: REMOTE_ACP_CONFIG_JSON_SCHEMA
73
- });
74
- const remoteAcp = (config) => harnessBinding(SPECIFIER, config);
75
- export {
76
- HeaderValueKind,
77
- REMOTE_ACP_CONFIG_JSON_SCHEMA,
78
- REMOTE_ACP_DESCRIPTION,
79
- SPECIFIER,
80
- remoteAcp,
81
- remoteAcpConfigSchema
82
- };
83
- //# sourceMappingURL=remote-acp.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../src/harnesses/remote-acp.ts"],
4
- "sourcesContent": ["import {\n AcpTransport,\n PromptWhileRunning,\n type HarnessDescriptionIface,\n type JsonSchema,\n} from '@finalai/agent-provider';\nimport * as z from 'zod';\nimport { unprobedDescription } from \"./acp-describe.mjs\";\nimport {\n configObjectJson,\n credentialsJson,\n credentialsZod,\n harnessBinding,\n secretRefZod,\n type CredentialsInput,\n type HarnessBindingOutputIface,\n type SecretRefIface,\n} from \"./config-fields.mjs\";\nimport {\n remoteClientTlsJson,\n remoteClientTlsSchema,\n type RemoteClientTlsInputIface,\n} from \"./remote-client-tls.mjs\";\nimport { remoteUrlJson, remoteUrlZod } from \"./remote-url.mjs\";\n\n// Any ACP v2 agent at a URL. Its description comes from the remote's\n// `initialize`; inference is always harness-owned (the remote brings its own\n// model access and never receives a Final credential).\n\nexport const SPECIFIER = '@finalai/final-agent-provider/harnesses/remote-acp';\n\nexport enum HeaderValueKind {\n Literal = 'literal',\n Secret = 'secret',\n}\n\nexport const remoteAcpConfigSchema = z.strictObject({\n url: remoteUrlZod(),\n credentials: credentialsZod(),\n // Plain ACP does not advertise this behavior; the host author declares its measured profile.\n promptWhileRunning: z.nativeEnum(PromptWhileRunning).optional(),\n tls: remoteClientTlsSchema.optional(),\n // Literal values, or secret references resolved through the definition's bound secrets.\n headers: z\n .record(\n z.string().min(1),\n z.union([\n z.string().transform((value) => ({ kind: HeaderValueKind.Literal as const, value })),\n secretRefZod().transform((ref) => ({ kind: HeaderValueKind.Secret as const, ref })),\n ]),\n )\n .default({}),\n});\n\nexport type RemoteAcpConfigIface = z.output<typeof remoteAcpConfigSchema>;\n\nexport const REMOTE_ACP_CONFIG_JSON_SCHEMA: JsonSchema = configObjectJson({\n title: 'ACP agent (URL)',\n required: ['url', 'credentials'],\n properties: {\n url: remoteUrlJson('ACP URL'),\n credentials: credentialsJson(),\n promptWhileRunning: {\n type: 'string',\n title: 'Prompt behavior while running',\n description: 'Measured host behavior; defaults to queue when omitted.',\n enum: Object.values(PromptWhileRunning),\n },\n tls: remoteClientTlsJson(),\n headers: {\n type: 'object',\n title: 'Headers',\n additionalProperties: {\n anyOf: [\n { type: 'string' },\n {\n type: 'object',\n required: ['secretKey'],\n additionalProperties: false,\n properties: { secretKey: { type: 'string', minLength: 1 } },\n },\n ],\n },\n },\n },\n});\n\nexport const REMOTE_ACP_DESCRIPTION: HarnessDescriptionIface = unprobedDescription({\n transports: [AcpTransport.Ws, AcpTransport.Http],\n configSchema: REMOTE_ACP_CONFIG_JSON_SCHEMA,\n});\n\nexport interface RemoteAcpConfigInputIface {\n credentials: CredentialsInput;\n url: string;\n promptWhileRunning?: `${PromptWhileRunning}`;\n tls?: RemoteClientTlsInputIface;\n headers?: Record<string, string | SecretRefIface>;\n}\n\nexport const remoteAcp = (config: RemoteAcpConfigInputIface): HarnessBindingOutputIface =>\n harnessBinding(SPECIFIER, config);\n"],
5
- "mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,YAAY,OAAO;AACnB,SAAS,2BAA2B;AACpC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AACP,SAAS,eAAe,oBAAoB;AAMrC,MAAM,YAAY;AAElB,IAAK,kBAAL,kBAAKA,qBAAL;AACL,EAAAA,iBAAA,aAAU;AACV,EAAAA,iBAAA,YAAS;AAFC,SAAAA;AAAA,GAAA;AAKL,MAAM,wBAAwB,EAAE,aAAa;AAAA,EAClD,KAAK,aAAa;AAAA,EAClB,aAAa,eAAe;AAAA;AAAA,EAE5B,oBAAoB,EAAE,WAAW,kBAAkB,EAAE,SAAS;AAAA,EAC9D,KAAK,sBAAsB,SAAS;AAAA;AAAA,EAEpC,SAAS,EACN;AAAA,IACC,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,IAChB,EAAE,MAAM;AAAA,MACN,EAAE,OAAO,EAAE,UAAU,CAAC,WAAW,EAAE,MAAM,yBAAkC,MAAM,EAAE;AAAA,MACnF,aAAa,EAAE,UAAU,CAAC,SAAS,EAAE,MAAM,uBAAiC,IAAI,EAAE;AAAA,IACpF,CAAC;AAAA,EACH,EACC,QAAQ,CAAC,CAAC;AACf,CAAC;AAIM,MAAM,gCAA4C,iBAAiB;AAAA,EACxE,OAAO;AAAA,EACP,UAAU,CAAC,OAAO,aAAa;AAAA,EAC/B,YAAY;AAAA,IACV,KAAK,cAAc,SAAS;AAAA,IAC5B,aAAa,gBAAgB;AAAA,IAC7B,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,MACb,MAAM,OAAO,OAAO,kBAAkB;AAAA,IACxC;AAAA,IACA,KAAK,oBAAoB;AAAA,IACzB,SAAS;AAAA,MACP,MAAM;AAAA,MACN,OAAO;AAAA,MACP,sBAAsB;AAAA,QACpB,OAAO;AAAA,UACL,EAAE,MAAM,SAAS;AAAA,UACjB;AAAA,YACE,MAAM;AAAA,YACN,UAAU,CAAC,WAAW;AAAA,YACtB,sBAAsB;AAAA,YACtB,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,WAAW,EAAE,EAAE;AAAA,UAC5D;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF,CAAC;AAEM,MAAM,yBAAkD,oBAAoB;AAAA,EACjF,YAAY,CAAC,aAAa,IAAI,aAAa,IAAI;AAAA,EAC/C,cAAc;AAChB,CAAC;AAUM,MAAM,YAAY,CAAC,WACxB,eAAe,WAAW,MAAM;",
6
- "names": ["HeaderValueKind"]
7
- }
@@ -1,88 +0,0 @@
1
- import { type HarnessDescriptionIface, type JsonSchema } from '@finalai/agent-provider';
2
- import * as z from 'zod';
3
- import { ClaudePermissionMode, type CredentialsInput, type HarnessBindingOutputIface, type InstructionInput, type SecretRefIface } from "./config-fields.mjs";
4
- import { type RemoteClientTlsInputIface } from "./remote-client-tls.mjs";
5
- export declare const SPECIFIER = "@finalai/final-agent-provider/harnesses/remote-claude-code";
6
- export declare const remotePermissionModeSchema: z.ZodEnum<{
7
- readonly Default: ClaudePermissionMode.Default;
8
- readonly Plan: ClaudePermissionMode.Plan;
9
- readonly AcceptEdits: ClaudePermissionMode.AcceptEdits;
10
- readonly Bypass: ClaudePermissionMode.Bypass;
11
- }>;
12
- export type RemoteClaudePermissionMode = z.output<typeof remotePermissionModeSchema>;
13
- export declare const remoteClaudeCodeConfigSchema: z.ZodObject<{
14
- url: z.ZodString;
15
- tls: z.ZodOptional<z.ZodObject<{
16
- cert: z.ZodObject<{
17
- secretKey: z.ZodString;
18
- }, z.core.$strip>;
19
- key: z.ZodObject<{
20
- secretKey: z.ZodString;
21
- }, z.core.$strip>;
22
- ca: z.ZodOptional<z.ZodObject<{
23
- secretKey: z.ZodString;
24
- }, z.core.$strip>>;
25
- }, z.core.$strict>>;
26
- hop: z.ZodObject<{
27
- secretKey: z.ZodString;
28
- }, z.core.$strip>;
29
- cwd: z.ZodOptional<z.ZodString>;
30
- executable: z.ZodOptional<z.ZodString>;
31
- model: z.ZodOptional<z.ZodString>;
32
- credentials: z.ZodObject<{
33
- payer: z.ZodEnum<typeof import("@finalai/agent-provider").CredentialPayer>;
34
- tryInOrder: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
35
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.Subscription>;
36
- owner: z.ZodEnum<typeof import("@finalai/agent-provider").CredentialOwner>;
37
- vendor: z.ZodOptional<z.ZodString>;
38
- pin: z.ZodOptional<z.ZodString>;
39
- }, z.core.$strip>, z.ZodObject<{
40
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.ApiKey>;
41
- secret: z.ZodString;
42
- baseUrl: z.ZodOptional<z.ZodString>;
43
- vendor: z.ZodOptional<z.ZodString>;
44
- }, z.core.$strip>, z.ZodObject<{
45
- pin: z.ZodOptional<z.ZodString>;
46
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.ApiKey>;
47
- owner: z.ZodEnum<typeof import("@finalai/agent-provider").CredentialOwner>;
48
- vendor: z.ZodOptional<z.ZodString>;
49
- }, z.core.$strip>, z.ZodObject<{
50
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.Platform>;
51
- budget: z.ZodOptional<z.ZodString>;
52
- }, z.core.$strip>, z.ZodObject<{
53
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.HarnessOwned>;
54
- }, z.core.$strip>, z.ZodObject<{
55
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.Custom>;
56
- resolver: z.ZodString;
57
- events: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof import("@finalai/agent-provider").DynamicEvent>>>;
58
- }, z.core.$strip>]>>;
59
- }, z.core.$strip>;
60
- permissionMode: z.ZodOptional<z.ZodEnum<{
61
- readonly Default: ClaudePermissionMode.Default;
62
- readonly Plan: ClaudePermissionMode.Plan;
63
- readonly AcceptEdits: ClaudePermissionMode.AcceptEdits;
64
- readonly Bypass: ClaudePermissionMode.Bypass;
65
- }>>;
66
- instructions: z.ZodDefault<z.ZodArray<z.ZodObject<{
67
- role: z.ZodEnum<typeof import("@finalai/agent-provider").InstructionRole>;
68
- content: z.ZodString;
69
- source: z.ZodOptional<z.ZodString>;
70
- }, z.core.$strip>>>;
71
- allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
72
- }, z.core.$strict>;
73
- export type RemoteClaudeCodeConfigIface = z.output<typeof remoteClaudeCodeConfigSchema>;
74
- export declare const REMOTE_CLAUDE_CODE_CONFIG_JSON_SCHEMA: JsonSchema;
75
- export declare const REMOTE_CLAUDE_CODE_DESCRIPTION: HarnessDescriptionIface;
76
- export interface RemoteClaudeCodeConfigInputIface {
77
- url: string;
78
- tls?: RemoteClientTlsInputIface;
79
- hop: SecretRefIface;
80
- cwd?: string;
81
- executable?: string;
82
- model?: string;
83
- credentials: CredentialsInput;
84
- permissionMode?: RemoteClaudePermissionMode | `${RemoteClaudePermissionMode}`;
85
- instructions?: InstructionInput[];
86
- allowedTools?: string[];
87
- }
88
- export declare const remoteClaudeCode: (config: RemoteClaudeCodeConfigInputIface) => HarnessBindingOutputIface;
@@ -1,113 +0,0 @@
1
- import {
2
- AcpTransport,
3
- BaseCapability,
4
- BaseToolProvision,
5
- CredentialDelivery,
6
- InferenceCredentialKind,
7
- McpTransportKind,
8
- PromptWhileRunning,
9
- SandboxWire
10
- } from "@finalai/agent-provider";
11
- import * as z from "zod";
12
- import {
13
- absolutePathJson,
14
- absolutePathZod,
15
- ClaudePermissionMode,
16
- configObjectJson,
17
- credentialsJson,
18
- credentialsZod,
19
- harnessBinding,
20
- instructionsJson,
21
- instructionsZod,
22
- permissionModeJson,
23
- secretRefJson,
24
- secretRefZod
25
- } from "./config-fields.mjs";
26
- import { ModelVendor } from "./model-reference.mjs";
27
- import {
28
- remoteClientTlsJson,
29
- remoteClientTlsSchema
30
- } from "./remote-client-tls.mjs";
31
- import { remoteUrlJson, remoteUrlZod } from "./remote-url.mjs";
32
- const SPECIFIER = "@finalai/final-agent-provider/harnesses/remote-claude-code";
33
- const remotePermissionModeSchema = z.nativeEnum(ClaudePermissionMode).exclude(["Auto"]);
34
- const remoteClaudeCodeConfigSchema = z.strictObject({
35
- url: remoteUrlZod(),
36
- tls: remoteClientTlsSchema.optional(),
37
- hop: secretRefZod(),
38
- cwd: absolutePathZod().optional(),
39
- executable: z.string().min(1).optional(),
40
- model: z.string().min(1).optional(),
41
- credentials: credentialsZod(),
42
- permissionMode: remotePermissionModeSchema.optional(),
43
- instructions: instructionsZod(),
44
- allowedTools: z.array(z.string().min(1)).optional()
45
- });
46
- const REMOTE_CLAUDE_CODE_CONFIG_JSON_SCHEMA = configObjectJson({
47
- title: "Claude Code (your host)",
48
- required: ["credentials", "url", "hop"],
49
- properties: {
50
- url: remoteUrlJson("Runtime URL"),
51
- tls: remoteClientTlsJson(),
52
- hop: secretRefJson(),
53
- cwd: absolutePathJson("Working directory on your host"),
54
- executable: { type: "string", title: "Installed executable on your host" },
55
- model: { $ref: "final://schemas/model-picker" },
56
- credentials: {
57
- ...credentialsJson(),
58
- default: { payer: "agent-owner", tryInOrder: [{ kind: "harness-owned" }] }
59
- },
60
- permissionMode: permissionModeJson(Object.values(remotePermissionModeSchema.enum)),
61
- instructions: instructionsJson(),
62
- allowedTools: { type: "array", title: "Allowed tools", items: { type: "string" } }
63
- }
64
- });
65
- const REMOTE_CLAUDE_CODE_DESCRIPTION = {
66
- configSchema: REMOTE_CLAUDE_CODE_CONFIG_JSON_SCHEMA,
67
- acp: {
68
- transports: [AcpTransport.Ws, AcpTransport.Http],
69
- mcp: [McpTransportKind.Acp, McpTransportKind.Http, McpTransportKind.Stdio]
70
- },
71
- // Claude Code's own tools on your host, switched through its allow-lists.
72
- baseTools: {
73
- [BaseCapability.Shell]: {
74
- provision: BaseToolProvision.HostDisableable,
75
- nativeTools: ["Bash", "BashOutput", "KillShell"]
76
- },
77
- [BaseCapability.Files]: {
78
- provision: BaseToolProvision.HostDisableable,
79
- nativeTools: ["Read", "Write", "Edit", "Glob", "Grep", "NotebookEdit"]
80
- }
81
- },
82
- // Other bound targets reach it as the sandbox MCP projection.
83
- consumes: [SandboxWire.Mcp],
84
- inference: {
85
- vendors: [ModelVendor.Anthropic],
86
- kinds: [
87
- InferenceCredentialKind.HarnessOwned,
88
- InferenceCredentialKind.Subscription,
89
- InferenceCredentialKind.ApiKey,
90
- InferenceCredentialKind.Platform
91
- ],
92
- delivery: CredentialDelivery.AtOpen
93
- },
94
- supports: {
95
- observe: true,
96
- resumeReplay: true,
97
- fork: true,
98
- authorMeta: true,
99
- nativeToolPolicy: false
100
- },
101
- promptWhileRunning: PromptWhileRunning.Inject,
102
- sessionSurvivesDisconnect: true
103
- };
104
- const remoteClaudeCode = (config) => harnessBinding(SPECIFIER, config);
105
- export {
106
- REMOTE_CLAUDE_CODE_CONFIG_JSON_SCHEMA,
107
- REMOTE_CLAUDE_CODE_DESCRIPTION,
108
- SPECIFIER,
109
- remoteClaudeCode,
110
- remoteClaudeCodeConfigSchema,
111
- remotePermissionModeSchema
112
- };
113
- //# sourceMappingURL=remote-claude-code.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../src/harnesses/remote-claude-code.ts"],
4
- "sourcesContent": ["import {\n AcpTransport,\n BaseCapability,\n BaseToolProvision,\n CredentialDelivery,\n InferenceCredentialKind,\n McpTransportKind,\n PromptWhileRunning,\n SandboxWire,\n type HarnessDescriptionIface,\n type JsonSchema,\n} from '@finalai/agent-provider';\nimport * as z from 'zod';\nimport {\n absolutePathJson,\n absolutePathZod,\n ClaudePermissionMode,\n configObjectJson,\n credentialsJson,\n credentialsZod,\n harnessBinding,\n instructionsJson,\n instructionsZod,\n permissionModeJson,\n secretRefJson,\n secretRefZod,\n type CredentialsInput,\n type HarnessBindingOutputIface,\n type InstructionInput,\n type SecretRefIface,\n} from \"./config-fields.mjs\";\nimport { ModelVendor } from \"./model-reference.mjs\";\nimport {\n remoteClientTlsJson,\n remoteClientTlsSchema,\n type RemoteClientTlsInputIface,\n} from \"./remote-client-tls.mjs\";\nimport { remoteUrlJson, remoteUrlZod } from \"./remote-url.mjs\";\n\n// Claude Code (Agent SDK) behind the Final ACP adapter, served by\n// `final-harness serve --program claude-code` on a host you run.\n\nexport const SPECIFIER = '@finalai/final-agent-provider/harnesses/remote-claude-code';\n\n// Auto-review is the nanocode Claude engine's; the Claude Code CLI behind the adapter takes\n// the other modes.\nexport const remotePermissionModeSchema = z.nativeEnum(ClaudePermissionMode).exclude(['Auto']);\n\nexport type RemoteClaudePermissionMode = z.output<typeof remotePermissionModeSchema>;\n\nexport const remoteClaudeCodeConfigSchema = z.strictObject({\n url: remoteUrlZod(),\n tls: remoteClientTlsSchema.optional(),\n hop: secretRefZod(),\n cwd: absolutePathZod().optional(),\n executable: z.string().min(1).optional(),\n model: z.string().min(1).optional(),\n credentials: credentialsZod(),\n permissionMode: remotePermissionModeSchema.optional(),\n instructions: instructionsZod(),\n allowedTools: z.array(z.string().min(1)).optional(),\n});\n\nexport type RemoteClaudeCodeConfigIface = z.output<typeof remoteClaudeCodeConfigSchema>;\n\nexport const REMOTE_CLAUDE_CODE_CONFIG_JSON_SCHEMA: JsonSchema = configObjectJson({\n title: 'Claude Code (your host)',\n required: ['credentials', 'url', 'hop'],\n properties: {\n url: remoteUrlJson('Runtime URL'),\n tls: remoteClientTlsJson(),\n hop: secretRefJson(),\n cwd: absolutePathJson('Working directory on your host'),\n executable: { type: 'string', title: 'Installed executable on your host' },\n model: { $ref: 'final://schemas/model-picker' },\n credentials: {\n ...credentialsJson(),\n default: { payer: 'agent-owner', tryInOrder: [{ kind: 'harness-owned' }] },\n },\n permissionMode: permissionModeJson(Object.values(remotePermissionModeSchema.enum)),\n instructions: instructionsJson(),\n allowedTools: { type: 'array', title: 'Allowed tools', items: { type: 'string' } },\n },\n});\n\nexport const REMOTE_CLAUDE_CODE_DESCRIPTION: HarnessDescriptionIface = {\n configSchema: REMOTE_CLAUDE_CODE_CONFIG_JSON_SCHEMA,\n acp: {\n transports: [AcpTransport.Ws, AcpTransport.Http],\n mcp: [McpTransportKind.Acp, McpTransportKind.Http, McpTransportKind.Stdio],\n },\n // Claude Code's own tools on your host, switched through its allow-lists.\n baseTools: {\n [BaseCapability.Shell]: {\n provision: BaseToolProvision.HostDisableable,\n nativeTools: ['Bash', 'BashOutput', 'KillShell'],\n },\n [BaseCapability.Files]: {\n provision: BaseToolProvision.HostDisableable,\n nativeTools: ['Read', 'Write', 'Edit', 'Glob', 'Grep', 'NotebookEdit'],\n },\n },\n // Other bound targets reach it as the sandbox MCP projection.\n consumes: [SandboxWire.Mcp],\n inference: {\n vendors: [ModelVendor.Anthropic],\n kinds: [\n InferenceCredentialKind.HarnessOwned,\n InferenceCredentialKind.Subscription,\n InferenceCredentialKind.ApiKey,\n InferenceCredentialKind.Platform,\n ],\n delivery: CredentialDelivery.AtOpen,\n },\n supports: {\n observe: true,\n resumeReplay: true,\n fork: true,\n authorMeta: true,\n nativeToolPolicy: false,\n },\n promptWhileRunning: PromptWhileRunning.Inject,\n sessionSurvivesDisconnect: true,\n};\n\nexport interface RemoteClaudeCodeConfigInputIface {\n url: string;\n tls?: RemoteClientTlsInputIface;\n hop: SecretRefIface;\n cwd?: string;\n executable?: string;\n model?: string;\n credentials: CredentialsInput;\n permissionMode?: RemoteClaudePermissionMode | `${RemoteClaudePermissionMode}`;\n instructions?: InstructionInput[];\n allowedTools?: string[];\n}\n\nexport const remoteClaudeCode = (\n config: RemoteClaudeCodeConfigInputIface,\n): HarnessBindingOutputIface => harnessBinding(SPECIFIER, config);\n"],
5
- "mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,YAAY,OAAO;AACnB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AACP,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AACP,SAAS,eAAe,oBAAoB;AAKrC,MAAM,YAAY;AAIlB,MAAM,6BAA6B,EAAE,WAAW,oBAAoB,EAAE,QAAQ,CAAC,MAAM,CAAC;AAItF,MAAM,+BAA+B,EAAE,aAAa;AAAA,EACzD,KAAK,aAAa;AAAA,EAClB,KAAK,sBAAsB,SAAS;AAAA,EACpC,KAAK,aAAa;AAAA,EAClB,KAAK,gBAAgB,EAAE,SAAS;AAAA,EAChC,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS;AAAA,EACvC,OAAO,EAAE,O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