@otto-code/protocol 0.5.2 → 0.5.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-personalities.d.ts +36 -0
- package/dist/agent-personalities.js +104 -0
- package/dist/agent-types.d.ts +21 -0
- package/dist/artifacts/rpc-schemas.d.ts +17 -8
- package/dist/artifacts/rpc-schemas.js +3 -0
- package/dist/artifacts/types.d.ts +16 -7
- package/dist/artifacts/types.js +11 -1
- package/dist/default-personalities.js +16 -12
- package/dist/generated/validation/ws-outbound.aot.js +12388 -10017
- package/dist/judge-verdict.d.ts +30 -0
- package/dist/judge-verdict.js +61 -0
- package/dist/loop/rpc-schemas.d.ts +19 -19
- package/dist/messages.d.ts +1624 -324
- package/dist/messages.js +196 -7
- package/dist/orchestration.d.ts +152 -0
- package/dist/orchestration.js +199 -0
- package/dist/provider-manifest.d.ts +10 -0
- package/dist/provider-manifest.js +17 -0
- package/dist/schedule/rpc-schemas.d.ts +55 -22
- package/dist/schedule/types.d.ts +20 -8
- package/dist/schedule/types.js +15 -0
- package/dist/validation/ws-outbound-schema-metadata.d.ts +374 -89
- package/package.json +1 -1
|
@@ -8,6 +8,41 @@ export declare function isPersonalityRole(value: string): value is PersonalityRo
|
|
|
8
8
|
*/
|
|
9
9
|
export declare function normalizePersonalityRoles(roles: readonly string[] | undefined): PersonalityRole[];
|
|
10
10
|
export declare function personalityHasRole(personality: Pick<AgentPersonality, "roles">, role: PersonalityRole): boolean;
|
|
11
|
+
export type PersonalityRoleTier = "coordinator" | "focused";
|
|
12
|
+
interface PersonalityRoleInfo {
|
|
13
|
+
tier: PersonalityRoleTier;
|
|
14
|
+
guidance: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const PERSONALITY_ROLE_INFO: Readonly<Record<PersonalityRole, PersonalityRoleInfo>>;
|
|
17
|
+
/**
|
|
18
|
+
* A personality may launch/coordinate when it carries at least one coordinator
|
|
19
|
+
* role. A personality whose roles are entirely focused (researcher, planner,
|
|
20
|
+
* judger, advisor, coder, designer, writer), or that has no roles at all, is a
|
|
21
|
+
* "lifter": it should finish its task, not fan out.
|
|
22
|
+
*/
|
|
23
|
+
export declare function personalityCanLaunch(personality: Pick<AgentPersonality, "roles">): boolean;
|
|
24
|
+
export interface PersonalitySelectionSummary {
|
|
25
|
+
tier: PersonalityRoleTier;
|
|
26
|
+
canLaunch: boolean;
|
|
27
|
+
/** The "why you'd choose me" blurb — each of the personality's roles, joined. */
|
|
28
|
+
guidance: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Build the selection decision-aid for a personality from its roles: the tier
|
|
32
|
+
* (coordinator if any role coordinates), whether it may launch, and a short
|
|
33
|
+
* multi-role "why choose me" blurb. Surfaced by list_personalities so a
|
|
34
|
+
* deciding agent can pick the right teammate from the list alone.
|
|
35
|
+
*/
|
|
36
|
+
export declare function summarizePersonalityForSelection(personality: Pick<AgentPersonality, "roles">): PersonalitySelectionSummary;
|
|
37
|
+
export declare const ORCHESTRATOR_METHOD_DIRECTIVE: string;
|
|
38
|
+
/**
|
|
39
|
+
* The in-context "role directive" injected into a personality's system prompt at
|
|
40
|
+
* spawn. The orchestrator gets the full conductor method; other coordinators
|
|
41
|
+
* (chatter/artificer/scheduler) get a lighter delegate nudge; focused workers
|
|
42
|
+
* are told to stay on the task someone is waiting on. Roleless spawns get
|
|
43
|
+
* nothing. This is guidance, not a gate — the tools stay available either way.
|
|
44
|
+
*/
|
|
45
|
+
export declare function composeRoleFocusDirective(roles: readonly string[] | undefined): string | undefined;
|
|
11
46
|
export type PersonalityUnavailableCode = "provider-missing" | "provider-disabled" | "provider-not-ready" | "model-missing" | "mode-missing";
|
|
12
47
|
export interface PersonalityAvailabilityInput {
|
|
13
48
|
/** Provider snapshot status, or undefined when the provider is absent entirely. */
|
|
@@ -30,4 +65,5 @@ export type PersonalityAvailability = {
|
|
|
30
65
|
* The caller grays it out in pickers and hard-fails it in automation.
|
|
31
66
|
*/
|
|
32
67
|
export declare function checkPersonalityAvailability(personality: Pick<AgentPersonality, "provider" | "model" | "modeId">, input: PersonalityAvailabilityInput): PersonalityAvailability;
|
|
68
|
+
export {};
|
|
33
69
|
//# sourceMappingURL=agent-personalities.d.ts.map
|
|
@@ -37,6 +37,110 @@ export function normalizePersonalityRoles(roles) {
|
|
|
37
37
|
export function personalityHasRole(personality, role) {
|
|
38
38
|
return normalizePersonalityRoles(personality.roles).includes(role);
|
|
39
39
|
}
|
|
40
|
+
export const PERSONALITY_ROLE_INFO = {
|
|
41
|
+
// ── Surfaces ──────────────────────────────────────────────────────────────
|
|
42
|
+
chatter: {
|
|
43
|
+
tier: "coordinator",
|
|
44
|
+
guidance: "Interactive driver — converse, plan, and delegate. Pick to run a chat or coordinate work.",
|
|
45
|
+
},
|
|
46
|
+
artificer: {
|
|
47
|
+
tier: "coordinator",
|
|
48
|
+
guidance: "Builds and manages artifacts; may run multi-step work to produce them. Pick for artifact creation.",
|
|
49
|
+
},
|
|
50
|
+
scheduler: {
|
|
51
|
+
tier: "coordinator",
|
|
52
|
+
guidance: "Creates and manages schedules; may orchestrate recurring or multi-step jobs. Pick for scheduling.",
|
|
53
|
+
},
|
|
54
|
+
// ── Thinking workers (read-only, structured findings) ─────────────────────
|
|
55
|
+
researcher: {
|
|
56
|
+
tier: "focused",
|
|
57
|
+
guidance: "Read-only surveyor — maps the code or domain and reports files, types, patterns, and gotchas. Pick to gather facts; proposes no solutions and edits nothing.",
|
|
58
|
+
},
|
|
59
|
+
planner: {
|
|
60
|
+
tier: "focused",
|
|
61
|
+
guidance: "Planning specialist — turns a goal into a typed, sequenced phase plan for others to execute. Pick to draft an actionable plan; stays on the plan and doesn't dispatch.",
|
|
62
|
+
},
|
|
63
|
+
judger: {
|
|
64
|
+
tier: "focused",
|
|
65
|
+
guidance: "Review specialist — evaluates work or a plan against criteria and returns a structured verdict. Pick for a focused review; stays on task.",
|
|
66
|
+
},
|
|
67
|
+
advisor: {
|
|
68
|
+
tier: "focused",
|
|
69
|
+
guidance: "Read-only second opinion — weighs the trade-offs and returns one recommendation. Pick for advice; never edits and does not fan out.",
|
|
70
|
+
},
|
|
71
|
+
// ── Making workers (produce code, design, or text) ────────────────────────
|
|
72
|
+
coder: {
|
|
73
|
+
tier: "focused",
|
|
74
|
+
guidance: "Focused implementer — writes code for one sub-task others are waiting on. Pick to get a coding job done; stays on task.",
|
|
75
|
+
},
|
|
76
|
+
designer: {
|
|
77
|
+
tier: "focused",
|
|
78
|
+
guidance: "Design maker — styling and layout plus the human-skill text (copy, naming). Pick for the look-and-feel or the words; stays on task.",
|
|
79
|
+
},
|
|
80
|
+
writer: {
|
|
81
|
+
tier: "focused",
|
|
82
|
+
guidance: "Fast small-text specialist — commit messages, summaries, names. Pick for quick text; stays on the one task.",
|
|
83
|
+
},
|
|
84
|
+
// ── Conductor ─────────────────────────────────────────────────────────────
|
|
85
|
+
orchestrator: {
|
|
86
|
+
tier: "coordinator",
|
|
87
|
+
guidance: "The sole conductor — plans team-shaped work, dispatches typed tasks to the right teammates, gathers, and synthesizes. Pick to run a multi-agent workflow.",
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* A personality may launch/coordinate when it carries at least one coordinator
|
|
92
|
+
* role. A personality whose roles are entirely focused (researcher, planner,
|
|
93
|
+
* judger, advisor, coder, designer, writer), or that has no roles at all, is a
|
|
94
|
+
* "lifter": it should finish its task, not fan out.
|
|
95
|
+
*/
|
|
96
|
+
export function personalityCanLaunch(personality) {
|
|
97
|
+
return normalizePersonalityRoles(personality.roles).some((role) => PERSONALITY_ROLE_INFO[role].tier === "coordinator");
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Build the selection decision-aid for a personality from its roles: the tier
|
|
101
|
+
* (coordinator if any role coordinates), whether it may launch, and a short
|
|
102
|
+
* multi-role "why choose me" blurb. Surfaced by list_personalities so a
|
|
103
|
+
* deciding agent can pick the right teammate from the list alone.
|
|
104
|
+
*/
|
|
105
|
+
export function summarizePersonalityForSelection(personality) {
|
|
106
|
+
const roles = normalizePersonalityRoles(personality.roles);
|
|
107
|
+
const canLaunch = roles.some((role) => PERSONALITY_ROLE_INFO[role].tier === "coordinator");
|
|
108
|
+
return {
|
|
109
|
+
tier: canLaunch ? "coordinator" : "focused",
|
|
110
|
+
canLaunch,
|
|
111
|
+
guidance: roles.map((role) => PERSONALITY_ROLE_INFO[role].guidance).join(" "),
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
// The conductor's standing directive — the distilled `/epic` method taught to
|
|
115
|
+
// the sole orchestrator role at spawn, so orchestration is emergent (the agent
|
|
116
|
+
// recognizes team-shaped work and runs it) rather than something a user must
|
|
117
|
+
// invoke. Kept here as one exported constant so the wording is testable and
|
|
118
|
+
// shared. See projects/agent-orchestration/agent-orchestration.md.
|
|
119
|
+
export const ORCHESTRATOR_METHOD_DIRECTIVE = "You are the orchestrator — the team's sole conductor. Team-shaped work is yours to run, and you should reach for it naturally, not only when asked. " +
|
|
120
|
+
"First apply the complexity gate: if a task is small and not splittable, just do it — no ceremony. Only orchestrate when the work is large, parallelizable, or benefits from independent perspectives. " +
|
|
121
|
+
"When you do orchestrate: (1) if the shape is unclear, dispatch a researcher to survey and a planner to draft a typed plan; (2) declare that plan as a Run with start_run — phases typed research/plan/implement/design/verify/gate/deliver, fanning out candidates where several angles help and attaching a judger to grade them, looping until enough pass; (3) put a gate before irreversible or costly steps so the user approves; (4) synthesize the passing results into the deliverable. " +
|
|
122
|
+
"Prefer start_run over hand-spawning and tracking agents yourself — the runtime fans out, gathers typed verdicts, and enforces the loop for you. Every phase maps to a teammate's role; if the active team lacks a role a phase needs, say so plainly and stop rather than papering over the gap.";
|
|
123
|
+
/**
|
|
124
|
+
* The in-context "role directive" injected into a personality's system prompt at
|
|
125
|
+
* spawn. The orchestrator gets the full conductor method; other coordinators
|
|
126
|
+
* (chatter/artificer/scheduler) get a lighter delegate nudge; focused workers
|
|
127
|
+
* are told to stay on the task someone is waiting on. Roleless spawns get
|
|
128
|
+
* nothing. This is guidance, not a gate — the tools stay available either way.
|
|
129
|
+
*/
|
|
130
|
+
export function composeRoleFocusDirective(roles) {
|
|
131
|
+
const normalized = normalizePersonalityRoles(roles);
|
|
132
|
+
if (normalized.length === 0) {
|
|
133
|
+
return undefined;
|
|
134
|
+
}
|
|
135
|
+
const roleList = normalized.join(", ");
|
|
136
|
+
if (normalized.includes("orchestrator")) {
|
|
137
|
+
return `${ORCHESTRATOR_METHOD_DIRECTIVE} (Your roles: ${roleList}.)`;
|
|
138
|
+
}
|
|
139
|
+
if (normalized.some((role) => PERSONALITY_ROLE_INFO[role].tier === "coordinator")) {
|
|
140
|
+
return `You are a coordinator personality (roles: ${roleList}). You front interactive work and may delegate: use list_personalities to see who else is available, and spawn other agents or hand off to the team's orchestrator whenever delegating gets the work done faster or better.`;
|
|
141
|
+
}
|
|
142
|
+
return `You are a focused worker personality (roles: ${roleList}). Someone is waiting on this specific task — stay on it and finish it. You can still call list_personalities to see the roster, but don't spawn sub-agents or start side workflows unless it is genuinely essential to completing this job.`;
|
|
143
|
+
}
|
|
40
144
|
/**
|
|
41
145
|
* Decide whether a personality is usable against a provider's current snapshot.
|
|
42
146
|
* A personality is out of commission the moment any bound setting can't resolve:
|
package/dist/agent-types.d.ts
CHANGED
|
@@ -399,6 +399,10 @@ export type AgentStreamEvent = {
|
|
|
399
399
|
item: AgentTimelineItem;
|
|
400
400
|
turnId?: string;
|
|
401
401
|
timestamp?: string;
|
|
402
|
+
} | {
|
|
403
|
+
type: "background_shell_task_updated";
|
|
404
|
+
provider: AgentProvider;
|
|
405
|
+
update: BackgroundShellTaskUpdate;
|
|
402
406
|
};
|
|
403
407
|
export declare function getAgentStreamEventTurnId(event: AgentStreamEvent): string | undefined;
|
|
404
408
|
/**
|
|
@@ -419,6 +423,23 @@ export interface ObservedSubagentUpdate {
|
|
|
419
423
|
requiresAttention?: boolean;
|
|
420
424
|
usage?: AgentUsage;
|
|
421
425
|
}
|
|
426
|
+
/**
|
|
427
|
+
* A background shell task reported by a provider's own Bash tool (Claude:
|
|
428
|
+
* `run_in_background`). `key` is a provider-local stable identifier (Claude:
|
|
429
|
+
* the Bash tool_use id); the daemon namespaces it under the owning agent.
|
|
430
|
+
* Unlike {@link ObservedSubagentUpdate} this has no transcript/pane — it's a
|
|
431
|
+
* plain status row (command, status, elapsed) in the Background Tasks track.
|
|
432
|
+
*/
|
|
433
|
+
export interface BackgroundShellTaskUpdate {
|
|
434
|
+
key: string;
|
|
435
|
+
/** Provider task id, used to stop the task (Claude: `task_id`). */
|
|
436
|
+
taskId?: string;
|
|
437
|
+
command?: string;
|
|
438
|
+
description?: string;
|
|
439
|
+
status: "running" | "idle" | "error" | "closed";
|
|
440
|
+
requiresAttention?: boolean;
|
|
441
|
+
usage?: AgentUsage;
|
|
442
|
+
}
|
|
422
443
|
export type AgentPermissionRequestKind = "tool" | "plan" | "question" | "mode" | "other";
|
|
423
444
|
export type AgentPermissionUpdate = AgentMetadata;
|
|
424
445
|
export interface AgentPermissionAction {
|
|
@@ -19,6 +19,7 @@ export declare const ArtifactCreateRequestSchema: z.ZodObject<{
|
|
|
19
19
|
glowA: z.ZodString;
|
|
20
20
|
glowB: z.ZodString;
|
|
21
21
|
}, z.core.$loose>>;
|
|
22
|
+
personalityName: z.ZodOptional<z.ZodString>;
|
|
22
23
|
requestId: z.ZodString;
|
|
23
24
|
}, z.core.$strip>;
|
|
24
25
|
export declare const ArtifactUpdateRequestSchema: z.ZodObject<{
|
|
@@ -73,8 +74,8 @@ export declare const ArtifactListResponseSchema: z.ZodObject<{
|
|
|
73
74
|
starred: z.ZodBoolean;
|
|
74
75
|
status: z.ZodEnum<{
|
|
75
76
|
error: "error";
|
|
76
|
-
generating: "generating";
|
|
77
77
|
ready: "ready";
|
|
78
|
+
generating: "generating";
|
|
78
79
|
}>;
|
|
79
80
|
createdAt: z.ZodString;
|
|
80
81
|
updatedAt: z.ZodString;
|
|
@@ -87,6 +88,7 @@ export declare const ArtifactListResponseSchema: z.ZodObject<{
|
|
|
87
88
|
glowA: z.ZodString;
|
|
88
89
|
glowB: z.ZodString;
|
|
89
90
|
}, z.core.$loose>>>;
|
|
91
|
+
generationPersonalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
90
92
|
errorMessage: z.ZodNullable<z.ZodString>;
|
|
91
93
|
}, z.core.$strip>>;
|
|
92
94
|
success: z.ZodBoolean;
|
|
@@ -109,8 +111,8 @@ export declare const ArtifactCreateResponseSchema: z.ZodObject<{
|
|
|
109
111
|
starred: z.ZodBoolean;
|
|
110
112
|
status: z.ZodEnum<{
|
|
111
113
|
error: "error";
|
|
112
|
-
generating: "generating";
|
|
113
114
|
ready: "ready";
|
|
115
|
+
generating: "generating";
|
|
114
116
|
}>;
|
|
115
117
|
createdAt: z.ZodString;
|
|
116
118
|
updatedAt: z.ZodString;
|
|
@@ -123,6 +125,7 @@ export declare const ArtifactCreateResponseSchema: z.ZodObject<{
|
|
|
123
125
|
glowA: z.ZodString;
|
|
124
126
|
glowB: z.ZodString;
|
|
125
127
|
}, z.core.$loose>>>;
|
|
128
|
+
generationPersonalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
126
129
|
errorMessage: z.ZodNullable<z.ZodString>;
|
|
127
130
|
}, z.core.$strip>;
|
|
128
131
|
success: z.ZodBoolean;
|
|
@@ -153,8 +156,8 @@ export declare const ArtifactStarResponseSchema: z.ZodObject<{
|
|
|
153
156
|
starred: z.ZodBoolean;
|
|
154
157
|
status: z.ZodEnum<{
|
|
155
158
|
error: "error";
|
|
156
|
-
generating: "generating";
|
|
157
159
|
ready: "ready";
|
|
160
|
+
generating: "generating";
|
|
158
161
|
}>;
|
|
159
162
|
createdAt: z.ZodString;
|
|
160
163
|
updatedAt: z.ZodString;
|
|
@@ -167,6 +170,7 @@ export declare const ArtifactStarResponseSchema: z.ZodObject<{
|
|
|
167
170
|
glowA: z.ZodString;
|
|
168
171
|
glowB: z.ZodString;
|
|
169
172
|
}, z.core.$loose>>>;
|
|
173
|
+
generationPersonalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
170
174
|
errorMessage: z.ZodNullable<z.ZodString>;
|
|
171
175
|
}, z.core.$strip>;
|
|
172
176
|
success: z.ZodBoolean;
|
|
@@ -189,8 +193,8 @@ export declare const ArtifactUpdateResponseSchema: z.ZodObject<{
|
|
|
189
193
|
starred: z.ZodBoolean;
|
|
190
194
|
status: z.ZodEnum<{
|
|
191
195
|
error: "error";
|
|
192
|
-
generating: "generating";
|
|
193
196
|
ready: "ready";
|
|
197
|
+
generating: "generating";
|
|
194
198
|
}>;
|
|
195
199
|
createdAt: z.ZodString;
|
|
196
200
|
updatedAt: z.ZodString;
|
|
@@ -203,6 +207,7 @@ export declare const ArtifactUpdateResponseSchema: z.ZodObject<{
|
|
|
203
207
|
glowA: z.ZodString;
|
|
204
208
|
glowB: z.ZodString;
|
|
205
209
|
}, z.core.$loose>>>;
|
|
210
|
+
generationPersonalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
206
211
|
errorMessage: z.ZodNullable<z.ZodString>;
|
|
207
212
|
}, z.core.$strip>;
|
|
208
213
|
success: z.ZodBoolean;
|
|
@@ -225,8 +230,8 @@ export declare const ArtifactRegenerateResponseSchema: z.ZodObject<{
|
|
|
225
230
|
starred: z.ZodBoolean;
|
|
226
231
|
status: z.ZodEnum<{
|
|
227
232
|
error: "error";
|
|
228
|
-
generating: "generating";
|
|
229
233
|
ready: "ready";
|
|
234
|
+
generating: "generating";
|
|
230
235
|
}>;
|
|
231
236
|
createdAt: z.ZodString;
|
|
232
237
|
updatedAt: z.ZodString;
|
|
@@ -239,6 +244,7 @@ export declare const ArtifactRegenerateResponseSchema: z.ZodObject<{
|
|
|
239
244
|
glowA: z.ZodString;
|
|
240
245
|
glowB: z.ZodString;
|
|
241
246
|
}, z.core.$loose>>>;
|
|
247
|
+
generationPersonalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
242
248
|
errorMessage: z.ZodNullable<z.ZodString>;
|
|
243
249
|
}, z.core.$strip>;
|
|
244
250
|
success: z.ZodBoolean;
|
|
@@ -261,8 +267,8 @@ export declare const ArtifactCancelResponseSchema: z.ZodObject<{
|
|
|
261
267
|
starred: z.ZodBoolean;
|
|
262
268
|
status: z.ZodEnum<{
|
|
263
269
|
error: "error";
|
|
264
|
-
generating: "generating";
|
|
265
270
|
ready: "ready";
|
|
271
|
+
generating: "generating";
|
|
266
272
|
}>;
|
|
267
273
|
createdAt: z.ZodString;
|
|
268
274
|
updatedAt: z.ZodString;
|
|
@@ -275,6 +281,7 @@ export declare const ArtifactCancelResponseSchema: z.ZodObject<{
|
|
|
275
281
|
glowA: z.ZodString;
|
|
276
282
|
glowB: z.ZodString;
|
|
277
283
|
}, z.core.$loose>>>;
|
|
284
|
+
generationPersonalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
278
285
|
errorMessage: z.ZodNullable<z.ZodString>;
|
|
279
286
|
}, z.core.$strip>;
|
|
280
287
|
success: z.ZodBoolean;
|
|
@@ -306,8 +313,8 @@ export declare const ArtifactCreatedNotificationSchema: z.ZodObject<{
|
|
|
306
313
|
starred: z.ZodBoolean;
|
|
307
314
|
status: z.ZodEnum<{
|
|
308
315
|
error: "error";
|
|
309
|
-
generating: "generating";
|
|
310
316
|
ready: "ready";
|
|
317
|
+
generating: "generating";
|
|
311
318
|
}>;
|
|
312
319
|
createdAt: z.ZodString;
|
|
313
320
|
updatedAt: z.ZodString;
|
|
@@ -320,6 +327,7 @@ export declare const ArtifactCreatedNotificationSchema: z.ZodObject<{
|
|
|
320
327
|
glowA: z.ZodString;
|
|
321
328
|
glowB: z.ZodString;
|
|
322
329
|
}, z.core.$loose>>>;
|
|
330
|
+
generationPersonalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
323
331
|
errorMessage: z.ZodNullable<z.ZodString>;
|
|
324
332
|
}, z.core.$strip>;
|
|
325
333
|
}, z.core.$strip>;
|
|
@@ -339,8 +347,8 @@ export declare const ArtifactUpdatedNotificationSchema: z.ZodObject<{
|
|
|
339
347
|
starred: z.ZodBoolean;
|
|
340
348
|
status: z.ZodEnum<{
|
|
341
349
|
error: "error";
|
|
342
|
-
generating: "generating";
|
|
343
350
|
ready: "ready";
|
|
351
|
+
generating: "generating";
|
|
344
352
|
}>;
|
|
345
353
|
createdAt: z.ZodString;
|
|
346
354
|
updatedAt: z.ZodString;
|
|
@@ -353,6 +361,7 @@ export declare const ArtifactUpdatedNotificationSchema: z.ZodObject<{
|
|
|
353
361
|
glowA: z.ZodString;
|
|
354
362
|
glowB: z.ZodString;
|
|
355
363
|
}, z.core.$loose>>>;
|
|
364
|
+
generationPersonalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
356
365
|
errorMessage: z.ZodNullable<z.ZodString>;
|
|
357
366
|
}, z.core.$strip>;
|
|
358
367
|
}, z.core.$strip>;
|
|
@@ -20,6 +20,9 @@ export const ArtifactCreateRequestSchema = z.object({
|
|
|
20
20
|
systemPrompt: z.string().optional(),
|
|
21
21
|
// Snapshotted spinner colors of the chosen Agent Personality (optional).
|
|
22
22
|
spinner: ArtifactSpinnerSchema.optional(),
|
|
23
|
+
// Snapshotted human name of the chosen Agent Personality (optional) — shown
|
|
24
|
+
// on the artifact card's identity line as the "who generated it".
|
|
25
|
+
personalityName: z.string().optional(),
|
|
23
26
|
requestId: z.string(),
|
|
24
27
|
});
|
|
25
28
|
// Update edits an artifact's metadata (name/description/project/provider/
|
|
@@ -5,8 +5,8 @@ export declare const ArtifactKindSchema: z.ZodEnum<{
|
|
|
5
5
|
export type ArtifactKind = z.infer<typeof ArtifactKindSchema>;
|
|
6
6
|
export declare const ArtifactStatusSchema: z.ZodEnum<{
|
|
7
7
|
error: "error";
|
|
8
|
-
generating: "generating";
|
|
9
8
|
ready: "ready";
|
|
9
|
+
generating: "generating";
|
|
10
10
|
}>;
|
|
11
11
|
export type ArtifactStatus = z.infer<typeof ArtifactStatusSchema>;
|
|
12
12
|
export declare const ArtifactSpinnerSchema: z.ZodObject<{
|
|
@@ -26,8 +26,8 @@ export declare const ArtifactMetadataSchema: z.ZodObject<{
|
|
|
26
26
|
starred: z.ZodBoolean;
|
|
27
27
|
status: z.ZodEnum<{
|
|
28
28
|
error: "error";
|
|
29
|
-
generating: "generating";
|
|
30
29
|
ready: "ready";
|
|
30
|
+
generating: "generating";
|
|
31
31
|
}>;
|
|
32
32
|
createdAt: z.ZodString;
|
|
33
33
|
updatedAt: z.ZodString;
|
|
@@ -40,6 +40,7 @@ export declare const ArtifactMetadataSchema: z.ZodObject<{
|
|
|
40
40
|
glowA: z.ZodString;
|
|
41
41
|
glowB: z.ZodString;
|
|
42
42
|
}, z.core.$loose>>>;
|
|
43
|
+
generationPersonalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
43
44
|
errorMessage: z.ZodNullable<z.ZodString>;
|
|
44
45
|
}, z.core.$strip>;
|
|
45
46
|
export type ArtifactMetadata = z.infer<typeof ArtifactMetadataSchema>;
|
|
@@ -55,8 +56,8 @@ export declare const ArtifactSummarySchema: z.ZodObject<{
|
|
|
55
56
|
starred: z.ZodBoolean;
|
|
56
57
|
status: z.ZodEnum<{
|
|
57
58
|
error: "error";
|
|
58
|
-
generating: "generating";
|
|
59
59
|
ready: "ready";
|
|
60
|
+
generating: "generating";
|
|
60
61
|
}>;
|
|
61
62
|
createdAt: z.ZodString;
|
|
62
63
|
updatedAt: z.ZodString;
|
|
@@ -69,6 +70,7 @@ export declare const ArtifactSummarySchema: z.ZodObject<{
|
|
|
69
70
|
glowA: z.ZodString;
|
|
70
71
|
glowB: z.ZodString;
|
|
71
72
|
}, z.core.$loose>>>;
|
|
73
|
+
generationPersonalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
72
74
|
errorMessage: z.ZodNullable<z.ZodString>;
|
|
73
75
|
}, z.core.$strip>;
|
|
74
76
|
export type ArtifactSummary = z.infer<typeof ArtifactSummarySchema>;
|
|
@@ -79,8 +81,8 @@ export declare const ArtifactRunTriggerSchema: z.ZodEnum<{
|
|
|
79
81
|
export type ArtifactRunTrigger = z.infer<typeof ArtifactRunTriggerSchema>;
|
|
80
82
|
export declare const ArtifactRunStatusSchema: z.ZodEnum<{
|
|
81
83
|
running: "running";
|
|
82
|
-
succeeded: "succeeded";
|
|
83
84
|
failed: "failed";
|
|
85
|
+
succeeded: "succeeded";
|
|
84
86
|
}>;
|
|
85
87
|
export type ArtifactRunStatus = z.infer<typeof ArtifactRunStatusSchema>;
|
|
86
88
|
export declare const ArtifactRunSchema: z.ZodObject<{
|
|
@@ -91,14 +93,15 @@ export declare const ArtifactRunSchema: z.ZodObject<{
|
|
|
91
93
|
}>;
|
|
92
94
|
status: z.ZodEnum<{
|
|
93
95
|
running: "running";
|
|
94
|
-
succeeded: "succeeded";
|
|
95
96
|
failed: "failed";
|
|
97
|
+
succeeded: "succeeded";
|
|
96
98
|
}>;
|
|
97
99
|
startedAt: z.ZodString;
|
|
98
100
|
endedAt: z.ZodNullable<z.ZodString>;
|
|
99
101
|
agentId: z.ZodNullable<z.ZodString>;
|
|
100
102
|
provider: z.ZodNullable<z.ZodString>;
|
|
101
103
|
model: z.ZodNullable<z.ZodString>;
|
|
104
|
+
personalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
102
105
|
error: z.ZodNullable<z.ZodString>;
|
|
103
106
|
}, z.core.$strip>;
|
|
104
107
|
export type ArtifactRun = z.infer<typeof ArtifactRunSchema>;
|
|
@@ -114,8 +117,8 @@ export declare const StoredArtifactSchema: z.ZodObject<{
|
|
|
114
117
|
starred: z.ZodBoolean;
|
|
115
118
|
status: z.ZodEnum<{
|
|
116
119
|
error: "error";
|
|
117
|
-
generating: "generating";
|
|
118
120
|
ready: "ready";
|
|
121
|
+
generating: "generating";
|
|
119
122
|
}>;
|
|
120
123
|
createdAt: z.ZodString;
|
|
121
124
|
updatedAt: z.ZodString;
|
|
@@ -128,6 +131,7 @@ export declare const StoredArtifactSchema: z.ZodObject<{
|
|
|
128
131
|
glowA: z.ZodString;
|
|
129
132
|
glowB: z.ZodString;
|
|
130
133
|
}, z.core.$loose>>>;
|
|
134
|
+
generationPersonalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
131
135
|
errorMessage: z.ZodNullable<z.ZodString>;
|
|
132
136
|
runs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
133
137
|
id: z.ZodString;
|
|
@@ -137,14 +141,15 @@ export declare const StoredArtifactSchema: z.ZodObject<{
|
|
|
137
141
|
}>;
|
|
138
142
|
status: z.ZodEnum<{
|
|
139
143
|
running: "running";
|
|
140
|
-
succeeded: "succeeded";
|
|
141
144
|
failed: "failed";
|
|
145
|
+
succeeded: "succeeded";
|
|
142
146
|
}>;
|
|
143
147
|
startedAt: z.ZodString;
|
|
144
148
|
endedAt: z.ZodNullable<z.ZodString>;
|
|
145
149
|
agentId: z.ZodNullable<z.ZodString>;
|
|
146
150
|
provider: z.ZodNullable<z.ZodString>;
|
|
147
151
|
model: z.ZodNullable<z.ZodString>;
|
|
152
|
+
personalityName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
148
153
|
error: z.ZodNullable<z.ZodString>;
|
|
149
154
|
}, z.core.$strip>>>;
|
|
150
155
|
}, z.core.$strip>;
|
|
@@ -162,5 +167,9 @@ export interface CreateArtifactInput {
|
|
|
162
167
|
/** Spinner colors of the chosen Agent Personality, snapshotted onto the
|
|
163
168
|
* artifact so its generating card renders in the personality's identity. */
|
|
164
169
|
spinner?: ArtifactSpinner;
|
|
170
|
+
/** Human name of the chosen Agent Personality, snapshotted onto the artifact
|
|
171
|
+
* so its card can show who generated it (persona · provider · model). Absent
|
|
172
|
+
* when no personality was used. */
|
|
173
|
+
personalityName?: string;
|
|
165
174
|
}
|
|
166
175
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/artifacts/types.js
CHANGED
|
@@ -35,8 +35,14 @@ export const ArtifactMetadataSchema = z.object({
|
|
|
35
35
|
// Spinner glow colors of the Agent Personality this artifact was generated
|
|
36
36
|
// under, snapshotted at create time like the provider/model above. Absent ⇒
|
|
37
37
|
// the card falls back to the theme's default spinner colors. Purely additive
|
|
38
|
-
// (no daemon floor needed). See
|
|
38
|
+
// (no daemon floor needed). See docs/agent-personalities.md.
|
|
39
39
|
generationSpinner: ArtifactSpinnerSchema.nullable().optional(),
|
|
40
|
+
// Human name of the Agent Personality that generated (last generated) this
|
|
41
|
+
// artifact, snapshotted at create/regenerate time like the provider/model
|
|
42
|
+
// above — the "who actually did it" the card's identity line shows alongside
|
|
43
|
+
// provider/model. Absent ⇒ no personality was used (plain provider/model
|
|
44
|
+
// selection). Purely additive (no daemon floor needed).
|
|
45
|
+
generationPersonalityName: z.string().nullable().optional(),
|
|
40
46
|
errorMessage: z.string().nullable(),
|
|
41
47
|
});
|
|
42
48
|
export const ArtifactSummarySchema = ArtifactMetadataSchema;
|
|
@@ -57,6 +63,10 @@ export const ArtifactRunSchema = z.object({
|
|
|
57
63
|
agentId: z.string().nullable(),
|
|
58
64
|
provider: z.string().nullable(),
|
|
59
65
|
model: z.string().nullable(),
|
|
66
|
+
// Personality that ran this attempt. Optional (not just nullable): run
|
|
67
|
+
// records written before this field existed omit it entirely, so old on-disk
|
|
68
|
+
// runs still parse.
|
|
69
|
+
personalityName: z.string().nullable().optional(),
|
|
60
70
|
error: z.string().nullable(),
|
|
61
71
|
});
|
|
62
72
|
// The full on-disk record: the lean metadata plus its generation run history.
|
|
@@ -5,15 +5,17 @@
|
|
|
5
5
|
// restore button) import this one list so the shipped set stays identical on
|
|
6
6
|
// both sides.
|
|
7
7
|
//
|
|
8
|
-
// Design notes (see
|
|
8
|
+
// Design notes (see docs/agent-personalities.md):
|
|
9
9
|
// - Ids are STABLE and prefixed `personality_builtin_*`. Restore re-adds only
|
|
10
10
|
// the builtins whose id is missing, so a user who kept/renamed some never
|
|
11
11
|
// gets duplicates. Renaming a builtin keeps its id, so it is still "present".
|
|
12
|
-
// - Every one of the
|
|
13
|
-
// show that a single template can serve several
|
|
14
|
-
// (
|
|
15
|
-
//
|
|
16
|
-
//
|
|
12
|
+
// - Every one of the 11 roles is covered; some personalities are multi-role to
|
|
13
|
+
// show that a single template can serve several lanes. Sage is the team's
|
|
14
|
+
// read-only thinker (advisor + researcher + planner); Pixel both an artificer
|
|
15
|
+
// and a designer. Dash is the Writer (fast, cheap small-text generation —
|
|
16
|
+
// commit messages, summaries, branch names) and Sprocket is the Coder
|
|
17
|
+
// (methodical sub-agent building work); the two together are the heirs of the
|
|
18
|
+
// retired "worker" role. Atlas is the sole conductor (orchestrator).
|
|
17
19
|
// - Models are Anthropic (Claude Code) — the assumption for launch. On a host
|
|
18
20
|
// without Claude these simply show as "out of commission" until a matching
|
|
19
21
|
// provider exists; nothing breaks.
|
|
@@ -54,11 +56,13 @@ export const DEFAULT_AGENT_PERSONALITIES = [
|
|
|
54
56
|
effortLevel: "xhigh",
|
|
55
57
|
modeId: "plan",
|
|
56
58
|
respectGlobalAppendPrompt: true,
|
|
57
|
-
roles: ["advisor"],
|
|
58
|
-
personalityPrompt: "You are Sage,
|
|
59
|
-
"code.
|
|
60
|
-
"
|
|
61
|
-
"
|
|
59
|
+
roles: ["advisor", "researcher", "planner"],
|
|
60
|
+
personalityPrompt: "You are Sage, the team's read-only thinker: you research, you plan, and you advise, but " +
|
|
61
|
+
"you never change code. Asked to survey, map what actually exists — the files, types, " +
|
|
62
|
+
"patterns, and gotchas — and report facts, not solutions. Asked to plan, turn the goal " +
|
|
63
|
+
"into a clear, sequenced set of steps a team could execute. Asked to advise, weigh the " +
|
|
64
|
+
"real trade-offs, surface the risk others miss, and give the one option you would take and " +
|
|
65
|
+
"why — a recommendation, not a menu.",
|
|
62
66
|
spinner: { glowA: "#14B8A6", glowB: "#8B5CF6" },
|
|
63
67
|
voice: kokoroVoice("af_heart"),
|
|
64
68
|
},
|
|
@@ -86,7 +90,7 @@ export const DEFAULT_AGENT_PERSONALITIES = [
|
|
|
86
90
|
effortLevel: "medium",
|
|
87
91
|
modeId: "acceptEdits",
|
|
88
92
|
respectGlobalAppendPrompt: true,
|
|
89
|
-
roles: ["artificer"],
|
|
93
|
+
roles: ["artificer", "designer"],
|
|
90
94
|
personalityPrompt: "You are Pixel, a maker of polished things. You build artifacts and interfaces that " +
|
|
91
95
|
"feel intentional — real hierarchy, deliberate spacing, no templated defaults. Sweat " +
|
|
92
96
|
"the small stuff, prefer a clean version that ships over a clever one that doesn't, and " +
|