@finalai/agent-provider 0.9.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.
- package/HOSTING.md +334 -245
- package/README.md +106 -20
- package/dist/modules/canonical-json.d.mts +4 -0
- package/dist/modules/canonical-json.mjs +33 -0
- package/dist/modules/canonical-json.mjs.map +7 -0
- package/dist/modules/channel.d.mts +51 -15
- package/dist/modules/channel.mjs +1 -0
- package/dist/modules/channel.mjs.map +2 -2
- package/dist/modules/code-host/host.d.mts +10 -0
- package/dist/modules/code-host/host.mjs +88 -0
- package/dist/modules/code-host/host.mjs.map +7 -0
- package/dist/modules/code-host/in-process.d.mts +24 -0
- package/dist/modules/code-host/in-process.mjs +89 -0
- package/dist/modules/code-host/in-process.mjs.map +7 -0
- package/dist/modules/code-host/index.d.mts +4 -0
- package/dist/modules/code-host/index.mjs +5 -0
- package/dist/modules/code-host/index.mjs.map +7 -0
- package/dist/modules/code-host/serverless.d.mts +63 -0
- package/dist/modules/code-host/serverless.mjs +27 -0
- package/dist/modules/code-host/serverless.mjs.map +7 -0
- package/dist/modules/code-host/types.d.mts +152 -0
- package/dist/modules/code-host/types.mjs +85 -0
- package/dist/modules/code-host/types.mjs.map +7 -0
- package/dist/modules/conformance/agent.mjs +72 -6
- package/dist/modules/conformance/agent.mjs.map +2 -2
- package/dist/modules/conformance/harness-kit.d.mts +9 -2
- package/dist/modules/conformance/harness-kit.mjs +224 -63
- package/dist/modules/conformance/harness-kit.mjs.map +3 -3
- package/dist/modules/conformance/local-harness.d.mts +1 -4
- package/dist/modules/conformance/local-harness.mjs +21 -22
- package/dist/modules/conformance/local-harness.mjs.map +2 -2
- package/dist/modules/conformance/protocol.d.mts +1 -0
- package/dist/modules/conformance/protocol.mjs +2 -0
- package/dist/modules/conformance/protocol.mjs.map +2 -2
- package/dist/modules/conformance/sandbox-kit.d.mts +12 -4
- package/dist/modules/conformance/sandbox-kit.mjs +189 -103
- package/dist/modules/conformance/sandbox-kit.mjs.map +2 -2
- package/dist/modules/conformance/scripted-model/chat-completions.mjs +1 -0
- package/dist/modules/conformance/scripted-model/chat-completions.mjs.map +2 -2
- package/dist/modules/conformance/scripted-model/directives.d.mts +3 -0
- package/dist/modules/conformance/scripted-model/directives.mjs +26 -10
- package/dist/modules/conformance/scripted-model/directives.mjs.map +2 -2
- package/dist/modules/conformance/scripted-model/messages.mjs +1 -0
- package/dist/modules/conformance/scripted-model/messages.mjs.map +2 -2
- package/dist/modules/conformance/scripted-model/responses.mjs +2 -0
- package/dist/modules/conformance/scripted-model/responses.mjs.map +2 -2
- package/dist/modules/conformance/stdio.d.mts +21 -0
- package/dist/modules/conformance/stdio.mjs +158 -0
- package/dist/modules/conformance/stdio.mjs.map +7 -0
- package/dist/modules/credential-routes.d.mts +3 -3
- package/dist/modules/credential-routes.mjs +2 -2
- package/dist/modules/credential-routes.mjs.map +2 -2
- package/dist/modules/document.d.mts +358 -0
- package/dist/modules/document.mjs +193 -0
- package/dist/modules/document.mjs.map +7 -0
- package/dist/modules/harness-configuration.d.mts +16 -0
- package/dist/modules/harness-configuration.mjs +83 -0
- package/dist/modules/harness-configuration.mjs.map +7 -0
- package/dist/modules/harness-definition.d.mts +280 -0
- package/dist/modules/harness-definition.mjs +430 -0
- package/dist/modules/harness-definition.mjs.map +7 -0
- package/dist/modules/harness-provider.d.mts +197 -0
- package/dist/modules/harness-provider.mjs +108 -0
- package/dist/modules/harness-provider.mjs.map +7 -0
- package/dist/modules/harness-requirements.d.mts +19 -0
- package/dist/modules/harness-requirements.mjs +40 -0
- package/dist/modules/harness-requirements.mjs.map +7 -0
- package/dist/modules/harness-start.d.mts +33 -0
- package/dist/modules/harness-start.mjs +107 -0
- package/dist/modules/harness-start.mjs.map +7 -0
- package/dist/modules/harness.d.mts +84 -109
- package/dist/modules/harness.mjs +56 -111
- package/dist/modules/harness.mjs.map +3 -3
- package/dist/modules/identity.d.mts +1 -0
- package/dist/modules/identity.mjs +2 -0
- package/dist/modules/identity.mjs.map +7 -0
- package/dist/modules/index.d.mts +12 -7
- package/dist/modules/index.mjs +12 -7
- package/dist/modules/index.mjs.map +2 -2
- package/dist/modules/inference.d.mts +35 -0
- package/dist/modules/inference.mjs +74 -0
- package/dist/modules/inference.mjs.map +7 -0
- package/dist/modules/local-channel-context.d.mts +1 -1
- package/dist/modules/local-channel-context.mjs +1 -1
- package/dist/modules/local-channel-context.mjs.map +2 -2
- package/dist/modules/requirements-check.d.mts +30 -0
- package/dist/modules/requirements-check.mjs +164 -0
- package/dist/modules/requirements-check.mjs.map +7 -0
- package/dist/modules/sandbox/client.d.mts +3 -0
- package/dist/modules/sandbox/client.mjs +101 -18
- package/dist/modules/sandbox/client.mjs.map +2 -2
- package/dist/modules/sandbox/grant.d.mts +78 -0
- package/dist/modules/sandbox/grant.mjs +134 -0
- package/dist/modules/sandbox/grant.mjs.map +7 -0
- package/dist/modules/sandbox/index.d.mts +3 -3
- package/dist/modules/sandbox/index.mjs +4 -5
- package/dist/modules/sandbox/index.mjs.map +2 -2
- package/dist/modules/sandbox/mcp-hosted.d.mts +1 -1
- package/dist/modules/sandbox/mcp-hosted.mjs +4 -7
- package/dist/modules/sandbox/mcp-hosted.mjs.map +2 -2
- package/dist/modules/sandbox/mcp.d.mts +4 -2
- package/dist/modules/sandbox/mcp.mjs +14 -7
- package/dist/modules/sandbox/mcp.mjs.map +2 -2
- package/dist/modules/sandbox/memory-sandbox.d.mts +2 -1
- package/dist/modules/sandbox/memory-sandbox.mjs +71 -41
- package/dist/modules/sandbox/memory-sandbox.mjs.map +2 -2
- package/dist/modules/sandbox/networking.d.mts +7 -7
- package/dist/modules/sandbox/networking.mjs +16 -9
- package/dist/modules/sandbox/networking.mjs.map +2 -2
- package/dist/modules/sandbox/remote/adapter.d.mts +30 -0
- package/dist/modules/sandbox/remote/adapter.mjs +381 -0
- package/dist/modules/sandbox/remote/adapter.mjs.map +7 -0
- package/dist/modules/sandbox/remote/body.d.mts +1 -0
- package/dist/modules/sandbox/remote/body.mjs +27 -0
- package/dist/modules/sandbox/remote/body.mjs.map +7 -0
- package/dist/modules/sandbox/remote/errors.d.mts +10 -0
- package/dist/modules/sandbox/remote/errors.mjs +62 -0
- package/dist/modules/sandbox/remote/errors.mjs.map +7 -0
- package/dist/modules/sandbox/remote/index.d.mts +5 -0
- package/dist/modules/sandbox/remote/index.mjs +6 -0
- package/dist/modules/sandbox/remote/index.mjs.map +7 -0
- package/dist/modules/sandbox/remote/ndjson.d.mts +6 -0
- package/dist/modules/sandbox/remote/ndjson.mjs +80 -0
- package/dist/modules/sandbox/remote/ndjson.mjs.map +7 -0
- package/dist/modules/sandbox/remote/platform-api.d.mts +8 -0
- package/dist/modules/sandbox/remote/platform-api.mjs +15 -0
- package/dist/modules/sandbox/remote/platform-api.mjs.map +7 -0
- package/dist/modules/sandbox/remote/preamble.d.mts +7 -0
- package/dist/modules/sandbox/remote/preamble.mjs +51 -0
- package/dist/modules/sandbox/remote/preamble.mjs.map +7 -0
- package/dist/modules/sandbox/remote/serve.d.mts +34 -0
- package/dist/modules/sandbox/remote/serve.mjs +520 -0
- package/dist/modules/sandbox/remote/serve.mjs.map +7 -0
- package/dist/modules/sandbox/remote/testing.d.mts +34 -0
- package/dist/modules/sandbox/remote/testing.mjs +275 -0
- package/dist/modules/sandbox/remote/testing.mjs.map +7 -0
- package/dist/modules/sandbox/seeds.d.mts +2 -2
- package/dist/modules/sandbox/seeds.mjs +2 -2
- package/dist/modules/sandbox/seeds.mjs.map +2 -2
- package/dist/modules/sandbox/server.d.mts +4 -6
- package/dist/modules/sandbox/server.mjs +93 -49
- package/dist/modules/sandbox/server.mjs.map +2 -2
- package/dist/modules/sandbox/setup/apply.d.mts +40 -0
- package/dist/modules/sandbox/setup/apply.mjs +190 -0
- package/dist/modules/sandbox/setup/apply.mjs.map +7 -0
- package/dist/modules/sandbox/setup/describe.d.mts +10 -0
- package/dist/modules/sandbox/setup/describe.mjs +62 -0
- package/dist/modules/sandbox/setup/describe.mjs.map +7 -0
- package/dist/modules/sandbox/setup/index.d.mts +6 -0
- package/dist/modules/sandbox/setup/index.mjs +17 -0
- package/dist/modules/sandbox/setup/index.mjs.map +7 -0
- package/dist/modules/sandbox/setup/paths.d.mts +8 -0
- package/dist/modules/sandbox/setup/paths.mjs +18 -0
- package/dist/modules/sandbox/setup/paths.mjs.map +7 -0
- package/dist/modules/sandbox/setup/schema.d.mts +43 -0
- package/dist/modules/sandbox/setup/schema.mjs +58 -0
- package/dist/modules/sandbox/setup/schema.mjs.map +7 -0
- package/dist/modules/sandbox/tool-policy.d.mts +1 -1
- package/dist/modules/sandbox/tool-policy.mjs +1 -1
- package/dist/modules/sandbox/tool-policy.mjs.map +2 -2
- package/dist/modules/sandbox/types.d.mts +117 -142
- package/dist/modules/sandbox/types.mjs +47 -57
- package/dist/modules/sandbox/types.mjs.map +3 -3
- package/dist/modules/sandbox/wire.d.mts +93 -6
- package/dist/modules/sandbox/wire.mjs +61 -38
- package/dist/modules/sandbox/wire.mjs.map +2 -2
- package/dist/modules/schemas.d.mts +5 -76
- package/dist/modules/schemas.mjs +18 -85
- package/dist/modules/schemas.mjs.map +2 -2
- package/dist/modules/tool-annotations.d.mts +15 -6
- package/dist/modules/tool-annotations.mjs +9 -3
- package/dist/modules/tool-annotations.mjs.map +2 -2
- package/dist/modules/tool-descriptor.d.mts +16 -0
- package/dist/modules/tool-descriptor.mjs +19 -0
- package/dist/modules/tool-descriptor.mjs.map +7 -0
- package/dist/modules/tool-patterns.d.mts +7 -7
- package/dist/modules/tool-patterns.mjs +10 -9
- package/dist/modules/tool-patterns.mjs.map +2 -2
- package/package.json +86 -41
- package/dist/modules/credentials.d.mts +0 -206
- package/dist/modules/credentials.mjs +0 -207
- package/dist/modules/credentials.mjs.map +0 -7
- package/dist/modules/dynamic.d.mts +0 -40
- package/dist/modules/dynamic.mjs +0 -79
- package/dist/modules/dynamic.mjs.map +0 -7
- package/dist/modules/hosted-bindings.d.mts +0 -15
- package/dist/modules/hosted-bindings.mjs +0 -21
- package/dist/modules/hosted-bindings.mjs.map +0 -7
- package/dist/modules/manifest.d.mts +0 -791
- package/dist/modules/manifest.mjs +0 -322
- package/dist/modules/manifest.mjs.map +0 -7
- package/dist/modules/provider-ref.d.mts +0 -29
- package/dist/modules/provider-ref.mjs +0 -55
- package/dist/modules/provider-ref.mjs.map +0 -7
- package/dist/modules/room-surface.d.mts +0 -355
- package/dist/modules/room-surface.mjs +0 -156
- package/dist/modules/room-surface.mjs.map +0 -7
- package/dist/modules/sandbox/open-scope-node.d.mts +0 -4
- package/dist/modules/sandbox/open-scope-node.mjs +0 -19
- package/dist/modules/sandbox/open-scope-node.mjs.map +0 -7
- package/dist/modules/sandbox/open-scope.d.mts +0 -16
- package/dist/modules/sandbox/open-scope.mjs +0 -66
- package/dist/modules/sandbox/open-scope.mjs.map +0 -7
- package/dist/modules/sandbox/workspace-identity.d.mts +0 -5
- package/dist/modules/sandbox/workspace-identity.mjs +0 -14
- package/dist/modules/sandbox/workspace-identity.mjs.map +0 -7
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import {
|
|
2
|
+
harnessSettingsSchema,
|
|
3
|
+
PermissionLevel,
|
|
4
|
+
permissionWithin
|
|
5
|
+
} from "@finalai/agent-protocol/agent-platform";
|
|
6
|
+
import { compileSchema, isSchemaNode } from "json-schema-library";
|
|
7
|
+
import * as z from "zod";
|
|
8
|
+
import { jsonObjectSchema } from "./json.mjs";
|
|
9
|
+
import { SHARED_SCHEMAS } from "./schemas.mjs";
|
|
10
|
+
const configurationFieldsSchema = z.looseObject({
|
|
11
|
+
permissionMode: z.string().optional(),
|
|
12
|
+
inference: z.union([z.looseObject({ source: z.string() }), z.array(z.looseObject({ source: z.string() }))]).optional()
|
|
13
|
+
});
|
|
14
|
+
const enumMessage = (error) => {
|
|
15
|
+
if (error.code !== "enum-error") return null;
|
|
16
|
+
const values = z.array(z.unknown()).safeParse(error.data["values"]).data;
|
|
17
|
+
if (values == null) return null;
|
|
18
|
+
return `${JSON.stringify(error.data["value"])} is not one of the ${values.length} allowed values`;
|
|
19
|
+
};
|
|
20
|
+
const errorLine = (error) => {
|
|
21
|
+
const pointer = z.string().safeParse(error.data["pointer"]).data ?? "#";
|
|
22
|
+
const message = enumMessage(error) ?? error.message;
|
|
23
|
+
return pointer === "#" ? message : `${pointer}: ${message}`;
|
|
24
|
+
};
|
|
25
|
+
const unresolvedRefs = (node) => [node, ...Object.values(node.context.refs)].flatMap((child) => {
|
|
26
|
+
const ref = z.string().safeParse(jsonObjectSchema.safeParse(child.schema).data?.["$ref"]);
|
|
27
|
+
if (!ref.success) return [];
|
|
28
|
+
return isSchemaNode(child.resolveRef()) ? [] : [`unresolved reference ${ref.data}`];
|
|
29
|
+
});
|
|
30
|
+
const schemaProblems = (definition, value) => {
|
|
31
|
+
let node;
|
|
32
|
+
try {
|
|
33
|
+
node = compileSchema(definition.configurationSchema, {
|
|
34
|
+
remotes: Object.values(SHARED_SCHEMAS),
|
|
35
|
+
formatAssertion: true
|
|
36
|
+
});
|
|
37
|
+
} catch (cause) {
|
|
38
|
+
return [`the configuration schema does not compile: ${String(cause)}`];
|
|
39
|
+
}
|
|
40
|
+
const unresolved = unresolvedRefs(node);
|
|
41
|
+
if (unresolved.length > 0) return unresolved.map((line) => `configuration schema: ${line}`);
|
|
42
|
+
const result = node.validate(value);
|
|
43
|
+
return result.valid ? [] : result.errors.map(errorLine);
|
|
44
|
+
};
|
|
45
|
+
const validateHarnessConfiguration = (args) => {
|
|
46
|
+
const configuration = args.configuration ?? {};
|
|
47
|
+
const problems = schemaProblems(args.definition, configuration);
|
|
48
|
+
const fields = configurationFieldsSchema.safeParse(configuration);
|
|
49
|
+
if (fields.success) {
|
|
50
|
+
const mode = z.nativeEnum(PermissionLevel).safeParse(fields.data.permissionMode);
|
|
51
|
+
if (mode.success && !permissionWithin(args.definition.lowestPermission, mode.data))
|
|
52
|
+
problems.push(
|
|
53
|
+
`permission mode ${mode.data} is below the lowest this harness can run at (${args.definition.lowestPermission})`
|
|
54
|
+
);
|
|
55
|
+
const inference = fields.data.inference;
|
|
56
|
+
const sources = inference == null ? null : Array.isArray(inference) ? inference : [inference];
|
|
57
|
+
const kinds = args.definition.inference.kinds;
|
|
58
|
+
if (sources != null && !sources.some((source) => kinds.includes(source.source)))
|
|
59
|
+
problems.push(
|
|
60
|
+
`none of the inference sources can be used by this harness (it takes ${kinds.join(", ")})`
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
return { valid: problems.length === 0, problems };
|
|
64
|
+
};
|
|
65
|
+
const acceptsHarnessSettings = (args) => {
|
|
66
|
+
const parsed = harnessSettingsSchema.safeParse(args.settings);
|
|
67
|
+
if (!parsed.success) return { valid: false, problems: [z.prettifyError(parsed.error)] };
|
|
68
|
+
const problems = [];
|
|
69
|
+
if (parsed.data.harness !== args.name)
|
|
70
|
+
problems.push(`settings name ${parsed.data.harness}, not ${args.name}`);
|
|
71
|
+
problems.push(
|
|
72
|
+
...validateHarnessConfiguration({
|
|
73
|
+
definition: args.definition,
|
|
74
|
+
configuration: parsed.data.configuration
|
|
75
|
+
}).problems
|
|
76
|
+
);
|
|
77
|
+
return { valid: problems.length === 0, problems };
|
|
78
|
+
};
|
|
79
|
+
export {
|
|
80
|
+
acceptsHarnessSettings,
|
|
81
|
+
validateHarnessConfiguration
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=harness-configuration.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/harness-configuration.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n harnessSettingsSchema,\n PermissionLevel,\n permissionWithin,\n type HarnessSettingsIface,\n} from '@finalai/agent-protocol/agent-platform';\nimport { compileSchema, isSchemaNode, type JsonError, type SchemaNode } from 'json-schema-library';\nimport * as z from 'zod';\nimport type { HarnessDefinitionIface } from \"./harness-definition.mjs\";\nimport { jsonObjectSchema } from \"./json.mjs\";\nimport { SHARED_SCHEMAS } from \"./schemas.mjs\";\n\n// Validates harness configuration against its definition: the definition's\n// configuration JSON Schema (its `final://schemas/*` references resolve to the\n// shared fragments; nothing is fetched), a permission mode at or above the\n// lowest the harness can be held to, and at least one inference source it can\n// use. What the platform checks before it stores or runs settings.\n\nexport interface HarnessConfigurationCheckIface {\n valid: boolean;\n // Why not, one line each; empty when valid.\n problems: string[];\n}\n\nexport type HarnessConfigurationDefinitionIface = Pick<\n HarnessDefinitionIface,\n 'configurationSchema' | 'lowestPermission' | 'inference'\n>;\n\nconst configurationFieldsSchema = z.looseObject({\n permissionMode: z.string().optional(),\n inference: z\n .union([z.looseObject({ source: z.string() }), z.array(z.looseObject({ source: z.string() }))])\n .optional(),\n});\n\n// A value outside an enum names the value, not the list, which can be a whole\n// model catalog.\nconst enumMessage = (error: JsonError): string | null => {\n if (error.code !== 'enum-error') return null;\n const values = z.array(z.unknown()).safeParse(error.data['values']).data;\n if (values == null) return null;\n return `${JSON.stringify(error.data['value'])} is not one of the ${values.length} allowed values`;\n};\n\nconst errorLine = (error: JsonError): string => {\n const pointer = z.string().safeParse(error.data['pointer']).data ?? '#';\n const message = enumMessage(error) ?? error.message;\n return pointer === '#' ? message : `${pointer}: ${message}`;\n};\n\n// Unresolved references are reported, not skipped: a schema that names a\n// fragment nobody defines accepts nothing.\nconst unresolvedRefs = (node: SchemaNode): string[] =>\n [node, ...Object.values(node.context.refs)].flatMap((child) => {\n const ref = z.string().safeParse(jsonObjectSchema.safeParse(child.schema).data?.['$ref']);\n if (!ref.success) return [];\n return isSchemaNode(child.resolveRef()) ? [] : [`unresolved reference ${ref.data}`];\n });\n\nconst schemaProblems = (definition: HarnessConfigurationDefinitionIface, value: unknown) => {\n let node: SchemaNode;\n try {\n node = compileSchema(definition.configurationSchema, {\n remotes: Object.values(SHARED_SCHEMAS),\n formatAssertion: true,\n });\n } catch (cause) {\n return [`the configuration schema does not compile: ${String(cause)}`];\n }\n const unresolved = unresolvedRefs(node);\n if (unresolved.length > 0) return unresolved.map((line) => `configuration schema: ${line}`);\n const result = node.validate(value);\n return result.valid ? [] : result.errors.map(errorLine);\n};\n\nexport const validateHarnessConfiguration = (args: {\n definition: HarnessConfigurationDefinitionIface;\n configuration: unknown;\n}): HarnessConfigurationCheckIface => {\n const configuration = args.configuration ?? {};\n const problems = schemaProblems(args.definition, configuration);\n const fields = configurationFieldsSchema.safeParse(configuration);\n if (fields.success) {\n const mode = z.nativeEnum(PermissionLevel).safeParse(fields.data.permissionMode);\n if (mode.success && !permissionWithin(args.definition.lowestPermission, mode.data))\n problems.push(\n `permission mode ${mode.data} is below the lowest this harness can run at (${args.definition.lowestPermission})`,\n );\n const inference = fields.data.inference;\n const sources = inference == null ? null : Array.isArray(inference) ? inference : [inference];\n const kinds: readonly string[] = args.definition.inference.kinds;\n if (sources != null && !sources.some((source) => kinds.includes(source.source)))\n problems.push(\n `none of the inference sources can be used by this harness (it takes ${kinds.join(', ')})`,\n );\n }\n return { valid: problems.length === 0, problems };\n};\n\n// Whether harness settings name this definition and carry a configuration it\n// accepts. Where it runs (`environment`, `adapter`) is composeHarness's.\nexport const acceptsHarnessSettings = (args: {\n name: string;\n definition: HarnessConfigurationDefinitionIface;\n settings: HarnessSettingsIface;\n}): HarnessConfigurationCheckIface => {\n const parsed = harnessSettingsSchema.safeParse(args.settings);\n if (!parsed.success) return { valid: false, problems: [z.prettifyError(parsed.error)] };\n const problems: string[] = [];\n if (parsed.data.harness !== args.name)\n problems.push(`settings name ${parsed.data.harness}, not ${args.name}`);\n problems.push(\n ...validateHarnessConfiguration({\n definition: args.definition,\n configuration: parsed.data.configuration,\n }).problems,\n );\n return { valid: problems.length === 0, problems };\n};\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { Capability, FilesAccess, RuntimeKind, ShellAccess } from '@finalai/agent-protocol';
|
|
2
|
+
import { InferenceSourceKind, PermissionLevel, type ResolvedHarnessSettingsIface } from '@finalai/agent-protocol/agent-platform';
|
|
3
|
+
import * as z from 'zod';
|
|
4
|
+
import { HarnessFeature } from "./document.mjs";
|
|
5
|
+
import { CredentialDelivery, McpTransportKind, PromptWhileRunning, SandboxWire } from "./harness.mjs";
|
|
6
|
+
import { FinalExtension, HarnessEnvironmentKind } from "./harness-start.mjs";
|
|
7
|
+
import type { HarnessCheckInputIface } from "./requirements-check.mjs";
|
|
8
|
+
export { RuntimeKind } from '@finalai/agent-protocol';
|
|
9
|
+
export { ACP_V2_INTERFACE, FinalExtension, harnessStartFor, HarnessEnvironmentKind, runtimesOf, type HarnessStartResult, } from "./harness-start.mjs";
|
|
10
|
+
export declare const processArgSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
11
|
+
when: z.ZodString;
|
|
12
|
+
args: z.ZodArray<z.ZodString>;
|
|
13
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
14
|
+
spread: z.ZodLiteral<"harness.args">;
|
|
15
|
+
}, z.core.$strict>]>;
|
|
16
|
+
export declare const processEnvValueSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
17
|
+
when: z.ZodString;
|
|
18
|
+
value: z.ZodString;
|
|
19
|
+
}, z.core.$strict>]>;
|
|
20
|
+
export declare const processRunSchema: z.ZodObject<{
|
|
21
|
+
command: z.ZodPipe<z.ZodString, z.ZodString>;
|
|
22
|
+
args: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
23
|
+
when: z.ZodString;
|
|
24
|
+
args: z.ZodArray<z.ZodString>;
|
|
25
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
26
|
+
spread: z.ZodLiteral<"harness.args">;
|
|
27
|
+
}, z.core.$strict>]>>>;
|
|
28
|
+
env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
29
|
+
when: z.ZodString;
|
|
30
|
+
value: z.ZodString;
|
|
31
|
+
}, z.core.$strict>]>>>;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
export declare const workerRunSchema: z.ZodObject<{
|
|
34
|
+
program: z.ZodString;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
export declare const runEntriesSchema: z.ZodDefault<z.ZodObject<{
|
|
37
|
+
process: z.ZodOptional<z.ZodObject<{
|
|
38
|
+
command: z.ZodPipe<z.ZodString, z.ZodString>;
|
|
39
|
+
args: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
40
|
+
when: z.ZodString;
|
|
41
|
+
args: z.ZodArray<z.ZodString>;
|
|
42
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
43
|
+
spread: z.ZodLiteral<"harness.args">;
|
|
44
|
+
}, z.core.$strict>]>>>;
|
|
45
|
+
env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
46
|
+
when: z.ZodString;
|
|
47
|
+
value: z.ZodString;
|
|
48
|
+
}, z.core.$strict>]>>>;
|
|
49
|
+
}, z.core.$strict>>;
|
|
50
|
+
worker: z.ZodOptional<z.ZodObject<{
|
|
51
|
+
program: z.ZodString;
|
|
52
|
+
}, z.core.$strict>>;
|
|
53
|
+
}, z.core.$strict>>;
|
|
54
|
+
export type ProcessRunIface = z.output<typeof processRunSchema>;
|
|
55
|
+
export type WorkerRunIface = z.output<typeof workerRunSchema>;
|
|
56
|
+
export type RunEntriesIface = z.output<typeof runEntriesSchema>;
|
|
57
|
+
export declare const harnessNativeSchema: z.ZodDefault<z.ZodObject<{
|
|
58
|
+
files: z.ZodOptional<z.ZodObject<{
|
|
59
|
+
enforces: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof FilesAccess>>>;
|
|
60
|
+
tools: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
61
|
+
}, z.core.$strict>>;
|
|
62
|
+
shell: z.ZodOptional<z.ZodObject<{
|
|
63
|
+
enforces: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof ShellAccess>>>;
|
|
64
|
+
tools: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
65
|
+
}, z.core.$strict>>;
|
|
66
|
+
}, z.core.$strict>>;
|
|
67
|
+
export declare const harnessProviderCodeSchema: z.ZodObject<{
|
|
68
|
+
source: z.ZodString;
|
|
69
|
+
}, z.core.$strict>;
|
|
70
|
+
export type HarnessProviderCodeIface = z.infer<typeof harnessProviderCodeSchema>;
|
|
71
|
+
export declare const harnessProviderNameSchema: z.ZodObject<{
|
|
72
|
+
name: z.ZodString;
|
|
73
|
+
}, z.core.$strict>;
|
|
74
|
+
export type HarnessProviderNameIface = z.infer<typeof harnessProviderNameSchema>;
|
|
75
|
+
export declare const harnessProviderReferenceSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
76
|
+
source: z.ZodString;
|
|
77
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
78
|
+
name: z.ZodString;
|
|
79
|
+
}, z.core.$strict>]>;
|
|
80
|
+
export type HarnessProviderReferenceIface = z.infer<typeof harnessProviderReferenceSchema>;
|
|
81
|
+
export declare enum HarnessService {
|
|
82
|
+
SessionStore = "session-store",
|
|
83
|
+
FrameAttachments = "frame-attachments",
|
|
84
|
+
SubscriptionRelay = "subscription-relay"
|
|
85
|
+
}
|
|
86
|
+
export declare const harnessModelSchema: z.ZodObject<{
|
|
87
|
+
id: z.ZodString;
|
|
88
|
+
label: z.ZodString;
|
|
89
|
+
vendor: z.ZodString;
|
|
90
|
+
vendorModelId: z.ZodOptional<z.ZodString>;
|
|
91
|
+
aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
92
|
+
reasoningLevels: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
93
|
+
defaultReasoning: z.ZodOptional<z.ZodString>;
|
|
94
|
+
default: z.ZodDefault<z.ZodBoolean>;
|
|
95
|
+
input: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
96
|
+
image: "image";
|
|
97
|
+
text: "text";
|
|
98
|
+
}>>>;
|
|
99
|
+
runtime: z.ZodDefault<z.ZodType<import("./json.mjs").JsonObject, unknown, z.core.$ZodTypeInternals<import("./json.mjs").JsonObject, unknown>>>;
|
|
100
|
+
}, z.core.$strict>;
|
|
101
|
+
export type HarnessModelIface = z.output<typeof harnessModelSchema>;
|
|
102
|
+
export type HarnessModelInputIface = z.input<typeof harnessModelSchema>;
|
|
103
|
+
export declare const harnessModelsSchema: z.ZodObject<{
|
|
104
|
+
open: z.ZodDefault<z.ZodBoolean>;
|
|
105
|
+
entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
106
|
+
id: z.ZodString;
|
|
107
|
+
label: z.ZodString;
|
|
108
|
+
vendor: z.ZodString;
|
|
109
|
+
vendorModelId: z.ZodOptional<z.ZodString>;
|
|
110
|
+
aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
111
|
+
reasoningLevels: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
112
|
+
defaultReasoning: z.ZodOptional<z.ZodString>;
|
|
113
|
+
default: z.ZodDefault<z.ZodBoolean>;
|
|
114
|
+
input: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
115
|
+
image: "image";
|
|
116
|
+
text: "text";
|
|
117
|
+
}>>>;
|
|
118
|
+
runtime: z.ZodDefault<z.ZodType<import("./json.mjs").JsonObject, unknown, z.core.$ZodTypeInternals<import("./json.mjs").JsonObject, unknown>>>;
|
|
119
|
+
}, z.core.$strict>>>;
|
|
120
|
+
}, z.core.$strict>;
|
|
121
|
+
export type HarnessModelsIface = z.output<typeof harnessModelsSchema>;
|
|
122
|
+
export declare const harnessDefinitionSchema: z.ZodObject<{
|
|
123
|
+
title: z.ZodOptional<z.ZodString>;
|
|
124
|
+
description: z.ZodOptional<z.ZodString>;
|
|
125
|
+
configurationSchema: z.ZodType<import("./json.mjs").JsonObject, unknown, z.core.$ZodTypeInternals<import("./json.mjs").JsonObject, unknown>>;
|
|
126
|
+
features: z.ZodArray<z.ZodEnum<typeof HarnessFeature>>;
|
|
127
|
+
lowestPermission: z.ZodEnum<typeof PermissionLevel>;
|
|
128
|
+
inference: z.ZodObject<{
|
|
129
|
+
vendors: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
130
|
+
kinds: z.ZodArray<z.ZodEnum<typeof InferenceSourceKind>>;
|
|
131
|
+
delivery: z.ZodEnum<typeof CredentialDelivery>;
|
|
132
|
+
}, z.core.$strict>;
|
|
133
|
+
models: z.ZodDefault<z.ZodObject<{
|
|
134
|
+
open: z.ZodDefault<z.ZodBoolean>;
|
|
135
|
+
entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
136
|
+
id: z.ZodString;
|
|
137
|
+
label: z.ZodString;
|
|
138
|
+
vendor: z.ZodString;
|
|
139
|
+
vendorModelId: z.ZodOptional<z.ZodString>;
|
|
140
|
+
aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
141
|
+
reasoningLevels: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
142
|
+
defaultReasoning: z.ZodOptional<z.ZodString>;
|
|
143
|
+
default: z.ZodDefault<z.ZodBoolean>;
|
|
144
|
+
input: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
145
|
+
image: "image";
|
|
146
|
+
text: "text";
|
|
147
|
+
}>>>;
|
|
148
|
+
runtime: z.ZodDefault<z.ZodType<import("./json.mjs").JsonObject, unknown, z.core.$ZodTypeInternals<import("./json.mjs").JsonObject, unknown>>>;
|
|
149
|
+
}, z.core.$strict>>>;
|
|
150
|
+
}, z.core.$strict>>;
|
|
151
|
+
services: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof HarnessService>>>;
|
|
152
|
+
native: z.ZodDefault<z.ZodObject<{
|
|
153
|
+
files: z.ZodOptional<z.ZodObject<{
|
|
154
|
+
enforces: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof FilesAccess>>>;
|
|
155
|
+
tools: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
156
|
+
}, z.core.$strict>>;
|
|
157
|
+
shell: z.ZodOptional<z.ZodObject<{
|
|
158
|
+
enforces: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof ShellAccess>>>;
|
|
159
|
+
tools: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
160
|
+
}, z.core.$strict>>;
|
|
161
|
+
}, z.core.$strict>>;
|
|
162
|
+
interface: z.ZodDefault<z.ZodString>;
|
|
163
|
+
adapter: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
164
|
+
run: z.ZodDefault<z.ZodObject<{
|
|
165
|
+
process: z.ZodOptional<z.ZodObject<{
|
|
166
|
+
command: z.ZodPipe<z.ZodString, z.ZodString>;
|
|
167
|
+
args: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
168
|
+
when: z.ZodString;
|
|
169
|
+
args: z.ZodArray<z.ZodString>;
|
|
170
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
171
|
+
spread: z.ZodLiteral<"harness.args">;
|
|
172
|
+
}, z.core.$strict>]>>>;
|
|
173
|
+
env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
174
|
+
when: z.ZodString;
|
|
175
|
+
value: z.ZodString;
|
|
176
|
+
}, z.core.$strict>]>>>;
|
|
177
|
+
}, z.core.$strict>>;
|
|
178
|
+
worker: z.ZodOptional<z.ZodObject<{
|
|
179
|
+
program: z.ZodString;
|
|
180
|
+
}, z.core.$strict>>;
|
|
181
|
+
}, z.core.$strict>>;
|
|
182
|
+
provider: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
183
|
+
source: z.ZodString;
|
|
184
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
185
|
+
name: z.ZodString;
|
|
186
|
+
}, z.core.$strict>]>>;
|
|
187
|
+
mcp: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof McpTransportKind>>>;
|
|
188
|
+
consumes: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof SandboxWire>>>;
|
|
189
|
+
supports: z.ZodDefault<z.ZodObject<{
|
|
190
|
+
observe: z.ZodDefault<z.ZodBoolean>;
|
|
191
|
+
resumeReplay: z.ZodDefault<z.ZodBoolean>;
|
|
192
|
+
fork: z.ZodDefault<z.ZodBoolean>;
|
|
193
|
+
authorMeta: z.ZodDefault<z.ZodBoolean>;
|
|
194
|
+
deferredToolSearch: z.ZodDefault<z.ZodBoolean>;
|
|
195
|
+
}, z.core.$strict>>;
|
|
196
|
+
promptWhileRunning: z.ZodDefault<z.ZodEnum<typeof PromptWhileRunning>>;
|
|
197
|
+
sessionSurvivesDisconnect: z.ZodDefault<z.ZodBoolean>;
|
|
198
|
+
}, z.core.$strict>;
|
|
199
|
+
export type HarnessDefinitionIface = z.output<typeof harnessDefinitionSchema>;
|
|
200
|
+
export type HarnessDefinitionInputIface = z.input<typeof harnessDefinitionSchema>;
|
|
201
|
+
export declare enum AdapterConfigurationDelivery {
|
|
202
|
+
Launch = "launch",
|
|
203
|
+
ConfigOptions = "config-options"
|
|
204
|
+
}
|
|
205
|
+
export declare const acpAdapterDefinitionSchema: z.ZodObject<{
|
|
206
|
+
title: z.ZodOptional<z.ZodString>;
|
|
207
|
+
description: z.ZodOptional<z.ZodString>;
|
|
208
|
+
adapts: z.ZodArray<z.ZodString>;
|
|
209
|
+
run: z.ZodDefault<z.ZodObject<{
|
|
210
|
+
process: z.ZodOptional<z.ZodObject<{
|
|
211
|
+
command: z.ZodPipe<z.ZodString, z.ZodString>;
|
|
212
|
+
args: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
213
|
+
when: z.ZodString;
|
|
214
|
+
args: z.ZodArray<z.ZodString>;
|
|
215
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
216
|
+
spread: z.ZodLiteral<"harness.args">;
|
|
217
|
+
}, z.core.$strict>]>>>;
|
|
218
|
+
env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
219
|
+
when: z.ZodString;
|
|
220
|
+
value: z.ZodString;
|
|
221
|
+
}, z.core.$strict>]>>>;
|
|
222
|
+
}, z.core.$strict>>;
|
|
223
|
+
worker: z.ZodOptional<z.ZodObject<{
|
|
224
|
+
program: z.ZodString;
|
|
225
|
+
}, z.core.$strict>>;
|
|
226
|
+
}, z.core.$strict>>;
|
|
227
|
+
configuration: z.ZodDefault<z.ZodEnum<typeof AdapterConfigurationDelivery>>;
|
|
228
|
+
extensions: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof FinalExtension>>>;
|
|
229
|
+
services: z.ZodDefault<z.ZodArray<z.ZodEnum<typeof HarnessService>>>;
|
|
230
|
+
}, z.core.$strict>;
|
|
231
|
+
export type AcpAdapterDefinitionIface = z.output<typeof acpAdapterDefinitionSchema>;
|
|
232
|
+
export type AcpAdapterDefinitionInputIface = z.input<typeof acpAdapterDefinitionSchema>;
|
|
233
|
+
export interface ResolvedHarnessModelIface {
|
|
234
|
+
entry: HarnessModelIface | null;
|
|
235
|
+
vendor: string | null;
|
|
236
|
+
vendorModelId: string;
|
|
237
|
+
}
|
|
238
|
+
export declare const resolveHarnessModel: (args: {
|
|
239
|
+
definition: Pick<HarnessDefinitionIface, "models" | "inference">;
|
|
240
|
+
model: string;
|
|
241
|
+
}) => ResolvedHarnessModelIface | null;
|
|
242
|
+
export declare const harnessDefinitionHash: (definition: HarnessDefinitionInputIface) => Promise<string>;
|
|
243
|
+
export declare const acpAdapterDefinitionHash: (definition: AcpAdapterDefinitionInputIface) => Promise<string>;
|
|
244
|
+
export type ComposedEnvironmentIface = {
|
|
245
|
+
kind: HarnessEnvironmentKind.Sandbox;
|
|
246
|
+
sandboxId: string;
|
|
247
|
+
} | {
|
|
248
|
+
kind: HarnessEnvironmentKind.Url;
|
|
249
|
+
url: string;
|
|
250
|
+
hop: string | null;
|
|
251
|
+
};
|
|
252
|
+
export interface NamedDefinitionIface<Definition> {
|
|
253
|
+
name: string;
|
|
254
|
+
definition: Definition | null;
|
|
255
|
+
}
|
|
256
|
+
export interface HarnessCompositionArgsIface {
|
|
257
|
+
harness: HarnessDefinitionIface;
|
|
258
|
+
adapter: NamedDefinitionIface<AcpAdapterDefinitionIface> | null;
|
|
259
|
+
settings: Pick<ResolvedHarnessSettingsIface, 'harness' | 'adapter' | 'environment'>;
|
|
260
|
+
compute: Partial<Record<Capability, string>>;
|
|
261
|
+
sandboxRuntimes: (sandboxId: string) => readonly RuntimeKind[] | null;
|
|
262
|
+
}
|
|
263
|
+
export interface HarnessCompositionIface {
|
|
264
|
+
environment: ComposedEnvironmentIface | null;
|
|
265
|
+
awaitsEnvironment: boolean;
|
|
266
|
+
adapter: string | null;
|
|
267
|
+
runtime: RuntimeKind | null;
|
|
268
|
+
native: Capability[];
|
|
269
|
+
problems: string[];
|
|
270
|
+
}
|
|
271
|
+
export declare const adapterNameFor: (args: {
|
|
272
|
+
harness: HarnessDefinitionIface;
|
|
273
|
+
settings: Pick<ResolvedHarnessSettingsIface, "adapter" | "environment">;
|
|
274
|
+
}) => string | null;
|
|
275
|
+
export declare const composeHarness: (args: HarnessCompositionArgsIface) => HarnessCompositionIface;
|
|
276
|
+
export declare const harnessCheckInputOf: (args: {
|
|
277
|
+
harness: HarnessDefinitionIface;
|
|
278
|
+
composition: HarnessCompositionIface;
|
|
279
|
+
settings: Pick<ResolvedHarnessSettingsIface, "configuration">;
|
|
280
|
+
}) => HarnessCheckInputIface;
|