@agimon-ai/doompi-git 0.0.1-alpha.35 → 0.0.1-alpha.38

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 (35) hide show
  1. package/README.md +21 -1
  2. package/dist/apiContracts.cjs +249 -60
  3. package/dist/apiContracts.cjs.map +1 -1
  4. package/dist/apiContracts.d.mts.map +1 -1
  5. package/dist/apiContracts.mjs +249 -60
  6. package/dist/apiContracts.mjs.map +1 -1
  7. package/dist/extensions/pi.cjs +2 -2
  8. package/dist/extensions/pi.mjs +2 -2
  9. package/dist/extensions/server.cjs +1279 -39
  10. package/dist/extensions/server.cjs.map +1 -1
  11. package/dist/extensions/server.d.mts.map +1 -1
  12. package/dist/extensions/server.mjs +1277 -40
  13. package/dist/extensions/server.mjs.map +1 -1
  14. package/dist/extensions/web.mjs +1625 -23
  15. package/dist/extensions/web.mjs.map +1 -1
  16. package/dist/{gitDependencies-CZLZ_YwU.mjs → gitDependencies-CtVubYvU.mjs} +2 -2
  17. package/dist/{gitDependencies-CZLZ_YwU.mjs.map → gitDependencies-CtVubYvU.mjs.map} +1 -1
  18. package/dist/{gitDependencies-Bv_1StiU.cjs → gitDependencies-Dqsz2HjK.cjs} +2 -2
  19. package/dist/{gitDependencies-Bv_1StiU.cjs.map → gitDependencies-Dqsz2HjK.cjs.map} +1 -1
  20. package/dist/index-D79MSCee.d.mts.map +1 -1
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.mjs +1 -1
  23. package/dist/{runWorktree-CtdyNIpZ.cjs → runWorktree-BE795LxL.cjs} +25 -2
  24. package/dist/runWorktree-BE795LxL.cjs.map +1 -0
  25. package/dist/{runWorktree-x0pLorlB.mjs → runWorktree-SPzJvIBt.mjs} +8 -3
  26. package/dist/runWorktree-SPzJvIBt.mjs.map +1 -0
  27. package/dist/{worktreeOperations-CEbq7iUE.cjs → worktreeOperations-BYmVU0UV.cjs} +106 -9
  28. package/dist/worktreeOperations-BYmVU0UV.cjs.map +1 -0
  29. package/dist/{worktreeOperations-BgE26zO3.mjs → worktreeOperations-BrWG2muV.mjs} +41 -10
  30. package/dist/worktreeOperations-BrWG2muV.mjs.map +1 -0
  31. package/package.json +8 -6
  32. package/dist/runWorktree-CtdyNIpZ.cjs.map +0 -1
  33. package/dist/runWorktree-x0pLorlB.mjs.map +0 -1
  34. package/dist/worktreeOperations-BgE26zO3.mjs.map +0 -1
  35. package/dist/worktreeOperations-CEbq7iUE.cjs.map +0 -1
package/README.md CHANGED
@@ -39,7 +39,27 @@ Worktree sessions opened here start at the top level of the session rail, with n
39
39
 
40
40
  ## Package behavior
41
41
 
42
- > Before publishing, replace this paragraph with one concrete, copy-pasteable example of the package-specific input, output, configuration, or workflow that is not already demonstrated by the generated command.
42
+ ### Review this session's changes
43
+
44
+ The `# diff` group in the activity dock (`g d`) shows one lane, `+added -removed`: this session's checkout against its base, the way a pull request counts it. That is every commit since the branch left its base, plus staged, unstaged and untracked work. The base is the worktree's recorded base when the session owns one, then the remote's default branch (`origin/HEAD`, `origin/main`, `origin/master`), then the branch's upstream; with none of those only uncommitted work counts. The count refreshes after every tool call and settled turn; nothing polls.
45
+
46
+ The lane opens the review tab: changed files grouped by folder on the left, every diff stacked on the right. Select lines, or click a line number, to write a comment under that line; a comment on a removed line points at the old file. Comments queue on the tab, and **send review** hands them to the agent as one message, queued behind a running turn rather than dropped.
47
+
48
+ ### Pull, push and rebase
49
+
50
+ The review tab's header runs them by hand, one at a time per session:
51
+
52
+ - **pull** fetches, then rebases local commits onto the upstream.
53
+ - **rebase** fetches the base's remote, then rebases onto the base.
54
+ - **push** sets the upstream on a first push. A push the remote rejects after a rebase asks first, then forces with `--force-with-lease --force-if-includes`, which git refuses if the remote holds commits this branch never fetched and integrated.
55
+
56
+ Pull and rebase refuse uncommitted changes. A rebase that stops on conflicts stays paused and lists the files, with **ask agent to resolve** and **abort rebase**.
57
+
58
+ ### Remote auth, per workspace
59
+
60
+ Settings, then repository, then **git remote**, sets how one workspace's sessions reach the remote when you pull, push or rebase from the cockpit: this machine's own git (the default), an SSH key path (blank uses your ssh config and ssh-agent), or an HTTPS username and token for one host. Worktree sessions use their workspace's setup.
61
+
62
+ The setup lives outside every repository in `~/.pi/.doom/git/credentials.json` (folder `0700`, file `0600`). The token is write-only: the page shows only that one is saved. It goes into the environment of one `git fetch` or `git push` at a time, only for the host it was entered for, with git's credential helper list emptied first so the macOS keychain never stores it. The agent's own git commands never see these credentials. Saving from a remote device needs passkey step-up. An unknown SSH host is refused: trust it once with `ssh -T git@<host>` in a terminal.
43
63
 
