@finalai/final-agent-provider 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/HOSTING.md +334 -245
- package/README.md +126 -40
- package/WORKSPACE-EGRESS.md +11 -11
- package/dist/modules/catalog.d.mts +9 -0
- package/dist/modules/catalog.mjs +21 -0
- package/dist/modules/catalog.mjs.map +7 -0
- package/dist/modules/channels/projection.mjs +15 -8
- package/dist/modules/channels/projection.mjs.map +2 -2
- package/dist/modules/harnesses/acp-agent.d.mts +4 -0
- package/dist/modules/harnesses/acp-agent.mjs +35 -0
- package/dist/modules/harnesses/acp-agent.mjs.map +7 -0
- package/dist/modules/harnesses/adapters.d.mts +7 -0
- package/dist/modules/harnesses/adapters.mjs +74 -0
- package/dist/modules/harnesses/adapters.mjs.map +7 -0
- package/dist/modules/harnesses/claude-code.d.mts +14 -0
- package/dist/modules/harnesses/claude-code.mjs +79 -0
- package/dist/modules/harnesses/claude-code.mjs.map +7 -0
- package/dist/modules/harnesses/codex.d.mts +12 -0
- package/dist/modules/harnesses/codex.mjs +90 -0
- package/dist/modules/harnesses/codex.mjs.map +7 -0
- package/dist/modules/harnesses/config-fields.d.mts +98 -57
- package/dist/modules/harnesses/config-fields.mjs +58 -35
- package/dist/modules/harnesses/config-fields.mjs.map +3 -3
- package/dist/modules/harnesses/definitions.d.mts +3 -0
- package/dist/modules/harnesses/definitions.mjs +21 -0
- package/dist/modules/harnesses/definitions.mjs.map +7 -0
- package/dist/modules/harnesses/fidelity.d.mts +1 -1
- package/dist/modules/harnesses/fidelity.mjs +19 -16
- package/dist/modules/harnesses/fidelity.mjs.map +2 -2
- package/dist/modules/harnesses/final.d.mts +12 -0
- package/dist/modules/harnesses/final.mjs +70 -0
- package/dist/modules/harnesses/final.mjs.map +7 -0
- package/dist/modules/harnesses/index.d.mts +13 -12
- package/dist/modules/harnesses/index.mjs +86 -45
- package/dist/modules/harnesses/index.mjs.map +3 -3
- package/dist/modules/harnesses/names.d.mts +43 -0
- package/dist/modules/harnesses/names.mjs +59 -0
- package/dist/modules/harnesses/names.mjs.map +7 -0
- package/dist/modules/harnesses/nanocode-claude.d.mts +18 -0
- package/dist/modules/harnesses/nanocode-claude.mjs +101 -0
- package/dist/modules/harnesses/nanocode-claude.mjs.map +7 -0
- package/dist/modules/harnesses/nanocode-codex.d.mts +13 -0
- package/dist/modules/harnesses/nanocode-codex.mjs +64 -0
- package/dist/modules/harnesses/nanocode-codex.mjs.map +7 -0
- package/dist/modules/harnesses/pi.d.mts +12 -0
- package/dist/modules/harnesses/pi.mjs +71 -0
- package/dist/modules/harnesses/pi.mjs.map +7 -0
- package/dist/modules/integrations.d.mts +9 -0
- package/dist/modules/integrations.mjs +29 -0
- package/dist/modules/integrations.mjs.map +7 -0
- package/dist/modules/provider/general.bundle.d.mts +1 -0
- package/dist/modules/provider/general.bundle.mjs +5 -0
- package/dist/modules/provider/general.bundle.mjs.map +7 -0
- package/dist/modules/provider/general.d.mts +11 -0
- package/dist/modules/provider/general.mjs +130 -0
- package/dist/modules/provider/general.mjs.map +7 -0
- package/dist/modules/provider/index.d.mts +3 -0
- package/dist/modules/provider/index.mjs +13 -0
- package/dist/modules/provider/index.mjs.map +7 -0
- package/dist/modules/sandboxes/access.d.mts +34 -0
- package/dist/modules/sandboxes/access.mjs +15 -0
- package/dist/modules/sandboxes/access.mjs.map +7 -0
- package/dist/modules/sandboxes/computer.d.mts +24 -51
- package/dist/modules/sandboxes/computer.mjs +523 -888
- package/dist/modules/sandboxes/computer.mjs.map +3 -3
- package/dist/modules/sandboxes/computers-api.d.mts +3 -2
- package/dist/modules/sandboxes/computers-api.mjs +2 -4
- package/dist/modules/sandboxes/computers-api.mjs.map +2 -2
- package/dist/modules/sandboxes/device-api.d.mts +4 -3
- package/dist/modules/sandboxes/device-api.mjs +2 -4
- package/dist/modules/sandboxes/device-api.mjs.map +2 -2
- package/dist/modules/sandboxes/device.d.mts +6 -6
- package/dist/modules/sandboxes/device.mjs +126 -121
- package/dist/modules/sandboxes/device.mjs.map +3 -3
- package/dist/modules/sandboxes/egress.d.mts +10 -9
- package/dist/modules/sandboxes/egress.mjs +73 -56
- package/dist/modules/sandboxes/egress.mjs.map +2 -2
- package/dist/modules/sandboxes/environment.d.mts +35 -269
- package/dist/modules/sandboxes/environment.mjs +27 -104
- package/dist/modules/sandboxes/environment.mjs.map +3 -3
- package/dist/modules/sandboxes/index.d.mts +9 -69
- package/dist/modules/sandboxes/index.mjs +35 -95
- package/dist/modules/sandboxes/index.mjs.map +3 -3
- package/dist/modules/sandboxes/local.d.mts +28 -0
- package/dist/modules/sandboxes/local.mjs +499 -0
- package/dist/modules/sandboxes/local.mjs.map +7 -0
- package/dist/modules/sandboxes/session.d.mts +0 -3
- package/dist/modules/sandboxes/session.mjs +2 -22
- package/dist/modules/sandboxes/session.mjs.map +2 -2
- package/dist/modules/sandboxes/testing/fake-machine.mjs +0 -28
- package/dist/modules/sandboxes/testing/fake-machine.mjs.map +2 -2
- package/package.json +76 -104
- package/dist/modules/connections.d.mts +0 -11
- package/dist/modules/connections.mjs +0 -16
- package/dist/modules/connections.mjs.map +0 -7
- package/dist/modules/harnesses/acp-describe.d.mts +0 -20
- package/dist/modules/harnesses/acp-describe.mjs +0 -110
- package/dist/modules/harnesses/acp-describe.mjs.map +0 -7
- package/dist/modules/harnesses/local-stdio.d.mts +0 -47
- package/dist/modules/harnesses/local-stdio.mjs +0 -41
- package/dist/modules/harnesses/local-stdio.mjs.map +0 -7
- package/dist/modules/harnesses/remote-acp.d.mts +0 -76
- package/dist/modules/harnesses/remote-acp.mjs +0 -83
- package/dist/modules/harnesses/remote-acp.mjs.map +0 -7
- package/dist/modules/harnesses/remote-claude-code.d.mts +0 -88
- package/dist/modules/harnesses/remote-claude-code.mjs +0 -113
- package/dist/modules/harnesses/remote-claude-code.mjs.map +0 -7
- package/dist/modules/harnesses/remote-client-tls.d.mts +0 -35
- package/dist/modules/harnesses/remote-client-tls.mjs +0 -37
- package/dist/modules/harnesses/remote-client-tls.mjs.map +0 -7
- package/dist/modules/harnesses/remote-codex.d.mts +0 -98
- package/dist/modules/harnesses/remote-codex.mjs +0 -128
- package/dist/modules/harnesses/remote-codex.mjs.map +0 -7
- package/dist/modules/harnesses/remote-pi.d.mts +0 -78
- package/dist/modules/harnesses/remote-pi.mjs +0 -104
- package/dist/modules/harnesses/remote-pi.mjs.map +0 -7
- package/dist/modules/harnesses/remote-url.d.mts +0 -5
- package/dist/modules/harnesses/remote-url.mjs +0 -19
- package/dist/modules/harnesses/remote-url.mjs.map +0 -7
- package/dist/modules/harnesses/serverless-final.d.mts +0 -63
- package/dist/modules/harnesses/serverless-final.mjs +0 -88
- package/dist/modules/harnesses/serverless-final.mjs.map +0 -7
- package/dist/modules/harnesses/serverless-nanocode-claude.d.mts +0 -64
- package/dist/modules/harnesses/serverless-nanocode-claude.mjs +0 -105
- package/dist/modules/harnesses/serverless-nanocode-claude.mjs.map +0 -7
- package/dist/modules/harnesses/serverless-nanocode-codex.d.mts +0 -66
- package/dist/modules/harnesses/serverless-nanocode-codex.mjs +0 -113
- package/dist/modules/harnesses/serverless-nanocode-codex.mjs.map +0 -7
- package/dist/modules/harnesses/serverless-pi.d.mts +0 -64
- package/dist/modules/harnesses/serverless-pi.mjs +0 -98
- package/dist/modules/harnesses/serverless-pi.mjs.map +0 -7
- package/dist/modules/runtime/index.d.mts +0 -7
- package/dist/modules/runtime/index.mjs +0 -18
- package/dist/modules/runtime/index.mjs.map +0 -7
- package/dist/modules/runtime/local-stdio.d.mts +0 -10
- package/dist/modules/runtime/local-stdio.mjs +0 -106
- package/dist/modules/runtime/local-stdio.mjs.map +0 -7
- package/dist/modules/runtime/remote-acp.d.mts +0 -16
- package/dist/modules/runtime/remote-acp.mjs +0 -152
- package/dist/modules/runtime/remote-acp.mjs.map +0 -7
- package/dist/modules/runtime/remote-claude-code.d.mts +0 -5
- package/dist/modules/runtime/remote-claude-code.mjs +0 -47
- package/dist/modules/runtime/remote-claude-code.mjs.map +0 -7
- package/dist/modules/runtime/remote-codex.d.mts +0 -5
- package/dist/modules/runtime/remote-codex.mjs +0 -47
- package/dist/modules/runtime/remote-codex.mjs.map +0 -7
- package/dist/modules/runtime/remote-host.d.mts +0 -127
- package/dist/modules/runtime/remote-host.mjs +0 -387
- package/dist/modules/runtime/remote-host.mjs.map +0 -7
- package/dist/modules/runtime/remote-pi.d.mts +0 -5
- package/dist/modules/runtime/remote-pi.mjs +0 -44
- package/dist/modules/runtime/remote-pi.mjs.map +0 -7
- package/dist/modules/sandboxes/guide.d.mts +0 -35
- package/dist/modules/sandboxes/guide.mjs +0 -119
- package/dist/modules/sandboxes/guide.mjs.map +0 -7
- package/dist/modules/sandboxes/workspace-setup.d.mts +0 -42
- package/dist/modules/sandboxes/workspace-setup.mjs +0 -242
- package/dist/modules/sandboxes/workspace-setup.mjs.map +0 -7
- package/dist/modules/testing/harness.d.mts +0 -9
- package/dist/modules/testing/harness.mjs +0 -123
- package/dist/modules/testing/harness.mjs.map +0 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/harnesses/config-fields.ts"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": "AAAA
|
|
6
|
-
"names": ["MODEL_REFERENCE_PATTERN", "ReasoningLevel", "PiPermissionMode", "ClaudePermissionMode", "CodexApprovalPolicy", "
|
|
4
|
+
"sourcesContent": ["import {\n inferenceSchema,\n jsonObjectSchema,\n jsonValueSchema,\n PermissionLevel,\n SCHEMA_IDS,\n type HarnessSettingsIface,\n type InferenceSource,\n type JsonObject,\n type JsonSchema,\n type JsonValue,\n type HarnessEnvironmentIface,\n} from '@finalai/agent-provider';\nimport * as z from 'zod';\nimport { MODEL_REFERENCE_PATTERN } from \"./model-reference.mjs\";\n\nexport { MODEL_REFERENCE_PATTERN } from \"./model-reference.mjs\";\n\n// Configuration building blocks shared by the harness definitions: each\n// writes its configuration's JSON Schema (what a picker renders and the\n// platform validates settings with, $ref-ing the shared final://schemas/*\n// fragments) from these. The Zod helpers are for programs that read a\n// configuration they were handed.\n\n// Mirrors the final://schemas/reasoning fragment's enum.\nexport enum ReasoningLevel {\n None = 'none',\n Minimal = 'minimal',\n Low = 'low',\n Medium = 'medium',\n High = 'high',\n Max = 'max',\n}\n\n// The native modes each program understands. Settings carry a `PermissionLevel`;\n// each harness maps it onto its program's own mode.\n\n// Pi and the Final harness.\nexport enum PiPermissionMode {\n Auto = 'auto',\n Ask = 'ask',\n Readonly = 'readonly',\n}\n\n// Claude Code and the nanocode Claude engine.\nexport enum ClaudePermissionMode {\n Default = 'default',\n AcceptEdits = 'accept-edits',\n Plan = 'plan',\n Bypass = 'bypass',\n // The nanocode Claude engine only: a reviewer model answers what `default` would ask.\n Auto = 'auto',\n}\n\n// Codex and the nanocode Codex engine.\nexport enum CodexApprovalPolicy {\n Untrusted = 'untrusted',\n OnRequest = 'on-request',\n OnFailure = 'on-failure',\n Never = 'never',\n}\n\n// Who answers what a nanocode engine would ask: the person, or a reviewer model.\nexport enum ApprovalsReviewer {\n User = 'user',\n AutoReview = 'auto-review',\n}\n\n// The Codex CLI's OS sandbox on a host you run.\nexport enum CodexSandboxMode {\n ReadOnly = 'read-only',\n WorkspaceWrite = 'workspace-write',\n DangerFullAccess = 'danger-full-access',\n}\n\nexport interface SecretRefIface {\n secretKey: string;\n}\n\n// A permission level as the caller wrote it, enum or string.\nexport type PermissionInput = PermissionLevel | `${PermissionLevel}`;\n\n// One inference source or an ordered list of them; the first available wins.\nexport type InferenceInput = InferenceSource | readonly InferenceSource[];\n\nexport const piPermissionModeFor = (level: PermissionLevel): PiPermissionMode =>\n level === PermissionLevel.Auto ? PiPermissionMode.Auto : PiPermissionMode.Ask;\n\nexport const claudePermissionModeFor = (\n level: PermissionLevel,\n reviewer: ApprovalsReviewer = ApprovalsReviewer.User,\n): ClaudePermissionMode => {\n if (level === PermissionLevel.Auto) return ClaudePermissionMode.Bypass;\n if (reviewer === ApprovalsReviewer.AutoReview) return ClaudePermissionMode.Auto;\n return level === PermissionLevel.Review\n ? ClaudePermissionMode.AcceptEdits\n : ClaudePermissionMode.Default;\n};\n\nexport const codexApprovalPolicyFor = (level: PermissionLevel): CodexApprovalPolicy =>\n level === PermissionLevel.Auto\n ? CodexApprovalPolicy.Never\n : level === PermissionLevel.Review\n ? CodexApprovalPolicy.OnRequest\n : CodexApprovalPolicy.Untrusted;\n\nexport const configObjectJson = (args: {\n title: string;\n properties: Record<string, JsonSchema>;\n required?: string[];\n}): JsonSchema => ({\n type: 'object',\n title: args.title,\n additionalProperties: false,\n properties: args.properties,\n required: args.required ?? [],\n});\n\n// Open model references; an explicit list restricts them.\nexport const modelJson = (ids?: readonly string[], defaultId?: string): JsonSchema => ({\n $ref: SCHEMA_IDS.modelPicker,\n type: 'string',\n ...(ids == null\n ? { minLength: 1, maxLength: 200, pattern: MODEL_REFERENCE_PATTERN }\n : { enum: [...ids] }),\n ...(defaultId == null ? {} : { default: defaultId }),\n});\n\nexport const reasoningJson = (levels: readonly ReasoningLevel[]): JsonSchema => ({\n $ref: SCHEMA_IDS.reasoning,\n enum: [...levels],\n});\n\nexport const inferenceJson = (): JsonSchema => ({ $ref: SCHEMA_IDS.inference });\n\nexport const permissionModeJson = (): JsonSchema => ({\n $ref: SCHEMA_IDS.permissionMode,\n enum: Object.values(PermissionLevel),\n});\n\nexport const approvalsReviewerJson = (): JsonSchema => ({\n type: 'string',\n title: 'Approvals reviewer',\n enum: Object.values(ApprovalsReviewer),\n default: ApprovalsReviewer.User,\n});\n\nexport const secretRefJson = (): JsonSchema => ({ $ref: SCHEMA_IDS.secretRef });\n\nexport const urlJson = (title: string, schemes: readonly string[]): JsonSchema => ({\n type: 'string',\n title,\n format: 'uri',\n pattern: `^(${schemes.join('|')})://`,\n});\n\nexport const absolutePathJson = (title: string): JsonSchema => ({\n type: 'string',\n title,\n pattern: '^/',\n});\n\nexport const modelZod = (ids?: readonly string[]) => {\n if (ids != null)\n return z.string().refine((id) => ids.includes(id), {\n message: `model must be one of: ${ids.join(', ')}`,\n });\n const pattern = new RegExp(MODEL_REFERENCE_PATTERN);\n return z.string().min(1).max(200).regex(pattern, {\n message: 'model must be a printable ASCII reference without empty path segments',\n });\n};\n\nexport const reasoningZod = (levels: readonly ReasoningLevel[]) =>\n z.nativeEnum(ReasoningLevel).refine((level) => levels.includes(level), {\n message: `reasoning must be one of: ${levels.join(', ')}`,\n });\n\nexport const inferenceZod = () => inferenceSchema;\nexport const permissionModeZod = () => z.nativeEnum(PermissionLevel);\nexport const approvalsReviewerZod = () => z.nativeEnum(ApprovalsReviewer);\nexport const secretRefZod = () => z.object({ secretKey: z.string().min(1) });\n\nexport const urlZod = (schemes: readonly string[]) =>\n z\n .string()\n .url()\n .refine((value) => schemes.some((scheme) => value.startsWith(`${scheme}://`)), {\n message: `url must use one of: ${schemes.join(', ')}`,\n });\n\nexport const absolutePathZod = () => z.string().startsWith('/');\n\n// Throws a readable error naming the harness; open() surfaces it as the\n// session's open failure.\nexport const parseHarnessConfig = <T extends z.ZodType>(args: {\n harness: string;\n schema: T;\n config: unknown;\n}): z.output<T> => {\n const parsed = args.schema.safeParse(args.config);\n if (parsed.success) return parsed.data;\n const issues = parsed.error.issues\n .map((issue) => `${issue.path.join('.') || '(root)'}: ${issue.message}`)\n .join('; ');\n throw new Error(`invalid configuration for ${args.harness}: ${issues}`);\n};\n\n// Typed objects to JSON: a round trip drops undefined fields and the schema\n// proves the result is JSON.\nexport const toJsonValue = <Value>(value: Value): JsonValue =>\n jsonValueSchema.parse(JSON.parse(JSON.stringify(value)));\n\nexport const toJsonObject = <Value>(value: Value): JsonObject =>\n jsonObjectSchema.parse(JSON.parse(JSON.stringify(value)));\n\nconst inferenceList = (inference: InferenceInput | undefined): InferenceSource[] | undefined => {\n if (inference == null) return undefined;\n const list = Array.isArray(inference) ? [...inference] : [inference];\n if (list.length === 0) throw new Error('inference lists at least one source');\n return list;\n};\n\n// What every settings builder returns: plain harness settings, the wire form\n// a caller passes as `provide.harness`. A single inference source becomes a\n// one-item list, as it is stored.\nexport const harnessSettings = (args: {\n harness: string;\n adapter?: string;\n configuration: { inference?: InferenceInput } & Record<string, unknown>;\n environment?: HarnessEnvironmentIface;\n}): HarnessSettingsIface => {\n const { inference, ...rest } = args.configuration;\n const list = inferenceList(inference);\n const environment = args.environment;\n return {\n harness: args.harness,\n ...(args.adapter == null ? {} : { adapter: args.adapter }),\n configuration: toJsonObject({ ...rest, ...(list == null ? {} : { inference: list }) }),\n ...(environment == null\n ? {}\n : { environment: typeof environment === 'string' ? environment : { ...environment } }),\n };\n};\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAOK;AACP,YAAY,OAAO;AACnB,SAAS,+BAA+B;AAExC,SAAS,2BAAAA,gCAA+B;AASjC,IAAK,iBAAL,kBAAKC,oBAAL;AACL,EAAAA,gBAAA,UAAO;AACP,EAAAA,gBAAA,aAAU;AACV,EAAAA,gBAAA,SAAM;AACN,EAAAA,gBAAA,YAAS;AACT,EAAAA,gBAAA,UAAO;AACP,EAAAA,gBAAA,SAAM;AANI,SAAAA;AAAA,GAAA;AAaL,IAAK,mBAAL,kBAAKC,sBAAL;AACL,EAAAA,kBAAA,UAAO;AACP,EAAAA,kBAAA,SAAM;AACN,EAAAA,kBAAA,cAAW;AAHD,SAAAA;AAAA,GAAA;AAOL,IAAK,uBAAL,kBAAKC,0BAAL;AACL,EAAAA,sBAAA,aAAU;AACV,EAAAA,sBAAA,iBAAc;AACd,EAAAA,sBAAA,UAAO;AACP,EAAAA,sBAAA,YAAS;AAET,EAAAA,sBAAA,UAAO;AANG,SAAAA;AAAA,GAAA;AAUL,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,eAAY;AACZ,EAAAA,qBAAA,eAAY;AACZ,EAAAA,qBAAA,eAAY;AACZ,EA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,EAAE,WAAW,KAAK,EAAG,CAAC;AAAA,IACrF,GAAI,eAAe,OACf,CAAC,IACD,EAAE,aAAa,OAAO,gBAAgB,WAAW,cAAc,EAAE,GAAG,YAAY,EAAE;AAAA,EACxF;AACF;",
|
|
6
|
+
"names": ["MODEL_REFERENCE_PATTERN", "ReasoningLevel", "PiPermissionMode", "ClaudePermissionMode", "CodexApprovalPolicy", "ApprovalsReviewer", "CodexSandboxMode"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ACP_AGENT_HARNESS } from "./acp-agent.mjs";
|
|
2
|
+
import { CLAUDE_CODE_HARNESS } from "./claude-code.mjs";
|
|
3
|
+
import { CODEX_HARNESS } from "./codex.mjs";
|
|
4
|
+
import { FINAL_HARNESS } from "./final.mjs";
|
|
5
|
+
import { FinalHarness } from "./names.mjs";
|
|
6
|
+
import { NANOCODE_CLAUDE_HARNESS } from "./nanocode-claude.mjs";
|
|
7
|
+
import { NANOCODE_CODEX_HARNESS } from "./nanocode-codex.mjs";
|
|
8
|
+
import { PI_HARNESS } from "./pi.mjs";
|
|
9
|
+
const FINAL_HARNESS_DEFINITIONS = {
|
|
10
|
+
[FinalHarness.Final]: FINAL_HARNESS,
|
|
11
|
+
[FinalHarness.Pi]: PI_HARNESS,
|
|
12
|
+
[FinalHarness.NanocodeClaude]: NANOCODE_CLAUDE_HARNESS,
|
|
13
|
+
[FinalHarness.NanocodeCodex]: NANOCODE_CODEX_HARNESS,
|
|
14
|
+
[FinalHarness.ClaudeCode]: CLAUDE_CODE_HARNESS,
|
|
15
|
+
[FinalHarness.Codex]: CODEX_HARNESS,
|
|
16
|
+
[FinalHarness.AcpAgent]: ACP_AGENT_HARNESS
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
FINAL_HARNESS_DEFINITIONS
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=definitions.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/harnesses/definitions.ts"],
|
|
4
|
+
"sourcesContent": ["import type { HarnessDefinitionIface } from '@finalai/agent-provider';\nimport { ACP_AGENT_HARNESS } from \"./acp-agent.mjs\";\nimport { CLAUDE_CODE_HARNESS } from \"./claude-code.mjs\";\nimport { CODEX_HARNESS } from \"./codex.mjs\";\nimport { FINAL_HARNESS } from \"./final.mjs\";\nimport { FinalHarness } from \"./names.mjs\";\nimport { NANOCODE_CLAUDE_HARNESS } from \"./nanocode-claude.mjs\";\nimport { NANOCODE_CODEX_HARNESS } from \"./nanocode-codex.mjs\";\nimport { PI_HARNESS } from \"./pi.mjs\";\n\n// Every Final harness definition by the qualified name harness settings give it.\nexport const FINAL_HARNESS_DEFINITIONS: Record<FinalHarness, HarnessDefinitionIface> = {\n [FinalHarness.Final]: FINAL_HARNESS,\n [FinalHarness.Pi]: PI_HARNESS,\n [FinalHarness.NanocodeClaude]: NANOCODE_CLAUDE_HARNESS,\n [FinalHarness.NanocodeCodex]: NANOCODE_CODEX_HARNESS,\n [FinalHarness.ClaudeCode]: CLAUDE_CODE_HARNESS,\n [FinalHarness.Codex]: CODEX_HARNESS,\n [FinalHarness.AcpAgent]: ACP_AGENT_HARNESS,\n};\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,yBAAyB;AAClC,SAAS,2BAA2B;AACpC,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB;AAC7B,SAAS,+BAA+B;AACxC,SAAS,8BAA8B;AACvC,SAAS,kBAAkB;AAGpB,MAAM,4BAA0E;AAAA,EACrF,CAAC,aAAa,KAAK,GAAG;AAAA,EACtB,CAAC,aAAa,EAAE,GAAG;AAAA,EACnB,CAAC,aAAa,cAAc,GAAG;AAAA,EAC/B,CAAC,aAAa,aAAa,GAAG;AAAA,EAC9B,CAAC,aAAa,UAAU,GAAG;AAAA,EAC3B,CAAC,aAAa,KAAK,GAAG;AAAA,EACtB,CAAC,aAAa,QAAQ,GAAG;AAC3B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -11,7 +11,7 @@ const NANOCODE_FIDELITY = {
|
|
|
11
11
|
["codex" /* Codex */]: [
|
|
12
12
|
{
|
|
13
13
|
feature: "Plan mode",
|
|
14
|
-
nanocode: "`update_plan` is always offered and shown as the session plan, whose steps are the steps of a
|
|
14
|
+
nanocode: "`update_plan` is always offered and shown as the session plan, whose steps are the steps of a Final Task when the session is its working chat.",
|
|
15
15
|
remoteOnly: "Codex's own plan and collaboration modes, as your CLI configures them.",
|
|
16
16
|
gone: {
|
|
17
17
|
what: "Plan mode (read-only planning, plan-mode questions).",
|
|
@@ -27,7 +27,7 @@ const NANOCODE_FIDELITY = {
|
|
|
27
27
|
what: "Hooks.",
|
|
28
28
|
reason: "Hooks run commands on your machine; a serverless session has none of yours."
|
|
29
29
|
},
|
|
30
|
-
evidence: "source: nanocode host-bridge.ts beforeCompaction;
|
|
30
|
+
evidence: "source: nanocode host-bridge.ts beforeCompaction; the Codex app-server reads its own config"
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
feature: "Slash commands",
|
|
@@ -69,9 +69,12 @@ const NANOCODE_FIDELITY = {
|
|
|
69
69
|
{
|
|
70
70
|
feature: "Session fork",
|
|
71
71
|
nanocode: "None (`supports.fork` is false).",
|
|
72
|
-
remoteOnly: "
|
|
73
|
-
gone: {
|
|
74
|
-
|
|
72
|
+
remoteOnly: "Forking into a new Codex thread (`thread/fork`).",
|
|
73
|
+
gone: {
|
|
74
|
+
what: "Forking a session.",
|
|
75
|
+
reason: "Forking needs the Codex app-server itself; use codex to keep it."
|
|
76
|
+
},
|
|
77
|
+
evidence: "nanocode refuses session/fork; @finalai/acp-adapter-codex passes the conformance kit fork case"
|
|
75
78
|
},
|
|
76
79
|
{
|
|
77
80
|
feature: "MCP servers",
|
|
@@ -137,7 +140,7 @@ const NANOCODE_FIDELITY = {
|
|
|
137
140
|
what: "Hooks.",
|
|
138
141
|
reason: "Hooks come from your own Claude Code settings; run Claude Code on your host to keep them."
|
|
139
142
|
},
|
|
140
|
-
evidence: "
|
|
143
|
+
evidence: "Claude Code reads its own settings sources; nanocode has no hook host"
|
|
141
144
|
},
|
|
142
145
|
{
|
|
143
146
|
feature: "Slash commands",
|
|
@@ -182,9 +185,9 @@ const NANOCODE_FIDELITY = {
|
|
|
182
185
|
remoteOnly: "Forking into a new Claude Code session (`forkSession`).",
|
|
183
186
|
gone: {
|
|
184
187
|
what: "Forking a session.",
|
|
185
|
-
reason: "Forking needs Claude Code itself; use
|
|
188
|
+
reason: "Forking needs Claude Code itself; use claude-code to keep it."
|
|
186
189
|
},
|
|
187
|
-
evidence: 'nanocode claude.test.ts "fidelity" (no session/fork);
|
|
190
|
+
evidence: 'nanocode claude.test.ts "fidelity" (no session/fork); @finalai/acp-adapter-claude-code passes the conformance kit fork case'
|
|
188
191
|
},
|
|
189
192
|
{
|
|
190
193
|
feature: "MCP servers",
|
|
@@ -222,7 +225,7 @@ const NANOCODE_FIDELITY = {
|
|
|
222
225
|
},
|
|
223
226
|
{
|
|
224
227
|
feature: "Native tool set",
|
|
225
|
-
nanocode: "`Bash`, `BashOutput` (shell); Claude Code's own `Read`, `Edit` and `Write` (files), with its rule that `Edit` and an overwriting `Write` need the file read first; Claude Code's own `TaskCreate`, `TaskGet`, `TaskList` and `TaskUpdate`, a task list kept across invocations and shown as the session plan, whose steps are the steps of a
|
|
228
|
+
nanocode: "`Bash`, `BashOutput` (shell); Claude Code's own `Read`, `Edit` and `Write` (files), with its rule that `Edit` and an overwriting `Write` need the file read first; Claude Code's own `TaskCreate`, `TaskGet`, `TaskList` and `TaskUpdate`, a task list kept across invocations and shown as the session plan, whose steps are the steps of a Final Task when the session is its working chat; `WebSearch`, Anthropic's, paid by the session's credential; and CLAUDE.md files as project instructions, from `~/.claude` and each directory down to the working directory. Like Claude Code since 2.1.283, it searches through `Bash`: no `Glob` or `Grep`.",
|
|
226
229
|
remoteOnly: "Claude Code's full tool set on your host (`TaskStop`, `WebFetch`, `NotebookEdit`, Bash's persistent working directory and background tasks, \u2026).",
|
|
227
230
|
gone: {
|
|
228
231
|
what: "`TaskStop`, `WebFetch`, `NotebookEdit`; Bash keeping its working directory between calls.",
|
|
@@ -233,16 +236,16 @@ const NANOCODE_FIDELITY = {
|
|
|
233
236
|
]
|
|
234
237
|
};
|
|
235
238
|
const NANOCODE_HARNESS_OF = {
|
|
236
|
-
["codex" /* Codex */]: "
|
|
237
|
-
["claude" /* Claude */]: "
|
|
239
|
+
["codex" /* Codex */]: "nanocode-codex",
|
|
240
|
+
["claude" /* Claude */]: "nanocode-claude"
|
|
238
241
|
};
|
|
239
|
-
const
|
|
240
|
-
["codex" /* Codex */]: "
|
|
241
|
-
["claude" /* Claude */]: "
|
|
242
|
+
const PROCESS_HARNESS_OF = {
|
|
243
|
+
["codex" /* Codex */]: "codex",
|
|
244
|
+
["claude" /* Claude */]: "claude-code"
|
|
242
245
|
};
|
|
243
246
|
const cell = (text) => text.replaceAll("|", "\\|").replaceAll("\n", " ");
|
|
244
247
|
const renderFidelityTable = (engine) => [
|
|
245
|
-
`| | \`${NANOCODE_HARNESS_OF[engine]}\` keeps | only \`${
|
|
248
|
+
`| | \`${NANOCODE_HARNESS_OF[engine]}\` keeps | only \`${PROCESS_HARNESS_OF[engine]}\` keeps | gone, and why |`,
|
|
246
249
|
"|---|---|---|---|",
|
|
247
250
|
...NANOCODE_FIDELITY[engine].map(
|
|
248
251
|
(row) => `| ${cell(row.feature)} | ${cell(row.nanocode)} | ${cell(row.remoteOnly)} | ${row.gone == null ? "nothing" : cell(`${row.gone.what} ${row.gone.reason}`)} |`
|
|
@@ -258,7 +261,7 @@ export {
|
|
|
258
261
|
NANOCODE_FIDELITY,
|
|
259
262
|
NANOCODE_HARNESS_OF,
|
|
260
263
|
NanocodeEngine,
|
|
261
|
-
|
|
264
|
+
PROCESS_HARNESS_OF,
|
|
262
265
|
fidelitySection,
|
|
263
266
|
renderFidelityEvidence,
|
|
264
267
|
renderFidelityTable
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/harnesses/fidelity.ts"],
|
|
4
|
-
"sourcesContent": ["// Harness fidelity for the serverless nanocode harnesses per engine, what nanocode\n// keeps, what requires the user's own remote CLI, and what is unavailable, with\n// a one-line reason a user can read.\n// Measured from the code and tests named in `evidence`; FIDELITY.md renders these tables, and\n// the legacy import writes the matching one into each moved agent's review file.\n\nexport enum NanocodeEngine {\n Codex = 'codex',\n Claude = 'claude',\n}\n\nexport interface FidelityRowIface {\n feature: string;\n nanocode: string;\n remoteOnly: string;\n // Null when nothing is gone.\n gone: { what: string; reason: string } | null;\n // Where the behavior is proved (test names), or why it is read from source only.\n evidence: string;\n}\n\nconst MCP_HTTP_REASON =\n 'Serverless harnesses reach MCP servers over HTTP; stdio servers need a host.';\nconst BACKGROUND_REASON =\n 'Background commands stop when the session goes idle and parks, or when it is cancelled.';\nconst SUBAGENT_REASON = 'Serverless sessions run one agent; there is no subagent runtime.';\nconst IMAGE_REASON = 'The engines take JPEG, PNG, GIF and WebP.';\n\nexport const NANOCODE_FIDELITY = {\n [NanocodeEngine.Codex]: [\n {\n feature: 'Plan mode',\n nanocode:\n '`update_plan` is always offered and shown as the session plan, whose steps are the steps of a Goal when the session is its working chat.',\n remoteOnly: \"Codex's own plan and collaboration modes, as your CLI configures them.\",\n gone: {\n what: 'Plan mode (read-only planning, plan-mode questions).',\n reason: 'Serverless Codex has no plan mode; it shares its plan as a checklist instead.',\n },\n evidence: 'nanocode codex.test.ts \"applies a patch \u2026 and projects update_plan\", \"fidelity\"',\n },\n {\n feature: 'Hooks',\n nanocode: 'None (the engine compaction hook is refused by the host).',\n remoteOnly: 'Hooks and `notify` from your `CODEX_HOME` config.',\n gone: {\n what: 'Hooks.',\n reason: 'Hooks run commands on your machine; a serverless session has none of yours.',\n },\n evidence: 'source: nanocode host-bridge.ts beforeCompaction; runtime codex config.ts',\n },\n {\n feature: 'Slash commands',\n nanocode: 'None: a leading `/` reaches the model as text.',\n remoteOnly: 'None either: the app-server has no slash-command surface.',\n gone: {\n what: 'Slash commands.',\n reason: 'Slash commands belong to the Codex terminal; ask for the action in words.',\n },\n evidence: 'source: nanocode session.ts prompt path',\n },\n {\n feature: 'Custom subagents',\n nanocode: 'None (the host refuses engine subagent routes).',\n remoteOnly: \"Codex's multi-agent tools from your CLI.\",\n gone: { what: 'Subagents.', reason: SUBAGENT_REASON },\n evidence: 'nanocode codex.test.ts \"fidelity\" (no spawn_agent offered); host-bridge.ts',\n },\n {\n feature: 'Background tasks',\n nanocode:\n '`exec_command` returns a session id after its yield time and `write_stdin` polls it, with streamed output, while the session is live.',\n remoteOnly: 'Processes on your host, kept by the Codex app-server.',\n gone: {\n what: 'Processes outliving an idle (parked) or cancelled session.',\n reason: BACKGROUND_REASON,\n },\n evidence:\n 'nanocode codex.test.ts \"runs exec_command \u2026 under never\" (streaming); source only: tools/exec.ts (yield and polling)',\n },\n {\n feature: 'Codex rollouts and `thread/resume`',\n nanocode:\n 'The conversation persists in the Final session and continues after a reconnect; accepted turns are resubmitted.',\n remoteOnly: 'Rollout files in your `CODEX_HOME` and `thread/resume` of them.',\n gone: {\n what: 'Rollout files, and continuing an existing CLI thread.',\n reason: 'History lives in the Final session, not in Codex rollout files.',\n },\n evidence:\n 'nanocode codex.test.ts \"continues the conversation \u2026 after a takeover\", \"submits a turn \u2026 again after a takeover\"',\n },\n {\n feature: 'Session fork',\n nanocode: 'None (`supports.fork` is false).',\n remoteOnly: 'None (remote-codex does not fork either).',\n gone: { what: 'Forking a session.', reason: 'Codex sessions cannot be forked on Final.' },\n evidence: 'descriptions.test.ts; runtime codex session.ts refuses fork',\n },\n {\n feature: 'MCP servers',\n nanocode:\n \"The definition's HTTP and ACP connections as `mcp__<server>__<tool>` tools, with elicitation; tools only.\",\n remoteOnly: 'Your own `config.toml` servers, stdio included, beside the definition servers.',\n gone: { what: 'stdio servers, MCP resources and prompts.', reason: MCP_HTTP_REASON },\n evidence: 'nanocode conformance.test.ts (mcp over acp/http); codex.test.ts list_changed',\n },\n {\n feature: 'Approval policies',\n nanocode:\n \"When the definition's tool policy is silent, `untrusted` asks before `exec_command` and `apply_patch`; `on-request`, `on-failure` and `never` run without asking. With `approvalsReviewer: 'auto-review'`, a reviewer model (`codex-auto-review` on a ChatGPT plan, `gpt-6-luna` otherwise, falling back to the session's model) answers what `untrusted` would ask: low and medium risk run, a rejected action goes to the person with the reviewer's reason, and a critical one is denied with codex-rs's rejection. The reviewer sees the person's messages, earlier tool calls, the definition's instructions and AGENTS.md, and `git status` before a command that could discard work. After 3 denials in a row or 10 of the last 50, the session asks the person until they allow a call, where Codex ends the turn.\",\n remoteOnly: \"The app-server's own policies together with `sandboxMode`.\",\n gone: {\n what: 'Escalation on failure and sandbox modes.',\n reason:\n \"Commands already run in the session's remote sandbox, so there is nothing to escalate to.\",\n },\n evidence:\n 'nanocode codex.test.ts \"asks before exec_command under untrusted\u2026\", \"fidelity\" (on-request, on-failure), \"\u2026under never\"; source only: tools/approvals.ts (untrusted apply_patch)',\n },\n {\n feature: 'Images in prompts',\n nanocode:\n \"A message's JPEG, PNG, GIF and WebP images go to Codex as image input, a message sent while a turn runs joining that turn as Codex's does, as do `view_image` and MCP image results.\",\n remoteOnly: 'Prompt images, passed to Codex as image input.',\n gone: { what: 'Other image types.', reason: IMAGE_REASON },\n evidence:\n 'nanocode codex.test.ts \"fidelity\" (advertises prompt images and sends them; moves an image prompt that arrives during a turn into it)',\n },\n {\n feature: 'Compaction',\n nanocode:\n 'Automatic, managed by the engine near the context window and shown as a compaction update.',\n remoteOnly: \"Codex's own automatic compaction.\",\n gone: {\n what: 'Compacting on request.',\n reason: 'Context is compacted automatically; there is no manual compact.',\n },\n evidence:\n 'source only: the engine compaction policy; the scripted-provider tests do not reach it',\n },\n {\n feature: 'Native tool set',\n nanocode:\n \"`exec_command`, `write_stdin` (shell), `apply_patch`, `view_image` (files) and `update_plan`, on the bound sandbox; `web__run`, OpenAI's web search, paid by the session's credential; and the workspace's AGENTS.md files as project instructions, from `$CODEX_HOME` and the repository root down to the working directory.\",\n remoteOnly:\n \"Codex's full tool set on your host (code mode, image generation, its MCP and plugins).\",\n gone: {\n what: 'Every other Codex tool.',\n reason: \"Serverless Codex has a fixed tool set that runs on the session's sandbox.\",\n },\n evidence: 'nanocode codex.test.ts \"fidelity\" (tool list); descriptions.test.ts',\n },\n ],\n [NanocodeEngine.Claude]: [\n {\n feature: 'Plan mode',\n nanocode:\n '`plan` adds a plan-mode section to the system prompt and asks before `Write` and `Bash`, as `default` does.',\n remoteOnly: \"Claude Code's enforced plan mode with `ExitPlanMode`.\",\n gone: {\n what: 'Enforced read-only planning.',\n reason: 'Plan mode on serverless Claude is guidance; edits still ask for approval.',\n },\n evidence: 'nanocode claude.test.ts \"fidelity\" (plan asks for Write and Bash; the write runs)',\n },\n {\n feature: 'Hooks',\n nanocode: 'None.',\n remoteOnly: 'Your hooks, through `settingSources: user, project, local`.',\n gone: {\n what: 'Hooks.',\n reason:\n 'Hooks come from your own Claude Code settings; run Claude Code on your host to keep them.',\n },\n evidence: 'runtime claude-code.test.ts (settings sources); nanocode has no hook host',\n },\n {\n feature: 'Slash commands',\n nanocode: 'None: a leading `/` reaches the model as text.',\n remoteOnly: 'Your user and project commands, through the same settings sources.',\n gone: {\n what: 'Slash commands.',\n reason:\n 'Slash commands are a Claude Code feature; run Claude Code on your host to keep them.',\n },\n evidence: 'source: nanocode session.ts prompt path',\n },\n {\n feature: 'Custom subagents',\n nanocode: 'None (no Task tool; the host refuses engine subagent routes).',\n remoteOnly: 'Your subagents, through the settings sources.',\n gone: { what: 'Subagents.', reason: SUBAGENT_REASON },\n evidence: 'nanocode claude.test.ts \"runs Bash \u2026 asks under default\" (exact tool list)',\n },\n {\n feature: 'Background tasks',\n nanocode:\n '`Bash` returns a session id for a running command and `BashOutput` polls it, while the session is live.',\n remoteOnly: 'Background shells on your host, kept by Claude Code.',\n gone: {\n what: 'Processes outliving an idle (parked) or cancelled session.',\n reason: BACKGROUND_REASON,\n },\n evidence: 'source: nanocode tools/claude.ts; polling is not exercised by a test',\n },\n {\n feature: 'Session resume',\n nanocode:\n 'The conversation persists in the Final session; accepted queued prompts resume when processing continues.',\n remoteOnly: 'Claude Code sessions in your `~/.claude`, resumed by id.',\n gone: {\n what: 'Claude Code session files and `--resume` of them.',\n reason: 'History lives in the Final session, not in Claude Code session files.',\n },\n evidence:\n 'nanocode claude.test.ts \"resumes an accepted queued prompt after the invocation stops\"',\n },\n {\n feature: 'Claude Code session fork',\n nanocode: 'None: `session/fork` is refused.',\n remoteOnly: 'Forking into a new Claude Code session (`forkSession`).',\n gone: {\n what: 'Forking a session.',\n reason: 'Forking needs Claude Code itself; use remote-claude-code to keep it.',\n },\n evidence:\n 'nanocode claude.test.ts \"fidelity\" (no session/fork); runtime claude-code.test.ts \"forks into a new Claude Code session id\"',\n },\n {\n feature: 'MCP servers',\n nanocode:\n \"The definition's HTTP and ACP connections as `mcp__<server>__<tool>` tools, with elicitation; tools only.\",\n remoteOnly:\n 'Your own servers, stdio included, with the definition servers added as `final.<name>`.',\n gone: { what: 'stdio servers, MCP resources and prompts.', reason: MCP_HTTP_REASON },\n evidence: 'nanocode conformance.test.ts (mcp over acp/http)',\n },\n {\n feature: 'Permission modes',\n nanocode:\n \"When the definition's tool policy is silent, `default` and `plan` ask before `Write` and `Bash`; `accept-edits` asks before `Bash` only; `bypass` never asks; `auto` has a reviewer model (`claude-sonnet-5-5`, falling back to the session's model) judge every `Write` and `Bash`: low and medium risk run, a rejected action goes to the person with the reviewer's reason, and a critical one is denied with its reason. The reviewer sees the person's messages, earlier tool calls, the definition's instructions and CLAUDE.md, and `git status` before a command that could discard work. After 3 denials in a row or 20 in all, the session asks the person until they allow a call.\",\n remoteOnly: \"Claude Code's permission modes and the allow and deny rules in your settings.\",\n gone: {\n what: 'Allow and deny rules from Claude Code settings.',\n reason:\n \"Claude Code settings are not imported; define allow, ask and deny rules in the agent definition's tool policy.\",\n },\n evidence: 'nanocode claude.test.ts \"fidelity\" (all four modes)',\n },\n {\n feature: 'Images in prompts',\n nanocode:\n \"A message's JPEG, PNG, GIF and WebP images go to Claude, as do `Read` of an image and MCP image results.\",\n remoteOnly: 'Prompt images, passed to Claude Code.',\n gone: { what: 'Other image types.', reason: IMAGE_REASON },\n evidence: 'nanocode claude.test.ts \"fidelity\" (advertises prompt images and sends them)',\n },\n {\n feature: 'Compaction',\n nanocode:\n 'Automatic in the engine; client updates are emitted when the engine reports compaction.',\n remoteOnly: \"Claude Code's automatic and manual (`/compact`) compaction.\",\n gone: {\n what: 'Compacting on request.',\n reason: 'The host exposes no manual compact action.',\n },\n evidence: 'source only: the engine compaction threshold; not reached by tests',\n },\n {\n feature: 'Native tool set',\n nanocode:\n \"`Bash`, `BashOutput` (shell); Claude Code's own `Read`, `Edit` and `Write` (files), with its rule that `Edit` and an overwriting `Write` need the file read first; Claude Code's own `TaskCreate`, `TaskGet`, `TaskList` and `TaskUpdate`, a task list kept across invocations and shown as the session plan, whose steps are the steps of a Goal when the session is its working chat; `WebSearch`, Anthropic's, paid by the session's credential; and CLAUDE.md files as project instructions, from `~/.claude` and each directory down to the working directory. Like Claude Code since 2.1.283, it searches through `Bash`: no `Glob` or `Grep`.\",\n remoteOnly:\n \"Claude Code's full tool set on your host (`TaskStop`, `WebFetch`, `NotebookEdit`, Bash's persistent working directory and background tasks, \u2026).\",\n gone: {\n what: '`TaskStop`, `WebFetch`, `NotebookEdit`; Bash keeping its working directory between calls.',\n reason:\n \"Serverless Claude keeps Claude Code's core tools: it fetches pages through the shell, and each Bash command starts in the workspace.\",\n },\n evidence:\n 'nanocode claude.test.ts \"runs Bash on the shell capability and asks under default\" (exact list), \"Read, Edit and Write\", \"keeps the task list as the session plan\"',\n },\n ],\n} satisfies Record<NanocodeEngine, FidelityRowIface[]>;\n\nexport const NANOCODE_HARNESS_OF = {\n [NanocodeEngine.Codex]: 'serverless-nanocode-codex',\n [NanocodeEngine.Claude]: 'serverless-nanocode-claude',\n} satisfies Record<NanocodeEngine, string>;\n\nexport const REMOTE_HARNESS_OF = {\n [NanocodeEngine.Codex]: 'remote-codex',\n [NanocodeEngine.Claude]: 'remote-claude-code',\n} satisfies Record<NanocodeEngine, string>;\n\nconst cell = (text: string): string => text.replaceAll('|', '\\\\|').replaceAll('\\n', ' ');\n\n// One engine's table as Markdown (FIDELITY.md and the import review use it as is).\nexport const renderFidelityTable = (engine: NanocodeEngine): string =>\n [\n `| | \\`${NANOCODE_HARNESS_OF[engine]}\\` keeps | only \\`${REMOTE_HARNESS_OF[engine]}\\` keeps | gone, and why |`,\n '|---|---|---|---|',\n ...NANOCODE_FIDELITY[engine].map(\n (row) =>\n `| ${cell(row.feature)} | ${cell(row.nanocode)} | ${cell(row.remoteOnly)} | ${\n row.gone == null ? 'nothing' : cell(`${row.gone.what} ${row.gone.reason}`)\n } |`,\n ),\n ].join('\\n');\n\n// Where each row is proved.\nexport const renderFidelityEvidence = (engine: NanocodeEngine): string =>\n NANOCODE_FIDELITY[engine].map((row) => `- ${row.feature}: ${row.evidence}`).join('\\n');\n\n// The generated part of FIDELITY.md for one engine.\nexport const fidelitySection = (engine: NanocodeEngine): string =>\n `${renderFidelityTable(engine)}\\n\\nEvidence:\\n\\n${renderFidelityEvidence(engine)}`;\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["// Harness fidelity for the serverless nanocode harnesses per engine, what nanocode\n// keeps, what requires the user's own remote CLI, and what is unavailable, with\n// a one-line reason a user can read.\n// Measured from the code and tests named in `evidence`; FIDELITY.md renders these tables.\n\nexport enum NanocodeEngine {\n Codex = 'codex',\n Claude = 'claude',\n}\n\nexport interface FidelityRowIface {\n feature: string;\n nanocode: string;\n remoteOnly: string;\n // Null when nothing is gone.\n gone: { what: string; reason: string } | null;\n // Where the behavior is proved (test names), or why it is read from source only.\n evidence: string;\n}\n\nconst MCP_HTTP_REASON =\n 'Serverless harnesses reach MCP servers over HTTP; stdio servers need a host.';\nconst BACKGROUND_REASON =\n 'Background commands stop when the session goes idle and parks, or when it is cancelled.';\nconst SUBAGENT_REASON = 'Serverless sessions run one agent; there is no subagent runtime.';\nconst IMAGE_REASON = 'The engines take JPEG, PNG, GIF and WebP.';\n\nexport const NANOCODE_FIDELITY = {\n [NanocodeEngine.Codex]: [\n {\n feature: 'Plan mode',\n nanocode:\n '`update_plan` is always offered and shown as the session plan, whose steps are the steps of a Final Task when the session is its working chat.',\n remoteOnly: \"Codex's own plan and collaboration modes, as your CLI configures them.\",\n gone: {\n what: 'Plan mode (read-only planning, plan-mode questions).',\n reason: 'Serverless Codex has no plan mode; it shares its plan as a checklist instead.',\n },\n evidence: 'nanocode codex.test.ts \"applies a patch \u2026 and projects update_plan\", \"fidelity\"',\n },\n {\n feature: 'Hooks',\n nanocode: 'None (the engine compaction hook is refused by the host).',\n remoteOnly: 'Hooks and `notify` from your `CODEX_HOME` config.',\n gone: {\n what: 'Hooks.',\n reason: 'Hooks run commands on your machine; a serverless session has none of yours.',\n },\n evidence:\n 'source: nanocode host-bridge.ts beforeCompaction; the Codex app-server reads its own config',\n },\n {\n feature: 'Slash commands',\n nanocode: 'None: a leading `/` reaches the model as text.',\n remoteOnly: 'None either: the app-server has no slash-command surface.',\n gone: {\n what: 'Slash commands.',\n reason: 'Slash commands belong to the Codex terminal; ask for the action in words.',\n },\n evidence: 'source: nanocode session.ts prompt path',\n },\n {\n feature: 'Custom subagents',\n nanocode: 'None (the host refuses engine subagent routes).',\n remoteOnly: \"Codex's multi-agent tools from your CLI.\",\n gone: { what: 'Subagents.', reason: SUBAGENT_REASON },\n evidence: 'nanocode codex.test.ts \"fidelity\" (no spawn_agent offered); host-bridge.ts',\n },\n {\n feature: 'Background tasks',\n nanocode:\n '`exec_command` returns a session id after its yield time and `write_stdin` polls it, with streamed output, while the session is live.',\n remoteOnly: 'Processes on your host, kept by the Codex app-server.',\n gone: {\n what: 'Processes outliving an idle (parked) or cancelled session.',\n reason: BACKGROUND_REASON,\n },\n evidence:\n 'nanocode codex.test.ts \"runs exec_command \u2026 under never\" (streaming); source only: tools/exec.ts (yield and polling)',\n },\n {\n feature: 'Codex rollouts and `thread/resume`',\n nanocode:\n 'The conversation persists in the Final session and continues after a reconnect; accepted turns are resubmitted.',\n remoteOnly: 'Rollout files in your `CODEX_HOME` and `thread/resume` of them.',\n gone: {\n what: 'Rollout files, and continuing an existing CLI thread.',\n reason: 'History lives in the Final session, not in Codex rollout files.',\n },\n evidence:\n 'nanocode codex.test.ts \"continues the conversation \u2026 after a takeover\", \"submits a turn \u2026 again after a takeover\"',\n },\n {\n feature: 'Session fork',\n nanocode: 'None (`supports.fork` is false).',\n remoteOnly: 'Forking into a new Codex thread (`thread/fork`).',\n gone: {\n what: 'Forking a session.',\n reason: 'Forking needs the Codex app-server itself; use codex to keep it.',\n },\n evidence:\n 'nanocode refuses session/fork; @finalai/acp-adapter-codex passes the conformance kit fork case',\n },\n {\n feature: 'MCP servers',\n nanocode:\n \"The definition's HTTP and ACP connections as `mcp__<server>__<tool>` tools, with elicitation; tools only.\",\n remoteOnly: 'Your own `config.toml` servers, stdio included, beside the definition servers.',\n gone: { what: 'stdio servers, MCP resources and prompts.', reason: MCP_HTTP_REASON },\n evidence: 'nanocode conformance.test.ts (mcp over acp/http); codex.test.ts list_changed',\n },\n {\n feature: 'Approval policies',\n nanocode:\n \"When the definition's tool policy is silent, `untrusted` asks before `exec_command` and `apply_patch`; `on-request`, `on-failure` and `never` run without asking. With `approvalsReviewer: 'auto-review'`, a reviewer model (`codex-auto-review` on a ChatGPT plan, `gpt-6-luna` otherwise, falling back to the session's model) answers what `untrusted` would ask: low and medium risk run, a rejected action goes to the person with the reviewer's reason, and a critical one is denied with codex-rs's rejection. The reviewer sees the person's messages, earlier tool calls, the definition's instructions and AGENTS.md, and `git status` before a command that could discard work. After 3 denials in a row or 10 of the last 50, the session asks the person until they allow a call, where Codex ends the turn.\",\n remoteOnly: \"The app-server's own policies together with `sandboxMode`.\",\n gone: {\n what: 'Escalation on failure and sandbox modes.',\n reason:\n \"Commands already run in the session's remote sandbox, so there is nothing to escalate to.\",\n },\n evidence:\n 'nanocode codex.test.ts \"asks before exec_command under untrusted\u2026\", \"fidelity\" (on-request, on-failure), \"\u2026under never\"; source only: tools/approvals.ts (untrusted apply_patch)',\n },\n {\n feature: 'Images in prompts',\n nanocode:\n \"A message's JPEG, PNG, GIF and WebP images go to Codex as image input, a message sent while a turn runs joining that turn as Codex's does, as do `view_image` and MCP image results.\",\n remoteOnly: 'Prompt images, passed to Codex as image input.',\n gone: { what: 'Other image types.', reason: IMAGE_REASON },\n evidence:\n 'nanocode codex.test.ts \"fidelity\" (advertises prompt images and sends them; moves an image prompt that arrives during a turn into it)',\n },\n {\n feature: 'Compaction',\n nanocode:\n 'Automatic, managed by the engine near the context window and shown as a compaction update.',\n remoteOnly: \"Codex's own automatic compaction.\",\n gone: {\n what: 'Compacting on request.',\n reason: 'Context is compacted automatically; there is no manual compact.',\n },\n evidence:\n 'source only: the engine compaction policy; the scripted-provider tests do not reach it',\n },\n {\n feature: 'Native tool set',\n nanocode:\n \"`exec_command`, `write_stdin` (shell), `apply_patch`, `view_image` (files) and `update_plan`, on the bound sandbox; `web__run`, OpenAI's web search, paid by the session's credential; and the workspace's AGENTS.md files as project instructions, from `$CODEX_HOME` and the repository root down to the working directory.\",\n remoteOnly:\n \"Codex's full tool set on your host (code mode, image generation, its MCP and plugins).\",\n gone: {\n what: 'Every other Codex tool.',\n reason: \"Serverless Codex has a fixed tool set that runs on the session's sandbox.\",\n },\n evidence: 'nanocode codex.test.ts \"fidelity\" (tool list); descriptions.test.ts',\n },\n ],\n [NanocodeEngine.Claude]: [\n {\n feature: 'Plan mode',\n nanocode:\n '`plan` adds a plan-mode section to the system prompt and asks before `Write` and `Bash`, as `default` does.',\n remoteOnly: \"Claude Code's enforced plan mode with `ExitPlanMode`.\",\n gone: {\n what: 'Enforced read-only planning.',\n reason: 'Plan mode on serverless Claude is guidance; edits still ask for approval.',\n },\n evidence: 'nanocode claude.test.ts \"fidelity\" (plan asks for Write and Bash; the write runs)',\n },\n {\n feature: 'Hooks',\n nanocode: 'None.',\n remoteOnly: 'Your hooks, through `settingSources: user, project, local`.',\n gone: {\n what: 'Hooks.',\n reason:\n 'Hooks come from your own Claude Code settings; run Claude Code on your host to keep them.',\n },\n evidence: 'Claude Code reads its own settings sources; nanocode has no hook host',\n },\n {\n feature: 'Slash commands',\n nanocode: 'None: a leading `/` reaches the model as text.',\n remoteOnly: 'Your user and project commands, through the same settings sources.',\n gone: {\n what: 'Slash commands.',\n reason:\n 'Slash commands are a Claude Code feature; run Claude Code on your host to keep them.',\n },\n evidence: 'source: nanocode session.ts prompt path',\n },\n {\n feature: 'Custom subagents',\n nanocode: 'None (no Task tool; the host refuses engine subagent routes).',\n remoteOnly: 'Your subagents, through the settings sources.',\n gone: { what: 'Subagents.', reason: SUBAGENT_REASON },\n evidence: 'nanocode claude.test.ts \"runs Bash \u2026 asks under default\" (exact tool list)',\n },\n {\n feature: 'Background tasks',\n nanocode:\n '`Bash` returns a session id for a running command and `BashOutput` polls it, while the session is live.',\n remoteOnly: 'Background shells on your host, kept by Claude Code.',\n gone: {\n what: 'Processes outliving an idle (parked) or cancelled session.',\n reason: BACKGROUND_REASON,\n },\n evidence: 'source: nanocode tools/claude.ts; polling is not exercised by a test',\n },\n {\n feature: 'Session resume',\n nanocode:\n 'The conversation persists in the Final session; accepted queued prompts resume when processing continues.',\n remoteOnly: 'Claude Code sessions in your `~/.claude`, resumed by id.',\n gone: {\n what: 'Claude Code session files and `--resume` of them.',\n reason: 'History lives in the Final session, not in Claude Code session files.',\n },\n evidence:\n 'nanocode claude.test.ts \"resumes an accepted queued prompt after the invocation stops\"',\n },\n {\n feature: 'Claude Code session fork',\n nanocode: 'None: `session/fork` is refused.',\n remoteOnly: 'Forking into a new Claude Code session (`forkSession`).',\n gone: {\n what: 'Forking a session.',\n reason: 'Forking needs Claude Code itself; use claude-code to keep it.',\n },\n evidence:\n 'nanocode claude.test.ts \"fidelity\" (no session/fork); @finalai/acp-adapter-claude-code passes the conformance kit fork case',\n },\n {\n feature: 'MCP servers',\n nanocode:\n \"The definition's HTTP and ACP connections as `mcp__<server>__<tool>` tools, with elicitation; tools only.\",\n remoteOnly:\n 'Your own servers, stdio included, with the definition servers added as `final.<name>`.',\n gone: { what: 'stdio servers, MCP resources and prompts.', reason: MCP_HTTP_REASON },\n evidence: 'nanocode conformance.test.ts (mcp over acp/http)',\n },\n {\n feature: 'Permission modes',\n nanocode:\n \"When the definition's tool policy is silent, `default` and `plan` ask before `Write` and `Bash`; `accept-edits` asks before `Bash` only; `bypass` never asks; `auto` has a reviewer model (`claude-sonnet-5-5`, falling back to the session's model) judge every `Write` and `Bash`: low and medium risk run, a rejected action goes to the person with the reviewer's reason, and a critical one is denied with its reason. The reviewer sees the person's messages, earlier tool calls, the definition's instructions and CLAUDE.md, and `git status` before a command that could discard work. After 3 denials in a row or 20 in all, the session asks the person until they allow a call.\",\n remoteOnly: \"Claude Code's permission modes and the allow and deny rules in your settings.\",\n gone: {\n what: 'Allow and deny rules from Claude Code settings.',\n reason:\n \"Claude Code settings are not imported; define allow, ask and deny rules in the agent definition's tool policy.\",\n },\n evidence: 'nanocode claude.test.ts \"fidelity\" (all four modes)',\n },\n {\n feature: 'Images in prompts',\n nanocode:\n \"A message's JPEG, PNG, GIF and WebP images go to Claude, as do `Read` of an image and MCP image results.\",\n remoteOnly: 'Prompt images, passed to Claude Code.',\n gone: { what: 'Other image types.', reason: IMAGE_REASON },\n evidence: 'nanocode claude.test.ts \"fidelity\" (advertises prompt images and sends them)',\n },\n {\n feature: 'Compaction',\n nanocode:\n 'Automatic in the engine; client updates are emitted when the engine reports compaction.',\n remoteOnly: \"Claude Code's automatic and manual (`/compact`) compaction.\",\n gone: {\n what: 'Compacting on request.',\n reason: 'The host exposes no manual compact action.',\n },\n evidence: 'source only: the engine compaction threshold; not reached by tests',\n },\n {\n feature: 'Native tool set',\n nanocode:\n \"`Bash`, `BashOutput` (shell); Claude Code's own `Read`, `Edit` and `Write` (files), with its rule that `Edit` and an overwriting `Write` need the file read first; Claude Code's own `TaskCreate`, `TaskGet`, `TaskList` and `TaskUpdate`, a task list kept across invocations and shown as the session plan, whose steps are the steps of a Final Task when the session is its working chat; `WebSearch`, Anthropic's, paid by the session's credential; and CLAUDE.md files as project instructions, from `~/.claude` and each directory down to the working directory. Like Claude Code since 2.1.283, it searches through `Bash`: no `Glob` or `Grep`.\",\n remoteOnly:\n \"Claude Code's full tool set on your host (`TaskStop`, `WebFetch`, `NotebookEdit`, Bash's persistent working directory and background tasks, \u2026).\",\n gone: {\n what: '`TaskStop`, `WebFetch`, `NotebookEdit`; Bash keeping its working directory between calls.',\n reason:\n \"Serverless Claude keeps Claude Code's core tools: it fetches pages through the shell, and each Bash command starts in the workspace.\",\n },\n evidence:\n 'nanocode claude.test.ts \"runs Bash on the shell capability and asks under default\" (exact list), \"Read, Edit and Write\", \"keeps the task list as the session plan\"',\n },\n ],\n} satisfies Record<NanocodeEngine, FidelityRowIface[]>;\n\nexport const NANOCODE_HARNESS_OF = {\n [NanocodeEngine.Codex]: 'nanocode-codex',\n [NanocodeEngine.Claude]: 'nanocode-claude',\n} satisfies Record<NanocodeEngine, string>;\n\n// The vendor program itself, run as a process on a machine.\nexport const PROCESS_HARNESS_OF = {\n [NanocodeEngine.Codex]: 'codex',\n [NanocodeEngine.Claude]: 'claude-code',\n} satisfies Record<NanocodeEngine, string>;\n\nconst cell = (text: string): string => text.replaceAll('|', '\\\\|').replaceAll('\\n', ' ');\n\n// One engine's table as Markdown (FIDELITY.md and the import review use it as is).\nexport const renderFidelityTable = (engine: NanocodeEngine): string =>\n [\n `| | \\`${NANOCODE_HARNESS_OF[engine]}\\` keeps | only \\`${PROCESS_HARNESS_OF[engine]}\\` keeps | gone, and why |`,\n '|---|---|---|---|',\n ...NANOCODE_FIDELITY[engine].map(\n (row) =>\n `| ${cell(row.feature)} | ${cell(row.nanocode)} | ${cell(row.remoteOnly)} | ${\n row.gone == null ? 'nothing' : cell(`${row.gone.what} ${row.gone.reason}`)\n } |`,\n ),\n ].join('\\n');\n\n// Where each row is proved.\nexport const renderFidelityEvidence = (engine: NanocodeEngine): string =>\n NANOCODE_FIDELITY[engine].map((row) => `- ${row.feature}: ${row.evidence}`).join('\\n');\n\n// The generated part of FIDELITY.md for one engine.\nexport const fidelitySection = (engine: NanocodeEngine): string =>\n `${renderFidelityTable(engine)}\\n\\nEvidence:\\n\\n${renderFidelityEvidence(engine)}`;\n"],
|
|
5
|
+
"mappings": "AAKO,IAAK,iBAAL,kBAAKA,oBAAL;AACL,EAAAA,gBAAA,WAAQ;AACR,EAAAA,gBAAA,YAAS;AAFC,SAAAA;AAAA,GAAA;AAeZ,MAAM,kBACJ;AACF,MAAM,oBACJ;AACF,MAAM,kBAAkB;AACxB,MAAM,eAAe;AAEd,MAAM,oBAAoB;AAAA,EAC/B,CAAC,mBAAoB,GAAG;AAAA,IACtB;AAAA,MACE,SAAS;AAAA,MACT,UACE;AAAA,MACF,YAAY;AAAA,MACZ,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,QAAQ;AAAA,MACV;AAAA,MACA,UAAU;AAAA,IACZ;AAAA,IACA;AAAA,MACE,SAAS;AAAA,MACT,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,QAAQ;AAAA,MACV;AAAA,MACA,UACE;AAAA,IACJ;AAAA,IACA;AAAA,MACE,SAAS;AAAA,MACT,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,QAAQ;AAAA,MACV;AAAA,MACA,UAAU;AAAA,IACZ;AAAA,IACA;AAAA,MACE,SAAS;AAAA,MACT,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,MAAM,EAAE,MAAM,cAAc,QAAQ,gBAAgB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AI,KAAK,MAAM,EAAE,CAC3E;AAAA,EACJ;AACF,EAAE,KAAK,IAAI;AAGN,MAAM,yBAAyB,CAAC,WACrC,kBAAkB,MAAM,EAAE,IAAI,CAAC,QAAQ,KAAK,IAAI,OAAO,KAAK,IAAI,QAAQ,EAAE,EAAE,KAAK,IAAI;AAGhF,MAAM,kBAAkB,CAAC,WAC9B,GAAG,oBAAoB,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA,EAAoB,uBAAuB,MAAM,CAAC;",
|
|
6
6
|
"names": ["NanocodeEngine"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type HarnessDefinitionIface, type HarnessEnvironmentIface, type HarnessSettingsIface } from '@finalai/agent-provider';
|
|
2
|
+
import { ReasoningLevel, type InferenceInput, type PermissionInput } from "./config-fields.mjs";
|
|
3
|
+
export declare const FINAL_REASONING_LEVELS: readonly [ReasoningLevel.Low, ReasoningLevel.Medium, ReasoningLevel.High];
|
|
4
|
+
export declare const FINAL_HARNESS: HarnessDefinitionIface;
|
|
5
|
+
export interface ServerlessFinalInputIface {
|
|
6
|
+
model: string;
|
|
7
|
+
reasoning?: (typeof FINAL_REASONING_LEVELS)[number] | `${(typeof FINAL_REASONING_LEVELS)[number]}`;
|
|
8
|
+
inference?: InferenceInput;
|
|
9
|
+
permissionMode?: PermissionInput;
|
|
10
|
+
environment?: HarnessEnvironmentIface;
|
|
11
|
+
}
|
|
12
|
+
export declare const serverlessFinal: ({ environment, ...configuration }: ServerlessFinalInputIface) => HarnessSettingsIface;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { defineHarness } from "@finalai/agent-definition/authoring";
|
|
2
|
+
import {
|
|
3
|
+
CredentialDelivery,
|
|
4
|
+
HarnessFeature,
|
|
5
|
+
HarnessService,
|
|
6
|
+
InferenceSourceKind,
|
|
7
|
+
McpTransportKind,
|
|
8
|
+
PermissionLevel,
|
|
9
|
+
PromptWhileRunning,
|
|
10
|
+
SandboxWire
|
|
11
|
+
} from "@finalai/agent-provider";
|
|
12
|
+
import {
|
|
13
|
+
configObjectJson,
|
|
14
|
+
harnessSettings,
|
|
15
|
+
inferenceJson,
|
|
16
|
+
modelJson,
|
|
17
|
+
permissionModeJson,
|
|
18
|
+
reasoningJson,
|
|
19
|
+
ReasoningLevel
|
|
20
|
+
} from "./config-fields.mjs";
|
|
21
|
+
import { ModelVendor } from "./model-reference.mjs";
|
|
22
|
+
import { FinalAcpAdapter, FinalHarness, FinalHarnessInterface, FinalWorkerProgram } from "./names.mjs";
|
|
23
|
+
const FINAL_REASONING_LEVELS = [
|
|
24
|
+
ReasoningLevel.Low,
|
|
25
|
+
ReasoningLevel.Medium,
|
|
26
|
+
ReasoningLevel.High
|
|
27
|
+
];
|
|
28
|
+
const FINAL_HARNESS = defineHarness({
|
|
29
|
+
title: "Final",
|
|
30
|
+
description: "Final's own agent loop, run per session on a worker runtime.",
|
|
31
|
+
configurationSchema: configObjectJson({
|
|
32
|
+
required: ["model"],
|
|
33
|
+
title: "Final",
|
|
34
|
+
properties: {
|
|
35
|
+
model: modelJson(),
|
|
36
|
+
reasoning: reasoningJson(FINAL_REASONING_LEVELS),
|
|
37
|
+
inference: inferenceJson(),
|
|
38
|
+
permissionMode: permissionModeJson()
|
|
39
|
+
}
|
|
40
|
+
}),
|
|
41
|
+
features: Object.values(HarnessFeature),
|
|
42
|
+
lowestPermission: PermissionLevel.Ask,
|
|
43
|
+
// Final's catalog through its metered inference, or a project's own
|
|
44
|
+
// OpenRouter-compatible key.
|
|
45
|
+
inference: {
|
|
46
|
+
vendors: [ModelVendor.OpenRouter],
|
|
47
|
+
kinds: [InferenceSourceKind.ApiKey, InferenceSourceKind.Final],
|
|
48
|
+
delivery: CredentialDelivery.PerRequest
|
|
49
|
+
},
|
|
50
|
+
interface: FinalHarnessInterface.PiAgent,
|
|
51
|
+
adapter: FinalAcpAdapter.Pi,
|
|
52
|
+
run: { worker: { program: FinalWorkerProgram.Final } },
|
|
53
|
+
services: [HarnessService.FrameAttachments],
|
|
54
|
+
mcp: [McpTransportKind.Acp, McpTransportKind.Http],
|
|
55
|
+
consumes: [SandboxWire.HandleRpc],
|
|
56
|
+
supports: { observe: true, resumeReplay: true, authorMeta: true },
|
|
57
|
+
// Same engine as Pi: open asks are not raised again across invocations.
|
|
58
|
+
promptWhileRunning: PromptWhileRunning.Inject,
|
|
59
|
+
sessionSurvivesDisconnect: false
|
|
60
|
+
});
|
|
61
|
+
const serverlessFinal = ({
|
|
62
|
+
environment,
|
|
63
|
+
...configuration
|
|
64
|
+
}) => harnessSettings({ harness: FinalHarness.Final, configuration, environment });
|
|
65
|
+
export {
|
|
66
|
+
FINAL_HARNESS,
|
|
67
|
+
FINAL_REASONING_LEVELS,
|
|
68
|
+
serverlessFinal
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=final.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/harnesses/final.ts"],
|
|
4
|
+
"sourcesContent": ["import { defineHarness } from '@finalai/agent-definition/authoring';\nimport {\n CredentialDelivery,\n HarnessFeature,\n HarnessService,\n InferenceSourceKind,\n McpTransportKind,\n PermissionLevel,\n PromptWhileRunning,\n SandboxWire,\n type HarnessDefinitionIface,\n type HarnessEnvironmentIface,\n type HarnessSettingsIface,\n} from '@finalai/agent-provider';\nimport {\n configObjectJson,\n harnessSettings,\n inferenceJson,\n modelJson,\n permissionModeJson,\n reasoningJson,\n ReasoningLevel,\n type InferenceInput,\n type PermissionInput,\n} from \"./config-fields.mjs\";\nimport { ModelVendor } from \"./model-reference.mjs\";\nimport { FinalAcpAdapter, FinalHarness, FinalHarnessInterface, FinalWorkerProgram } from \"./names.mjs\";\n\n// The Final harness: Final's own Pi-derived loop (the one Home runs on), a\n// worker program behind the same adapter as Pi. It differs from Pi in its\n// program and model catalog.\n\nexport const FINAL_REASONING_LEVELS = [\n ReasoningLevel.Low,\n ReasoningLevel.Medium,\n ReasoningLevel.High,\n] as const;\n\nexport const FINAL_HARNESS: HarnessDefinitionIface = defineHarness({\n title: 'Final',\n description: \"Final's own agent loop, run per session on a worker runtime.\",\n configurationSchema: configObjectJson({\n required: ['model'],\n title: 'Final',\n properties: {\n model: modelJson(),\n reasoning: reasoningJson(FINAL_REASONING_LEVELS),\n inference: inferenceJson(),\n permissionMode: permissionModeJson(),\n },\n }),\n features: Object.values(HarnessFeature),\n lowestPermission: PermissionLevel.Ask,\n // Final's catalog through its metered inference, or a project's own\n // OpenRouter-compatible key.\n inference: {\n vendors: [ModelVendor.OpenRouter],\n kinds: [InferenceSourceKind.ApiKey, InferenceSourceKind.Final],\n delivery: CredentialDelivery.PerRequest,\n },\n interface: FinalHarnessInterface.PiAgent,\n adapter: FinalAcpAdapter.Pi,\n run: { worker: { program: FinalWorkerProgram.Final } },\n services: [HarnessService.FrameAttachments],\n mcp: [McpTransportKind.Acp, McpTransportKind.Http],\n consumes: [SandboxWire.HandleRpc],\n supports: { observe: true, resumeReplay: true, authorMeta: true },\n // Same engine as Pi: open asks are not raised again across invocations.\n promptWhileRunning: PromptWhileRunning.Inject,\n sessionSurvivesDisconnect: false,\n});\n\nexport interface ServerlessFinalInputIface {\n model: string;\n reasoning?:\n | (typeof FINAL_REASONING_LEVELS)[number]\n | `${(typeof FINAL_REASONING_LEVELS)[number]}`;\n inference?: InferenceInput;\n permissionMode?: PermissionInput;\n // The worker-runtime sandbox it runs in; absent: the caller's plan creates one.\n environment?: HarnessEnvironmentIface;\n}\n\nexport const serverlessFinal = ({\n environment,\n ...configuration\n}: ServerlessFinalInputIface): HarnessSettingsIface =>\n harnessSettings({ harness: FinalHarness.Final, configuration, environment });\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,qBAAqB;AAC9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AACP;AAAA,EACE;A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|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
export
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
1
|
+
export { apiKey, CredentialScope, finalCredits, harnessLogin, InferenceBillTo, InferenceSourceKind, subscription, type InferenceSource, } from '@finalai/agent-provider/inference';
|
|
2
|
+
export type { HarnessEnvironmentIface, HarnessSettingsIface, HarnessUrlEnvironmentIface, ResolvedHarnessSettingsIface, } from '@finalai/agent-provider/harness';
|
|
3
|
+
export { ACP_AGENT_HARNESS, acpAgent } from "./acp-agent.mjs";
|
|
4
|
+
export { CLAUDE_CODE_ACP_ADAPTER, CODEX_ACP_ADAPTER, FINAL_ACP_ADAPTERS, NANOCODE_ACP_ADAPTER, PI_ACP_ADAPTER, } from "./adapters.mjs";
|
|
5
|
+
export { CLAUDE_CODE_HARNESS, CLAUDE_CODE_NATIVE_TOOLS, claudeCode, type ClaudeCodeInputIface, } from "./claude-code.mjs";
|
|
6
|
+
export { CODEX_APP_SERVER_REASONING_LEVELS, CODEX_HARNESS, codex, type CodexInputIface, } from "./codex.mjs";
|
|
7
|
+
export { ApprovalsReviewer, ClaudePermissionMode, CodexApprovalPolicy, CodexSandboxMode, PiPermissionMode, ReasoningLevel, type InferenceInput, type PermissionInput, type SecretRefIface, } from "./config-fields.mjs";
|
|
8
|
+
export { FINAL_HARNESS_DEFINITIONS } from "./definitions.mjs";
|
|
9
|
+
export { FINAL_HARNESS, FINAL_REASONING_LEVELS, serverlessFinal, type ServerlessFinalInputIface, } from "./final.mjs";
|
|
4
10
|
export { ModelVendor } from "./model-reference.mjs";
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export type
|
|
8
|
-
export {
|
|
9
|
-
export { SPECIFIER as REMOTE_PI_SPECIFIER, remotePi, type RemotePiConfigInputIface, } from "./remote-pi.mjs";
|
|
10
|
-
export { SPECIFIER as SERVERLESS_FINAL_SPECIFIER, serverlessFinal, type ServerlessFinalConfigInputIface, } from "./serverless-final.mjs";
|
|
11
|
-
export { SPECIFIER as SERVERLESS_NANOCODE_CLAUDE_SPECIFIER, serverlessNanocodeClaude, type ServerlessNanocodeClaudeConfigInputIface, } from "./serverless-nanocode-claude.mjs";
|
|
12
|
-
export { SPECIFIER as SERVERLESS_NANOCODE_CODEX_SPECIFIER, serverlessNanocodeCodex, type ServerlessNanocodeCodexConfigInputIface, } from "./serverless-nanocode-codex.mjs";
|
|
13
|
-
export { SPECIFIER as SERVERLESS_PI_SPECIFIER, serverlessPi, type ServerlessPiConfigInputIface, } from "./serverless-pi.mjs";
|
|
11
|
+
export { atUrl, FINAL_PUBLISHER, FinalAcpAdapter, FinalHarness, FinalHarnessInterface, FinalHarnessName, FinalWorkerProgram, type AtUrlInputIface, } from "./names.mjs";
|
|
12
|
+
export { CLAUDE_REASONING_LEVELS, NANOCODE_CLAUDE_HARNESS, serverlessNanocodeClaude, type ServerlessNanocodeClaudeInputIface, } from "./nanocode-claude.mjs";
|
|
13
|
+
export { CODEX_REASONING_LEVELS, NANOCODE_CODEX_HARNESS, serverlessNanocodeCodex, type ServerlessNanocodeCodexInputIface, } from "./nanocode-codex.mjs";
|
|
14
|
+
export { PI_HARNESS, PI_REASONING_LEVELS, serverlessPi, type ServerlessPiInputIface } from "./pi.mjs";
|
|
@@ -1,71 +1,112 @@
|
|
|
1
1
|
import {
|
|
2
|
+
apiKey,
|
|
3
|
+
CredentialScope,
|
|
4
|
+
finalCredits,
|
|
5
|
+
harnessLogin,
|
|
6
|
+
InferenceBillTo,
|
|
7
|
+
InferenceSourceKind,
|
|
8
|
+
subscription
|
|
9
|
+
} from "@finalai/agent-provider/inference";
|
|
10
|
+
import { ACP_AGENT_HARNESS, acpAgent } from "./acp-agent.mjs";
|
|
11
|
+
import {
|
|
12
|
+
CLAUDE_CODE_ACP_ADAPTER,
|
|
13
|
+
CODEX_ACP_ADAPTER,
|
|
14
|
+
FINAL_ACP_ADAPTERS,
|
|
15
|
+
NANOCODE_ACP_ADAPTER,
|
|
16
|
+
PI_ACP_ADAPTER
|
|
17
|
+
} from "./adapters.mjs";
|
|
18
|
+
import {
|
|
19
|
+
CLAUDE_CODE_HARNESS,
|
|
20
|
+
CLAUDE_CODE_NATIVE_TOOLS,
|
|
21
|
+
claudeCode
|
|
22
|
+
} from "./claude-code.mjs";
|
|
23
|
+
import {
|
|
24
|
+
CODEX_APP_SERVER_REASONING_LEVELS,
|
|
25
|
+
CODEX_HARNESS,
|
|
26
|
+
codex
|
|
27
|
+
} from "./codex.mjs";
|
|
28
|
+
import {
|
|
29
|
+
ApprovalsReviewer,
|
|
2
30
|
ClaudePermissionMode,
|
|
3
31
|
CodexApprovalPolicy,
|
|
4
32
|
CodexSandboxMode,
|
|
5
33
|
PiPermissionMode,
|
|
6
34
|
ReasoningLevel
|
|
7
35
|
} from "./config-fields.mjs";
|
|
36
|
+
import { FINAL_HARNESS_DEFINITIONS } from "./definitions.mjs";
|
|
8
37
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
38
|
+
FINAL_HARNESS,
|
|
39
|
+
FINAL_REASONING_LEVELS,
|
|
40
|
+
serverlessFinal
|
|
41
|
+
} from "./final.mjs";
|
|
12
42
|
import { ModelVendor } from "./model-reference.mjs";
|
|
13
43
|
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
44
|
+
atUrl,
|
|
45
|
+
FINAL_PUBLISHER,
|
|
46
|
+
FinalAcpAdapter,
|
|
47
|
+
FinalHarness,
|
|
48
|
+
FinalHarnessInterface,
|
|
49
|
+
FinalHarnessName,
|
|
50
|
+
FinalWorkerProgram
|
|
51
|
+
} from "./names.mjs";
|
|
21
52
|
import {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} from "./remote-codex.mjs";
|
|
25
|
-
import {
|
|
26
|
-
SPECIFIER as SPECIFIER5,
|
|
27
|
-
remotePi
|
|
28
|
-
} from "./remote-pi.mjs";
|
|
29
|
-
import {
|
|
30
|
-
SPECIFIER as SPECIFIER6,
|
|
31
|
-
serverlessFinal
|
|
32
|
-
} from "./serverless-final.mjs";
|
|
33
|
-
import {
|
|
34
|
-
SPECIFIER as SPECIFIER7,
|
|
53
|
+
CLAUDE_REASONING_LEVELS,
|
|
54
|
+
NANOCODE_CLAUDE_HARNESS,
|
|
35
55
|
serverlessNanocodeClaude
|
|
36
|
-
} from "./
|
|
56
|
+
} from "./nanocode-claude.mjs";
|
|
37
57
|
import {
|
|
38
|
-
|
|
58
|
+
CODEX_REASONING_LEVELS,
|
|
59
|
+
NANOCODE_CODEX_HARNESS,
|
|
39
60
|
serverlessNanocodeCodex
|
|
40
|
-
} from "./
|
|
41
|
-
import {
|
|
42
|
-
SPECIFIER as SPECIFIER9,
|
|
43
|
-
serverlessPi
|
|
44
|
-
} from "./serverless-pi.mjs";
|
|
61
|
+
} from "./nanocode-codex.mjs";
|
|
62
|
+
import { PI_HARNESS, PI_REASONING_LEVELS, serverlessPi } from "./pi.mjs";
|
|
45
63
|
export {
|
|
64
|
+
ACP_AGENT_HARNESS,
|
|
65
|
+
ApprovalsReviewer,
|
|
66
|
+
CLAUDE_CODE_ACP_ADAPTER,
|
|
67
|
+
CLAUDE_CODE_HARNESS,
|
|
68
|
+
CLAUDE_CODE_NATIVE_TOOLS,
|
|
69
|
+
CLAUDE_REASONING_LEVELS,
|
|
70
|
+
CODEX_ACP_ADAPTER,
|
|
71
|
+
CODEX_APP_SERVER_REASONING_LEVELS,
|
|
72
|
+
CODEX_HARNESS,
|
|
73
|
+
CODEX_REASONING_LEVELS,
|
|
46
74
|
ClaudePermissionMode,
|
|
47
75
|
CodexApprovalPolicy,
|
|
48
76
|
CodexSandboxMode,
|
|
49
|
-
|
|
77
|
+
CredentialScope,
|
|
78
|
+
FINAL_ACP_ADAPTERS,
|
|
79
|
+
FINAL_HARNESS,
|
|
80
|
+
FINAL_HARNESS_DEFINITIONS,
|
|
81
|
+
FINAL_PUBLISHER,
|
|
82
|
+
FINAL_REASONING_LEVELS,
|
|
83
|
+
FinalAcpAdapter,
|
|
84
|
+
FinalHarness,
|
|
85
|
+
FinalHarnessInterface,
|
|
86
|
+
FinalHarnessName,
|
|
87
|
+
FinalWorkerProgram,
|
|
88
|
+
InferenceBillTo,
|
|
89
|
+
InferenceSourceKind,
|
|
50
90
|
ModelVendor,
|
|
91
|
+
NANOCODE_ACP_ADAPTER,
|
|
92
|
+
NANOCODE_CLAUDE_HARNESS,
|
|
93
|
+
NANOCODE_CODEX_HARNESS,
|
|
94
|
+
PI_ACP_ADAPTER,
|
|
95
|
+
PI_HARNESS,
|
|
96
|
+
PI_REASONING_LEVELS,
|
|
51
97
|
PiPermissionMode,
|
|
52
|
-
SPECIFIER2 as REMOTE_ACP_SPECIFIER,
|
|
53
|
-
SPECIFIER3 as REMOTE_CLAUDE_CODE_SPECIFIER,
|
|
54
|
-
SPECIFIER4 as REMOTE_CODEX_SPECIFIER,
|
|
55
|
-
SPECIFIER5 as REMOTE_PI_SPECIFIER,
|
|
56
98
|
ReasoningLevel,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
remoteCodex,
|
|
65
|
-
remotePi,
|
|
99
|
+
acpAgent,
|
|
100
|
+
apiKey,
|
|
101
|
+
atUrl,
|
|
102
|
+
claudeCode,
|
|
103
|
+
codex,
|
|
104
|
+
finalCredits,
|
|
105
|
+
harnessLogin,
|
|
66
106
|
serverlessFinal,
|
|
67
107
|
serverlessNanocodeClaude,
|
|
68
108
|
serverlessNanocodeCodex,
|
|
69
|
-
serverlessPi
|
|
109
|
+
serverlessPi,
|
|
110
|
+
subscription
|
|
70
111
|
};
|
|
71
112
|
//# sourceMappingURL=index.mjs.map
|