@finalai/agents 0.1.4 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/HOSTING.md CHANGED
@@ -21,6 +21,24 @@ Neither rewrites authored URLs. A GitHub-backed definition uses remote source;
21
21
  push edits before explicitly publishing a ref. Caller API keys never become agent
22
22
  credentials merely because they were used to publish.
23
23
 
24
+ ## Hosted model resolution (SDK 0.2.0)
25
+
26
+ Hosted Final, Pi, Codex and Claude configurations accept string model references.
27
+ `serverless*ConfigSchema.parse(...).model` can be undefined: the host must choose
28
+ its catalog default, resolve aliases and validate availability before dispatch.
29
+ The host owns current candidates, runtime capabilities and dated prices, and
30
+ advertises picker choices through its harness descriptions. Compilation remains
31
+ offline and checks reference syntax.
32
+
33
+ SDK 0.2.0 removes `@finalai/agents/models` and
34
+ `@finalai/final-agent-provider/harnesses/models`, including their model arrays,
35
+ defaults, model-ID unions and pricing helpers. Migrate callers to string model
36
+ references and host-owned discovery, metadata and pricing.
37
+
38
+ Publish the SDK release before upgrading host dependencies. Ship the host's
39
+ catalog/default implementation together with its SDK dependency upgrade; a host
40
+ that only changes the dependency will lose the old default and catalog APIs.
41
+
24
42
  ## Hosted connections
25
43
 
26
44
  ```ts
@@ -99,15 +117,37 @@ export default defineFinalConnection({
99
117
  });
100
118
  ```
101
119
 
