@wjarka/cezarion 0.13.6 → 0.14.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.
- package/README.md +27 -3
- package/dist/agent-config/catalog.d.ts +2 -0
- package/dist/agent-config/catalog.js +40 -2
- package/dist/agent-config/catalog.js.map +1 -1
- package/dist/agent-config/models.js +4 -0
- package/dist/agent-config/models.js.map +1 -1
- package/dist/automations/types.d.ts +4 -0
- package/dist/config.d.ts +2 -0
- package/dist/config.js +1 -0
- package/dist/config.js.map +1 -1
- package/dist/contract/agent-config.d.ts +2 -0
- package/dist/contract/agent-profiles.d.ts +15 -0
- package/dist/contract/automations.d.ts +16 -0
- package/dist/contract/delegation.d.ts +6 -0
- package/dist/contract/health.d.ts +4 -0
- package/dist/contract/index.js +20 -11
- package/dist/contract/runs.d.ts +25 -3
- package/dist/contract/skills.d.ts +3 -0
- package/dist/contract/workflows.d.ts +6 -0
- package/dist/contract/workspace.d.ts +20 -2
- package/dist/core/agent-env.js +1 -0
- package/dist/core/agent-env.js.map +1 -1
- package/dist/core/agent-profiles.js +3 -0
- package/dist/core/agent-profiles.js.map +1 -1
- package/dist/core/agent-runner.d.ts +1 -1
- package/dist/core/agent-runner.js +1 -1
- package/dist/core/agent-runner.js.map +1 -1
- package/dist/core/backend-detect.d.ts +1 -1
- package/dist/core/backend-detect.js +14 -0
- package/dist/core/backend-detect.js.map +1 -1
- package/dist/core/cursor-acp-runner.d.ts +15 -0
- package/dist/core/cursor-acp-runner.js +466 -0
- package/dist/core/cursor-acp-runner.js.map +1 -0
- package/dist/core/cursor-config-options.d.ts +18 -0
- package/dist/core/cursor-config-options.js +31 -0
- package/dist/core/cursor-config-options.js.map +1 -0
- package/dist/core/cursor-model-catalog.d.ts +23 -0
- package/dist/core/cursor-model-catalog.js +271 -0
- package/dist/core/cursor-model-catalog.js.map +1 -0
- package/dist/core/cursor-ui-mapper.d.ts +29 -0
- package/dist/core/cursor-ui-mapper.js +272 -0
- package/dist/core/cursor-ui-mapper.js.map +1 -0
- package/dist/core/host-model-catalog.js +2 -0
- package/dist/core/host-model-catalog.js.map +1 -1
- package/dist/core/model-identity.js +3 -0
- package/dist/core/model-identity.js.map +1 -1
- package/dist/core/model-presets.js +4 -0
- package/dist/core/model-presets.js.map +1 -1
- package/dist/core/provider-auth.d.ts +1 -1
- package/dist/core/provider-auth.js +30 -1
- package/dist/core/provider-auth.js.map +1 -1
- package/dist/core/runner-factory.js +3 -0
- package/dist/core/runner-factory.js.map +1 -1
- package/dist/core/runner-model-catalog.js +1 -0
- package/dist/core/runner-model-catalog.js.map +1 -1
- package/dist/core/shell-env.d.ts +2 -0
- package/dist/core/shell-env.js +8 -0
- package/dist/core/shell-env.js.map +1 -1
- package/dist/core/ui-events.d.ts +1 -1
- package/dist/delegation/execution-identity.d.ts +3 -0
- package/dist/delegation/execution-identity.js +1 -1
- package/dist/delegation/execution-identity.js.map +1 -1
- package/dist/delegation/provision.js +1 -1
- package/dist/delegation/provision.js.map +1 -1
- package/dist/delegation/routes.d.ts +53 -53
- package/dist/delegation/transport.d.ts +7 -7
- package/dist/paths.js +3 -0
- package/dist/paths.js.map +1 -1
- package/dist/runs/store.d.ts +7 -3
- package/dist/server/open-in-app.js +1 -0
- package/dist/server/open-in-app.js.map +1 -1
- package/dist/server/provider-action-gate.js +1 -0
- package/dist/server/provider-action-gate.js.map +1 -1
- package/dist/server/server.d.ts +1441 -1401
- package/dist/server/server.js +23 -9
- package/dist/server/server.js.map +1 -1
- package/dist/workflows/types.d.ts +3 -0
- package/dist/workflows/types.js +1 -0
- package/dist/workflows/types.js.map +1 -1
- package/dist/workspace/agent-accounts.d.ts +5 -1
- package/dist/workspace/agent-accounts.js +1 -0
- package/dist/workspace/agent-accounts.js.map +1 -1
- package/dist/workspace/agent-profiles.js +1 -1
- package/dist/workspace/agent-profiles.js.map +1 -1
- package/dist/workspace/config.d.ts +3 -1
- package/dist/workspace/config.js +1 -0
- package/dist/workspace/config.js.map +1 -1
- package/package.json +3 -3
- package/scripts/mock-cursor-acp.mjs +77 -0
- package/web/dist/assets/{agent-accounts-CdHFiYTN.js → agent-accounts-MT-jtwOU.js} +1 -1
- package/web/dist/assets/alert-dialog-KUiPIBmb.js +43 -0
- package/web/dist/assets/{collapsible-CI78cX0k.js → collapsible-CkSaP6_n.js} +1 -1
- package/web/dist/assets/{commit-list-D3Cy_0hj.js → commit-list-B47VXJez.js} +1 -1
- package/web/dist/assets/{compare-variants-BkYiBaI1.js → compare-variants-DNqtPFUv.js} +1 -1
- package/web/dist/assets/{diff-DDUpEMjA2.js → diff-C4aSZfrQ2.js} +2 -2
- package/web/dist/assets/{diff-controls-C1THeHoP.js → diff-controls-D5b8ocJ0.js} +1 -1
- package/web/dist/assets/{diff-stat-Cq4juy0u.js → diff-stat-B7f-F8cC.js} +1 -1
- package/web/dist/assets/{diff-view-Coyp_Kst.js → diff-view-BPKHTL85.js} +1 -1
- package/web/dist/assets/{dropdown-menu-BP8LYsNU.js → dropdown-menu-xYcDecNM.js} +1 -1
- package/web/dist/assets/{git-toolbar-BP8_wDyk.js → git-toolbar-C4zVVSpl.js} +1 -1
- package/web/dist/assets/{github-CVranJaK.js → github-D97-DHsF.js} +1 -1
- package/web/dist/assets/{image-preview-DXIixdjJ.js → image-preview-BhuwWeyP.js} +1 -1
- package/web/dist/assets/index-ujHRHX5o.js +7 -0
- package/web/dist/assets/{markdown-uwx4ouIE.js → markdown-CIi0LXvU.js} +1 -1
- package/web/dist/assets/pill-DDhByAhe.js +1 -0
- package/web/dist/assets/{project-router-D9DfwL9L.js → project-router-BOglfKgF.js} +1 -1
- package/web/dist/assets/{prompt-templates-DgR9lv5k.js → prompt-templates-DTSPmJP-.js} +1 -1
- package/web/dist/assets/{repo-git-BLjI-1pn.js → repo-git-DvxUSPot.js} +1 -1
- package/web/dist/assets/{run-diff-DRPGyUPP.js → run-diff-DEVs-zV1.js} +1 -1
- package/web/dist/assets/run-header-Dvb1P3Ge.js +1 -0
- package/web/dist/assets/{skills-DRowiHKX.js → skills-DJ06RZbi.js} +1 -1
- package/web/dist/assets/{tab-link-C5tpLlqv.js → tab-link-ChqeHA8K.js} +1 -1
- package/web/dist/assets/{task-changes-LBnRxH_G.js → task-changes-CIN0MkJE.js} +1 -1
- package/web/dist/assets/{task-commits-lpE22fPa.js → task-commits-BRZshVHV.js} +1 -1
- package/web/dist/assets/{task-files-Dh6SjTQF.js → task-files-BZTNbpcP.js} +1 -1
- package/web/dist/assets/{task-thread-B_74GvMl.js → task-thread-D_N6ELtr.js} +6 -6
- package/web/dist/assets/{textarea-D_Ce7vp0.js → textarea-DdKiIORK.js} +1 -1
- package/web/dist/assets/{thread-loading-CwnPHwar.js → thread-loading-BRM8kyKz.js} +1 -1
- package/web/dist/assets/{token-metrics-BC00XXU8.js → token-metrics-DDvhrHmK.js} +1 -1
- package/web/dist/assets/{utils-B8qbBJrk.js → utils-CG8vWc5K.js} +1 -1
- package/web/dist/assets/{workflows-B2Iq2bcd.js → workflows-CplF7YNk.js} +1 -1
- package/web/dist/assets/{zoomable-image-Idq840Ej.js → zoomable-image-BXioMWqb.js} +1 -1
- package/web/dist/index.html +13 -13
- package/web/dist/assets/alert-dialog-7OZcjFyp.js +0 -43
- package/web/dist/assets/index-CokupxlP.js +0 -7
- package/web/dist/assets/pill-jITycc8f.js +0 -1
- package/web/dist/assets/run-header-DO-yE5Gj.js +0 -1
package/dist/server/server.js
CHANGED
|
@@ -62,7 +62,8 @@ import { PROJECT_ID_RE, defaultWorkspaceConfig, effectiveSkillsAutoUpdate, loadW
|
|
|
62
62
|
import { CONTROL_CHARS_RE, DEFAULT_AGENT_ACCOUNT_ID, defaultAgentAccountStore, isAbsoluteConfigDir, loadAgentAccounts, mergeWriteAgentAccounts, } from '../workspace/agent-accounts.js';
|
|
63
63
|
import { defaultAgentProfile, listAgentProfiles, profileDirState, resolveProfileEnvForRoot, resolveStoredProfile, sameProfileDir, } from '../workspace/agent-profiles.js';
|
|
64
64
|
import { PROFILE_CAPABLE_PROVIDERS, profileEnv, supportsProfiles } from '../core/agent-profiles.js';
|
|
65
|
-
import { withEnvPrefix } from '../core/shell-env.js';
|
|
65
|
+
import { quoteExecutable, withEnvPrefix } from '../core/shell-env.js';
|
|
66
|
+
import { resolveCursorExecutable } from '../core/cursor-model-catalog.js';
|
|
66
67
|
import { allocateProjectSlug, listProjects, normalizeProjectTags, probeProjectStatus, registerProject, removeProject, shouldRegisterProject, } from '../workspace/projects.js';
|
|
67
68
|
import { mergeWriteWorkspaceUiState, readWorkspaceUiState } from '../workspace/ui-state.js';
|
|
68
69
|
import { checkoutRepo } from './checkout.js';
|
|
@@ -1363,7 +1364,7 @@ export function createApp(deps) {
|
|
|
1363
1364
|
workspaceEvents.emit('provider-status', row);
|
|
1364
1365
|
return c.json(result);
|
|
1365
1366
|
})
|
|
1366
|
-
.post('/providers/connect', jsonZodValidator(providerConnectSchema, { message: 'provider must be claude, codex, opencode, or
|
|
1367
|
+
.post('/providers/connect', jsonZodValidator(providerConnectSchema, { message: 'provider must be claude, codex, opencode, pi, or cursor' }), async (c) => {
|
|
1367
1368
|
const body = { data: c.req.valid('json') };
|
|
1368
1369
|
const provider = body.data.provider;
|
|
1369
1370
|
// A NAMED account is refused in hosted mode before anything is resolved, exactly like every
|
|
@@ -2558,6 +2559,7 @@ export function createApp(deps) {
|
|
|
2558
2559
|
codex: z.string().trim().min(1).max(200).nullable().optional(),
|
|
2559
2560
|
opencode: z.string().trim().min(1).max(200).nullable().optional(),
|
|
2560
2561
|
pi: z.string().trim().min(1).max(200).nullable().optional(),
|
|
2562
|
+
cursor: z.string().trim().min(1).max(200).nullable().optional(),
|
|
2561
2563
|
})
|
|
2562
2564
|
.optional(),
|
|
2563
2565
|
})
|
|
@@ -3013,7 +3015,11 @@ export function createApp(deps) {
|
|
|
3013
3015
|
// nothing. The stored record itself is never touched.
|
|
3014
3016
|
const withUsage = (run) => {
|
|
3015
3017
|
const usage = currentUsage(run.id);
|
|
3016
|
-
|
|
3018
|
+
const sessionStep = [...run.steps].reverse().find(step => step.sessionId);
|
|
3019
|
+
const sessionId = sessionStep?.sessionId;
|
|
3020
|
+
const backend = sessionStep?.backend ?? run.runner ?? 'claude';
|
|
3021
|
+
const command = backend === 'cursor' && sessionId ? resumeCommand(backend, sessionId) : null;
|
|
3022
|
+
return { ...run, ...(usage ? { usage } : {}), ...(command ? { cliResumeCommand: command } : {}) };
|
|
3017
3023
|
};
|
|
3018
3024
|
// The inbox half of a composer launch (#374). Since the cockpit's "▶ Run"
|
|
3019
3025
|
// prefills `/new` instead of calling POST /api/todos/:id/start (never launch
|
|
@@ -3465,16 +3471,17 @@ export function createApp(deps) {
|
|
|
3465
3471
|
const sessionId = sessionStep?.sessionId;
|
|
3466
3472
|
if (!sessionId)
|
|
3467
3473
|
return c.json({ error: 'no agent session to resume' }, 409);
|
|
3468
|
-
const
|
|
3474
|
+
const backend = sessionStep?.backend ?? run.runner ?? 'claude';
|
|
3475
|
+
const blocked = await providerActionError([backend]);
|
|
3469
3476
|
if (blocked)
|
|
3470
3477
|
return c.json({ error: blocked }, 409);
|
|
3471
3478
|
const cwd = run.worktreePath && existsSync(run.worktreePath) ? run.worktreePath : repoRoot;
|
|
3472
|
-
const command = resumeCommand(
|
|
3479
|
+
const command = resumeCommand(backend, sessionId);
|
|
3473
3480
|
// Fails closed on an id we do not recognise — see resumeCommand (#431).
|
|
3474
3481
|
if (!command)
|
|
3475
3482
|
return c.json({ error: 'the recorded session id has an unexpected shape' }, 409);
|
|
3476
3483
|
// The account that OWNS this session, not the project's current one (spec 2026-07-29).
|
|
3477
|
-
const account = await handoffEnv(
|
|
3484
|
+
const account = await handoffEnv(backend, sessionStep?.profileId);
|
|
3478
3485
|
if ('error' in account)
|
|
3479
3486
|
return c.json({ error: account.error }, 409);
|
|
3480
3487
|
const fallback = handoffFallbackCommand(cwd, command, account.env);
|
|
@@ -3548,7 +3555,7 @@ export function createApp(deps) {
|
|
|
3548
3555
|
return c.json({ opened: true, path: filePath });
|
|
3549
3556
|
}
|
|
3550
3557
|
// Coding-agent CLI handoff (#cli-handoff, #402): open a terminal in the worktree that resumes
|
|
3551
|
-
// THIS run's session when the chosen CLI
|
|
3558
|
+
// THIS run's latest session when the chosen CLI owns it (and a session exists), or
|
|
3552
3559
|
// starts a fresh CLI there otherwise. Same terminal launcher the Terminal button uses.
|
|
3553
3560
|
// Records that predate the runner choice carry no `runner` at all — they default to Claude
|
|
3554
3561
|
// everywhere else (resumeCommand, the client's resumeHint/cliTargetResumes), so the match
|
|
@@ -3569,8 +3576,10 @@ export function createApp(deps) {
|
|
|
3569
3576
|
const sessionId = sessionStep?.sessionId;
|
|
3570
3577
|
// An id resumeCommand refuses (#431) degrades to a fresh CLI in the worktree,
|
|
3571
3578
|
// exactly like a run that never recorded a session.
|
|
3572
|
-
const resume = sessionId && cliRunner === (run.runner ?? 'claude') ? resumeCommand(cliRunner, sessionId) : null;
|
|
3573
|
-
const command = resume ?? cliRunner;
|
|
3579
|
+
const resume = sessionId && cliRunner === (sessionStep?.backend ?? run.runner ?? 'claude') ? resumeCommand(cliRunner, sessionId) : null;
|
|
3580
|
+
const command = resume ?? (cliRunner === 'cursor' ? quoteExecutable(resolveCursorExecutable(), process.platform) : cliRunner);
|
|
3581
|
+
if (command === null)
|
|
3582
|
+
return c.json({ error: 'the configured Cursor executable cannot be used in a terminal command' }, 409);
|
|
3574
3583
|
// BOTH branches carry the account (spec 2026-07-29-agent-profiles): a resume needs the
|
|
3575
3584
|
// config dir that holds its session, and a FRESH CLI in this worktree should still open
|
|
3576
3585
|
// on the account the project works under — otherwise "Open in → Claude CLI" quietly
|
|
@@ -4813,6 +4822,7 @@ export function createApp(deps) {
|
|
|
4813
4822
|
codex: modelPresetSchema,
|
|
4814
4823
|
opencode: modelPresetSchema,
|
|
4815
4824
|
pi: modelPresetSchema,
|
|
4825
|
+
cursor: modelPresetSchema,
|
|
4816
4826
|
})
|
|
4817
4827
|
.optional(),
|
|
4818
4828
|
// Concurrency + memory guard (Settings → Resources). maxParallel clamps to
|
|
@@ -5382,6 +5392,10 @@ export function resumeCommand(runner, sessionId) {
|
|
|
5382
5392
|
return `codex resume ${sessionId}`;
|
|
5383
5393
|
case 'opencode':
|
|
5384
5394
|
return `opencode --session ${sessionId}`;
|
|
5395
|
+
case 'cursor': {
|
|
5396
|
+
const executable = quoteExecutable(resolveCursorExecutable(), process.platform);
|
|
5397
|
+
return executable === null ? null : `${executable} --resume ${sessionId}`;
|
|
5398
|
+
}
|
|
5385
5399
|
case 'pi':
|
|
5386
5400
|
return `pi --session ${sessionId}`;
|
|
5387
5401
|
default:
|