@otto-code/protocol 0.7.6 → 0.8.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/dist/agent-attention-notification.js +1 -1
- package/dist/agent-labels.js +4 -4
- package/dist/agent-personalities.d.ts +2 -2
- package/dist/agent-personalities.js +17 -17
- package/dist/agent-teams.d.ts +4 -4
- package/dist/agent-teams.js +5 -5
- package/dist/agent-types.d.ts +10 -10
- package/dist/agent-types.js +1 -1
- package/dist/artifacts/rpc-schemas.js +4 -4
- package/dist/artifacts/types.js +3 -3
- package/dist/browser-automation/rpc-schemas.js +1 -1
- package/dist/daemon-endpoints.d.ts +1 -1
- package/dist/default-personalities.js +11 -11
- package/dist/effort.d.ts +1 -1
- package/dist/effort.js +2 -2
- package/dist/forge-manifest.d.ts +3 -3
- package/dist/generated/validation/ws-outbound.aot.js +25211 -20528
- package/dist/git-hosting.js +3 -3
- package/dist/git-remote.js +1 -1
- package/dist/judge-verdict.d.ts +1 -1
- package/dist/judge-verdict.js +2 -2
- package/dist/messages.d.ts +2698 -63
- package/dist/messages.js +630 -175
- package/dist/model-tiers.d.ts +3 -3
- package/dist/model-tiers.js +4 -4
- package/dist/observed-subagent-title.d.ts +2 -2
- package/dist/observed-subagent-title.js +4 -4
- package/dist/orchestration.d.ts +3 -3
- package/dist/orchestration.js +32 -32
- package/dist/otto-config-schema.js +1 -1
- package/dist/provider-config.d.ts +92 -3
- package/dist/provider-config.js +58 -6
- package/dist/provider-manifest.d.ts +9 -1
- package/dist/provider-manifest.js +22 -2
- package/dist/schedule/rpc-schemas.d.ts +4 -4
- package/dist/schedule/rpc-schemas.js +1 -1
- package/dist/schedule/types.d.ts +1 -1
- package/dist/schedule/types.js +3 -3
- package/dist/tool-call-display.d.ts +1 -1
- package/dist/tool-call-display.js +3 -3
- package/dist/tool-name-normalization.d.ts +2 -2
- package/dist/tool-name-normalization.js +2 -2
- package/dist/validation/ws-outbound-schema-metadata.d.ts +526 -8
- package/dist/widgets/bridge.d.ts +5 -5
- package/dist/widgets/bridge.js +5 -5
- package/dist/widgets/document.d.ts +1 -1
- package/dist/widgets/document.js +4 -4
- package/dist/widgets/icons.d.ts +1 -1
- package/dist/widgets/icons.js +1 -1
- package/dist/widgets/theme.d.ts +2 -2
- package/dist/widgets/theme.js +2 -2
- package/dist/widgets/types.d.ts +5 -5
- package/dist/widgets/types.js +5 -5
- package/package.json +1 -1
|
@@ -25,6 +25,14 @@ export interface AgentProviderDefinition {
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
export declare const OMP_MODES: AgentProviderModeDefinition[];
|
|
28
|
+
/**
|
|
29
|
+
* The daemon's built-in local AI host (see the definition below). Exported so
|
|
30
|
+
* other protocol/server/client code can recognize this id without repeating
|
|
31
|
+
* the string literal - notably ProviderOverridesSchema's builtin-provider
|
|
32
|
+
* check in provider-config.ts, which otherwise requires `extends`/`label` on
|
|
33
|
+
* any `providers.otto-brain` config entry.
|
|
34
|
+
*/
|
|
35
|
+
export declare const OTTO_BRAIN_PROVIDER_ID = "otto-brain";
|
|
28
36
|
export declare const AGENT_PROVIDER_DEFINITIONS: AgentProviderDefinition[];
|
|
29
37
|
export declare const DEV_AGENT_PROVIDER_DEFINITIONS: AgentProviderDefinition[];
|
|
30
38
|
export declare function getAgentProviderDefinition(provider: string, definitions?: AgentProviderDefinition[]): AgentProviderDefinition;
|
|
@@ -35,7 +43,7 @@ export declare function isValidAgentProvider(value: string, validIds?: Iterable<
|
|
|
35
43
|
export declare function getUnattendedModeId(provider: string, definitions?: AgentProviderDefinition[]): string | undefined;
|
|
36
44
|
/**
|
|
37
45
|
* Whether a user may pick this mode themselves. False only for modes explicitly
|
|
38
|
-
* flagged `userSelectable: false` in the static manifest (Claude "dontAsk")
|
|
46
|
+
* flagged `userSelectable: false` in the static manifest (Claude "dontAsk") - a
|
|
39
47
|
* system-assigned mode that agents can run in but no one selects by hand. Unknown
|
|
40
48
|
* modes (dynamic/ACP, custom providers) default to selectable. The flag is a
|
|
41
49
|
* static property of the mode, so this always consults the built-in manifest
|
|
@@ -43,7 +43,7 @@ const CLAUDE_MODES = [
|
|
|
43
43
|
colorTier: "moderate",
|
|
44
44
|
isUnattended: true,
|
|
45
45
|
// System-assigned only: the coercion target for unattended runs and for Auto
|
|
46
|
-
// on models that can't run it (Haiku). Users never pick it
|
|
46
|
+
// on models that can't run it (Haiku). Users never pick it - it's hidden from
|
|
47
47
|
// mode dropdowns and locks the control when it's an agent's active mode.
|
|
48
48
|
userSelectable: false,
|
|
49
49
|
},
|
|
@@ -175,6 +175,14 @@ export const OMP_MODES = [
|
|
|
175
175
|
colorTier: "safe",
|
|
176
176
|
},
|
|
177
177
|
];
|
|
178
|
+
/**
|
|
179
|
+
* The daemon's built-in local AI host (see the definition below). Exported so
|
|
180
|
+
* other protocol/server/client code can recognize this id without repeating
|
|
181
|
+
* the string literal - notably ProviderOverridesSchema's builtin-provider
|
|
182
|
+
* check in provider-config.ts, which otherwise requires `extends`/`label` on
|
|
183
|
+
* any `providers.otto-brain` config entry.
|
|
184
|
+
*/
|
|
185
|
+
export const OTTO_BRAIN_PROVIDER_ID = "otto-brain";
|
|
178
186
|
export const AGENT_PROVIDER_DEFINITIONS = [
|
|
179
187
|
{
|
|
180
188
|
id: "claude",
|
|
@@ -233,6 +241,18 @@ export const AGENT_PROVIDER_DEFINITIONS = [
|
|
|
233
241
|
defaultModeId: "ask",
|
|
234
242
|
modes: OMP_MODES,
|
|
235
243
|
},
|
|
244
|
+
{
|
|
245
|
+
// The daemon's own local AI host. Built in rather than a catalog-installed
|
|
246
|
+
// OpenAI-compatible profile: its endpoint and credential come from the
|
|
247
|
+
// brain settings (Settings -> Host -> Otto Brain), never from per-provider
|
|
248
|
+
// URL/API-key fields. Modes are empty here for the same reason every
|
|
249
|
+
// openai-compat provider's are: the client reports them at catalog time.
|
|
250
|
+
id: OTTO_BRAIN_PROVIDER_ID,
|
|
251
|
+
label: "Otto Brain",
|
|
252
|
+
description: "Otto's built-in local AI host. Serves your local models over an OpenAI-compatible endpoint, no external server required.",
|
|
253
|
+
defaultModeId: "default",
|
|
254
|
+
modes: [],
|
|
255
|
+
},
|
|
236
256
|
];
|
|
237
257
|
export const DEV_AGENT_PROVIDER_DEFINITIONS = [
|
|
238
258
|
{
|
|
@@ -275,7 +295,7 @@ export function getUnattendedModeId(provider, definitions = [
|
|
|
275
295
|
}
|
|
276
296
|
/**
|
|
277
297
|
* Whether a user may pick this mode themselves. False only for modes explicitly
|
|
278
|
-
* flagged `userSelectable: false` in the static manifest (Claude "dontAsk")
|
|
298
|
+
* flagged `userSelectable: false` in the static manifest (Claude "dontAsk") - a
|
|
279
299
|
* system-assigned mode that agents can run in but no one selects by hand. Unknown
|
|
280
300
|
* modes (dynamic/ACP, custom providers) default to selectable. The flag is a
|
|
281
301
|
* static property of the mode, so this always consults the built-in manifest
|
|
@@ -129,6 +129,7 @@ export declare const ScheduleCreateResponseSchema: z.ZodObject<{
|
|
|
129
129
|
}>;
|
|
130
130
|
createdAt: z.ZodString;
|
|
131
131
|
updatedAt: z.ZodString;
|
|
132
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
132
133
|
cadence: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
133
134
|
type: z.ZodLiteral<"every">;
|
|
134
135
|
everyMs: z.ZodNumber;
|
|
@@ -179,7 +180,6 @@ export declare const ScheduleCreateResponseSchema: z.ZodObject<{
|
|
|
179
180
|
lastRunProvider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
180
181
|
lastRunModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
181
182
|
pausedAt: z.ZodNullable<z.ZodString>;
|
|
182
|
-
expiresAt: z.ZodNullable<z.ZodString>;
|
|
183
183
|
maxRuns: z.ZodNullable<z.ZodNumber>;
|
|
184
184
|
}, z.core.$strip>>;
|
|
185
185
|
error: z.ZodNullable<z.ZodString>;
|
|
@@ -200,6 +200,7 @@ export declare const ScheduleListResponseSchema: z.ZodObject<{
|
|
|
200
200
|
}>;
|
|
201
201
|
createdAt: z.ZodString;
|
|
202
202
|
updatedAt: z.ZodString;
|
|
203
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
203
204
|
cadence: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
204
205
|
type: z.ZodLiteral<"every">;
|
|
205
206
|
everyMs: z.ZodNumber;
|
|
@@ -250,7 +251,6 @@ export declare const ScheduleListResponseSchema: z.ZodObject<{
|
|
|
250
251
|
lastRunProvider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
251
252
|
lastRunModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
252
253
|
pausedAt: z.ZodNullable<z.ZodString>;
|
|
253
|
-
expiresAt: z.ZodNullable<z.ZodString>;
|
|
254
254
|
maxRuns: z.ZodNullable<z.ZodNumber>;
|
|
255
255
|
}, z.core.$strip>>;
|
|
256
256
|
error: z.ZodNullable<z.ZodString>;
|
|
@@ -385,6 +385,7 @@ export declare const SchedulePauseResponseSchema: z.ZodObject<{
|
|
|
385
385
|
}>;
|
|
386
386
|
createdAt: z.ZodString;
|
|
387
387
|
updatedAt: z.ZodString;
|
|
388
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
388
389
|
cadence: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
389
390
|
type: z.ZodLiteral<"every">;
|
|
390
391
|
everyMs: z.ZodNumber;
|
|
@@ -435,7 +436,6 @@ export declare const SchedulePauseResponseSchema: z.ZodObject<{
|
|
|
435
436
|
lastRunProvider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
436
437
|
lastRunModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
437
438
|
pausedAt: z.ZodNullable<z.ZodString>;
|
|
438
|
-
expiresAt: z.ZodNullable<z.ZodString>;
|
|
439
439
|
maxRuns: z.ZodNullable<z.ZodNumber>;
|
|
440
440
|
}, z.core.$strip>>;
|
|
441
441
|
error: z.ZodNullable<z.ZodString>;
|
|
@@ -456,6 +456,7 @@ export declare const ScheduleResumeResponseSchema: z.ZodObject<{
|
|
|
456
456
|
}>;
|
|
457
457
|
createdAt: z.ZodString;
|
|
458
458
|
updatedAt: z.ZodString;
|
|
459
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
459
460
|
cadence: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
460
461
|
type: z.ZodLiteral<"every">;
|
|
461
462
|
everyMs: z.ZodNumber;
|
|
@@ -506,7 +507,6 @@ export declare const ScheduleResumeResponseSchema: z.ZodObject<{
|
|
|
506
507
|
lastRunProvider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
507
508
|
lastRunModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
508
509
|
pausedAt: z.ZodNullable<z.ZodString>;
|
|
509
|
-
expiresAt: z.ZodNullable<z.ZodString>;
|
|
510
510
|
maxRuns: z.ZodNullable<z.ZodNumber>;
|
|
511
511
|
}, z.core.$strip>>;
|
|
512
512
|
error: z.ZodNullable<z.ZodString>;
|
|
@@ -62,7 +62,7 @@ export const ScheduleRunOnceRequestSchema = z.object({
|
|
|
62
62
|
});
|
|
63
63
|
const ScheduleUpdateNewAgentConfigSchema = z.object({
|
|
64
64
|
provider: z.string().trim().min(1).optional(),
|
|
65
|
-
// Personality binding by name
|
|
65
|
+
// Personality binding by name - or the "@team-scheduler" sentinel. Explicit
|
|
66
66
|
// null clears a stored binding; omission leaves it untouched.
|
|
67
67
|
personality: z.string().trim().min(1).nullable().optional(),
|
|
68
68
|
model: z.string().trim().min(1).nullable().optional(),
|
package/dist/schedule/types.d.ts
CHANGED
|
@@ -159,6 +159,7 @@ export declare const ScheduleSummarySchema: z.ZodObject<{
|
|
|
159
159
|
}>;
|
|
160
160
|
createdAt: z.ZodString;
|
|
161
161
|
updatedAt: z.ZodString;
|
|
162
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
162
163
|
cadence: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
163
164
|
type: z.ZodLiteral<"every">;
|
|
164
165
|
everyMs: z.ZodNumber;
|
|
@@ -209,7 +210,6 @@ export declare const ScheduleSummarySchema: z.ZodObject<{
|
|
|
209
210
|
lastRunProvider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
210
211
|
lastRunModel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
211
212
|
pausedAt: z.ZodNullable<z.ZodString>;
|
|
212
|
-
expiresAt: z.ZodNullable<z.ZodString>;
|
|
213
213
|
maxRuns: z.ZodNullable<z.ZodNumber>;
|
|
214
214
|
}, z.core.$strip>;
|
|
215
215
|
export type ScheduleSummary = z.infer<typeof ScheduleSummarySchema>;
|
package/dist/schedule/types.js
CHANGED
|
@@ -24,7 +24,7 @@ export const ScheduleTargetSchema = z.discriminatedUnion("type", [
|
|
|
24
24
|
cwd: z.string().trim().min(1),
|
|
25
25
|
// Optional Agent Personality binding (by name). When set, each run
|
|
26
26
|
// re-resolves the personality against the run cwd and hard-fails if it is
|
|
27
|
-
// unavailable
|
|
27
|
+
// unavailable - so schedule runs pick up personality edits between runs.
|
|
28
28
|
personality: z.string().trim().min(1).optional(),
|
|
29
29
|
modeId: z.string().trim().min(1).optional(),
|
|
30
30
|
model: z.string().trim().min(1).optional(),
|
|
@@ -57,7 +57,7 @@ export const ScheduleRunSchema = z.object({
|
|
|
57
57
|
status: z.enum(["running", "succeeded", "failed"]),
|
|
58
58
|
agentId: z.guid().nullable(),
|
|
59
59
|
workspaceId: z.string().nullable().optional(),
|
|
60
|
-
// Who actually executed this run
|
|
60
|
+
// Who actually executed this run - the resolved personality (if any),
|
|
61
61
|
// provider, and model. Stamped when the run starts (so a failed run still
|
|
62
62
|
// records its executor). Optional for back-compat: runs written before these
|
|
63
63
|
// fields existed omit them.
|
|
@@ -80,7 +80,7 @@ export const StoredScheduleSchema = z.object({
|
|
|
80
80
|
lastRunAt: z.string().nullable(),
|
|
81
81
|
lastRunStatus: z.enum(["succeeded", "failed"]).nullable().optional(),
|
|
82
82
|
lastRunError: z.string().nullable().optional(),
|
|
83
|
-
// Executor of the most recent run
|
|
83
|
+
// Executor of the most recent run - mirrors the run-level fields above so the
|
|
84
84
|
// schedule card can show "who ran it last" (personality · provider · model)
|
|
85
85
|
// without loading the full run history (ScheduleSummary omits `runs`).
|
|
86
86
|
// Optional for back-compat: schedules that never ran, or predate these
|
|
@@ -12,7 +12,7 @@ export interface ToolCallDisplayModel {
|
|
|
12
12
|
* shows a tool/action name without a full timeline item to run through
|
|
13
13
|
* {@link buildToolCallDisplayModel} (the visualizer's action labels, sub-agent
|
|
14
14
|
* activity rows). Strips the MCP/Otto namespace, consults the known-tool
|
|
15
|
-
* registry, then title-cases as a fallback
|
|
15
|
+
* registry, then title-cases as a fallback - so "mcp__otto__spawn_task",
|
|
16
16
|
* "otto.spawn_task", and a bare "spawn_task" all render as "Spawn Task".
|
|
17
17
|
*/
|
|
18
18
|
export declare function getToolDisplayName(name: string): string;
|
|
@@ -6,7 +6,7 @@ function isRecord(value) {
|
|
|
6
6
|
function readString(value) {
|
|
7
7
|
return typeof value === "string" && value.length > 0 ? value : undefined;
|
|
8
8
|
}
|
|
9
|
-
// Curated display names
|
|
9
|
+
// Curated display names - the registry of tools we explicitly "know about".
|
|
10
10
|
// Keyed by the lowercased leaf name (transport namespace already stripped).
|
|
11
11
|
//
|
|
12
12
|
// Only tools whose bare id does NOT title-case cleanly on its own need an entry
|
|
@@ -15,7 +15,7 @@ function readString(value) {
|
|
|
15
15
|
// camelCase ("WebSearch") names are handled by the algorithmic humanizer below
|
|
16
16
|
// and do NOT need listing.
|
|
17
17
|
//
|
|
18
|
-
// Anything not here falls through to the humanizer and still renders readably
|
|
18
|
+
// Anything not here falls through to the humanizer and still renders readably -
|
|
19
19
|
// so an unmapped tool shows up looking slightly generic (e.g. a stray provider
|
|
20
20
|
// tool), which is the cue to add it here. Extend this map to teach Otto a tool.
|
|
21
21
|
const KNOWN_TOOL_DISPLAY_NAMES = {
|
|
@@ -66,7 +66,7 @@ function humanizeToolName(name) {
|
|
|
66
66
|
* shows a tool/action name without a full timeline item to run through
|
|
67
67
|
* {@link buildToolCallDisplayModel} (the visualizer's action labels, sub-agent
|
|
68
68
|
* activity rows). Strips the MCP/Otto namespace, consults the known-tool
|
|
69
|
-
* registry, then title-cases as a fallback
|
|
69
|
+
* registry, then title-cases as a fallback - so "mcp__otto__spawn_task",
|
|
70
70
|
* "otto.spawn_task", and a bare "spawn_task" all render as "Spawn Task".
|
|
71
71
|
*/
|
|
72
72
|
export function getToolDisplayName(name) {
|
|
@@ -10,13 +10,13 @@ export declare function getOttoToolLeafName(name: string): string | null;
|
|
|
10
10
|
*
|
|
11
11
|
* Tools hosted over MCP arrive namespaced as `mcp__<server>__<tool>` (Claude
|
|
12
12
|
* Code format). The `mcp__<server>__` part is transport plumbing that means
|
|
13
|
-
* nothing to a reader
|
|
13
|
+
* nothing to a reader - "Create Issue", not "mcp__linear__create_issue". This
|
|
14
14
|
* generalizes {@link getOttoToolLeafName} to ANY server so every MCP tool reads
|
|
15
15
|
* cleanly, not just Otto's own.
|
|
16
16
|
*
|
|
17
17
|
* Returns `null` when the name carries no `mcp__…__` namespace, so callers keep
|
|
18
18
|
* plain tool names (`Read`, `bash`) and dotted/other forms untouched. Case is
|
|
19
|
-
* preserved
|
|
19
|
+
* preserved - MCP tool ids are already snake_case and callers humanize after.
|
|
20
20
|
* `speak` is never treated as namespaced (it renders as a chat bubble, not an
|
|
21
21
|
* action row).
|
|
22
22
|
*/
|
|
@@ -74,13 +74,13 @@ export function getOttoToolLeafName(name) {
|
|
|
74
74
|
*
|
|
75
75
|
* Tools hosted over MCP arrive namespaced as `mcp__<server>__<tool>` (Claude
|
|
76
76
|
* Code format). The `mcp__<server>__` part is transport plumbing that means
|
|
77
|
-
* nothing to a reader
|
|
77
|
+
* nothing to a reader - "Create Issue", not "mcp__linear__create_issue". This
|
|
78
78
|
* generalizes {@link getOttoToolLeafName} to ANY server so every MCP tool reads
|
|
79
79
|
* cleanly, not just Otto's own.
|
|
80
80
|
*
|
|
81
81
|
* Returns `null` when the name carries no `mcp__…__` namespace, so callers keep
|
|
82
82
|
* plain tool names (`Read`, `bash`) and dotted/other forms untouched. Case is
|
|
83
|
-
* preserved
|
|
83
|
+
* preserved - MCP tool ids are already snake_case and callers humanize after.
|
|
84
84
|
* `speak` is never treated as namespaced (it renders as a chat bubble, not an
|
|
85
85
|
* action row).
|
|
86
86
|
*/
|