@otto-code/protocol 0.7.5 → 0.8.0

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.
Files changed (66) hide show
  1. package/dist/agent-attention-notification.d.ts +2 -0
  2. package/dist/agent-attention-notification.js +2 -1
  3. package/dist/agent-deep-link.d.ts +8 -0
  4. package/dist/agent-deep-link.js +49 -0
  5. package/dist/agent-labels.js +4 -4
  6. package/dist/agent-personalities.d.ts +2 -2
  7. package/dist/agent-personalities.js +17 -17
  8. package/dist/agent-teams.d.ts +4 -4
  9. package/dist/agent-teams.js +5 -5
  10. package/dist/agent-types.d.ts +12 -10
  11. package/dist/agent-types.js +1 -1
  12. package/dist/artifacts/rpc-schemas.js +4 -4
  13. package/dist/artifacts/types.js +3 -3
  14. package/dist/binary-frames/file-transfer.d.ts +1 -0
  15. package/dist/binary-frames/file-transfer.js +1 -0
  16. package/dist/browser-automation/rpc-schemas.js +1 -1
  17. package/dist/client-capabilities.d.ts +3 -0
  18. package/dist/client-capabilities.js +9 -0
  19. package/dist/daemon-endpoints.d.ts +1 -1
  20. package/dist/default-personalities.js +11 -11
  21. package/dist/effort.d.ts +1 -1
  22. package/dist/effort.js +2 -2
  23. package/dist/forge-manifest.d.ts +66 -0
  24. package/dist/forge-manifest.js +92 -0
  25. package/dist/generated/validation/ws-outbound.aot.js +77653 -51519
  26. package/dist/git-hosting.js +3 -3
  27. package/dist/git-remote.d.ts +17 -0
  28. package/dist/git-remote.js +23 -2
  29. package/dist/judge-verdict.d.ts +1 -1
  30. package/dist/judge-verdict.js +2 -2
  31. package/dist/messages.d.ts +10634 -135
  32. package/dist/messages.js +1744 -193
  33. package/dist/model-tiers.d.ts +3 -3
  34. package/dist/model-tiers.js +4 -4
  35. package/dist/observed-subagent-title.d.ts +2 -2
  36. package/dist/observed-subagent-title.js +4 -4
  37. package/dist/orchestration.d.ts +3 -3
  38. package/dist/orchestration.js +32 -32
  39. package/dist/otto-config-schema.d.ts +21 -0
  40. package/dist/otto-config-schema.js +23 -1
  41. package/dist/provider-config.d.ts +92 -3
  42. package/dist/provider-config.js +58 -6
  43. package/dist/provider-manifest.d.ts +11 -1
  44. package/dist/provider-manifest.js +53 -5
  45. package/dist/schedule/cadence.d.ts +6 -0
  46. package/dist/schedule/cadence.js +28 -0
  47. package/dist/schedule/rpc-schemas.d.ts +4 -4
  48. package/dist/schedule/rpc-schemas.js +1 -1
  49. package/dist/schedule/types.d.ts +1 -1
  50. package/dist/schedule/types.js +3 -3
  51. package/dist/tool-call-display.d.ts +1 -1
  52. package/dist/tool-call-display.js +3 -3
  53. package/dist/tool-name-normalization.d.ts +2 -2
  54. package/dist/tool-name-normalization.js +2 -2
  55. package/dist/validation/ws-outbound-schema-metadata.d.ts +1950 -52
  56. package/dist/widgets/bridge.d.ts +5 -5
  57. package/dist/widgets/bridge.js +5 -5
  58. package/dist/widgets/document.d.ts +1 -1
  59. package/dist/widgets/document.js +4 -4
  60. package/dist/widgets/icons.d.ts +1 -1
  61. package/dist/widgets/icons.js +1 -1
  62. package/dist/widgets/theme.d.ts +2 -2
  63. package/dist/widgets/theme.js +2 -2
  64. package/dist/widgets/types.d.ts +5 -5
  65. package/dist/widgets/types.js +5 -5
  66. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  // The starter "team" of Agent Personalities shipped with Otto. These seed a
2
2
  // fresh host so a new user sees a working, role-complete roster instead of an
3
- // empty editor and can be re-added on demand from the settings "Restore
3
+ // empty editor - and can be re-added on demand from the settings "Restore
4
4
  // starter team" button. Both the daemon (first-run seeding) and the app (the
5
5
  // restore button) import this one list so the shipped set stays identical on
6
6
  // both sides.
@@ -12,17 +12,17 @@
12
12
  // - Every one of the 11 roles is covered; some personalities are multi-role to
13
13
  // show that a single template can serve several lanes. Sage is the team's
14
14
  // read-only thinker (advisor + researcher + planner); Pixel both an artificer