44
64
  ## Help
45
65
 
@@ -56,6 +56,107 @@ const WorktreesCommandSchema = typebox.Type.Union([typebox.Type.Object({
56
56
  id: S,
57
57
  force: O(B)
58
58
  })]);
59
+ const N = typebox.Type.Integer({ minimum: 0 });
60
+ const ChangesSchema = typebox.Type.Object({
61
+ branch: O(S),
62
+ base: O(S),
63
+ added: N,
64
+ removed: N,
65
+ files: N,
66
+ truncated: O(B),
67
+ upstream: O(typebox.Type.Object({
68
+ ref: S,
69
+ ahead: N,
70
+ behind: N
71
+ })),
72
+ rebase: O(typebox.Type.Object({ conflicts: typebox.Type.Array(S) }))
73
+ });
74
+ const SyncErrorTargetSchema = typebox.Type.Union([typebox.Type.Object({ action: literals([
75
+ "pull",
76
+ "rebase",
77
+ "abort-rebase"
78
+ ]) }), typebox.Type.Object({
79
+ action: typebox.Type.Literal("push"),
80
+ forceRequired: O(typebox.Type.Literal(true))
81
+ })]);
82
+ const GitChangesPayloadSchema = typebox.Type.Object({
83
+ changes: O(ChangesSchema),
84
+ pending: O(S),
85
+ error: O(S),
86
+ errorTarget: O(SyncErrorTargetSchema)
87
+ });
88
+ const GitChangesCommandSchema = typebox.Type.Union([typebox.Type.Object({ action: literals([
89
+ "pull",
90
+ "rebase",
91
+ "abort-rebase"
92
+ ]) }), typebox.Type.Object({
93
+ action: typebox.Type.Literal("push"),
94
+ force: O(typebox.Type.Literal(true))
95
+ })]);
96
+ const AuthViewSchema = typebox.Type.Object({
97
+ method: literals([
98
+ "none",
99
+ "ssh",
100
+ "https"
101
+ ]),
102
+ ssh: O(typebox.Type.Object({ keyPath: O(S) })),
103
+ https: O(typebox.Type.Object({
104
+ host: S,
105
+ username: S,
106
+ hasToken: B
107
+ }))
108
+ });
109
+ const AuthSaveSchema = typebox.Type.Union([
110
+ typebox.Type.Object({ method: typebox.Type.Literal("none") }),
111
+ typebox.Type.Object({
112
+ method: typebox.Type.Literal("ssh"),
113
+ keyPath: O(S)
114
+ }),
115
+ typebox.Type.Object({
116
+ method: typebox.Type.Literal("https"),
117
+ host: S,
118
+ username: S,
119
+ token: O(typebox.Type.String({ writeOnly: true }))
120
+ })
121
+ ]);
122
+ const DiffRowSchema = typebox.Type.Object({
123
+ marker: literals([
124
+ "+",
125
+ "-",
126
+ " "
127
+ ]),
128
+ line: N,
129
+ content: S
130
+ });
131
+ const ReviewSummarySchema = typebox.Type.Object({
132
+ repository: B,
133
+ branch: O(S),
134
+ base: O(S),
135
+ mergeBase: O(S),
136
+ truncated: O(B),
137
+ files: typebox.Type.Array(typebox.Type.Object({
138
+ path: S,
139
+ status: literals([
140
+ "added",
141
+ "modified",
142
+ "deleted",
143
+ "untracked",
144
+ "conflicted"
145
+ ]),
146
+ added: N,
147
+ removed: N,
148
+ binary: O(B)
149
+ }))
150
+ });
151
+ const ReviewFileSchema = typebox.Type.Object({
152
+ path: S,
153
+ hunks: typebox.Type.Array(typebox.Type.Object({
154
+ start: N,
155
+ rows: typebox.Type.Array(DiffRowSchema)
156
+ })),
157
+ binary: O(typebox.Type.Literal(true)),
158
+ tooLarge: O(typebox.Type.Literal(true))
159
+ });
59
160
  const query = [{
60
161
  name: "repositoryId",
61
162
  in: "query",
@@ -121,75 +222,163 @@ const apiContracts = (0, _agimon_ai_doompi_core_apiContracts.defineApiContract)(
121
222
  }],
122
223
  responses: (0, _agimon_ai_doompi_core_apiContracts.jsonApiResponses)(typebox.Type.Object({ worktree: RecordSchema }))
123
224
  },
