aicodeman 1.44.0 → 1.45.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 +6 -2
- package/dist/case-rename.d.ts +65 -0
- package/dist/case-rename.d.ts.map +1 -0
- package/dist/case-rename.js +198 -0
- package/dist/case-rename.js.map +1 -0
- package/dist/cli-agent.d.ts +60 -1
- package/dist/cli-agent.d.ts.map +1 -1
- package/dist/cli-agent.js +225 -13
- package/dist/cli-agent.js.map +1 -1
- package/dist/config/auth-config.d.ts +16 -1
- package/dist/config/auth-config.d.ts.map +1 -1
- package/dist/config/auth-config.js +16 -1
- package/dist/config/auth-config.js.map +1 -1
- package/dist/host-sensors.d.ts +115 -0
- package/dist/host-sensors.d.ts.map +1 -0
- package/dist/host-sensors.js +457 -0
- package/dist/host-sensors.js.map +1 -0
- package/dist/remote-hosts.d.ts +7 -0
- package/dist/remote-hosts.d.ts.map +1 -1
- package/dist/remote-hosts.js +17 -3
- package/dist/remote-hosts.js.map +1 -1
- package/dist/remote-pane-history.d.ts.map +1 -1
- package/dist/remote-pane-history.js +2 -2
- package/dist/remote-pane-history.js.map +1 -1
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +13 -0
- package/dist/session.js.map +1 -1
- package/dist/tmux-manager.d.ts +7 -3
- package/dist/tmux-manager.d.ts.map +1 -1
- package/dist/tmux-manager.js +47 -15
- package/dist/tmux-manager.js.map +1 -1
- package/dist/tmux-prefix-table.d.ts +37 -5
- package/dist/tmux-prefix-table.d.ts.map +1 -1
- package/dist/tmux-prefix-table.js +40 -5
- package/dist/tmux-prefix-table.js.map +1 -1
- package/dist/tui/tui-app.d.ts +8 -1
- package/dist/tui/tui-app.d.ts.map +1 -1
- package/dist/tui/tui-app.js +49 -12
- package/dist/tui/tui-app.js.map +1 -1
- package/dist/tui/tui-client.d.ts +90 -3
- package/dist/tui/tui-client.d.ts.map +1 -1
- package/dist/tui/tui-client.js +195 -26
- package/dist/tui/tui-client.js.map +1 -1
- package/dist/web/agent-inbox-persistence.d.ts +52 -0
- package/dist/web/agent-inbox-persistence.d.ts.map +1 -0
- package/dist/web/agent-inbox-persistence.js +139 -0
- package/dist/web/agent-inbox-persistence.js.map +1 -0
- package/dist/web/agent-inbox.d.ts +140 -0
- package/dist/web/agent-inbox.d.ts.map +1 -0
- package/dist/web/agent-inbox.js +258 -0
- package/dist/web/agent-inbox.js.map +1 -0
- package/dist/web/middleware/auth.d.ts +2 -0
- package/dist/web/middleware/auth.d.ts.map +1 -1
- package/dist/web/middleware/auth.js +145 -52
- package/dist/web/middleware/auth.js.map +1 -1
- 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.42d0abae.js +43 -0
- package/dist/web/public/app.42d0abae.js.br +0 -0
- package/dist/web/public/app.42d0abae.js.gz +0 -0
- package/dist/web/public/approvals-ui.js.gz +0 -0
- package/dist/web/public/{constants.4866ecc3.js → constants.0b3cdde9.js} +11 -0
- package/dist/web/public/constants.0b3cdde9.js.br +0 -0
- package/dist/web/public/constants.0b3cdde9.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.gz +0 -0
- package/dist/web/public/header-divider.eb2d2463.js +1 -0
- package/dist/web/public/header-divider.eb2d2463.js.br +0 -0
- package/dist/web/public/header-divider.eb2d2463.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.1e68220d.js +2 -0
- package/dist/web/public/i18n.1e68220d.js.br +0 -0
- package/dist/web/public/i18n.1e68220d.js.gz +0 -0
- package/dist/web/public/image-input.941386e7.js.gz +0 -0
- package/dist/web/public/index.html +74 -11
- 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.4e8b20ac.js.gz +0 -0
- package/dist/web/public/{mobile-handlers.44adaa07.js → mobile-handlers.1c0cbcd8.js} +4 -2
- package/dist/web/public/mobile-handlers.1c0cbcd8.js.br +0 -0
- package/dist/web/public/mobile-handlers.1c0cbcd8.js.gz +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.12fb18de.css.gz +0 -0
- package/dist/web/public/notification-manager.feb82c04.js.gz +0 -0
- package/dist/web/public/orchestrator-panel.js.gz +0 -0
- package/dist/web/public/{panels-ui.cbb24ba1.js → panels-ui.78c3defb.js} +76 -70
- package/dist/web/public/panels-ui.78c3defb.js.br +0 -0
- package/dist/web/public/panels-ui.78c3defb.js.gz +0 -0
- package/dist/web/public/ralph-panel.b350e2ef.js.gz +0 -0
- package/dist/web/public/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.d7adcf6a.js.gz +0 -0
- package/dist/web/public/sanitize-html.e7147e76.js.gz +0 -0
- package/dist/web/public/session-lineage.js.gz +0 -0
- package/dist/web/public/{session-ui.9c1f009b.js → session-ui.ea6b1994.js} +28 -26
- package/dist/web/public/session-ui.ea6b1994.js.br +0 -0
- package/dist/web/public/session-ui.ea6b1994.js.gz +0 -0
- package/dist/web/public/{settings-ui.fea9ddae.js → settings-ui.085dd202.js} +3 -3
- package/dist/web/public/settings-ui.085dd202.js.br +0 -0
- package/dist/web/public/settings-ui.085dd202.js.gz +0 -0
- package/dist/web/public/spreadsheet-preview-worker.js.gz +0 -0
- package/dist/web/public/spreadsheet-preview.75c751de.js.gz +0 -0
- package/dist/web/public/spreadsheet-xlsx-core.js.gz +0 -0
- package/dist/web/public/styles.3b59b41d.css +1 -0
- package/dist/web/public/styles.3b59b41d.css.br +0 -0
- package/dist/web/public/styles.3b59b41d.css.gz +0 -0
- package/dist/web/public/subagent-windows.07277a58.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.2d6189f7.js.gz +0 -0
- package/dist/web/public/tab-rail-resize.7157e0bd.js.gz +0 -0
- package/dist/web/public/terminal-keycode229-recovery.af09f99a.js.gz +0 -0
- package/dist/web/public/terminal-split.js.gz +0 -0
- package/dist/web/public/terminal-tile.js +8 -1
- package/dist/web/public/terminal-tile.js.br +0 -0
- package/dist/web/public/terminal-tile.js.gz +0 -0
- package/dist/web/public/terminal-ui.fb2a27f5.js +2 -0
- package/dist/web/public/terminal-ui.fb2a27f5.js.br +0 -0
- package/dist/web/public/terminal-ui.fb2a27f5.js.gz +0 -0
- package/dist/web/public/tile-grid.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/vendor/dompurify.min.js.gz +0 -0
- package/dist/web/public/vendor/exceljs.min.js.gz +0 -0
- package/dist/web/public/vendor/fflate.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.ae5e3d5d.js.gz +0 -0
- package/dist/web/public/vendor/xterm-zerolag-input.0b69623c.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.2342c37b.js.gz +0 -0
- package/dist/web/public/voice-pcm-worklet.js.gz +0 -0
- package/dist/web/public/webview-tabs.js.gz +0 -0
- package/dist/web/public/whats-new.json +9 -9
- package/dist/web/route-helpers.d.ts +57 -6
- package/dist/web/route-helpers.d.ts.map +1 -1
- package/dist/web/route-helpers.js +72 -4
- package/dist/web/route-helpers.js.map +1 -1
- package/dist/web/routes/case-routes.d.ts.map +1 -1
- package/dist/web/routes/case-routes.js +183 -2
- package/dist/web/routes/case-routes.js.map +1 -1
- package/dist/web/routes/inbox-routes.d.ts +43 -0
- package/dist/web/routes/inbox-routes.d.ts.map +1 -0
- package/dist/web/routes/inbox-routes.js +148 -0
- package/dist/web/routes/inbox-routes.js.map +1 -0
- package/dist/web/routes/index.d.ts +1 -0
- package/dist/web/routes/index.d.ts.map +1 -1
- package/dist/web/routes/index.js +1 -0
- package/dist/web/routes/index.js.map +1 -1
- package/dist/web/routes/session-routes.d.ts.map +1 -1
- package/dist/web/routes/session-routes.js +25 -47
- package/dist/web/routes/session-routes.js.map +1 -1
- package/dist/web/routes/system-routes.d.ts.map +1 -1
- package/dist/web/routes/system-routes.js +23 -2
- package/dist/web/routes/system-routes.js.map +1 -1
- package/dist/web/schemas.d.ts +26 -0
- package/dist/web/schemas.d.ts.map +1 -1
- package/dist/web/schemas.js +48 -0
- package/dist/web/schemas.js.map +1 -1
- package/dist/web/sensitive-path.d.ts.map +1 -1
- package/dist/web/sensitive-path.js +2 -0
- package/dist/web/sensitive-path.js.map +1 -1
- package/dist/web/server.d.ts +2 -0
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +61 -3
- package/dist/web/server.js.map +1 -1
- package/dist/web/session-wait-registry.d.ts +48 -4
- package/dist/web/session-wait-registry.d.ts.map +1 -1
- package/dist/web/session-wait-registry.js +144 -6
- package/dist/web/session-wait-registry.js.map +1 -1
- package/dist/web/sse-events.d.ts +4 -1
- package/dist/web/sse-events.d.ts.map +1 -1
- package/dist/web/sse-events.js +4 -1
- package/dist/web/sse-events.js.map +1 -1
- package/package.json +1 -1
- package/skills/codeman/SKILL.md +7 -4
- package/skills/codeman/preamble.sh +3 -3
- package/skills/codeman/reference/endpoints.md +24 -3
- package/skills/codeman/reference/verbs.md +47 -0
- package/dist/web/public/app.9314ee60.js +0 -43
- package/dist/web/public/app.9314ee60.js.br +0 -0
- package/dist/web/public/app.9314ee60.js.gz +0 -0
- package/dist/web/public/constants.4866ecc3.js.br +0 -0
- package/dist/web/public/constants.4866ecc3.js.gz +0 -0
- package/dist/web/public/i18n.22ca902b.js +0 -2
- package/dist/web/public/i18n.22ca902b.js.br +0 -0
- package/dist/web/public/i18n.22ca902b.js.gz +0 -0
- package/dist/web/public/mobile-handlers.44adaa07.js.br +0 -0
- package/dist/web/public/mobile-handlers.44adaa07.js.gz +0 -0
- package/dist/web/public/panels-ui.cbb24ba1.js.br +0 -0
- package/dist/web/public/panels-ui.cbb24ba1.js.gz +0 -0
- package/dist/web/public/session-ui.9c1f009b.js.br +0 -0
- package/dist/web/public/session-ui.9c1f009b.js.gz +0 -0
- package/dist/web/public/settings-ui.fea9ddae.js.br +0 -0
- package/dist/web/public/settings-ui.fea9ddae.js.gz +0 -0
- package/dist/web/public/styles.e096fcd6.css +0 -1
- package/dist/web/public/styles.e096fcd6.css.br +0 -0
- package/dist/web/public/styles.e096fcd6.css.gz +0 -0
- package/dist/web/public/terminal-ui.68dbd352.js +0 -2
- package/dist/web/public/terminal-ui.68dbd352.js.br +0 -0
- package/dist/web/public/terminal-ui.68dbd352.js.gz +0 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Covers session CRUD, input/output, terminal buffer, quick-start, quick-run,
|
|
4
4
|
* auto-clear, auto-compact, image watcher, flicker filter, and logout.
|
|
5
5
|
*/
|
|
6
|
+
import { claudeProjectDirName } from '../../case-rename.js';
|
|
6
7
|
import { join, dirname, extname, basename, resolve as resolvePath } from 'node:path';
|
|
7
8
|
import { homedir } from 'node:os';
|
|
8
9
|
import { existsSync, statSync, mkdirSync, writeFileSync } from 'node:fs';
|
|
@@ -27,8 +28,9 @@ import { TabLayoutValidationError } from '../../tab-layout.js';
|
|
|
27
28
|
import { sessionWaits, resolveWaitSignals, sessionHookOptions, signalForStatus, WaitCapacityError, } from '../session-wait-registry.js';
|
|
28
29
|
import { RemoteWakeRegistry, REMOTE_WAKE_REQUEST_READY_TIMEOUT_MS, createDefaultRemoteWakeDeps, isProbeable, } from '../../remote-wake.js';
|
|
29
30
|
import { clampWaitMs, MAX_BUFFER_SCAN_BYTES } from '../../config/agent-wait.js';
|
|
30
|
-
import { autoConfigureRalph, canAccessOwned, CASES_DIR, findPersistedSessionOrFail, findSessionOrFail, getAuthUser, isAdmin, isPlainPromptInput, isWorkingDirAllowed, ownerFor, parseBody, persistAndBroadcastSession, readJsonConfig, resolveAgentCaseOrigin, resolveCasesDir, resolveParentSessionId, sessionCapacityMessage, SETTINGS_PATH, validatePathWithinBase, } from '../route-helpers.js';
|
|
31
|
+
import { autoConfigureRalph, canAccessOwned, CASES_DIR, findPersistedSessionOrFail, findSessionOrFail, getAuthUser, isAdmin, isPlainPromptInput, isWorkingDirAllowed, ownerFor, parseBody, persistAndBroadcastSession, readJsonConfig, resolveAgentCaseOrigin, resolveCasesDir, resolveParentSessionId, sessionCapacityMessage, SETTINGS_PATH, validatePathWithinBase, waitCapacityResponse, abortOnClientHangUp, } from '../route-helpers.js';
|
|
31
32
|
import { buildAgentCaseMarker, writeAgentCaseMarker } from '../../agent-case-marker.js';
|
|
33
|
+
import { agentInbox } from '../agent-inbox.js';
|
|
32
34
|
import { canUsernameRunPrivilegedCommands, resolveClaudeModeForUsername } from '../../user-store.js';
|
|
33
35
|
import { clampEnvOverridesForOwner } from '../../session-env-clamp.js';
|
|
34
36
|
import { enabledClis, getCli } from '../../config/cli-registry/registry.js';
|
|
@@ -548,22 +550,6 @@ function parseWaitQuery(schema, query, label) {
|
|
|
548
550
|
body: createErrorResponse(ApiErrorCode.INVALID_INPUT, message),
|
|
549
551
|
});
|
|
550
552
|
}
|
|
551
|
-
/**
|
|
552
|
-
* Map a waiter-cap rejection to the code that tells the caller the truth.
|
|
553
|
-
*
|
|
554
|
-
* The two caps mean different things and warrant different recovery: `session` is
|
|
555
|
-
* genuinely about THIS session, while `owner` and `total` are process-wide budgets
|
|
556
|
-
* that say nothing about it. Reporting a global cap as `SESSION_BUSY` (409,
|
|
557
|
-
* documented as "Session is busy") sent an agent off to a different session to hit
|
|
558
|
-
* the identical error. `RATE_LIMITED` is the code whose whole meaning is "come back
|
|
559
|
-
* later", and clients and proxies already treat 429 that way.
|
|
560
|
-
*/
|
|
561
|
-
function waitCapacityResponse(err) {
|
|
562
|
-
const code = err.scope === 'session' ? ApiErrorCode.SESSION_BUSY : ApiErrorCode.RATE_LIMITED;
|
|
563
|
-
// The registry's message already names the scope and the limit; passing it through
|
|
564
|
-
// verbatim keeps the wording in one place.
|
|
565
|
-
return createErrorResponse(code, err.message);
|
|
566
|
-
}
|
|
567
553
|
/**
|
|
568
554
|
* The signal a session is ALREADY emitting, corrected for liveness.
|
|
569
555
|
*
|
|
@@ -730,34 +716,6 @@ export function _resetPaneLivenessState() {
|
|
|
730
716
|
export function _paneDeathWatcherCount() {
|
|
731
717
|
return paneDeathWatchers.size;
|
|
732
718
|
}
|
|
733
|
-
/**
|
|
734
|
-
* An `AbortController` that fires when the CLIENT goes away, and only then.
|
|
735
|
-
*
|
|
736
|
-
* Freeing an abandoned waiter matters because the documented pattern is a loop of
|
|
737
|
-
* short waits: `curl --max-time 30 ".../wait?timeout=600000"` abandons a live waiter
|
|
738
|
-
* every iteration until the cap is hit and an innocent session reports busy. Same for
|
|
739
|
-
* any proxy that cuts the connection.
|
|
740
|
-
*
|
|
741
|
-
* ⚠️ **It must listen on the RESPONSE, not the request.** `req.raw` emits `'close'`
|
|
742
|
-
* as soon as the request body has finished streaming, which on a POST is BEFORE the
|
|
743
|
-
* handler ever blocks — measured at +1ms with `aborted: false`, indistinguishable
|
|
744
|
-
* from a real hang-up at +0ms. Wiring the abort there cancels every send-and-wait
|
|
745
|
-
* instantly and silently kills the feature (it survives on GET only because a GET has
|
|
746
|
-
* no body to finish). `reply.raw` emits `'close'` both when the response completes
|
|
747
|
-
* and when the socket dies, and `writableFinished` is what tells those apart: true
|
|
748
|
-
* only if the response actually went out. The guard is load-bearing, not defensive.
|
|
749
|
-
*
|
|
750
|
-
* `app.inject()` never emits `'close'` at all, so this is only observable over real
|
|
751
|
-
* HTTP — which is why the regression test for it binds a port.
|
|
752
|
-
*/
|
|
753
|
-
function abortOnClientHangUp(reply) {
|
|
754
|
-
const controller = new AbortController();
|
|
755
|
-
reply.raw.on('close', () => {
|
|
756
|
-
if (!reply.raw.writableFinished)
|
|
757
|
-
controller.abort();
|
|
758
|
-
});
|
|
759
|
-
return controller;
|
|
760
|
-
}
|
|
761
719
|
/**
|
|
762
720
|
* Inject the agent skill into a case on create, surfacing only the REFUSALS.
|
|
763
721
|
*
|
|
@@ -1403,6 +1361,9 @@ options = {}) {
|
|
|
1403
1361
|
// below re-looks-up the record by id, so the returned SessionState is unused here.
|
|
1404
1362
|
findPersistedSessionOrFail(ctx.store, id, req);
|
|
1405
1363
|
ctx.store.demoteOrRemoveSession(id);
|
|
1364
|
+
// A detached session kept its agent inbox (server.ts _doCleanupSession drops it
|
|
1365
|
+
// only on killMux); retiring the row is the delete, so the mail goes now.
|
|
1366
|
+
agentInbox.drop(id);
|
|
1406
1367
|
// Mirrors the broadcast at the tail of the live-session cleanup path
|
|
1407
1368
|
// (_doCleanupSession in server.ts) — without it, other open tabs keep
|
|
1408
1369
|
// showing the retired row until their next unrelated fetch.
|
|
@@ -4453,6 +4414,7 @@ options = {}) {
|
|
|
4453
4414
|
if (!stat?.isDirectory())
|
|
4454
4415
|
return out;
|
|
4455
4416
|
const workingDir = await decodeProjectKey(projDir);
|
|
4417
|
+
const staleCwd = new Map();
|
|
4456
4418
|
const entries = await fs.readdir(projPath).catch(() => []);
|
|
4457
4419
|
for (const entry of entries) {
|
|
4458
4420
|
if (!entry.endsWith('.jsonl'))
|
|
@@ -4554,13 +4516,29 @@ options = {}) {
|
|
|
4554
4516
|
worktreeName: headGit.worktreeName ?? tailGit.worktreeName,
|
|
4555
4517
|
worktreeRepo: headGit.worktreeRepo ?? tailGit.worktreeRepo,
|
|
4556
4518
|
};
|
|
4519
|
+
// A case rename moves the project directory but leaves the old path in each transcript's
|
|
4520
|
+
// cwd. When that cwd is gone and the decoded key is a real folder that encodes back to this
|
|
4521
|
+
// very key (not the $HOME collapse of #265), the key is the truer answer.
|
|
4522
|
+
let cwd = git.cwd;
|
|
4523
|
+
if (cwd !== undefined && cwd !== workingDir) {
|
|
4524
|
+
let stale = staleCwd.get(cwd);
|
|
4525
|
+
if (stale === undefined) {
|
|
4526
|
+
stale =
|
|
4527
|
+
claudeProjectDirName(workingDir) === projDir &&
|
|
4528
|
+
(await fs.stat(cwd).then(() => false, () => true)) &&
|
|
4529
|
+
(await fs.stat(workingDir).then((s) => s.isDirectory(), () => false));
|
|
4530
|
+
staleCwd.set(cwd, stale);
|
|
4531
|
+
}
|
|
4532
|
+
if (stale)
|
|
4533
|
+
cwd = undefined;
|
|
4534
|
+
}
|
|
4557
4535
|
out.push({
|
|
4558
4536
|
sessionId,
|
|
4559
4537
|
// The transcript's literal cwd beats decodeProjectKey's stat-walked guess,
|
|
4560
4538
|
// which silently collapses to $HOME once the directory is gone (#265).
|
|
4561
4539
|
// Absent cwd falls back to the old behaviour rather than inventing a path.
|
|
4562
|
-
workingDir:
|
|
4563
|
-
workingDirExact:
|
|
4540
|
+
workingDir: cwd ?? workingDir,
|
|
4541
|
+
workingDirExact: cwd !== undefined,
|
|
4564
4542
|
projectKey: projDir,
|
|
4565
4543
|
sizeBytes: fileStat.size,
|
|
4566
4544
|
lastModified: fileStat.mtime.toISOString(),
|