102
- Without `load`, the harness lists every exposed tool, as before. With it, the host
103
- lists only the loaded tools and must keep every other exposed tool reachable: it
104
- serves a search over the connection's remaining exposed tools (name, description,
105
- input schema) and a call that runs a found tool by its real name, with the same
106
- exposure and approval checks as a direct call. A host may instead add a found tool
107
- to the list and send `notifications/tools/list_changed`; harnesses that ignore that
108
- notification still need the call path. `load: []` leaves every tool to search.
109
- Entries are tool names or `*` patterns. `isToolLoaded` from `@finalai/agent-provider`
110
- applies the rule after exposure.
120
+ With `load`, the host lists only the loaded tools and must keep every other exposed
121
+ tool reachable: it serves a search over the connection's remaining exposed tools
122
+ (name, description, input schema) and a call that runs a found tool by its real
123
+ name, with the same exposure and approval checks as a direct call. A host may
124
+ instead add a found tool to the list and send `notifications/tools/list_changed`;
125
+ harnesses that ignore that notification still need the call path. `load: []`
126
+ leaves every tool to search. Entries are tool names or `*` patterns.
127
+ `isToolLoaded` from `@finalai/agent-provider` applies the rule after exposure.
128
+
129
+ Without `load`, the harness lists the connection's exposed tools except:
130
+
131
+ - **Connector tools.** A server can label a tool with the connector it belongs to
132
+ in the tool's `_meta`:
133
+ `{ "ai.final/connector": { "namespace": "salesforce", "name": "Salesforce" } }`.
134
+ The namespace identifies the connector (unique within the server's tools); the
135
+ name is for display, and two connectors may share one. Final's server labels
136
+ every connector tool with the namespace and name of the install it comes from.
137
+ The host never lists labelled tools up front. Its search tool names each
138
+ connector and how many tools it has, so the agent knows what is connected
139
+ without any of those definitions in its context, and searches for the tools it
140
+ needs. A `load` entry that names a labelled tool still lists it.
141
+ - **Tools past a size limit.** When a connection exposes more unlabelled tools
142
+ than the host lists directly (100 in Final's host), those are searched too.
143
+
144
+ A harness that declares `supports.deferredToolSearch` defers and searches tools
145
+ itself, so the host lists every exposed tool to it and serves no search.
146
+
147
+ A host's search should name the connectors it covers and accept a connector's
148
+ namespace to narrow to. Once a host has listed its search and call tools, it keeps answering them for
149
+ that harness even if the connection stops hiding tools, unless the connection
150
+ then lists its own tool by one of those names.
111
151
 
112
152
  ## Selecting tools by annotation
113
153
 
@@ -1,2 +1,2 @@
1
- export type { ClaudeModelId, CodexCliModelId, CodexResponsesLiteModelId, FinalHarnessModelId, HarnessBindingOutputIface, LocalStdioConfigInputIface, PiModelId, RemoteAcpConfigInputIface, RemoteClaudeCodeConfigInputIface, RemoteClientTlsInputIface, RemoteCodexConfigInputIface, RemotePiConfigInputIface, SecretRefIface, ServerlessFinalConfigInputIface, ServerlessNanocodeClaudeConfigInputIface, ServerlessNanocodeCodexConfigInputIface, ServerlessPiConfigInputIface, } from '@finalai/final-agent-provider/harnesses';
1
+ export type { HarnessBindingOutputIface, LocalStdioConfigInputIface, RemoteAcpConfigInputIface, RemoteClaudeCodeConfigInputIface, RemoteClientTlsInputIface, RemoteCodexConfigInputIface, RemotePiConfigInputIface, SecretRefIface, ServerlessFinalConfigInputIface, ServerlessNanocodeClaudeConfigInputIface, ServerlessNanocodeCodexConfigInputIface, ServerlessPiConfigInputIface, } from '@finalai/final-agent-provider/harnesses';
2
2
  export type { ComputerInlineGuideInputIface, ComputerInputIface, ComputerParametersInputIface, ComputerRepositoryInputIface, ComputerSetupGuideInputIface, DeviceInputIface, InstalledSandboxEnvironmentIface, InstalledSandboxOpenRequestIface, SandboxOpenInputIface, } from '@finalai/final-agent-provider/sandboxes';
@@ -2,7 +2,6 @@ import { fileURLToPath } from "node:url";
2
2
  const compile = async (options) => {
3
3
  const finalAuthoringModules = [
4
4
  "harnesses",
5
- "harnesses/models",
6
5
  "harnesses/config-fields",
7
6
  "harnesses/serverless-final",
8
7
  "harnesses/serverless-pi",
@@ -32,9 +31,6 @@ const compile = async (options) => {
32
31
  "@finalai/agents/harnesses": fileURLToPath(
33
32
  import.meta.resolve("@finalai/final-agent-provider/harnesses")
34
33
  ),
35
- "@finalai/agents/models": fileURLToPath(
36
- import.meta.resolve("@finalai/final-agent-provider/harnesses/models")
37
- ),
38
34
  "@finalai/agents/sandboxes": fileURLToPath(
39
35
  import.meta.resolve("@finalai/final-agent-provider/sandboxes")
40
36
  ),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/compile.ts"],
4
- "sourcesContent": ["import type { CompileOptionsIface, CompileResultIface } from '@finalai/agent-definition/compiler';\nimport { fileURLToPath } from 'node:url';\nexport const compile = async (options: CompileOptionsIface): Promise<CompileResultIface> => {\n const finalAuthoringModules = [\n 'harnesses',\n 'harnesses/models',\n 'harnesses/config-fields',\n 'harnesses/serverless-final',\n 'harnesses/serverless-pi',\n 'harnesses/serverless-nanocode-codex',\n 'harnesses/serverless-nanocode-claude',\n 'harnesses/remote-pi',\n 'harnesses/remote-codex',\n 'harnesses/remote-claude-code',\n 'harnesses/remote-acp',\n 'harnesses/local-stdio',\n 'sandboxes',\n 'sandboxes/computer',\n 'sandboxes/device',\n 'sandboxes/environment',\n 'connections',\n 'channels/final',\n 'channel-factories',\n ].map((path) => '@finalai/final-agent-provider/' + path);\n const providerModules = {\n ...Object.fromEntries(\n finalAuthoringModules.map((specifier) => [\n specifier,\n fileURLToPath(import.meta.resolve(specifier)),\n ]),\n ),\n '@finalai/agents': fileURLToPath(import.meta.resolve('@finalai/agents/authoring')),\n '@finalai/agents/harnesses': fileURLToPath(\n import.meta.resolve('@finalai/final-agent-provider/harnesses'),\n ),\n '@finalai/agents/models': fileURLToPath(\n import.meta.resolve('@finalai/final-agent-provider/harnesses/models'),\n ),\n '@finalai/agents/sandboxes': fileURLToPath(\n import.meta.resolve('@finalai/final-agent-provider/sandboxes'),\n ),\n '@finalai/agents/channels/final': fileURLToPath(\n import.meta.resolve('@finalai/final-agent-provider/channels/final'),\n ),\n ...options.providerModules,\n };\n return (await import('@finalai/agent-definition/compiler')).compile({\n defaultFiles: {\n 'channels/final.ts':\n \"import { finalChannel } from '@finalai/agents/channels/final'; export default finalChannel();\",\n },\n ...options,\n providerModules,\n installedSandboxProviders: {\n computer: '@finalai/final-agent-provider/sandboxes/computer',\n device: '@finalai/final-agent-provider/sandboxes/device',\n ...options.installedSandboxProviders,\n },\n });\n};\nexport type {\n CompatibilityReportIface,\n CompiledBundleIface,\n CompileOptionsIface,\n CompileResultIface,\n DiagnosticCode,\n DiagnosticIface,\n DiagnosticSeverity,\n HarnessDescriptionContextIface,\n} from '@finalai/agent-definition/compiler';\n"],
5
- "mappings": "AACA,SAAS,qBAAqB;AACvB,MAAM,UAAU,OAAO,YAA8D;AAC1F,QAAM,wBAAwB;AAAA,IAC5B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,IAAI,CAAC,SAAS,mCAAmC,IAAI;AACvD,QAAM,kBAAkB;AAAA,IACtB,GAAG,OAAO;AAAA,MACR,sBAAsB,IAAI,CAAC,cAAc;AAAA,QACvC;AAAA,QACA,cAAc,YAAY,QAAQ,SAAS,CAAC;AAAA,MAC9C,CAAC;AAAA,IACH;AAAA,IACA,mBAAmB,cAAc,YAAY,QAAQ,2BAA2B,CAAC;AAAA,IACjF,6BAA6B;AAAA,MAC3B,YAAY,QAAQ,yCAAyC;AAAA,IAC/D;AAAA,IACA,0BAA0B;AAAA,MACxB,YAAY,QAAQ,gDAAgD;AAAA,IACtE;AAAA,IACA,6BAA6B;AAAA,MAC3B,YAAY,QAAQ,yCAAyC;AAAA,IAC/D;AAAA,IACA,kCAAkC;AAAA,MAChC,YAAY,QAAQ,8CAA8C;AAAA,IACpE;AAAA,IACA,GAAG,QAAQ;AAAA,EACb;AACA,UAAQ,MAAM,OAAO,oCAAoC,GAAG,QAAQ;AAAA,IAClE,cAAc;AAAA,MACZ,qBACE;AAAA,IACJ;AAAA,IACA,GAAG;AAAA,IACH;AAAA,IACA,2BAA2B;AAAA,MACzB,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,GAAG,QAAQ;AAAA,IACb;AAAA,EACF,CAAC;AACH;",
4
+ "sourcesContent": ["import type { CompileOptionsIface, CompileResultIface } from '@finalai/agent-definition/compiler';\nimport { fileURLToPath } from 'node:url';\nexport const compile = async (options: CompileOptionsIface): Promise<CompileResultIface> => {\n const finalAuthoringModules = [\n 'harnesses',\n 'harnesses/config-fields',\n 'harnesses/serverless-final',\n 'harnesses/serverless-pi',\n 'harnesses/serverless-nanocode-codex',\n 'harnesses/serverless-nanocode-claude',\n 'harnesses/remote-pi',\n 'harnesses/remote-codex',\n 'harnesses/remote-claude-code',\n 'harnesses/remote-acp',\n 'harnesses/local-stdio',\n 'sandboxes',\n 'sandboxes/computer',\n 'sandboxes/device',\n 'sandboxes/environment',\n 'connections',\n 'channels/final',\n 'channel-factories',\n ].map((path) => '@finalai/final-agent-provider/' + path);\n const providerModules = {\n ...Object.fromEntries(\n finalAuthoringModules.map((specifier) => [\n specifier,\n fileURLToPath(import.meta.resolve(specifier)),\n ]),\n ),\n '@finalai/agents': fileURLToPath(import.meta.resolve('@finalai/agents/authoring')),\n '@finalai/agents/harnesses': fileURLToPath(\n import.meta.resolve('@finalai/final-agent-provider/harnesses'),\n ),\n '@finalai/agents/sandboxes': fileURLToPath(\n import.meta.resolve('@finalai/final-agent-provider/sandboxes'),\n ),\n '@finalai/agents/channels/final': fileURLToPath(\n import.meta.resolve('@finalai/final-agent-provider/channels/final'),\n ),\n ...options.providerModules,\n };\n return (await import('@finalai/agent-definition/compiler')).compile({\n defaultFiles: {\n 'channels/final.ts':\n \"import { finalChannel } from '@finalai/agents/channels/final'; export default finalChannel();\",\n },\n ...options,\n providerModules,\n installedSandboxProviders: {\n computer: '@finalai/final-agent-provider/sandboxes/computer',\n device: '@finalai/final-agent-provider/sandboxes/device',\n ...options.installedSandboxProviders,\n },\n });\n};\nexport type {\n CompatibilityReportIface,\n CompiledBundleIface,\n CompileOptionsIface,\n CompileResultIface,\n DiagnosticCode,\n DiagnosticIface,\n DiagnosticSeverity,\n HarnessDescriptionContextIface,\n} from '@finalai/agent-definition/compiler';\n"],
5
+ "mappings": "AACA,SAAS,qBAAqB;AACvB,MAAM,UAAU,OAAO,YAA8D;AAC1F,QAAM,wBAAwB;AAAA,IAC5B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,IAAI,CAAC,SAAS,mCAAmC,IAAI;AACvD,QAAM,kBAAkB;AAAA,IACtB,GAAG,OAAO;AAAA,MACR,sBAAsB,IAAI,CAAC,cAAc;AAAA,QACvC;AAAA,QACA,cAAc,YAAY,QAAQ,SAAS,CAAC;AAAA,MAC9C,CAAC;AAAA,IACH;AAAA,IACA,mBAAmB,cAAc,YAAY,QAAQ,2BAA2B,CAAC;AAAA,IACjF,6BAA6B;AAAA,MAC3B,YAAY,QAAQ,yCAAyC;AAAA,IAC/D;AAAA,IACA,6BAA6B;AAAA,MAC3B,YAAY,QAAQ,yCAAyC;AAAA,IAC/D;AAAA,IACA,kCAAkC;AAAA,MAChC,YAAY,QAAQ,8CAA8C;AAAA,IACpE;AAAA,IACA,GAAG,QAAQ;AAAA,EACb;AACA,UAAQ,MAAM,OAAO,oCAAoC,GAAG,QAAQ;AAAA,IAClE,cAAc;AAAA,MACZ,qBACE;AAAA,IACJ;AAAA,IACA,GAAG;AAAA,IACH;AAAA,IACA,2BAA2B;AAAA,MACzB,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,GAAG,QAAQ;AAAA,IACb;AAAA,EACF,CAAC;AACH;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finalai/agents",
3
- "version": "0.1.4",
3
+ "version": "0.2.0",
4
4
  "private": false,
5
5
  "description": "Agent authoring, client APIs, and CLI.",
6
6
  "license": "Apache-2.0",
@@ -73,11 +73,6 @@
73
73
  "default": "./dist/modules/sandboxes.mjs"
74
74
  },
75
75
  "./package.json": "./package.json",
76
- "./models": {
77
- "types": "./dist/modules/models.d.mts",
78
- "import": "./dist/modules/models.mjs",
79
- "default": "./dist/modules/models.mjs"
80
- },
81
76
  "./channels/final": {
82
77
  "types": "./dist/modules/authoring/final-channel.d.mts",
83
78
  "import": "./dist/modules/authoring/final-channel.mjs",
@@ -112,8 +107,8 @@
112
107
  "@agentclientprotocol/sdk": "1.8.0",
113
108
  "@finalai/agent-definition": "0.1.4",
114
109
  "@finalai/agent-protocol": "0.1.4",
115
- "@finalai/agent-provider": "0.1.4",
116
- "@finalai/final-agent-provider": "0.1.4",
110
+ "@finalai/agent-provider": "0.1.5",
111
+ "@finalai/final-agent-provider": "0.2.0",
117
112
  "@finalai/websockets": "0.1.4",
118
113
  "ws": "^8.21.3",
119
114
  "zod": "4.6.5"
@@ -1 +0,0 @@
1
- export * from '@finalai/final-agent-provider/harnesses/models';
@@ -1,2 +0,0 @@
1
- export * from "@finalai/final-agent-provider/harnesses/models";
2
- //# sourceMappingURL=models.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/models.ts"],
4
- "sourcesContent": ["export * from '@finalai/final-agent-provider/harnesses/models';\n"],
5
- "mappings": "AAAA,cAAc;",
6
- "names": []
7
- }