@finalai/agents 0.11.0 → 0.13.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 (188) hide show
  1. package/HOSTING.md +334 -245
  2. package/README.md +214 -29
  3. package/dist/modules/agent-client/agent-input.d.mts +24 -0
  4. package/dist/modules/agent-client/agent-input.mjs +46 -0
  5. package/dist/modules/agent-client/agent-input.mjs.map +7 -0
  6. package/dist/modules/agent-client/channels.d.mts +128 -16
  7. package/dist/modules/agent-client/channels.mjs +216 -33
  8. package/dist/modules/agent-client/channels.mjs.map +2 -2
  9. package/dist/modules/agent-client/client.d.mts +91 -21
  10. package/dist/modules/agent-client/client.mjs +79 -24
  11. package/dist/modules/agent-client/client.mjs.map +2 -2
  12. package/dist/modules/agent-client/config-options.mjs +1 -2
  13. package/dist/modules/agent-client/config-options.mjs.map +2 -2
  14. package/dist/modules/agent-client/conversation-resources.d.mts +102 -0
  15. package/dist/modules/agent-client/conversation-resources.mjs +178 -0
  16. package/dist/modules/agent-client/conversation-resources.mjs.map +7 -0
  17. package/dist/modules/agent-client/conversations.d.mts +120 -38
  18. package/dist/modules/agent-client/conversations.mjs +386 -71
  19. package/dist/modules/agent-client/conversations.mjs.map +2 -2
  20. package/dist/modules/agent-client/defaults.d.mts +8 -0
  21. package/dist/modules/agent-client/defaults.mjs +77 -0
  22. package/dist/modules/agent-client/defaults.mjs.map +7 -0
  23. package/dist/modules/agent-client/errors.d.mts +22 -2
  24. package/dist/modules/agent-client/errors.mjs +19 -0
  25. package/dist/modules/agent-client/errors.mjs.map +2 -2
  26. package/dist/modules/agent-client/events.d.mts +62 -0
  27. package/dist/modules/agent-client/events.mjs +107 -0
  28. package/dist/modules/agent-client/events.mjs.map +7 -0
  29. package/dist/modules/agent-client/harnesses.d.mts +66 -0
  30. package/dist/modules/agent-client/harnesses.mjs +156 -0
  31. package/dist/modules/agent-client/harnesses.mjs.map +7 -0
  32. package/dist/modules/agent-client/http.d.mts +2 -1
  33. package/dist/modules/agent-client/http.mjs +21 -2
  34. package/dist/modules/agent-client/http.mjs.map +2 -2
  35. package/dist/modules/agent-client/index.d.mts +21 -6
  36. package/dist/modules/agent-client/index.mjs +26 -0
  37. package/dist/modules/agent-client/index.mjs.map +2 -2
  38. package/dist/modules/agent-client/integrations.d.mts +40 -0
  39. package/dist/modules/agent-client/integrations.mjs +92 -0
  40. package/dist/modules/agent-client/integrations.mjs.map +7 -0
  41. package/dist/modules/agent-client/local-host-protocol.d.mts +156 -0
  42. package/dist/modules/agent-client/local-host-protocol.mjs +258 -0
  43. package/dist/modules/agent-client/local-host-protocol.mjs.map +7 -0
  44. package/dist/modules/agent-client/local-host.d.mts +56 -0
  45. package/dist/modules/agent-client/local-host.mjs +200 -0
  46. package/dist/modules/agent-client/local-host.mjs.map +7 -0
  47. package/dist/modules/agent-client/oauth-clients.d.mts +36 -0
  48. package/dist/modules/agent-client/oauth-clients.mjs +67 -0
  49. package/dist/modules/agent-client/oauth-clients.mjs.map +7 -0
  50. package/dist/modules/agent-client/project-agents.d.mts +54 -0
  51. package/dist/modules/agent-client/project-agents.mjs +111 -0
  52. package/dist/modules/agent-client/project-agents.mjs.map +7 -0
  53. package/dist/modules/agent-client/project.d.mts +48 -0
  54. package/dist/modules/agent-client/project.mjs +66 -0
  55. package/dist/modules/agent-client/project.mjs.map +7 -0
  56. package/dist/modules/agent-client/projects.d.mts +61 -0
  57. package/dist/modules/agent-client/projects.mjs +145 -0
  58. package/dist/modules/agent-client/projects.mjs.map +7 -0
  59. package/dist/modules/agent-client/provide.d.mts +41 -0
  60. package/dist/modules/agent-client/provide.mjs +90 -0
  61. package/dist/modules/agent-client/provide.mjs.map +7 -0
  62. package/dist/modules/agent-client/publishers.d.mts +57 -0
  63. package/dist/modules/agent-client/publishers.mjs +109 -0
  64. package/dist/modules/agent-client/publishers.mjs.map +7 -0
  65. package/dist/modules/agent-client/requirements.d.mts +60 -0
  66. package/dist/modules/agent-client/requirements.mjs +83 -0
  67. package/dist/modules/agent-client/requirements.mjs.map +7 -0
  68. package/dist/modules/agent-client/sandbox-providers.d.mts +34 -0
  69. package/dist/modules/agent-client/sandbox-providers.mjs +75 -0
  70. package/dist/modules/agent-client/sandbox-providers.mjs.map +7 -0
  71. package/dist/modules/agent-client/sandbox-uri.d.mts +1 -1
  72. package/dist/modules/agent-client/sandbox-uri.mjs +4 -4
  73. package/dist/modules/agent-client/sandbox-uri.mjs.map +1 -1
  74. package/dist/modules/agent-client/sandboxes.d.mts +72 -0
  75. package/dist/modules/agent-client/sandboxes.mjs +138 -0
  76. package/dist/modules/agent-client/sandboxes.mjs.map +7 -0
  77. package/dist/modules/agent-client/schedules.d.mts +9 -0
  78. package/dist/modules/agent-client/schedules.mjs +17 -0
  79. package/dist/modules/agent-client/schedules.mjs.map +7 -0
  80. package/dist/modules/agent-client/sessions.d.mts +46 -8
  81. package/dist/modules/agent-client/sessions.mjs +91 -29
  82. package/dist/modules/agent-client/sessions.mjs.map +2 -2
  83. package/dist/modules/agent-client/start.d.mts +101 -0
  84. package/dist/modules/agent-client/start.mjs +260 -0
  85. package/dist/modules/agent-client/start.mjs.map +7 -0
  86. package/dist/modules/agent-client/test-fakes.d.mts +1 -0
  87. package/dist/modules/agent-client/test-fakes.mjs +3 -1
  88. package/dist/modules/agent-client/test-fakes.mjs.map +2 -2
  89. package/dist/modules/cli/agent-module.d.mts +39 -0
  90. package/dist/modules/cli/agent-module.mjs +89 -0
  91. package/dist/modules/cli/agent-module.mjs.map +7 -0
  92. package/dist/modules/cli/cli.d.mts +6 -6
  93. package/dist/modules/cli/cli.mjs +94 -120
  94. package/dist/modules/cli/cli.mjs.map +2 -2
  95. package/dist/modules/cli/conformance.d.mts +2 -6
  96. package/dist/modules/cli/conformance.mjs +5 -8
  97. package/dist/modules/cli/conformance.mjs.map +2 -2
  98. package/dist/modules/cli/main.mjs.map +1 -1
  99. package/dist/modules/cli/output.d.mts +0 -9
  100. package/dist/modules/cli/output.mjs +7 -85
  101. package/dist/modules/cli/output.mjs.map +2 -2
  102. package/dist/modules/harnesses.mjs.map +2 -2
  103. package/dist/modules/index.d.mts +0 -2
  104. package/dist/modules/index.mjs +0 -4
  105. package/dist/modules/index.mjs.map +2 -2
  106. package/dist/modules/integrations.d.mts +24 -0
  107. package/dist/modules/integrations.mjs +30 -0
  108. package/dist/modules/integrations.mjs.map +7 -0
  109. package/dist/modules/public.d.mts +10 -10
  110. package/dist/modules/public.mjs +29 -78
  111. package/dist/modules/public.mjs.map +2 -2
  112. package/dist/modules/sandboxes.d.mts +2 -0
  113. package/dist/modules/sandboxes.mjs +4 -0
  114. package/dist/modules/sandboxes.mjs.map +2 -2
  115. package/dist/modules/verify.d.mts +1 -0
  116. package/dist/modules/verify.mjs +2 -0
  117. package/dist/modules/verify.mjs.map +7 -0
  118. package/dist/modules/webhooks.d.mts +37 -0
  119. package/dist/modules/webhooks.mjs +100 -0
  120. package/dist/modules/webhooks.mjs.map +7 -0
  121. package/examples/release-scout/README.md +18 -10
  122. package/examples/release-scout/agent.ts +41 -0
  123. package/examples/release-scout/by-name.ts +43 -0
  124. package/examples/release-scout/db.ts +6 -0
  125. package/examples/release-scout/instructions.md +5 -0
  126. package/examples/release-scout/run-on-a-computer.ts +49 -0
  127. package/examples/release-scout/run.ts +38 -0
  128. package/package.json +37 -28
  129. package/dist/modules/agent-client/build.d.mts +0 -110
  130. package/dist/modules/agent-client/build.mjs +0 -213
  131. package/dist/modules/agent-client/build.mjs.map +0 -7
  132. package/dist/modules/authoring/final-channel.d.mts +0 -1
  133. package/dist/modules/authoring/final-channel.mjs +0 -2
  134. package/dist/modules/authoring/final-channel.mjs.map +0 -7
  135. package/dist/modules/authoring/index.d.mts +0 -1
  136. package/dist/modules/authoring/index.mjs +0 -2
  137. package/dist/modules/authoring/index.mjs.map +0 -7
  138. package/dist/modules/authoring/instructions.d.mts +0 -1
  139. package/dist/modules/authoring/instructions.mjs +0 -2
  140. package/dist/modules/authoring/instructions.mjs.map +0 -7
  141. package/dist/modules/authoring/providers.d.mts +0 -2
  142. package/dist/modules/authoring/providers.mjs +0 -1
  143. package/dist/modules/authoring/providers.mjs.map +0 -7
  144. package/dist/modules/cli/build.d.mts +0 -22
  145. package/dist/modules/cli/build.mjs +0 -77
  146. package/dist/modules/cli/build.mjs.map +0 -7
  147. package/dist/modules/cli/channel-install.d.mts +0 -12
  148. package/dist/modules/cli/channel-install.mjs +0 -25
  149. package/dist/modules/cli/channel-install.mjs.map +0 -7
  150. package/dist/modules/cli/channel-socket.d.mts +0 -9
  151. package/dist/modules/cli/channel-socket.mjs +0 -114
  152. package/dist/modules/cli/channel-socket.mjs.map +0 -7
  153. package/dist/modules/cli/dev.d.mts +0 -26
  154. package/dist/modules/cli/dev.mjs +0 -311
  155. package/dist/modules/cli/dev.mjs.map +0 -7
  156. package/dist/modules/cli/files.d.mts +0 -18
  157. package/dist/modules/cli/files.mjs +0 -66
  158. package/dist/modules/cli/files.mjs.map +0 -7
  159. package/dist/modules/cli/harness-descriptions.d.mts +0 -20
  160. package/dist/modules/cli/harness-descriptions.mjs +0 -70
  161. package/dist/modules/cli/harness-descriptions.mjs.map +0 -7
  162. package/dist/modules/cli/publish.d.mts +0 -15
  163. package/dist/modules/cli/publish.mjs +0 -92
  164. package/dist/modules/cli/publish.mjs.map +0 -7
  165. package/dist/modules/compile.d.mts +0 -3
  166. package/dist/modules/compile.mjs +0 -58
  167. package/dist/modules/compile.mjs.map +0 -7
  168. package/dist/modules/index.browser.d.mts +0 -4
  169. package/dist/modules/index.browser.mjs +0 -8
  170. package/dist/modules/index.browser.mjs.map +0 -7
  171. package/examples/custom-harness/README.md +0 -16
  172. package/examples/custom-harness/agent.ts +0 -154
  173. package/examples/custom-sandbox/README.md +0 -12
  174. package/examples/custom-sandbox/agent.ts +0 -14
  175. package/examples/custom-sandbox/sandbox.ts +0 -24
  176. package/examples/release-scout/agent/agent.ts +0 -22
  177. package/examples/release-scout/agent/channels/github-signature.ts +0 -27
  178. package/examples/release-scout/agent/channels/github.ts +0 -32
  179. package/examples/release-scout/agent/connections/linear.ts +0 -9
  180. package/examples/release-scout/agent/hooks/audit.ts +0 -24
  181. package/examples/release-scout/agent/instructions/org-context.ts +0 -26
  182. package/examples/release-scout/agent/instructions.md +0 -2
  183. package/examples/release-scout/agent/sandbox.ts +0 -20
  184. package/examples/release-scout/agent/schedules/daily-digest.md +0 -7
  185. package/examples/release-scout/agent/skills/triage/SKILL.md +0 -8
  186. package/examples/release-scout/agent/skills/triage/checklist.md +0 -3
  187. package/examples/release-scout/agent/tools/lookup_release_notes.ts +0 -24
  188. package/examples/release-scout/client.ts +0 -122
