@otto-code/protocol 0.8.9 → 0.8.12

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 (60) hide show
  1. package/dist/agent-queue.d.ts +87 -0
  2. package/dist/agent-queue.js +106 -0
  3. package/dist/brain.d.ts +2321 -0
  4. package/dist/brain.js +1082 -0
  5. package/dist/client-capabilities.d.ts +2 -0
  6. package/dist/client-capabilities.js +10 -0
  7. package/dist/code-intelligence.d.ts +917 -0
  8. package/dist/code-intelligence.js +699 -0
  9. package/dist/communications.d.ts +1106 -0
  10. package/dist/communications.js +384 -0
  11. package/dist/context.d.ts +787 -0
  12. package/dist/context.js +295 -0
  13. package/dist/daemon-config.d.ts +377 -0
  14. package/dist/daemon-config.js +395 -0
  15. package/dist/file-operations.d.ts +380 -0
  16. package/dist/file-operations.js +282 -0
  17. package/dist/generated/validation/ws-outbound.aot.js +54927 -48878
  18. package/dist/git-hosting.d.ts +117 -0
  19. package/dist/git-hosting.js +109 -0
  20. package/dist/git-operations.d.ts +255 -0
  21. package/dist/git-operations.js +221 -0
  22. package/dist/integration-authorization.d.ts +195 -0
  23. package/dist/integration-authorization.js +125 -0
  24. package/dist/kanban.d.ts +341 -0
  25. package/dist/kanban.js +273 -0
  26. package/dist/loop/rpc-schemas.d.ts +6 -6
  27. package/dist/meetings.d.ts +95 -0
  28. package/dist/meetings.js +57 -0
  29. package/dist/messages.d.ts +21054 -24042
  30. package/dist/messages.js +4355 -8731
  31. package/dist/orchestration.d.ts +726 -0
  32. package/dist/orchestration.js +232 -0
  33. package/dist/personality-schemas.d.ts +221 -0
  34. package/dist/personality-schemas.js +340 -0
  35. package/dist/preview.d.ts +140 -0
  36. package/dist/preview.js +98 -0
  37. package/dist/project-knowledge.d.ts +740 -0
  38. package/dist/project-knowledge.js +229 -0
  39. package/dist/project-links.d.ts +102 -0
  40. package/dist/project-links.js +62 -0
  41. package/dist/provider-config.d.ts +87 -2
  42. package/dist/provider-config.js +110 -0
  43. package/dist/refine.d.ts +93 -0
  44. package/dist/refine.js +78 -0
  45. package/dist/schedule/rpc-schemas.d.ts +47 -47
  46. package/dist/schedule/types.d.ts +13 -13
  47. package/dist/speech.d.ts +180 -0
  48. package/dist/speech.js +177 -0
  49. package/dist/storage.d.ts +79 -0
  50. package/dist/storage.js +107 -0
  51. package/dist/suggested-tasks.d.ts +106 -0
  52. package/dist/suggested-tasks.js +81 -0
  53. package/dist/terminal-compatibility.d.ts +55 -0
  54. package/dist/terminal-compatibility.js +35 -0
  55. package/dist/usage-stats.d.ts +255 -0
  56. package/dist/usage-stats.js +162 -0
  57. package/dist/validation/ws-outbound-schema-metadata.d.ts +1404 -274
  58. package/dist/worktree-ops.d.ts +81 -0
  59. package/dist/worktree-ops.js +88 -0
  60. package/package.json +1 -1
