@camerontaylor/paseo-protocol 0.8.0-fork.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.
- package/README.md +12 -0
- package/dist/agent-attention-notification.d.ts +43 -0
- package/dist/agent-attention-notification.js +141 -0
- package/dist/agent-deep-link.d.ts +8 -0
- package/dist/agent-deep-link.js +49 -0
- package/dist/agent-labels.d.ts +10 -0
- package/dist/agent-labels.js +21 -0
- package/dist/agent-lifecycle.d.ts +3 -0
- package/dist/agent-lifecycle.js +8 -0
- package/dist/agent-state-bucket.d.ts +14 -0
- package/dist/agent-state-bucket.js +41 -0
- package/dist/agent-title-limits.d.ts +2 -0
- package/dist/agent-title-limits.js +2 -0
- package/dist/agent-types.d.ts +478 -0
- package/dist/agent-types.js +22 -0
- package/dist/binary-frames/demux.d.ts +11 -0
- package/dist/binary-frames/demux.js +23 -0
- package/dist/binary-frames/file-transfer.d.ts +51 -0
- package/dist/binary-frames/file-transfer.js +108 -0
- package/dist/binary-frames/index.d.ts +4 -0
- package/dist/binary-frames/index.js +4 -0
- package/dist/binary-frames/terminal.d.ts +35 -0
- package/dist/binary-frames/terminal.js +100 -0
- package/dist/branch-slug.d.ts +14 -0
- package/dist/branch-slug.js +49 -0
- package/dist/browser-automation/capabilities.d.ts +7 -0
- package/dist/browser-automation/capabilities.js +31 -0
- package/dist/browser-automation/rpc-schemas.d.ts +1112 -0
- package/dist/browser-automation/rpc-schemas.js +462 -0
- package/dist/chat/rpc-schemas.d.ts +158 -0
- package/dist/chat/rpc-schemas.js +104 -0
- package/dist/chat/types.d.ts +30 -0
- package/dist/chat/types.js +23 -0
- package/dist/check-traits.d.ts +11 -0
- package/dist/check-traits.js +10 -0
- package/dist/client-capabilities.d.ts +20 -0
- package/dist/client-capabilities.js +47 -0
- package/dist/connection-offer.d.ts +36 -0
- package/dist/connection-offer.js +53 -0
- package/dist/daemon-endpoints.d.ts +47 -0
- package/dist/daemon-endpoints.js +201 -0
- package/dist/error-utils.d.ts +11 -0
- package/dist/error-utils.js +27 -0
- package/dist/forge-manifest.d.ts +66 -0
- package/dist/forge-manifest.js +92 -0
- package/dist/generated/validation/ws-outbound.aot.d.ts +2 -0
- package/dist/generated/validation/ws-outbound.aot.js +98097 -0
- package/dist/git-remote.d.ts +33 -0
- package/dist/git-remote.js +94 -0
- package/dist/gitea-status.d.ts +10 -0
- package/dist/gitea-status.js +23 -0
- package/dist/gitlab-pipeline.d.ts +10 -0
- package/dist/gitlab-pipeline.js +17 -0
- package/dist/host-connection-schema.d.ts +11 -0
- package/dist/host-connection-schema.js +9 -0
- package/dist/literal-union.d.ts +2 -0
- package/dist/literal-union.js +2 -0
- package/dist/loop/rpc-schemas.d.ts +636 -0
- package/dist/loop/rpc-schemas.js +164 -0
- package/dist/messages.d.ts +60742 -0
- package/dist/messages.js +6152 -0
- package/dist/paseo-config-schema.d.ts +138 -0
- package/dist/paseo-config-schema.js +98 -0
- package/dist/paseo-tool-call-detail.d.ts +15 -0
- package/dist/paseo-tool-call-detail.js +305 -0
- package/dist/path-utils.d.ts +2 -0
- package/dist/path-utils.js +16 -0
- package/dist/plugin-requirements.d.ts +11 -0
- package/dist/plugin-requirements.js +26 -0
- package/dist/plugin-source-reference.d.ts +7 -0
- package/dist/plugin-source-reference.js +41 -0
- package/dist/provider-config.d.ts +139 -0
- package/dist/provider-config.js +115 -0
- package/dist/provider-icon-names.d.ts +5 -0
- package/dist/provider-icon-names.js +54 -0
- package/dist/provider-manifest.d.ts +37 -0
- package/dist/provider-manifest.js +261 -0
- package/dist/provider-snapshot-codec.d.ts +18 -0
- package/dist/provider-snapshot-codec.js +71 -0
- package/dist/schedule/cadence.d.ts +6 -0
- package/dist/schedule/cadence.js +28 -0
- package/dist/schedule/cron-expression.d.ts +13 -0
- package/dist/schedule/cron-expression.js +97 -0
- package/dist/schedule/rpc-schemas.d.ts +568 -0
- package/dist/schedule/rpc-schemas.js +155 -0
- package/dist/schedule/types.d.ts +201 -0
- package/dist/schedule/types.js +68 -0
- package/dist/search/text-match.d.ts +71 -0
- package/dist/search/text-match.js +291 -0
- package/dist/ssh-transport.d.ts +11 -0
- package/dist/ssh-transport.js +72 -0
- package/dist/terminal-activity.d.ts +21 -0
- package/dist/terminal-activity.js +25 -0
- package/dist/terminal-input-mode.d.ts +30 -0
- package/dist/terminal-input-mode.js +180 -0
- package/dist/terminal-key-input.d.ts +13 -0
- package/dist/terminal-key-input.js +210 -0
- package/dist/terminal-profiles.d.ts +41 -0
- package/dist/terminal-profiles.js +270 -0
- package/dist/terminal-snapshot.d.ts +3 -0
- package/dist/terminal-snapshot.js +184 -0
- package/dist/terminal-stream-protocol.d.ts +2 -0
- package/dist/terminal-stream-protocol.js +2 -0
- package/dist/terminal-subscription-key.d.ts +2 -0
- package/dist/terminal-subscription-key.js +9 -0
- package/dist/timeline-identity.d.ts +3 -0
- package/dist/timeline-identity.js +8 -0
- package/dist/tool-call-display.d.ts +11 -0
- package/dist/tool-call-display.js +136 -0
- package/dist/tool-name-normalization.d.ts +9 -0
- package/dist/tool-name-normalization.js +82 -0
- package/dist/validation/ws-outbound-schema-metadata.d.ts +11418 -0
- package/dist/validation/ws-outbound-schema-metadata.js +3 -0
- package/dist/validation/ws-outbound.d.ts +12 -0
- package/dist/validation/ws-outbound.js +8 -0
- package/dist/workspace-labels.d.ts +9 -0
- package/dist/workspace-labels.js +19 -0
- package/package.json +44 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { AgentProvider } from "./agent-types.js";
|
|
3
|
+
export declare const ProviderCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4
|
+
mode: z.ZodLiteral<"default">;
|
|
5
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6
|
+
mode: z.ZodLiteral<"append">;
|
|
7
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
9
|
+
mode: z.ZodLiteral<"replace">;
|
|
10
|
+
argv: z.ZodArray<z.ZodString>;
|
|
11
|
+
}, z.core.$strip>], "mode">;
|
|
12
|
+
export declare const ProviderRuntimeSettingsSchema: z.ZodObject<{
|
|
13
|
+
command: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
14
|
+
mode: z.ZodLiteral<"default">;
|
|
15
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
16
|
+
mode: z.ZodLiteral<"append">;
|
|
17
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
18
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
19
|
+
mode: z.ZodLiteral<"replace">;
|
|
20
|
+
argv: z.ZodArray<z.ZodString>;
|
|
21
|
+
}, z.core.$strip>], "mode">>;
|
|
22
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
23
|
+
disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export declare const ProviderPaseoToolsPolicySchema: z.ZodObject<{
|
|
26
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
disabledTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
export declare const ProviderProfileModelSchema: z.ZodObject<{
|
|
30
|
+
id: z.ZodString;
|
|
31
|
+
label: z.ZodString;
|
|
32
|
+
description: z.ZodOptional<z.ZodString>;
|
|
33
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
+
thinkingOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
35
|
+
id: z.ZodString;
|
|
36
|
+
label: z.ZodString;
|
|
37
|
+
description: z.ZodOptional<z.ZodString>;
|
|
38
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
+
}, z.core.$strip>>>;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
export declare const ProviderOverrideSchema: z.ZodObject<{
|
|
42
|
+
extends: z.ZodOptional<z.ZodString>;
|
|
43
|
+
label: z.ZodOptional<z.ZodString>;
|
|
44
|
+
description: z.ZodOptional<z.ZodString>;
|
|
45
|
+
command: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
46
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
47
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
48
|
+
models: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
49
|
+
id: z.ZodString;
|
|
50
|
+
label: z.ZodString;
|
|
51
|
+
description: z.ZodOptional<z.ZodString>;
|
|
52
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
53
|
+
thinkingOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
54
|
+
id: z.ZodString;
|
|
55
|
+
label: z.ZodString;
|
|
56
|
+
description: z.ZodOptional<z.ZodString>;
|
|
57
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
58
|
+
}, z.core.$strip>>>;
|
|
59
|
+
}, z.core.$strip>>>;
|
|
60
|
+
additionalModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
61
|
+
id: z.ZodString;
|
|
62
|
+
label: z.ZodString;
|
|
63
|
+
description: z.ZodOptional<z.ZodString>;
|
|
64
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
+
thinkingOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
66
|
+
id: z.ZodString;
|
|
67
|
+
label: z.ZodString;
|
|
68
|
+
description: z.ZodOptional<z.ZodString>;
|
|
69
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
+
}, z.core.$strip>>>;
|
|
71
|
+
}, z.core.$strip>>>;
|
|
72
|
+
disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
73
|
+
paseoTools: z.ZodOptional<z.ZodObject<{
|
|
74
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
+
disabledTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
76
|
+
}, z.core.$strip>>;
|
|
77
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
78
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
export declare const ProviderOverridesSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
81
|
+
extends: z.ZodOptional<z.ZodString>;
|
|
82
|
+
label: z.ZodOptional<z.ZodString>;
|
|
83
|
+
description: z.ZodOptional<z.ZodString>;
|
|
84
|
+
command: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
85
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
86
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
87
|
+
models: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
88
|
+
id: z.ZodString;
|
|
89
|
+
label: z.ZodString;
|
|
90
|
+
description: z.ZodOptional<z.ZodString>;
|
|
91
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
92
|
+
thinkingOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
93
|
+
id: z.ZodString;
|
|
94
|
+
label: z.ZodString;
|
|
95
|
+
description: z.ZodOptional<z.ZodString>;
|
|
96
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
97
|
+
}, z.core.$strip>>>;
|
|
98
|
+
}, z.core.$strip>>>;
|
|
99
|
+
additionalModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
100
|
+
id: z.ZodString;
|
|
101
|
+
label: z.ZodString;
|
|
102
|
+
description: z.ZodOptional<z.ZodString>;
|
|
103
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
104
|
+
thinkingOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
105
|
+
id: z.ZodString;
|
|
106
|
+
label: z.ZodString;
|
|
107
|
+
description: z.ZodOptional<z.ZodString>;
|
|
108
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
109
|
+
}, z.core.$strip>>>;
|
|
110
|
+
}, z.core.$strip>>>;
|
|
111
|
+
disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
112
|
+
paseoTools: z.ZodOptional<z.ZodObject<{
|
|
113
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
114
|
+
disabledTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
115
|
+
}, z.core.$strip>>;
|
|
116
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
117
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
}, z.core.$strip>>;
|
|
119
|
+
export declare const AgentProviderRuntimeSettingsMapSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
120
|
+
command: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
121
|
+
mode: z.ZodLiteral<"default">;
|
|
122
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
123
|
+
mode: z.ZodLiteral<"append">;
|
|
124
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
125
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
126
|
+
mode: z.ZodLiteral<"replace">;
|
|
127
|
+
argv: z.ZodArray<z.ZodString>;
|
|
128
|
+
}, z.core.$strip>], "mode">>;
|
|
129
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
130
|
+
disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
131
|
+
}, z.core.$strip>>;
|
|
132
|
+
export type ProviderCommand = z.infer<typeof ProviderCommandSchema>;
|
|
133
|
+
export type ProviderRuntimeSettings = z.infer<typeof ProviderRuntimeSettingsSchema>;
|
|
134
|
+
export type ProviderPaseoToolsPolicy = z.infer<typeof ProviderPaseoToolsPolicySchema>;
|
|
135
|
+
export type ProviderProfileModel = z.infer<typeof ProviderProfileModelSchema>;
|
|
136
|
+
export type ProviderOverride = z.infer<typeof ProviderOverrideSchema>;
|
|
137
|
+
export type ProviderOverrides = z.infer<typeof ProviderOverridesSchema>;
|
|
138
|
+
export type AgentProviderRuntimeSettingsMap = Partial<Record<AgentProvider, ProviderRuntimeSettings>>;
|
|
139
|
+
//# sourceMappingURL=provider-config.d.ts.map
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { AgentProviderSchema } from "./provider-manifest.js";
|
|
3
|
+
const ProviderCommandDefaultSchema = z.object({
|
|
4
|
+
mode: z.literal("default"),
|
|
5
|
+
});
|
|
6
|
+
const ProviderCommandAppendSchema = z.object({
|
|
7
|
+
mode: z.literal("append"),
|
|
8
|
+
args: z.array(z.string()).optional(),
|
|
9
|
+
});
|
|
10
|
+
const ProviderCommandReplaceSchema = z.object({
|
|
11
|
+
mode: z.literal("replace"),
|
|
12
|
+
argv: z.array(z.string().min(1)).min(1),
|
|
13
|
+
});
|
|
14
|
+
export const ProviderCommandSchema = z.discriminatedUnion("mode", [
|
|
15
|
+
ProviderCommandDefaultSchema,
|
|
16
|
+
ProviderCommandAppendSchema,
|
|
17
|
+
ProviderCommandReplaceSchema,
|
|
18
|
+
]);
|
|
19
|
+
export const ProviderRuntimeSettingsSchema = z.object({
|
|
20
|
+
command: ProviderCommandSchema.optional(),
|
|
21
|
+
env: z.record(z.string(), z.string()).optional(),
|
|
22
|
+
disallowedTools: z.array(z.string()).optional(),
|
|
23
|
+
});
|
|
24
|
+
export const ProviderPaseoToolsPolicySchema = z.object({
|
|
25
|
+
enabled: z.boolean().optional(),
|
|
26
|
+
disabledTools: z.array(z.string()).optional(),
|
|
27
|
+
});
|
|
28
|
+
const ProviderProfileThinkingOptionSchema = z.object({
|
|
29
|
+
id: z.string(),
|
|
30
|
+
label: z.string(),
|
|
31
|
+
description: z.string().optional(),
|
|
32
|
+
isDefault: z.boolean().optional(),
|
|
33
|
+
});
|
|
34
|
+
export const ProviderProfileModelSchema = z.object({
|
|
35
|
+
id: z.string().min(1),
|
|
36
|
+
label: z.string().min(1),
|
|
37
|
+
description: z.string().optional(),
|
|
38
|
+
isDefault: z.boolean().optional(),
|
|
39
|
+
thinkingOptions: z.array(ProviderProfileThinkingOptionSchema).optional(),
|
|
40
|
+
});
|
|
41
|
+
export const ProviderOverrideSchema = z.object({
|
|
42
|
+
extends: z.string().optional(),
|
|
43
|
+
label: z.string().optional(),
|
|
44
|
+
description: z.string().optional(),
|
|
45
|
+
command: z.array(z.string().min(1)).min(1).optional(),
|
|
46
|
+
env: z.record(z.string(), z.string()).optional(),
|
|
47
|
+
params: z.record(z.string(), z.unknown()).optional(),
|
|
48
|
+
models: z.array(ProviderProfileModelSchema).optional(),
|
|
49
|
+
additionalModels: z.array(ProviderProfileModelSchema).optional(),
|
|
50
|
+
disallowedTools: z.array(z.string()).optional(),
|
|
51
|
+
paseoTools: ProviderPaseoToolsPolicySchema.optional(),
|
|
52
|
+
enabled: z.boolean().optional(),
|
|
53
|
+
order: z.number().optional(),
|
|
54
|
+
});
|
|
55
|
+
const BUILTIN_PROVIDER_IDS = ["claude", "codex", "copilot", "opencode", "pi", "omp"];
|
|
56
|
+
const PROVIDER_ID_PATTERN = /^[a-z][a-z0-9-]*$/;
|
|
57
|
+
export const ProviderOverridesSchema = z
|
|
58
|
+
.record(z.string(), ProviderOverrideSchema)
|
|
59
|
+
.superRefine((providers, ctx) => {
|
|
60
|
+
const builtinProviderIdSet = new Set(BUILTIN_PROVIDER_IDS);
|
|
61
|
+
const validExtendsValues = new Set([...BUILTIN_PROVIDER_IDS, "acp"]);
|
|
62
|
+
for (const [providerId, provider] of Object.entries(providers)) {
|
|
63
|
+
if (!PROVIDER_ID_PATTERN.test(providerId)) {
|
|
64
|
+
ctx.addIssue({
|
|
65
|
+
code: z.ZodIssueCode.custom,
|
|
66
|
+
path: [providerId],
|
|
67
|
+
message: `Provider ID "${providerId}" must match ${PROVIDER_ID_PATTERN}.`,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
const isBuiltinProvider = builtinProviderIdSet.has(providerId);
|
|
71
|
+
if (!isBuiltinProvider && !provider.extends) {
|
|
72
|
+
ctx.addIssue({
|
|
73
|
+
code: z.ZodIssueCode.custom,
|
|
74
|
+
path: [providerId, "extends"],
|
|
75
|
+
message: `Custom provider "${providerId}" must declare extends.`,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
if (!isBuiltinProvider && !provider.label) {
|
|
79
|
+
ctx.addIssue({
|
|
80
|
+
code: z.ZodIssueCode.custom,
|
|
81
|
+
path: [providerId, "label"],
|
|
82
|
+
message: `Custom provider "${providerId}" must declare label.`,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
if (provider.extends && !validExtendsValues.has(provider.extends)) {
|
|
86
|
+
ctx.addIssue({
|
|
87
|
+
code: z.ZodIssueCode.custom,
|
|
88
|
+
path: [providerId, "extends"],
|
|
89
|
+
message: `Provider "${providerId}" extends unknown provider "${provider.extends}".`,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
if (provider.extends === "acp" && !provider.command) {
|
|
93
|
+
ctx.addIssue({
|
|
94
|
+
code: z.ZodIssueCode.custom,
|
|
95
|
+
path: [providerId, "command"],
|
|
96
|
+
message: `Provider "${providerId}" extending "acp" must declare command.`,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
export const AgentProviderRuntimeSettingsMapSchema = z
|
|
102
|
+
.record(z.string(), ProviderRuntimeSettingsSchema)
|
|
103
|
+
.superRefine((providers, ctx) => {
|
|
104
|
+
for (const providerId of Object.keys(providers)) {
|
|
105
|
+
const parsedProviderId = AgentProviderSchema.safeParse(providerId);
|
|
106
|
+
if (!parsedProviderId.success) {
|
|
107
|
+
ctx.addIssue({
|
|
108
|
+
code: z.ZodIssueCode.custom,
|
|
109
|
+
path: [providerId],
|
|
110
|
+
message: `Invalid agent provider "${providerId}".`,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
//# sourceMappingURL=provider-config.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const BUILTIN_PROVIDER_ICON_NAMES: string[];
|
|
2
|
+
export declare const ACP_PROVIDER_ICON_NAMES: string[];
|
|
3
|
+
export declare const TERMINAL_PROFILE_ICON_NAMES: string[];
|
|
4
|
+
export declare const KNOWN_PROVIDER_ICON_NAMES: string[];
|
|
5
|
+
//# sourceMappingURL=provider-icon-names.d.ts.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export const BUILTIN_PROVIDER_ICON_NAMES = [
|
|
2
|
+
"claude",
|
|
3
|
+
"codex",
|
|
4
|
+
"copilot",
|
|
5
|
+
"kiro",
|
|
6
|
+
"minimax",
|
|
7
|
+
"omp",
|
|
8
|
+
"opencode",
|
|
9
|
+
"pi",
|
|
10
|
+
];
|
|
11
|
+
export const ACP_PROVIDER_ICON_NAMES = [
|
|
12
|
+
"agoragentic-acp",
|
|
13
|
+
"amp-acp",
|
|
14
|
+
"auggie",
|
|
15
|
+
"autohand",
|
|
16
|
+
"cline",
|
|
17
|
+
"codebuddy-code",
|
|
18
|
+
"codewhale",
|
|
19
|
+
"cortex-code",
|
|
20
|
+
"corust-agent",
|
|
21
|
+
"crow-cli",
|
|
22
|
+
"cursor",
|
|
23
|
+
"deepagents",
|
|
24
|
+
"dimcode",
|
|
25
|
+
"dirac",
|
|
26
|
+
"factory-droid",
|
|
27
|
+
"fast-agent",
|
|
28
|
+
"gemini",
|
|
29
|
+
"gjc",
|
|
30
|
+
"glm-acp-agent",
|
|
31
|
+
"goose",
|
|
32
|
+
"grok",
|
|
33
|
+
"junie",
|
|
34
|
+
"kilo",
|
|
35
|
+
"kimi",
|
|
36
|
+
"minimax-code",
|
|
37
|
+
"minion-code",
|
|
38
|
+
"mistral-vibe",
|
|
39
|
+
"nova",
|
|
40
|
+
"poolside",
|
|
41
|
+
"qoder",
|
|
42
|
+
"qwen-code",
|
|
43
|
+
"sigit",
|
|
44
|
+
"stakpak",
|
|
45
|
+
"traecli",
|
|
46
|
+
"vtcode",
|
|
47
|
+
];
|
|
48
|
+
export const TERMINAL_PROFILE_ICON_NAMES = ["agy"];
|
|
49
|
+
export const KNOWN_PROVIDER_ICON_NAMES = [
|
|
50
|
+
...BUILTIN_PROVIDER_ICON_NAMES,
|
|
51
|
+
...ACP_PROVIDER_ICON_NAMES,
|
|
52
|
+
...TERMINAL_PROFILE_ICON_NAMES,
|
|
53
|
+
];
|
|
54
|
+
//# sourceMappingURL=provider-icon-names.js.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { AgentMode } from "./agent-types.js";
|
|
3
|
+
export type AgentModeColorTier = "safe" | "moderate" | "dangerous" | "planning" | `#${string}`;
|
|
4
|
+
export type AgentModeIcon = string;
|
|
5
|
+
export interface AgentModeVisuals {
|
|
6
|
+
icon: AgentModeIcon;
|
|
7
|
+
colorTier: AgentModeColorTier;
|
|
8
|
+
}
|
|
9
|
+
export type AgentProviderModeDefinition = Omit<AgentMode, "icon" | "colorTier"> & AgentModeVisuals & {
|
|
10
|
+
isUnattended?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export interface AgentProviderDefinition {
|
|
13
|
+
id: string;
|
|
14
|
+
label: string;
|
|
15
|
+
description: string;
|
|
16
|
+
/** Builtin provider this definition extends, when it comes from a custom provider account. */
|
|
17
|
+
baseProviderId?: string;
|
|
18
|
+
enabledByDefault?: boolean;
|
|
19
|
+
defaultModeId: string | null;
|
|
20
|
+
modes: AgentProviderModeDefinition[];
|
|
21
|
+
voice?: {
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
defaultModeId: string;
|
|
24
|
+
defaultModel?: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export declare const OMP_MODES: AgentProviderModeDefinition[];
|
|
28
|
+
export declare const AGENT_PROVIDER_DEFINITIONS: AgentProviderDefinition[];
|
|
29
|
+
export declare const DEV_AGENT_PROVIDER_DEFINITIONS: AgentProviderDefinition[];
|
|
30
|
+
export declare function getAgentProviderDefinition(provider: string, definitions?: AgentProviderDefinition[]): AgentProviderDefinition;
|
|
31
|
+
export declare const BUILTIN_PROVIDER_IDS: string[];
|
|
32
|
+
export declare const AGENT_PROVIDER_IDS: string[];
|
|
33
|
+
export declare const AgentProviderSchema: z.ZodString;
|
|
34
|
+
export declare function isValidAgentProvider(value: string, validIds?: Iterable<string>): boolean;
|
|
35
|
+
export declare function getUnattendedModeId(provider: string, definitions?: AgentProviderDefinition[]): string | undefined;
|
|
36
|
+
export declare function getModeVisuals(provider: string, modeId: string, definitions: AgentProviderDefinition[]): AgentModeVisuals | undefined;
|
|
37
|
+
//# sourceMappingURL=provider-manifest.d.ts.map
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const CLAUDE_MODES = [
|
|
3
|
+
{
|
|
4
|
+
id: "plan",
|
|
5
|
+
label: "Plan Mode",
|
|
6
|
+
description: "Analyze the codebase without executing tools or edits",
|
|
7
|
+
icon: "ShieldEllipsis",
|
|
8
|
+
colorTier: "planning",
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
id: "default",
|
|
12
|
+
label: "Always Ask",
|
|
13
|
+
description: "Prompts for permission the first time a tool is used",
|
|
14
|
+
icon: "Shield",
|
|
15
|
+
colorTier: "safe",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: "acceptEdits",
|
|
19
|
+
label: "Accept File Edits",
|
|
20
|
+
description: "Automatically approves edit-focused tools without prompting",
|
|
21
|
+
icon: "ShieldPlus",
|
|
22
|
+
colorTier: "moderate",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "auto",
|
|
26
|
+
label: "Auto mode",
|
|
27
|
+
description: "Uses a model classifier to review permission prompts automatically",
|
|
28
|
+
icon: "ShieldCheck",
|
|
29
|
+
colorTier: "moderate",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: "bypassPermissions",
|
|
33
|
+
label: "Bypass",
|
|
34
|
+
description: "Skip all permission prompts (use with caution)",
|
|
35
|
+
icon: "ShieldOff",
|
|
36
|
+
colorTier: "dangerous",
|
|
37
|
+
isUnattended: true,
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
const CODEX_MODES = [
|
|
41
|
+
{
|
|
42
|
+
id: "auto",
|
|
43
|
+
label: "Default Permissions",
|
|
44
|
+
description: "Edit files and run commands with Codex's default approval flow.",
|
|
45
|
+
icon: "Shield",
|
|
46
|
+
colorTier: "moderate",
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: "auto-review",
|
|
50
|
+
label: "Auto-review",
|
|
51
|
+
description: "Same workspace-write permissions as Default, but eligible `on-request` approvals are routed through the auto-reviewer subagent.",
|
|
52
|
+
icon: "ShieldCheck",
|
|
53
|
+
colorTier: "moderate",
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: "full-access",
|
|
57
|
+
label: "Full Access",
|
|
58
|
+
description: "Edit files, run commands, and access the network without additional prompts.",
|
|
59
|
+
icon: "ShieldOff",
|
|
60
|
+
colorTier: "dangerous",
|
|
61
|
+
isUnattended: true,
|
|
62
|
+
},
|
|
63
|
+
];
|
|
64
|
+
const COPILOT_MODES = [
|
|
65
|
+
{
|
|
66
|
+
id: "https://agentclientprotocol.com/protocol/session-modes#agent",
|
|
67
|
+
label: "Agent",
|
|
68
|
+
description: "Default agent mode for conversational interactions",
|
|
69
|
+
icon: "Shield",
|
|
70
|
+
colorTier: "moderate",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "https://agentclientprotocol.com/protocol/session-modes#plan",
|
|
74
|
+
label: "Plan",
|
|
75
|
+
description: "Plan mode for creating and executing multi-step plans",
|
|
76
|
+
icon: "ShieldEllipsis",
|
|
77
|
+
colorTier: "planning",
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: "allow-all",
|
|
81
|
+
label: "Allow All",
|
|
82
|
+
description: "Automatically approves all Copilot tool, path, and URL requests.",
|
|
83
|
+
icon: "ShieldOff",
|
|
84
|
+
colorTier: "dangerous",
|
|
85
|
+
isUnattended: true,
|
|
86
|
+
},
|
|
87
|
+
];
|
|
88
|
+
const OPENCODE_MODES = [
|
|
89
|
+
{
|
|
90
|
+
id: "build",
|
|
91
|
+
label: "Build",
|
|
92
|
+
description: "Allows edits and tool execution for implementation work",
|
|
93
|
+
icon: "Shield",
|
|
94
|
+
colorTier: "moderate",
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: "plan",
|
|
98
|
+
label: "Plan",
|
|
99
|
+
description: "Read-only planning mode that avoids file edits",
|
|
100
|
+
icon: "ShieldEllipsis",
|
|
101
|
+
colorTier: "planning",
|
|
102
|
+
},
|
|
103
|
+
];
|
|
104
|
+
export const OMP_MODES = [
|
|
105
|
+
{
|
|
106
|
+
id: "full",
|
|
107
|
+
label: "Full Access",
|
|
108
|
+
description: "Launches OMP with yolo approval mode so tools run without prompts.",
|
|
109
|
+
icon: "ShieldOff",
|
|
110
|
+
colorTier: "dangerous",
|
|
111
|
+
isUnattended: true,
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: "write",
|
|
115
|
+
label: "Write Approval",
|
|
116
|
+
description: "Launches OMP with write approval mode — reads are free, writes require approval.",
|
|
117
|
+
icon: "ShieldAlert",
|
|
118
|
+
colorTier: "moderate",
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: "ask",
|
|
122
|
+
label: "Always Ask",
|
|
123
|
+
description: "Launches OMP with always-ask approval mode for write and exec tools.",
|
|
124
|
+
icon: "ShieldCheck",
|
|
125
|
+
colorTier: "safe",
|
|
126
|
+
},
|
|
127
|
+
];
|
|
128
|
+
const MOCK_LOAD_TEST_MODES = [
|
|
129
|
+
{
|
|
130
|
+
id: "load-test",
|
|
131
|
+
label: "Load Test",
|
|
132
|
+
description: "Streams repeated markdown, reasoning, and tool calls for app stress testing",
|
|
133
|
+
icon: "ShieldOff",
|
|
134
|
+
colorTier: "dangerous",
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
id: "approval-test",
|
|
138
|
+
label: "Approval Test",
|
|
139
|
+
description: "Alternate development-only permission mode for preference tests",
|
|
140
|
+
icon: "ShieldCheck",
|
|
141
|
+
colorTier: "safe",
|
|
142
|
+
},
|
|
143
|
+
];
|
|
144
|
+
const MOCK_SLOW_MODES = [
|
|
145
|
+
{
|
|
146
|
+
id: "default",
|
|
147
|
+
label: "Default",
|
|
148
|
+
description: "Dev-only mode for the mock slow provider",
|
|
149
|
+
icon: "ShieldOff",
|
|
150
|
+
colorTier: "dangerous",
|
|
151
|
+
},
|
|
152
|
+
];
|
|
153
|
+
export const AGENT_PROVIDER_DEFINITIONS = [
|
|
154
|
+
{
|
|
155
|
+
id: "claude",
|
|
156
|
+
label: "Claude",
|
|
157
|
+
description: "Anthropic's multi-tool assistant with MCP support, streaming, and deep reasoning",
|
|
158
|
+
defaultModeId: "auto",
|
|
159
|
+
modes: CLAUDE_MODES,
|
|
160
|
+
voice: {
|
|
161
|
+
enabled: true,
|
|
162
|
+
defaultModeId: "default",
|
|
163
|
+
defaultModel: "haiku",
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
id: "codex",
|
|
168
|
+
label: "Codex",
|
|
169
|
+
description: "OpenAI's Codex workspace agent with sandbox controls and optional network access",
|
|
170
|
+
defaultModeId: "auto-review",
|
|
171
|
+
modes: CODEX_MODES,
|
|
172
|
+
voice: {
|
|
173
|
+
enabled: true,
|
|
174
|
+
defaultModeId: "auto",
|
|
175
|
+
defaultModel: "gpt-5.4-mini",
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
id: "copilot",
|
|
180
|
+
label: "Copilot",
|
|
181
|
+
description: "GitHub Copilot via Agent Client Protocol with dynamic modes and session support",
|
|
182
|
+
defaultModeId: "https://agentclientprotocol.com/protocol/session-modes#agent",
|
|
183
|
+
modes: COPILOT_MODES,
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
id: "opencode",
|
|
187
|
+
label: "OpenCode",
|
|
188
|
+
description: "Open-source coding assistant with multi-provider model support",
|
|
189
|
+
// No static default: OpenCode users can rename or delete any agent,
|
|
190
|
+
// including "build". Leaving this unset means the daemon and OpenCode
|
|
191
|
+
// itself decide (see normalizeOpenCodeModeId in opencode-agent.ts).
|
|
192
|
+
defaultModeId: null,
|
|
193
|
+
modes: OPENCODE_MODES,
|
|
194
|
+
voice: {
|
|
195
|
+
enabled: true,
|
|
196
|
+
defaultModeId: "build",
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
id: "pi",
|
|
201
|
+
label: "Pi",
|
|
202
|
+
description: "Minimal terminal-based coding agent with multi-provider LLM support",
|
|
203
|
+
defaultModeId: null,
|
|
204
|
+
modes: [],
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
id: "omp",
|
|
208
|
+
label: "Oh My Pi",
|
|
209
|
+
description: "Multi-provider coding agent with native approvals, host tools, and subagents",
|
|
210
|
+
enabledByDefault: false,
|
|
211
|
+
defaultModeId: "full",
|
|
212
|
+
modes: OMP_MODES,
|
|
213
|
+
},
|
|
214
|
+
];
|
|
215
|
+
export const DEV_AGENT_PROVIDER_DEFINITIONS = [
|
|
216
|
+
{
|
|
217
|
+
id: "mock",
|
|
218
|
+
label: "Mock Load Test",
|
|
219
|
+
description: "Development-only provider that emits synthetic agent traffic for performance tests",
|
|
220
|
+
defaultModeId: "load-test",
|
|
221
|
+
modes: MOCK_LOAD_TEST_MODES,
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
id: "mock-slow",
|
|
225
|
+
label: "Mock Slow Provider",
|
|
226
|
+
description: "Dev-only: hangs during model discovery to test loading and timeout UI",
|
|
227
|
+
defaultModeId: "default",
|
|
228
|
+
modes: MOCK_SLOW_MODES,
|
|
229
|
+
},
|
|
230
|
+
];
|
|
231
|
+
export function getAgentProviderDefinition(provider, definitions = [
|
|
232
|
+
...AGENT_PROVIDER_DEFINITIONS,
|
|
233
|
+
...DEV_AGENT_PROVIDER_DEFINITIONS,
|
|
234
|
+
]) {
|
|
235
|
+
const definition = definitions.find((entry) => entry.id === provider);
|
|
236
|
+
if (!definition) {
|
|
237
|
+
throw new Error(`Unknown agent provider: ${provider}`);
|
|
238
|
+
}
|
|
239
|
+
return definition;
|
|
240
|
+
}
|
|
241
|
+
export const BUILTIN_PROVIDER_IDS = AGENT_PROVIDER_DEFINITIONS.map((d) => d.id);
|
|
242
|
+
export const AGENT_PROVIDER_IDS = BUILTIN_PROVIDER_IDS;
|
|
243
|
+
export const AgentProviderSchema = z.string();
|
|
244
|
+
export function isValidAgentProvider(value, validIds = BUILTIN_PROVIDER_IDS) {
|
|
245
|
+
return Array.isArray(validIds) ? validIds.includes(value) : new Set(validIds).has(value);
|
|
246
|
+
}
|
|
247
|
+
export function getUnattendedModeId(provider, definitions = [
|
|
248
|
+
...AGENT_PROVIDER_DEFINITIONS,
|
|
249
|
+
...DEV_AGENT_PROVIDER_DEFINITIONS,
|
|
250
|
+
]) {
|
|
251
|
+
const definition = definitions.find((entry) => entry.id === provider);
|
|
252
|
+
return definition?.modes.find((mode) => mode.isUnattended)?.id;
|
|
253
|
+
}
|
|
254
|
+
export function getModeVisuals(provider, modeId, definitions) {
|
|
255
|
+
const definition = definitions.find((entry) => entry.id === provider);
|
|
256
|
+
const mode = definition?.modes.find((m) => m.id === modeId);
|
|
257
|
+
if (!mode)
|
|
258
|
+
return undefined;
|
|
259
|
+
return { icon: mode.icon, colorTier: mode.colorTier };
|
|
260
|
+
}
|
|
261
|
+
//# sourceMappingURL=provider-manifest.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { AgentModelDefinition, AgentSelectOption, ProviderSnapshotEntry } from "./agent-types.js";
|
|
2
|
+
export interface CompactProviderSnapshotModel extends Omit<AgentModelDefinition, "provider" | "thinkingOptions"> {
|
|
3
|
+
thinkingSet?: number;
|
|
4
|
+
}
|
|
5
|
+
export interface CompactProviderSnapshotEntry extends Omit<ProviderSnapshotEntry, "models"> {
|
|
6
|
+
models?: CompactProviderSnapshotModel[];
|
|
7
|
+
}
|
|
8
|
+
export interface ProviderSnapshotThinkingSet {
|
|
9
|
+
options: AgentSelectOption[];
|
|
10
|
+
defaultOptionId?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface CompactProviderSnapshot {
|
|
13
|
+
entries: CompactProviderSnapshotEntry[];
|
|
14
|
+
thinkingSets: ProviderSnapshotThinkingSet[];
|
|
15
|
+
}
|
|
16
|
+
export declare function compactProviderSnapshot(entries: ProviderSnapshotEntry[]): CompactProviderSnapshot;
|
|
17
|
+
export declare function expandProviderSnapshot(snapshot: CompactProviderSnapshot): ProviderSnapshotEntry[];
|
|
18
|
+
//# sourceMappingURL=provider-snapshot-codec.d.ts.map
|