@@ -1,94 +1,16 @@
1
- import {
2
- findDynamicSlots,
3
- formatProviderRef,
4
- isDynamicSlot
5
- } from "@finalai/agent-provider";
6
- import * as z from "zod";
7
- import { isClientError } from "../agent-client/errors.mjs";
8
- import { diagnosticSchema } from "../agent-client/index.mjs";
9
- const listOrNone = (items) => items.length === 0 ? "none" : items.join(", ");
10
- const manifestSummaryLines = (manifest) => {
11
- const lines = [`agent: ${manifest.identity.name}`];
12
- if (manifest.identity.description != null)
13
- lines.push(`description: ${manifest.identity.description}`);
14
- lines.push(`harness: ${formatProviderRef(manifest.harness.harness)}`);
15
- lines.push(
16
- `mcp servers: ${isDynamicSlot(manifest.mcpServers) ? "dynamic" : listOrNone(manifest.mcpServers.map((server) => `${server.key} (${server.kind})`))}`
17
- );
18
- lines.push(
19
- `sandboxes: ${isDynamicSlot(manifest.sandboxes) ? "dynamic" : listOrNone(Object.keys(manifest.sandboxes))}`
20
- );
21
- lines.push(
22
- `base tools: ${listOrNone(
23
- Object.entries(manifest.tools.base).map(
24
- ([capability, binding]) => `${capability} \u2192 ${binding?.target ?? "?"}`
25
- )
26
- )}`
27
- );
28
- lines.push(`channels: ${listOrNone(manifest.channels.map((channel) => channel.key))}`);
29
- lines.push(
30
- `schedules: ${listOrNone(
31
- manifest.schedules.map(
32
- (schedule) => `${schedule.key} (${schedule.cron}, ${schedule.timezone})`
33
- )
34
- )}`
35
- );
36
- lines.push(`secrets: ${listOrNone(manifest.secrets)}`);
37
- lines.push(`dynamic slots: ${listOrNone(findDynamicSlots(manifest).map((slot) => slot.path))}`);
38
- lines.push(`bundle: ${manifest.bundle?.hash ?? "none"}`);
39
- return lines;
40
- };
41
- const hookLines = (manifest) => manifest.hooks.length === 0 ? ["hooks: none"] : [
42
- "hooks:",
43
- ...manifest.hooks.map(
44
- (hook) => ` ${hook.slug} (${hook.export}): ${hook.events.join(", ")}`
45
- )
46
- ];
47
- const reportLines = (report) => [
48
- `compatibility with ${formatProviderRef(report.harness)}: ${report.ok ? "ok" : "incompatible"}`,
49
- ...report.rows.map((row) => ` ${row.item}: ${row.result} (${row.why})`)
50
- ];
51
- const diagnosticLine = (item) => `${item.severity}: ${item.path == null ? "" : `${item.path}: `}${item.message} [${item.code}]`;
52
- const errorDiagnosticsSchema = z.object({
53
- error: z.object({
54
- details: z.object({ diagnostics: z.array(diagnosticSchema) }).nullable()
55
- })
56
- });
1
+ import { isClientError, isRequirementsUnmetError } from "../agent-client/errors.mjs";
57
2
  const errorLines = (cause) => {
58
3
  if (!isClientError(cause))
59
4
  return [`error: ${cause instanceof Error ? cause.message : String(cause)}`];
60
5
  const lines = [`error: ${cause.message}${cause.status === 0 ? "" : ` (HTTP ${cause.status})`}`];
61
- const parsed = errorDiagnosticsSchema.safeParse(cause.body);
62
- for (const item of parsed.success ? parsed.data.error.details?.diagnostics ?? [] : []) {
63
- lines.push(` ${item.severity}: ${item.file == null ? "" : `${item.file}: `}${item.message}`);
64
- }
65
- return lines;
66
- };
67
- const publishResultLines = (result) => {
68
- const revision = result.revision;
69
- const lines = [
70
- `${result.created ? "published" : "already published"}: revision ${revision.number} (${revision.id})`,
71
- `commit: ${revision.commitSha ?? "unknown"}`,
72
- `bundle: ${revision.bundleHash ?? "none"}`
73
- ];
74
- for (const item of result.diagnostics) lines.push(`${item.severity}: ${item.message}`);
75
- for (const channel of result.channels) {
76
- lines.push(`channel ${channel.key} (${channel.bindingId}):`);
77
- for (const route of channel.routes) {
78
- lines.push(` ${route.method} ${route.url ?? route.aliasUrl}`);
79
- if (route.url != null) lines.push(` alias: ${route.aliasUrl}`);
80
- }
81
- if (channel.webhookSecret != null)
82
- lines.push(` signing secret (shown once): ${channel.webhookSecret}`);
83
- }
6
+ if (isRequirementsUnmetError(cause))
7
+ for (const item of cause.requirements)
8
+ lines.push(
9
+ ` ${item.kind} ${item.name}: ${item.problem}${item.detail == null ? "" : ` (${item.detail})`}`
10
+ );
84
11
  return lines;
85
12
  };