@@ -0,0 +1,81 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Otto worktree-operation wire schemas: base-ref selection and the branch-aware archive RPCs. Fork-only capability, so it owns its schemas; messages.ts re-exports them. The reattach and otto.worktree.* RPCs stay in messages.ts because they embed Paseo's WorkspaceDescriptorPayloadSchema and CheckoutErrorSchema.
4
+ */
5
+ export declare const WorkspaceArchivePreflightRequestSchema: z.ZodObject<{
6
+ type: z.ZodLiteral<"workspace.archive.preflight.request">;
7
+ requestId: z.ZodString;
8
+ workspaceId: z.ZodString;
9
+ }, z.core.$strip>;
10
+ export declare const CheckoutBaseSourceSchema: z.ZodEnum<{
11
+ default: "default";
12
+ worktree: "worktree";
13
+ user: "user";
14
+ inferred: "inferred";
15
+ }>;
16
+ export declare const WorktreeBaseRefSetRequestSchema: z.ZodObject<{
17
+ type: z.ZodLiteral<"worktree.baseRef.set.request">;
18
+ requestId: z.ZodString;
19
+ workspaceId: z.ZodString;
20
+ baseRef: z.ZodNullable<z.ZodString>;
21
+ redetect: z.ZodOptional<z.ZodBoolean>;
22
+ }, z.core.$strip>;
23
+ export declare const WorktreeArchiveBranchDetectionSchema: z.ZodObject<{
24
+ isOttoWorktree: z.ZodBoolean;
25
+ branchName: z.ZodNullable<z.ZodString>;
26
+ baseBranch: z.ZodNullable<z.ZodString>;
27
+ mergeState: z.ZodEnum<{
28
+ unknown: "unknown";
29
+ merged: "merged";
30
+ unmerged: "unmerged";
31
+ }>;
32
+ unmergedCommitCount: z.ZodNullable<z.ZodNumber>;
33
+ hasRemoteBranch: z.ZodBoolean;
34
+ branchCheckedOutElsewhere: z.ZodBoolean;
35
+ directoryWillBeRemoved: z.ZodBoolean;
36
+ }, z.core.$strip>;
37
+ export declare const WorkspaceArchivePreflightResponseSchema: z.ZodObject<{
38
+ type: z.ZodLiteral<"workspace.archive.preflight.response">;
39
+ payload: z.ZodObject<{
40
+ requestId: z.ZodString;
41
+ workspaceId: z.ZodString;
42
+ detection: z.ZodNullable<z.ZodObject<{
43
+ isOttoWorktree: z.ZodBoolean;
44
+ branchName: z.ZodNullable<z.ZodString>;
45
+ baseBranch: z.ZodNullable<z.ZodString>;
46
+ mergeState: z.ZodEnum<{
47
+ unknown: "unknown";
48
+ merged: "merged";
49
+ unmerged: "unmerged";
50
+ }>;
51
+ unmergedCommitCount: z.ZodNullable<z.ZodNumber>;
52
+ hasRemoteBranch: z.ZodBoolean;
53
+ branchCheckedOutElsewhere: z.ZodBoolean;
54
+ directoryWillBeRemoved: z.ZodBoolean;
55
+ }, z.core.$strip>>;
56
+ error: z.ZodNullable<z.ZodString>;
57
+ }, z.core.$strip>;
58
+ }, z.core.$strip>;
59
+ export declare const WorktreeBaseRefSetResponseSchema: z.ZodObject<{
60
+ type: z.ZodLiteral<"worktree.baseRef.set.response">;
61
+ payload: z.ZodObject<{
62
+ requestId: z.ZodString;
63
+ workspaceId: z.ZodString;
64
+ baseRef: z.ZodNullable<z.ZodString>;
65
+ isDefault: z.ZodBoolean;
66
+ baseSource: z.ZodOptional<z.ZodEnum<{
67
+ default: "default";
68
+ worktree: "worktree";
69
+ user: "user";
70
+ inferred: "inferred";
71
+ }>>;
72
+ error: z.ZodNullable<z.ZodString>;
73
+ }, z.core.$strip>;
74
+ }, z.core.$strip>;
75
+ export type WorkspaceArchivePreflightRequest = z.infer<typeof WorkspaceArchivePreflightRequestSchema>;
76
+ export type WorkspaceArchivePreflightResponse = z.infer<typeof WorkspaceArchivePreflightResponseSchema>;
77
+ export type WorktreeArchiveBranchDetection = z.infer<typeof WorktreeArchiveBranchDetectionSchema>;
78
+ export type WorktreeBaseRefSetRequest = z.infer<typeof WorktreeBaseRefSetRequestSchema>;
79
+ export type WorktreeBaseRefSetResponse = z.infer<typeof WorktreeBaseRefSetResponseSchema>;
80
+ export type CheckoutBaseSource = z.infer<typeof CheckoutBaseSourceSchema>;
81
+ //# sourceMappingURL=worktree-ops.d.ts.map
@@ -0,0 +1,88 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Otto worktree-operation wire schemas: base-ref selection and the branch-aware archive RPCs. Fork-only capability, so it owns its schemas; messages.ts re-exports them. The reattach and otto.worktree.* RPCs stay in messages.ts because they embed Paseo's WorkspaceDescriptorPayloadSchema and CheckoutErrorSchema.
4
+ */
5
+ // Read-only pre-archive inspection for a worktree-backed workspace: what branch
6
+ // it is on, whether that branch is merged into its base, and whether archiving
7
+ // will actually free the branch (last reference, not checked out elsewhere). The
8
+ // client uses this to render the "delete the leftover branch?" confirmation.
9
+ // COMPAT(worktreeArchiveBranchCleanup): added in v0.6.7.
10
+ export const WorkspaceArchivePreflightRequestSchema = z.object({
11
+ type: z.literal("workspace.archive.preflight.request"),
12
+ requestId: z.string(),
13
+ workspaceId: z.string(),
14
+ });
15
+ // Where the Changes view's base branch came from. Surfaced so the chip can say *why* it is
16
+ // comparing against this branch: an inferred parent is a heuristic over a graph that does not
17
+ // record the answer, and it has to look like one or a wrong guess reads as a bug in the diff.
18
+ // COMPAT(checkoutDiffBaseAnyRepo): added in v0.7.4.
19
+ export const CheckoutBaseSourceSchema = z.enum(["user", "inferred", "worktree", "default"]);
20
+ // Repoint a worktree-backed workspace's base branch - what the Changes view diffs
21
+ // against, and what merge-into-base and PR creation target. On a stacked branch the
22
+ // useful base is the parent branch, not the repo default, the same way a forge PR
23
+ // carries an explicit base. A null baseRef resets to the repository default branch.
24
+ // COMPAT(worktreeDiffBase): added in v0.6.8.
25
+ export const WorktreeBaseRefSetRequestSchema = z.object({
26
+ type: z.literal("worktree.baseRef.set.request"),
27
+ requestId: z.string(),
28
+ workspaceId: z.string(),
29
+ // Branch name; null resets to the default branch. An `origin/` prefix is meaningful and is
30
+ // kept - `main` and `origin/main` are different comparisons whenever the two have drifted.
31
+ baseRef: z.string().nullable(),
32
+ // Forget the remembered base and detect the branch's parent again, ignoring `baseRef`.
33
+ // The escape hatch for a wrong guess: parent detection is a heuristic over a graph that does
34
+ // not record the answer, and the result is sticky, so it has to be re-runnable on demand.
35
+ // COMPAT(checkoutDiffBaseAnyRepo): added in v0.7.4.
36
+ redetect: z.boolean().optional(),
37
+ });
38
+ // Whether/how a worktree-backed workspace's local branch can be cleaned up when
39
+ // the workspace is archived. See WorkspaceArchivePreflightRequestSchema.
40
+ export const WorktreeArchiveBranchDetectionSchema = z.object({
41
+ // True only for Otto-owned worktrees whose branch we can offer to delete.
42
+ // False for local checkouts, plain directories, and non-owned worktrees - the
43
+ // client then skips the branch-cleanup UI entirely.
44
+ isOttoWorktree: z.boolean(),
45
+ // The local branch checked out in the worktree, or null when detached/unknown.
46
+ branchName: z.string().nullable(),
47
+ // The base ref the branch was created from (origin/ stripped), or null.
48
+ baseBranch: z.string().nullable(),
49
+ mergeState: z.enum(["merged", "unmerged", "unknown"]),
50
+ // Commits on the branch not contained in the base ref; null when unknown.
51
+ unmergedCommitCount: z.number().int().nonnegative().nullable(),
52
+ // A matching origin/<branch> exists - deleting the local branch keeps the
53
+ // remote copy. Purely informational for the confirmation copy.
54
+ hasRemoteBranch: z.boolean(),
55
+ // The branch is checked out in another worktree too, so git will refuse to
56
+ // delete it even after this worktree is removed. The client hides the option.
57
+ branchCheckedOutElsewhere: z.boolean(),
58
+ // Archiving will actually remove the backing directory (this is the last
59
+ // active workspace referencing it). Branch cleanup is only offered when true.
60
+ directoryWillBeRemoved: z.boolean(),
61
+ });
62
+ export const WorkspaceArchivePreflightResponseSchema = z.object({
63
+ type: z.literal("workspace.archive.preflight.response"),
64
+ payload: z.object({
65
+ requestId: z.string(),
66
+ workspaceId: z.string(),
67
+ // Null when detection failed (see error) or the workspace is gone.
68
+ detection: WorktreeArchiveBranchDetectionSchema.nullable(),
69
+ error: z.string().nullable(),
70
+ }),
71
+ });
72
+ // COMPAT(worktreeDiffBase): added in v0.6.8.
73
+ export const WorktreeBaseRefSetResponseSchema = z.object({
74
+ type: z.literal("worktree.baseRef.set.response"),
75
+ payload: z.object({
76
+ requestId: z.string(),
77
+ workspaceId: z.string(),
78
+ // The stored base branch after the write; null when the write failed.
79
+ baseRef: z.string().nullable(),
80
+ // The stored base is the repository default branch (no stacked-branch override).
81
+ isDefault: z.boolean(),
82
+ // Where the resulting base came from, so the client can label it without a refetch.
83
+ // COMPAT(checkoutDiffBaseAnyRepo): added in v0.7.4.
84
+ baseSource: CheckoutBaseSourceSchema.optional(),
85
+ error: z.string().nullable(),
86
+ }),
87
+ });
88
+ //# sourceMappingURL=worktree-ops.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@otto-code/protocol",
3
- "version": "0.8.9",
3
+ "version": "0.8.12",
4
4
  "description": "Otto shared protocol schemas and wire types",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "files": [