@wjarka/cezarion 0.17.0-dev.5503 → 0.17.0-dev.5511

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.
@@ -19352,22 +19352,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
19352
19352
  error: string;
19353
19353
  };
19354
19354
  outputFormat: "json";
19355
- status: 404;
19356
- input: {
19357
- json: {
19358
- message: string;
19359
- };
19360
- } & {
19361
- param: {
19362
- id: string;
19363
- };
19364
- };
19365
- } | {
19366
- output: {
19367
- error: string;
19368
- };
19369
- outputFormat: "json";
19370
- status: 409;
19355
+ status: 404 | 409;
19371
19356
  input: {
19372
19357
  json: {
19373
19358
  message: string;
@@ -19402,18 +19387,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
19402
19387
  error: string;
19403
19388
  };
19404
19389
  outputFormat: "json";
19405
- status: 404;
19406
- input: {
19407
- param: {
19408
- id: string;
19409
- };
19410
- };
19411
- } | {
19412
- output: {
19413
- error: string;
19414
- };
19415
- outputFormat: "json";
19416
- status: 409;
19390
+ status: 404 | 409;
19417
19391
  input: {
19418
19392
  param: {
19419
19393
  id: string;
@@ -35322,22 +35296,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
35322
35296
  error: string;
35323
35297
  };
35324
35298
  outputFormat: "json";
35325
- status: 404;
35326
- input: {
35327
- json: {
35328
- message: string;
35329
- };
35330
- } & {
35331
- param: {
35332
- id: string;
35333
- };
35334
- };
35335
- } | {
35336
- output: {
35337
- error: string;
35338
- };
35339
- outputFormat: "json";
35340
- status: 409;
35299
+ status: 404 | 409;
35341
35300
  input: {
35342
35301
  json: {
35343
35302
  message: string;
@@ -35372,18 +35331,7 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
35372
35331
  error: string;
35373
35332
  };
35374
35333
  outputFormat: "json";
35375
- status: 404;
35376
- input: {
35377
- param: {
35378
- id: string;
35379
- };
35380
- };
35381
- } | {
35382
- output: {
35383
- error: string;
35384
- };
35385
- outputFormat: "json";
35386
- status: 409;
35334
+ status: 404 | 409;
35387
35335
  input: {
35388
35336
  param: {
35389
35337
  id: string;
@@ -1,4 +1,4 @@
1
- import { runCheckout, worktreeOf, NO_WORKTREE } from './run-checkout.js';
1
+ import { runCheckout, NO_WORKTREE } from './run-checkout.js';
2
2
  import { adoptFallbackControl, protectFallbackRun, runArtifactDirectory } from './project-run-files.js';
3
3
  import { deleteSavedWorkflow } from './workflow-files.js';
4
4
  import { projectPaths, fallbackProjectWriteError } from '../project-paths.js';
@@ -36,7 +36,6 @@ import { CompletionActionCoordinator } from './completion-actions.js';
36
36
  import { resolveArchiveOnMerge, resolveGlobalArchiveOnMerge } from '../archive-on-merge-setting.js';
37
37
  import { permissionDecisionSchema } from '../contract/index.js';
38
38
  import { runIdParamSchema as permissionRunIdParamSchema } from '../contract/index.js';
39
- import { autosaveCleanupBlocker } from '../autosave-cleanup.js';
40
39
  import { CheckoutProgressCache } from './checkout-progress.js';
41
40
  import { checkoutProgressParamsSchema, createProjectInputSchema } from '../contract/index.js';
42
41
  import { createWorkspaceLiveRoutes } from './workspace-live-routes.js';
@@ -3491,34 +3490,22 @@ export function createApp(deps) {
3491
3490
  });
3492
3491
  })
3493
3492
  .post('/runs/:id/git/commit', jsonZodValidator(gitCommitSchema), async (c) => {
3494
- const { store } = c.get('project');
3495
- const run = store.getRun(c.req.param('id'));
3496
- if (!run)
3497
- return c.json({ error: 'not found' }, 404);
3498
- const blocker = autosaveCleanupBlocker(store.sourceDataDir(run.id), run.id);
3499
- if (blocker)
3500
- return c.json({ error: blocker }, 409);
3501
- const worktree = worktreeOf(run);
3502
- if (!worktree)
3503
- return c.json({ error: NO_WORKTREE }, 409);
3493
+ const checkout = runCheckout(c.get('project'), c.req.param('id'), 'mutate');
3494
+ if ('status' in checkout)
3495
+ return c.json(checkout.body, checkout.status);
3504
3496
  const parsed = { data: c.req.valid('json') };
3505
- const result = await commitAll(worktree, parsed.data.message);
3497
+ const result = await commitAll(checkout.directory, parsed.data.message);
3506
3498
  if (!result.ok)
3507
3499
  return c.json({ error: result.error }, 409);
3508
3500
  return c.json({ committed: true, sha: result.sha });
3509
3501
  })
3510
3502
  .post('/runs/:id/git/push', async (c) => {
3511
- const { root: repoRoot, store } = c.get('project');
3512
- const run = store.getRun(c.req.param('id'));
3513
- if (!run)
3514
- return c.json({ error: 'not found' }, 404);
3515
- const blocker = autosaveCleanupBlocker(store.sourceDataDir(run.id), run.id);
3516
- if (blocker)
3517
- return c.json({ error: blocker }, 409);
3518
- const worktree = worktreeOf(run);
3519
- if (!worktree)
3520
- return c.json({ error: NO_WORKTREE }, 409);
3521
- const result = await pushCurrentBranch(worktree);
3503
+ const { root: repoRoot } = c.get('project');
3504
+ const checkout = runCheckout(c.get('project'), c.req.param('id'), 'mutate');
3505
+ if ('status' in checkout)
3506
+ return c.json(checkout.body, checkout.status);
3507
+ const { run } = checkout;
3508
+ const result = await pushCurrentBranch(checkout.directory);
3522
3509
  if (!result.ok)
3523
3510
  return c.json({ error: result.error }, 409);
3524
3511
  const repoBase = forgeWebRoot((await getRepoInfo(repoRoot))?.remote) ?? undefined;