86
13
  export {
87
- diagnosticLine,
88
- errorLines,
89
- hookLines,
90
- manifestSummaryLines,
91
- publishResultLines,
92
- reportLines
14
+ errorLines
93
15
  };
94
16
  //# sourceMappingURL=output.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/cli/output.ts"],
4
- "sourcesContent": ["import type { CompatibilityReportIface } from '@finalai/agent-definition/compatibility';\nimport type { DiagnosticIface } from '@finalai/agent-definition/compiler';\nimport {\n findDynamicSlots,\n formatProviderRef,\n isDynamicSlot,\n type AgentManifestIface,\n} from '@finalai/agent-provider';\nimport * as z from 'zod';\nimport { isClientError } from \"../agent-client/errors.mjs\";\nimport { diagnosticSchema, type PublishResultIface } from \"../agent-client/index.mjs\";\n\nexport interface OutputIface {\n stdout: (line: string) => void;\n stderr: (line: string) => void;\n}\n\nconst listOrNone = (items: readonly string[]): string =>\n items.length === 0 ? 'none' : items.join(', ');\n\nexport const manifestSummaryLines = (manifest: AgentManifestIface): string[] => {\n const lines = [`agent: ${manifest.identity.name}`];\n if (manifest.identity.description != null)\n lines.push(`description: ${manifest.identity.description}`);\n lines.push(`harness: ${formatProviderRef(manifest.harness.harness)}`);\n lines.push(\n `mcp servers: ${\n isDynamicSlot(manifest.mcpServers)\n ? 'dynamic'\n : listOrNone(manifest.mcpServers.map((server) => `${server.key} (${server.kind})`))\n }`,\n );\n lines.push(\n `sandboxes: ${\n isDynamicSlot(manifest.sandboxes) ? 'dynamic' : listOrNone(Object.keys(manifest.sandboxes))\n }`,\n );\n lines.push(\n `base tools: ${listOrNone(\n Object.entries(manifest.tools.base).map(\n ([capability, binding]) => `${capability} \u2192 ${binding?.target ?? '?'}`,\n ),\n )}`,\n );\n lines.push(`channels: ${listOrNone(manifest.channels.map((channel) => channel.key))}`);\n lines.push(\n `schedules: ${listOrNone(\n manifest.schedules.map(\n (schedule) => `${schedule.key} (${schedule.cron}, ${schedule.timezone})`,\n ),\n )}`,\n );\n lines.push(`secrets: ${listOrNone(manifest.secrets)}`);\n lines.push(`dynamic slots: ${listOrNone(findDynamicSlots(manifest).map((slot) => slot.path))}`);\n lines.push(`bundle: ${manifest.bundle?.hash ?? 'none'}`);\n return lines;\n};\n\nexport const hookLines = (manifest: AgentManifestIface): string[] =>\n manifest.hooks.length === 0\n ? ['hooks: none']\n : [\n 'hooks:',\n ...manifest.hooks.map(\n (hook) => ` ${hook.slug} (${hook.export}): ${hook.events.join(', ')}`,\n ),\n ];\n\nexport const reportLines = (report: CompatibilityReportIface): string[] => [\n `compatibility with ${formatProviderRef(report.harness)}: ${report.ok ? 'ok' : 'incompatible'}`,\n ...report.rows.map((row) => ` ${row.item}: ${row.result} (${row.why})`),\n];\n\nexport const diagnosticLine = (item: DiagnosticIface): string =>\n `${item.severity}: ${item.path == null ? '' : `${item.path}: `}${item.message} [${item.code}]`;\n\nconst errorDiagnosticsSchema = z.object({\n error: z.object({\n details: z.object({ diagnostics: z.array(diagnosticSchema) }).nullable(),\n }),\n});\n\n// SDK errors with the server's compile diagnostics, when it sent any.\nexport const errorLines = (cause: unknown): string[] => {\n if (!isClientError(cause))\n return [`error: ${cause instanceof Error ? cause.message : String(cause)}`];\n const lines = [`error: ${cause.message}${cause.status === 0 ? '' : ` (HTTP ${cause.status})`}`];\n const parsed = errorDiagnosticsSchema.safeParse(cause.body);\n for (const item of parsed.success ? (parsed.data.error.details?.diagnostics ?? []) : []) {\n lines.push(` ${item.severity}: ${item.file == null ? '' : `${item.file}: `}${item.message}`);\n }\n return lines;\n};\n\nexport const publishResultLines = (result: PublishResultIface): string[] => {\n const revision = result.revision;\n const lines = [\n `${result.created ? 'published' : 'already published'}: revision ${revision.number} (${revision.id})`,\n `commit: ${revision.commitSha ?? 'unknown'}`,\n `bundle: ${revision.bundleHash ?? 'none'}`,\n ];\n for (const item of result.diagnostics) lines.push(`${item.severity}: ${item.message}`);\n for (const channel of result.channels) {\n lines.push(`channel ${channel.key} (${channel.bindingId}):`);\n for (const route of channel.routes) {\n lines.push(` ${route.method} ${route.url ?? route.aliasUrl}`);\n if (route.url != null) lines.push(` alias: ${route.aliasUrl}`);\n }\n if (channel.webhookSecret != null)\n lines.push(` signing secret (shown once): ${channel.webhookSecret}`);\n }\n return lines;\n};\n"],
5
- "mappings": "AAEA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,YAAY,OAAO;AACnB,SAAS,qBAAqB;AAC9B,SAAS,wBAAiD;AAO1D,MAAM,aAAa,CAAC,UAClB,MAAM,WAAW,IAAI,SAAS,MAAM,KAAK,IAAI;AAExC,MAAM,uBAAuB,CAAC,aAA2C;AAC9E,QAAM,QAAQ,CAAC,UAAU,SAAS,SAAS,IAAI,EAAE;AACjD,MAAI,SAAS,SAAS,eAAe;AACnC,UAAM,KAAK,gBAAgB,SAAS,SAAS,WAAW,EAAE;AAC5D,QAAM,KAAK,YAAY,kBAAkB,SAAS,QAAQ,OAAO,CAAC,EAAE;AACpE,QAAM;AAAA,IACJ,gBACE,cAAc,SAAS,UAAU,IAC7B,YACA,WAAW,SAAS,WAAW,IAAI,CAAC,WAAW,GAAG,OAAO,GAAG,KAAK,OAAO,IAAI,GAAG,CAAC,CACtF;AAAA,EACF;AACA,QAAM;AAAA,IACJ,cACE,cAAc,SAAS,SAAS,IAAI,YAAY,WAAW,OAAO,KAAK,SAAS,SAAS,CAAC,CAC5F;AAAA,EACF;AACA,QAAM;AAAA,I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M,OAAO,MAAM,QAAQ,EAAE;AAC7D,UAAI,MAAM,OAAO,KAAM,OAAM,KAAK,cAAc,MAAM,QAAQ,EAAE;AAAA,IAClE;AACA,QAAI,QAAQ,iBAAiB;AAC3B,YAAM,KAAK,kCAAkC,QAAQ,aAAa,EAAE;AAAA,EACxE;AACA,SAAO;AACT;",
4
+ "sourcesContent": ["import { isClientError, isRequirementsUnmetError } from \"../agent-client/errors.mjs\";\n\nexport interface OutputIface {\n stdout: (line: string) => void;\n stderr: (line: string) => void;\n}\n\n// An error as lines for stderr: the message and, for a refused request, its\n// status and anything the platform said was missing.\nexport const errorLines = (cause: unknown): string[] => {\n if (!isClientError(cause))\n return [`error: ${cause instanceof Error ? cause.message : String(cause)}`];\n const lines = [`error: ${cause.message}${cause.status === 0 ? '' : ` (HTTP ${cause.status})`}`];\n if (isRequirementsUnmetError(cause))\n for (const item of cause.requirements)\n lines.push(\n ` ${item.kind} ${item.name}: ${item.problem}${item.detail == null ? '' : ` (${item.detail})`}`,\n );\n return lines;\n};\n"],
5
+ "mappings": "AAAA,SAAS,eAAe,gCAAgC;AASjD,MAAM,aAAa,CAAC,UAA6B;AACtD,MAAI,CAAC,cAAc,KAAK;AACtB,WAAO,CAAC,UAAU,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC,EAAE;AAC5E,QAAM,QAAQ,CAAC,UAAU,MAAM,OAAO,GAAG,MAAM,WAAW,IAAI,KAAK,UAAU,MAAM,MAAM,GAAG,EAAE;AAC9F,MAAI,yBAAyB,KAAK;AAChC,eAAW,QAAQ,MAAM;AACvB,YAAM;AAAA,QACJ,KAAK,KAAK,IAAI,IAAI,KAAK,IAAI,KAAK,KAAK,OAAO,GAAG,KAAK,UAAU,OAAO,KAAK,KAAK,KAAK,MAAM,GAAG;AAAA,MAC/F;AACJ,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/harnesses.ts"],
4
- "sourcesContent": ["export * from '@finalai/final-agent-provider/harnesses';\n"],
5
- "mappings": "AAAA,cAAc;",
4
+ "sourcesContent": ["// Harness settings builders for Final's harnesses (`serverlessPi`,\n// `claudeCode`, ...), the `FinalHarness` names, Final's harness and ACP\n// adapter definitions, and the inference sources a harness pays with\n// (`subscription`, `apiKey`, `finalCredits`, `harnessLogin`).\nexport * from '@finalai/final-agent-provider/harnesses';\n"],
5
+ "mappings": "AAIA,cAAc;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1 @@
1
1
  export * from "./public.mjs";
