@finalai/final-agent-provider 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 +49 -9
- package/README.md +10 -0
- package/dist/modules/harnesses/config-fields.d.mts +3 -2
- package/dist/modules/harnesses/config-fields.mjs +16 -3
- package/dist/modules/harnesses/config-fields.mjs.map +3 -3
- package/dist/modules/harnesses/index.d.mts +1 -1
- package/dist/modules/harnesses/index.mjs +2 -1
- package/dist/modules/harnesses/index.mjs.map +2 -2
- package/dist/modules/harnesses/model-reference.d.mts +6 -0
- package/dist/modules/harnesses/model-reference.mjs +12 -0
- package/dist/modules/harnesses/model-reference.mjs.map +7 -0
- package/dist/modules/harnesses/remote-claude-code.mjs +2 -2
- package/dist/modules/harnesses/remote-claude-code.mjs.map +2 -2
- package/dist/modules/harnesses/remote-codex.mjs +2 -2
- package/dist/modules/harnesses/remote-codex.mjs.map +2 -2
- package/dist/modules/harnesses/remote-pi.mjs +2 -2
- package/dist/modules/harnesses/remote-pi.mjs.map +2 -2
- package/dist/modules/harnesses/serverless-final.d.mts +2 -3
- package/dist/modules/harnesses/serverless-final.mjs +4 -9
- package/dist/modules/harnesses/serverless-final.mjs.map +2 -2
- package/dist/modules/harnesses/serverless-nanocode-claude.d.mts +2 -3
- package/dist/modules/harnesses/serverless-nanocode-claude.mjs +4 -9
- package/dist/modules/harnesses/serverless-nanocode-claude.mjs.map +2 -2
- package/dist/modules/harnesses/serverless-nanocode-codex.d.mts +2 -3
- package/dist/modules/harnesses/serverless-nanocode-codex.mjs +4 -9
- package/dist/modules/harnesses/serverless-nanocode-codex.mjs.map +2 -2
- package/dist/modules/harnesses/serverless-pi.d.mts +2 -3
- package/dist/modules/harnesses/serverless-pi.mjs +4 -4
- package/dist/modules/harnesses/serverless-pi.mjs.map +2 -2
- package/package.json +2 -7
- package/dist/modules/harnesses/models.d.mts +0 -281
- package/dist/modules/harnesses/models.mjs +0 -234
- package/dist/modules/harnesses/models.mjs.map +0 -7
|
@@ -27,12 +27,7 @@ import {
|
|
|
27
27
|
skillsJson,
|
|
28
28
|
skillsZod
|
|
29
29
|
} from "./config-fields.mjs";
|
|
30
|
-
import {
|
|
31
|
-
CLAUDE_MODELS,
|
|
32
|
-
DEFAULT_CLAUDE_MODEL,
|
|
33
|
-
modelIds,
|
|
34
|
-
vendorsOf
|
|
35
|
-
} from "./models.mjs";
|
|
30
|
+
import { ModelVendor } from "./model-reference.mjs";
|
|
36
31
|
const SPECIFIER = "@finalai/final-agent-provider/harnesses/serverless-nanocode-claude";
|
|
37
32
|
const CLAUDE_REASONING_LEVELS = [
|
|
38
33
|
ReasoningLevel.Low,
|
|
@@ -48,7 +43,7 @@ const NANOCODE_CLAUDE_BASE_TOOLS = {
|
|
|
48
43
|
[BaseCapability.Files]: { provision: BaseToolProvision.Bound, nativeTools: ["Read", "Write"] }
|
|
49
44
|
};
|
|
50
45
|
const serverlessNanocodeClaudeConfigSchema = z.strictObject({
|
|
51
|
-
model: modelZod(
|
|
46
|
+
model: modelZod().optional(),
|
|
52
47
|
reasoning: reasoningZod(CLAUDE_REASONING_LEVELS).optional(),
|
|
53
48
|
credentials: credentialsZod(),
|
|
54
49
|
permissionMode: z.nativeEnum(ClaudePermissionMode).default(ClaudePermissionMode.Default),
|
|
@@ -59,7 +54,7 @@ const SERVERLESS_NANOCODE_CLAUDE_CONFIG_JSON_SCHEMA = configObjectJson({
|
|
|
59
54
|
required: ["credentials"],
|
|
60
55
|
title: "Claude on nanocode (serverless)",
|
|
61
56
|
properties: {
|
|
62
|
-
model: modelJson(
|
|
57
|
+
model: modelJson(),
|
|
63
58
|
reasoning: reasoningJson(CLAUDE_REASONING_LEVELS),
|
|
64
59
|
credentials: credentialsJson(),
|
|
65
60
|
permissionMode: permissionModeJson(
|
|
@@ -80,7 +75,7 @@ const SERVERLESS_NANOCODE_CLAUDE_DESCRIPTION = {
|
|
|
80
75
|
consumes: [SandboxWire.HandleRpc],
|
|
81
76
|
// Subscriptions are the Claude setup token, used as a bearer.
|
|
82
77
|
inference: {
|
|
83
|
-
vendors:
|
|
78
|
+
vendors: [ModelVendor.Anthropic],
|
|
84
79
|
kinds: [
|
|
85
80
|
InferenceCredentialKind.Subscription,
|
|
86
81
|
InferenceCredentialKind.ApiKey,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/harnesses/serverless-nanocode-claude.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n AcpTransport,\n BaseCapability,\n BaseToolProvision,\n CredentialDelivery,\n HarnessTrustClass,\n InferenceCredentialKind,\n McpTransportKind,\n PromptWhileRunning,\n SandboxWire,\n type HarnessDescriptionIface,\n type JsonSchema,\n} from '@finalai/agent-provider';\nimport * as z from 'zod';\nimport {\n ClaudePermissionMode,\n configObjectJson,\n credentialsJson,\n credentialsZod,\n harnessBinding,\n instructionsJson,\n instructionsZod,\n modelJson,\n modelZod,\n permissionModeJson,\n reasoningJson,\n ReasoningLevel,\n reasoningZod,\n skillsJson,\n skillsZod,\n type CredentialsInput,\n type HarnessBindingOutputIface,\n type InstructionInput,\n type SkillInput,\n} from \"./config-fields.mjs\";\nimport {
|
|
5
|
-
"mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,YAAY,OAAO;AACnB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AACP
|
|
4
|
+
"sourcesContent": ["import {\n AcpTransport,\n BaseCapability,\n BaseToolProvision,\n CredentialDelivery,\n HarnessTrustClass,\n InferenceCredentialKind,\n McpTransportKind,\n PromptWhileRunning,\n SandboxWire,\n type HarnessDescriptionIface,\n type JsonSchema,\n} from '@finalai/agent-provider';\nimport * as z from 'zod';\nimport {\n ClaudePermissionMode,\n configObjectJson,\n credentialsJson,\n credentialsZod,\n harnessBinding,\n instructionsJson,\n instructionsZod,\n modelJson,\n modelZod,\n permissionModeJson,\n reasoningJson,\n ReasoningLevel,\n reasoningZod,\n skillsJson,\n skillsZod,\n type CredentialsInput,\n type HarnessBindingOutputIface,\n type InstructionInput,\n type SkillInput,\n} from \"./config-fields.mjs\";\nimport { ModelVendor } from \"./model-reference.mjs\";\n\n// nanocode's Claude engine in the nanocode Durable Object script.\n\nexport const SPECIFIER = '@finalai/final-agent-provider/harnesses/serverless-nanocode-claude';\n\nexport const CLAUDE_REASONING_LEVELS = [\n ReasoningLevel.Low,\n ReasoningLevel.Medium,\n ReasoningLevel.High,\n ReasoningLevel.Max,\n] as const;\n\nexport const NANOCODE_CLAUDE_BASE_TOOLS: HarnessDescriptionIface['baseTools'] = {\n [BaseCapability.Shell]: {\n provision: BaseToolProvision.Bound,\n nativeTools: ['Bash', 'BashOutput'],\n },\n [BaseCapability.Files]: { provision: BaseToolProvision.Bound, nativeTools: ['Read', 'Write'] },\n};\n\nexport const serverlessNanocodeClaudeConfigSchema = z.strictObject({\n model: modelZod().optional(),\n reasoning: reasoningZod(CLAUDE_REASONING_LEVELS).optional(),\n credentials: credentialsZod(),\n permissionMode: z.nativeEnum(ClaudePermissionMode).default(ClaudePermissionMode.Default),\n instructions: instructionsZod(),\n skills: skillsZod(),\n});\n\nexport type ServerlessNanocodeClaudeConfigIface = z.output<\n typeof serverlessNanocodeClaudeConfigSchema\n>;\n\nexport const SERVERLESS_NANOCODE_CLAUDE_CONFIG_JSON_SCHEMA: JsonSchema = configObjectJson({\n required: ['credentials'],\n title: 'Claude on nanocode (serverless)',\n properties: {\n model: modelJson(),\n reasoning: reasoningJson(CLAUDE_REASONING_LEVELS),\n credentials: credentialsJson(),\n permissionMode: permissionModeJson(\n Object.values(ClaudePermissionMode),\n ClaudePermissionMode.Default,\n ),\n instructions: instructionsJson(),\n skills: skillsJson(),\n },\n});\n\nexport const SERVERLESS_NANOCODE_CLAUDE_DESCRIPTION: HarnessDescriptionIface = {\n configSchema: SERVERLESS_NANOCODE_CLAUDE_CONFIG_JSON_SCHEMA,\n acp: {\n transports: [AcpTransport.Relay, AcpTransport.Ws],\n mcp: [McpTransportKind.Acp, McpTransportKind.Http],\n },\n baseTools: NANOCODE_CLAUDE_BASE_TOOLS,\n consumes: [SandboxWire.HandleRpc],\n // Subscriptions are the Claude setup token, used as a bearer.\n inference: {\n vendors: [ModelVendor.Anthropic],\n kinds: [\n InferenceCredentialKind.Subscription,\n InferenceCredentialKind.ApiKey,\n InferenceCredentialKind.Platform,\n ],\n delivery: CredentialDelivery.PerRequest,\n },\n // Final runs these on its own Workers.\n trust: HarnessTrustClass.FirstParty,\n supports: { observe: true, resumeReplay: true, fork: false, authorMeta: true },\n // Measured (agent-harness-workers nanocode/claude.test.ts \"queues a prompt that arrives\n // while a turn runs\"): running, idle, running, idle. Open approvals are asked again\n // with new ids after a lost invocation, so no disconnect survival yet.\n promptWhileRunning: PromptWhileRunning.Queue,\n sessionSurvivesDisconnect: false,\n};\n\nexport interface ServerlessNanocodeClaudeConfigInputIface {\n model?: string;\n reasoning?:\n | (typeof CLAUDE_REASONING_LEVELS)[number]\n | `${(typeof CLAUDE_REASONING_LEVELS)[number]}`;\n credentials: CredentialsInput;\n permissionMode?: ClaudePermissionMode | `${ClaudePermissionMode}`;\n instructions?: InstructionInput[];\n skills?: SkillInput[];\n}\n\nexport const serverlessNanocodeClaude = (\n config: ServerlessNanocodeClaudeConfigInputIface,\n): HarnessBindingOutputIface => harnessBinding(SPECIFIER, config);\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,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,IACH,YAAY,CAAC,aAAa,OAAO,aAAa,EAAE;AAAA,IAChD,KAAK,CAAC,iBAAiB,KAAK,iBAAiB,IAAI;AAAA,EACnD;AAAA,EACA,WAAW;AAAA,EACX,UAAU,CAAC,YAAY,SAAS;AAAA;AAAA,EAEhC,WAAW;AAAA,IACT,SAAS,CAAC,YAAY,SAAS;AAAA,IAC/B,OAAO;AAAA,MACL,wBAAwB;AAAA,MACxB,wBAAwB;AAAA,MACxB,wBAAwB;AAAA,IAC1B;AAAA,IACA,UAAU,mBAAmB;AAAA,EAC/B;AAAA;AAAA,EAEA,OAAO,kBAAkB;AAAA,EACzB,UAAU,EAAE,SAAS,MAAM,cAAc,MAAM,MAAM,OAAO,YAAY,KAAK;AAAA;AAAA;AAAA;AAAA,EAI7E,oBAAoB,mBAAmB;AAAA,EACvC,2BAA2B;AAC7B;AAaO,MAAM,2BAA2B,CACtC,WAC8B,eAAe,WAAW,MAAM;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { type HarnessDescriptionIface, type JsonSchema } from '@finalai/agent-provider';
|
|
2
2
|
import * as z from 'zod';
|
|
3
3
|
import { CodexApprovalPolicy, ReasoningLevel, type CredentialsInput, type HarnessBindingOutputIface, type InstructionInput, type SkillInput } from "./config-fields.mjs";
|
|
4
|
-
import { type CodexResponsesLiteModelId } from "./models.mjs";
|
|
5
4
|
export declare const SPECIFIER = "@finalai/final-agent-provider/harnesses/serverless-nanocode-codex";
|
|
6
5
|
export declare const CODEX_REASONING_LEVELS: readonly [ReasoningLevel.Low, ReasoningLevel.Medium, ReasoningLevel.High, ReasoningLevel.Max];
|
|
7
6
|
export declare const CODEX_BASE_TOOLS: HarnessDescriptionIface['baseTools'];
|
|
8
7
|
export declare const serverlessNanocodeCodexConfigSchema: z.ZodObject<{
|
|
9
|
-
model: z.
|
|
8
|
+
model: z.ZodOptional<z.ZodString>;
|
|
10
9
|
reasoning: z.ZodOptional<z.ZodEnum<typeof ReasoningLevel>>;
|
|
11
10
|
credentials: z.ZodObject<{
|
|
12
11
|
payer: z.ZodEnum<typeof import("@finalai/agent-provider").CredentialPayer>;
|
|
@@ -55,7 +54,7 @@ export type ServerlessNanocodeCodexConfigIface = z.output<typeof serverlessNanoc
|
|
|
55
54
|
export declare const SERVERLESS_NANOCODE_CODEX_CONFIG_JSON_SCHEMA: JsonSchema;
|
|
56
55
|
export declare const SERVERLESS_NANOCODE_CODEX_DESCRIPTION: HarnessDescriptionIface;
|
|
57
56
|
export interface ServerlessNanocodeCodexConfigInputIface {
|
|
58
|
-
model?:
|
|
57
|
+
model?: string;
|
|
59
58
|
reasoning?: (typeof CODEX_REASONING_LEVELS)[number] | `${(typeof CODEX_REASONING_LEVELS)[number]}`;
|
|
60
59
|
credentials: CredentialsInput;
|
|
61
60
|
approvalPolicy?: CodexApprovalPolicy | `${CodexApprovalPolicy}`;
|
|
@@ -27,12 +27,7 @@ import {
|
|
|
27
27
|
skillsJson,
|
|
28
28
|
skillsZod
|
|
29
29
|
} from "./config-fields.mjs";
|
|
30
|
-
import {
|
|
31
|
-
CODEX_RESPONSES_LITE_MODELS,
|
|
32
|
-
DEFAULT_CODEX_MODEL,
|
|
33
|
-
modelIds,
|
|
34
|
-
vendorsOf
|
|
35
|
-
} from "./models.mjs";
|
|
30
|
+
import { ModelVendor } from "./model-reference.mjs";
|
|
36
31
|
const SPECIFIER = "@finalai/final-agent-provider/harnesses/serverless-nanocode-codex";
|
|
37
32
|
const CODEX_REASONING_LEVELS = [
|
|
38
33
|
ReasoningLevel.Low,
|
|
@@ -51,7 +46,7 @@ const CODEX_BASE_TOOLS = {
|
|
|
51
46
|
}
|
|
52
47
|
};
|
|
53
48
|
const serverlessNanocodeCodexConfigSchema = z.strictObject({
|
|
54
|
-
model: modelZod(
|
|
49
|
+
model: modelZod().optional(),
|
|
55
50
|
reasoning: reasoningZod(CODEX_REASONING_LEVELS).optional(),
|
|
56
51
|
credentials: credentialsZod(),
|
|
57
52
|
approvalPolicy: z.nativeEnum(CodexApprovalPolicy).default(CodexApprovalPolicy.OnRequest),
|
|
@@ -62,7 +57,7 @@ const SERVERLESS_NANOCODE_CODEX_CONFIG_JSON_SCHEMA = configObjectJson({
|
|
|
62
57
|
required: ["credentials"],
|
|
63
58
|
title: "Codex on nanocode (serverless)",
|
|
64
59
|
properties: {
|
|
65
|
-
model: modelJson(
|
|
60
|
+
model: modelJson(),
|
|
66
61
|
reasoning: reasoningJson(CODEX_REASONING_LEVELS),
|
|
67
62
|
credentials: credentialsJson(),
|
|
68
63
|
approvalPolicy: permissionModeJson(
|
|
@@ -82,7 +77,7 @@ const SERVERLESS_NANOCODE_CODEX_DESCRIPTION = {
|
|
|
82
77
|
baseTools: CODEX_BASE_TOOLS,
|
|
83
78
|
consumes: [SandboxWire.HandleRpc],
|
|
84
79
|
inference: {
|
|
85
|
-
vendors:
|
|
80
|
+
vendors: [ModelVendor.OpenAI],
|
|
86
81
|
kinds: [
|
|
87
82
|
InferenceCredentialKind.Subscription,
|
|
88
83
|
InferenceCredentialKind.ApiKey,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/harnesses/serverless-nanocode-codex.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n AcpTransport,\n BaseCapability,\n BaseToolProvision,\n CredentialDelivery,\n HarnessTrustClass,\n InferenceCredentialKind,\n McpTransportKind,\n PromptWhileRunning,\n SandboxWire,\n type HarnessDescriptionIface,\n type JsonSchema,\n} from '@finalai/agent-provider';\nimport * as z from 'zod';\nimport {\n CodexApprovalPolicy,\n configObjectJson,\n credentialsJson,\n credentialsZod,\n harnessBinding,\n instructionsJson,\n instructionsZod,\n modelJson,\n modelZod,\n permissionModeJson,\n reasoningJson,\n ReasoningLevel,\n reasoningZod,\n skillsJson,\n skillsZod,\n type CredentialsInput,\n type HarnessBindingOutputIface,\n type InstructionInput,\n type SkillInput,\n} from \"./config-fields.mjs\";\nimport {
|
|
5
|
-
"mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,YAAY,OAAO;AACnB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AACP
|
|
4
|
+
"sourcesContent": ["import {\n AcpTransport,\n BaseCapability,\n BaseToolProvision,\n CredentialDelivery,\n HarnessTrustClass,\n InferenceCredentialKind,\n McpTransportKind,\n PromptWhileRunning,\n SandboxWire,\n type HarnessDescriptionIface,\n type JsonSchema,\n} from '@finalai/agent-provider';\nimport * as z from 'zod';\nimport {\n CodexApprovalPolicy,\n configObjectJson,\n credentialsJson,\n credentialsZod,\n harnessBinding,\n instructionsJson,\n instructionsZod,\n modelJson,\n modelZod,\n permissionModeJson,\n reasoningJson,\n ReasoningLevel,\n reasoningZod,\n skillsJson,\n skillsZod,\n type CredentialsInput,\n type HarnessBindingOutputIface,\n type InstructionInput,\n type SkillInput,\n} from \"./config-fields.mjs\";\nimport { ModelVendor } from \"./model-reference.mjs\";\n\n// nanocode's Codex engine (Rust \u2192 wasm) in the nanocode Durable Object script.\n// Responses Lite models only; ChatGPT subscriptions go through the session\n// service relay because chatgpt.com blocks Workers egress.\n\nexport const SPECIFIER = '@finalai/final-agent-provider/harnesses/serverless-nanocode-codex';\n\n// The final://schemas/reasoning fragment has no xhigh/ultra yet; nanocode's\n// policies accept the rest.\nexport const CODEX_REASONING_LEVELS = [\n ReasoningLevel.Low,\n ReasoningLevel.Medium,\n ReasoningLevel.High,\n ReasoningLevel.Max,\n] as const;\n\nexport const CODEX_BASE_TOOLS: HarnessDescriptionIface['baseTools'] = {\n [BaseCapability.Shell]: {\n provision: BaseToolProvision.Bound,\n nativeTools: ['exec_command', 'write_stdin'],\n },\n [BaseCapability.Files]: {\n provision: BaseToolProvision.Bound,\n nativeTools: ['apply_patch', 'view_image'],\n },\n};\n\nexport const serverlessNanocodeCodexConfigSchema = z.strictObject({\n model: modelZod().optional(),\n reasoning: reasoningZod(CODEX_REASONING_LEVELS).optional(),\n credentials: credentialsZod(),\n approvalPolicy: z.nativeEnum(CodexApprovalPolicy).default(CodexApprovalPolicy.OnRequest),\n instructions: instructionsZod(),\n skills: skillsZod(),\n});\n\nexport type ServerlessNanocodeCodexConfigIface = z.output<\n typeof serverlessNanocodeCodexConfigSchema\n>;\n\nexport const SERVERLESS_NANOCODE_CODEX_CONFIG_JSON_SCHEMA: JsonSchema = configObjectJson({\n required: ['credentials'],\n title: 'Codex on nanocode (serverless)',\n properties: {\n model: modelJson(),\n reasoning: reasoningJson(CODEX_REASONING_LEVELS),\n credentials: credentialsJson(),\n approvalPolicy: permissionModeJson(\n Object.values(CodexApprovalPolicy),\n CodexApprovalPolicy.OnRequest,\n ),\n instructions: instructionsJson(),\n skills: skillsJson(),\n },\n});\n\nexport const SERVERLESS_NANOCODE_CODEX_DESCRIPTION: HarnessDescriptionIface = {\n configSchema: SERVERLESS_NANOCODE_CODEX_CONFIG_JSON_SCHEMA,\n acp: {\n transports: [AcpTransport.Relay, AcpTransport.Ws],\n mcp: [McpTransportKind.Acp, McpTransportKind.Http],\n },\n baseTools: CODEX_BASE_TOOLS,\n consumes: [SandboxWire.HandleRpc],\n inference: {\n vendors: [ModelVendor.OpenAI],\n kinds: [\n InferenceCredentialKind.Subscription,\n InferenceCredentialKind.ApiKey,\n InferenceCredentialKind.Platform,\n ],\n delivery: CredentialDelivery.PerRequest,\n },\n // Final runs these on its own Workers.\n trust: HarnessTrustClass.FirstParty,\n supports: { observe: true, resumeReplay: true, fork: false, authorMeta: true },\n // Measured (agent-harness-workers nanocode/codex.test.ts \"steers a prompt that arrives\n // while the turn runs into it\"); open approvals are asked again with new ids after a\n // lost invocation, so no disconnect survival yet.\n promptWhileRunning: PromptWhileRunning.Inject,\n sessionSurvivesDisconnect: false,\n};\n\nexport interface ServerlessNanocodeCodexConfigInputIface {\n model?: string;\n reasoning?:\n | (typeof CODEX_REASONING_LEVELS)[number]\n | `${(typeof CODEX_REASONING_LEVELS)[number]}`;\n credentials: CredentialsInput;\n approvalPolicy?: CodexApprovalPolicy | `${CodexApprovalPolicy}`;\n instructions?: InstructionInput[];\n skills?: SkillInput[];\n}\n\nexport const serverlessNanocodeCodex = (\n config: ServerlessNanocodeCodexConfigInputIface,\n): HarnessBindingOutputIface => harnessBinding(SPECIFIER, config);\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,YAAY,OAAO;AACnB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AACP,SAAS,mBAAmB;AAMrB,MAAM,YAAY;AAIlB,MAAM,yBAAyB;AAAA,EACpC,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AACjB;AAEO,MAAM,mBAAyD;AAAA,EACpE,CAAC,eAAe,KAAK,GAAG;AAAA,IACtB,WAAW,kBAAkB;AAAA,IAC7B,aAAa,CAAC,gBAAgB,aAAa;AAAA,EAC7C;AAAA,EACA,CAAC,eAAe,KAAK,GAAG;AAAA,IACtB,WAAW,kBAAkB;AAAA,IAC7B,aAAa,CAAC,eAAe,YAAY;AAAA,EAC3C;AACF;AAEO,MAAM,sCAAsC,EAAE,aAAa;AAAA,EAChE,OAAO,SAAS,EAAE,SAAS;AAAA,EAC3B,WAAW,aAAa,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nessDescriptionIface, type JsonSchema } from '@finalai/agent-provider';
|
|
2
2
|
import * as z from 'zod';
|
|
3
3
|
import { PiPermissionMode, ReasoningLevel, type CredentialsInput, type HarnessBindingOutputIface, type InstructionInput, type SkillInput } from "./config-fields.mjs";
|
|
4
|
-
import { type PiModelId } from "./models.mjs";
|
|
5
4
|
export declare const SPECIFIER = "@finalai/final-agent-provider/harnesses/serverless-pi";
|
|
6
5
|
export declare const PI_REASONING_LEVELS: readonly [ReasoningLevel.None, ReasoningLevel.Minimal, ReasoningLevel.Low, ReasoningLevel.Medium, ReasoningLevel.High];
|
|
7
6
|
export declare const PI_BASE_TOOLS: HarnessDescriptionIface['baseTools'];
|
|
8
7
|
export declare const serverlessPiConfigSchema: z.ZodObject<{
|
|
9
|
-
model: z.
|
|
8
|
+
model: z.ZodOptional<z.ZodString>;
|
|
10
9
|
reasoning: z.ZodOptional<z.ZodEnum<typeof ReasoningLevel>>;
|
|
11
10
|
credentials: z.ZodObject<{
|
|
12
11
|
payer: z.ZodEnum<typeof import("@finalai/agent-provider").CredentialPayer>;
|
|
@@ -55,7 +54,7 @@ export type ServerlessPiConfigIface = z.output<typeof serverlessPiConfigSchema>;
|
|
|
55
54
|
export declare const SERVERLESS_PI_CONFIG_JSON_SCHEMA: JsonSchema;
|
|
56
55
|
export declare const SERVERLESS_PI_DESCRIPTION: HarnessDescriptionIface;
|
|
57
56
|
export interface ServerlessPiConfigInputIface {
|
|
58
|
-
model?:
|
|
57
|
+
model?: string;
|
|
59
58
|
reasoning?: (typeof PI_REASONING_LEVELS)[number] | `${(typeof PI_REASONING_LEVELS)[number]}`;
|
|
60
59
|
credentials: CredentialsInput;
|
|
61
60
|
permissionMode?: PiPermissionMode | `${PiPermissionMode}`;
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
skillsJson,
|
|
28
28
|
skillsZod
|
|
29
29
|
} from "./config-fields.mjs";
|
|
30
|
-
import {
|
|
30
|
+
import { ModelVendor } from "./model-reference.mjs";
|
|
31
31
|
const SPECIFIER = "@finalai/final-agent-provider/harnesses/serverless-pi";
|
|
32
32
|
const PI_REASONING_LEVELS = [
|
|
33
33
|
ReasoningLevel.None,
|
|
@@ -44,7 +44,7 @@ const PI_BASE_TOOLS = {
|
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
const serverlessPiConfigSchema = z.strictObject({
|
|
47
|
-
model: modelZod(
|
|
47
|
+
model: modelZod().optional(),
|
|
48
48
|
reasoning: reasoningZod(PI_REASONING_LEVELS).optional(),
|
|
49
49
|
credentials: credentialsZod(),
|
|
50
50
|
permissionMode: z.nativeEnum(PiPermissionMode).default(PiPermissionMode.Ask),
|
|
@@ -55,7 +55,7 @@ const SERVERLESS_PI_CONFIG_JSON_SCHEMA = configObjectJson({
|
|
|
55
55
|
required: ["credentials"],
|
|
56
56
|
title: "Pi (serverless)",
|
|
57
57
|
properties: {
|
|
58
|
-
model: modelJson(
|
|
58
|
+
model: modelJson(),
|
|
59
59
|
reasoning: reasoningJson(PI_REASONING_LEVELS),
|
|
60
60
|
credentials: credentialsJson(),
|
|
61
61
|
permissionMode: permissionModeJson(Object.values(PiPermissionMode), PiPermissionMode.Ask),
|
|
@@ -72,7 +72,7 @@ const SERVERLESS_PI_DESCRIPTION = {
|
|
|
72
72
|
baseTools: PI_BASE_TOOLS,
|
|
73
73
|
consumes: [SandboxWire.HandleRpc],
|
|
74
74
|
inference: {
|
|
75
|
-
vendors:
|
|
75
|
+
vendors: [ModelVendor.OpenRouter, ModelVendor.OpenAI, ModelVendor.Anthropic],
|
|
76
76
|
kinds: [InferenceCredentialKind.ApiKey, InferenceCredentialKind.Platform],
|
|
77
77
|
delivery: CredentialDelivery.PerRequest
|
|
78
78
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/harnesses/serverless-pi.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n AcpTransport,\n BaseCapability,\n BaseToolProvision,\n CredentialDelivery,\n HarnessTrustClass,\n InferenceCredentialKind,\n McpTransportKind,\n PromptWhileRunning,\n SandboxWire,\n type HarnessDescriptionIface,\n type JsonSchema,\n} from '@finalai/agent-provider';\nimport * as z from 'zod';\nimport {\n configObjectJson,\n credentialsJson,\n credentialsZod,\n harnessBinding,\n instructionsJson,\n instructionsZod,\n modelJson,\n modelZod,\n permissionModeJson,\n PiPermissionMode,\n reasoningJson,\n ReasoningLevel,\n reasoningZod,\n skillsJson,\n skillsZod,\n type CredentialsInput,\n type HarnessBindingOutputIface,\n type InstructionInput,\n type SkillInput,\n} from \"./config-fields.mjs\";\nimport {
|
|
5
|
-
"mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,YAAY,OAAO;AACnB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AACP,SAAS,
|
|
4
|
+
"sourcesContent": ["import {\n AcpTransport,\n BaseCapability,\n BaseToolProvision,\n CredentialDelivery,\n HarnessTrustClass,\n InferenceCredentialKind,\n McpTransportKind,\n PromptWhileRunning,\n SandboxWire,\n type HarnessDescriptionIface,\n type JsonSchema,\n} from '@finalai/agent-provider';\nimport * as z from 'zod';\nimport {\n configObjectJson,\n credentialsJson,\n credentialsZod,\n harnessBinding,\n instructionsJson,\n instructionsZod,\n modelJson,\n modelZod,\n permissionModeJson,\n PiPermissionMode,\n reasoningJson,\n ReasoningLevel,\n reasoningZod,\n skillsJson,\n skillsZod,\n type CredentialsInput,\n type HarnessBindingOutputIface,\n type InstructionInput,\n type SkillInput,\n} from \"./config-fields.mjs\";\nimport { ModelVendor } from \"./model-reference.mjs\";\n\n// Pi (pi-mono) in a Durable Object per session in agent-harness-workers.\n\nexport const SPECIFIER = '@finalai/final-agent-provider/harnesses/serverless-pi';\n\nexport const PI_REASONING_LEVELS = [\n ReasoningLevel.None,\n ReasoningLevel.Minimal,\n ReasoningLevel.Low,\n ReasoningLevel.Medium,\n ReasoningLevel.High,\n] as const;\n\n// Pi's native tools, all executed on the bound target's handle.\nexport const PI_BASE_TOOLS: HarnessDescriptionIface['baseTools'] = {\n [BaseCapability.Shell]: { provision: BaseToolProvision.Bound, nativeTools: ['bash'] },\n [BaseCapability.Files]: {\n provision: BaseToolProvision.Bound,\n nativeTools: ['read', 'write', 'edit', 'grep', 'find', 'ls'],\n },\n};\n\nexport const serverlessPiConfigSchema = z.strictObject({\n model: modelZod().optional(),\n reasoning: reasoningZod(PI_REASONING_LEVELS).optional(),\n credentials: credentialsZod(),\n permissionMode: z.nativeEnum(PiPermissionMode).default(PiPermissionMode.Ask),\n instructions: instructionsZod(),\n skills: skillsZod(),\n});\n\nexport type ServerlessPiConfigIface = z.output<typeof serverlessPiConfigSchema>;\n\nexport const SERVERLESS_PI_CONFIG_JSON_SCHEMA: JsonSchema = configObjectJson({\n required: ['credentials'],\n title: 'Pi (serverless)',\n properties: {\n model: modelJson(),\n reasoning: reasoningJson(PI_REASONING_LEVELS),\n credentials: credentialsJson(),\n permissionMode: permissionModeJson(Object.values(PiPermissionMode), PiPermissionMode.Ask),\n instructions: instructionsJson(),\n skills: skillsJson(),\n },\n});\n\nexport const SERVERLESS_PI_DESCRIPTION: HarnessDescriptionIface = {\n configSchema: SERVERLESS_PI_CONFIG_JSON_SCHEMA,\n acp: {\n transports: [AcpTransport.Relay, AcpTransport.Ws],\n mcp: [McpTransportKind.Acp, McpTransportKind.Http],\n },\n baseTools: PI_BASE_TOOLS,\n consumes: [SandboxWire.HandleRpc],\n inference: {\n vendors: [ModelVendor.OpenRouter, ModelVendor.OpenAI, ModelVendor.Anthropic],\n kinds: [InferenceCredentialKind.ApiKey, InferenceCredentialKind.Platform],\n delivery: CredentialDelivery.PerRequest,\n },\n // Final runs these on its own Workers.\n trust: HarnessTrustClass.FirstParty,\n supports: { observe: true, resumeReplay: true, fork: false, authorMeta: true },\n // Measured (agent-harness-workers pi/engine.test.ts \"injects a prompt accepted while\n // running into the running work\"): a steer joins the running run. Across a lost\n // invocation an open ask is not re-raised with its id, so no disconnect survival yet.\n promptWhileRunning: PromptWhileRunning.Inject,\n sessionSurvivesDisconnect: false,\n};\n\nexport interface ServerlessPiConfigInputIface {\n model?: string;\n reasoning?: (typeof PI_REASONING_LEVELS)[number] | `${(typeof PI_REASONING_LEVELS)[number]}`;\n credentials: CredentialsInput;\n permissionMode?: PiPermissionMode | `${PiPermissionMode}`;\n instructions?: InstructionInput[];\n skills?: SkillInput[];\n}\n\nexport const serverlessPi = (config: ServerlessPiConfigInputIface): HarnessBindingOutputIface =>\n harnessBinding(SPECIFIER, config);\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,YAAY,OAAO;AACnB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AACP,SAAS,mBAAmB;AAIrB,MAAM,YAAY;AAElB,MAAM,sBAAsB;AAAA,EACjC,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AAAA,EACf,eAAe;AACjB;AAGO,MAAM,gBAAsD;AAAA,EACjE,CAAC,eAAe,KAAK,GAAG,EAAE,WAAW,kBAAkB,OAAO,aAAa,CAAC,MAAM,EAAE;AAAA,EACpF,CAAC,eAAe,KAAK,GAAG;AAAA,IACtB,WAAW,kBAAkB;AAAA,IAC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2BAA2B;AAC7B;AAWO,MAAM,eAAe,CAAC,WAC3B,eAAe,WAAW,MAAM;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finalai/final-agent-provider",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Final's provider package: serverless, remote and local harnesses; the computer and device sandboxes; the messaging, schedule and event channels.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -111,11 +111,6 @@
|
|
|
111
111
|
"default": "./dist/modules/channels/agent-events.mjs"
|
|
112
112
|
},
|
|
113
113
|
"./package.json": "./package.json",
|
|
114
|
-
"./harnesses/models": {
|
|
115
|
-
"types": "./dist/modules/harnesses/models.d.mts",
|
|
116
|
-
"import": "./dist/modules/harnesses/models.mjs",
|
|
117
|
-
"default": "./dist/modules/harnesses/models.mjs"
|
|
118
|
-
},
|
|
119
114
|
"./channel-factories": {
|
|
120
115
|
"types": "./dist/modules/channel-factories.d.mts",
|
|
121
116
|
"import": "./dist/modules/channel-factories.mjs",
|
|
@@ -215,7 +210,7 @@
|
|
|
215
210
|
"@agentclientprotocol/sdk": "1.8.0",
|
|
216
211
|
"@finalai/acp-session": "0.1.4",
|
|
217
212
|
"@finalai/agent-protocol": "0.1.4",
|
|
218
|
-
"@finalai/agent-provider": "0.1.
|
|
213
|
+
"@finalai/agent-provider": "0.1.5",
|
|
219
214
|
"@finalai/computers": "0.1.4",
|
|
220
215
|
"@finalai/websockets": "0.1.4",
|
|
221
216
|
"ws": "^8.21.3",
|
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
export declare enum ModelVendor {
|
|
2
|
-
OpenAI = "openai",
|
|
3
|
-
Anthropic = "anthropic",
|
|
4
|
-
OpenRouter = "openrouter"
|
|
5
|
-
}
|
|
6
|
-
export interface ModelPriceIface {
|
|
7
|
-
effectiveFrom: string;
|
|
8
|
-
inputUsdPerMillion: number;
|
|
9
|
-
outputUsdPerMillion: number;
|
|
10
|
-
cachedInputUsdPerMillion: number;
|
|
11
|
-
cacheWriteUsdPerMillion: number;
|
|
12
|
-
}
|
|
13
|
-
export interface HarnessModelIface {
|
|
14
|
-
id: string;
|
|
15
|
-
vendor: ModelVendor;
|
|
16
|
-
label: string;
|
|
17
|
-
vendorModelId?: string;
|
|
18
|
-
prices?: readonly ModelPriceIface[];
|
|
19
|
-
}
|
|
20
|
-
export declare const FINAL_HARNESS_MODELS: readonly [{
|
|
21
|
-
readonly id: "deepseek-v4.1-flash";
|
|
22
|
-
readonly vendor: ModelVendor.OpenRouter;
|
|
23
|
-
readonly label: "DeepSeek V4.1 Flash";
|
|
24
|
-
readonly vendorModelId: "deepseek/deepseek-v4.1-flash";
|
|
25
|
-
readonly prices: readonly [{
|
|
26
|
-
readonly effectiveFrom: "2026-10-02T00:00:00Z";
|
|
27
|
-
readonly inputUsdPerMillion: 0.22;
|
|
28
|
-
readonly outputUsdPerMillion: 0.66;
|
|
29
|
-
readonly cachedInputUsdPerMillion: 0.007;
|
|
30
|
-
readonly cacheWriteUsdPerMillion: 0;
|
|
31
|
-
}];
|
|
32
|
-
}, {
|
|
33
|
-
readonly id: "final-claude-opus-5.5";
|
|
34
|
-
readonly vendor: ModelVendor.OpenRouter;
|
|
35
|
-
readonly label: "Opus 5.5";
|
|
36
|
-
readonly vendorModelId: "anthropic/claude-opus-5.5";
|
|
37
|
-
readonly prices: readonly [{
|
|
38
|
-
readonly effectiveFrom: "2026-10-02T00:00:00Z";
|
|
39
|
-
readonly inputUsdPerMillion: 4;
|
|
40
|
-
readonly outputUsdPerMillion: 20;
|
|
41
|
-
readonly cachedInputUsdPerMillion: 0.2;
|
|
42
|
-
readonly cacheWriteUsdPerMillion: 5;
|
|
43
|
-
}];
|
|
44
|
-
}, {
|
|
45
|
-
readonly id: "final-gpt-6.1-sol";
|
|
46
|
-
readonly vendor: ModelVendor.OpenRouter;
|
|
47
|
-
readonly label: "GPT 6.1 Sol";
|
|
48
|
-
readonly vendorModelId: "openai/gpt-6.1-sol";
|
|
49
|
-
readonly prices: readonly [{
|
|
50
|
-
readonly effectiveFrom: "2026-10-02T00:00:00Z";
|
|
51
|
-
readonly inputUsdPerMillion: 2;
|
|
52
|
-
readonly outputUsdPerMillion: 10;
|
|
53
|
-
readonly cachedInputUsdPerMillion: 0.1;
|
|
54
|
-
readonly cacheWriteUsdPerMillion: 2.5;
|
|
55
|
-
}];
|
|
56
|
-
}];
|
|
57
|
-
export declare const CODEX_RESPONSES_LITE_MODELS: readonly [{
|
|
58
|
-
readonly id: "gpt-6-sol";
|
|
59
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
60
|
-
readonly label: "GPT 6 Sol";
|
|
61
|
-
readonly prices: readonly [ModelPriceIface];
|
|
62
|
-
}, {
|
|
63
|
-
readonly id: "gpt-6.1-sol";
|
|
64
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
65
|
-
readonly label: "GPT 6.1 Sol";
|
|
66
|
-
readonly prices: readonly [ModelPriceIface];
|
|
67
|
-
}, {
|
|
68
|
-
readonly id: "gpt-6-luna";
|
|
69
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
70
|
-
readonly label: "GPT 6 Luna";
|
|
71
|
-
readonly prices: readonly [ModelPriceIface];
|
|
72
|
-
}, {
|
|
73
|
-
readonly id: "gpt-6-astra";
|
|
74
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
75
|
-
readonly label: "GPT 6 Astra";
|
|
76
|
-
readonly prices: readonly [ModelPriceIface];
|
|
77
|
-
}, {
|
|
78
|
-
readonly id: "gpt-5.6-sol";
|
|
79
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
80
|
-
readonly label: "GPT 5.6 Sol";
|
|
81
|
-
readonly prices: readonly [ModelPriceIface];
|
|
82
|
-
}, {
|
|
83
|
-
readonly id: "gpt-5.6-terra";
|
|
84
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
85
|
-
readonly label: "GPT 5.6 Terra";
|
|
86
|
-
readonly prices: readonly [ModelPriceIface];
|
|
87
|
-
}, {
|
|
88
|
-
readonly id: "gpt-5.6-luna";
|
|
89
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
90
|
-
readonly label: "GPT 5.6 Luna";
|
|
91
|
-
readonly prices: readonly [ModelPriceIface];
|
|
92
|
-
}];
|
|
93
|
-
export declare const CODEX_CLI_MODELS: readonly [{
|
|
94
|
-
readonly id: "gpt-6-sol";
|
|
95
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
96
|
-
readonly label: "GPT 6 Sol";
|
|
97
|
-
readonly prices: readonly [ModelPriceIface];
|
|
98
|
-
}, {
|
|
99
|
-
readonly id: "gpt-6.1-sol";
|
|
100
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
101
|
-
readonly label: "GPT 6.1 Sol";
|
|
102
|
-
readonly prices: readonly [ModelPriceIface];
|
|
103
|
-
}, {
|
|
104
|
-
readonly id: "gpt-6-luna";
|
|
105
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
106
|
-
readonly label: "GPT 6 Luna";
|
|
107
|
-
readonly prices: readonly [ModelPriceIface];
|
|
108
|
-
}, {
|
|
109
|
-
readonly id: "gpt-6-astra";
|
|
110
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
111
|
-
readonly label: "GPT 6 Astra";
|
|
112
|
-
readonly prices: readonly [ModelPriceIface];
|
|
113
|
-
}, {
|
|
114
|
-
readonly id: "gpt-5.6-sol";
|
|
115
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
116
|
-
readonly label: "GPT 5.6 Sol";
|
|
117
|
-
readonly prices: readonly [ModelPriceIface];
|
|
118
|
-
}, {
|
|
119
|
-
readonly id: "gpt-5.6-terra";
|
|
120
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
121
|
-
readonly label: "GPT 5.6 Terra";
|
|
122
|
-
readonly prices: readonly [ModelPriceIface];
|
|
123
|
-
}, {
|
|
124
|
-
readonly id: "gpt-5.6-luna";
|
|
125
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
126
|
-
readonly label: "GPT 5.6 Luna";
|
|
127
|
-
readonly prices: readonly [ModelPriceIface];
|
|
128
|
-
}, {
|
|
129
|
-
readonly id: "gpt-5.5";
|
|
130
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
131
|
-
readonly label: "GPT 5.5";
|
|
132
|
-
readonly prices: readonly [ModelPriceIface];
|
|
133
|
-
}, {
|
|
134
|
-
readonly id: "gpt-5.4";
|
|
135
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
136
|
-
readonly label: "GPT 5.4";
|
|
137
|
-
readonly prices: readonly [ModelPriceIface];
|
|
138
|
-
}, {
|
|
139
|
-
readonly id: "gpt-5.4-mini";
|
|
140
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
141
|
-
readonly label: "GPT 5.4 Mini";
|
|
142
|
-
readonly prices: readonly [ModelPriceIface];
|
|
143
|
-
}, {
|
|
144
|
-
readonly id: "gpt-5.3-codex-spark";
|
|
145
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
146
|
-
readonly label: "GPT 5.3 Codex Spark";
|
|
147
|
-
}];
|
|
148
|
-
export declare const CLAUDE_MODELS: readonly [{
|
|
149
|
-
readonly id: "claude-opus-5-5";
|
|
150
|
-
readonly vendor: ModelVendor.Anthropic;
|
|
151
|
-
readonly label: "Opus 5.5";
|
|
152
|
-
readonly prices: readonly [ModelPriceIface];
|
|
153
|
-
}, {
|
|
154
|
-
readonly id: "claude-opus-5";
|
|
155
|
-
readonly vendor: ModelVendor.Anthropic;
|
|
156
|
-
readonly label: "Opus 5";
|
|
157
|
-
readonly prices: readonly [ModelPriceIface];
|
|
158
|
-
}, {
|
|
159
|
-
readonly id: "claude-fable-5";
|
|
160
|
-
readonly vendor: ModelVendor.Anthropic;
|
|
161
|
-
readonly label: "Fable 5";
|
|
162
|
-
readonly prices: readonly [ModelPriceIface];
|
|
163
|
-
}, {
|
|
164
|
-
readonly id: "claude-sonnet-5";
|
|
165
|
-
readonly vendor: ModelVendor.Anthropic;
|
|
166
|
-
readonly label: "Sonnet 5";
|
|
167
|
-
readonly prices: readonly [ModelPriceIface];
|
|
168
|
-
}, {
|
|
169
|
-
readonly id: "claude-haiku-4-5";
|
|
170
|
-
readonly vendor: ModelVendor.Anthropic;
|
|
171
|
-
readonly label: "Haiku 4.5";
|
|
172
|
-
readonly prices: readonly [ModelPriceIface];
|
|
173
|
-
}];
|
|
174
|
-
export declare const PI_MODELS: readonly [{
|
|
175
|
-
readonly id: "deepseek-v4.1-flash";
|
|
176
|
-
readonly vendor: ModelVendor.OpenRouter;
|
|
177
|
-
readonly label: "DeepSeek V4.1 Flash";
|
|
178
|
-
readonly vendorModelId: "deepseek/deepseek-v4.1-flash";
|
|
179
|
-
readonly prices: readonly [{
|
|
180
|
-
readonly effectiveFrom: "2026-10-02T00:00:00Z";
|
|
181
|
-
readonly inputUsdPerMillion: 0.22;
|
|
182
|
-
readonly outputUsdPerMillion: 0.66;
|
|
183
|
-
readonly cachedInputUsdPerMillion: 0.007;
|
|
184
|
-
readonly cacheWriteUsdPerMillion: 0;
|
|
185
|
-
}];
|
|
186
|
-
}, ...({
|
|
187
|
-
readonly id: "gpt-6-sol";
|
|
188
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
189
|
-
readonly label: "GPT 6 Sol";
|
|
190
|
-
readonly prices: readonly [ModelPriceIface];
|
|
191
|
-
} | {
|
|
192
|
-
readonly id: "gpt-6.1-sol";
|
|
193
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
194
|
-
readonly label: "GPT 6.1 Sol";
|
|
195
|
-
readonly prices: readonly [ModelPriceIface];
|
|
196
|
-
} | {
|
|
197
|
-
readonly id: "gpt-6-luna";
|
|
198
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
199
|
-
readonly label: "GPT 6 Luna";
|
|
200
|
-
readonly prices: readonly [ModelPriceIface];
|
|
201
|
-
} | {
|
|
202
|
-
readonly id: "gpt-6-astra";
|
|
203
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
204
|
-
readonly label: "GPT 6 Astra";
|
|
205
|
-
readonly prices: readonly [ModelPriceIface];
|
|
206
|
-
} | {
|
|
207
|
-
readonly id: "gpt-5.6-sol";
|
|
208
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
209
|
-
readonly label: "GPT 5.6 Sol";
|
|
210
|
-
readonly prices: readonly [ModelPriceIface];
|
|
211
|
-
} | {
|
|
212
|
-
readonly id: "gpt-5.6-terra";
|
|
213
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
214
|
-
readonly label: "GPT 5.6 Terra";
|
|
215
|
-
readonly prices: readonly [ModelPriceIface];
|
|
216
|
-
} | {
|
|
217
|
-
readonly id: "gpt-5.6-luna";
|
|
218
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
219
|
-
readonly label: "GPT 5.6 Luna";
|
|
220
|
-
readonly prices: readonly [ModelPriceIface];
|
|
221
|
-
} | {
|
|
222
|
-
readonly id: "gpt-5.5";
|
|
223
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
224
|
-
readonly label: "GPT 5.5";
|
|
225
|
-
readonly prices: readonly [ModelPriceIface];
|
|
226
|
-
} | {
|
|
227
|
-
readonly id: "gpt-5.4";
|
|
228
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
229
|
-
readonly label: "GPT 5.4";
|
|
230
|
-
readonly prices: readonly [ModelPriceIface];
|
|
231
|
-
} | {
|
|
232
|
-
readonly id: "gpt-5.4-mini";
|
|
233
|
-
readonly vendor: ModelVendor.OpenAI;
|
|
234
|
-
readonly label: "GPT 5.4 Mini";
|
|
235
|
-
readonly prices: readonly [ModelPriceIface];
|
|
236
|
-
})[], {
|
|
237
|
-
readonly id: "claude-opus-5-5";
|
|
238
|
-
readonly vendor: ModelVendor.Anthropic;
|
|
239
|
-
readonly label: "Opus 5.5";
|
|
240
|
-
readonly prices: readonly [ModelPriceIface];
|
|
241
|
-
}, {
|
|
242
|
-
readonly id: "claude-opus-5";
|
|
243
|
-
readonly vendor: ModelVendor.Anthropic;
|
|
244
|
-
readonly label: "Opus 5";
|
|
245
|
-
readonly prices: readonly [ModelPriceIface];
|
|
246
|
-
}, {
|
|
247
|
-
readonly id: "claude-fable-5";
|
|
248
|
-
readonly vendor: ModelVendor.Anthropic;
|
|
249
|
-
readonly label: "Fable 5";
|
|
250
|
-
readonly prices: readonly [ModelPriceIface];
|
|
251
|
-
}, {
|
|
252
|
-
readonly id: "claude-sonnet-5";
|
|
253
|
-
readonly vendor: ModelVendor.Anthropic;
|
|
254
|
-
readonly label: "Sonnet 5";
|
|
255
|
-
readonly prices: readonly [ModelPriceIface];
|
|
256
|
-
}, {
|
|
257
|
-
readonly id: "claude-haiku-4-5";
|
|
258
|
-
readonly vendor: ModelVendor.Anthropic;
|
|
259
|
-
readonly label: "Haiku 4.5";
|
|
260
|
-
readonly prices: readonly [ModelPriceIface];
|
|
261
|
-
}];
|
|
262
|
-
export type FinalHarnessModelId = (typeof FINAL_HARNESS_MODELS)[number]['id'];
|
|
263
|
-
export type CodexResponsesLiteModelId = (typeof CODEX_RESPONSES_LITE_MODELS)[number]['id'];
|
|
264
|
-
export type CodexCliModelId = (typeof CODEX_CLI_MODELS)[number]['id'];
|
|
265
|
-
export type ClaudeModelId = (typeof CLAUDE_MODELS)[number]['id'];
|
|
266
|
-
export type PiModelId = (typeof PI_MODELS)[number]['id'];
|
|
267
|
-
export declare const DEFAULT_FINAL_HARNESS_MODEL: FinalHarnessModelId;
|
|
268
|
-
export declare const DEFAULT_PI_MODEL: PiModelId;
|
|
269
|
-
export declare const DEFAULT_CODEX_MODEL: CodexResponsesLiteModelId;
|
|
270
|
-
export declare const DEFAULT_CLAUDE_MODEL: ClaudeModelId;
|
|
271
|
-
export declare const modelIds: (models: readonly HarnessModelIface[]) => string[];
|
|
272
|
-
export declare const modelVendor: (models: readonly HarnessModelIface[], id: string) => ModelVendor | null;
|
|
273
|
-
export declare const vendorModelRef: (models: readonly HarnessModelIface[], id: string) => string;
|
|
274
|
-
export declare const vendorsOf: (models: readonly HarnessModelIface[]) => ModelVendor[];
|
|
275
|
-
export declare const CATALOG_MODELS: readonly HarnessModelIface[];
|
|
276
|
-
export declare const modelPriceAt: (args: {
|
|
277
|
-
vendor: string;
|
|
278
|
-
model: string;
|
|
279
|
-
at: Date;
|
|
280
|
-
models?: readonly HarnessModelIface[];
|
|
281
|
-
}) => ModelPriceIface | null;
|