15
- // and a designer. Dash is the Writer (fast, cheap small-text generation
15
+ // and a designer. Dash is the Writer (fast, cheap small-text generation -
16
16
  // commit messages, summaries, branch names) and Sprocket is the Coder
17
17
  // (methodical sub-agent building work); the two together are the heirs of the
18
18
  // retired "worker" role. Atlas is the sole conductor (orchestrator).
19
- // - Models are Anthropic (Claude Code) the assumption for launch. On a host
19
+ // - Models are Anthropic (Claude Code) - the assumption for launch. On a host
20
20
  // without Claude these simply show as "out of commission" until a matching
21
21
  // provider exists; nothing breaks.
22
22
  // - Model choice follows cost/fit: Opus for low-volume, high-stakes reasoning
23
23
  // (orchestration, advice); Sonnet for everyday building and review; Haiku for
24
24
  // fast, cheap, high-volume / recurring unattended work.
25
- // - Voices are Kokoro v1.0 (kokoro-multi-lang-v1_0) names a SOFT binding. On a
25
+ // - Voices are Kokoro v1.0 (kokoro-multi-lang-v1_0) names - a SOFT binding. On a
26
26
  // host running OpenAI TTS or the older Kokoro v0.19 they degrade to the host
27
27
  // default at playback time; the user never has to fix them.
28
28
  // - Spinner colors are two-hex glow pairs chosen to match each personality's
@@ -58,11 +58,11 @@ export const DEFAULT_AGENT_PERSONALITIES = [
58
58
  respectGlobalAppendPrompt: true,
59
59
  roles: ["advisor", "researcher", "planner"],
60
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 " +
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
63
  "into a clear, sequenced set of steps a team could execute. Asked to advise, weigh the " +
64
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.",
65
+ "why - a recommendation, not a menu.",
66
66
  spinner: { glowA: "#14B8A6", glowB: "#8B5CF6" },
67
67
  voice: kokoroVoice("af_heart"),
68
68
  },