2
- export { compile } from "./compile.mjs";
3
- export type { CompatibilityReportIface, CompileOptionsIface, CompileResultIface, CompiledBundleIface, DiagnosticCode, DiagnosticIface, DiagnosticSeverity, HarnessDescriptionContextIface, } from "./compile.mjs";
@@ -1,6 +1,2 @@
1
1
  export * from "./public.mjs";
2
- import { compile } from "./compile.mjs";
3
- export {
4
- compile
5
- };
6
2
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/index.ts"],
4
- "sourcesContent": ["export * from \"./public.mjs\";\n\n// Node compiler entrypoint.\nexport { compile } from \"./compile.mjs\";\nexport type {\n CompatibilityReportIface,\n CompileOptionsIface,\n CompileResultIface,\n CompiledBundleIface,\n DiagnosticCode,\n DiagnosticIface,\n DiagnosticSeverity,\n HarnessDescriptionContextIface,\n} from \"./compile.mjs\";\n"],
5
- "mappings": "AAAA,cAAc;AAGd,SAAS,eAAe;",
4
+ "sourcesContent": ["export * from \"./public.mjs\";\n"],
5
+ "mappings": "AAAA,cAAc;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,24 @@
1
+ import { CredentialScope, IntegrationAuthKind, type IntegrationAuthInput } from '@finalai/agent-protocol/agent-platform';
2
+ export { CredentialScope, IntegrationAuthKind, type IntegrationAuthInput };
3
+ /**
4
+ * OAuth against the server's authorization server: each person signs in with
5
+ * their own account (`personal`, the default), or one sign-in serves the
6
+ * whole project (`shared`).
7
+ */
8
+ export declare const oauth: (args?: {
9
+ credential?: CredentialScope | `${CredentialScope}`;
10
+ scopes?: string[];
11
+ }) => IntegrationAuthInput;
12
+ /** A project secret, by name, sent as `Authorization: Bearer <secret>` or in `header`. */
13
+ export declare const secret: (name: string, args?: {
14
+ header?: string;
15
+ }) => IntegrationAuthInput;
16
+ /**
17
+ * A short-lived signed assertion of the calling session, which the server
18
+ * verifies against Final's published keys. `scopes` groups what it grants:
19
+ * `{ api: ['session:requirements'], reach: ['session'] }`.
20
+ */
21
+ export declare const platformIdentity: (scopes?: Record<string, string[]>) => IntegrationAuthInput;
22
+ /** No authentication. */
23
+ export declare const noAuth: () => IntegrationAuthInput;
24
+ export { finalGateway } from '@finalai/final-agent-provider/integrations';
@@ -0,0 +1,30 @@
1
+ import {
2
+ CredentialScope,
3
+ IntegrationAuthKind
4
+ } from "@finalai/agent-protocol/agent-platform";
5
+ const oauth = (args = {}) => ({
6
+ kind: IntegrationAuthKind.OAuth,
7
+ credential: args.credential === "shared" ? CredentialScope.Shared : CredentialScope.Personal,
8
+ ...args.scopes == null ? {} : { scopes: args.scopes }
9
+ });
10
+ const secret = (name, args = {}) => ({
11
+ kind: IntegrationAuthKind.Secret,
12
+ secret: name,
13
+ ...args.header == null ? {} : { header: args.header }
14
+ });
15
+ const platformIdentity = (scopes = {}) => ({
16
+ kind: IntegrationAuthKind.PlatformIdentity,
17
+ scopes
18
+ });
19
+ const noAuth = () => ({ kind: IntegrationAuthKind.None });
20
+ import { finalGateway } from "@finalai/final-agent-provider/integrations";
21
+ export {
22
+ CredentialScope,
23
+ IntegrationAuthKind,
24
+ finalGateway,
25
+ noAuth,
26
+ oauth,
27
+ platformIdentity,
28
+ secret
29
+ };
30
+ //# sourceMappingURL=integrations.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/integrations.ts"],
4
+ "sourcesContent": ["import {\n CredentialScope,\n IntegrationAuthKind,\n type IntegrationAuthInput,\n} from '@finalai/agent-protocol/agent-platform';\n\n// How calls to an integration authenticate, for `project.integrations.create`.\n// A person's own sign-in is runtime state: the platform asks for it on first\n// use, never the agent.\n\nexport { CredentialScope, IntegrationAuthKind, type IntegrationAuthInput };\n\n/**\n * OAuth against the server's authorization server: each person signs in with\n * their own account (`personal`, the default), or one sign-in serves the\n * whole project (`shared`).\n */\nexport const oauth = (\n args: { credential?: CredentialScope | `${CredentialScope}`; scopes?: string[] } = {},\n): IntegrationAuthInput => ({\n kind: IntegrationAuthKind.OAuth,\n credential: args.credential === 'shared' ? CredentialScope.Shared : CredentialScope.Personal,\n ...(args.scopes == null ? {} : { scopes: args.scopes }),\n});\n\n/** A project secret, by name, sent as `Authorization: Bearer <secret>` or in `header`. */\nexport const secret = (name: string, args: { header?: string } = {}): IntegrationAuthInput => ({\n kind: IntegrationAuthKind.Secret,\n secret: name,\n ...(args.header == null ? {} : { header: args.header }),\n});\n\n/**\n * A short-lived signed assertion of the calling session, which the server\n * verifies against Final's published keys. `scopes` groups what it grants:\n * `{ api: ['session:requirements'], reach: ['session'] }`.\n */\nexport const platformIdentity = (scopes: Record<string, string[]> = {}): IntegrationAuthInput => ({\n kind: IntegrationAuthKind.PlatformIdentity,\n scopes,\n});\n\n/** No authentication. */\nexport const noAuth = (): IntegrationAuthInput => ({ kind: IntegrationAuthKind.None });\n\nexport { finalGateway } from '@finalai/final-agent-provider/integrations';\n"],
5
+ "mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AAaA,MAAM,QAAQ,CACnB,OAAmF,CAAC,OAC1D;AAAA,EAC1B,MAAM,oBAAoB;AAAA,EAC1B,YAAY,KAAK,eAAe,WAAW,gBAAgB,SAAS,gBAAgB;AAAA,EACpF,GAAI,KAAK,UAAU,OAAO,CAAC,IAAI,EAAE,QAAQ,KAAK,OAAO;AACvD;AAGO,MAAM,SAAS,CAAC,MAAc,OAA4B,CAAC,OAA6B;AAAA,EAC7F,MAAM,oBAAoB;AAAA,EAC1B,QAAQ;AAAA,EACR,GAAI,KAAK,UAAU,OAAO,CAAC,IAAI,EAAE,QAAQ,KAAK,OAAO;AACvD;AAOO,MAAM,mBAAmB,CAAC,SAAmC,CAAC,OAA6B;AAAA,EAChG,MAAM,oBAAoB;AAAA,EAC1B;AACF;AAGO,MAAM,SAAS,OAA6B,EAAE,MAAM,oBAAoB,KAAK;AAEpF,SAAS,oBAAoB;",
6
+ "names": []
7
+ }
@@ -1,10 +1,10 @@
1
- export { CredentialOwner, CredentialPayer, DELETE, GET, HookEvent, POST, PUT, SandboxWire, WS, always, baseTools, credentials, defineAgent, defineChannel, disableChannel, defineDynamic, defineHarness, defineHostedConnection, defineHook, defineInstructions, defineMcpClientConnection, defineSandbox, defineSandboxProvider, defineSchedule, defineSkill, defineTool, harnessHost, never, toolResultFrom, whenInput, } from "./authoring/index.mjs";
2
- export type { AgentDefinitionInputIface, AgentSessionInfoIface, ApprovalPolicyIface, AuthoredChannelDefinitionIface, AuthoredHarnessCloseContextIface, AuthoredHarnessDescriptionIface, AuthoredHarnessEndpointIface, AuthoredHarnessHealthIface, AuthoredHarnessIface, AuthoredHarnessOpenArgsIface, AuthoredHarnessRefContextIface, AuthoredHarnessResumeArgsIface, BaseToolsValueIface, ConversationInfoIface, CredentialNode, CredentialPolicyIface, DefinedAuthoredHarnessIface, DefinedToolIface, DynamicDefinitionIface, DynamicResolveContextIface, DynamicSentinelIface, FinalPlatformClientIface, HarnessHostIface, HookContextIface, HookDefinitionIface, HookEventIface, HostedConnectionDefinitionIface, McpClientConnectionDefinitionIface, SandboxSelectorContextIface, ScheduleInputIface, SkillDefinitionIface, ToolContextIface, ToolDefinitionIface, } from "./authoring/index.mjs";
3
- export * from "./authoring/providers.mjs";
4
- export type { AgentAvatarIface, AvatarMedia, AvatarState, AgentManifestIface, ChannelDefinitionIface, ChannelCredentialRef, ChannelCredentialHandle, ChannelCredentialsIface, ChannelCredentialSocketIface, ChannelReceiveContextIface, ChannelEventContextIface, ConversationHandle, PersonHandle, PlaceRef, PrincipalRef, RouteDefinitionIface, RoomPlatformIface, ChannelSocketIface, HarnessDescriptionIface, HarnessEndpointIface, HarnessIface, HarnessSessionRefIface, HostedBindingsIface, McpChannelIface, NetworkSandboxSessionIface, ResolvedAgentManifestIface, SandboxMcpEndpoint, SandboxPrepareContextIface, SandboxProcessIface, SandboxProviderHandleIface, SandboxProviderIface, SandboxProviderImplementationIface, SandboxSessionIface, SandboxStartContextIface, ScreenSessionIface, } from '@finalai/agent-provider';
5
- export { requireHostedBinding } from '@finalai/agent-provider';
6
- export { validateHostedBindings } from '@finalai/agent-definition';
7
- export type { HostedBindingRequirementIface } from '@finalai/agent-provider';
8
- export { defineFinalConnection } from '@finalai/final-agent-provider/connections';
9
- export type { FinalConnectionDefinitionIface, FinalHostedConnectionDefinitionIface, } from '@finalai/final-agent-provider/connections';
10
- export { bundleRef, ChannelCredentialKind, ChannelSigningAlgorithm, ChannelSignatureEncoding, ChannelOAuthClientAuthentication, } from "./authoring/index.mjs";
1
+ export * from '@finalai/agent-definition/authoring';
2
+ export { documentOf } from '@finalai/agent-definition';
3
+ export type { AgentAvatarIface, AvatarMedia, AvatarState } from '@finalai/agent-protocol';
4
+ export type { ChannelCredentialsIface, ChannelDefinitionIface, ChannelEventContextIface, ChannelIngressContextIface, ChannelIngressIface, ChannelReceiveContextIface, ChannelRequireIface, ChannelSocketIface, ConversationHandle, PersonHandle, PlaceRef, PrincipalRef, RouteDefinitionIface, } from '@finalai/agent-provider';
5
+ export type { AgentDocumentIface } from '@finalai/agent-provider/document';
6
+ export { HarnessFeature } from '@finalai/agent-provider/document';
7
+ export { PermissionLevel, InferenceSourceKind } from '@finalai/agent-protocol/agent-platform';
8
+ export { AcpTransport, CredentialDelivery, McpTransportKind, PromptWhileRunning, SandboxWire, } from '@finalai/agent-provider/harness';
9
+ export { AdapterConfigurationDelivery, FinalExtension, RuntimeKind, harnessDefinitionHash, acpAdapterDefinitionHash, type AcpAdapterDefinitionIface, type AcpAdapterDefinitionInputIface, type HarnessDefinitionIface, type HarnessDefinitionInputIface, } from '@finalai/agent-provider/harness-definition';
10
+ export type { HarnessProviderCloseArgsIface, HarnessProviderContextIface, HarnessProviderEndpointResultIface, HarnessProviderIface, HarnessProviderOpenArgsIface, HarnessProviderOpenResultIface, HarnessProviderRefusalIface, HarnessProviderRefArgsIface, HarnessProviderResumeArgsIface, } from '@finalai/agent-provider/harness-provider';
@@ -1,84 +1,35 @@
1
+ export * from "@finalai/agent-definition/authoring";
2
+ import { documentOf } from "@finalai/agent-definition";
3
+ import { HarnessFeature } from "@finalai/agent-provider/document";
4
+ import { PermissionLevel, InferenceSourceKind } from "@finalai/agent-protocol/agent-platform";
1
5
  import {
2
- CredentialOwner,
3
- CredentialPayer,
4
- DELETE,
5
- GET,
6
- HookEvent,
7
- POST,
8
- PUT,
9
- SandboxWire,
10
- WS,
11
- always,
12
- baseTools,
13
- credentials,
14
- defineAgent,
15
- defineChannel,
16
- disableChannel,
17
- defineDynamic,
18
- defineHarness,
19
- defineHostedConnection,
20
- defineHook,
21
- defineInstructions,
22
- defineMcpClientConnection,
23
- defineSandbox,
24
- defineSandboxProvider,
25
- defineSchedule,
26
- defineSkill,
27
- defineTool,
28
- harnessHost,
29
- never,
30
- toolResultFrom,
31
- whenInput
32
- } from "./authoring/index.mjs";
33
- export * from "./authoring/providers.mjs";
34
- import { requireHostedBinding } from "@finalai/agent-provider";
35
- import { validateHostedBindings } from "@finalai/agent-definition";
36
- import { defineFinalConnection } from "@finalai/final-agent-provider/connections";
6
+ AcpTransport,
7
+ CredentialDelivery,
8
+ McpTransportKind,
9
+ PromptWhileRunning,
10
+ SandboxWire
11
+ } from "@finalai/agent-provider/harness";
37
12
  import {
38
- bundleRef,
39
- ChannelCredentialKind,
40
- ChannelSigningAlgorithm,
41
- ChannelSignatureEncoding,
42
- ChannelOAuthClientAuthentication
43
- } from "./authoring/index.mjs";
13
+ AdapterConfigurationDelivery,
14
+ FinalExtension,
15
+ RuntimeKind,
16
+ harnessDefinitionHash,
17
+ acpAdapterDefinitionHash
18
+ } from "@finalai/agent-provider/harness-definition";
44
19
  export {
45
- ChannelCredentialKind,
46
- ChannelOAuthClientAuthentication,
47
- ChannelSignatureEncoding,
48
- ChannelSigningAlgorithm,
49
- CredentialOwner,
50
- CredentialPayer,
51
- DELETE,
52
- GET,
53
- HookEvent,
54
- POST,
55
- PUT,
20
+ AcpTransport,
21
+ AdapterConfigurationDelivery,
22
+ CredentialDelivery,
23
+ FinalExtension,
24
+ HarnessFeature,
25
+ InferenceSourceKind,
26
+ McpTransportKind,
27
+ PermissionLevel,
28
+ PromptWhileRunning,
29
+ RuntimeKind,
56
30
  SandboxWire,
57
- WS,
58
- always,
59
- baseTools,
60
- bundleRef,
61
- credentials,
62
- defineAgent,
63
- defineChannel,
64
- defineDynamic,
65
- defineFinalConnection,
66
- defineHarness,
67
- defineHook,
68
- defineHostedConnection,
69
- defineInstructions,
70
- defineMcpClientConnection,
71
- defineSandbox,
72
- defineSandboxProvider,
73
- defineSchedule,
74
- defineSkill,
75
- defineTool,
76
- disableChannel,
77
- harnessHost,
78
- never,
79
- requireHostedBinding,
80
- toolResultFrom,
81
- validateHostedBindings,
82
- whenInput
31
+ acpAdapterDefinitionHash,
32
+ documentOf,
33
+ harnessDefinitionHash
83
34
  };
