@open-mercato/cezar 0.9.0-pr609.613 → 0.9.0-pr609.618
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/server/server.d.ts +8 -0
- package/dist/server/server.js +54 -0
- package/dist/server/server.js.map +1 -1
- package/dist/server-install/platforms/ubuntu-vps.js +7 -0
- package/dist/server-install/platforms/ubuntu-vps.js.map +1 -1
- package/dist/workflows/run.d.ts +7 -5
- package/dist/workflows/run.js +16 -7
- package/dist/workflows/run.js.map +1 -1
- package/dist/workspace/config.d.ts +30 -0
- package/dist/workspace/config.js +5 -0
- package/dist/workspace/config.js.map +1 -1
- package/dist/workspace/semaphore.d.ts +19 -0
- package/dist/workspace/semaphore.js +43 -3
- package/dist/workspace/semaphore.js.map +1 -1
- package/package.json +1 -1
- package/web/dist/assets/{centered-state-NF79blq7.js → centered-state-D1rqLLOE.js} +11 -11
- package/web/dist/assets/{commit-list-CL8vSWGw.js → commit-list-iUYWRISP.js} +1 -1
- package/web/dist/assets/{compare-variants-CSlZhNkL.js → compare-variants-DizvQatz.js} +1 -1
- package/web/dist/assets/{diff-view-CQHHFGFs.js → diff-view-B8707Yin.js} +1 -1
- package/web/dist/assets/{dist-COA_NSud.js → dist-CwdCOcze.js} +1 -1
- package/web/dist/assets/{git-toolbar-DYcTQXMw.js → git-toolbar-CNZwM-Dr.js} +1 -1
- package/web/dist/assets/{github-Bsa5A7cy.js → github-50Vl3ivh.js} +1 -1
- package/web/dist/assets/index-BJnAyNRa.js +30 -0
- package/web/dist/assets/index-CBU6DKs3.css +2 -0
- package/web/dist/assets/{project-router-CBzGUqvS.js → project-router-J_HzQ1Zf.js} +1 -1
- package/web/dist/assets/{repo-git-CeOp4SuF.js → repo-git-DE0P1Oey.js} +1 -1
- package/web/dist/assets/{run-diff-CkBfZAmd.js → run-diff-L2UggODK.js} +1 -1
- package/web/dist/assets/{run-header-DynOcA_S.js → run-header-Cd-IiMs9.js} +1 -1
- package/web/dist/assets/{skills-DeNJs1CQ.js → skills-BYJMsPRc.js} +1 -1
- package/web/dist/assets/{tab-link-DTQ9FBZY.js → tab-link-De8Tf0qM.js} +1 -1
- package/web/dist/assets/{task-changes-BJ-Z_6E-.js → task-changes-DqicF-XA.js} +1 -1
- package/web/dist/assets/{task-commits-BDt6B_rd.js → task-commits-C5WjaprK.js} +1 -1
- package/web/dist/assets/{task-files-Cf8tq1Bm.js → task-files-CPz7l53e.js} +2 -2
- package/web/dist/assets/{task-thread-C91GpKlJ.js → task-thread-B38dVrvC.js} +6 -6
- package/web/dist/assets/{use-desktop-CIaK6C4E.js → use-desktop-kk0c4Yin.js} +2 -2
- package/web/dist/assets/{workflows-Bwz9MmC1.js → workflows-Ooud_8e9.js} +2 -2
- package/web/dist/index.html +5 -5
- package/web/dist/assets/index-3xCBmiOj.js +0 -30
- package/web/dist/assets/index-Mov2Rrbw.css +0 -2
package/dist/server/server.d.ts
CHANGED
|
@@ -114,6 +114,14 @@ export interface RemoveProjectResponse {
|
|
|
114
114
|
removed: true;
|
|
115
115
|
id: string;
|
|
116
116
|
}
|
|
117
|
+
/** `PATCH /api/projects/:projectId` (spec 2026-07-22-per-project-concurrency)
|
|
118
|
+
* — sets or clears a project's per-project `maxParallel`. The entry carries
|
|
119
|
+
* the same `status`/`branch` probe `GET /api/projects` attaches, so the
|
|
120
|
+
* cockpit sees one project shape. `null` in the request clears the override
|
|
121
|
+
* back to "inherit the workspace cap". */
|
|
122
|
+
export interface UpdateProjectResponse {
|
|
123
|
+
project: ProjectListEntry;
|
|
124
|
+
}
|
|
117
125
|
/** `GET/PUT /api/workspace/config` (multi-project spec, step 2.7) — the
|
|
118
126
|
* settings slice of `~/.cezar/config.json`: global knobs ONLY, never the
|
|
119
127
|
* project registry (that is `GET /api/projects`' job). */
|
package/dist/server/server.js
CHANGED
|
@@ -1053,6 +1053,60 @@ export function createApp(deps) {
|
|
|
1053
1053
|
const body = { removed: true, id };
|
|
1054
1054
|
return c.json(body);
|
|
1055
1055
|
});
|
|
1056
|
+
// Edit one field of an existing registry entry (spec
|
|
1057
|
+
// 2026-07-22-per-project-concurrency): the per-project concurrency ceiling.
|
|
1058
|
+
// A PATCH (not PUT) because it touches a single field, and a distinct route
|
|
1059
|
+
// from POST (register-a-folder) to keep register vs. edit semantics clear.
|
|
1060
|
+
// `maxParallel: null` clears the override back to "inherit the workspace
|
|
1061
|
+
// cap". Bounds mirror `workspaceProjectSchema` (config.ts) exactly, so a
|
|
1062
|
+
// value this route accepts can never be degraded away by the next load's
|
|
1063
|
+
// `.catch`.
|
|
1064
|
+
const updateProjectSchema = z.object({
|
|
1065
|
+
maxParallel: z.number().int().min(1).max(16).nullable(),
|
|
1066
|
+
});
|
|
1067
|
+
app.patch('/api/projects/:projectId', async (c) => {
|
|
1068
|
+
const raw = c.req.param('projectId');
|
|
1069
|
+
// Same gate + 404 wording as DELETE: a malformed id is an unknown project.
|
|
1070
|
+
if (!projectIdSchema.safeParse(raw).success) {
|
|
1071
|
+
return c.json({ error: `unknown project: ${raw}` }, 404);
|
|
1072
|
+
}
|
|
1073
|
+
const parsed = updateProjectSchema.safeParse(await c.req.json().catch(() => null));
|
|
1074
|
+
if (!parsed.success) {
|
|
1075
|
+
return c.json({ error: parsed.error.issues.map((i) => i.message).join('; ') }, 400);
|
|
1076
|
+
}
|
|
1077
|
+
// `default` is the boot alias the cockpit is allowed to use everywhere else.
|
|
1078
|
+
const id = raw === 'default' ? await resolveBootProject() : raw;
|
|
1079
|
+
const { maxParallel } = parsed.data;
|
|
1080
|
+
let updated;
|
|
1081
|
+
try {
|
|
1082
|
+
await mergeWriteWorkspaceConfig((config) => {
|
|
1083
|
+
const entry = config.projects.find((p) => p.id === id);
|
|
1084
|
+
if (!entry)
|
|
1085
|
+
return; // unknown id — persisted nothing; answered 404 below
|
|
1086
|
+
// null clears the override; a number sets it. Mutated in place so
|
|
1087
|
+
// `.passthrough()` keys on the entry survive.
|
|
1088
|
+
if (maxParallel === null)
|
|
1089
|
+
delete entry.maxParallel;
|
|
1090
|
+
else
|
|
1091
|
+
entry.maxParallel = maxParallel;
|
|
1092
|
+
updated = entry;
|
|
1093
|
+
});
|
|
1094
|
+
}
|
|
1095
|
+
catch (err) {
|
|
1096
|
+
// e.g. a read-only home — nothing was persisted (atomic tmp+rename).
|
|
1097
|
+
return c.json({ error: err instanceof Error ? err.message : String(err) }, 500);
|
|
1098
|
+
}
|
|
1099
|
+
if (!updated)
|
|
1100
|
+
return c.json({ error: `unknown project: ${id}` }, 404);
|
|
1101
|
+
// The new ceiling takes effect WITHOUT a restart: refresh the shared
|
|
1102
|
+
// semaphore's snapshot and pump every manager — the same live-apply hook
|
|
1103
|
+
// `PUT /api/workspace/config` fires for a workspace-cap change.
|
|
1104
|
+
await deps.semaphore?.refresh();
|
|
1105
|
+
const body = {
|
|
1106
|
+
project: { ...updated, ...(await probeProjectStatus(updated.root)) },
|
|
1107
|
+
};
|
|
1108
|
+
return c.json(body);
|
|
1109
|
+
});
|
|
1056
1110
|
// ---- GUI clone (multi-project spec, step 4.3) ----------------------------
|
|
1057
1111
|
// "Add project → Clone from GitHub": clone into the checkout root, then
|
|
1058
1112
|
// register the result through `registerFolder` above (same guards, same
|