@agentdock/wire 0.0.93 → 0.0.95
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/dist/accountLanguage.d.ts +26 -0
- package/dist/accountLanguage.js +1 -0
- package/dist/activityPreferences.d.ts +0 -2
- package/dist/agentCapabilities.d.ts +20 -24
- package/dist/agentCapabilities.js +1 -1
- package/dist/agentCommonEnv.d.ts +0 -9
- package/dist/agentInstallGuide.d.ts +0 -7
- package/dist/agentRuntimeSettings.d.ts +139 -0
- package/dist/agentRuntimeSettings.js +1 -0
- package/dist/bgTask.d.ts +13 -24
- package/dist/checkpointSchemas.d.ts +1 -2
- package/dist/controlLevel.d.ts +1 -9
- package/dist/edition.d.ts +0 -1
- package/dist/enterpriseGateway.d.ts +214 -0
- package/dist/enterpriseGateway.js +1 -0
- package/dist/enterprisePolicy.d.ts +1599 -0
- package/dist/enterprisePolicy.js +1 -0
- package/dist/enterprisePolicyExports.d.ts +2 -0
- package/dist/enterprisePolicyExports.js +1 -0
- package/dist/enterpriseRuntime.d.ts +317 -0
- package/dist/enterpriseRuntime.js +1 -0
- package/dist/envelope.d.ts +63 -60
- package/dist/errorMessage.d.ts +0 -1
- package/dist/events.d.ts +73 -77
- package/dist/events.js +1 -1
- package/dist/features.d.ts +19 -30
- package/dist/features.js +1 -1
- package/dist/feedback.d.ts +21 -22
- package/dist/fileWhitelist.d.ts +7 -39
- package/dist/gateway.d.ts +1184 -0
- package/dist/gateway.js +1 -0
- package/dist/goals.d.ts +0 -1
- package/dist/handoffBrief.d.ts +13 -0
- package/dist/handoffBrief.js +52 -0
- package/dist/inboundEvents.d.ts +83 -56
- package/dist/inboundEvents.js +1 -1
- package/dist/index.d.ts +25 -16
- package/dist/index.js +1 -1
- package/dist/interactionEvents.d.ts +51 -59
- package/dist/legacyProtocol.d.ts +36 -42
- package/dist/license.d.ts +36 -37
- package/dist/machine.d.ts +54 -53
- package/dist/machine.js +1 -1
- package/dist/messageMeta.d.ts +20 -20
- package/dist/messageMeta.js +1 -1
- package/dist/messages.d.ts +338 -223
- package/dist/messages.js +1 -1
- package/dist/notification.d.ts +2 -3
- package/dist/ops.d.ts +9 -27
- package/dist/pairing.d.ts +9 -49
- package/dist/permissionSubject.d.ts +3 -26
- package/dist/protocol.d.ts +0 -6
- package/dist/rpc.d.ts +957 -196
- package/dist/rpc.js +1 -1
- package/dist/scheduledTasks.d.ts +59 -60
- package/dist/semver.d.ts +3 -22
- package/dist/sessionBtw.d.ts +152 -0
- package/dist/sessionBtw.js +1 -0
- package/dist/sessionResult.d.ts +21 -27
- package/dist/sessionTitle.d.ts +9 -0
- package/dist/sessionTitle.js +1 -0
- package/dist/socketEvents.d.ts +12 -4
- package/dist/socketEvents.js +1 -1
- package/dist/sourceMetadata.d.ts +3 -16
- package/dist/spawnError.d.ts +7 -14
- package/dist/stats.d.ts +99 -68
- package/dist/stats.js +1 -1
- package/dist/sync.d.ts +285 -51
- package/dist/sync.js +1 -1
- package/dist/taskResult.d.ts +3 -20
- package/dist/telemetry.d.ts +1 -11
- package/dist/utils.d.ts +0 -1
- package/dist/workItems.d.ts +321 -0
- package/dist/workItems.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export declare const ACCOUNT_LANGUAGES: readonly ["en", "zh-Hans"];
|
|
4
|
+
export declare const DEFAULT_ACCOUNT_LANGUAGE = "en";
|
|
5
|
+
|
|
6
|
+
export declare const ACCOUNT_LANGUAGE_CAPABILITY = "account-language";
|
|
7
|
+
export declare const AccountLanguageSchema: z.ZodEnum<["en", "zh-Hans"]>;
|
|
8
|
+
export type AccountLanguage = z.infer<typeof AccountLanguageSchema>;
|
|
9
|
+
export declare function isAccountLanguage(value: unknown): value is AccountLanguage;
|
|
10
|
+
export declare const AccountLanguageRequestSchema: z.ZodObject<{
|
|
11
|
+
language: z.ZodEnum<["en", "zh-Hans"]>;
|
|
12
|
+
}, "strict", z.ZodTypeAny, {
|
|
13
|
+
language: "en" | "zh-Hans";
|
|
14
|
+
}, {
|
|
15
|
+
language: "en" | "zh-Hans";
|
|
16
|
+
}>;
|
|
17
|
+
export declare const AccountLanguageResponseSchema: z.ZodObject<{
|
|
18
|
+
language: z.ZodEnum<["en", "zh-Hans"]>;
|
|
19
|
+
initialized: z.ZodBoolean;
|
|
20
|
+
}, "strict", z.ZodTypeAny, {
|
|
21
|
+
language: "en" | "zh-Hans";
|
|
22
|
+
initialized: boolean;
|
|
23
|
+
}, {
|
|
24
|
+
language: "en" | "zh-Hans";
|
|
25
|
+
initialized: boolean;
|
|
26
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{z as e}from"zod";export const ACCOUNT_LANGUAGES=["en","zh-Hans"],DEFAULT_ACCOUNT_LANGUAGE="en",ACCOUNT_LANGUAGE_CAPABILITY="account-language",AccountLanguageSchema=e.enum(ACCOUNT_LANGUAGES);export function isAccountLanguage(t){return AccountLanguageSchema.safeParse(t).success}export const AccountLanguageRequestSchema=e.object({language:AccountLanguageSchema}).strict(),AccountLanguageResponseSchema=e.object({language:AccountLanguageSchema,initialized:e.boolean()}).strict();
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Agent capability matrix — static mapping of which features each CLI agent supports.
|
|
3
|
-
*
|
|
4
|
-
* Web UI uses this to conditionally show/hide spawn parameters
|
|
5
|
-
* (model, systemPrompt, tools, permissions, etc.) based on the selected agent.
|
|
6
|
-
*/
|
|
7
1
|
import type { ControlLevelType } from './controlLevel.js';
|
|
8
2
|
export interface AgentPermissionMode {
|
|
9
3
|
readonly value: string;
|
|
@@ -13,7 +7,7 @@ export interface AgentModelOption {
|
|
|
13
7
|
readonly value: string;
|
|
14
8
|
readonly label: string;
|
|
15
9
|
}
|
|
16
|
-
|
|
10
|
+
|
|
17
11
|
export type ModelSource = 'builtin' | 'acp' | 'env' | 'custom';
|
|
18
12
|
export interface AgentCapability {
|
|
19
13
|
readonly controlLevel: ControlLevelType;
|
|
@@ -21,41 +15,43 @@ export interface AgentCapability {
|
|
|
21
15
|
readonly supportsSystemPrompt: boolean;
|
|
22
16
|
readonly supportsToolConfig: boolean;
|
|
23
17
|
readonly supportsMcpConfig: boolean;
|
|
18
|
+
|
|
19
|
+
readonly supportsMcpInjection: boolean;
|
|
24
20
|
readonly supportsPermissionMode: boolean;
|
|
25
21
|
readonly supportsResume: boolean;
|
|
26
22
|
readonly supportsMaxTurns: boolean;
|
|
27
23
|
readonly supportsSlashClear: boolean;
|
|
28
24
|
readonly supportsSlashCompact: boolean;
|
|
29
|
-
|
|
25
|
+
|
|
30
26
|
readonly supportsInSessionModelSwitch: boolean;
|
|
31
|
-
|
|
27
|
+
|
|
32
28
|
readonly supportsInSessionModeSwitch: boolean;
|
|
33
|
-
|
|
29
|
+
|
|
30
|
+
readonly supportsNativeModeForward: boolean;
|
|
31
|
+
|
|
34
32
|
readonly supportsContextUsageQuery: boolean;
|
|
35
|
-
|
|
33
|
+
|
|
36
34
|
readonly usesAcpConfig: boolean;
|
|
37
|
-
|
|
35
|
+
|
|
38
36
|
readonly staticModels: readonly AgentModelOption[];
|
|
39
|
-
|
|
37
|
+
|
|
40
38
|
readonly permissionModes: readonly AgentPermissionMode[];
|
|
41
|
-
|
|
39
|
+
|
|
42
40
|
readonly defaultPermissionMode: string;
|
|
43
41
|
}
|
|
42
|
+
|
|
43
|
+
export declare const NATIVE_MODE_TO_POLICY: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
44
|
+
|
|
45
|
+
export declare function resolvePolicyMode(agentType: string, mode: string): string | null;
|
|
44
46
|
export declare const AGENT_CAPABILITIES: Readonly<Record<string, AgentCapability>>;
|
|
45
|
-
|
|
47
|
+
|
|
46
48
|
export declare function updateDynamicModes(agentType: string, modes: readonly {
|
|
47
49
|
id: string;
|
|
48
50
|
label: string;
|
|
49
51
|
}[]): void;
|
|
50
|
-
|
|
52
|
+
|
|
51
53
|
export declare function getDynamicModes(agentType: string): readonly AgentPermissionMode[] | null;
|
|
52
|
-
|
|
54
|
+
|
|
53
55
|
export declare function getAgentCapability(agentType: string): AgentCapability;
|
|
54
|
-
|
|
55
|
-
* Normalize a Claude model ID so that dot-separated versions (e.g. `claude-opus-4.6`)
|
|
56
|
-
* match the hyphen-separated form returned by the API (e.g. `claude-opus-4-6`).
|
|
57
|
-
*
|
|
58
|
-
* Safe to call on any string — non-Claude IDs pass through unchanged.
|
|
59
|
-
*/
|
|
56
|
+
|
|
60
57
|
export declare function normalizeModelId(id: string): string;
|
|
61
|
-
//# sourceMappingURL=agentCapabilities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const r=[{value:"default",labelKey:"permissionDefault"},{value:"acceptEdits",labelKey:"permissionAutoEdit"},{value:"auto",labelKey:"permissionAuto"},{value:"plan",labelKey:"permissionPlan"},{value:"bypassPermissions",labelKey:"permissionFullAuto"}],u=[{value:"sonnet",label:"Sonnet"},{value:"opus",label:"Opus"},{value:"haiku",label:"Haiku"}],p=new Set(["default","acceptEdits","bypassPermissions","yolo"]),l=new Set(["never","untrusted","on-failure","on-request"]);export const NATIVE_MODE_TO_POLICY={hermes:{accept_edits:"acceptEdits",dont_ask:"bypassPermissions"}};export function resolvePolicyMode(s,e){const o=NATIVE_MODE_TO_POLICY[s]?.[e];return o||((s==="codex"?new Set([...p,...l]):p).has(e)?e:null)}export const AGENT_CAPABILITIES={claude:{controlLevel:3,supportsModel:!0,supportsSystemPrompt:!0,supportsToolConfig:!0,supportsMcpConfig:!0,supportsMcpInjection:!0,supportsPermissionMode:!0,supportsResume:!0,supportsMaxTurns:!0,supportsSlashClear:!0,supportsSlashCompact:!0,supportsInSessionModelSwitch:!0,supportsInSessionModeSwitch:!0,supportsNativeModeForward:!1,supportsContextUsageQuery:!0,usesAcpConfig:!1,staticModels:u,permissionModes:r,defaultPermissionMode:"default"},copilot:{controlLevel:3,supportsModel:!0,supportsSystemPrompt:!1,supportsToolConfig:!0,supportsMcpConfig:!0,supportsMcpInjection:!0,supportsPermissionMode:!0,supportsResume:!0,supportsMaxTurns:!1,supportsSlashClear:!0,supportsSlashCompact:!1,supportsInSessionModelSwitch:!1,supportsInSessionModeSwitch:!0,supportsNativeModeForward:!0,supportsContextUsageQuery:!1,usesAcpConfig:!0,staticModels:[],permissionModes:[],defaultPermissionMode:""},opencode:{controlLevel:3,supportsModel:!0,supportsSystemPrompt:!0,supportsToolConfig:!0,supportsMcpConfig:!0,supportsMcpInjection:!0,supportsPermissionMode:!1,supportsResume:!0,supportsMaxTurns:!1,supportsSlashClear:!0,supportsSlashCompact:!1,supportsInSessionModelSwitch:!0,supportsInSessionModeSwitch:!0,supportsNativeModeForward:!0,supportsContextUsageQuery:!1,usesAcpConfig:!0,staticModels:[],permissionModes:[],defaultPermissionMode:""},codex:{controlLevel:2,supportsModel:!0,supportsSystemPrompt:!0,supportsToolConfig:!1,supportsMcpConfig:!1,supportsMcpInjection:!0,supportsPermissionMode:!0,supportsResume:!0,supportsMaxTurns:!1,supportsSlashClear:!0,supportsSlashCompact:!0,supportsInSessionModelSwitch:!0,supportsInSessionModeSwitch:!0,supportsNativeModeForward:!1,supportsContextUsageQuery:!1,usesAcpConfig:!0,staticModels:[],permissionModes:[],defaultPermissionMode:""},gemini:{controlLevel:3,supportsModel:!0,supportsSystemPrompt:!1,supportsToolConfig:!1,supportsMcpConfig:!0,supportsMcpInjection:!0,supportsPermissionMode:!1,supportsResume:!1,supportsMaxTurns:!1,supportsSlashClear:!0,supportsSlashCompact:!1,supportsInSessionModelSwitch:!1,supportsInSessionModeSwitch:!1,supportsNativeModeForward:!1,supportsContextUsageQuery:!1,usesAcpConfig:!0,staticModels:[],permissionModes:[],defaultPermissionMode:"bypassPermissions"},hermes:{controlLevel:3,supportsModel:!0,supportsSystemPrompt:!1,supportsToolConfig:!1,supportsMcpConfig:!0,supportsMcpInjection:!0,supportsPermissionMode:!0,supportsResume:!0,supportsMaxTurns:!1,supportsSlashClear:!0,supportsSlashCompact:!1,supportsInSessionModelSwitch:!1,supportsInSessionModeSwitch:!0,supportsNativeModeForward:!0,supportsContextUsageQuery:!1,usesAcpConfig:!0,staticModels:[],permissionModes:[{value:"default",labelKey:"permissionDefault"},{value:"acceptEdits",labelKey:"permissionAutoEdit"},{value:"bypassPermissions",labelKey:"permissionFullAuto"}],defaultPermissionMode:"default"},openclaw:{controlLevel:3,supportsModel:!0,supportsSystemPrompt:!1,supportsToolConfig:!1,supportsMcpConfig:!1,supportsMcpInjection:!1,supportsPermissionMode:!1,supportsResume:!1,supportsMaxTurns:!1,supportsSlashClear:!0,supportsSlashCompact:!1,supportsInSessionModelSwitch:!1,supportsInSessionModeSwitch:!1,supportsNativeModeForward:!1,supportsContextUsageQuery:!1,usesAcpConfig:!0,staticModels:[],permissionModes:[],defaultPermissionMode:""}};let t={};export function updateDynamicModes(s,e){e.length!==0&&(t={...t,[s]:e.map(o=>({value:o.id,labelKey:o.label}))})}export function getDynamicModes(s){return t[s]??null}export function getAgentCapability(s){return AGENT_CAPABILITIES[s]??{controlLevel:0,supportsModel:!1,supportsSystemPrompt:!1,supportsToolConfig:!1,supportsMcpConfig:!1,supportsMcpInjection:!1,supportsPermissionMode:!1,supportsResume:!1,supportsMaxTurns:!1,supportsSlashClear:!1,supportsSlashCompact:!1,supportsInSessionModelSwitch:!1,supportsInSessionModeSwitch:!1,supportsNativeModeForward:!1,supportsContextUsageQuery:!1,usesAcpConfig:!1,staticModels:[],permissionModes:[],defaultPermissionMode:"default"}}export function normalizeModelId(s){return s.replace(/(\d+)\.(\d+)/g,"$1-$2")}
|
package/dist/agentCommonEnv.d.ts
CHANGED
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Common environment variables for each agent.
|
|
3
|
-
*
|
|
4
|
-
* Only agents that use a single-provider API key are listed here.
|
|
5
|
-
* Multi-provider agents (opencode, hermes, openclaw) configure keys
|
|
6
|
-
* through their own config files, so they are intentionally omitted.
|
|
7
|
-
* Copilot authenticates via OAuth (`gh auth login`), not env vars.
|
|
8
|
-
*/
|
|
9
1
|
import type { AgentType } from './messageMeta.js';
|
|
10
2
|
export interface AgentEnvVarHint {
|
|
11
3
|
readonly key: string;
|
|
12
4
|
readonly placeholder: string;
|
|
13
5
|
}
|
|
14
6
|
export declare const AGENT_COMMON_ENV_VARS: Partial<Record<AgentType, readonly AgentEnvVarHint[]>>;
|
|
15
|
-
//# sourceMappingURL=agentCommonEnv.d.ts.map
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Per-agent install instructions for the web UI.
|
|
3
|
-
*
|
|
4
|
-
* Display-only data — the actual gating logic lives in daemon's registry.
|
|
5
|
-
* Wire only has the strings so the web can render install/upgrade instructions.
|
|
6
|
-
*/
|
|
7
1
|
import type { AgentType } from './messageMeta.js';
|
|
8
2
|
import type { Platform } from './machine.js';
|
|
9
3
|
export interface AgentInstallInfo {
|
|
@@ -12,4 +6,3 @@ export interface AgentInstallInfo {
|
|
|
12
6
|
readonly upgradeUrl: string;
|
|
13
7
|
}
|
|
14
8
|
export declare const AGENT_INSTALL_GUIDE: Readonly<Record<AgentType, AgentInstallInfo>>;
|
|
15
|
-
//# sourceMappingURL=agentInstallGuide.d.ts.map
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const RuntimeAgentSchema: z.ZodEnum<["claude", "codex", "opencode"]>;
|
|
3
|
+
export type RuntimeAgent = z.infer<typeof RuntimeAgentSchema>;
|
|
4
|
+
|
|
5
|
+
export declare const AgentRuntimeSettingsSchema: z.ZodObject<{
|
|
6
|
+
agent: z.ZodEnum<["claude", "codex", "opencode"]>;
|
|
7
|
+
routeId: z.ZodString;
|
|
8
|
+
routeAlias: z.ZodString;
|
|
9
|
+
gatewayUrl: z.ZodString;
|
|
10
|
+
model: z.ZodString;
|
|
11
|
+
configVersion: z.ZodNumber;
|
|
12
|
+
issuedAt: z.ZodString;
|
|
13
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
14
|
+
forced: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
15
|
+
userOverrides: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
16
|
+
}, "strict", z.ZodTypeAny, {
|
|
17
|
+
model: string;
|
|
18
|
+
agent: "codex" | "claude" | "opencode";
|
|
19
|
+
routeId: string;
|
|
20
|
+
routeAlias: string;
|
|
21
|
+
gatewayUrl: string;
|
|
22
|
+
configVersion: number;
|
|
23
|
+
issuedAt: string;
|
|
24
|
+
expiresAt: string | null;
|
|
25
|
+
forced: Record<string, unknown>;
|
|
26
|
+
userOverrides: Record<string, unknown>;
|
|
27
|
+
}, {
|
|
28
|
+
model: string;
|
|
29
|
+
agent: "codex" | "claude" | "opencode";
|
|
30
|
+
routeId: string;
|
|
31
|
+
routeAlias: string;
|
|
32
|
+
gatewayUrl: string;
|
|
33
|
+
configVersion: number;
|
|
34
|
+
issuedAt: string;
|
|
35
|
+
expiresAt: string | null;
|
|
36
|
+
forced: Record<string, unknown>;
|
|
37
|
+
userOverrides: Record<string, unknown>;
|
|
38
|
+
}>;
|
|
39
|
+
export type AgentRuntimeSettings = z.infer<typeof AgentRuntimeSettingsSchema>;
|
|
40
|
+
export declare const AgentRuntimeSettingsBundleSchema: z.ZodObject<{
|
|
41
|
+
settings: z.ZodArray<z.ZodObject<{
|
|
42
|
+
agent: z.ZodEnum<["claude", "codex", "opencode"]>;
|
|
43
|
+
routeId: z.ZodString;
|
|
44
|
+
routeAlias: z.ZodString;
|
|
45
|
+
gatewayUrl: z.ZodString;
|
|
46
|
+
model: z.ZodString;
|
|
47
|
+
configVersion: z.ZodNumber;
|
|
48
|
+
issuedAt: z.ZodString;
|
|
49
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
50
|
+
forced: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
51
|
+
userOverrides: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
52
|
+
}, "strict", z.ZodTypeAny, {
|
|
53
|
+
model: string;
|
|
54
|
+
agent: "codex" | "claude" | "opencode";
|
|
55
|
+
routeId: string;
|
|
56
|
+
routeAlias: string;
|
|
57
|
+
gatewayUrl: string;
|
|
58
|
+
configVersion: number;
|
|
59
|
+
issuedAt: string;
|
|
60
|
+
expiresAt: string | null;
|
|
61
|
+
forced: Record<string, unknown>;
|
|
62
|
+
userOverrides: Record<string, unknown>;
|
|
63
|
+
}, {
|
|
64
|
+
model: string;
|
|
65
|
+
agent: "codex" | "claude" | "opencode";
|
|
66
|
+
routeId: string;
|
|
67
|
+
routeAlias: string;
|
|
68
|
+
gatewayUrl: string;
|
|
69
|
+
configVersion: number;
|
|
70
|
+
issuedAt: string;
|
|
71
|
+
expiresAt: string | null;
|
|
72
|
+
forced: Record<string, unknown>;
|
|
73
|
+
userOverrides: Record<string, unknown>;
|
|
74
|
+
}>, "many">;
|
|
75
|
+
daemonCapability: z.ZodString;
|
|
76
|
+
}, "strict", z.ZodTypeAny, {
|
|
77
|
+
settings: {
|
|
78
|
+
model: string;
|
|
79
|
+
agent: "codex" | "claude" | "opencode";
|
|
80
|
+
routeId: string;
|
|
81
|
+
routeAlias: string;
|
|
82
|
+
gatewayUrl: string;
|
|
83
|
+
configVersion: number;
|
|
84
|
+
issuedAt: string;
|
|
85
|
+
expiresAt: string | null;
|
|
86
|
+
forced: Record<string, unknown>;
|
|
87
|
+
userOverrides: Record<string, unknown>;
|
|
88
|
+
}[];
|
|
89
|
+
daemonCapability: string;
|
|
90
|
+
}, {
|
|
91
|
+
settings: {
|
|
92
|
+
model: string;
|
|
93
|
+
agent: "codex" | "claude" | "opencode";
|
|
94
|
+
routeId: string;
|
|
95
|
+
routeAlias: string;
|
|
96
|
+
gatewayUrl: string;
|
|
97
|
+
configVersion: number;
|
|
98
|
+
issuedAt: string;
|
|
99
|
+
expiresAt: string | null;
|
|
100
|
+
forced: Record<string, unknown>;
|
|
101
|
+
userOverrides: Record<string, unknown>;
|
|
102
|
+
}[];
|
|
103
|
+
daemonCapability: string;
|
|
104
|
+
}>;
|
|
105
|
+
export type AgentRuntimeSettingsBundle = z.infer<typeof AgentRuntimeSettingsBundleSchema>;
|
|
106
|
+
export declare const AgentRuntimeSettingsListSchema: z.ZodArray<z.ZodObject<{
|
|
107
|
+
agent: z.ZodEnum<["claude", "codex", "opencode"]>;
|
|
108
|
+
routeId: z.ZodString;
|
|
109
|
+
routeAlias: z.ZodString;
|
|
110
|
+
gatewayUrl: z.ZodString;
|
|
111
|
+
model: z.ZodString;
|
|
112
|
+
configVersion: z.ZodNumber;
|
|
113
|
+
issuedAt: z.ZodString;
|
|
114
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
115
|
+
forced: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
116
|
+
userOverrides: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
117
|
+
}, "strict", z.ZodTypeAny, {
|
|
118
|
+
model: string;
|
|
119
|
+
agent: "codex" | "claude" | "opencode";
|
|
120
|
+
routeId: string;
|
|
121
|
+
routeAlias: string;
|
|
122
|
+
gatewayUrl: string;
|
|
123
|
+
configVersion: number;
|
|
124
|
+
issuedAt: string;
|
|
125
|
+
expiresAt: string | null;
|
|
126
|
+
forced: Record<string, unknown>;
|
|
127
|
+
userOverrides: Record<string, unknown>;
|
|
128
|
+
}, {
|
|
129
|
+
model: string;
|
|
130
|
+
agent: "codex" | "claude" | "opencode";
|
|
131
|
+
routeId: string;
|
|
132
|
+
routeAlias: string;
|
|
133
|
+
gatewayUrl: string;
|
|
134
|
+
configVersion: number;
|
|
135
|
+
issuedAt: string;
|
|
136
|
+
expiresAt: string | null;
|
|
137
|
+
forced: Record<string, unknown>;
|
|
138
|
+
userOverrides: Record<string, unknown>;
|
|
139
|
+
}>, "many">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{z as e}from"zod";export const RuntimeAgentSchema=e.enum(["claude","codex","opencode"]),AgentRuntimeSettingsSchema=e.object({agent:RuntimeAgentSchema,routeId:e.string().min(1),routeAlias:e.string().min(1),gatewayUrl:e.string().url(),model:e.string().min(1),configVersion:e.number().int().positive(),issuedAt:e.string().datetime(),expiresAt:e.string().datetime().nullable(),forced:e.record(e.unknown()),userOverrides:e.record(e.unknown())}).strict(),AgentRuntimeSettingsBundleSchema=e.object({settings:e.array(AgentRuntimeSettingsSchema),daemonCapability:e.string().min(1)}).strict(),AgentRuntimeSettingsListSchema=e.array(AgentRuntimeSettingsSchema);
|
package/dist/bgTask.d.ts
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
/** Common prefix for every bg-task service envelope. */
|
|
2
1
|
export declare const BG_TASK_PREFIX = "bg-task:";
|
|
3
|
-
|
|
2
|
+
|
|
4
3
|
export type BgTaskAction = 'started' | 'progress' | 'completed' | 'failed' | 'stopped';
|
|
5
|
-
|
|
4
|
+
|
|
6
5
|
export interface ParsedBgTask {
|
|
7
6
|
readonly action: BgTaskAction;
|
|
8
|
-
|
|
7
|
+
|
|
9
8
|
readonly taskId: string;
|
|
10
|
-
|
|
9
|
+
|
|
11
10
|
readonly desc?: string;
|
|
12
|
-
|
|
11
|
+
|
|
13
12
|
readonly summary?: string;
|
|
14
|
-
|
|
13
|
+
|
|
15
14
|
readonly totalTokens?: number;
|
|
16
|
-
|
|
15
|
+
|
|
17
16
|
readonly durationMs?: number;
|
|
18
|
-
|
|
17
|
+
|
|
19
18
|
readonly toolUses?: number;
|
|
20
19
|
}
|
|
21
|
-
|
|
20
|
+
|
|
22
21
|
export interface EncodeBgTaskInput {
|
|
23
22
|
readonly action: BgTaskAction;
|
|
24
|
-
|
|
23
|
+
|
|
25
24
|
readonly taskId: string;
|
|
26
25
|
readonly desc?: string;
|
|
27
26
|
readonly summary?: string;
|
|
@@ -29,19 +28,9 @@ export interface EncodeBgTaskInput {
|
|
|
29
28
|
readonly durationMs?: number;
|
|
30
29
|
readonly toolUses?: number;
|
|
31
30
|
}
|
|
32
|
-
|
|
33
|
-
* Encode a bg-task lifecycle event into its service-envelope text form.
|
|
34
|
-
* taskId is URI-encoded so its (rare) colons never break the fixed-segment parser.
|
|
35
|
-
*/
|
|
31
|
+
|
|
36
32
|
export declare function encodeBgTask(input: EncodeBgTaskInput): string;
|
|
37
|
-
|
|
38
|
-
* Parse a bg-task service-envelope text back into structured fields.
|
|
39
|
-
* Returns null when `text` is not a recognized bg-task line.
|
|
40
|
-
*
|
|
41
|
-
* Pure decoding only — business rules (e.g. "empty progress summary must not
|
|
42
|
-
* overwrite the started desc") stay in the caller.
|
|
43
|
-
*/
|
|
33
|
+
|
|
44
34
|
export declare function parseBgTask(text: string): ParsedBgTask | null;
|
|
45
|
-
|
|
35
|
+
|
|
46
36
|
export declare function isBgTaskLifecycleLine(text: string): boolean;
|
|
47
|
-
//# sourceMappingURL=bgTask.d.ts.map
|
|
@@ -166,7 +166,7 @@ export declare const CheckpointRollbackParamsSchema: z.ZodObject<{
|
|
|
166
166
|
timestamp: z.ZodOptional<z.ZodString>;
|
|
167
167
|
mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["code", "conversation", "both"]>>>;
|
|
168
168
|
force: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
169
|
-
|
|
169
|
+
|
|
170
170
|
toolCallId: z.ZodOptional<z.ZodString>;
|
|
171
171
|
}, "strict", z.ZodTypeAny, {
|
|
172
172
|
mode: "code" | "conversation" | "both";
|
|
@@ -216,4 +216,3 @@ export type FileDiffEntry = z.infer<typeof FileDiffEntrySchema>;
|
|
|
216
216
|
export type CheckpointDiffResult = z.infer<typeof CheckpointDiffResultSchema>;
|
|
217
217
|
export type CheckpointRollbackParams = z.infer<typeof CheckpointRollbackParamsSchema>;
|
|
218
218
|
export type CheckpointRollbackResult = z.infer<typeof CheckpointRollbackResultSchema>;
|
|
219
|
-
//# sourceMappingURL=checkpointSchemas.d.ts.map
|
package/dist/controlLevel.d.ts
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
* Control depth level for CLI tools.
|
|
4
|
-
*
|
|
5
|
-
* Level 3: Full control — bidirectional ACP, per-tool permissions, resume (Claude Code, OpenCode)
|
|
6
|
-
* Level 2: High control — JSONL + resume + pre-configured permissions (Codex CLI)
|
|
7
|
-
* Level 1: Read-only monitoring — JSONL + no resume + binary permissions (Gemini, Qwen)
|
|
8
|
-
* Level 0: Minimal — plain text + no multi-turn (Aider, not recommended)
|
|
9
|
-
*/
|
|
2
|
+
|
|
10
3
|
export declare const ControlLevel: z.ZodUnion<[z.ZodLiteral<3>, z.ZodLiteral<2>, z.ZodLiteral<1>, z.ZodLiteral<0>]>;
|
|
11
4
|
export type ControlLevelType = z.infer<typeof ControlLevel>;
|
|
12
|
-
//# sourceMappingURL=controlLevel.d.ts.map
|
package/dist/edition.d.ts
CHANGED
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export declare const EnterpriseGatewayAgentSchema: z.ZodLiteral<"claude">;
|
|
4
|
+
export declare const EnterpriseGatewayProtocolSchema: z.ZodLiteral<"anthropic_messages">;
|
|
5
|
+
export declare const EnterpriseRouteStatusSchema: z.ZodEnum<["draft", "validating", "active", "disabled", "error", "needs-review"]>;
|
|
6
|
+
export declare const EnterpriseRouteCapabilitySchema: z.ZodObject<{
|
|
7
|
+
streaming: z.ZodBoolean;
|
|
8
|
+
toolCalls: z.ZodBoolean;
|
|
9
|
+
reasoning: z.ZodBoolean;
|
|
10
|
+
multiTurn: z.ZodBoolean;
|
|
11
|
+
tokenUsage: z.ZodEnum<["verified", "unknown"]>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
streaming: boolean;
|
|
14
|
+
toolCalls: boolean;
|
|
15
|
+
reasoning: boolean;
|
|
16
|
+
multiTurn: boolean;
|
|
17
|
+
tokenUsage: "unknown" | "verified";
|
|
18
|
+
}, {
|
|
19
|
+
streaming: boolean;
|
|
20
|
+
toolCalls: boolean;
|
|
21
|
+
reasoning: boolean;
|
|
22
|
+
multiTurn: boolean;
|
|
23
|
+
tokenUsage: "unknown" | "verified";
|
|
24
|
+
}>;
|
|
25
|
+
export declare const EnterpriseUpstreamConnectionSchema: z.ZodObject<{
|
|
26
|
+
id: z.ZodString;
|
|
27
|
+
enterpriseId: z.ZodString;
|
|
28
|
+
name: z.ZodString;
|
|
29
|
+
baseUrl: z.ZodString;
|
|
30
|
+
credentialMasked: z.ZodString;
|
|
31
|
+
status: z.ZodEnum<["active", "disabled", "error"]>;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
status: "error" | "active" | "disabled";
|
|
34
|
+
name: string;
|
|
35
|
+
id: string;
|
|
36
|
+
baseUrl: string;
|
|
37
|
+
enterpriseId: string;
|
|
38
|
+
credentialMasked: string;
|
|
39
|
+
}, {
|
|
40
|
+
status: "error" | "active" | "disabled";
|
|
41
|
+
name: string;
|
|
42
|
+
id: string;
|
|
43
|
+
baseUrl: string;
|
|
44
|
+
enterpriseId: string;
|
|
45
|
+
credentialMasked: string;
|
|
46
|
+
}>;
|
|
47
|
+
export declare const EnterpriseAgentModelRouteSchema: z.ZodObject<{
|
|
48
|
+
id: z.ZodString;
|
|
49
|
+
enterpriseId: z.ZodString;
|
|
50
|
+
connectionId: z.ZodString;
|
|
51
|
+
agent: z.ZodLiteral<"claude">;
|
|
52
|
+
model: z.ZodString;
|
|
53
|
+
requestProtocol: z.ZodLiteral<"anthropic_messages">;
|
|
54
|
+
upstreamProtocol: z.ZodLiteral<"anthropic_messages">;
|
|
55
|
+
provider: z.ZodString;
|
|
56
|
+
alias: z.ZodString;
|
|
57
|
+
capabilities: z.ZodObject<{
|
|
58
|
+
streaming: z.ZodBoolean;
|
|
59
|
+
toolCalls: z.ZodBoolean;
|
|
60
|
+
reasoning: z.ZodBoolean;
|
|
61
|
+
multiTurn: z.ZodBoolean;
|
|
62
|
+
tokenUsage: z.ZodEnum<["verified", "unknown"]>;
|
|
63
|
+
}, "strip", z.ZodTypeAny, {
|
|
64
|
+
streaming: boolean;
|
|
65
|
+
toolCalls: boolean;
|
|
66
|
+
reasoning: boolean;
|
|
67
|
+
multiTurn: boolean;
|
|
68
|
+
tokenUsage: "unknown" | "verified";
|
|
69
|
+
}, {
|
|
70
|
+
streaming: boolean;
|
|
71
|
+
toolCalls: boolean;
|
|
72
|
+
reasoning: boolean;
|
|
73
|
+
multiTurn: boolean;
|
|
74
|
+
tokenUsage: "unknown" | "verified";
|
|
75
|
+
}>;
|
|
76
|
+
status: z.ZodEnum<["draft", "validating", "active", "disabled", "error", "needs-review"]>;
|
|
77
|
+
configGeneration: z.ZodNumber;
|
|
78
|
+
lastValidationAt: z.ZodNullable<z.ZodString>;
|
|
79
|
+
lastErrorCode: z.ZodNullable<z.ZodString>;
|
|
80
|
+
}, "strip", z.ZodTypeAny, {
|
|
81
|
+
status: "error" | "active" | "draft" | "validating" | "disabled" | "needs-review";
|
|
82
|
+
model: string;
|
|
83
|
+
agent: "claude";
|
|
84
|
+
id: string;
|
|
85
|
+
provider: string;
|
|
86
|
+
capabilities: {
|
|
87
|
+
streaming: boolean;
|
|
88
|
+
toolCalls: boolean;
|
|
89
|
+
reasoning: boolean;
|
|
90
|
+
multiTurn: boolean;
|
|
91
|
+
tokenUsage: "unknown" | "verified";
|
|
92
|
+
};
|
|
93
|
+
enterpriseId: string;
|
|
94
|
+
connectionId: string;
|
|
95
|
+
requestProtocol: "anthropic_messages";
|
|
96
|
+
upstreamProtocol: "anthropic_messages";
|
|
97
|
+
alias: string;
|
|
98
|
+
configGeneration: number;
|
|
99
|
+
lastValidationAt: string | null;
|
|
100
|
+
lastErrorCode: string | null;
|
|
101
|
+
}, {
|
|
102
|
+
status: "error" | "active" | "draft" | "validating" | "disabled" | "needs-review";
|
|
103
|
+
model: string;
|
|
104
|
+
agent: "claude";
|
|
105
|
+
id: string;
|
|
106
|
+
provider: string;
|
|
107
|
+
capabilities: {
|
|
108
|
+
streaming: boolean;
|
|
109
|
+
toolCalls: boolean;
|
|
110
|
+
reasoning: boolean;
|
|
111
|
+
multiTurn: boolean;
|
|
112
|
+
tokenUsage: "unknown" | "verified";
|
|
113
|
+
};
|
|
114
|
+
enterpriseId: string;
|
|
115
|
+
connectionId: string;
|
|
116
|
+
requestProtocol: "anthropic_messages";
|
|
117
|
+
upstreamProtocol: "anthropic_messages";
|
|
118
|
+
alias: string;
|
|
119
|
+
configGeneration: number;
|
|
120
|
+
lastValidationAt: string | null;
|
|
121
|
+
lastErrorCode: string | null;
|
|
122
|
+
}>;
|
|
123
|
+
export declare const CreateEnterpriseUpstreamConnectionBodySchema: z.ZodObject<{
|
|
124
|
+
name: z.ZodString;
|
|
125
|
+
baseUrl: z.ZodString;
|
|
126
|
+
apiKey: z.ZodString;
|
|
127
|
+
}, "strip", z.ZodTypeAny, {
|
|
128
|
+
name: string;
|
|
129
|
+
baseUrl: string;
|
|
130
|
+
apiKey: string;
|
|
131
|
+
}, {
|
|
132
|
+
name: string;
|
|
133
|
+
baseUrl: string;
|
|
134
|
+
apiKey: string;
|
|
135
|
+
}>;
|
|
136
|
+
export declare const CreateEnterpriseAgentModelRouteBodySchema: z.ZodObject<{
|
|
137
|
+
connectionId: z.ZodString;
|
|
138
|
+
agent: z.ZodLiteral<"claude">;
|
|
139
|
+
model: z.ZodString;
|
|
140
|
+
requestProtocol: z.ZodLiteral<"anthropic_messages">;
|
|
141
|
+
upstreamProtocol: z.ZodLiteral<"anthropic_messages">;
|
|
142
|
+
provider: z.ZodString;
|
|
143
|
+
}, "strip", z.ZodTypeAny, {
|
|
144
|
+
model: string;
|
|
145
|
+
agent: "claude";
|
|
146
|
+
provider: string;
|
|
147
|
+
connectionId: string;
|
|
148
|
+
requestProtocol: "anthropic_messages";
|
|
149
|
+
upstreamProtocol: "anthropic_messages";
|
|
150
|
+
}, {
|
|
151
|
+
model: string;
|
|
152
|
+
agent: "claude";
|
|
153
|
+
provider: string;
|
|
154
|
+
connectionId: string;
|
|
155
|
+
requestProtocol: "anthropic_messages";
|
|
156
|
+
upstreamProtocol: "anthropic_messages";
|
|
157
|
+
}>;
|
|
158
|
+
export declare const EnterpriseRouteValidationResultSchema: z.ZodObject<{
|
|
159
|
+
routeId: z.ZodString;
|
|
160
|
+
status: z.ZodEnum<["draft", "validating", "active", "disabled", "error", "needs-review"]>;
|
|
161
|
+
protocolVerified: z.ZodBoolean;
|
|
162
|
+
capabilities: z.ZodObject<{
|
|
163
|
+
streaming: z.ZodBoolean;
|
|
164
|
+
toolCalls: z.ZodBoolean;
|
|
165
|
+
reasoning: z.ZodBoolean;
|
|
166
|
+
multiTurn: z.ZodBoolean;
|
|
167
|
+
tokenUsage: z.ZodEnum<["verified", "unknown"]>;
|
|
168
|
+
}, "strip", z.ZodTypeAny, {
|
|
169
|
+
streaming: boolean;
|
|
170
|
+
toolCalls: boolean;
|
|
171
|
+
reasoning: boolean;
|
|
172
|
+
multiTurn: boolean;
|
|
173
|
+
tokenUsage: "unknown" | "verified";
|
|
174
|
+
}, {
|
|
175
|
+
streaming: boolean;
|
|
176
|
+
toolCalls: boolean;
|
|
177
|
+
reasoning: boolean;
|
|
178
|
+
multiTurn: boolean;
|
|
179
|
+
tokenUsage: "unknown" | "verified";
|
|
180
|
+
}>;
|
|
181
|
+
errorCode: z.ZodNullable<z.ZodString>;
|
|
182
|
+
}, "strip", z.ZodTypeAny, {
|
|
183
|
+
status: "error" | "active" | "draft" | "validating" | "disabled" | "needs-review";
|
|
184
|
+
capabilities: {
|
|
185
|
+
streaming: boolean;
|
|
186
|
+
toolCalls: boolean;
|
|
187
|
+
reasoning: boolean;
|
|
188
|
+
multiTurn: boolean;
|
|
189
|
+
tokenUsage: "unknown" | "verified";
|
|
190
|
+
};
|
|
191
|
+
routeId: string;
|
|
192
|
+
protocolVerified: boolean;
|
|
193
|
+
errorCode: string | null;
|
|
194
|
+
}, {
|
|
195
|
+
status: "error" | "active" | "draft" | "validating" | "disabled" | "needs-review";
|
|
196
|
+
capabilities: {
|
|
197
|
+
streaming: boolean;
|
|
198
|
+
toolCalls: boolean;
|
|
199
|
+
reasoning: boolean;
|
|
200
|
+
multiTurn: boolean;
|
|
201
|
+
tokenUsage: "unknown" | "verified";
|
|
202
|
+
};
|
|
203
|
+
routeId: string;
|
|
204
|
+
protocolVerified: boolean;
|
|
205
|
+
errorCode: string | null;
|
|
206
|
+
}>;
|
|
207
|
+
export type EnterpriseGatewayAgent = z.infer<typeof EnterpriseGatewayAgentSchema>;
|
|
208
|
+
export type EnterpriseGatewayProtocol = z.infer<typeof EnterpriseGatewayProtocolSchema>;
|
|
209
|
+
export type EnterpriseRouteCapability = z.infer<typeof EnterpriseRouteCapabilitySchema>;
|
|
210
|
+
export type EnterpriseUpstreamConnection = z.infer<typeof EnterpriseUpstreamConnectionSchema>;
|
|
211
|
+
export type EnterpriseAgentModelRoute = z.infer<typeof EnterpriseAgentModelRouteSchema>;
|
|
212
|
+
export type CreateEnterpriseUpstreamConnectionBody = z.infer<typeof CreateEnterpriseUpstreamConnectionBodySchema>;
|
|
213
|
+
export type CreateEnterpriseAgentModelRouteBody = z.infer<typeof CreateEnterpriseAgentModelRouteBodySchema>;
|
|
214
|
+
export type EnterpriseRouteValidationResult = z.infer<typeof EnterpriseRouteValidationResultSchema>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{z as e}from"zod";export const EnterpriseGatewayAgentSchema=e.literal("claude"),EnterpriseGatewayProtocolSchema=e.literal("anthropic_messages"),EnterpriseRouteStatusSchema=e.enum(["draft","validating","active","disabled","error","needs-review"]),EnterpriseRouteCapabilitySchema=e.object({streaming:e.boolean(),toolCalls:e.boolean(),reasoning:e.boolean(),multiTurn:e.boolean(),tokenUsage:e.enum(["verified","unknown"])}),EnterpriseUpstreamConnectionSchema=e.object({id:e.string().min(1),enterpriseId:e.string().min(1),name:e.string().min(1).max(128),baseUrl:e.string().url(),credentialMasked:e.string().min(1),status:e.enum(["active","disabled","error"])}),EnterpriseAgentModelRouteSchema=e.object({id:e.string().min(1),enterpriseId:e.string().min(1),connectionId:e.string().min(1),agent:EnterpriseGatewayAgentSchema,model:e.string().min(1).max(128),requestProtocol:EnterpriseGatewayProtocolSchema,upstreamProtocol:EnterpriseGatewayProtocolSchema,provider:e.string().min(1).max(64),alias:e.string().min(1).max(128),capabilities:EnterpriseRouteCapabilitySchema,status:EnterpriseRouteStatusSchema,configGeneration:e.number().int().nonnegative(),lastValidationAt:e.string().datetime().nullable(),lastErrorCode:e.string().min(1).nullable()}),CreateEnterpriseUpstreamConnectionBodySchema=e.object({name:e.string().min(1).max(128),baseUrl:e.string().url(),apiKey:e.string().min(1)}),CreateEnterpriseAgentModelRouteBodySchema=e.object({connectionId:e.string().min(1),agent:EnterpriseGatewayAgentSchema,model:e.string().min(1).max(128),requestProtocol:EnterpriseGatewayProtocolSchema,upstreamProtocol:EnterpriseGatewayProtocolSchema,provider:e.string().min(1).max(64)}),EnterpriseRouteValidationResultSchema=e.object({routeId:e.string().min(1),status:EnterpriseRouteStatusSchema,protocolVerified:e.boolean(),capabilities:EnterpriseRouteCapabilitySchema,errorCode:e.string().min(1).nullable()});
|