124
- ...scope === "workspace" ? [{
125
- id: "git.branches",
126
- scope,
225
+ ...scope === "workspace" ? [
226
+ {
227
+ id: "git.auth.read",
228
+ scope,
229
+ basePath: "git",
230
+ path: "/auth",
231
+ method: "GET",
232
+ authentication: "owner",
233
+ description: "Read a workspace's remote auth for manual sync. The token is never returned.",
234
+ parameters: [{
235
+ name: "repositoryId",
236
+ in: "query",
237
+ required: true,
238
+ schema: S
239
+ }],
240
+ responses: (0, _agimon_ai_doompi_core_apiContracts.jsonApiResponses)(AuthViewSchema)
241
+ },
242
+ {
243
+ id: "git.auth.save",
244
+ scope,
245
+ basePath: "git",
246
+ path: "/auth",
247
+ method: "PUT",
248
+ authentication: "owner",
249
+ description: "Replace a workspace's remote auth. Passkey step-up gated for remote devices.",
250
+ parameters: [{
251
+ name: "repositoryId",
252
+ in: "query",
253
+ required: true,
254
+ schema: S
255
+ }],
256
+ body: {
257
+ required: true,
258
+ contentType: "application/json",
259
+ schema: AuthSaveSchema
260
+ },
261
+ responses: (0, _agimon_ai_doompi_core_apiContracts.jsonApiResponses)(AuthViewSchema)
262
+ },
263
+ {
264
+ id: "git.branches",
265
+ scope,
266
+ basePath: "git",
267
+ path: "/branches",
268
+ method: "GET",
269
+ authentication: "owner",
270
+ description: "List the workspace branches for the new-session dialog.",
271
+ responses: (0, _agimon_ai_doompi_core_apiContracts.jsonApiResponses)(typebox.Type.Object({
272
+ repository: B,
273
+ current: O(S),
274
+ defaultBase: O(S),
275
+ local: typebox.Type.Array(typebox.Type.Object({
276
+ name: S,
277
+ checkedOutAt: O(S)
278
+ })),
279
+ remote: typebox.Type.Array(typebox.Type.Object({
280
+ remote: S,
281
+ name: S
282
+ }))
283
+ }))
284
+ },
285
+ {
286
+ id: "git.sessions.create",
287
+ scope,
288
+ basePath: "git",
289
+ path: "/sessions",
290
+ method: "POST",
291
+ authentication: "owner",
292
+ description: "Start a top-level worktree session on an existing or new branch.",
293
+ body: {
294
+ required: true,
295
+ contentType: "application/json",
296
+ schema: typebox.Type.Union([typebox.Type.Object({
297
+ mode: typebox.Type.Literal("existing-branch"),
298
+ branch: S,
299
+ remote: O(S),
300
+ name: O(S)
301
+ }), typebox.Type.Object({
302
+ mode: typebox.Type.Literal("new-branch"),
303
+ branch: S,
304
+ baseRef: O(S),
305
+ name: O(S)
306
+ })])
307
+ },
308
+ responses: (0, _agimon_ai_doompi_core_apiContracts.jsonApiResponses)(typebox.Type.Object({
309
+ sessionId: S,
310
+ worktreeId: S
311
+ }), 201)
312
+ }
313
+ ] : [],
314
+ ...scope === "global" ? [{
315
+ id: "git.review.summary",
316
+ scope: "session",
127
317
  basePath: "git",
128
- path: "/branches",
318
+ path: "/review",
129
319
  method: "GET",
130
320
  authentication: "owner",
131
- description: "List the workspace branches for the new-session dialog.",
132
- responses: (0, _agimon_ai_doompi_core_apiContracts.jsonApiResponses)(typebox.Type.Object({
133
- repository: B,
134
- current: O(S),
135
- defaultBase: O(S),
136
- local: typebox.Type.Array(typebox.Type.Object({
137
- name: S,
138
- checkedOutAt: O(S)
139
- })),
140
- remote: typebox.Type.Array(typebox.Type.Object({
141
- remote: S,
142
- name: S
143
- }))
144
- }))
321
+ description: "List the files the session's checkout changed against its base.",
322
+ responses: (0, _agimon_ai_doompi_core_apiContracts.jsonApiResponses)(ReviewSummarySchema)
145
323
  }, {
146
- id: "git.sessions.create",
147
- scope,
324
+ id: "git.review.file",
325
+ scope: "session",
148
326
  basePath: "git",
149
- path: "/sessions",
150
- method: "POST",
327
+ path: "/review/file",
328
+ method: "GET",
151
329
  authentication: "owner",
152
- description: "Start a top-level worktree session on an existing or new branch.",
153
- body: {
330
+ description: "One changed file's hunks; the path must be in the session's change set.",
331
+ parameters: [{
332
+ name: "path",
333
+ in: "query",
154
334
  required: true,
155
- contentType: "application/json",
156
- schema: typebox.Type.Union([typebox.Type.Object({
157
- mode: typebox.Type.Literal("existing-branch"),
158
- branch: S,
159
- remote: O(S),
160
- name: O(S)
161
- }), typebox.Type.Object({
162
- mode: typebox.Type.Literal("new-branch"),
163
- branch: S,
164
- baseRef: O(S),
165
- name: O(S)
166
- })])
167
- },
168
- responses: (0, _agimon_ai_doompi_core_apiContracts.jsonApiResponses)(typebox.Type.Object({
169
- sessionId: S,
170
- worktreeId: S
171
- }), 201)
335
+ schema: typebox.Type.String({ minLength: 1 })
336
+ }],
337
+ responses: (0, _agimon_ai_doompi_core_apiContracts.jsonApiResponses)(ReviewFileSchema)
172
338
  }] : []
173
339
  ]),