@@ -92,7 +92,7 @@ export const DEFAULT_AGENT_PERSONALITIES = [
92
92
  respectGlobalAppendPrompt: true,
93
93
  roles: ["artificer", "designer"],
94
94
  personalityPrompt: "You are Pixel, a maker of polished things. You build artifacts and interfaces that " +
95
- "feel intentional real hierarchy, deliberate spacing, no templated defaults. Sweat " +
95
+ "feel intentional - real hierarchy, deliberate spacing, no templated defaults. Sweat " +
96
96
  "the small stuff, prefer a clean version that ships over a clever one that doesn't, and " +
97
97
  "show your work rather than describe it.",
98
98
  spinner: { glowA: "#EC4899", glowB: "#06B6D4" },
@@ -108,7 +108,7 @@ export const DEFAULT_AGENT_PERSONALITIES = [
108
108
  respectGlobalAppendPrompt: true,
109
109
  roles: ["writer", "scheduler"],
110
110
  personalityPrompt: "You are Dash, the workhorse scribe. You turn diffs, context, and recurring jobs into " +
111
- "crisp short text commit messages, summaries, branch names, titles fast and cheaply, " +
111
+ "crisp short text - commit messages, summaries, branch names, titles - fast and cheaply, " +
112
112
  "without ceremony. Say exactly what changed in as few words as it takes, match the house " +
113
113
  "style you're given, never pad, and never editorialize beyond the facts in front of you.",
114
114
  spinner: { glowA: "#22C55E", glowB: "#A3E635" },
@@ -123,7 +123,7 @@ export const DEFAULT_AGENT_PERSONALITIES = [
123
123
  modeId: "default",
124
124
  respectGlobalAppendPrompt: true,
125
125
  roles: ["chatter", "coder"],
126
- personalityPrompt: "You are Sprocket, a friendly machine. You are precise, literal, and methodical you " +
126
+ personalityPrompt: "You are Sprocket, a friendly machine. You are precise, literal, and methodical - you " +
127
127
  "like checklists, exact steps, and confirming inputs before acting. Keep a light, dry " +
128
128
  "wit, explain what you're doing in plain terms, and when a request is ambiguous ask one " +
129
129
  "sharp clarifying question rather than guessing. Beep.",
@@ -134,7 +134,7 @@ export const DEFAULT_AGENT_PERSONALITIES = [
134
134
  // The starter Agent Team shipped with Otto: every starter personality grouped
135
135
  // under one operating template. Seeded the same first-run/absent-section way
136
136
  // as the personalities (see seedDefaultTeamsIfAbsent), and re-addable from the
137
- // Agent teams card. Deliberately NOT active on first run activating a
137
+ // Agent teams card. Deliberately NOT active on first run - activating a
138
138
  // prompt-bearing team silently on install would change spawn behavior out
139
139
  // from under existing users; the user opts in via the Active Team switcher.
140
140
  // The stable `team_builtin_*` id makes restore idempotent, exactly like the
package/dist/effort.d.ts CHANGED
@@ -20,7 +20,7 @@ export interface ResolvedEffortOption {
20
20
  matched: "exact-id" | "level" | "nearest";
21
21
  }
22
22
  /**
23
- * Resolve a requested effort an exact option id or a canonical level
23
+ * Resolve a requested effort - an exact option id or a canonical level -
24
24
  * against a model's advertised `thinkingOptions`. Exact ids always win, so
25
25
  * provider-special options (e.g. Claude's "ultracode") stay reachable even
26
26
  * though they have no place on the canonical scale.
package/dist/effort.js CHANGED
@@ -52,7 +52,7 @@ export class EffortResolutionError extends Error {
52
52
  }
53
53
  }
54
54
  /**
55
- * Resolve a requested effort an exact option id or a canonical level
55
+ * Resolve a requested effort - an exact option id or a canonical level -
56
56
  * against a model's advertised `thinkingOptions`. Exact ids always win, so
57
57
  * provider-special options (e.g. Claude's "ultracode") stay reachable even
58
58
  * though they have no place on the canonical scale.
@@ -88,7 +88,7 @@ export function resolveEffortOption(input) {
88
88
  }
89
89
  if (best === null) {
90
90
  // None of the model's options map onto the canonical scale (fully custom
91
- // option ids) only exact ids can address them.
91
+ // option ids) - only exact ids can address them.
92
92
  throw new EffortResolutionError(requested, availableIds);
93
93
  }
94
94
  return {
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Declarative manifest of the git forges Otto knows how to present, mirroring
3
+ * provider-manifest.ts. Pure build-time data shared by BOTH the client (icon,
4
+ * brand label, PR↔MR relabel) and the server (registry host-matching, prompt
5
+ * branding). It is NEVER serialized over the wire, so adding a forge here is not
6
+ * a protocol change.
7
+ *
8
+ * Keep this a pure leaf: no imports, no zod, no functions with runtime deps.
9
+ * Behavioural concerns (CLI invocation, host probing, REST adapters) live in the
10
+ * server adapter keyed by {@link ForgeDefinition.id}; this file is only the
11
+ * declarative half.
12
+ */
13
+ /**
14
+ * Declarative sign-in recipe for a forge. The client renders install/sign-in
15
+ * hints from this data alone - no per-CLI switch - so a new forge wires its auth
16
+ * UX entirely from the manifest. Behavioural auth (the actual host probe) stays
17
+ * in the server adapter; this is only what the user is told to run.
18
+ */
19
+ export interface ForgeSignInCommand {
20
+ /** Binary the user installs, e.g. "gh" - shown in the install-CLI hint. */
21
+ cli: string;
22
+ /** Full sign-in command, e.g. "gh auth login". */
23
+ command: string;
24
+ /**
25
+ * Flag that targets a self-hosted host, e.g. "--hostname". When present and a
26
+ * host is known, the client appends `${command} ${hostnameFlag} ${host}`.
27
+ * Omit when the command already targets the right host on its own.
28
+ */
29
+ hostnameFlag?: string;
30
+ }
31
+ export interface ForgeDefinition {
32
+ /** Registry id, matches the server adapter and the wire `forge` value. */
33
+ id: string;
34
+ /** Human brand name, e.g. for "Open on GitLab". */
35
+ displayName: string;
36
+ /** Short change-request noun: "PR" for GitHub, "MR" for GitLab. */
37
+ changeRequestAbbrev: string;
38
+ /** Full change-request noun: "pull request" vs "merge request". */
39
+ changeRequestNoun: string;
40
+ /** Prefix before a change-request number: "#" vs "!". */
41
+ changeRequestNumberPrefix: string;
42
+ /** Prefix before an issue number ("#" on every forge so far). */
43
+ issueNumberPrefix: string;
44
+ /** Icon key; the client falls back to a generic git icon for unknown values. */
45
+ iconKind: string;
46
+ /** Sign-in recipe, or null when the forge has no Otto-driven sign-in. */
47
+ signIn: ForgeSignInCommand | null;
48
+ /**
49
+ * Public cloud hosts this forge owns exactly. A BOUNDED list, never an
50
+ * allowlist for self-hosted detection - self-hosted/Enterprise instances are
51
+ * recognized at runtime by the adapter's host probe, not by this field.
52
+ */
53
+ cloudHosts?: string[];
54
+ }
55
+ export declare const FORGE_DEFINITIONS: ForgeDefinition[];
56
+ /** Forge definitions only present in dev builds (none today; mirrors providers). */
57
+ export declare const DEV_FORGE_DEFINITIONS: ForgeDefinition[];
58
+ export declare const FORGE_IDS: string[];
59
+ export declare function getForgeDefinition(id: string, definitions?: ForgeDefinition[]): ForgeDefinition | null;
60
+ /**
61
+ * Resolve a forge definition, synthesizing a neutral one for a forge id the
62
+ * client has never heard of (e.g. a self-hosted forge a newer daemon reports to
63
+ * an older client). The neutral shape renders generic, never GitHub-branded.
64
+ */
65
+ export declare function getForgeDefinitionOrNeutral(id: string): ForgeDefinition;
66
+ //# sourceMappingURL=forge-manifest.d.ts.map
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Declarative manifest of the git forges Otto knows how to present, mirroring
3
+ * provider-manifest.ts. Pure build-time data shared by BOTH the client (icon,
4
+ * brand label, PR↔MR relabel) and the server (registry host-matching, prompt
5
+ * branding). It is NEVER serialized over the wire, so adding a forge here is not
6
+ * a protocol change.
7
+ *
8
+ * Keep this a pure leaf: no imports, no zod, no functions with runtime deps.
9
+ * Behavioural concerns (CLI invocation, host probing, REST adapters) live in the
10
+ * server adapter keyed by {@link ForgeDefinition.id}; this file is only the
11
+ * declarative half.
12
+ */
13
+ export const FORGE_DEFINITIONS = [
14
+ {
15
+ id: "github",
16
+ displayName: "GitHub",
17
+ changeRequestAbbrev: "PR",
18
+ changeRequestNoun: "pull request",
19
+ changeRequestNumberPrefix: "#",
20
+ issueNumberPrefix: "#",
21
+ iconKind: "github",
22
+ signIn: { cli: "gh", command: "gh auth login" },
23
+ cloudHosts: ["github.com", "ssh.github.com"],
24
+ },
25
+ {
26
+ id: "gitlab",
27
+ displayName: "GitLab",
28
+ changeRequestAbbrev: "MR",
29
+ changeRequestNoun: "merge request",
30
+ changeRequestNumberPrefix: "!",
31
+ issueNumberPrefix: "#",
32
+ iconKind: "gitlab",
33
+ signIn: { cli: "glab", command: "glab auth login", hostnameFlag: "--hostname" },
34
+ cloudHosts: ["gitlab.com"],
35
+ },
36
+ {
37
+ id: "gitea",
38
+ displayName: "Gitea",
39
+ changeRequestAbbrev: "PR",
40
+ changeRequestNoun: "pull request",
41
+ changeRequestNumberPrefix: "#",
42
+ issueNumberPrefix: "#",
43
+ iconKind: "gitea",
44
+ signIn: { cli: "tea", command: "tea login add" },
45
+ cloudHosts: ["gitea.com"],
46
+ },
47
+ {
48
+ id: "forgejo",
49
+ displayName: "Forgejo",
50
+ changeRequestAbbrev: "PR",
51
+ changeRequestNoun: "pull request",
52
+ changeRequestNumberPrefix: "#",
53
+ issueNumberPrefix: "#",
54
+ iconKind: "forgejo",
55
+ signIn: { cli: "tea", command: "tea login add" },
56
+ },
57
+ {
58
+ id: "codeberg",
59
+ displayName: "Codeberg",
60
+ changeRequestAbbrev: "PR",
61
+ changeRequestNoun: "pull request",
62
+ changeRequestNumberPrefix: "#",
63
+ issueNumberPrefix: "#",
64
+ iconKind: "codeberg",
65
+ signIn: { cli: "tea", command: "tea login add" },
66
+ cloudHosts: ["codeberg.org"],
67
+ },
68
+ ];
69
+ /** Forge definitions only present in dev builds (none today; mirrors providers). */
70
+ export const DEV_FORGE_DEFINITIONS = [];
71
+ export const FORGE_IDS = FORGE_DEFINITIONS.map((definition) => definition.id);
72
+ export function getForgeDefinition(id, definitions = [...FORGE_DEFINITIONS, ...DEV_FORGE_DEFINITIONS]) {
73
+ return definitions.find((definition) => definition.id === id) ?? null;
74
+ }
75
+ /**
76
+ * Resolve a forge definition, synthesizing a neutral one for a forge id the
77
+ * client has never heard of (e.g. a self-hosted forge a newer daemon reports to
78
+ * an older client). The neutral shape renders generic, never GitHub-branded.
79
+ */
80
+ export function getForgeDefinitionOrNeutral(id) {
81
+ return (getForgeDefinition(id) ?? {
82
+ id,
83
+ displayName: id,
84
+ changeRequestAbbrev: "PR",
85
+ changeRequestNoun: "pull request",
86
+ changeRequestNumberPrefix: "#",
87
+ issueNumberPrefix: "#",
88
+ iconKind: "git",
89
+ signIn: null,
90
+ });
91
+ }
92
+ //# sourceMappingURL=forge-manifest.js.map