@finalai/final-agent-provider 0.10.0 → 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 (161) 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/channels/projection.mjs +15 -8
  8. package/dist/modules/channels/projection.mjs.map +2 -2
  9. package/dist/modules/harnesses/acp-agent.d.mts +4 -0
  10. package/dist/modules/harnesses/acp-agent.mjs +35 -0
  11. package/dist/modules/harnesses/acp-agent.mjs.map +7 -0
  12. package/dist/modules/harnesses/adapters.d.mts +7 -0
  13. package/dist/modules/harnesses/adapters.mjs +74 -0
  14. package/dist/modules/harnesses/adapters.mjs.map +7 -0
  15. package/dist/modules/harnesses/claude-code.d.mts +14 -0
  16. package/dist/modules/harnesses/claude-code.mjs +79 -0
  17. package/dist/modules/harnesses/claude-code.mjs.map +7 -0
  18. package/dist/modules/harnesses/codex.d.mts +12 -0
  19. package/dist/modules/harnesses/codex.mjs +90 -0
  20. package/dist/modules/harnesses/codex.mjs.map +7 -0
  21. package/dist/modules/harnesses/config-fields.d.mts +98 -57
  22. package/dist/modules/harnesses/config-fields.mjs +58 -35
  23. package/dist/modules/harnesses/config-fields.mjs.map +3 -3
  24. package/dist/modules/harnesses/definitions.d.mts +3 -0
  25. package/dist/modules/harnesses/definitions.mjs +21 -0
  26. package/dist/modules/harnesses/definitions.mjs.map +7 -0
  27. package/dist/modules/harnesses/fidelity.d.mts +1 -1
  28. package/dist/modules/harnesses/fidelity.mjs +19 -16
  29. package/dist/modules/harnesses/fidelity.mjs.map +2 -2
  30. package/dist/modules/harnesses/final.d.mts +12 -0
  31. package/dist/modules/harnesses/final.mjs +70 -0
  32. package/dist/modules/harnesses/final.mjs.map +7 -0
  33. package/dist/modules/harnesses/index.d.mts +13 -12
  34. package/dist/modules/harnesses/index.mjs +86 -45
  35. package/dist/modules/harnesses/index.mjs.map +3 -3
  36. package/dist/modules/harnesses/names.d.mts +43 -0
  37. package/dist/modules/harnesses/names.mjs +59 -0
  38. package/dist/modules/harnesses/names.mjs.map +7 -0
  39. package/dist/modules/harnesses/nanocode-claude.d.mts +18 -0
  40. package/dist/modules/harnesses/nanocode-claude.mjs +101 -0
  41. package/dist/modules/harnesses/nanocode-claude.mjs.map +7 -0
  42. package/dist/modules/harnesses/nanocode-codex.d.mts +13 -0
  43. package/dist/modules/harnesses/nanocode-codex.mjs +64 -0
  44. package/dist/modules/harnesses/nanocode-codex.mjs.map +7 -0
  45. package/dist/modules/harnesses/pi.d.mts +12 -0
  46. package/dist/modules/harnesses/pi.mjs +71 -0
  47. package/dist/modules/harnesses/pi.mjs.map +7 -0
  48. package/dist/modules/integrations.d.mts +9 -0
  49. package/dist/modules/integrations.mjs +29 -0
  50. package/dist/modules/integrations.mjs.map +7 -0
  51. package/dist/modules/provider/general.bundle.d.mts +1 -0
  52. package/dist/modules/provider/general.bundle.mjs +5 -0
  53. package/dist/modules/provider/general.bundle.mjs.map +7 -0
  54. package/dist/modules/provider/general.d.mts +11 -0
  55. package/dist/modules/provider/general.mjs +130 -0
  56. package/dist/modules/provider/general.mjs.map +7 -0
  57. package/dist/modules/provider/index.d.mts +3 -0
  58. package/dist/modules/provider/index.mjs +13 -0
  59. package/dist/modules/provider/index.mjs.map +7 -0
  60. package/dist/modules/sandboxes/access.d.mts +34 -0
  61. package/dist/modules/sandboxes/access.mjs +15 -0
  62. package/dist/modules/sandboxes/access.mjs.map +7 -0
  63. package/dist/modules/sandboxes/computer.d.mts +24 -51
  64. package/dist/modules/sandboxes/computer.mjs +523 -888
  65. package/dist/modules/sandboxes/computer.mjs.map +3 -3
  66. package/dist/modules/sandboxes/computers-api.d.mts +3 -2
  67. package/dist/modules/sandboxes/computers-api.mjs +2 -4
  68. package/dist/modules/sandboxes/computers-api.mjs.map +2 -2
  69. package/dist/modules/sandboxes/device-api.d.mts +4 -3
  70. package/dist/modules/sandboxes/device-api.mjs +2 -4
  71. package/dist/modules/sandboxes/device-api.mjs.map +2 -2
  72. package/dist/modules/sandboxes/device.d.mts +6 -6
  73. package/dist/modules/sandboxes/device.mjs +126 -121
  74. package/dist/modules/sandboxes/device.mjs.map +3 -3
  75. package/dist/modules/sandboxes/egress.d.mts +10 -9
  76. package/dist/modules/sandboxes/egress.mjs +73 -56
  77. package/dist/modules/sandboxes/egress.mjs.map +2 -2
  78. package/dist/modules/sandboxes/environment.d.mts +35 -269
  79. package/dist/modules/sandboxes/environment.mjs +27 -104
  80. package/dist/modules/sandboxes/environment.mjs.map +3 -3
  81. package/dist/modules/sandboxes/index.d.mts +9 -69
  82. package/dist/modules/sandboxes/index.mjs +35 -95
  83. package/dist/modules/sandboxes/index.mjs.map +3 -3
  84. package/dist/modules/sandboxes/local.d.mts +28 -0
  85. package/dist/modules/sandboxes/local.mjs +499 -0
  86. package/dist/modules/sandboxes/local.mjs.map +7 -0
  87. package/dist/modules/sandboxes/session.d.mts +0 -3
  88. package/dist/modules/sandboxes/session.mjs +2 -22
  89. package/dist/modules/sandboxes/session.mjs.map +2 -2
  90. package/dist/modules/sandboxes/testing/fake-machine.mjs +0 -28
  91. package/dist/modules/sandboxes/testing/fake-machine.mjs.map +2 -2
  92. package/package.json +76 -104
  93. package/dist/modules/connections.d.mts +0 -11
  94. package/dist/modules/connections.mjs +0 -16
  95. package/dist/modules/connections.mjs.map +0 -7
  96. package/dist/modules/harnesses/acp-describe.d.mts +0 -20
  97. package/dist/modules/harnesses/acp-describe.mjs +0 -110
  98. package/dist/modules/harnesses/acp-describe.mjs.map +0 -7
  99. package/dist/modules/harnesses/local-stdio.d.mts +0 -47
  100. package/dist/modules/harnesses/local-stdio.mjs +0 -41
  101. package/dist/modules/harnesses/local-stdio.mjs.map +0 -7
  102. package/dist/modules/harnesses/remote-acp.d.mts +0 -76
  103. package/dist/modules/harnesses/remote-acp.mjs +0 -83
  104. package/dist/modules/harnesses/remote-acp.mjs.map +0 -7
  105. package/dist/modules/harnesses/remote-claude-code.d.mts +0 -88
  106. package/dist/modules/harnesses/remote-claude-code.mjs +0 -113
  107. package/dist/modules/harnesses/remote-claude-code.mjs.map +0 -7
  108. package/dist/modules/harnesses/remote-client-tls.d.mts +0 -35
  109. package/dist/modules/harnesses/remote-client-tls.mjs +0 -37
  110. package/dist/modules/harnesses/remote-client-tls.mjs.map +0 -7
  111. package/dist/modules/harnesses/remote-codex.d.mts +0 -98
  112. package/dist/modules/harnesses/remote-codex.mjs +0 -128
  113. package/dist/modules/harnesses/remote-codex.mjs.map +0 -7
  114. package/dist/modules/harnesses/remote-pi.d.mts +0 -78
  115. package/dist/modules/harnesses/remote-pi.mjs +0 -104
  116. package/dist/modules/harnesses/remote-pi.mjs.map +0 -7
  117. package/dist/modules/harnesses/remote-url.d.mts +0 -5
  118. package/dist/modules/harnesses/remote-url.mjs +0 -19
  119. package/dist/modules/harnesses/remote-url.mjs.map +0 -7
  120. package/dist/modules/harnesses/serverless-final.d.mts +0 -63
  121. package/dist/modules/harnesses/serverless-final.mjs +0 -88
  122. package/dist/modules/harnesses/serverless-final.mjs.map +0 -7
  123. package/dist/modules/harnesses/serverless-nanocode-claude.d.mts +0 -64
  124. package/dist/modules/harnesses/serverless-nanocode-claude.mjs +0 -105
  125. package/dist/modules/harnesses/serverless-nanocode-claude.mjs.map +0 -7
  126. package/dist/modules/harnesses/serverless-nanocode-codex.d.mts +0 -66
  127. package/dist/modules/harnesses/serverless-nanocode-codex.mjs +0 -113
  128. package/dist/modules/harnesses/serverless-nanocode-codex.mjs.map +0 -7
  129. package/dist/modules/harnesses/serverless-pi.d.mts +0 -64
  130. package/dist/modules/harnesses/serverless-pi.mjs +0 -98
  131. package/dist/modules/harnesses/serverless-pi.mjs.map +0 -7
  132. package/dist/modules/runtime/index.d.mts +0 -7
  133. package/dist/modules/runtime/index.mjs +0 -18
  134. package/dist/modules/runtime/index.mjs.map +0 -7
  135. package/dist/modules/runtime/local-stdio.d.mts +0 -10
  136. package/dist/modules/runtime/local-stdio.mjs +0 -106
  137. package/dist/modules/runtime/local-stdio.mjs.map +0 -7
  138. package/dist/modules/runtime/remote-acp.d.mts +0 -16
  139. package/dist/modules/runtime/remote-acp.mjs +0 -152
  140. package/dist/modules/runtime/remote-acp.mjs.map +0 -7
  141. package/dist/modules/runtime/remote-claude-code.d.mts +0 -5
  142. package/dist/modules/runtime/remote-claude-code.mjs +0 -47
  143. package/dist/modules/runtime/remote-claude-code.mjs.map +0 -7
  144. package/dist/modules/runtime/remote-codex.d.mts +0 -5
  145. package/dist/modules/runtime/remote-codex.mjs +0 -47
  146. package/dist/modules/runtime/remote-codex.mjs.map +0 -7
  147. package/dist/modules/runtime/remote-host.d.mts +0 -127
  148. package/dist/modules/runtime/remote-host.mjs +0 -387
  149. package/dist/modules/runtime/remote-host.mjs.map +0 -7
  150. package/dist/modules/runtime/remote-pi.d.mts +0 -5
  151. package/dist/modules/runtime/remote-pi.mjs +0 -44
  152. package/dist/modules/runtime/remote-pi.mjs.map +0 -7
  153. package/dist/modules/sandboxes/guide.d.mts +0 -35
  154. package/dist/modules/sandboxes/guide.mjs +0 -119
  155. package/dist/modules/sandboxes/guide.mjs.map +0 -7
  156. package/dist/modules/sandboxes/workspace-setup.d.mts +0 -42
  157. package/dist/modules/sandboxes/workspace-setup.mjs +0 -242
  158. package/dist/modules/sandboxes/workspace-setup.mjs.map +0 -7
  159. package/dist/modules/testing/harness.d.mts +0 -9
  160. package/dist/modules/testing/harness.mjs +0 -123
  161. package/dist/modules/testing/harness.mjs.map +0 -7
