aicodeman 1.33.3 → 1.35.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 +3 -0
- package/dist/config/cli-registry/schema.d.ts +18 -0
- package/dist/config/cli-registry/schema.d.ts.map +1 -1
- package/dist/config/cli-registry/schema.js +27 -0
- package/dist/config/cli-registry/schema.js.map +1 -1
- package/dist/config/cli-registry/stock.d.ts.map +1 -1
- package/dist/config/cli-registry/stock.js +35 -0
- package/dist/config/cli-registry/stock.js.map +1 -1
- package/dist/config/cli-registry/types.d.ts +33 -0
- package/dist/config/cli-registry/types.d.ts.map +1 -1
- package/dist/config/dependency-registry.d.ts +7 -0
- package/dist/config/dependency-registry.d.ts.map +1 -1
- package/dist/config/dependency-registry.js +15 -0
- package/dist/config/dependency-registry.js.map +1 -1
- package/dist/config/path-probe.d.ts +37 -0
- package/dist/config/path-probe.d.ts.map +1 -0
- package/dist/config/path-probe.js +43 -0
- package/dist/config/path-probe.js.map +1 -0
- package/dist/git-workspace-status.d.ts +220 -0
- package/dist/git-workspace-status.d.ts.map +1 -0
- package/dist/git-workspace-status.js +606 -0
- package/dist/git-workspace-status.js.map +1 -0
- package/dist/hooks-config.d.ts.map +1 -1
- package/dist/hooks-config.js +88 -14
- package/dist/hooks-config.js.map +1 -1
- package/dist/mcp-sync.d.ts +105 -0
- package/dist/mcp-sync.d.ts.map +1 -0
- package/dist/mcp-sync.js +619 -0
- package/dist/mcp-sync.js.map +1 -0
- package/dist/mux-interface.d.ts +4 -0
- package/dist/mux-interface.d.ts.map +1 -1
- package/dist/session-cli-builder.d.ts +20 -1
- package/dist/session-cli-builder.d.ts.map +1 -1
- package/dist/session-cli-builder.js +33 -3
- package/dist/session-cli-builder.js.map +1 -1
- package/dist/session-cli-registry-bridge.d.ts +2 -0
- package/dist/session-cli-registry-bridge.d.ts.map +1 -1
- package/dist/session-cli-registry-bridge.js +15 -8
- package/dist/session-cli-registry-bridge.js.map +1 -1
- package/dist/session.d.ts +19 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +29 -2
- package/dist/session.js.map +1 -1
- package/dist/tmux-manager.d.ts +2 -0
- package/dist/tmux-manager.d.ts.map +1 -1
- package/dist/tmux-manager.js +4 -2
- package/dist/tmux-manager.js.map +1 -1
- package/dist/types/api.d.ts +7 -0
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/api.js.map +1 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +3 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/mcp-sync.d.ts +40 -0
- package/dist/types/mcp-sync.d.ts.map +1 -0
- package/dist/types/mcp-sync.js +8 -0
- package/dist/types/mcp-sync.js.map +1 -0
- package/dist/types/push.d.ts +37 -2
- package/dist/types/push.d.ts.map +1 -1
- package/dist/types/push.js +10 -3
- package/dist/types/push.js.map +1 -1
- package/dist/types/session.d.ts +34 -1
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types/session.js +25 -1
- package/dist/types/session.js.map +1 -1
- package/dist/utils/bounded-path-probe.d.ts +99 -0
- package/dist/utils/bounded-path-probe.d.ts.map +1 -0
- package/dist/utils/bounded-path-probe.js +228 -0
- package/dist/utils/bounded-path-probe.js.map +1 -0
- package/dist/utils/cli-executable-resolver.d.ts +2 -0
- package/dist/utils/cli-executable-resolver.d.ts.map +1 -1
- package/dist/utils/cli-executable-resolver.js +2 -1
- package/dist/utils/cli-executable-resolver.js.map +1 -1
- package/dist/utils/dependency-checker.d.ts +2 -0
- package/dist/utils/dependency-checker.d.ts.map +1 -1
- package/dist/utils/dependency-checker.js +37 -9
- package/dist/utils/dependency-checker.js.map +1 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/web/case-path.d.ts +58 -0
- package/dist/web/case-path.d.ts.map +1 -0
- package/dist/web/case-path.js +182 -0
- package/dist/web/case-path.js.map +1 -0
- package/dist/web/public/admin-ui.js.gz +0 -0
- package/dist/web/public/api-client.c9b1cddc.js.gz +0 -0
- package/dist/web/public/app.b9516c7b.js +43 -0
- package/dist/web/public/app.b9516c7b.js.br +0 -0
- package/dist/web/public/app.b9516c7b.js.gz +0 -0
- package/dist/web/public/approvals-ui.js.gz +0 -0
- package/dist/web/public/constants.d95fade9.js.gz +0 -0
- package/dist/web/public/cron-ui.js.gz +0 -0
- package/dist/web/public/entrance-animations.js.gz +0 -0
- package/dist/web/public/git-status-ui.js +673 -0
- package/dist/web/public/git-status-ui.js.br +0 -0
- package/dist/web/public/git-status-ui.js.gz +0 -0
- package/dist/web/public/home-sessions.js.gz +0 -0
- package/dist/web/public/host-wake-ui.js.gz +0 -0
- package/dist/web/public/i18n.52f5b7cc.js +1 -0
- package/dist/web/public/i18n.52f5b7cc.js.br +0 -0
- package/dist/web/public/i18n.52f5b7cc.js.gz +0 -0
- package/dist/web/public/image-input.a216cf9e.js.gz +0 -0
- package/dist/web/public/index.html +190 -15
- package/dist/web/public/index.html.br +0 -0
- package/dist/web/public/index.html.gz +0 -0
- package/dist/web/public/input-cjk.8bc46081.js.gz +0 -0
- package/dist/web/public/keyboard-accessory.c1e7c7b7.js.gz +0 -0
- package/dist/web/public/mobile-handlers.23a85db1.js.gz +0 -0
- package/dist/web/public/mobile-ime-preview.2dbaf262.js +1 -0
- package/dist/web/public/mobile-ime-preview.2dbaf262.js.br +0 -0
- package/dist/web/public/mobile-ime-preview.2dbaf262.js.gz +0 -0
- package/dist/web/public/mobile-overview.js.gz +0 -0
- package/dist/web/public/mobile.1aa4952d.css.gz +0 -0
- package/dist/web/public/notification-manager.50bb87d8.js.gz +0 -0
- package/dist/web/public/orchestrator-panel.js.gz +0 -0
- package/dist/web/public/panels-ui.6a5898d9.js.gz +0 -0
- package/dist/web/public/ralph-panel.b350e2ef.js.gz +0 -0
- package/dist/web/public/{ralph-wizard.13a1831e.js → ralph-wizard.b6c0dd19.js} +2 -0
- package/dist/web/public/ralph-wizard.b6c0dd19.js.br +0 -0
- package/dist/web/public/{ralph-wizard.13a1831e.js.gz → ralph-wizard.b6c0dd19.js.gz} +0 -0
- package/dist/web/public/readmymind-ui.js.gz +0 -0
- package/dist/web/public/reboot-restore-ui.js.gz +0 -0
- package/dist/web/public/respawn-ui.ff0dae4c.js.gz +0 -0
- package/dist/web/public/sanitize-html.e7147e76.js.gz +0 -0
- package/dist/web/public/session-lineage.js +27 -11
- package/dist/web/public/session-lineage.js.br +0 -0
- package/dist/web/public/session-lineage.js.gz +0 -0
- package/dist/web/public/session-ui.6bddf916.js +89 -0
- package/dist/web/public/session-ui.6bddf916.js.br +0 -0
- package/dist/web/public/session-ui.6bddf916.js.gz +0 -0
- package/dist/web/public/settings-ui.6e798b7b.js +97 -0
- package/dist/web/public/settings-ui.6e798b7b.js.br +0 -0
- package/dist/web/public/settings-ui.6e798b7b.js.gz +0 -0
- package/dist/web/public/styles.2d175c60.css +1 -0
- package/dist/web/public/styles.2d175c60.css.br +0 -0
- package/dist/web/public/styles.2d175c60.css.gz +0 -0
- package/dist/web/public/subagent-windows.e6ca799f.js.gz +0 -0
- package/dist/web/public/sw.js +2 -2
- package/dist/web/public/sw.js.br +0 -0
- package/dist/web/public/sw.js.gz +0 -0
- package/dist/web/public/tab-layout-browser.065fcba4.js +1 -0
- package/dist/web/public/tab-layout-browser.065fcba4.js.br +0 -0
- package/dist/web/public/tab-layout-browser.065fcba4.js.gz +0 -0
- package/dist/web/public/{tab-rail-resize.dcdc5772.js → tab-rail-resize.94cd59f0.js} +1 -1
- package/dist/web/public/tab-rail-resize.94cd59f0.js.br +0 -0
- package/dist/web/public/tab-rail-resize.94cd59f0.js.gz +0 -0
- package/dist/web/public/terminal-keycode229-recovery.fb91b25b.js.gz +0 -0
- package/dist/web/public/terminal-split.js +82 -34
- package/dist/web/public/terminal-split.js.br +0 -0
- package/dist/web/public/terminal-split.js.gz +0 -0
- package/dist/web/public/terminal-ui.a4535311.js +2 -0
- package/dist/web/public/terminal-ui.a4535311.js.br +0 -0
- package/dist/web/public/terminal-ui.a4535311.js.gz +0 -0
- package/dist/web/public/ultracode-panel.js.gz +0 -0
- package/dist/web/public/ultracode-windows.js.gz +0 -0
- package/dist/web/public/upload.html.gz +0 -0
- package/dist/web/public/vendor/dompurify.min.js.gz +0 -0
- package/dist/web/public/vendor/marked.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-fit.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-serialize.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-unicode11.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-webgl.min.js.gz +0 -0
- package/dist/web/public/vendor/{xterm-predictive-echo.bd6882b8.js → xterm-predictive-echo.ae5e3d5d.js} +1 -1
- package/dist/web/public/vendor/{xterm-predictive-echo.bd6882b8.js.br → xterm-predictive-echo.ae5e3d5d.js.br} +0 -0
- package/dist/web/public/vendor/{xterm-predictive-echo.bd6882b8.js.gz → xterm-predictive-echo.ae5e3d5d.js.gz} +0 -0
- package/dist/web/public/vendor/xterm-zerolag-input.bbb5f84c.js +4 -0
- package/dist/web/public/vendor/xterm-zerolag-input.bbb5f84c.js.br +0 -0
- package/dist/web/public/vendor/xterm-zerolag-input.bbb5f84c.js.gz +0 -0
- package/dist/web/public/vendor/xterm.css.gz +0 -0
- package/dist/web/public/vendor/xterm.min.js.gz +0 -0
- package/dist/web/public/voice-input.c4b51eb6.js.gz +0 -0
- package/dist/web/public/voice-pcm-worklet.js.gz +0 -0
- package/dist/web/public/webview-tabs.js +21 -10
- package/dist/web/public/webview-tabs.js.br +0 -0
- package/dist/web/public/webview-tabs.js.gz +0 -0
- package/dist/web/reboot-restore-registry.d.ts +2 -1
- package/dist/web/reboot-restore-registry.d.ts.map +1 -1
- package/dist/web/reboot-restore-registry.js +2 -1
- package/dist/web/reboot-restore-registry.js.map +1 -1
- package/dist/web/routes/case-routes.d.ts.map +1 -1
- package/dist/web/routes/case-routes.js +136 -18
- package/dist/web/routes/case-routes.js.map +1 -1
- package/dist/web/routes/doctor-routes.d.ts +23 -0
- package/dist/web/routes/doctor-routes.d.ts.map +1 -0
- package/dist/web/routes/doctor-routes.js +83 -0
- package/dist/web/routes/doctor-routes.js.map +1 -0
- package/dist/web/routes/git-status-routes.d.ts +16 -0
- package/dist/web/routes/git-status-routes.d.ts.map +1 -0
- package/dist/web/routes/git-status-routes.js +71 -0
- package/dist/web/routes/git-status-routes.js.map +1 -0
- package/dist/web/routes/index.d.ts +4 -0
- package/dist/web/routes/index.d.ts.map +1 -1
- package/dist/web/routes/index.js +4 -0
- package/dist/web/routes/index.js.map +1 -1
- package/dist/web/routes/mcp-sync-routes.d.ts +29 -0
- package/dist/web/routes/mcp-sync-routes.d.ts.map +1 -0
- package/dist/web/routes/mcp-sync-routes.js +83 -0
- package/dist/web/routes/mcp-sync-routes.js.map +1 -0
- package/dist/web/routes/ralph-routes.d.ts.map +1 -1
- package/dist/web/routes/ralph-routes.js +2 -1
- package/dist/web/routes/ralph-routes.js.map +1 -1
- package/dist/web/routes/reboot-restore-routes.d.ts.map +1 -1
- package/dist/web/routes/reboot-restore-routes.js +2 -0
- package/dist/web/routes/reboot-restore-routes.js.map +1 -1
- package/dist/web/routes/session-routes.d.ts.map +1 -1
- package/dist/web/routes/session-routes.js +60 -25
- package/dist/web/routes/session-routes.js.map +1 -1
- package/dist/web/routes/webhook-routes.d.ts +21 -0
- package/dist/web/routes/webhook-routes.d.ts.map +1 -0
- package/dist/web/routes/webhook-routes.js +87 -0
- package/dist/web/routes/webhook-routes.js.map +1 -0
- package/dist/web/schemas.d.ts +48 -2
- package/dist/web/schemas.d.ts.map +1 -1
- package/dist/web/schemas.js +71 -0
- package/dist/web/schemas.js.map +1 -1
- package/dist/web/server.d.ts +4 -0
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +57 -25
- package/dist/web/server.js.map +1 -1
- package/dist/webhook-notify.d.ts +71 -0
- package/dist/webhook-notify.d.ts.map +1 -0
- package/dist/webhook-notify.js +282 -0
- package/dist/webhook-notify.js.map +1 -0
- package/package.json +2 -1
- package/skills/codeman/SKILL.md +26 -8
- package/skills/codeman/preamble.sh +16 -4
- package/skills/codeman/reference/endpoints.md +11 -3
- package/skills/codeman/reference/recipes.md +1 -1
- package/skills/codeman/reference/verbs.md +3 -0
- package/dist/web/public/app.0879466b.js +0 -43
- package/dist/web/public/app.0879466b.js.br +0 -0
- package/dist/web/public/app.0879466b.js.gz +0 -0
- package/dist/web/public/i18n.7f8be985.js +0 -1
- package/dist/web/public/i18n.7f8be985.js.br +0 -0
- package/dist/web/public/i18n.7f8be985.js.gz +0 -0
- package/dist/web/public/ralph-wizard.13a1831e.js.br +0 -0
- package/dist/web/public/session-ui.7575a231.js +0 -89
- package/dist/web/public/session-ui.7575a231.js.br +0 -0
- package/dist/web/public/session-ui.7575a231.js.gz +0 -0
- package/dist/web/public/settings-ui.c68e7f59.js +0 -95
- package/dist/web/public/settings-ui.c68e7f59.js.br +0 -0
- package/dist/web/public/settings-ui.c68e7f59.js.gz +0 -0
- package/dist/web/public/styles.f2b78b86.css +0 -1
- package/dist/web/public/styles.f2b78b86.css.br +0 -0
- package/dist/web/public/styles.f2b78b86.css.gz +0 -0
- package/dist/web/public/tab-rail-resize.dcdc5772.js.br +0 -0
- package/dist/web/public/tab-rail-resize.dcdc5772.js.gz +0 -0
- package/dist/web/public/terminal-ui.d5223c0e.js +0 -2
- package/dist/web/public/terminal-ui.d5223c0e.js.br +0 -0
- package/dist/web/public/terminal-ui.d5223c0e.js.gz +0 -0
- package/dist/web/public/vendor/xterm-zerolag-input.6fee72f2.js +0 -4
- package/dist/web/public/vendor/xterm-zerolag-input.6fee72f2.js.br +0 -0
- package/dist/web/public/vendor/xterm-zerolag-input.6fee72f2.js.gz +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Webhook notification settings (src/webhook-notify.ts).
|
|
3
|
+
*
|
|
4
|
+
* GET /api/webhook — the config WITHOUT its URL (scheme + host only), and the last delivery result
|
|
5
|
+
* PUT /api/webhook — change enabled / kind / url / scope; an empty `url` clears it
|
|
6
|
+
* POST /api/webhook/test — send one test message with the saved config
|
|
7
|
+
*
|
|
8
|
+
* The URL is a bearer secret (anyone holding a Slack/Discord webhook URL can post as it), so it is
|
|
9
|
+
* stored in its own 0600 file and never returned. In multi-user mode all three routes are admin only:
|
|
10
|
+
* the channel receives every session's events, the same reach an admin's own Web Push has.
|
|
11
|
+
*/
|
|
12
|
+
import type { FastifyInstance } from 'fastify';
|
|
13
|
+
import { type WebhookNotifier } from '../../webhook-notify.js';
|
|
14
|
+
export interface WebhookRouteDeps {
|
|
15
|
+
notifier: WebhookNotifier;
|
|
16
|
+
configDir: string;
|
|
17
|
+
/** The instance's window title, so a test message says which machine sent it. */
|
|
18
|
+
hostTitle: () => string;
|
|
19
|
+
}
|
|
20
|
+
export declare function registerWebhookRoutes(app: FastifyInstance, deps: WebhookRouteDeps): void;
|
|
21
|
+
//# sourceMappingURL=webhook-routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook-routes.d.ts","sourceRoot":"","sources":["../../../src/web/routes/webhook-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAgC,MAAM,SAAS,CAAC;AAY7E,OAAO,EAKL,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,eAAe,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,iFAAiF;IACjF,SAAS,EAAE,MAAM,MAAM,CAAC;CACzB;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,eAAe,EAAE,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAqExF"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Webhook notification settings (src/webhook-notify.ts).
|
|
3
|
+
*
|
|
4
|
+
* GET /api/webhook — the config WITHOUT its URL (scheme + host only), and the last delivery result
|
|
5
|
+
* PUT /api/webhook — change enabled / kind / url / scope; an empty `url` clears it
|
|
6
|
+
* POST /api/webhook/test — send one test message with the saved config
|
|
7
|
+
*
|
|
8
|
+
* The URL is a bearer secret (anyone holding a Slack/Discord webhook URL can post as it), so it is
|
|
9
|
+
* stored in its own 0600 file and never returned. In multi-user mode all three routes are admin only:
|
|
10
|
+
* the channel receives every session's events, the same reach an admin's own Web Push has.
|
|
11
|
+
*/
|
|
12
|
+
import { ApiErrorCode, createErrorResponse, getErrorMessage, } from '../../types.js';
|
|
13
|
+
import { isAdmin, parseBody } from '../route-helpers.js';
|
|
14
|
+
import { isMultiUserMode } from '../../config/multiuser.js';
|
|
15
|
+
import { WebhookUpdateSchema } from '../schemas.js';
|
|
16
|
+
import { maskWebhookUrl, readWebhookConfig, webhookUrlProblem, writeWebhookConfig, } from '../../webhook-notify.js';
|
|
17
|
+
export function registerWebhookRoutes(app, deps) {
|
|
18
|
+
const denied = (req, reply) => {
|
|
19
|
+
if (isMultiUserMode() && !isAdmin(req)) {
|
|
20
|
+
reply.code(403);
|
|
21
|
+
return createErrorResponse(ApiErrorCode.FORBIDDEN, 'Admin only in multi-user mode');
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
};
|
|
25
|
+
const status = async () => {
|
|
26
|
+
const cfg = await readWebhookConfig(deps.configDir);
|
|
27
|
+
return {
|
|
28
|
+
enabled: cfg.enabled,
|
|
29
|
+
kind: cfg.kind,
|
|
30
|
+
scope: cfg.scope,
|
|
31
|
+
hasUrl: cfg.url !== '',
|
|
32
|
+
urlMasked: maskWebhookUrl(cfg.url),
|
|
33
|
+
lastResult: deps.notifier.lastResult,
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
app.get('/api/webhook', async (req, reply) => {
|
|
37
|
+
const no = denied(req, reply);
|
|
38
|
+
if (no)
|
|
39
|
+
return no;
|
|
40
|
+
return { success: true, data: await status() };
|
|
41
|
+
});
|
|
42
|
+
app.put('/api/webhook', async (req, reply) => {
|
|
43
|
+
const no = denied(req, reply);
|
|
44
|
+
if (no)
|
|
45
|
+
return no;
|
|
46
|
+
const patch = parseBody(WebhookUpdateSchema, req.body, 'Invalid webhook settings');
|
|
47
|
+
const current = await readWebhookConfig(deps.configDir);
|
|
48
|
+
const next = {
|
|
49
|
+
enabled: patch.enabled ?? current.enabled,
|
|
50
|
+
kind: patch.kind ?? current.kind,
|
|
51
|
+
scope: patch.scope ?? current.scope,
|
|
52
|
+
url: patch.url !== undefined ? patch.url.trim() : current.url,
|
|
53
|
+
};
|
|
54
|
+
if (next.url) {
|
|
55
|
+
const problem = webhookUrlProblem(next.url);
|
|
56
|
+
if (problem) {
|
|
57
|
+
reply.code(400);
|
|
58
|
+
return createErrorResponse(ApiErrorCode.INVALID_INPUT, problem);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (next.enabled && !next.url) {
|
|
62
|
+
reply.code(400);
|
|
63
|
+
return createErrorResponse(ApiErrorCode.INVALID_INPUT, 'Add a webhook URL before enabling notifications');
|
|
64
|
+
}
|
|
65
|
+
try {
|
|
66
|
+
await writeWebhookConfig(deps.configDir, next);
|
|
67
|
+
}
|
|
68
|
+
catch (err) {
|
|
69
|
+
reply.code(500);
|
|
70
|
+
return createErrorResponse(ApiErrorCode.OPERATION_FAILED, getErrorMessage(err));
|
|
71
|
+
}
|
|
72
|
+
return { success: true, data: await status() };
|
|
73
|
+
});
|
|
74
|
+
app.post('/api/webhook/test', async (req, reply) => {
|
|
75
|
+
const no = denied(req, reply);
|
|
76
|
+
if (no)
|
|
77
|
+
return no;
|
|
78
|
+
const cfg = await readWebhookConfig(deps.configDir);
|
|
79
|
+
if (!cfg.url) {
|
|
80
|
+
reply.code(400);
|
|
81
|
+
return createErrorResponse(ApiErrorCode.INVALID_INPUT, 'Save a webhook URL first');
|
|
82
|
+
}
|
|
83
|
+
// 200 even when delivery failed: the request to Codeman worked, `data.ok` says whether the webhook did.
|
|
84
|
+
return { success: true, data: await deps.notifier.sendTest(cfg, deps.hostTitle()) };
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=webhook-routes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook-routes.js","sourceRoot":"","sources":["../../../src/web/routes/webhook-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,eAAe,GAIhB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,GAEnB,MAAM,yBAAyB,CAAC;AASjC,MAAM,UAAU,qBAAqB,CAAC,GAAoB,EAAE,IAAsB;IAChF,MAAM,MAAM,GAAG,CAAC,GAAmB,EAAE,KAAmB,EAA6B,EAAE;QACrF,IAAI,eAAe,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;YACvC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAChB,OAAO,mBAAmB,CAAC,YAAY,CAAC,SAAS,EAAE,+BAA+B,CAAC,CAAC;QACtF,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,MAAM,MAAM,GAAG,KAAK,IAA4B,EAAE;QAChD,MAAM,GAAG,GAAG,MAAM,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACpD,OAAO;YACL,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,IAAI,EAAE,GAAG,C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C,GAAG,CAAC,CAAC;YAChB,OAAO,mBAAmB,CAAC,YAAY,CAAC,aAAa,EAAE,0BAA0B,CAAC,CAAC;QACrF,CAAC;QACD,wGAAwG;QACxG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC;IACtF,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/web/schemas.d.ts
CHANGED
|
@@ -96,7 +96,9 @@ export declare const CreateSessionSchema: z.ZodObject<{
|
|
|
96
96
|
max: "max";
|
|
97
97
|
ultracode: "ultracode";
|
|
98
98
|
}>>;
|
|
99
|
+
advisorModel: z.ZodOptional<z.ZodString>;
|
|
99
100
|
modelOverride: z.ZodOptional<z.ZodString>;
|
|
101
|
+
model: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
|
|
100
102
|
openCodeConfig: z.ZodOptional<z.ZodObject<{
|
|
101
103
|
model: z.ZodOptional<z.ZodString>;
|
|
102
104
|
autoAllowTools: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -106,6 +108,16 @@ export declare const CreateSessionSchema: z.ZodObject<{
|
|
|
106
108
|
}, z.core.$strip>>;
|
|
107
109
|
codexConfig: z.ZodOptional<z.ZodObject<{
|
|
108
110
|
model: z.ZodOptional<z.ZodString>;
|
|
111
|
+
reasoningEffort: z.ZodOptional<z.ZodEnum<{
|
|
112
|
+
none: "none";
|
|
113
|
+
low: "low";
|
|
114
|
+
medium: "medium";
|
|
115
|
+
high: "high";
|
|
116
|
+
xhigh: "xhigh";
|
|
117
|
+
max: "max";
|
|
118
|
+
minimal: "minimal";
|
|
119
|
+
ultra: "ultra";
|
|
120
|
+
}>>;
|
|
109
121
|
resumeSessionId: z.ZodOptional<z.ZodString>;
|
|
110
122
|
dangerouslyBypassApprovals: z.ZodOptional<z.ZodBoolean>;
|
|
111
123
|
animations: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -138,8 +150,8 @@ export declare const CreateSessionSchema: z.ZodObject<{
|
|
|
138
150
|
high: "high";
|
|
139
151
|
xhigh: "xhigh";
|
|
140
152
|
max: "max";
|
|
141
|
-
off: "off";
|
|
142
153
|
minimal: "minimal";
|
|
154
|
+
off: "off";
|
|
143
155
|
}>>;
|
|
144
156
|
continueSession: z.ZodOptional<z.ZodBoolean>;
|
|
145
157
|
resumeSessionId: z.ZodOptional<z.ZodString>;
|
|
@@ -227,6 +239,7 @@ export declare const StatusTelemetrySchema: z.ZodObject<{
|
|
|
227
239
|
export declare const CreateCaseSchema: z.ZodObject<{
|
|
228
240
|
name: z.ZodString;
|
|
229
241
|
description: z.ZodOptional<z.ZodString>;
|
|
242
|
+
path: z.ZodOptional<z.ZodString>;
|
|
230
243
|
}, z.core.$strip>;
|
|
231
244
|
/**
|
|
232
245
|
* Schema for POST /api/cases/clone — issue #236.
|
|
@@ -397,6 +410,16 @@ export declare const QuickStartSchema: z.ZodObject<{
|
|
|
397
410
|
}, z.core.$strip>>;
|
|
398
411
|
codexConfig: z.ZodOptional<z.ZodObject<{
|
|
399
412
|
model: z.ZodOptional<z.ZodString>;
|
|
413
|
+
reasoningEffort: z.ZodOptional<z.ZodEnum<{
|
|
414
|
+
none: "none";
|
|
415
|
+
low: "low";
|
|
416
|
+
medium: "medium";
|
|
417
|
+
high: "high";
|
|
418
|
+
xhigh: "xhigh";
|
|
419
|
+
max: "max";
|
|
420
|
+
minimal: "minimal";
|
|
421
|
+
ultra: "ultra";
|
|
422
|
+
}>>;
|
|
400
423
|
resumeSessionId: z.ZodOptional<z.ZodString>;
|
|
401
424
|
dangerouslyBypassApprovals: z.ZodOptional<z.ZodBoolean>;
|
|
402
425
|
animations: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -429,8 +452,8 @@ export declare const QuickStartSchema: z.ZodObject<{
|
|
|
429
452
|
high: "high";
|
|
430
453
|
xhigh: "xhigh";
|
|
431
454
|
max: "max";
|
|
432
|
-
off: "off";
|
|
433
455
|
minimal: "minimal";
|
|
456
|
+
off: "off";
|
|
434
457
|
}>>;
|
|
435
458
|
continueSession: z.ZodOptional<z.ZodBoolean>;
|
|
436
459
|
resumeSessionId: z.ZodOptional<z.ZodString>;
|
|
@@ -467,6 +490,7 @@ export declare const QuickStartSchema: z.ZodObject<{
|
|
|
467
490
|
max: "max";
|
|
468
491
|
ultracode: "ultracode";
|
|
469
492
|
}>>;
|
|
493
|
+
advisorModel: z.ZodOptional<z.ZodString>;
|
|
470
494
|
agentOrigin: z.ZodOptional<z.ZodString>;
|
|
471
495
|
customModel: z.ZodOptional<z.ZodObject<{
|
|
472
496
|
endpointId: z.ZodString;
|
|
@@ -627,6 +651,7 @@ export declare const SettingsUpdateSchema: z.ZodObject<{
|
|
|
627
651
|
readMyMindEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
628
652
|
customModelEndpointsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
629
653
|
cliManagementEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
654
|
+
mcpSyncEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
630
655
|
readMyMindModel: z.ZodOptional<z.ZodString>;
|
|
631
656
|
tunnelEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
632
657
|
acknowledgeUnauthTunnel: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -655,6 +680,7 @@ export declare const SettingsUpdateSchema: z.ZodObject<{
|
|
|
655
680
|
opusContext1mEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
656
681
|
remoteAutoReconnect: z.ZodOptional<z.ZodBoolean>;
|
|
657
682
|
thinkingEffort: z.ZodOptional<z.ZodString>;
|
|
683
|
+
claudeAdvisorModel: z.ZodOptional<z.ZodString>;
|
|
658
684
|
showFontControls: z.ZodOptional<z.ZodBoolean>;
|
|
659
685
|
showSystemStats: z.ZodOptional<z.ZodBoolean>;
|
|
660
686
|
showTokenCount: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1139,6 +1165,25 @@ export declare const PushSubscribeSchema: z.ZodObject<{
|
|
|
1139
1165
|
export declare const PushPreferencesUpdateSchema: z.ZodObject<{
|
|
1140
1166
|
pushPreferences: z.ZodRecord<z.ZodString, z.ZodBoolean>;
|
|
1141
1167
|
}, z.core.$strip>;
|
|
1168
|
+
/**
|
|
1169
|
+
* PUT /api/webhook. `.strict()` like every settings-shaped schema; `url` is optional so a change of
|
|
1170
|
+
* kind or scope never needs the secret re-sent, and an empty string clears it. The kind and scope
|
|
1171
|
+
* lists are the store's own, so the schema can never accept a value the store would coerce away.
|
|
1172
|
+
*/
|
|
1173
|
+
export declare const WebhookUpdateSchema: z.ZodObject<{
|
|
1174
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
1175
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
1176
|
+
ntfy: "ntfy";
|
|
1177
|
+
slack: "slack";
|
|
1178
|
+
discord: "discord";
|
|
1179
|
+
generic: "generic";
|
|
1180
|
+
}>>;
|
|
1181
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
1182
|
+
attention: "attention";
|
|
1183
|
+
all: "all";
|
|
1184
|
+
}>>;
|
|
1185
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1186
|
+
}, z.core.$strict>;
|
|
1142
1187
|
/** POST /api/ralph-loop/start */
|
|
1143
1188
|
export declare const RalphLoopStartSchema: z.ZodObject<{
|
|
1144
1189
|
caseName: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -1155,6 +1200,7 @@ export declare const RalphLoopStartSchema: z.ZodObject<{
|
|
|
1155
1200
|
max: "max";
|
|
1156
1201
|
ultracode: "ultracode";
|
|
1157
1202
|
}>>;
|
|
1203
|
+
advisorModel: z.ZodOptional<z.ZodString>;
|
|
1158
1204
|
planItems: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1159
1205
|
content: z.ZodString;
|
|
1160
1206
|
priority: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/web/schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/web/schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK/C,sFAAsF;AACtF,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAuBpD;AA4BD,yEAAyE;AACzE,eAAO,MAAM,2BAA2B;;;;;;;iBAQtC,CAAC;AAEH,0EAA0E;AAC1E,eAAO,MAAM,4BAA4B;;;;;;;iBAQvC,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;;;;;;;;kBAcjB,CAAC;AAEZ;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAEzC;AAkVD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,4BAA4B;;;kBAe9B,CAAC;AAEZ;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB;;kBAQxB,CAAC;AAaZ,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0D9B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,eAAe;;iBAE1B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,YAAY;;;;;;;;;iBAKvB,CAAC;AAwBH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;iBAqBhC,CAAC;AAIH;;;GAGG;AACH,eAAO,MAAM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
|
|
12
12
|
import { isBlockedWebviewUrl } from './webview-egress-policy.js';
|
|
13
13
|
import { MAX_TERMINAL_BUFFER_BYTES, MAX_TERMINAL_SCROLLBACK_LINES, MIN_TERMINAL_BUFFER_BYTES, MIN_TERMINAL_SCROLLBACK_LINES, } from '../config/terminal-history.js';
|
|
14
14
|
import { MAX_EDITABLE_BYTES } from '../config/file-editing.js';
|
|
15
|
+
import { CODEX_REASONING_EFFORTS } from '../types/session.js';
|
|
16
|
+
import { WEBHOOK_KINDS, WEBHOOK_SCOPES } from '../types/push.js';
|
|
15
17
|
import { MIN_MATCH_LENGTH, MAX_MATCH_LENGTH } from '../config/agent-wait.js';
|
|
16
18
|
import { MAX_WAKE_MACS } from '../config/remote-wake-limits.js';
|
|
17
19
|
import { MAX_INPUT_LENGTH } from '../config/terminal-limits.js';
|
|
18
20
|
import { enabledCliIds, enabledClis } from '../config/cli-registry/registry.js';
|
|
21
|
+
import { isAdvisorModel } from '../types/session.js';
|
|
19
22
|
// ========== Path Validation ==========
|
|
20
23
|
/** Validate a path string: no shell metacharacters, no traversal, must be absolute */
|
|
21
24
|
export function isValidWorkingDir(p) {
|
|
@@ -222,6 +225,19 @@ const safeEnvOverridesSchema = z
|
|
|
222
225
|
* block in-session `/effort` switching). `ultracode` enables dynamic workflow orchestration.
|
|
223
226
|
*/
|
|
224
227
|
const effortLevelSchema = z.enum(['low', 'medium', 'high', 'xhigh', 'max', 'ultracode']).optional();
|
|
228
|
+
/**
|
|
229
|
+
* Claude advisor model for new sessions: `fable`/`opus`/`sonnet` or a full model id in one of
|
|
230
|
+
* those families (isAdvisorModel). Merged into the launch `--settings` JSON as `advisorModel`,
|
|
231
|
+
* a soft default that /advisor still switches in-session. The allowlist is also the injection
|
|
232
|
+
* guard for the single-quoted `--settings` argument.
|
|
233
|
+
*/
|
|
234
|
+
const advisorModelSchema = z
|
|
235
|
+
.string()
|
|
236
|
+
.max(64)
|
|
237
|
+
.refine((value) => isAdvisorModel(value), {
|
|
238
|
+
message: 'advisorModel must be fable, opus, sonnet or a full claude-fable/opus/sonnet model id',
|
|
239
|
+
})
|
|
240
|
+
.optional();
|
|
225
241
|
// ========== Session Routes ==========
|
|
226
242
|
/**
|
|
227
243
|
* Schema for POST /api/sessions
|
|
@@ -265,6 +281,7 @@ const CodexConfigSchema = z
|
|
|
265
281
|
.max(100)
|
|
266
282
|
.regex(/^[a-zA-Z0-9._\-/]+$/)
|
|
267
283
|
.optional(),
|
|
284
|
+
reasoningEffort: z.enum(CODEX_REASONING_EFFORTS).optional(),
|
|
268
285
|
resumeSessionId: z
|
|
269
286
|
.string()
|
|
270
287
|
.max(100)
|
|
@@ -481,8 +498,25 @@ export const CreateSessionSchema = z.object({
|
|
|
481
498
|
envOverrides: safeEnvOverridesSchema,
|
|
482
499
|
/** Claude CLI effort level (soft default via --settings, switchable in-session via /effort) */
|
|
483
500
|
effort: effortLevelSchema,
|
|
501
|
+
/** Claude advisor model (soft default via --settings, switchable in-session via /advisor) */
|
|
502
|
+
advisorModel: advisorModelSchema,
|
|
484
503
|
/** Model override to write to .claude/settings.local.json (e.g., "opus[1m]"). Empty string clears. */
|
|
485
504
|
modelOverride: z.string().max(50).optional(),
|
|
505
|
+
/**
|
|
506
|
+
* Claude model for THIS session only, passed as `claude --model <id>`; nothing is written to
|
|
507
|
+
* disk. Wins over the app-wide default model. A subset of the registry's `model-claude`
|
|
508
|
+
* pattern, so a value accepted here is never rejected at launch. The first character must be
|
|
509
|
+
* a letter or digit: the value lands in argv, and no model id opens with `-`, so a
|
|
510
|
+
* flag-shaped value is refused here rather than left to the launch quoting. An empty string
|
|
511
|
+
* means no per-session model, as it does for `modelOverride`. Claude only: the route refuses
|
|
512
|
+
* it for any other CLI and on a remote attach.
|
|
513
|
+
*/
|
|
514
|
+
model: z
|
|
515
|
+
.string()
|
|
516
|
+
.max(100)
|
|
517
|
+
.regex(/^[a-zA-Z0-9][a-zA-Z0-9._\-[\]]*$/)
|
|
518
|
+
.or(z.literal(''))
|
|
519
|
+
.optional(),
|
|
486
520
|
openCodeConfig: OpenCodeConfigSchema,
|
|
487
521
|
codexConfig: CodexConfigSchema,
|
|
488
522
|
geminiConfig: GeminiConfigSchema,
|
|
@@ -584,6 +618,13 @@ export const CreateCaseSchema = z.object({
|
|
|
584
618
|
.string()
|
|
585
619
|
.regex(/^[a-zA-Z0-9_-]+$/, 'Invalid case name format. Use only letters, numbers, hyphens, underscores.'),
|
|
586
620
|
description: z.string().max(1000).optional(),
|
|
621
|
+
/**
|
|
622
|
+
* Create the case in this folder instead of under the cases directory. Absolute, or starting with
|
|
623
|
+
* `~`. Only length-bounded here: what makes it acceptable (shape, blocked trees, symlinks, an
|
|
624
|
+
* existing folder with contents) is judged by `prepareNewCasePath()` in web/case-path.ts, which
|
|
625
|
+
* also produces the user-facing reason.
|
|
626
|
+
*/
|
|
627
|
+
path: z.string().min(1).max(1000).optional(),
|
|
587
628
|
});
|
|
588
629
|
/**
|
|
589
630
|
* Schema for POST /api/cases/clone — issue #236.
|
|
@@ -975,6 +1016,8 @@ export const QuickStartSchema = z.object({
|
|
|
975
1016
|
envOverrides: safeEnvOverridesSchema,
|
|
976
1017
|
/** Claude CLI effort level (soft default via --settings, switchable in-session via /effort) */
|
|
977
1018
|
effort: effortLevelSchema,
|
|
1019
|
+
/** Claude advisor model (soft default via --settings, switchable in-session via /advisor) */
|
|
1020
|
+
advisorModel: advisorModelSchema,
|
|
978
1021
|
/**
|
|
979
1022
|
* Who is spawning this worker (`codeman-skill` from the packaged agent skill), or,
|
|
980
1023
|
* equivalently, the `X-Codeman-Agent-Origin` header; the body wins when both are
|
|
@@ -1232,6 +1275,13 @@ export const SettingsUpdateSchema = z
|
|
|
1232
1275
|
* endpoints (PUT/POST/DELETE /api/clis...) answer instead of refusing outright.
|
|
1233
1276
|
*/
|
|
1234
1277
|
cliManagementEnabled: z.boolean().optional(),
|
|
1278
|
+
/**
|
|
1279
|
+
* MCP server sync (src/mcp-sync.ts): copies each enabled CLI's user-level MCP servers into
|
|
1280
|
+
* the other CLIs' own config files. SYNCED, default OFF: it writes other tools' config in
|
|
1281
|
+
* the server user's home (including any env values and headers on the servers), so it is
|
|
1282
|
+
* opt-in. While OFF, GET/POST /api/mcp-sync answer 403 and the Settings controls are hidden.
|
|
1283
|
+
*/
|
|
1284
|
+
mcpSyncEnabled: z.boolean().optional(),
|
|
1235
1285
|
/**
|
|
1236
1286
|
* Read My Mind predictor model override. Empty/absent = the AI-checker
|
|
1237
1287
|
* default (opus: prediction quality is the product and it runs only on an
|
|
@@ -1279,6 +1329,12 @@ export const SettingsUpdateSchema = z
|
|
|
1279
1329
|
// auto-reattached.
|
|
1280
1330
|
remoteAutoReconnect: z.boolean().optional(),
|
|
1281
1331
|
thinkingEffort: z.string().max(20).optional(),
|
|
1332
|
+
/** Advisor model for new Claude sessions ('' = leave it to the CLI's own /advisor choice). */
|
|
1333
|
+
claudeAdvisorModel: z
|
|
1334
|
+
.string()
|
|
1335
|
+
.max(64)
|
|
1336
|
+
.refine((value) => value === '' || isAdvisorModel(value), { message: 'Invalid advisor model' })
|
|
1337
|
+
.optional(),
|
|
1282
1338
|
// UI visibility
|
|
1283
1339
|
showFontControls: z.boolean().optional(),
|
|
1284
1340
|
showSystemStats: z.boolean().optional(),
|
|
@@ -1701,6 +1757,19 @@ export const PushSubscribeSchema = z.object({
|
|
|
1701
1757
|
export const PushPreferencesUpdateSchema = z.object({
|
|
1702
1758
|
pushPreferences: z.record(z.string(), z.boolean()),
|
|
1703
1759
|
});
|
|
1760
|
+
/**
|
|
1761
|
+
* PUT /api/webhook. `.strict()` like every settings-shaped schema; `url` is optional so a change of
|
|
1762
|
+
* kind or scope never needs the secret re-sent, and an empty string clears it. The kind and scope
|
|
1763
|
+
* lists are the store's own, so the schema can never accept a value the store would coerce away.
|
|
1764
|
+
*/
|
|
1765
|
+
export const WebhookUpdateSchema = z
|
|
1766
|
+
.object({
|
|
1767
|
+
enabled: z.boolean().optional(),
|
|
1768
|
+
kind: z.enum(WEBHOOK_KINDS).optional(),
|
|
1769
|
+
scope: z.enum(WEBHOOK_SCOPES).optional(),
|
|
1770
|
+
url: z.string().max(2048).optional(),
|
|
1771
|
+
})
|
|
1772
|
+
.strict();
|
|
1704
1773
|
// ========== Ralph Loop ==========
|
|
1705
1774
|
/** POST /api/ralph-loop/start */
|
|
1706
1775
|
export const RalphLoopStartSchema = z.object({
|
|
@@ -1716,6 +1785,8 @@ export const RalphLoopStartSchema = z.object({
|
|
|
1716
1785
|
envOverrides: safeEnvOverridesSchema,
|
|
1717
1786
|
/** Claude CLI effort level (soft default via --settings, switchable in-session via /effort) */
|
|
1718
1787
|
effort: effortLevelSchema,
|
|
1788
|
+
/** Claude advisor model (soft default via --settings, switchable in-session via /advisor) */
|
|
1789
|
+
advisorModel: advisorModelSchema,
|
|
1719
1790
|
planItems: z
|
|
1720
1791
|
.array(z.object({
|
|
1721
1792
|
content: z.string(),
|