174
- sockets: ["global", "workspace"].flatMap((scope) => [{
175
- id: "git.channel",
176
- scope,
177
- service: "doompi.hub.v1",
178
- member: "git_worktrees",
179
- kind: "channel",
180
- direction: "server-to-client",
181
- description: "Worktree channel payload.",
182
- input: WorktreesPayloadSchema
183
- }, {
184
- id: "git.command",
185
- scope,
186
- service: "doompi.hub.v1",
187
- member: "git_worktrees",
188
- kind: "channel",
189
- direction: "client-to-server",
190
- description: "Worktree channel command payload.",
191
- input: WorktreesCommandSchema
192
- }])
340
+ sockets: ["global", "workspace"].flatMap((scope) => [
341
+ {
342
+ id: "git.changes.channel",
343
+ scope,
344
+ service: "doompi.hub.v1",
345
+ member: "git_changes",
346
+ kind: "channel",
347
+ direction: "server-to-client",
348
+ description: "The session's change against its base, and manual sync state.",
349
+ input: GitChangesPayloadSchema
350
+ },
351
+ {
352
+ id: "git.changes.command",
353
+ scope,
354
+ service: "doompi.hub.v1",
355
+ member: "git_changes",
356
+ kind: "channel",
357
+ direction: "client-to-server",
358
+ description: "Manual pull, push, rebase or abort-rebase for the session.",
359
+ input: GitChangesCommandSchema
360
+ },
361
+ {
362
+ id: "git.channel",
363
+ scope,
364
+ service: "doompi.hub.v1",
365
+ member: "git_worktrees",
366
+ kind: "channel",
367
+ direction: "server-to-client",
368
+ description: "Worktree channel payload.",
369
+ input: WorktreesPayloadSchema
370
+ },
371
+ {
372
+ id: "git.command",
373
+ scope,
374
+ service: "doompi.hub.v1",
375
+ member: "git_worktrees",
376
+ kind: "channel",
377
+ direction: "client-to-server",
378
+ description: "Worktree channel command payload.",
379
+ input: WorktreesCommandSchema
380
+ }
381
+ ])
193
382
  });
194
383
  //#endregion
195
384
  exports.apiContracts = apiContracts;