84
35
  //# sourceMappingURL=public.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/public.ts"],
4
- "sourcesContent": ["// Agent authoring.\nexport {\n CredentialOwner,\n CredentialPayer,\n DELETE,\n GET,\n HookEvent,\n POST,\n PUT,\n SandboxWire,\n WS,\n always,\n baseTools,\n credentials,\n defineAgent,\n defineChannel,\n disableChannel,\n defineDynamic,\n defineHarness,\n defineHostedConnection,\n defineHook,\n defineInstructions,\n defineMcpClientConnection,\n defineSandbox,\n defineSandboxProvider,\n defineSchedule,\n defineSkill,\n defineTool,\n harnessHost,\n never,\n toolResultFrom,\n whenInput,\n} from \"./authoring/index.mjs\";\nexport type {\n AgentDefinitionInputIface,\n AgentSessionInfoIface,\n ApprovalPolicyIface,\n AuthoredChannelDefinitionIface,\n AuthoredHarnessCloseContextIface,\n AuthoredHarnessDescriptionIface,\n AuthoredHarnessEndpointIface,\n AuthoredHarnessHealthIface,\n AuthoredHarnessIface,\n AuthoredHarnessOpenArgsIface,\n AuthoredHarnessRefContextIface,\n AuthoredHarnessResumeArgsIface,\n BaseToolsValueIface,\n ConversationInfoIface,\n CredentialNode,\n CredentialPolicyIface,\n DefinedAuthoredHarnessIface,\n DefinedToolIface,\n DynamicDefinitionIface,\n DynamicResolveContextIface,\n DynamicSentinelIface,\n FinalPlatformClientIface,\n HarnessHostIface,\n HookContextIface,\n HookDefinitionIface,\n HookEventIface,\n HostedConnectionDefinitionIface,\n McpClientConnectionDefinitionIface,\n SandboxSelectorContextIface,\n ScheduleInputIface,\n SkillDefinitionIface,\n ToolContextIface,\n ToolDefinitionIface,\n} from \"./authoring/index.mjs\";\nexport * from \"./authoring/providers.mjs\";\n\nexport type {\n AgentAvatarIface,\n AvatarMedia,\n AvatarState,\n AgentManifestIface,\n ChannelDefinitionIface,\n ChannelCredentialRef,\n ChannelCredentialHandle,\n ChannelCredentialsIface,\n ChannelCredentialSocketIface,\n ChannelReceiveContextIface,\n ChannelEventContextIface,\n ConversationHandle,\n PersonHandle,\n PlaceRef,\n PrincipalRef,\n RouteDefinitionIface,\n RoomPlatformIface,\n ChannelSocketIface,\n HarnessDescriptionIface,\n HarnessEndpointIface,\n HarnessIface,\n HarnessSessionRefIface,\n HostedBindingsIface,\n McpChannelIface,\n NetworkSandboxSessionIface,\n ResolvedAgentManifestIface,\n SandboxMcpEndpoint,\n SandboxPrepareContextIface,\n SandboxProcessIface,\n SandboxProviderHandleIface,\n SandboxProviderIface,\n SandboxProviderImplementationIface,\n SandboxSessionIface,\n SandboxStartContextIface,\n ScreenSessionIface,\n} from '@finalai/agent-provider';\n\nexport { requireHostedBinding } from '@finalai/agent-provider';\nexport { validateHostedBindings } from '@finalai/agent-definition';\nexport type { HostedBindingRequirementIface } from '@finalai/agent-provider';\n\nexport { defineFinalConnection } from '@finalai/final-agent-provider/connections';\nexport type {\n FinalConnectionDefinitionIface,\n FinalHostedConnectionDefinitionIface,\n} from '@finalai/final-agent-provider/connections';\n\nexport {\n bundleRef,\n ChannelCredentialKind,\n ChannelSigningAlgorithm,\n ChannelSignatureEncoding,\n ChannelOAuthClientAuthentication,\n} from \"./authoring/index.mjs\";\n"],
5
- "mappings": "AACA;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,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,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAoCP,cAAc;AAwCd,SAAS,4BAA4B;AACrC,SAAS,8BAA8B;AAGvC,SAAS,6BAA6B;AAMtC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
4
+ "sourcesContent": ["// Agent authoring: an agent is a value that lists every part explicitly and\n// states what it requires. `documentOf(agent)` is its document (data).\nexport * from '@finalai/agent-definition/authoring';\nexport { documentOf } from '@finalai/agent-definition';\n\nexport type { AgentAvatarIface, AvatarMedia, AvatarState } from '@finalai/agent-protocol';\nexport type {\n ChannelCredentialsIface,\n ChannelDefinitionIface,\n ChannelEventContextIface,\n ChannelIngressContextIface,\n ChannelIngressIface,\n ChannelReceiveContextIface,\n ChannelRequireIface,\n ChannelSocketIface,\n ConversationHandle,\n PersonHandle,\n PlaceRef,\n PrincipalRef,\n RouteDefinitionIface,\n} from '@finalai/agent-provider';\nexport type { AgentDocumentIface } from '@finalai/agent-provider/document';\n\n// Harness and ACP adapter definitions (defineHarness, defineAcpAdapter) and\n// the values they take.\nexport { HarnessFeature } from '@finalai/agent-provider/document';\nexport { PermissionLevel, InferenceSourceKind } from '@finalai/agent-protocol/agent-platform';\nexport {\n AcpTransport,\n CredentialDelivery,\n McpTransportKind,\n PromptWhileRunning,\n SandboxWire,\n} from '@finalai/agent-provider/harness';\nexport {\n AdapterConfigurationDelivery,\n FinalExtension,\n RuntimeKind,\n harnessDefinitionHash,\n acpAdapterDefinitionHash,\n type AcpAdapterDefinitionIface,\n type AcpAdapterDefinitionInputIface,\n type HarnessDefinitionIface,\n type HarnessDefinitionInputIface,\n} from '@finalai/agent-provider/harness-definition';\nexport type {\n HarnessProviderCloseArgsIface,\n HarnessProviderContextIface,\n HarnessProviderEndpointResultIface,\n HarnessProviderIface,\n HarnessProviderOpenArgsIface,\n HarnessProviderOpenResultIface,\n HarnessProviderRefusalIface,\n HarnessProviderRefArgsIface,\n HarnessProviderResumeArgsIface,\n} from '@finalai/agent-provider/harness-provider';\n"],
5
+ "mappings": "AAEA,cAAc;AACd,SAAS,kBAAkB;AAsB3B,SAAS,sBAAsB;AAC/B,SAAS,iBAAiB,2BAA2B;AACrD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;",
6
6
  "names": []