@@ -1,35 +0,0 @@
1
- import type { HarnessClientTlsIface, SecretReaderIface } from '@finalai/agent-provider';
2
- import * as z from 'zod';
3
- import { type SecretRefIface } from "./config-fields.mjs";
4
- export interface RemoteClientTlsInputIface {
5
- cert: SecretRefIface;
6
- key: SecretRefIface;
7
- ca?: SecretRefIface;
8
- }
9
- export declare const remoteClientTlsSchema: z.ZodObject<{
10
- cert: z.ZodObject<{
11
- secretKey: z.ZodString;
12
- }, z.core.$strip>;
13
- key: z.ZodObject<{
14
- secretKey: z.ZodString;
15
- }, z.core.$strip>;
16
- ca: z.ZodOptional<z.ZodObject<{
17
- secretKey: z.ZodString;
18
- }, z.core.$strip>>;
19
- }, z.core.$strict>;
20
- export declare const remoteClientTlsJson: () => {
21
- type: string;
22
- title: string;
23
- required: string[];
24
- additionalProperties: boolean;
25
- properties: {
26
- cert: import("@finalai/agent-provider").JsonObject;
27
- key: import("@finalai/agent-provider").JsonObject;
28
- ca: import("@finalai/agent-provider").JsonObject;
29
- };
30
- };
31
- export declare const resolveRemoteClientTls: (args: {
32
- config: RemoteClientTlsInputIface | null | undefined;
33
- secrets: SecretReaderIface;
34
- url: string;
35
- }) => Promise<HarnessClientTlsIface | undefined>;
@@ -1,37 +0,0 @@
1
- import * as z from "zod";
2
- import { secretRefJson, secretRefZod } from "./config-fields.mjs";
3
- const remoteClientTlsSchema = z.strictObject({
4
- cert: secretRefZod(),
5
- key: secretRefZod(),
6
- ca: secretRefZod().optional()
7
- });
8
- const remoteClientTlsJson = () => ({
9
- type: "object",
10
- title: "Client TLS",
11
- required: ["cert", "key"],
12
- additionalProperties: false,
13
- properties: { cert: secretRefJson(), key: secretRefJson(), ca: secretRefJson() }
14
- });
15
- const resolveRemoteClientTls = async (args) => {
16
- if (args.config == null) return void 0;
17
- if (!["https:", "wss:"].includes(new URL(args.url).protocol))
18
- throw new Error("Client TLS requires a secure harness endpoint");
19
- const read = async (ref) => {
20
- const value = await args.secrets.get(ref.secretKey);
21
- if (value == null || value.length === 0)
22
- throw new Error(`Client TLS secret '${ref.secretKey}' is not bound`);
23
- return value;
24
- };
25
- const tls = {
26
- cert: await read(args.config.cert),
27
- key: await read(args.config.key)
28
- };
29
- if (args.config.ca != null) tls.ca = await read(args.config.ca);
30
- return tls;
31
- };
32
- export {
33
- remoteClientTlsJson,
34
- remoteClientTlsSchema,
35
- resolveRemoteClientTls
36
- };
37
- //# sourceMappingURL=remote-client-tls.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../src/harnesses/remote-client-tls.ts"],
4
- "sourcesContent": ["import type { HarnessClientTlsIface, SecretReaderIface } from '@finalai/agent-provider';\nimport * as z from 'zod';\nimport { secretRefJson, secretRefZod, type SecretRefIface } from \"./config-fields.mjs\";\n\nexport interface RemoteClientTlsInputIface {\n cert: SecretRefIface;\n key: SecretRefIface;\n ca?: SecretRefIface;\n}\n\nexport const remoteClientTlsSchema = z.strictObject({\n cert: secretRefZod(),\n key: secretRefZod(),\n ca: secretRefZod().optional(),\n});\n\nexport const remoteClientTlsJson = () => ({\n type: 'object',\n title: 'Client TLS',\n required: ['cert', 'key'],\n additionalProperties: false,\n properties: { cert: secretRefJson(), key: secretRefJson(), ca: secretRefJson() },\n});\n\nexport const resolveRemoteClientTls = async (args: {\n config: RemoteClientTlsInputIface | null | undefined;\n secrets: SecretReaderIface;\n url: string;\n}): Promise<HarnessClientTlsIface | undefined> => {\n if (args.config == null) return undefined;\n if (!['https:', 'wss:'].includes(new URL(args.url).protocol))\n throw new Error('Client TLS requires a secure harness endpoint');\n const read = async (ref: SecretRefIface) => {\n const value = await args.secrets.get(ref.secretKey);\n if (value == null || value.length === 0)\n throw new Error(`Client TLS secret '${ref.secretKey}' is not bound`);\n return value;\n };\n const tls: HarnessClientTlsIface = {\n cert: await read(args.config.cert),\n key: await read(args.config.key),\n };\n if (args.config.ca != null) tls.ca = await read(args.config.ca);\n return tls;\n};\n"],
5
- "mappings": "AACA,YAAY,OAAO;AACnB,SAAS,eAAe,oBAAyC;AAQ1D,MAAM,wBAAwB,EAAE,aAAa;AAAA,EAClD,MAAM,aAAa;AAAA,EACnB,KAAK,aAAa;AAAA,EAClB,IAAI,aAAa,EAAE,SAAS;AAC9B,CAAC;AAEM,MAAM,sBAAsB,OAAO;AAAA,EACxC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,UAAU,CAAC,QAAQ,KAAK;AAAA,EACxB,sBAAsB;AAAA,EACtB,YAAY,EAAE,MAAM,cAAc,GAAG,KAAK,cAAc,GAAG,IAAI,cAAc,EAAE;AACjF;AAEO,MAAM,yBAAyB,OAAO,SAIK;AAChD,MAAI,KAAK,UAAU,KAAM,QAAO;AAChC,MAAI,CAAC,CAAC,UAAU,MAAM,EAAE,SAAS,IAAI,IAAI,KAAK,GAAG,EAAE,QAAQ;AACzD,UAAM,IAAI,MAAM,+CAA+C;AACjE,QAAM,OAAO,OAAO,QAAwB;AAC1C,UAAM,QAAQ,MAAM,KAAK,QAAQ,IAAI,IAAI,SAAS;AAClD,QAAI,SAAS,QAAQ,MAAM,WAAW;AACpC,YAAM,IAAI,MAAM,sBAAsB,IAAI,SAAS,gBAAgB;AACrE,WAAO;AAAA,EACT;AACA,QAAM,MAA6B;AAAA,IACjC,MAAM,MAAM,KAAK,KAAK,OAAO,IAAI;AAAA,IACjC,KAAK,MAAM,KAAK,KAAK,OAAO,GAAG;AAAA,EACjC;AACA,MAAI,KAAK,OAAO,MAAM,KAAM,KAAI,KAAK,MAAM,KAAK,KAAK,OAAO,EAAE;AAC9D,SAAO;AACT;",
6
- "names": []
7
- }
@@ -1,98 +0,0 @@
1
- import { type HarnessDescriptionIface, type JsonSchema } from '@finalai/agent-provider';
2
- import * as z from 'zod';
3
- import { CodexApprovalPolicy, CodexSandboxMode, type CredentialsInput, type HarnessBindingOutputIface, type InstructionInput, type SecretRefIface, type SkillInput } from "./config-fields.mjs";
4
- import { type RemoteClientTlsInputIface } from "./remote-client-tls.mjs";
5
- import { CODEX_REASONING_LEVELS } from "./serverless-nanocode-codex.mjs";
6
- export declare const SPECIFIER = "@finalai/final-agent-provider/harnesses/remote-codex";
7
- export declare const approvalPolicySchema: z.ZodEnum<{
8
- readonly Untrusted: CodexApprovalPolicy.Untrusted;
9
- readonly OnRequest: CodexApprovalPolicy.OnRequest;
10
- readonly Never: CodexApprovalPolicy.Never;
11
- }>;
12
- export type RemoteCodexApprovalPolicy = z.output<typeof approvalPolicySchema>;
13
- export declare const remoteCodexConfigSchema: 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
- reasoning: z.ZodOptional<z.ZodEnum<typeof import("./config-fields.mjs").ReasoningLevel>>;
33
- credentials: z.ZodObject<{
34
- payer: z.ZodEnum<typeof import("@finalai/agent-provider").CredentialPayer>;
35
- tryInOrder: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
36
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.Subscription>;
37
- owner: z.ZodEnum<typeof import("@finalai/agent-provider").CredentialOwner>;
38
- vendor: z.ZodOptional<z.ZodString>;
39
- pin: z.ZodOptional<z.ZodString>;
40
- }, z.core.$strip>, z.ZodObject<{
41
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.ApiKey>;
42
- secret: z.ZodString;
43
- baseUrl: z.ZodOptional<z.ZodString>;
44
- vendor: z.ZodOptional<z.ZodString>;
45
- }, z.core.$strip>, z.ZodObject<{
46
- pin: z.ZodOptional<z.ZodString>;
47
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.ApiKey>;
48
- owner: z.ZodEnum<typeof import("@finalai/agent-provider").CredentialOwner>;
49
- vendor: z.ZodOptional<z.ZodString>;
50
- }, z.core.$strip>, z.ZodObject<{
51
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.Platform>;
52
- budget: z.ZodOptional<z.ZodString>;
53
- }, z.core.$strip>, z.ZodObject<{
54
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.HarnessOwned>;
55
- }, z.core.$strip>, z.ZodObject<{
56
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.Custom>;
57
- resolver: z.ZodString;
58
- events: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof import("@finalai/agent-provider").DynamicEvent>>>;
59
- }, z.core.$strip>]>>;
60
- }, z.core.$strip>;
61
- approvalPolicy: z.ZodOptional<z.ZodEnum<{
62
- readonly Untrusted: CodexApprovalPolicy.Untrusted;
63
- readonly OnRequest: CodexApprovalPolicy.OnRequest;
64
- readonly Never: CodexApprovalPolicy.Never;
65
- }>>;
66
- sandboxMode: z.ZodOptional<z.ZodEnum<typeof CodexSandboxMode>>;
67
- instructions: z.ZodDefault<z.ZodArray<z.ZodObject<{
68
- role: z.ZodEnum<typeof import("@finalai/agent-provider").InstructionRole>;
69
- content: z.ZodString;
70
- source: z.ZodOptional<z.ZodString>;
71
- }, z.core.$strip>>>;
72
- skills: z.ZodDefault<z.ZodArray<z.ZodObject<{
73
- key: z.ZodString;
74
- description: z.ZodOptional<z.ZodString>;
75
- files: z.ZodArray<z.ZodObject<{
76
- path: z.ZodString;
77
- content: z.ZodString;
78
- }, z.core.$strip>>;
79
- }, z.core.$strip>>>;
80
- }, z.core.$strict>;
81
- export type RemoteCodexConfigIface = z.output<typeof remoteCodexConfigSchema>;
82
- export declare const REMOTE_CODEX_CONFIG_JSON_SCHEMA: JsonSchema;
83
- export declare const REMOTE_CODEX_DESCRIPTION: HarnessDescriptionIface;
84
- export interface RemoteCodexConfigInputIface {
85
- url: string;
86
- tls?: RemoteClientTlsInputIface;
87
- hop: SecretRefIface;
88
- cwd?: string;
89
- executable?: string;
90
- model?: string;
91
- reasoning?: (typeof CODEX_REASONING_LEVELS)[number] | `${(typeof CODEX_REASONING_LEVELS)[number]}`;
92
- credentials: CredentialsInput;
93
- approvalPolicy?: RemoteCodexApprovalPolicy | `${RemoteCodexApprovalPolicy}`;
94
- sandboxMode?: CodexSandboxMode | `${CodexSandboxMode}`;
95
- instructions?: InstructionInput[];
96
- skills?: SkillInput[];
97
- }
98
- export declare const remoteCodex: (config: RemoteCodexConfigInputIface) => HarnessBindingOutputIface;
@@ -1,128 +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
- CodexApprovalPolicy,
16
- CodexSandboxMode,
17
- configObjectJson,
18
- credentialsJson,
19
- credentialsZod,
20
- harnessBinding,
21
- instructionsJson,
22
- instructionsZod,
23
- permissionModeJson,
24
- reasoningJson,
25
- reasoningZod,
26
- secretRefJson,
27
- secretRefZod,
28
- skillsJson,
29
- skillsZod
30
- } from "./config-fields.mjs";
31
- import { ModelVendor } from "./model-reference.mjs";
32
- import {
33
- remoteClientTlsJson,
34
- remoteClientTlsSchema
35
- } from "./remote-client-tls.mjs";
36
- import { remoteUrlJson, remoteUrlZod } from "./remote-url.mjs";
37
- import { CODEX_REASONING_LEVELS } from "./serverless-nanocode-codex.mjs";
38
- const SPECIFIER = "@finalai/final-agent-provider/harnesses/remote-codex";
39
- const approvalPolicySchema = z.nativeEnum(CodexApprovalPolicy).exclude(["OnFailure"]);
40
- const remoteCodexConfigSchema = z.strictObject({
41
- url: remoteUrlZod(),
42
- tls: remoteClientTlsSchema.optional(),
43
- hop: secretRefZod(),
44
- cwd: absolutePathZod().optional(),
45
- executable: z.string().min(1).optional(),
46
- model: z.string().min(1).optional(),
47
- reasoning: reasoningZod(CODEX_REASONING_LEVELS).optional(),
48
- credentials: credentialsZod(),
49
- approvalPolicy: approvalPolicySchema.optional(),
50
- sandboxMode: z.nativeEnum(CodexSandboxMode).optional(),
51
- instructions: instructionsZod(),
52
- skills: skillsZod()
53
- });
54
- const REMOTE_CODEX_CONFIG_JSON_SCHEMA = configObjectJson({
55
- title: "Codex (your host)",
56
- required: ["credentials", "url", "hop"],
57
- properties: {
58
- url: remoteUrlJson("Runtime URL"),
59
- tls: remoteClientTlsJson(),
60
- hop: secretRefJson(),
61
- cwd: absolutePathJson("Working directory on your host"),
62
- executable: { type: "string", title: "Installed executable on your host" },
63
- model: { $ref: "final://schemas/model-picker" },
64
- reasoning: reasoningJson(CODEX_REASONING_LEVELS),
65
- credentials: {
66
- ...credentialsJson(),
67
- default: { payer: "agent-owner", tryInOrder: [{ kind: "harness-owned" }] }
68
- },
69
- approvalPolicy: permissionModeJson(Object.values(approvalPolicySchema.enum)),
70
- sandboxMode: {
71
- type: "string",
72
- title: "Sandbox mode",
73
- enum: Object.values(CodexSandboxMode)
74
- },
75
- instructions: instructionsJson(),
76
- skills: skillsJson()
77
- }
78
- });
79
- const REMOTE_CODEX_DESCRIPTION = {
80
- configSchema: REMOTE_CODEX_CONFIG_JSON_SCHEMA,
81
- acp: {
82
- transports: [AcpTransport.Ws, AcpTransport.Http],
83
- // ACP servers are bridged by the runtime and reach Codex as dynamic tools.
84
- mcp: [McpTransportKind.Acp, McpTransportKind.Http, McpTransportKind.Stdio]
85
- },
86
- // Codex's own tools on your host, under sandboxMode.
87
- baseTools: {
88
- [BaseCapability.Shell]: {
89
- provision: BaseToolProvision.HostDisableable,
90
- nativeTools: ["exec_command", "write_stdin"]
91
- },
92
- [BaseCapability.Files]: {
93
- provision: BaseToolProvision.HostDisableable,
94
- nativeTools: ["apply_patch"]
95
- }
96
- },
97
- consumes: [SandboxWire.Mcp],
98
- inference: {
99
- vendors: [ModelVendor.OpenAI],
100
- kinds: [
101
- InferenceCredentialKind.HarnessOwned,
102
- InferenceCredentialKind.Subscription,
103
- InferenceCredentialKind.ApiKey,
104
- InferenceCredentialKind.Platform
105
- ],
106
- delivery: CredentialDelivery.AtOpen
107
- },
108
- // No observe: group routing falls back to prompts with replyExpected: false.
109
- supports: {
110
- observe: false,
111
- resumeReplay: true,
112
- fork: false,
113
- authorMeta: true,
114
- nativeToolPolicy: false
115
- },
116
- promptWhileRunning: PromptWhileRunning.Inject,
117
- sessionSurvivesDisconnect: true
118
- };
119
- const remoteCodex = (config) => harnessBinding(SPECIFIER, config);
120
- export {
121
- REMOTE_CODEX_CONFIG_JSON_SCHEMA,
122
- REMOTE_CODEX_DESCRIPTION,
123
- SPECIFIER,
124
- approvalPolicySchema,
125
- remoteCodex,
126
- remoteCodexConfigSchema
127
- };
128
- //# sourceMappingURL=remote-codex.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../src/harnesses/remote-codex.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 CodexApprovalPolicy,\n CodexSandboxMode,\n configObjectJson,\n credentialsJson,\n credentialsZod,\n harnessBinding,\n instructionsJson,\n instructionsZod,\n permissionModeJson,\n reasoningJson,\n reasoningZod,\n secretRefJson,\n secretRefZod,\n skillsJson,\n skillsZod,\n type CredentialsInput,\n type HarnessBindingOutputIface,\n type InstructionInput,\n type SecretRefIface,\n type SkillInput,\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\";\nimport { CODEX_REASONING_LEVELS } from \"./serverless-nanocode-codex.mjs\";\n\n// The Codex app-server behind the Final ACP translator, served by\n// `final-harness serve --program codex` on a host you run.\n\nexport const SPECIFIER = '@finalai/final-agent-provider/harnesses/remote-codex';\n\nexport const approvalPolicySchema = z.nativeEnum(CodexApprovalPolicy).exclude(['OnFailure']);\n\nexport type RemoteCodexApprovalPolicy = z.output<typeof approvalPolicySchema>;\n\nexport const remoteCodexConfigSchema = 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 reasoning: reasoningZod(CODEX_REASONING_LEVELS).optional(),\n credentials: credentialsZod(),\n approvalPolicy: approvalPolicySchema.optional(),\n sandboxMode: z.nativeEnum(CodexSandboxMode).optional(),\n instructions: instructionsZod(),\n skills: skillsZod(),\n});\n\nexport type RemoteCodexConfigIface = z.output<typeof remoteCodexConfigSchema>;\n\nexport const REMOTE_CODEX_CONFIG_JSON_SCHEMA: JsonSchema = configObjectJson({\n title: 'Codex (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 reasoning: reasoningJson(CODEX_REASONING_LEVELS),\n credentials: {\n ...credentialsJson(),\n default: { payer: 'agent-owner', tryInOrder: [{ kind: 'harness-owned' }] },\n },\n approvalPolicy: permissionModeJson(Object.values(approvalPolicySchema.enum)),\n sandboxMode: {\n type: 'string',\n title: 'Sandbox mode',\n enum: Object.values(CodexSandboxMode),\n },\n instructions: instructionsJson(),\n skills: skillsJson(),\n },\n});\n\nexport const REMOTE_CODEX_DESCRIPTION: HarnessDescriptionIface = {\n configSchema: REMOTE_CODEX_CONFIG_JSON_SCHEMA,\n acp: {\n transports: [AcpTransport.Ws, AcpTransport.Http],\n // ACP servers are bridged by the runtime and reach Codex as dynamic tools.\n mcp: [McpTransportKind.Acp, McpTransportKind.Http, McpTransportKind.Stdio],\n },\n // Codex's own tools on your host, under sandboxMode.\n baseTools: {\n [BaseCapability.Shell]: {\n provision: BaseToolProvision.HostDisableable,\n nativeTools: ['exec_command', 'write_stdin'],\n },\n [BaseCapability.Files]: {\n provision: BaseToolProvision.HostDisableable,\n nativeTools: ['apply_patch'],\n },\n },\n consumes: [SandboxWire.Mcp],\n inference: {\n vendors: [ModelVendor.OpenAI],\n kinds: [\n InferenceCredentialKind.HarnessOwned,\n InferenceCredentialKind.Subscription,\n InferenceCredentialKind.ApiKey,\n InferenceCredentialKind.Platform,\n ],\n delivery: CredentialDelivery.AtOpen,\n },\n // No observe: group routing falls back to prompts with replyExpected: false.\n supports: {\n observe: false,\n resumeReplay: true,\n fork: false,\n authorMeta: true,\n nativeToolPolicy: false,\n },\n promptWhileRunning: PromptWhileRunning.Inject,\n sessionSurvivesDisconnect: true,\n};\n\nexport interface RemoteCodexConfigInputIface {\n url: string;\n tls?: RemoteClientTlsInputIface;\n hop: SecretRefIface;\n cwd?: string;\n executable?: string;\n model?: string;\n reasoning?:\n | (typeof CODEX_REASONING_LEVELS)[number]\n | `${(typeof CODEX_REASONING_LEVELS)[number]}`;\n credentials: CredentialsInput;\n approvalPolicy?: RemoteCodexApprovalPolicy | `${RemoteCodexApprovalPolicy}`;\n sandboxMode?: CodexSandboxMode | `${CodexSandboxMode}`;\n instructions?: InstructionInput[];\n skills?: SkillInput[];\n}\n\nexport const remoteCodex = (config: RemoteCodexConfigInputIface): HarnessBindingOutputIface =>\n 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;AA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AAM;",
6
- "names": []
7
- }
@@ -1,78 +0,0 @@
1
- import { type HarnessDescriptionIface, type JsonSchema } from '@finalai/agent-provider';
2
- import * as z from 'zod';
3
- import { PiPermissionMode, type CredentialsInput, type HarnessBindingOutputIface, type InstructionInput, type SecretRefIface } from "./config-fields.mjs";
4
- import { type RemoteClientTlsInputIface } from "./remote-client-tls.mjs";
5
- import { PI_REASONING_LEVELS } from "./serverless-pi.mjs";
6
- export declare const SPECIFIER = "@finalai/final-agent-provider/harnesses/remote-pi";
7
- export declare const remotePiConfigSchema: z.ZodObject<{
8
- url: z.ZodString;
9
- tls: z.ZodOptional<z.ZodObject<{
10
- cert: z.ZodObject<{
11
- secretKey: z.ZodString;
12
- }, z.core.$strip>;
13
- key: z.ZodObject<{
14
- secretKey: z.ZodString;
15
- }, z.core.$strip>;
16
- ca: z.ZodOptional<z.ZodObject<{
17
- secretKey: z.ZodString;
18
- }, z.core.$strip>>;
19
- }, z.core.$strict>>;
20
- hop: z.ZodObject<{
21
- secretKey: z.ZodString;
22
- }, z.core.$strip>;
23
- cwd: z.ZodOptional<z.ZodString>;
24
- executable: z.ZodOptional<z.ZodString>;
25
- model: z.ZodOptional<z.ZodString>;
26
- reasoning: z.ZodOptional<z.ZodEnum<typeof import("./config-fields.mjs").ReasoningLevel>>;
27
- credentials: z.ZodObject<{
28
- payer: z.ZodEnum<typeof import("@finalai/agent-provider").CredentialPayer>;
29
- tryInOrder: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
30
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.Subscription>;
31
- owner: z.ZodEnum<typeof import("@finalai/agent-provider").CredentialOwner>;
32
- vendor: z.ZodOptional<z.ZodString>;
33
- pin: z.ZodOptional<z.ZodString>;
34
- }, z.core.$strip>, z.ZodObject<{
35
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.ApiKey>;
36
- secret: z.ZodString;
37
- baseUrl: z.ZodOptional<z.ZodString>;
38
- vendor: z.ZodOptional<z.ZodString>;
39
- }, z.core.$strip>, z.ZodObject<{
40
- pin: z.ZodOptional<z.ZodString>;
41
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.ApiKey>;
42
- owner: z.ZodEnum<typeof import("@finalai/agent-provider").CredentialOwner>;
43
- vendor: z.ZodOptional<z.ZodString>;
44
- }, z.core.$strip>, z.ZodObject<{
45
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.Platform>;
46
- budget: z.ZodOptional<z.ZodString>;
47
- }, z.core.$strip>, z.ZodObject<{
48
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.HarnessOwned>;
49
- }, z.core.$strip>, z.ZodObject<{
50
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.Custom>;
51
- resolver: z.ZodString;
52
- events: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof import("@finalai/agent-provider").DynamicEvent>>>;
53
- }, z.core.$strip>]>>;
54
- }, z.core.$strip>;
55
- permissionMode: z.ZodOptional<z.ZodEnum<typeof PiPermissionMode>>;
56
- instructions: z.ZodDefault<z.ZodArray<z.ZodObject<{
57
- role: z.ZodEnum<typeof import("@finalai/agent-provider").InstructionRole>;
58
- content: z.ZodString;
59
- source: z.ZodOptional<z.ZodString>;
60
- }, z.core.$strip>>>;
61
- }, z.core.$strict>;
62
- export type RemotePiConfigIface = z.output<typeof remotePiConfigSchema>;
63
- export declare const REMOTE_PI_CONFIG_JSON_SCHEMA: JsonSchema;
64
- export declare const REMOTE_PI_BASE_TOOLS: HarnessDescriptionIface['baseTools'];
65
- export declare const REMOTE_PI_DESCRIPTION: HarnessDescriptionIface;
66
- export interface RemotePiConfigInputIface {
67
- url: string;
68
- tls?: RemoteClientTlsInputIface;
69
- hop: SecretRefIface;
70
- cwd?: string;
71
- executable?: string;
72
- model?: string;
73
- reasoning?: (typeof PI_REASONING_LEVELS)[number] | `${(typeof PI_REASONING_LEVELS)[number]}`;
74
- credentials: CredentialsInput;
75
- permissionMode?: PiPermissionMode | `${PiPermissionMode}`;
76
- instructions?: InstructionInput[];
77
- }
78
- export declare const remotePi: (config: RemotePiConfigInputIface) => HarnessBindingOutputIface;
@@ -1,104 +0,0 @@
1
- import {
2
- AcpTransport,
3
- BaseToolProvision,
4
- CredentialDelivery,
5
- InferenceCredentialKind,
6
- McpTransportKind,
7
- PromptWhileRunning,
8
- SandboxWire
9
- } from "@finalai/agent-provider";
10
- import * as z from "zod";
11
- import {
12
- absolutePathJson,
13
- absolutePathZod,
14
- configObjectJson,
15
- credentialsJson,
16
- credentialsZod,
17
- harnessBinding,
18
- instructionsJson,
19
- instructionsZod,
20
- permissionModeJson,
21
- PiPermissionMode,
22
- reasoningJson,
23
- reasoningZod,
24
- secretRefJson,
25
- secretRefZod
26
- } from "./config-fields.mjs";
27
- import { ModelVendor } from "./model-reference.mjs";
28
- import {
29
- remoteClientTlsJson,
30
- remoteClientTlsSchema
31
- } from "./remote-client-tls.mjs";
32
- import { remoteUrlJson, remoteUrlZod } from "./remote-url.mjs";
33
- import { PI_BASE_TOOLS, PI_REASONING_LEVELS } from "./serverless-pi.mjs";
34
- const SPECIFIER = "@finalai/final-agent-provider/harnesses/remote-pi";
35
- const remotePiConfigSchema = z.strictObject({
36
- url: remoteUrlZod(),
37
- tls: remoteClientTlsSchema.optional(),
38
- hop: secretRefZod(),
39
- cwd: absolutePathZod().optional(),
40
- executable: z.string().min(1).optional(),
41
- model: z.string().min(1).optional(),
42
- reasoning: reasoningZod(PI_REASONING_LEVELS).optional(),
43
- credentials: credentialsZod(),
44
- permissionMode: z.nativeEnum(PiPermissionMode).optional(),
45
- instructions: instructionsZod()
46
- });
47
- const REMOTE_PI_CONFIG_JSON_SCHEMA = configObjectJson({
48
- title: "Pi (your host)",
49
- required: ["credentials", "url", "hop"],
50
- properties: {
51
- url: remoteUrlJson("Runtime URL"),
52
- tls: remoteClientTlsJson(),
53
- hop: secretRefJson(),
54
- cwd: absolutePathJson("Working directory on your host"),
55
- executable: { type: "string", title: "Installed executable on your host" },
56
- model: { $ref: "final://schemas/model-picker" },
57
- reasoning: reasoningJson(PI_REASONING_LEVELS),
58
- credentials: {
59
- ...credentialsJson(),
60
- default: { payer: "agent-owner", tryInOrder: [{ kind: "harness-owned" }] }
61
- },
62
- permissionMode: permissionModeJson(Object.values(PiPermissionMode)),
63
- instructions: instructionsJson()
64
- }
65
- });
66
- const REMOTE_PI_BASE_TOOLS = Object.fromEntries(
67
- Object.entries(PI_BASE_TOOLS).map(([capability, declaration]) => [
68
- capability,
69
- { ...declaration, provision: BaseToolProvision.HostDisableable }
70
- ])
71
- );
72
- const REMOTE_PI_DESCRIPTION = {
73
- configSchema: REMOTE_PI_CONFIG_JSON_SCHEMA,
74
- acp: {
75
- transports: [AcpTransport.Ws, AcpTransport.Http],
76
- mcp: [McpTransportKind.Acp, McpTransportKind.Http, McpTransportKind.Stdio]
77
- },
78
- // Pi's own tools stay on your host; bound targets are additive MCP servers.
79
- baseTools: REMOTE_PI_BASE_TOOLS,
80
- consumes: [SandboxWire.Mcp],
81
- // Explicit Final credentials are delivered at open; omission keeps the user login.
82
- inference: {
83
- vendors: [ModelVendor.OpenRouter, ModelVendor.OpenAI, ModelVendor.Anthropic],
84
- kinds: [
85
- InferenceCredentialKind.HarnessOwned,
86
- InferenceCredentialKind.ApiKey,
87
- InferenceCredentialKind.Platform
88
- ],
89
- delivery: CredentialDelivery.AtOpen
90
- },
91
- supports: { observe: true, resumeReplay: true, fork: false, authorMeta: true },
92
- promptWhileRunning: PromptWhileRunning.Inject,
93
- sessionSurvivesDisconnect: true
94
- };
95
- const remotePi = (config) => harnessBinding(SPECIFIER, config);
96
- export {
97
- REMOTE_PI_BASE_TOOLS,
98
- REMOTE_PI_CONFIG_JSON_SCHEMA,
99
- REMOTE_PI_DESCRIPTION,
100
- SPECIFIER,
101
- remotePi,
102
- remotePiConfigSchema
103
- };
104
- //# sourceMappingURL=remote-pi.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../src/harnesses/remote-pi.ts"],
4
- "sourcesContent": ["import {\n AcpTransport,\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 configObjectJson,\n credentialsJson,\n credentialsZod,\n harnessBinding,\n instructionsJson,\n instructionsZod,\n permissionModeJson,\n PiPermissionMode,\n reasoningJson,\n reasoningZod,\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\";\nimport { PI_BASE_TOOLS, PI_REASONING_LEVELS } from \"./serverless-pi.mjs\";\n\n// The installed Pi CLI, driven over its public JSONL RPC by final-harness.\n\nexport const SPECIFIER = '@finalai/final-agent-provider/harnesses/remote-pi';\n\nexport const remotePiConfigSchema = 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 reasoning: reasoningZod(PI_REASONING_LEVELS).optional(),\n credentials: credentialsZod(),\n permissionMode: z.nativeEnum(PiPermissionMode).optional(),\n instructions: instructionsZod(),\n});\n\nexport type RemotePiConfigIface = z.output<typeof remotePiConfigSchema>;\n\nexport const REMOTE_PI_CONFIG_JSON_SCHEMA: JsonSchema = configObjectJson({\n title: 'Pi (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 reasoning: reasoningJson(PI_REASONING_LEVELS),\n credentials: {\n ...credentialsJson(),\n default: { payer: 'agent-owner', tryInOrder: [{ kind: 'harness-owned' }] },\n },\n permissionMode: permissionModeJson(Object.values(PiPermissionMode)),\n instructions: instructionsJson(),\n },\n});\n\nexport const REMOTE_PI_BASE_TOOLS: HarnessDescriptionIface['baseTools'] = Object.fromEntries(\n Object.entries(PI_BASE_TOOLS).map(([capability, declaration]) => [\n capability,\n { ...declaration, provision: BaseToolProvision.HostDisableable },\n ]),\n);\n\nexport const REMOTE_PI_DESCRIPTION: HarnessDescriptionIface = {\n configSchema: REMOTE_PI_CONFIG_JSON_SCHEMA,\n acp: {\n transports: [AcpTransport.Ws, AcpTransport.Http],\n mcp: [McpTransportKind.Acp, McpTransportKind.Http, McpTransportKind.Stdio],\n },\n // Pi's own tools stay on your host; bound targets are additive MCP servers.\n baseTools: REMOTE_PI_BASE_TOOLS,\n consumes: [SandboxWire.Mcp],\n // Explicit Final credentials are delivered at open; omission keeps the user login.\n inference: {\n vendors: [ModelVendor.OpenRouter, ModelVendor.OpenAI, ModelVendor.Anthropic],\n kinds: [\n InferenceCredentialKind.HarnessOwned,\n InferenceCredentialKind.ApiKey,\n InferenceCredentialKind.Platform,\n ],\n delivery: CredentialDelivery.AtOpen,\n },\n supports: { observe: true, resumeReplay: true, fork: false, authorMeta: true },\n promptWhileRunning: PromptWhileRunning.Inject,\n sessionSurvivesDisconnect: true,\n};\n\nexport interface RemotePiConfigInputIface {\n url: string;\n tls?: RemoteClientTlsInputIface;\n hop: SecretRefIface;\n cwd?: string;\n executable?: string;\n model?: string;\n reasoning?: (typeof PI_REASONING_LEVELS)[number] | `${(typeof PI_REASONING_LEVELS)[number]}`;\n credentials: CredentialsInput;\n permissionMode?: PiPermissionMode | `${PiPermissionMode}`;\n instructions?: InstructionInput[];\n}\n\nexport const remotePi = (config: RemotePiConfigInputIface): HarnessBindingOutputIface =>\n harnessBinding(SPECIFIER, config);\n"],
5
- "mappings": "AAAA;AAAA,EACE;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,EACA;AAAA,EACA;AAAA,OAKK;AACP,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AACP,SAAS,eAAe,oBAAoB;AAC5C,SAAS,eAAe,2BAA2B;AAI5C,MAAM,YAAY;AAElB,MAAM,uBAAuB,EAAE,aAAa;AAAA,EACjD,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,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS;AAAA,EAClC,WAAW,aAAa,mBAAmB,EAAE,SAAS;AAAA,EACtD,aAAa,eAAe;AAAA,EAC5B,gBAAgB,EAAE,WAAW,gBAAgB,EAAE,SAAS;AAAA,EACxD,cAAc,gBAAgB;AAChC,CAAC;AAIM,MAAM,+BAA2C,iBAAiB;AAAA,EACvE,OAAO;AAAA,EACP,UAAU,CAAC,eAAe,OAAO,KAAK;AAAA,EACtC,YAAY;AAAA,IACV,KAAK,cAAc,aAAa;AAAA,IAChC,KAAK,oBAAoB;AAAA,IACzB,KAAK,cAAc;AAAA,IACnB,KAAK,iBAAiB,gCAAgC;AAAA,IACtD,YAAY,EAAE,MAAM,UAAU,OAAO,oCAAoC;AAAA,IACz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UrlZod: () => import("zod").ZodString;
3
- export declare const remoteUrlJson: (title: string) => {
4
- pattern: string;
5
- };
@@ -1,19 +0,0 @@
1
- import { urlJson, urlZod } from "./config-fields.mjs";
2
- const REMOTE_URL_SCHEMES = ["ws", "wss", "http", "https"];
3
- const remoteUrlZod = () => urlZod(REMOTE_URL_SCHEMES).refine(
4
- (value) => {
5
- const url = new URL(value);
6
- return ["https:", "wss:"].includes(url.protocol) || ["localhost", "127.0.0.1", "[::1]"].includes(url.hostname);
7
- },
8
- { message: "Remote harness URLs require TLS except on loopback" }
9
- );
10
- const remoteUrlJson = (title) => ({
11
- ...urlJson(title, REMOTE_URL_SCHEMES),
12
- pattern: "^((wss|https)://|(ws|http)://(localhost|127\\.0\\.0\\.1|\\[::1\\])(:|/|$))"
13
- });
14
- export {
15
- REMOTE_URL_SCHEMES,
16
- remoteUrlJson,
17
- remoteUrlZod
18
- };
19
- //# sourceMappingURL=remote-url.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../src/harnesses/remote-url.ts"],
4
- "sourcesContent": ["import { urlJson, urlZod } from \"./config-fields.mjs\";\n\n// Shared by remote-claude-code, remote-codex and remote-pi: the Final harness\n// runtime (`final-harness serve --program <...>`) on\n// a host you run, dialed over WebSocket or Streamable HTTP with a hop secret.\n//\n// The program's configuration (instructions, skills, model, base-tool bindings,\n// targets, credentials) is provider-private: open() and resume()\n// register it with the runtime themselves (`PUT /v1/program-configs/<id>`) and\n// return an endpoint whose headers name the registration. The session service\n// dials that endpoint and speaks plain ACP, exactly as for any other harness.\n\nexport const REMOTE_URL_SCHEMES = ['ws', 'wss', 'http', 'https'] as const;\n\nexport const remoteUrlZod = () =>\n urlZod(REMOTE_URL_SCHEMES).refine(\n (value) => {\n const url = new URL(value);\n return (\n ['https:', 'wss:'].includes(url.protocol) ||\n ['localhost', '127.0.0.1', '[::1]'].includes(url.hostname)\n );\n },\n { message: 'Remote harness URLs require TLS except on loopback' },\n );\n\nexport const remoteUrlJson = (title: string) => ({\n ...urlJson(title, REMOTE_URL_SCHEMES),\n pattern: '^((wss|https)://|(ws|http)://(localhost|127\\\\.0\\\\.0\\\\.1|\\\\[::1\\\\])(:|/|$))',\n});\n"],
5
- "mappings": "AAAA,SAAS,SAAS,cAAc;AAYzB,MAAM,qBAAqB,CAAC,MAAM,OAAO,QAAQ,OAAO;AAExD,MAAM,eAAe,MAC1B,OAAO,kBAAkB,EAAE;AAAA,EACzB,CAAC,UAAU;AACT,UAAM,MAAM,IAAI,IAAI,KAAK;AACzB,WACE,CAAC,UAAU,MAAM,EAAE,SAAS,IAAI,QAAQ,KACxC,CAAC,aAAa,aAAa,OAAO,EAAE,SAAS,IAAI,QAAQ;AAAA,EAE7D;AAAA,EACA,EAAE,SAAS,qDAAqD;AAClE;AAEK,MAAM,gBAAgB,CAAC,WAAmB;AAAA,EAC/C,GAAG,QAAQ,OAAO,kBAAkB;AAAA,EACpC,SAAS;AACX;",
6
- "names": []
7
- }
@@ -1,63 +0,0 @@
1
- import { type HarnessDescriptionIface, type JsonSchema } from '@finalai/agent-provider';
2
- import * as z from 'zod';
3
- import { PiPermissionMode, ReasoningLevel, type CredentialsInput, type HarnessBindingOutputIface, type InstructionInput, type SkillInput } from "./config-fields.mjs";
4
- export declare const SPECIFIER = "@finalai/final-agent-provider/harnesses/serverless-final";
5
- export declare const FINAL_REASONING_LEVELS: readonly [ReasoningLevel.Low, ReasoningLevel.Medium, ReasoningLevel.High];
6
- export declare const serverlessFinalConfigSchema: z.ZodObject<{
7
- model: z.ZodOptional<z.ZodString>;
8
- reasoning: z.ZodOptional<z.ZodEnum<typeof ReasoningLevel>>;
9
- credentials: z.ZodObject<{
10
- payer: z.ZodEnum<typeof import("@finalai/agent-provider").CredentialPayer>;
11
- tryInOrder: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
12
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.Subscription>;
13
- owner: z.ZodEnum<typeof import("@finalai/agent-provider").CredentialOwner>;
14
- vendor: z.ZodOptional<z.ZodString>;
15
- pin: z.ZodOptional<z.ZodString>;
16
- }, z.core.$strip>, z.ZodObject<{
17
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.ApiKey>;
18
- secret: z.ZodString;
19
- baseUrl: z.ZodOptional<z.ZodString>;
20
- vendor: z.ZodOptional<z.ZodString>;
21
- }, z.core.$strip>, z.ZodObject<{
22
- pin: z.ZodOptional<z.ZodString>;
23
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.ApiKey>;
24
- owner: z.ZodEnum<typeof import("@finalai/agent-provider").CredentialOwner>;
25
- vendor: z.ZodOptional<z.ZodString>;
26
- }, z.core.$strip>, z.ZodObject<{
27
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.Platform>;
28
- budget: z.ZodOptional<z.ZodString>;
29
- }, z.core.$strip>, z.ZodObject<{
30
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.HarnessOwned>;
31
- }, z.core.$strip>, z.ZodObject<{
32
- kind: z.ZodLiteral<import("@finalai/agent-provider").CredentialNodeKind.Custom>;
33
- resolver: z.ZodString;
34
- events: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof import("@finalai/agent-provider").DynamicEvent>>>;
35
- }, z.core.$strip>]>>;
36
- }, z.core.$strip>;
37
- permissionMode: z.ZodDefault<z.ZodEnum<typeof PiPermissionMode>>;
38
- instructions: z.ZodDefault<z.ZodArray<z.ZodObject<{
39
- role: z.ZodEnum<typeof import("@finalai/agent-provider").InstructionRole>;
40
- content: z.ZodString;
41
- source: z.ZodOptional<z.ZodString>;
42
- }, z.core.$strip>>>;
43
- skills: z.ZodDefault<z.ZodArray<z.ZodObject<{
44
- key: z.ZodString;
45
- description: z.ZodOptional<z.ZodString>;
46
- files: z.ZodArray<z.ZodObject<{
47
- path: z.ZodString;
48
- content: z.ZodString;
49
- }, z.core.$strip>>;
50
- }, z.core.$strip>>>;
51
- }, z.core.$strict>;
52
- export type ServerlessFinalConfigIface = z.output<typeof serverlessFinalConfigSchema>;
53
- export declare const SERVERLESS_FINAL_CONFIG_JSON_SCHEMA: JsonSchema;
54
- export declare const SERVERLESS_FINAL_DESCRIPTION: HarnessDescriptionIface;
55
- export interface ServerlessFinalConfigInputIface {
56
- model?: string;
57
- reasoning?: (typeof FINAL_REASONING_LEVELS)[number] | `${(typeof FINAL_REASONING_LEVELS)[number]}`;
58
- credentials: CredentialsInput;
59
- permissionMode?: PiPermissionMode | `${PiPermissionMode}`;
60
- instructions?: InstructionInput[];
61
- skills?: SkillInput[];
62
- }
63
- export declare const serverlessFinal: (config: ServerlessFinalConfigInputIface) => HarnessBindingOutputIface;