@@ -1 +1 @@
1
- {"version":3,"file":"apiContracts.cjs","names":["Type","defineApiContract","jsonApiResponses"],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract, jsonApiResponses } from '@agimon-ai/doompi-core/apiContracts';\nimport { Type } from 'typebox';\n\nconst S = Type.String();\nconst B = Type.Boolean();\nconst O = Type.Optional;\nconst literals = <T extends string>(values: T[]) => Type.Union(values.map((value) => Type.Literal(value)));\nconst RecordSchema = Type.Object({\n version: Type.Literal(1),\n id: S,\n branch: S,\n baseRef: S,\n path: S,\n repositoryRoot: S,\n sessionId: S,\n parentSessionId: Type.Optional(S),\n status: literals(['spawning', 'running', 'closing', 'orphaned']),\n createdAt: S,\n});\nconst ErrorTargetSchema = Type.Union([\n Type.Object({ action: Type.Literal('create') }),\n Type.Object({ action: Type.Literal('close'), id: S }),\n]);\nexport const WorktreesPayloadSchema = Type.Object({\n worktrees: Type.Array(\n Type.Object({ id: S, branch: S, path: S, sessionId: Type.Union([S, Type.Null()]), orphaned: B, unowned: B }),\n ),\n pending: O(S),\n error: O(S),\n errorTarget: O(ErrorTargetSchema),\n});\nexport const WorktreesCommandSchema = Type.Union([\n Type.Object({\n action: Type.Literal('create'),\n branch: S,\n baseRef: O(S),\n reservationId: O(Type.String({ minLength: 1, pattern: '^[A-Za-z0-9_-]+$' })),\n }),\n Type.Object({ action: Type.Literal('close'), id: S, force: O(B) }),\n]);\nconst query = [\n { name: 'repositoryId', in: 'query' as const, required: true, schema: S },\n { name: 'sessionId', in: 'query' as const, required: true, schema: S },\n];\nexport const apiContracts = defineApiContract({\n version: 1,\n dynamic: [],\n http: (['global', 'workspace'] as const).flatMap((scope) => [\n {\n id: 'git.list',\n scope,\n basePath: 'git',\n path: '/worktrees',\n method: 'GET',\n authentication: 'owner',\n description: 'List admitted repository worktrees.',\n parameters: query.map((item) => ({ ...item, required: item.name === 'repositoryId' })),\n responses: jsonApiResponses(Type.Object({ worktrees: Type.Array(RecordSchema) })),\n },\n {\n id: 'git.create',\n scope,\n basePath: 'git',\n path: '/worktrees',\n method: 'POST',\n authentication: 'owner',\n description: 'Create a worktree and session.',\n parameters: query,\n body: {\n required: true,\n contentType: 'application/json',\n schema: Type.Object({ branch: Type.String({ minLength: 1 }), baseRef: O(S), name: O(S) }),\n },\n responses: jsonApiResponses(Type.Object({ worktree: RecordSchema }), 201),\n },\n {\n id: 'git.close',\n scope,\n basePath: 'git',\n path: '/worktrees/{id}',\n method: 'DELETE',\n authentication: 'owner',\n description: 'Close a worktree.',\n parameters: [...query, { name: 'force', in: 'query', required: false, schema: B }],\n responses: jsonApiResponses(Type.Object({ worktree: RecordSchema })),\n },\n // The new-session dialog's routes exist only on a workspace mount.\n ...(scope === 'workspace'\n ? [\n {\n id: 'git.branches',\n scope,\n basePath: 'git',\n path: '/branches',\n method: 'GET' as const,\n authentication: 'owner' as const,\n description: 'List the workspace branches for the new-session dialog.',\n responses: jsonApiResponses(\n Type.Object({\n repository: B,\n current: O(S),\n defaultBase: O(S),\n local: Type.Array(Type.Object({ name: S, checkedOutAt: O(S) })),\n remote: Type.Array(Type.Object({ remote: S, name: S })),\n }),\n ),\n },\n {\n id: 'git.sessions.create',\n scope,\n basePath: 'git',\n path: '/sessions',\n method: 'POST' as const,\n authentication: 'owner' as const,\n description: 'Start a top-level worktree session on an existing or new branch.',\n body: {\n required: true,\n contentType: 'application/json',\n schema: Type.Union([\n Type.Object({ mode: Type.Literal('existing-branch'), branch: S, remote: O(S), name: O(S) }),\n Type.Object({ mode: Type.Literal('new-branch'), branch: S, baseRef: O(S), name: O(S) }),\n ]),\n },\n responses: jsonApiResponses(Type.Object({ sessionId: S, worktreeId: S }), 201),\n },\n ]\n : []),\n ]),\n sockets: (['global', 'workspace'] as const).flatMap((scope) => [\n {\n id: 'git.channel',\n scope,\n service: 'doompi.hub.v1',\n member: 'git_worktrees',\n kind: 'channel',\n direction: 'server-to-client',\n description: 'Worktree channel payload.',\n input: WorktreesPayloadSchema,\n },\n {\n id: 'git.command',\n scope,\n service: 'doompi.hub.v1',\n member: 'git_worktrees',\n kind: 'channel',\n direction: 'client-to-server',\n description: 'Worktree channel command payload.',\n input: WorktreesCommandSchema,\n },\n ]),\n});\nexport default apiContracts;\n"],"mappings":";;;;;;;AAGA,MAAM,IAAIA,QAAAA,KAAK,OAAO;AACtB,MAAM,IAAIA,QAAAA,KAAK,QAAQ;AACvB,MAAM,IAAIA,QAAAA,KAAK;AACf,MAAM,YAA8B,WAAgBA,QAAAA,KAAK,MAAM,OAAO,KAAK,UAAUA,QAAAA,KAAK,QAAQ,KAAK,CAAC,CAAC;AACzG,MAAM,eAAeA,QAAAA,KAAK,OAAO;CAC/B,SAASA,QAAAA,KAAK,QAAQ,CAAC;CACvB,IAAI;CACJ,QAAQ;CACR,SAAS;CACT,MAAM;CACN,gBAAgB;CAChB,WAAW;CACX,iBAAiBA,QAAAA,KAAK,SAAS,CAAC;CAChC,QAAQ,SAAS;EAAC;EAAY;EAAW;EAAW;CAAU,CAAC;CAC/D,WAAW;AACb,CAAC;AACD,MAAM,oBAAoBA,QAAAA,KAAK,MAAM,CACnCA,QAAAA,KAAK,OAAO,EAAE,QAAQA,QAAAA,KAAK,QAAQ,QAAQ,EAAE,CAAC,GAC9CA,QAAAA,KAAK,OAAO;CAAE,QAAQA,QAAAA,KAAK,QAAQ,OAAO;CAAG,IAAI;AAAE,CAAC,CACtD,CAAC;AACD,MAAa,yBAAyBA,QAAAA,KAAK,OAAO;CAChD,WAAWA,QAAAA,KAAK,MACdA,QAAAA,KAAK,OAAO;EAAE,IAAI;EAAG,QAAQ;EAAG,MAAM;EAAG,WAAWA,QAAAA,KAAK,MAAM,CAAC,GAAGA,QAAAA,KAAK,KAAK,CAAC,CAAC;EAAG,UAAU;EAAG,SAAS;CAAE,CAAC,CAC7G;CACA,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AAQ,YAAY;KAAG,QAAQ;KAAG,SAAS,EAAE,CAAC;KAAG,MAAM,EAAE,CAAC;IAAE,CAAC,CACxF,CAAC;GACH;GACA,YAAA,GAAWE,oCAAAA,iBAAAA,CAAiBF,QAAAA,KAAK,OAAO;IAAE,WAAW;IAAG,YAAY;GAAE,CAAC,GAAG,GAAG;EAC/E,CACF,IACA,CAAC;CACP,CAAC;CACD,SAAU,CAAC,UAAU,WAAW,CAAC,CAAW,SAAS,UAAU,CAC7D;EACE,IAAI;EACJ;EACA,SAAS;EACT,QAAQ;EACR,MAAM;EACN,WAAW;EACX,aAAa;EACb,OAAO;CACT,GACA;EACE,IAAI;EACJ;EACA,SAAS;EACT,QAAQ;EACR,MAAM;EACN,WAAW;EACX,aAAa;EACb,OAAO;CACT,CACF,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"apiContracts.cjs","names":["Type","defineApiContract","jsonApiResponses"],"sources":["../src/schemas/apiContracts.ts"],"sourcesContent":["import { defineApiContract, jsonApiResponses } from '@agimon-ai/doompi-core/apiContracts';\nimport { Type } from 'typebox';\n\nconst S = Type.String();\nconst B = Type.Boolean();\nconst O = Type.Optional;\nconst literals = <T extends string>(values: T[]) => Type.Union(values.map((value) => Type.Literal(value)));\nconst RecordSchema = Type.Object({\n version: Type.Literal(1),\n id: S,\n branch: S,\n baseRef: S,\n path: S,\n repositoryRoot: S,\n sessionId: S,\n parentSessionId: Type.Optional(S),\n status: literals(['spawning', 'running', 'closing', 'orphaned']),\n createdAt: S,\n});\nconst ErrorTargetSchema = Type.Union([\n Type.Object({ action: Type.Literal('create') }),\n Type.Object({ action: Type.Literal('close'), id: S }),\n]);\nexport const WorktreesPayloadSchema = Type.Object({\n worktrees: Type.Array(\n Type.Object({ id: S, branch: S, path: S, sessionId: Type.Union([S, Type.Null()]), orphaned: B, unowned: B }),\n ),\n pending: O(S),\n error: O(S),\n errorTarget: O(ErrorTargetSchema),\n});\nexport const WorktreesCommandSchema = Type.Union([\n Type.Object({\n action: Type.Literal('create'),\n branch: S,\n baseRef: O(S),\n reservationId: O(Type.String({ minLength: 1, pattern: '^[A-Za-z0-9_-]+$' })),\n }),\n Type.Object({ action: Type.Literal('close'), id: S, force: O(B) }),\n]);\nconst N = Type.Integer({ minimum: 0 });\nconst ChangesSchema = Type.Object({\n branch: O(S),\n base: O(S),\n added: N,\n removed: N,\n files: N,\n truncated: O(B),\n upstream: O(Type.Object({ ref: S, ahead: N, behind: N })),\n rebase: O(Type.Object({ conflicts: Type.Array(S) })),\n});\nconst SyncErrorTargetSchema = Type.Union([\n Type.Object({ action: literals(['pull', 'rebase', 'abort-rebase']) }),\n Type.Object({ action: Type.Literal('push'), forceRequired: O(Type.Literal(true)) }),\n]);\nexport const GitChangesPayloadSchema = Type.Object({\n changes: O(ChangesSchema),\n pending: O(S),\n error: O(S),\n errorTarget: O(SyncErrorTargetSchema),\n});\nexport const GitChangesCommandSchema = Type.Union([\n Type.Object({ action: literals(['pull', 'rebase', 'abort-rebase']) }),\n Type.Object({ action: Type.Literal('push'), force: O(Type.Literal(true)) }),\n]);\nconst AuthViewSchema = Type.Object({\n method: literals(['none', 'ssh', 'https']),\n ssh: O(Type.Object({ keyPath: O(S) })),\n https: O(Type.Object({ host: S, username: S, hasToken: B })),\n});\nconst AuthSaveSchema = Type.Union([\n Type.Object({ method: Type.Literal('none') }),\n Type.Object({ method: Type.Literal('ssh'), keyPath: O(S) }),\n Type.Object({ method: Type.Literal('https'), host: S, username: S, token: O(Type.String({ writeOnly: true })) }),\n]);\nconst DiffRowSchema = Type.Object({ marker: literals(['+', '-', ' ']), line: N, content: S });\nconst ReviewSummarySchema = Type.Object({\n repository: B,\n branch: O(S),\n base: O(S),\n mergeBase: O(S),\n truncated: O(B),\n files: Type.Array(\n Type.Object({\n path: S,\n status: literals(['added', 'modified', 'deleted', 'untracked', 'conflicted']),\n added: N,\n removed: N,\n binary: O(B),\n }),\n ),\n});\nconst ReviewFileSchema = Type.Object({\n path: S,\n hunks: Type.Array(Type.Object({ start: N, rows: Type.Array(DiffRowSchema) })),\n binary: O(Type.Literal(true)),\n tooLarge: O(Type.Literal(true)),\n});\nconst query = [\n { name: 'repositoryId', in: 'query' as const, required: true, schema: S },\n { name: 'sessionId', in: 'query' as const, required: true, schema: S },\n];\nexport const apiContracts = defineApiContract({\n version: 1,\n dynamic: [],\n http: (['global', 'workspace'] as const).flatMap((scope) => [\n {\n id: 'git.list',\n scope,\n basePath: 'git',\n path: '/worktrees',\n method: 'GET',\n authentication: 'owner',\n description: 'List admitted repository worktrees.',\n parameters: query.map((item) => ({ ...item, required: item.name === 'repositoryId' })),\n responses: jsonApiResponses(Type.Object({ worktrees: Type.Array(RecordSchema) })),\n },\n {\n id: 'git.create',\n scope,\n basePath: 'git',\n path: '/worktrees',\n method: 'POST',\n authentication: 'owner',\n description: 'Create a worktree and session.',\n parameters: query,\n body: {\n required: true,\n contentType: 'application/json',\n schema: Type.Object({ branch: Type.String({ minLength: 1 }), baseRef: O(S), name: O(S) }),\n },\n responses: jsonApiResponses(Type.Object({ worktree: RecordSchema }), 201),\n },\n {\n id: 'git.close',\n scope,\n basePath: 'git',\n path: '/worktrees/{id}',\n method: 'DELETE',\n authentication: 'owner',\n description: 'Close a worktree.',\n parameters: [...query, { name: 'force', in: 'query', required: false, schema: B }],\n responses: jsonApiResponses(Type.Object({ worktree: RecordSchema })),\n },\n // The new-session dialog's routes and a workspace's remote auth exist only on a workspace mount.\n ...(scope === 'workspace'\n ? [\n {\n id: 'git.auth.read',\n scope,\n basePath: 'git',\n path: '/auth',\n method: 'GET' as const,\n authentication: 'owner' as const,\n description: \"Read a workspace's remote auth for manual sync. The token is never returned.\",\n parameters: [{ name: 'repositoryId', in: 'query' as const, required: true, schema: S }],\n responses: jsonApiResponses(AuthViewSchema),\n },\n {\n id: 'git.auth.save',\n scope,\n basePath: 'git',\n path: '/auth',\n method: 'PUT' as const,\n authentication: 'owner' as const,\n description: \"Replace a workspace's remote auth. Passkey step-up gated for remote devices.\",\n parameters: [{ name: 'repositoryId', in: 'query' as const, required: true, schema: S }],\n body: { required: true, contentType: 'application/json', schema: AuthSaveSchema },\n responses: jsonApiResponses(AuthViewSchema),\n },\n {\n id: 'git.branches',\n scope,\n basePath: 'git',\n path: '/branches',\n method: 'GET' as const,\n authentication: 'owner' as const,\n description: 'List the workspace branches for the new-session dialog.',\n responses: jsonApiResponses(\n Type.Object({\n repository: B,\n current: O(S),\n defaultBase: O(S),\n local: Type.Array(Type.Object({ name: S, checkedOutAt: O(S) })),\n remote: Type.Array(Type.Object({ remote: S, name: S })),\n }),\n ),\n },\n {\n id: 'git.sessions.create',\n scope,\n basePath: 'git',\n path: '/sessions',\n method: 'POST' as const,\n authentication: 'owner' as const,\n description: 'Start a top-level worktree session on an existing or new branch.',\n body: {\n required: true,\n contentType: 'application/json',\n schema: Type.Union([\n Type.Object({ mode: Type.Literal('existing-branch'), branch: S, remote: O(S), name: O(S) }),\n Type.Object({ mode: Type.Literal('new-branch'), branch: S, baseRef: O(S), name: O(S) }),\n ]),\n },\n responses: jsonApiResponses(Type.Object({ sessionId: S, worktreeId: S }), 201),\n },\n ]\n : []),\n // The review routes exist only on a session mount; listed once, beside the global entries.\n ...(scope === 'global'\n ? [\n {\n id: 'git.review.summary',\n scope: 'session' as const,\n basePath: 'git',\n path: '/review',\n method: 'GET' as const,\n authentication: 'owner' as const,\n description: \"List the files the session's checkout changed against its base.\",\n responses: jsonApiResponses(ReviewSummarySchema),\n },\n {\n id: 'git.review.file',\n scope: 'session' as const,\n basePath: 'git',\n path: '/review/file',\n method: 'GET' as const,\n authentication: 'owner' as const,\n description: \"One changed file's hunks; the path must be in the session's change set.\",\n parameters: [{ name: 'path', in: 'query' as const, required: true, schema: Type.String({ minLength: 1 }) }],\n responses: jsonApiResponses(ReviewFileSchema),\n },\n ]\n : []),\n ]),\n sockets: (['global', 'workspace'] as const).flatMap((scope) => [\n {\n id: 'git.changes.channel',\n scope,\n service: 'doompi.hub.v1',\n member: 'git_changes',\n kind: 'channel',\n direction: 'server-to-client',\n description: \"The session's change against its base, and manual sync state.\",\n input: GitChangesPayloadSchema,\n },\n {\n id: 'git.changes.command',\n scope,\n service: 'doompi.hub.v1',\n member: 'git_changes',\n kind: 'channel',\n direction: 'client-to-server',\n description: 'Manual pull, push, rebase or abort-rebase for the session.',\n input: GitChangesCommandSchema,\n },\n {\n id: 'git.channel',\n scope,\n service: 'doompi.hub.v1',\n member: 'git_worktrees',\n kind: 'channel',\n direction: 'server-to-client',\n description: 'Worktree channel payload.',\n input: WorktreesPayloadSchema,\n },\n {\n id: 'git.command',\n scope,\n service: 'doompi.hub.v1',\n member: 'git_worktrees',\n kind: 'channel',\n direction: 'client-to-server',\n description: 'Worktree channel command payload.',\n input: WorktreesCommandSchema,\n },\n ]),\n});\nexport default apiContracts;\n"],"mappings":";;;;;;;AAGA,MAAM,IAAIA,QAAAA,KAAK,OAAO;AACtB,MAAM,IAAIA,QAAAA,KAAK,QAAQ;AACvB,MAAM,IAAIA,QAAAA,KAAK;AACf,MAAM,YAA8B,WAAgBA,QAAAA,KAAK,MAAM,OAAO,KAAK,UAAUA,QAAAA,KAAK,QAAQ,KAAK,CAAC,CAAC;AACzG,MAAM,eAAeA,QAAAA,KAAK,OAAO;CAC/B,SAASA,QAAAA,KAAK,QAAQ,CAAC;CACvB,IAAI;CACJ,QAAQ;CACR,SAAS;CACT,MAAM;CACN,gBAAgB;CAChB,WAAW;CACX,iBAAiBA,QAAAA,KAAK,SAAS,CAAC;CAChC,QAAQ,SAAS;EAAC;EAAY;EAAW;EAAW;CAAU,CAAC;CAC/D,WAAW;AACb,CAAC;AACD,MAAM,oBAAoBA,QAAAA,KAAK,MAAM,CACnCA,QAAAA,KAAK,OAAO,EAAE,QAAQA,QAAAA,KAAK,QAAQ,QAAQ,EAAE,CAAC,GAC9CA,QAAAA,KAAK,OAAO;CAAE,QAAQA,QAAAA,KAAK,QAAQ,OAAO;CAAG,IAAI;AAAE,CAAC,CACtD,CAAC;AACD,MA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I;GACJ,OAAO;GACP,UAAU;GACV,MAAM;GACN,QAAQ;GACR,gBAAgB;GAChB,aAAa;GACb,YAAY,CAAC;IAAE,MAAM;IAAQ,IAAI;IAAkB,UAAU;IAAM,QAAQF,QAAAA,KAAK,OAAO,EAAE,WAAW,EAAE,CAAC;GAAE,CAAC;GAC1G,YAAA,GAAWE,oCAAAA,iBAAAA,CAAiB,gBAAgB;EAC9C,CACF,IACA,CAAC;CACP,CAAC;CACD,SAAU,CAAC,UAAU,WAAW,CAAC,CAAW,SAAS,UAAU;EAC7D;GACE,IAAI;GACJ;GACA,SAAS;GACT,QAAQ;GACR,MAAM;GACN,WAAW;GACX,aAAa;GACb,OAAO;EACT;EACA;GACE,IAAI;GACJ;GACA,SAAS;GACT,QAAQ;GACR,MAAM;GACN,WAAW;GACX,aAAa;GACb,OAAO;EACT;EACA;GACE,IAAI;GACJ;GACA,SAAS;GACT,QAAQ;GACR,MAAM;GACN,WAAW;GACX,aAAa;GACb,OAAO;EACT;EACA;GACE,IAAI;GACJ;GACA,SAAS;GACT,QAAQ;GACR,MAAM;GACN,WAAW;GACX,aAAa;GACb,OAAO;EACT;CACF,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"apiContracts.d.mts","names":[],"sources":["../src/schemas/apiContracts.ts"],"mappings":";;qBA4Ca"}
1
+ {"version":3,"file":"apiContracts.d.mts","names":[],"sources":["../src/schemas/apiContracts.ts"],"mappings":";;qBAsGa"}