7
7
  }
@@ -1 +1,3 @@
1
1
  export * from '@finalai/final-agent-provider/sandboxes';
2
+ export { defineSandboxSetup } from '@finalai/agent-provider/sandbox/setup';
3
+ export type { SandboxSetupIface, SandboxSetupInputIface, } from '@finalai/agent-provider/sandbox/setup';
@@ -1,2 +1,6 @@
1
1
  export * from "@finalai/final-agent-provider/sandboxes";
2
+ import { defineSandboxSetup } from "@finalai/agent-provider/sandbox/setup";
3
+ export {
4
+ defineSandboxSetup
5
+ };
2
6
  //# sourceMappingURL=sandboxes.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/sandboxes.ts"],
4
- "sourcesContent": ["export * from '@finalai/final-agent-provider/sandboxes';\n"],
5
- "mappings": "AAAA,cAAc;",
4
+ "sourcesContent": ["// Sandbox environments from Final's providers (`computer`, `device`), and the\n// provider-neutral setup of what should be on a machine.\nexport * from '@finalai/final-agent-provider/sandboxes';\nexport { defineSandboxSetup } from '@finalai/agent-provider/sandbox/setup';\nexport type {\n SandboxSetupIface,\n SandboxSetupInputIface,\n} from '@finalai/agent-provider/sandbox/setup';\n"],
5
+ "mappings": "AAEA,cAAc;AACd,SAAS,0BAA0B;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1 @@
1
+ export * from '@finalai/agent-protocol/identity';
@@ -0,0 +1,2 @@
1
+ export * from "@finalai/agent-protocol/identity";
2
+ //# sourceMappingURL=verify.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/verify.ts"],
4
+ "sourcesContent": ["// `@finalai/agents/verify`: verifiers for the tokens the agent platform and\n// its authorization server sign (platform-identity assertions, access tokens\n// and human-input attestations). WebCrypto only, so they run in any modern runtime.\nexport * from '@finalai/agent-protocol/identity';\n"],
5
+ "mappings": "AAGA,cAAc;",
6
+ "names": []
7
+ }
@@ -0,0 +1,37 @@
1
+ import { type EventDeliveryIface } from '@finalai/agent-protocol/agent-platform/events';
2
+ /** How far a delivery's timestamp may be from the receiver's clock. */
3
+ export declare const DEFAULT_WEBHOOK_TOLERANCE_SECONDS: number;
4
+ /** Why a delivery was refused. */
5
+ export declare enum WebhookRefusal {
6
+ MissingHeaders = "missing_headers",
7
+ StaleTimestamp = "stale_timestamp",
8
+ BadSignature = "bad_signature",
9
+ InvalidPayload = "invalid_payload"
10
+ }
11
+ export type WebhookVerificationType = {
12
+ ok: true;
13
+ id: string;
14
+ delivery: EventDeliveryIface;
15
+ } | {
16
+ ok: false;
17
+ refusal: WebhookRefusal;
18
+ };
19
+ /** A `Headers`, or a plain record such as Node's `IncomingHttpHeaders`. */
20
+ export type WebhookHeadersInput = Headers | Readonly<Record<string, string | readonly string[] | undefined>>;
21
+ export interface VerifyWebhookArgsIface {
22
+ /** The request body exactly as received; parsing and re-serializing breaks the signature. */
23
+ payload: string;
24
+ headers: WebhookHeadersInput;
25
+ /** The subscription's `signingSecret`. */
26
+ secret: string;
27
+ toleranceSeconds?: number;
28
+ /** Seam for the receiver's clock, in epoch ms. */
29
+ now?: number;
30
+ }
31
+ /**
32
+ * Checks a delivery's signature and timestamp, then parses its body. Event
33
+ * kinds this package predates read as unrecognized events rather than failing.
34
+ * A delivery may repeat: deduplicate by the returned `id` (and events by theirs).
35
+ */
36
+ export declare const verifyWebhook: (args: VerifyWebhookArgsIface) => Promise<WebhookVerificationType>;
37
+ export { EventSubscriptionState, PlatformEventKind, WEBHOOK_ID_HEADER, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, type EventDeliveryIface, type PlatformEventType, } from '@finalai/agent-protocol/agent-platform/events';
@@ -0,0 +1,100 @@
1
+ import {
2
+ eventDeliverySchema,
3
+ WEBHOOK_ID_HEADER,
4
+ WEBHOOK_SIGNATURE_HEADER,
5
+ WEBHOOK_TIMESTAMP_HEADER
6
+ } from "@finalai/agent-protocol/agent-platform/events";
7
+ const DEFAULT_WEBHOOK_TOLERANCE_SECONDS = 5 * 60;
8
+ const SECRET_PREFIX = "whsec_";
9
+ const SIGNATURE_VERSION = "v1";
10
+ var WebhookRefusal = /* @__PURE__ */ ((WebhookRefusal2) => {
11
+ WebhookRefusal2["MissingHeaders"] = "missing_headers";
12
+ WebhookRefusal2["StaleTimestamp"] = "stale_timestamp";
13
+ WebhookRefusal2["BadSignature"] = "bad_signature";
14
+ WebhookRefusal2["InvalidPayload"] = "invalid_payload";
15
+ return WebhookRefusal2;
16
+ })(WebhookRefusal || {});
17
+ const headerOf = (headers, name) => {
18
+ if (headers instanceof Headers) return headers.get(name);
19
+ for (const [key, value] of Object.entries(headers)) {
20
+ if (key.toLowerCase() !== name || value == null) continue;
21
+ return typeof value === "string" ? value : value[0] ?? null;
22
+ }
23
+ return null;
24
+ };
25
+ const base64Bytes = (text) => {
26
+ if (!/^[A-Za-z0-9+/]*={0,2}$/u.test(text)) return null;
27
+ try {
28
+ const binary = atob(text);
29
+ const bytes = new Uint8Array(new ArrayBuffer(binary.length));
30
+ for (let index = 0; index < binary.length; index += 1) bytes[index] = binary.charCodeAt(index);
31
+ return bytes;
32
+ } catch {
33
+ return null;
34
+ }
35
+ };
36
+ const refused = (refusal) => ({
37
+ ok: false,
38
+ refusal
39
+ });
40
+ const verifyWebhook = async (args) => {
41
+ const id = headerOf(args.headers, WEBHOOK_ID_HEADER);
42
+ const timestamp = headerOf(args.headers, WEBHOOK_TIMESTAMP_HEADER);
43
+ const signatures = headerOf(args.headers, WEBHOOK_SIGNATURE_HEADER);
44
+ if (id == null || timestamp == null || signatures == null || !/^\d{1,12}$/u.test(timestamp))
45
+ return refused("missing_headers" /* MissingHeaders */);
46
+ const nowSeconds = Math.floor((args.now ?? Date.now()) / 1e3);
47
+ const tolerance = args.toleranceSeconds ?? DEFAULT_WEBHOOK_TOLERANCE_SECONDS;
48
+ if (Math.abs(nowSeconds - Number(timestamp)) > tolerance)
49
+ return refused("stale_timestamp" /* StaleTimestamp */);
50
+ const secret = base64Bytes(
51
+ args.secret.startsWith(SECRET_PREFIX) ? args.secret.slice(SECRET_PREFIX.length) : args.secret
52
+ );
53
+ if (secret == null || secret.length === 0) return refused("bad_signature" /* BadSignature */);
54
+ const key = await globalThis.crypto.subtle.importKey(
55
+ "raw",
56
+ secret,
57
+ { name: "HMAC", hash: "SHA-256" },
58
+ false,
59
+ ["verify"]
60
+ );
61
+ const signed = new TextEncoder().encode(`${id}.${timestamp}.${args.payload}`);
62
+ let matched = false;
63
+ for (const entry of signatures.split(" ")) {
64
+ const comma = entry.indexOf(",");
65
+ if (comma < 0 || entry.slice(0, comma) !== SIGNATURE_VERSION) continue;
66
+ const signature = base64Bytes(entry.slice(comma + 1));
67
+ if (signature != null && await globalThis.crypto.subtle.verify("HMAC", key, signature, signed)) {
68
+ matched = true;
69
+ break;
70
+ }
71
+ }
72
+ if (!matched) return refused("bad_signature" /* BadSignature */);
73
+ let body;
74
+ try {
75
+ body = JSON.parse(args.payload);
76
+ } catch {
77
+ return refused("invalid_payload" /* InvalidPayload */);
78
+ }
79
+ const delivery = eventDeliverySchema.safeParse(body);
80
+ if (!delivery.success) return refused("invalid_payload" /* InvalidPayload */);
81
+ return { ok: true, id, delivery: delivery.data };
82
+ };
83
+ import {
84
+ EventSubscriptionState,
85
+ PlatformEventKind,
86
+ WEBHOOK_ID_HEADER as WEBHOOK_ID_HEADER2,
87
+ WEBHOOK_SIGNATURE_HEADER as WEBHOOK_SIGNATURE_HEADER2,
88
+ WEBHOOK_TIMESTAMP_HEADER as WEBHOOK_TIMESTAMP_HEADER2
89
+ } from "@finalai/agent-protocol/agent-platform/events";
90
+ export {
91
+ DEFAULT_WEBHOOK_TOLERANCE_SECONDS,
92
+ EventSubscriptionState,
93
+ PlatformEventKind,
94
+ WEBHOOK_ID_HEADER2 as WEBHOOK_ID_HEADER,
95
+ WEBHOOK_SIGNATURE_HEADER2 as WEBHOOK_SIGNATURE_HEADER,
96
+ WEBHOOK_TIMESTAMP_HEADER2 as WEBHOOK_TIMESTAMP_HEADER,
97
+ WebhookRefusal,
98
+ verifyWebhook
99
+ };
100
+ //# sourceMappingURL=webhooks.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/webhooks.ts"],
4
+ "sourcesContent": ["// `@finalai/agents/webhooks`: verifies an event subscription's deliveries.\n// Deliveries are signed per Standard Webhooks (`webhook-id`,\n// `webhook-timestamp`, `webhook-signature: v1,<base64 HMAC-SHA256>`), so any\n// Standard Webhooks verifier works too. WebCrypto only: runs in Node, Workers,\n// Deno and browsers.\n\nimport {\n eventDeliverySchema,\n WEBHOOK_ID_HEADER,\n WEBHOOK_SIGNATURE_HEADER,\n WEBHOOK_TIMESTAMP_HEADER,\n type EventDeliveryIface,\n} from '@finalai/agent-protocol/agent-platform/events';\n\n/** How far a delivery's timestamp may be from the receiver's clock. */\nexport const DEFAULT_WEBHOOK_TOLERANCE_SECONDS = 5 * 60;\n\nconst SECRET_PREFIX = 'whsec_';\n\nconst SIGNATURE_VERSION = 'v1';\n\n/** Why a delivery was refused. */\nexport enum WebhookRefusal {\n // A `webhook-*` header is missing or malformed.\n MissingHeaders = 'missing_headers',\n // The timestamp is outside the tolerance (a replay, or a skewed clock).\n StaleTimestamp = 'stale_timestamp',\n // No `v1` signature matches the body under the secret.\n BadSignature = 'bad_signature',\n // The signature matches, but the body is not a delivery.\n InvalidPayload = 'invalid_payload',\n}\n\nexport type WebhookVerificationType =\n | { ok: true; id: string; delivery: EventDeliveryIface }\n | { ok: false; refusal: WebhookRefusal };\n\n/** A `Headers`, or a plain record such as Node's `IncomingHttpHeaders`. */\nexport type WebhookHeadersInput =\n | Headers\n | Readonly<Record<string, string | readonly string[] | undefined>>;\n\nexport interface VerifyWebhookArgsIface {\n /** The request body exactly as received; parsing and re-serializing breaks the signature. */\n payload: string;\n headers: WebhookHeadersInput;\n /** The subscription's `signingSecret`. */\n secret: string;\n toleranceSeconds?: number;\n /** Seam for the receiver's clock, in epoch ms. */\n now?: number;\n}\n\nconst headerOf = (headers: WebhookHeadersInput, name: string): string | null => {\n if (headers instanceof Headers) return headers.get(name);\n for (const [key, value] of Object.entries(headers)) {\n if (key.toLowerCase() !== name || value == null) continue;\n return typeof value === 'string' ? value : (value[0] ?? null);\n }\n return null;\n};\n\nconst base64Bytes = (text: string): Uint8Array<ArrayBuffer> | null => {\n if (!/^[A-Za-z0-9+/]*={0,2}$/u.test(text)) return null;\n try {\n const binary = atob(text);\n const bytes = new Uint8Array(new ArrayBuffer(binary.length));\n for (let index = 0; index < binary.length; index += 1) bytes[index] = binary.charCodeAt(index);\n return bytes;\n } catch {\n return null;\n }\n};\n\nconst refused = (refusal: WebhookRefusal): { ok: false; refusal: WebhookRefusal } => ({\n ok: false,\n refusal,\n});\n\n/**\n * Checks a delivery's signature and timestamp, then parses its body. Event\n * kinds this package predates read as unrecognized events rather than failing.\n * A delivery may repeat: deduplicate by the returned `id` (and events by theirs).\n */\nexport const verifyWebhook = async (\n args: VerifyWebhookArgsIface,\n): Promise<WebhookVerificationType> => {\n const id = headerOf(args.headers, WEBHOOK_ID_HEADER);\n const timestamp = headerOf(args.headers, WEBHOOK_TIMESTAMP_HEADER);\n const signatures = headerOf(args.headers, WEBHOOK_SIGNATURE_HEADER);\n if (id == null || timestamp == null || signatures == null || !/^\\d{1,12}$/u.test(timestamp))\n return refused(WebhookRefusal.MissingHeaders);\n const nowSeconds = Math.floor((args.now ?? Date.now()) / 1000);\n const tolerance = args.toleranceSeconds ?? DEFAULT_WEBHOOK_TOLERANCE_SECONDS;\n if (Math.abs(nowSeconds - Number(timestamp)) > tolerance)\n return refused(WebhookRefusal.StaleTimestamp);\n\n const secret = base64Bytes(\n args.secret.startsWith(SECRET_PREFIX) ? args.secret.slice(SECRET_PREFIX.length) : args.secret,\n );\n if (secret == null || secret.length === 0) return refused(WebhookRefusal.BadSignature);\n const key = await globalThis.crypto.subtle.importKey(\n 'raw',\n secret,\n { name: 'HMAC', hash: 'SHA-256' },\n false,\n ['verify'],\n );\n const signed = new TextEncoder().encode(`${id}.${timestamp}.${args.payload}`);\n let matched = false;\n for (const entry of signatures.split(' ')) {\n const comma = entry.indexOf(',');\n if (comma < 0 || entry.slice(0, comma) !== SIGNATURE_VERSION) continue;\n const signature = base64Bytes(entry.slice(comma + 1));\n // `verify` compares in constant time.\n if (\n signature != null &&\n (await globalThis.crypto.subtle.verify('HMAC', key, signature, signed))\n ) {\n matched = true;\n break;\n }\n }\n if (!matched) return refused(WebhookRefusal.BadSignature);\n\n let body: unknown;\n try {\n body = JSON.parse(args.payload);\n } catch {\n return refused(WebhookRefusal.InvalidPayload);\n }\n const delivery = eventDeliverySchema.safeParse(body);\n if (!delivery.success) return refused(WebhookRefusal.InvalidPayload);\n return { ok: true, id, delivery: delivery.data };\n};\n\nexport {\n EventSubscriptionState,\n PlatformEventKind,\n WEBHOOK_ID_HEADER,\n WEBHOOK_SIGNATURE_HEADER,\n WEBHOOK_TIMESTAMP_HEADER,\n type EventDeliveryIface,\n type PlatformEventType,\n} from '@finalai/agent-protocol/agent-platform/events';\n"],
5
+ "mappings": "AAMA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAGA,MAAM,oCAAoC,IAAI;AAErD,MAAM,gBAAgB;AAEtB,MAAM,oBAAoB;AAGnB,IAAK,iBAAL,kBAAKA,oBAAL;AAEL,EAAAA,gBAAA,oBAAiB;AAEjB,EAAAA,gBAAA,oBAAiB;AAEjB,EAAAA,gBAAA,kBAAe;AAEf,EAAAA,gBAAA,oBAAiB;AARP,SAAAA;AAAA,GAAA;AA+BZ,MAAM,WAAW,CAAC,SAA8B,SAAgC;AAC9E,MAAI,mBAAmB,QAAS,QAAO,QAAQ,IAAI,IAAI;AACvD,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,OAAO,GAAG;AAClD,QAAI,IAAI,YAAY,MAAM,QAAQ,SAAS,KAAM;AACjD,WAAO,OAAO,UAAU,WAAW,QAAS,MAAM,CAAC,KAAK;AAAA,EAC1D;AACA,SAAO;AACT;AAEA,MAAM,cAAc,CAAC,SAAiD;AACpE,MAAI,CAAC,0BAA0B,KAAK,IAAI,EAAG,QAAO;AAClD,MAAI;AACF,UAAM,SAAS,KAAK,IAAI;AACxB,UAAM,QAAQ,IAAI,WAAW,IAAI,YAAY,OAAO,MAAM,CAAC;AAC3D,aAAS,QAAQ,GAAG,QAAQ,OAAO,QAAQ,SAAS,EAAG,OAAM,KAAK,IAAI,OAAO,WAAW,KAAK;AAC7F,WAAO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