@otto-code/protocol 0.7.3 → 0.7.5
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/agent-types.d.ts +12 -0
- package/dist/browser-automation/rpc-schemas.d.ts +21 -0
- package/dist/browser-automation/rpc-schemas.js +10 -0
- package/dist/generated/validation/ws-outbound.aot.js +30407 -26229
- package/dist/messages.d.ts +4516 -185
- package/dist/messages.js +883 -2
- package/dist/provider-config.d.ts +81 -0
- package/dist/provider-config.js +42 -0
- package/dist/validation/ws-outbound-schema-metadata.d.ts +728 -2
- package/package.json +1 -1
|
@@ -72,6 +72,84 @@ export declare const McpServerConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
72
72
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
73
73
|
alwaysLoad: z.ZodOptional<z.ZodBoolean>;
|
|
74
74
|
}, z.core.$strip>], "type">;
|
|
75
|
+
/**
|
|
76
|
+
* Per-workspace state for a connector, keyed by workspace cwd in
|
|
77
|
+
* ConnectorConfig.workspaces. Phase 1 leaves this inert (the daemon does not
|
|
78
|
+
* yet read it); it exists in the schema now so per-workspace scope can land
|
|
79
|
+
* later without a config migration.
|
|
80
|
+
*/
|
|
81
|
+
export declare const ConnectorWorkspaceStateSchema: z.ZodObject<{
|
|
82
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
83
|
+
}, z.core.$strip>;
|
|
84
|
+
/**
|
|
85
|
+
* A Connector is an MCP server surfaced to users as a first-class, named,
|
|
86
|
+
* enable/disable-able integration. Mechanism is plain MCP (it embeds a
|
|
87
|
+
* McpServerConfig transport descriptor unchanged); what makes it a "connector"
|
|
88
|
+
* is the lifecycle state layered on top: a global on/off, an individually
|
|
89
|
+
* disabled-tools list, and (later) per-workspace activation. Every state field
|
|
90
|
+
* is optional so an absent value reads as "enabled / nothing disabled", keeping
|
|
91
|
+
* old configs and old daemons behaving exactly as before.
|
|
92
|
+
*/
|
|
93
|
+
export declare const ConnectorConfigSchema: z.ZodObject<{
|
|
94
|
+
id: z.ZodString;
|
|
95
|
+
label: z.ZodOptional<z.ZodString>;
|
|
96
|
+
server: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
97
|
+
type: z.ZodLiteral<"stdio">;
|
|
98
|
+
command: z.ZodString;
|
|
99
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
100
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
101
|
+
alwaysLoad: z.ZodOptional<z.ZodBoolean>;
|
|
102
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
103
|
+
type: z.ZodLiteral<"http">;
|
|
104
|
+
url: z.ZodString;
|
|
105
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
106
|
+
alwaysLoad: z.ZodOptional<z.ZodBoolean>;
|
|
107
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
108
|
+
type: z.ZodLiteral<"sse">;
|
|
109
|
+
url: z.ZodString;
|
|
110
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
111
|
+
alwaysLoad: z.ZodOptional<z.ZodBoolean>;
|
|
112
|
+
}, z.core.$strip>], "type">;
|
|
113
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
114
|
+
disabledTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
115
|
+
workspaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
116
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
117
|
+
}, z.core.$strip>>>;
|
|
118
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
/**
|
|
121
|
+
* The daemon-wide connector registry, persisted at daemon.connectors in
|
|
122
|
+
* $OTTO_HOME/config.json. Host-owned like every other secret-bearing capability.
|
|
123
|
+
*/
|
|
124
|
+
export declare const ConnectorsConfigSchema: z.ZodObject<{
|
|
125
|
+
connectors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
126
|
+
id: z.ZodString;
|
|
127
|
+
label: z.ZodOptional<z.ZodString>;
|
|
128
|
+
server: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
129
|
+
type: z.ZodLiteral<"stdio">;
|
|
130
|
+
command: z.ZodString;
|
|
131
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
132
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
133
|
+
alwaysLoad: z.ZodOptional<z.ZodBoolean>;
|
|
134
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
135
|
+
type: z.ZodLiteral<"http">;
|
|
136
|
+
url: z.ZodString;
|
|
137
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
138
|
+
alwaysLoad: z.ZodOptional<z.ZodBoolean>;
|
|
139
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
140
|
+
type: z.ZodLiteral<"sse">;
|
|
141
|
+
url: z.ZodString;
|
|
142
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
143
|
+
alwaysLoad: z.ZodOptional<z.ZodBoolean>;
|
|
144
|
+
}, z.core.$strip>], "type">;
|
|
145
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
146
|
+
disabledTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
147
|
+
workspaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
148
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
149
|
+
}, z.core.$strip>>>;
|
|
150
|
+
order: z.ZodOptional<z.ZodNumber>;
|
|
151
|
+
}, z.core.$strip>>>;
|
|
152
|
+
}, z.core.$strip>;
|
|
75
153
|
/**
|
|
76
154
|
* How natively-hosted providers (openai-compat) gate MCP tool calls in
|
|
77
155
|
* acceptEdits mode. "always-ask" (the default) prompts for every MCP tool;
|
|
@@ -270,6 +348,9 @@ export declare const AgentProviderRuntimeSettingsMapSchema: z.ZodRecord<z.ZodStr
|
|
|
270
348
|
disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
271
349
|
}, z.core.$strip>>;
|
|
272
350
|
export type McpServerConfig = z.infer<typeof McpServerConfigSchema>;
|
|
351
|
+
export type ConnectorWorkspaceState = z.infer<typeof ConnectorWorkspaceStateSchema>;
|
|
352
|
+
export type ConnectorConfig = z.infer<typeof ConnectorConfigSchema>;
|
|
353
|
+
export type ConnectorsConfig = z.infer<typeof ConnectorsConfigSchema>;
|
|
273
354
|
export type McpToolPermissionMode = (typeof MCP_TOOL_PERMISSION_MODES)[number];
|
|
274
355
|
export type ProviderCommand = z.infer<typeof ProviderCommandSchema>;
|
|
275
356
|
export type ProviderRuntimeSettings = z.infer<typeof ProviderRuntimeSettingsSchema>;
|
package/dist/provider-config.js
CHANGED
|
@@ -106,6 +106,48 @@ export const McpServerConfigSchema = z.discriminatedUnion("type", [
|
|
|
106
106
|
McpHttpServerConfigSchema,
|
|
107
107
|
McpSseServerConfigSchema,
|
|
108
108
|
]);
|
|
109
|
+
/**
|
|
110
|
+
* Per-workspace state for a connector, keyed by workspace cwd in
|
|
111
|
+
* ConnectorConfig.workspaces. Phase 1 leaves this inert (the daemon does not
|
|
112
|
+
* yet read it); it exists in the schema now so per-workspace scope can land
|
|
113
|
+
* later without a config migration.
|
|
114
|
+
*/
|
|
115
|
+
export const ConnectorWorkspaceStateSchema = z.object({
|
|
116
|
+
/** false = this connector is switched off for this workspace. Absent = enabled. */
|
|
117
|
+
enabled: z.boolean().optional(),
|
|
118
|
+
});
|
|
119
|
+
/**
|
|
120
|
+
* A Connector is an MCP server surfaced to users as a first-class, named,
|
|
121
|
+
* enable/disable-able integration. Mechanism is plain MCP (it embeds a
|
|
122
|
+
* McpServerConfig transport descriptor unchanged); what makes it a "connector"
|
|
123
|
+
* is the lifecycle state layered on top: a global on/off, an individually
|
|
124
|
+
* disabled-tools list, and (later) per-workspace activation. Every state field
|
|
125
|
+
* is optional so an absent value reads as "enabled / nothing disabled", keeping
|
|
126
|
+
* old configs and old daemons behaving exactly as before.
|
|
127
|
+
*/
|
|
128
|
+
export const ConnectorConfigSchema = z.object({
|
|
129
|
+
/** Stable key; doubles as the MCP server name used by the tool namespacer. */
|
|
130
|
+
id: z.string().min(1),
|
|
131
|
+
/** Human-facing name shown in the Connectors UI. Falls back to id when absent. */
|
|
132
|
+
label: z.string().optional(),
|
|
133
|
+
/** The MCP transport this connector connects over. */
|
|
134
|
+
server: McpServerConfigSchema,
|
|
135
|
+
/** Global on/off. Absent = enabled. false = never connected, no tools exposed. */
|
|
136
|
+
enabled: z.boolean().optional(),
|
|
137
|
+
/** Tool names (unqualified, as the server reports them) withheld from the model. */
|
|
138
|
+
disabledTools: z.array(z.string()).optional(),
|
|
139
|
+
/** Per-workspace activation keyed by workspace cwd. Phase 2; inert today. */
|
|
140
|
+
workspaces: z.record(z.string(), ConnectorWorkspaceStateSchema).optional(),
|
|
141
|
+
/** Display ordering in the UI; lower sorts first. */
|
|
142
|
+
order: z.number().optional(),
|
|
143
|
+
});
|
|
144
|
+
/**
|
|
145
|
+
* The daemon-wide connector registry, persisted at daemon.connectors in
|
|
146
|
+
* $OTTO_HOME/config.json. Host-owned like every other secret-bearing capability.
|
|
147
|
+
*/
|
|
148
|
+
export const ConnectorsConfigSchema = z.object({
|
|
149
|
+
connectors: z.array(ConnectorConfigSchema).optional(),
|
|
150
|
+
});
|
|
109
151
|
/**
|
|
110
152
|
* How natively-hosted providers (openai-compat) gate MCP tool calls in
|
|
111
153
|
* acceptEdits mode. "always-ask" (the default) prompts for every MCP tool;
|