@claudexor/harness-acp 3.20.1

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.
@@ -0,0 +1,137 @@
1
+ import { HarnessCapabilityProfile } from "@claudexor/schema";
2
+ import type { AcpEntry } from "./entry.js";
3
+ export declare function acpCapabilityProfile(): {
4
+ auth: {
5
+ supported_sources: ("api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file")[];
6
+ preferred_source: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null;
7
+ credential_transports: {
8
+ source: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
9
+ kind: "config_file" | "env_var" | "http_header" | "none" | "oauth_token_env" | "os_keychain";
10
+ relocatable_by: ("CONFIG_DIR" | "ENV" | "HOME" | "none")[];
11
+ platforms?: ("darwin" | "linux" | "win32")[] | undefined;
12
+ }[];
13
+ credential_profile_policies?: {
14
+ source: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
15
+ platforms: ("darwin" | "linux" | "win32")[];
16
+ identity_scope: "os_user" | "profile";
17
+ max_enabled_profiles: number | null;
18
+ cleanup_owner: "claudexor" | "vendor";
19
+ }[] | undefined;
20
+ managed_login?: {
21
+ stdin: "none" | "pipe" | "terminal";
22
+ } | null | undefined;
23
+ };
24
+ access_control: {
25
+ readonly_mechanism: "fs_sandbox" | "none" | "permission_deny" | "tool_allowlist";
26
+ write_mechanism: "fs_sandbox" | "none" | "tool_policy";
27
+ };
28
+ isolation: {
29
+ supported_containment: ("container" | "env_or_file_injection" | "host_user_context" | "private_per_profile_keychain" | "process_sandbox" | "scoped_home_keychain_bridge")[];
30
+ };
31
+ attachment_inputs: {
32
+ kind: "file" | "image";
33
+ mime_types: string[];
34
+ max_bytes: number;
35
+ max_count: number;
36
+ transport: "base64_inline" | "base64_stream" | "file_path" | "text_inline";
37
+ }[];
38
+ input_limits?: {
39
+ scope: "turn_text";
40
+ unit: "unicode_scalars";
41
+ limit: number;
42
+ source: string;
43
+ verified_against: string;
44
+ }[] | undefined;
45
+ mcp_injection: boolean;
46
+ mcp_injection_requires_full_access: boolean;
47
+ live_input: "mid_turn" | "next_tool_boundary" | "none";
48
+ };
49
+ export declare function acpManifest(entry: AcpEntry, version: string, profile: HarnessCapabilityProfile): {
50
+ id: string;
51
+ display_name: string;
52
+ kind: "fake" | "local_cli" | "remote_api";
53
+ version?: string | undefined;
54
+ adapter_version?: string | undefined;
55
+ provider_family: "anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai";
56
+ capability_profile: {
57
+ auth: {
58
+ supported_sources: ("api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file")[];
59
+ preferred_source: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null;
60
+ credential_transports: {
61
+ source: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
62
+ kind: "config_file" | "env_var" | "http_header" | "none" | "oauth_token_env" | "os_keychain";
63
+ relocatable_by: ("CONFIG_DIR" | "ENV" | "HOME" | "none")[];
64
+ platforms?: ("darwin" | "linux" | "win32")[] | undefined;
65
+ }[];
66
+ credential_profile_policies?: {
67
+ source: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
68
+ platforms: ("darwin" | "linux" | "win32")[];
69
+ identity_scope: "os_user" | "profile";
70
+ max_enabled_profiles: number | null;
71
+ cleanup_owner: "claudexor" | "vendor";
72
+ }[] | undefined;
73
+ managed_login?: {
74
+ stdin: "none" | "pipe" | "terminal";
75
+ } | null | undefined;
76
+ };
77
+ access_control: {
78
+ readonly_mechanism: "fs_sandbox" | "none" | "permission_deny" | "tool_allowlist";
79
+ write_mechanism: "fs_sandbox" | "none" | "tool_policy";
80
+ };
81
+ isolation: {
82
+ supported_containment: ("container" | "env_or_file_injection" | "host_user_context" | "private_per_profile_keychain" | "process_sandbox" | "scoped_home_keychain_bridge")[];
83
+ };
84
+ attachment_inputs: {
85
+ kind: "file" | "image";
86
+ mime_types: string[];
87
+ max_bytes: number;
88
+ max_count: number;
89
+ transport: "base64_inline" | "base64_stream" | "file_path" | "text_inline";
90
+ }[];
91
+ input_limits?: {
92
+ scope: "turn_text";
93
+ unit: "unicode_scalars";
94
+ limit: number;
95
+ source: string;
96
+ verified_against: string;
97
+ }[] | undefined;
98
+ mcp_injection: boolean;
99
+ mcp_injection_requires_full_access: boolean;
100
+ live_input: "mid_turn" | "next_tool_boundary" | "none";
101
+ };
102
+ capabilities: {
103
+ processing_preferences?: ("economy" | "fast" | "standard")[] | undefined;
104
+ plan: boolean;
105
+ implement: boolean;
106
+ implementation_transport: "git_patch_envelope" | "workspace";
107
+ create_from_scratch: boolean;
108
+ review: boolean;
109
+ verify: boolean;
110
+ synthesize: boolean;
111
+ read_files: boolean;
112
+ browser_tool: boolean;
113
+ web_policy: "native" | "none" | "tools" | "uncontrolled";
114
+ max_turns: boolean;
115
+ tool_lists: boolean;
116
+ interactive: boolean;
117
+ json_schema_output: boolean;
118
+ work_report_transport: "constrained" | "unsupported" | "validated";
119
+ structured_output_channel: "final_message" | "side_tool";
120
+ effort_levels: string[];
121
+ model_effort_levels: Record<string, {
122
+ levels: string[];
123
+ default: string | null;
124
+ }>;
125
+ effort_levels_verified_against: string | null;
126
+ model_inventory_routes?: ("api_key" | "local_session")[] | undefined;
127
+ model_inventory_absence?: "advisory" | "authoritative" | undefined;
128
+ known_models: (string | {
129
+ id: string;
130
+ routes: ("api_key" | "local_session")[];
131
+ })[];
132
+ known_models_verified_against: string | null;
133
+ };
134
+ auth_modes: ("api_key" | "local_session" | "none")[];
135
+ access_profiles_supported: ("full" | "inherit_native" | "readonly" | "workspace_write")[];
136
+ };
137
+ //# sourceMappingURL=manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAmB,MAAM,mBAAmB,CAAC;AAE9E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,wBAAgB,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYnC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8B9F"}
@@ -0,0 +1,47 @@
1
+ import { HarnessCapabilityProfile, HarnessManifest } from "@claudexor/schema";
2
+ import { CLAUDEXOR_VERSION } from "@claudexor/util";
3
+ export function acpCapabilityProfile() {
4
+ return HarnessCapabilityProfile.parse({
5
+ auth: {
6
+ supported_sources: ["api_key_env"],
7
+ credential_transports: [{ source: "api_key_env", kind: "env_var", relocatable_by: ["ENV"] }],
8
+ },
9
+ access_control: { readonly_mechanism: "tool_allowlist", write_mechanism: "none" },
10
+ isolation: { supported_containment: ["env_or_file_injection"] },
11
+ live_input: "none",
12
+ mcp_injection: false,
13
+ attachment_inputs: [],
14
+ });
15
+ }
16
+ export function acpManifest(entry, version, profile) {
17
+ return HarnessManifest.parse({
18
+ id: entry.id,
19
+ display_name: entry.displayName,
20
+ kind: "local_cli",
21
+ version,
22
+ adapter_version: CLAUDEXOR_VERSION,
23
+ provider_family: "unknown",
24
+ capability_profile: profile,
25
+ capabilities: {
26
+ plan: true,
27
+ implement: true,
28
+ create_from_scratch: true,
29
+ review: true,
30
+ verify: true,
31
+ synthesize: true,
32
+ read_files: true,
33
+ tool_lists: true,
34
+ json_schema_output: false,
35
+ // The engine instructs and validates a final fenced WorkReport itself.
36
+ work_report_transport: "validated",
37
+ model_inventory_absence: "advisory",
38
+ effort_levels: entry.effortLevels,
39
+ // Unverified fallback ids are models() rows with origin=hint, not a
40
+ // manifest known_models list (which requires a live verification stamp).
41
+ web_policy: "uncontrolled",
42
+ },
43
+ auth_modes: ["api_key"],
44
+ access_profiles_supported: ["readonly", "workspace_write", "full", "inherit_native"],
45
+ });
46
+ }
47
+ //# sourceMappingURL=manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGpD,MAAM,UAAU,oBAAoB;IAClC,OAAO,wBAAwB,CAAC,KAAK,CAAC;QACpC,IAAI,EAAE;YACJ,iBAAiB,EAAE,CAAC,aAAa,CAAC;YAClC,qBAAqB,EAAE,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;SAC7F;QACD,cAAc,EAAE,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,EAAE;QACjF,SAAS,EAAE,EAAE,qBAAqB,EAAE,CAAC,uBAAuB,CAAC,EAAE;QAC/D,UAAU,EAAE,MAAM;QAClB,aAAa,EAAE,KAAK;QACpB,iBAAiB,EAAE,EAAE;KACtB,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAe,EAAE,OAAe,EAAE,OAAiC;IAC7F,OAAO,eAAe,CAAC,KAAK,CAAC;QAC3B,EAAE,EAAE,KAAK,CAAC,EAAE;QACZ,YAAY,EAAE,KAAK,CAAC,WAAW;QAC/B,IAAI,EAAE,WAAW;QACjB,OAAO;QACP,eAAe,EAAE,iBAAiB;QAClC,eAAe,EAAE,SAAS;QAC1B,kBAAkB,EAAE,OAAO;QAC3B,YAAY,EAAE;YACZ,IAAI,EAAE,IAAI;YACV,SAAS,EAAE,IAAI;YACf,mBAAmB,EAAE,IAAI;YACzB,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,IAAI;YACZ,UAAU,EAAE,IAAI;YAChB,UAAU,EAAE,IAAI;YAChB,UAAU,EAAE,IAAI;YAChB,kBAAkB,EAAE,KAAK;YACzB,uEAAuE;YACvE,qBAAqB,EAAE,WAAW;YAClC,uBAAuB,EAAE,UAAU;YACnC,aAAa,EAAE,KAAK,CAAC,YAAY;YACjC,oEAAoE;YACpE,yEAAyE;YACzE,UAAU,EAAE,cAAc;SAC3B;QACD,UAAU,EAAE,CAAC,SAAS,CAAC;QACvB,yBAAyB,EAAE,CAAC,UAAU,EAAE,iBAAiB,EAAE,MAAM,EAAE,gBAAgB,CAAC;KACrF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { RequestPermissionRequest, RequestPermissionResponse } from "@agentclientprotocol/sdk";
2
+ import type { AccessProfile, HarnessRunSpec } from "@claudexor/schema";
3
+ import type { AcpEntry } from "./entry.js";
4
+ export declare const denyPermission: () => RequestPermissionResponse;
5
+ /** Typed kind and path evidence only. An allowed shell is NOT an OS sandbox. */
6
+ export declare function decidePermission(access: AccessProfile, cwd: string, params: RequestPermissionRequest): RequestPermissionResponse;
7
+ export declare function acpArgs(entry: AcpEntry, spec: HarnessRunSpec): string[];
8
+ //# sourceMappingURL=policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../src/policy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAEpG,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAgC3C,eAAO,MAAM,cAAc,QAAO,yBAEhC,CAAC;AAEH,gFAAgF;AAChF,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,aAAa,EACrB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,wBAAwB,GAC/B,yBAAyB,CA+C3B;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,GAAG,MAAM,EAAE,CAuBvE"}
package/dist/policy.js ADDED
@@ -0,0 +1,120 @@
1
+ // Semantics ported from Róger Valderrama's ouroboros#769. Q00 MIT notice: ../NOTICE.
2
+ import { lstatSync, readlinkSync, realpathSync } from "node:fs";
3
+ import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
4
+ import { AccessProfileIncompatibleError } from "@claudexor/core";
5
+ /** Resolve existing ancestors too: an edit of a new file under a symlink is an escape. */
6
+ function physicalPath(path) {
7
+ try {
8
+ return realpathSync(path);
9
+ }
10
+ catch (error) {
11
+ if (error.code !== "ENOENT")
12
+ throw error;
13
+ // realpath reports ENOENT for a dangling link too. Follow its target
14
+ // before resolving missing ancestors, or a new write could escape cwd.
15
+ try {
16
+ if (lstatSync(path).isSymbolicLink())
17
+ return physicalPath(resolve(dirname(path), readlinkSync(path)));
18
+ }
19
+ catch (statError) {
20
+ if (statError.code !== "ENOENT")
21
+ throw statError;
22
+ }
23
+ const parent = dirname(path);
24
+ if (parent === path)
25
+ throw error;
26
+ return join(physicalPath(parent), relative(parent, path));
27
+ }
28
+ }
29
+ function inWorkspace(cwd, path) {
30
+ if (typeof path !== "string" || !path.trim() || path.startsWith("~"))
31
+ return false;
32
+ try {
33
+ const delta = relative(physicalPath(resolve(cwd)), physicalPath(resolve(cwd, path)));
34
+ return delta !== ".." && !delta.startsWith(`..${sep}`) && !isAbsolute(delta);
35
+ }
36
+ catch {
37
+ return false;
38
+ }
39
+ }
40
+ export const denyPermission = () => ({
41
+ outcome: { outcome: "cancelled" },
42
+ });
43
+ /** Typed kind and path evidence only. An allowed shell is NOT an OS sandbox. */
44
+ export function decidePermission(access, cwd, params) {
45
+ const call = params.toolCall;
46
+ if (!call || !Array.isArray(params.options))
47
+ return denyPermission();
48
+ if (access !== "full") {
49
+ if (access === "inherit_native")
50
+ return denyPermission();
51
+ const kinds = access === "readonly" ? ["read", "search"] : ["read", "search", "edit", "execute"];
52
+ if (!call.kind || !kinds.includes(call.kind))
53
+ return denyPermission();
54
+ const raw = call.rawInput ?? {};
55
+ if (typeof raw !== "object" || Array.isArray(raw))
56
+ return denyPermission();
57
+ const input = raw;
58
+ const locations = call.locations ?? [];
59
+ if (!Array.isArray(locations) || locations.some((l) => !l || typeof l !== "object"))
60
+ return denyPermission();
61
+ const paths = locations.map((l) => l.path);
62
+ for (const key of [
63
+ "path",
64
+ "file_path",
65
+ "fileName",
66
+ "cwd",
67
+ "workingDirectory",
68
+ "working_directory",
69
+ ]) {
70
+ if (key in input)
71
+ paths.push(input[key]);
72
+ }
73
+ const extra = typeof input["paths"] === "string" ? [input["paths"]] : (input["paths"] ?? []);
74
+ if (!Array.isArray(extra))
75
+ return denyPermission();
76
+ paths.push(...extra);
77
+ const nonblank = (value) => typeof value === "string" && value.trim().length > 0;
78
+ if (call.kind === "edit" && paths.length === 0)
79
+ return denyPermission();
80
+ if (call.kind === "execute" && !nonblank(input["command"]))
81
+ return denyPermission();
82
+ if ((call.kind === "read" || call.kind === "search") &&
83
+ paths.length === 0 &&
84
+ !nonblank(input["pattern"]))
85
+ return denyPermission();
86
+ if (!paths.every((path) => inWorkspace(cwd, path)))
87
+ return denyPermission();
88
+ }
89
+ const kinds = access === "full" ? ["allow_always", "allow_once"] : ["allow_once"];
90
+ for (const kind of kinds) {
91
+ const option = params.options.find((o) => o.kind === kind && typeof o.optionId === "string" && o.optionId.length > 0);
92
+ if (option)
93
+ return { outcome: { outcome: "selected", optionId: option.optionId } };
94
+ }
95
+ return denyPermission();
96
+ }
97
+ export function acpArgs(entry, spec) {
98
+ const args = [...entry.flags];
99
+ if (spec.model_hint)
100
+ args.push("--model", spec.model_hint);
101
+ if (spec.effort_hint)
102
+ args.push("--effort", spec.effort_hint);
103
+ const { allow, deny } = spec.tool_permission_policy;
104
+ const defaults = spec.access === "readonly"
105
+ ? entry.readTools
106
+ : spec.access === "workspace_write"
107
+ ? entry.workspaceTools
108
+ : [];
109
+ // The CLI ignores --excluded-tools whenever --available-tools is present,
110
+ // so a deny is subtracted from any allowlist instead of passed beside it.
111
+ const allowed = (defaults.length ? defaults.filter((t) => !allow.length || allow.includes(t)) : allow).filter((t) => !deny.includes(t));
112
+ if ((defaults.length || allow.length) && !allowed.length)
113
+ throw new AccessProfileIncompatibleError("ACP tool policy leaves no available tools for this access profile");
114
+ if (allowed.length)
115
+ args.push(`--available-tools=${allowed.join(",")}`);
116
+ else if (deny.length)
117
+ args.push(`--excluded-tools=${deny.join(",")}`);
118
+ return args;
119
+ }
120
+ //# sourceMappingURL=policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy.js","sourceRoot":"","sources":["../src/policy.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAE9E,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AAIjE,0FAA0F;AAC1F,SAAS,YAAY,CAAC,IAAY;IAChC,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAK,KAA+B,CAAC,IAAI,KAAK,QAAQ;YAAE,MAAM,KAAK,CAAC;QACpE,qEAAqE;QACrE,uEAAuE;QACvE,IAAI,CAAC;YACH,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE;gBAClC,OAAO,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,IAA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AQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CACrF,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC,IAAI,CAAC,QAAQ,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM;QACtD,MAAM,IAAI,8BAA8B,CACtC,mEAAmE,CACpE,CAAC;IACJ,IAAI,OAAO,CAAC,MAAM;QAAE,IAAI,CAAC,IAAI,CAAC,qBAAqB,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;SACnE,IAAI,IAAI,CAAC,MAAM;QAAE,IAAI,CAAC,IAAI,CAAC,oBAAoB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACtE,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,133 @@
1
+ import { type DoctorSpec, type HarnessModelSpec } from "@claudexor/core";
2
+ import { type HarnessCapabilityProfile } from "@claudexor/schema";
3
+ import type { AcpEntry } from "./entry.js";
4
+ import { acpRunner } from "./run.js";
5
+ export declare function acpProbes(entry: AcpEntry, profile: HarnessCapabilityProfile, runner: ReturnType<typeof acpRunner>): {
6
+ discover(): Promise<{
7
+ id: string;
8
+ display_name: string;
9
+ kind: "fake" | "local_cli" | "remote_api";
10
+ version?: string | undefined;
11
+ adapter_version?: string | undefined;
12
+ provider_family: "anthropic" | "cursor" | "google" | "local" | "openai" | "opencode" | "unknown" | "xai";
13
+ capability_profile: {
14
+ auth: {
15
+ supported_sources: ("api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file")[];
16
+ preferred_source: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file" | null;
17
+ credential_transports: {
18
+ source: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
19
+ kind: "config_file" | "env_var" | "http_header" | "none" | "oauth_token_env" | "os_keychain";
20
+ relocatable_by: ("CONFIG_DIR" | "ENV" | "HOME" | "none")[];
21
+ platforms?: ("darwin" | "linux" | "win32")[] | undefined;
22
+ }[];
23
+ credential_profile_policies?: {
24
+ source: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
25
+ platforms: ("darwin" | "linux" | "win32")[];
26
+ identity_scope: "os_user" | "profile";
27
+ max_enabled_profiles: number | null;
28
+ cleanup_owner: "claudexor" | "vendor";
29
+ }[] | undefined;
30
+ managed_login?: {
31
+ stdin: "none" | "pipe" | "terminal";
32
+ } | null | undefined;
33
+ };
34
+ access_control: {
35
+ readonly_mechanism: "fs_sandbox" | "none" | "permission_deny" | "tool_allowlist";
36
+ write_mechanism: "fs_sandbox" | "none" | "tool_policy";
37
+ };
38
+ isolation: {
39
+ supported_containment: ("container" | "env_or_file_injection" | "host_user_context" | "private_per_profile_keychain" | "process_sandbox" | "scoped_home_keychain_bridge")[];
40
+ };
41
+ attachment_inputs: {
42
+ kind: "file" | "image";
43
+ mime_types: string[];
44
+ max_bytes: number;
45
+ max_count: number;
46
+ transport: "base64_inline" | "base64_stream" | "file_path" | "text_inline";
47
+ }[];
48
+ input_limits?: {
49
+ scope: "turn_text";
50
+ unit: "unicode_scalars";
51
+ limit: number;
52
+ source: string;
53
+ verified_against: string;
54
+ }[] | undefined;
55
+ mcp_injection: boolean;
56
+ mcp_injection_requires_full_access: boolean;
57
+ live_input: "mid_turn" | "next_tool_boundary" | "none";
58
+ };
59
+ capabilities: {
60
+ processing_preferences?: ("economy" | "fast" | "standard")[] | undefined;
61
+ plan: boolean;
62
+ implement: boolean;
63
+ implementation_transport: "git_patch_envelope" | "workspace";
64
+ create_from_scratch: boolean;
65
+ review: boolean;
66
+ verify: boolean;
67
+ synthesize: boolean;
68
+ read_files: boolean;
69
+ browser_tool: boolean;
70
+ web_policy: "native" | "none" | "tools" | "uncontrolled";
71
+ max_turns: boolean;
72
+ tool_lists: boolean;
73
+ interactive: boolean;
74
+ json_schema_output: boolean;
75
+ work_report_transport: "constrained" | "unsupported" | "validated";
76
+ structured_output_channel: "final_message" | "side_tool";
77
+ effort_levels: string[];
78
+ model_effort_levels: Record<string, {
79
+ levels: string[];
80
+ default: string | null;
81
+ }>;
82
+ effort_levels_verified_against: string | null;
83
+ model_inventory_routes?: ("api_key" | "local_session")[] | undefined;
84
+ model_inventory_absence?: "advisory" | "authoritative" | undefined;
85
+ known_models: (string | {
86
+ id: string;
87
+ routes: ("api_key" | "local_session")[];
88
+ })[];
89
+ known_models_verified_against: string | null;
90
+ };
91
+ auth_modes: ("api_key" | "local_session" | "none")[];
92
+ access_profiles_supported: ("full" | "inherit_native" | "readonly" | "workspace_write")[];
93
+ }>;
94
+ doctor(spec: DoctorSpec): Promise<{
95
+ harness_id: string;
96
+ status: "degraded" | "ok" | "unavailable";
97
+ checks: {
98
+ id: string;
99
+ status: "fail" | "pass" | "skip";
100
+ detail?: string | undefined;
101
+ duration_ms?: number | undefined;
102
+ }[];
103
+ enabled_intents: ("audit" | "create_from_scratch" | "explain" | "implement" | "plan" | "repair" | "review" | "spec" | "synthesize" | "verify")[];
104
+ disabled_intents: ("audit" | "create_from_scratch" | "explain" | "implement" | "plan" | "repair" | "review" | "spec" | "synthesize" | "verify")[];
105
+ reasons: string[];
106
+ auth_sources: {
107
+ source: "api_key_env" | "api_key_flag" | "native_session" | "none" | "oauth_token_env" | "provider_auth_file";
108
+ availability: "available" | "unavailable" | "unknown";
109
+ verification: "failed" | "not_run" | "passed";
110
+ detail?: string | undefined;
111
+ }[];
112
+ }>;
113
+ models(spec?: HarnessModelSpec): Promise<{
114
+ processing?: {
115
+ modes: ("economy" | "fast" | "standard")[] | null;
116
+ nativeModes: {
117
+ mode: "economy" | "fast" | "standard";
118
+ id: string;
119
+ }[];
120
+ defaultNativeMode: string | null;
121
+ eligible: boolean | null;
122
+ source: string;
123
+ observedAt: string | null;
124
+ } | undefined;
125
+ id: string;
126
+ label: string | null;
127
+ context_window: number | null;
128
+ routes: ("api_key" | "local_session")[] | null;
129
+ origin?: "hint" | "live" | undefined;
130
+ resolved_model?: string | null | undefined;
131
+ }[]>;
132
+ };
133
+ //# sourceMappingURL=probes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"probes.d.ts","sourceRoot":"","sources":["../src/probes.ts"],"names":[],"mappings":"AAIA,OAAO,EAIL,KAAK,UAAU,EACf,KAAK,gBAAgB,EACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAKL,KAAK,wBAAwB,EAE9B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAI3C,OAAO,EAAE,SAAS,EAAkB,MAAM,UAAU,CAAC;AAgBrD,wBAAgB,SAAS,CACvB,KAAK,EAAE,QAAQ,EACf,OAAO,EAAE,wBAAwB,EACjC,MAAM,EAAE,UAAU,CAAC,OAAO,SAAS,CAAC;IAuD5B,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAmBR,MAAM,OAAO,UAAU;;;;;;;;;;;;;;;;;;;IAiEvB,MAAM,QAAQ,gBAAgB;;;;;;;;;;;;;;;;;;;EAmBvC"}