toolroll 0.9.109 → 0.9.111
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/CHANGELOG.md +73 -0
- package/README.md +5 -1
- package/THIRD_PARTY_NOTICES.md +30 -0
- package/dist/agent-detect.js +244 -0
- package/dist/agent-fence.js +12 -1
- package/dist/agent-said-schema.js +4 -0
- package/dist/agent-said.js +23 -0
- package/dist/agentconfig.js +2 -2
- package/dist/approval-summary.js +375 -0
- package/dist/attest.js +2 -2
- package/dist/browser/THIRD_PARTY_NOTICES.txt +30 -0
- package/dist/browser/workspace.css +2 -2
- package/dist/browser/workspace.js +27 -27
- package/dist/builder.js +42 -3
- package/dist/chat-actions.js +24 -17
- package/dist/chat-core.js +3 -1
- package/dist/chat-decide.js +101 -46
- package/dist/chat-delivery-state.js +2 -0
- package/dist/chat-delivery.js +3 -2
- package/dist/chat-live.js +2 -1
- package/dist/chat-task-actions.js +6 -0
- package/dist/check-report.js +1 -1
- package/dist/claim.js +28 -13
- package/dist/cli-help.js +1 -1
- package/dist/cli.js +2 -0
- package/dist/codex-limits.js +21 -8
- package/dist/console-instance.js +11 -1
- package/dist/contracts/console-api.js +13 -7
- package/dist/contracts/engine-api.js +283 -0
- package/dist/contracts/route.js +1 -0
- package/dist/coordinator.js +2 -2
- package/dist/discord-api.js +4 -3
- package/dist/discord-chat.js +3 -1
- package/dist/dispatch.js +1 -1
- package/dist/dispose.js +15 -9
- package/dist/easy-start-args.js +7 -3
- package/dist/easy-start.js +40 -1
- package/dist/egress.js +72 -10
- package/dist/engine-handoff.js +34 -0
- package/dist/engine-reads.js +338 -0
- package/dist/eval-world.js +3 -2
- package/dist/evidence.js +2 -0
- package/dist/fast-start.js +68 -18
- package/dist/fast-terms.js +2 -2
- package/dist/first-run.js +10 -2
- package/dist/flexible-agents.js +234 -0
- package/dist/flexible-answers-schema.js +61 -0
- package/dist/flexible-answers.js +889 -0
- package/dist/flexible-custody.js +494 -0
- package/dist/flexible-import.js +782 -0
- package/dist/flexible-launch-schema.js +72 -0
- package/dist/flexible-launch.js +331 -0
- package/dist/flexible-launcher.js +88 -0
- package/dist/flexible-levels.js +34 -0
- package/dist/flexible-merge-guard.js +47 -0
- package/dist/flexible-refs.js +47 -0
- package/dist/flexible-relay-cancel.js +19 -0
- package/dist/flexible-relay-schema.js +55 -0
- package/dist/flexible-relay-upstreams.js +36 -0
- package/dist/flexible-relay.js +1032 -0
- package/dist/flexible-session.js +732 -0
- package/dist/flexible-ship-schema.js +81 -0
- package/dist/flexible-ship.js +694 -0
- package/dist/flexible-start.js +80 -0
- package/dist/flexible-thread.js +175 -25
- package/dist/flexible-turns-schema.js +69 -0
- package/dist/flexible-turns.js +490 -0
- package/dist/flexible.js +10 -1
- package/dist/flow-actions.js +6 -4
- package/dist/flow-steps.js +1 -1
- package/dist/flows-cli.js +2 -1
- package/dist/git-views.js +6 -3
- package/dist/install-mode.js +225 -0
- package/dist/integrations.js +6 -1
- package/dist/lead-doors.js +7 -1
- package/dist/limits-ui.js +7 -0
- package/dist/live-reply.js +6 -0
- package/dist/live-terminal.js +425 -29
- package/dist/local-owner.js +7 -0
- package/dist/model-choices.js +12 -6
- package/dist/needs-you.js +2 -0
- package/dist/notification-delivery.js +11 -0
- package/dist/operate.js +128 -37
- package/dist/outbound-privacy.js +204 -0
- package/dist/passwordless.js +2 -1
- package/dist/phase-routing.js +3 -1
- package/dist/plane-review.js +1 -1
- package/dist/project-delete.js +14 -0
- package/dist/proposal.js +2 -2
- package/dist/provider-connection.js +19 -5
- package/dist/publish.js +5 -0
- package/dist/pull-request-flow.js +26 -7
- package/dist/push.js +5 -1
- package/dist/release-card.js +11 -3
- package/dist/release.js +10 -1
- package/dist/route-store.js +3 -3
- package/dist/sandbox-launch.js +32 -8
- package/dist/sandbox-runtime.js +16 -7
- package/dist/sandbox-tools.js +176 -0
- package/dist/scope.js +12 -36
- package/dist/scout-net.js +7 -2
- package/dist/serve.js +62 -13
- package/dist/server/chrome.js +3 -1
- package/dist/server/console.css +33 -6
- package/dist/server/engine-api.js +378 -0
- package/dist/server/flows.js +2 -2
- package/dist/server/http.js +7 -0
- package/dist/server/link-redemption.js +52 -0
- package/dist/server/mutation-key.js +21 -7
- package/dist/server/pages.js +72 -40
- package/dist/server/people-tokens.js +17 -41
- package/dist/server/render-chat.js +1 -0
- package/dist/server/render-new-task.js +3 -3
- package/dist/server/render-results.js +4 -4
- package/dist/server/render-tasks.js +133 -139
- package/dist/server/route-table.js +32 -1
- package/dist/server/settings-section-table.js +6 -0
- package/dist/server/settings-sections.js +69 -0
- package/dist/server/settings.js +120 -10
- package/dist/server/task-views.js +8 -2
- package/dist/server/tasks.js +56 -12
- package/dist/server/terminals.js +181 -28
- package/dist/server/welcome.js +35 -10
- package/dist/settings-groups-ui.js +2 -2
- package/dist/settings-proofs.js +14 -9
- package/dist/slack-api.js +4 -3
- package/dist/slack-chat.js +5 -3
- package/dist/spend.js +46 -12
- package/dist/status-probe.js +343 -0
- package/dist/store.js +181 -12
- package/dist/task-sizing-schema.js +14 -0
- package/dist/task-sizing.js +76 -10
- package/dist/teams-api.js +4 -3
- package/dist/teams-chat.js +4 -2
- package/dist/telegram-lead.js +2 -1
- package/dist/telegram-live.js +2 -1
- package/dist/telegram-team.js +2 -1
- package/dist/telegram.js +17 -5
- package/dist/toolroll-update.js +3 -1
- package/dist/trusted-path.js +162 -0
- package/dist/tui/darwin-arm64/toolroll-tui +0 -0
- package/dist/tui/darwin-x64/toolroll-tui +0 -0
- package/dist/tui/linux-arm64/toolroll-tui +0 -0
- package/dist/tui/linux-x64/toolroll-tui +0 -0
- package/dist/tui-launch.js +282 -0
- package/dist/tui-source.js +5 -3
- package/dist/tui.js +1 -1
- package/dist/webhooks.js +14 -4
- package/dist/welcome-facts.js +22 -15
- package/dist/work-index.js +2 -2
- package/dist/workspace-ui.js +5 -0
- package/package.json +1 -1
- package/scripts/crash-canary.mjs +1 -1
- package/scripts/pilot.mjs +1 -1
- package/scripts/provider-canary.mjs +5 -3
package/dist/serve.js
CHANGED
|
@@ -22,6 +22,9 @@ import { accessKey, countsKey, indexKey, projectSummaryOf, RevisionCache, summar
|
|
|
22
22
|
import { usageChipOf } from './limits-ui.js';
|
|
23
23
|
const BACKGROUND_CHECKS_MS = 30_000;
|
|
24
24
|
const LOCAL_AGENTS_EVERY_MS = 2 * 60_000;
|
|
25
|
+
const LOCAL_AGENTS = ["claude", "codex"];
|
|
26
|
+
const SIGNED_IN_STATES = new Set(["connected", "key-works", "key-present"]);
|
|
27
|
+
const SIGNED_IN_HOLD_MS = 10 * 60_000;
|
|
25
28
|
import { browserCrewFromIndex, browserCrewOf, browserNavigationOf, browserProjectsOf, needsYouLabelOf } from './browser-workspace.js';
|
|
26
29
|
import { PAGE_WORK_HEADER, PAGE_WORK_VERSION } from './page-work-contract.js';
|
|
27
30
|
import { sharedActionPayload } from './chat-actions.js';
|
|
@@ -58,6 +61,7 @@ import { createPersonalQueueRuntime } from './lead-queue-runtime.js';
|
|
|
58
61
|
import {} from "./tools-ui.js";
|
|
59
62
|
import { WORK_INDEX_MAX_LIMIT, workCountsByProject, workIndexPage } from "./work-index.js";
|
|
60
63
|
import { withWorkReads } from "./work-reads.js";
|
|
64
|
+
import { createEngineHandlers } from "./server/engine-api.js";
|
|
61
65
|
import { WORKSPACE_MOTION_SCRIPT } from "./workspace-motion.js";
|
|
62
66
|
import { prepareWorkspaceRevision, WorkspaceValidatorCache } from "./workspace-revision.js";
|
|
63
67
|
import { createHash, randomBytes } from "node:crypto";
|
|
@@ -91,6 +95,9 @@ import { projectHoldings, projectRunning } from "./project-delete.js";
|
|
|
91
95
|
import { canonicalProject, projectName, resolveCeiling, rowVisible } from "./project.js";
|
|
92
96
|
import { noteSignInProbe, signInNotices } from "./provider-auth.js";
|
|
93
97
|
import { createConnectionChecker } from "./provider-connection.js";
|
|
98
|
+
import { detectAgents } from "./agent-detect.js";
|
|
99
|
+
import { acpCheckedHere, firstTaskRouted } from "./welcome-facts.js";
|
|
100
|
+
import { BACKGROUND_STATUS_TIMEOUT_MS, givenRepos, statusProbe } from "./status-probe.js";
|
|
94
101
|
import { ALL_CREDENTIAL_ENV } from "./provider.js";
|
|
95
102
|
import { hstsFor, LOOPBACK_PEERS, plainHttpRefusal, requestFromThisComputer, transportOf } from "./public-access.js";
|
|
96
103
|
import { attachReadExecutor, defaultReadWorkers, ReadExecutor } from "./read-executor.js";
|
|
@@ -104,7 +111,7 @@ import { instrumentRequest } from "./server-telemetry.js";
|
|
|
104
111
|
import { createChatHandlers } from './server/chat.js';
|
|
105
112
|
import { createLiveHandlers } from './server/live.js';
|
|
106
113
|
import { createTerminalHandlers, terminalHostFor } from './server/terminals.js';
|
|
107
|
-
import {
|
|
114
|
+
import { declareSoloOnUpgrade, sessionStandsIn } from './install-mode.js';
|
|
108
115
|
import { keepTypedFields, openProjectFor, settingsCrumbs } from './settings-kit.js';
|
|
109
116
|
import { createSweepHandlers } from './server/sweeps.js';
|
|
110
117
|
import { createFlowsHandlers } from './server/flows.js';
|
|
@@ -175,6 +182,7 @@ export function createDecisionServer(options) {
|
|
|
175
182
|
get browserKeys() { return browserKeys; },
|
|
176
183
|
});
|
|
177
184
|
const { store, evidenceRoot } = options;
|
|
185
|
+
declareSoloOnUpgrade(store, new Date());
|
|
178
186
|
let coding = options.codingWorkspace ?? null;
|
|
179
187
|
let codingProblem;
|
|
180
188
|
if (coding === null && options.localRunner !== undefined && !store.isDemo()) {
|
|
@@ -224,7 +232,8 @@ export function createDecisionServer(options) {
|
|
|
224
232
|
const workspaceIncarnation = randomBytes(16).toString('hex');
|
|
225
233
|
const workspaceValidators = new WorkspaceValidatorCache();
|
|
226
234
|
const providerHome = options.connectionHome ?? homedir();
|
|
227
|
-
const checkConnection = createConnectionChecker({ home: providerHome, clock,
|
|
235
|
+
const checkConnection = createConnectionChecker({ home: providerHome, clock,
|
|
236
|
+
probe: options.connectionProbe ?? statusProbe({ store, untrusted: givenRepos(options), timeoutMs: BACKGROUND_STATUS_TIMEOUT_MS }) });
|
|
228
237
|
const fenceHere = options.fenceAvailable === undefined ? macosFenceAvailable() || linuxFenceAvailable() : false;
|
|
229
238
|
if (options.telegramTokenFile !== undefined) {
|
|
230
239
|
try {
|
|
@@ -586,7 +595,7 @@ export function createDecisionServer(options) {
|
|
|
586
595
|
const flushBudget = () => { try {
|
|
587
596
|
requestBudget.flush();
|
|
588
597
|
}
|
|
589
|
-
catch { } };
|
|
598
|
+
catch { } engineHandlers.upkeep(); };
|
|
590
599
|
const timer = setInterval(flushBudget, REQUEST_BUDGET_FLUSH_MS);
|
|
591
600
|
timer.unref?.();
|
|
592
601
|
server.on("close", () => { clearInterval(timer); flushBudget(); });
|
|
@@ -613,6 +622,7 @@ export function createDecisionServer(options) {
|
|
|
613
622
|
return null;
|
|
614
623
|
return address.address === "127.0.0.1" ? `127.0.0.1:${port}` : address.address === "::1" ? `[::1]:${port}` : null;
|
|
615
624
|
},
|
|
625
|
+
servedPort,
|
|
616
626
|
});
|
|
617
627
|
const consoleCommand = (change) => {
|
|
618
628
|
const port = servedPort() ?? 4180;
|
|
@@ -704,7 +714,8 @@ export function createDecisionServer(options) {
|
|
|
704
714
|
const workspaceRead = method === "GET" && url.searchParams.get('format') === 'workspace';
|
|
705
715
|
const purpose = workspaceRead ? readPurpose(request.headers['x-toolroll-read']) : 'poll';
|
|
706
716
|
const noTouch = edgeRoute?.domain === 'live' || (fragmentName !== null && NO_TOUCH_FRAGMENTS.has(fragmentName)) || /^\/code\/[a-f0-9]{32}\/state$/.test(url.pathname) || url.pathname === '/term/state'
|
|
707
|
-
|| url.pathname === '/agents/live' || /^\/agents\/live\/[0-9]{1,15}$/.test(url.pathname) || (url.pathname === '/agents' && url.searchParams.get('view') === 'live')
|
|
717
|
+
|| url.pathname === '/agents/live' || /^\/agents\/live\/[0-9]{1,15}$/.test(url.pathname) || (url.pathname === '/agents' && url.searchParams.get('view') === 'live')
|
|
718
|
+
|| /^\/agents\/live\/(?:run\/[0-9]{1,15}|thread\/[0-9a-f]{32})$/.test(url.pathname);
|
|
708
719
|
const touch = !(method === "GET" && (noTouch || (workspaceRead && purpose !== 'navigate')));
|
|
709
720
|
if (purpose === 'prefetch' && (request.headers.authorization !== undefined || !prefetchRoute(matchedRoute?.id, url))) {
|
|
710
721
|
request.resume();
|
|
@@ -763,7 +774,7 @@ export function createDecisionServer(options) {
|
|
|
763
774
|
returnTo: safeReturn(url.pathname + url.search),
|
|
764
775
|
appOrigins: [consoleOrigin(request.headers.host), publicOrigin?.origin ?? null, options.configDir === undefined ? null : loadConsoleUrl(process.env, options.configDir)],
|
|
765
776
|
browser: who.via === 'cookie',
|
|
766
|
-
passwordless: who.via === 'cookie' &&
|
|
777
|
+
passwordless: who.via === 'cookie' && who.authority !== 'local-owner' && sessionStandsIn(store),
|
|
767
778
|
advanced: advancedShownFor(store, who.name),
|
|
768
779
|
openProject: who.via === 'cookie' ? who.session.project : null,
|
|
769
780
|
sso: who.via === 'cookie' && who.session.sso !== undefined ? { label: ssoSettings()?.label ?? "your identity provider",
|
|
@@ -781,6 +792,7 @@ export function createDecisionServer(options) {
|
|
|
781
792
|
...(who.via === "cookie" && who.authority === "local-owner" && store.accountOf(who.name)?.passwordSet === false
|
|
782
793
|
? { localStepUp: localOwnerRefusal(false, method === "GET" ? passwordSetNext(pagePathOf(url)) : "/").href } : {}),
|
|
783
794
|
reconnect: browserKeys.stale(who, method === "GET" ? safeReturn(pagePathOf(url)) : "/"),
|
|
795
|
+
...(method === "POST" && who.via === "cookie" && request.headers["x-toolroll-act"] === "in-place" && request.headers["x-toolroll-client"] === "terminal" ? { terminalAct: true } : {}),
|
|
784
796
|
};
|
|
785
797
|
if (purpose !== 'prefetch')
|
|
786
798
|
response.once("finish", () => keepSlowRequest(store, timeline, matchedRoute?.id ?? "unmatched", response.statusCode, clock()));
|
|
@@ -981,21 +993,53 @@ export function createDecisionServer(options) {
|
|
|
981
993
|
}
|
|
982
994
|
let localSignIn = null;
|
|
983
995
|
let localSignInChecking = null;
|
|
996
|
+
let localAgents = null;
|
|
984
997
|
let leadRecheckedAt = 0;
|
|
998
|
+
const signedInSeen = new Map();
|
|
999
|
+
function heldSignIn(agent, value, at) {
|
|
1000
|
+
if (value !== null && SIGNED_IN_STATES.has(value.state)) {
|
|
1001
|
+
signedInSeen.set(agent, { at, value });
|
|
1002
|
+
return value;
|
|
1003
|
+
}
|
|
1004
|
+
const seen = signedInSeen.get(agent);
|
|
1005
|
+
if (value === null || value.state === "unverified")
|
|
1006
|
+
return seen !== undefined && at - seen.at < SIGNED_IN_HOLD_MS ? seen.value : value;
|
|
1007
|
+
signedInSeen.delete(agent);
|
|
1008
|
+
return value;
|
|
1009
|
+
}
|
|
985
1010
|
function checkLocalAgents(fresh = false) {
|
|
986
1011
|
if (localSignInChecking !== null)
|
|
987
1012
|
return localSignInChecking;
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
1013
|
+
const ask = (again) => Promise.all(LOCAL_AGENTS.map(one => connectionCheck(one, again).catch(() => null)));
|
|
1014
|
+
localSignInChecking = ask(fresh)
|
|
1015
|
+
.then(first => first.some(one => one !== null && SIGNED_IN_STATES.has(one.state)) || !first.some(one => one === null || one.state === "unverified") ? first
|
|
1016
|
+
: Promise.all(LOCAL_AGENTS.map((one, index) => { const was = first[index] ?? null; return was === null || was.state === "unverified" ? connectionCheck(one, true).catch(() => null) : was; })))
|
|
1017
|
+
.then(async (answers) => {
|
|
1018
|
+
const at = clock().getTime();
|
|
1019
|
+
const [claudeSeen, codexSeen] = answers.map((value, index) => heldSignIn(LOCAL_AGENTS[index], value, at));
|
|
1020
|
+
const claude = claudeSeen?.state ?? "unverified", codex = codexSeen?.state ?? "unverified";
|
|
1021
|
+
localSignIn = { at: Date.now(), signedIn: [claude, codex].some(state => SIGNED_IN_STATES.has(state)), states: { claude, codex } };
|
|
991
1022
|
leadByDefault();
|
|
992
1023
|
if (options.leadByDefault === true && !store.isDemo())
|
|
993
1024
|
fillRoutingOnSignIn(store, localSignIn.states, clock());
|
|
1025
|
+
const held = { ...(claudeSeen ? { claude: claudeSeen } : {}), ...(codexSeen ? { codex: codexSeen } : {}) };
|
|
1026
|
+
const check = (provider, again) => { const kept = held[provider]; return kept !== undefined ? Promise.resolve(kept) : checkConnection(provider, again); };
|
|
1027
|
+
localAgents = await detectAgents({ check, home: providerHome, clock, routed: firstTaskRouted(store), acpChecked: acpCheckedHere(store) });
|
|
1028
|
+
const pick = localAgents.firstTask;
|
|
1029
|
+
if ((pick === "claude" || pick === "codex") && options.leadByDefault === true && !store.isDemo())
|
|
1030
|
+
fillDefaultRouting(store, pick, "toolroll", { kind: "detected" }, clock());
|
|
994
1031
|
})
|
|
995
1032
|
.catch(() => { })
|
|
996
1033
|
.finally(() => { localSignInChecking = null; });
|
|
997
1034
|
return localSignInChecking;
|
|
998
1035
|
}
|
|
1036
|
+
function localAgentsSettled(maxMs) {
|
|
1037
|
+
const checking = localSignInChecking;
|
|
1038
|
+
if (checking === null)
|
|
1039
|
+
return Promise.resolve();
|
|
1040
|
+
let timer;
|
|
1041
|
+
return Promise.race([checking, new Promise(done => { timer = setTimeout(done, maxMs); timer.unref?.(); })]).finally(() => clearTimeout(timer));
|
|
1042
|
+
}
|
|
999
1043
|
function localAgentSignedIn() {
|
|
1000
1044
|
return localSignIn?.signedIn ?? null;
|
|
1001
1045
|
}
|
|
@@ -1725,8 +1769,9 @@ export function createDecisionServer(options) {
|
|
|
1725
1769
|
waits.push(lastChecks.run(`project-mcp:${repo}`, async () => { const looked = await lookProjectMcp(repo); if (looked.ok)
|
|
1726
1770
|
savedProjectMcp.set(repo, looked.value); return looked.ok; }));
|
|
1727
1771
|
}
|
|
1728
|
-
if (lastChecks.due(`codex-tools:${repo}`, 10 * 60_000))
|
|
1729
|
-
waits.push(lastChecks.run(`codex-tools:${repo}`, () => codexServers(repo)));
|
|
1772
|
+
if (SIGNED_IN_STATES.has(knownConnections.get("codex")?.state ?? "") && lastChecks.due(`codex-tools:${repo}`, 10 * 60_000)) {
|
|
1773
|
+
waits.push(lastChecks.run(`codex-tools:${repo}`, async () => SIGNED_IN_STATES.has((await connectionCheck("codex", true)).state) ? codexServers(repo) : null));
|
|
1774
|
+
}
|
|
1730
1775
|
}
|
|
1731
1776
|
if (databaseFile !== null && lastChecks.due("storage", 30 * 60_000)) {
|
|
1732
1777
|
waits.push(lastChecks.run("storage", () => checkoutPlan(store, storagePool(databaseFile), clock(), { manual: true })));
|
|
@@ -1764,7 +1809,7 @@ export function createDecisionServer(options) {
|
|
|
1764
1809
|
liveHandlers.close();
|
|
1765
1810
|
detachReads();
|
|
1766
1811
|
liveFollower.close();
|
|
1767
|
-
void Promise.all([closeCoding(), terminalClosing.close?.().then(problem => { terminalClosing.problem = problem; }), bounded(team.close()), bounded(personalQueue.close()), bounded(leadMaintenance?.stop()), bounded(backgroundChecks?.stop()), bounded(reads?.close())])
|
|
1812
|
+
void Promise.all([closeCoding(), terminalClosing.close?.().then(problem => { terminalClosing.problem = problem; }), bounded(team.close()), bounded(personalQueue.close()), bounded(leadMaintenance?.stop()), bounded(backgroundChecks?.stop()), bounded(reads?.close()), bounded(engineHandlers.close())])
|
|
1768
1813
|
.then(() => closeServer(error => callback?.(error ?? terminalClosing.problem ?? undefined))).catch(error => {
|
|
1769
1814
|
if (callback)
|
|
1770
1815
|
callback(error instanceof Error ? error : Error('Coding session shutdown failed.'));
|
|
@@ -1844,6 +1889,7 @@ export function createDecisionServer(options) {
|
|
|
1844
1889
|
get leadRecheckedAt() { return leadRecheckedAt; },
|
|
1845
1890
|
set leadRecheckedAt(value) { leadRecheckedAt = value; },
|
|
1846
1891
|
get checkLocalAgents() { return checkLocalAgents; },
|
|
1892
|
+
get localAgentsSettled() { return localAgentsSettled; },
|
|
1847
1893
|
get localSignIn() { return localSignIn; },
|
|
1848
1894
|
set localSignIn(value) { localSignIn = value; },
|
|
1849
1895
|
get agentSignInCommand() { return agentSignInCommand; },
|
|
@@ -1928,9 +1974,11 @@ export function createDecisionServer(options) {
|
|
|
1928
1974
|
get keyEpoch() { return keyEpoch; },
|
|
1929
1975
|
get browserKeys() { return browserKeys; },
|
|
1930
1976
|
get outsideAdmissions() { return outsideAdmissions; },
|
|
1977
|
+
get localAgents() { return localAgents; },
|
|
1931
1978
|
};
|
|
1932
1979
|
const tasksHandlers = createTasksHandlers(handlerRuntime);
|
|
1933
1980
|
const pagesHandlers = createPagesHandlers(handlerRuntime, { listFor: tasksHandlers.workListFor, showOrder: tasksHandlers.showOrder });
|
|
1981
|
+
const engineHandlers = createEngineHandlers(handlerRuntime);
|
|
1934
1982
|
const flowsHandlers = createFlowsHandlers(handlerRuntime);
|
|
1935
1983
|
const chatHandlers = createChatHandlers(handlerRuntime);
|
|
1936
1984
|
const settingsHandlers = createSettingsHandlers(handlerRuntime);
|
|
@@ -1963,14 +2011,15 @@ export function createDecisionServer(options) {
|
|
|
1963
2011
|
};
|
|
1964
2012
|
const liveHandlers = createLiveHandlers(handlerRuntime, { bus: liveBus, workspaceRevision, chatProjectOf: chatHandlers.chatProjectOf, projectSummaryFor, projectScopeFor });
|
|
1965
2013
|
liveTurnStarted = liveHandlers.turnStarted;
|
|
1966
|
-
const terminalHandlers = createTerminalHandlers(handlerRuntime, { ...terminals, bus: liveBus, allowedHost, publicOrigin, forwardedSourceOf, server
|
|
2014
|
+
const terminalHandlers = createTerminalHandlers(handlerRuntime, { ...terminals, bus: liveBus, allowedHost, publicOrigin, forwardedSourceOf, server,
|
|
2015
|
+
...(options.agentCommandEnv === undefined ? {} : { agentEnv: options.agentCommandEnv }) });
|
|
1967
2016
|
terminalClosing.close = terminalHandlers.close;
|
|
1968
2017
|
const remoteHandlers = createRemoteHandlers(remoteRuntime);
|
|
1969
2018
|
const registry = createHandlerRegistry([
|
|
1970
2019
|
...tasksHandlers.registrations, ...flowsHandlers.registrations, ...chatHandlers.registrations,
|
|
1971
2020
|
...settingsHandlers.registrations, ...peopleHandlers.registrations, ...pagesHandlers.registrations,
|
|
1972
2021
|
...remoteHandlers.registrations, ...liveHandlers.registrations, ...terminalHandlers.registrations, ...createSweepHandlers(handlerRuntime).registrations,
|
|
1973
|
-
...createWelcomeHandlers(handlerRuntime).registrations,
|
|
2022
|
+
...createWelcomeHandlers(handlerRuntime).registrations, ...engineHandlers.registrations,
|
|
1974
2023
|
]);
|
|
1975
2024
|
function dispatchConsole(route, ctx) {
|
|
1976
2025
|
const { who, response } = ctx;
|
package/dist/server/chrome.js
CHANGED
|
@@ -57,7 +57,7 @@ import { readFileSync } from "node:fs";
|
|
|
57
57
|
import { join } from "node:path";
|
|
58
58
|
import {} from "node:http";
|
|
59
59
|
import { attributes, html, joinHtml, postForm, scriptElement, styleElement } from "../html.js";
|
|
60
|
-
import { page, respond } from "./http.js";
|
|
60
|
+
import { page, refusedInPlace, respond } from "./http.js";
|
|
61
61
|
import {} from "./render-pages.js";
|
|
62
62
|
import {} from "./session.js";
|
|
63
63
|
export function consoleSpend(summary) {
|
|
@@ -86,6 +86,8 @@ export function refuse(response, who, status, message, backHref = "/", act) {
|
|
|
86
86
|
if (who === null || who.via === "bearer") {
|
|
87
87
|
return respond(response, status, "text/plain; charset=utf-8", message);
|
|
88
88
|
}
|
|
89
|
+
if (refusedInPlace(response, status, message))
|
|
90
|
+
return;
|
|
89
91
|
const path = new URL(requestContext.getStore()?.returnTo ?? "/", "http://standing-orders.local").pathname;
|
|
90
92
|
const generic = /^there'?s no page at this address\.?$/i.test(message.replace("\u2019", "'"));
|
|
91
93
|
const body = html `<div class="k-refusal">${status === 404
|
package/dist/server/console.css
CHANGED
|
@@ -1245,6 +1245,12 @@
|
|
|
1245
1245
|
.approval-detail p, .approval-detail ul, .approval-detail dl { margin: var(--so-space-xs) 0; }
|
|
1246
1246
|
.approval-detail ul { padding-left: 1.25rem; }
|
|
1247
1247
|
.approval-detail .revision-card { margin: 0; padding: 0; border: 0; background: none; }
|
|
1248
|
+
/* The approval summary's usual settings, one tap away (approval-summary.ts). */
|
|
1249
|
+
details.terms-usual > summary { color: var(--muted-foreground); }
|
|
1250
|
+
details.terms-usual > .approval-rows { margin: var(--so-space-sm) 0 0; gap: var(--so-space-sm); }
|
|
1251
|
+
details.terms-usual .approval-row dt { font: var(--so-typography-caption); color: var(--so-muted); }
|
|
1252
|
+
details.terms-usual .approval-row dd p, .plan-sheet details.terms-usual .approval-row dd p { font-size: var(--so-typography-body-font-size); line-height: 1.5; color: var(--so-ink); }
|
|
1253
|
+
.approval-revision-plain { max-width: 75ch; margin: 0; font-size: 14px; line-height: 1.6; }
|
|
1248
1254
|
.approval-roles { display: grid; gap: var(--so-space-sm); }
|
|
1249
1255
|
.approval-roles > div { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: var(--so-space-md); }
|
|
1250
1256
|
.approval-roles dt { color: var(--muted-foreground); font-weight: 500; }
|
|
@@ -1253,14 +1259,35 @@
|
|
|
1253
1259
|
.chat-plan .approval-sheet { padding: 0; border: 0; background: none; }
|
|
1254
1260
|
/* The plan sheet (task page, docs/plans/task-page-steps.md): the same terms read top to bottom — one lead sentence,
|
|
1255
1261
|
Steps, Done when, Will change / Won't touch, Worth knowing, the agent — every part open, small muted headings. */
|
|
1256
|
-
|
|
1262
|
+
/* The plan sheet (the terms diet, DESIGN.md Signal): three groups under hairlines — the plan, before you approve, what
|
|
1263
|
+
it may do — 24px above each hairline and 16px below; 20px between parts, 8px from a heading to its body. */
|
|
1264
|
+
.plan-sheet { display: grid; gap: 0; margin: 0; min-width: 0; color: var(--so-ink); }
|
|
1265
|
+
.plan-sheet > .approval-note { margin: 0 0 var(--so-space-lg); }
|
|
1266
|
+
.plan-group { display: grid; gap: var(--so-space-xl); min-width: 0; }
|
|
1267
|
+
.plan-group + .plan-group { margin-top: var(--so-space-2xl); padding-top: var(--so-space-lg); border-top: 1px solid var(--so-line); }
|
|
1268
|
+
.plan-notice { display: grid; gap: var(--so-space-sm); padding: var(--so-space-md) var(--so-space-lg); border-radius: var(--so-radius-md); background: var(--so-raised); color: var(--so-ink); }
|
|
1269
|
+
.plan-notice > *, .plan-notice p { margin: 0; }
|
|
1270
|
+
.plan-sheet .approval-revision.plan-sheet-revision { margin: 0; font-size: var(--so-typography-body-reading-font-size); font-weight: 500; line-height: 1.6; }
|
|
1271
|
+
.plan-sheet .plan-sheet-brief { color: var(--so-ink); }
|
|
1272
|
+
.plan-sheet-foot { margin: 0; font: var(--so-typography-caption); font-weight: 400; color: var(--so-muted); }
|
|
1273
|
+
.plan-sheet-foot .mono { font: var(--so-typography-mono); }
|
|
1274
|
+
.plan-sheet .approval-path { font: var(--so-typography-mono); color: var(--so-ink); overflow-wrap: anywhere; }
|
|
1275
|
+
details.plan-sheet-full { margin: 0; }
|
|
1276
|
+
details.plan-sheet-full > summary { min-height: 32px; font: var(--so-typography-label); color: var(--so-ink); cursor: pointer; }
|
|
1277
|
+
details.plan-sheet-full[open] { display: grid; gap: var(--so-space-xl); }
|
|
1257
1278
|
.plan-sheet > * { margin: 0; }
|
|
1258
|
-
.plan-sheet-lead { max-width: 66ch; font-size:
|
|
1259
|
-
.plan-sheet-lead-long { font-size:
|
|
1279
|
+
.plan-sheet-lead { max-width: 66ch; font-size: 16px; font-weight: 500; line-height: 1.5; letter-spacing: -.01em; color: var(--so-ink); overflow-wrap: anywhere; }
|
|
1280
|
+
.plan-sheet-lead-long { font-size: var(--so-typography-title-font-size); font-weight: 400; line-height: 1.6; letter-spacing: 0; }
|
|
1260
1281
|
.plan-sheet-text { max-width: 66ch; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
|
|
1261
|
-
.plan-sheet-part { display: grid; align-content: start; gap: var(--so-space-sm); min-width: 0; max-width: 75ch; font-size:
|
|
1282
|
+
.plan-sheet-part { display: grid; align-content: start; gap: var(--so-space-sm); min-width: 0; max-width: 75ch; font-size: var(--so-typography-body-reading-font-size); line-height: 1.6; color: var(--so-ink); overflow-wrap: anywhere; }
|
|
1262
1283
|
.plan-sheet-part > *, .plan-sheet-part p, .plan-sheet-part ul, .plan-sheet-part ol, .plan-sheet-part dl { margin: 0; }
|
|
1263
|
-
|
|
1284
|
+
/* Section headings read as headings (Title, ink), beating the workspace's generic h3 (.so-native-region :where(h3)). */
|
|
1285
|
+
.plan-sheet .plan-sheet-h { margin: 0; font: var(--so-typography-title); letter-spacing: var(--so-typography-title-letter-spacing); text-transform: none; color: var(--so-ink); }
|
|
1286
|
+
.plan-sheet .approval-goal { font-size: var(--so-typography-body-reading-font-size); line-height: 1.6; color: var(--so-ink); }
|
|
1287
|
+
.plan-sheet .approval-rows { gap: var(--so-space-md); }
|
|
1288
|
+
.plan-sheet .approval-row { grid-template-columns: 120px minmax(0, 1fr); }
|
|
1289
|
+
.plan-sheet .approval-row dt { font: var(--so-typography-caption); color: var(--so-muted); }
|
|
1290
|
+
.plan-sheet .approval-row dd, .plan-sheet .approval-row dd p { font-size: var(--so-typography-body-reading-font-size); line-height: 1.6; color: var(--so-ink); }
|
|
1264
1291
|
.plan-sheet-sub { color: var(--so-muted); font-size: 12.5px; }
|
|
1265
1292
|
.plan-sheet-steps { display: grid; gap: var(--so-space-sm); padding: 0; list-style: none; counter-reset: plan-step; }
|
|
1266
1293
|
.plan-sheet-steps > li { display: flex; gap: var(--so-space-md); counter-increment: plan-step; }
|
|
@@ -1270,7 +1297,7 @@
|
|
|
1270
1297
|
.plan-sheet-done > li { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--so-space-xs) var(--so-space-md); padding: var(--so-space-sm) 0; border-bottom: 1px solid var(--so-line); }
|
|
1271
1298
|
.plan-sheet-done > li:last-child { border-bottom: 0; }
|
|
1272
1299
|
.plan-sheet-done > li > span:first-child { flex: 1 1 260px; min-width: 0; }
|
|
1273
|
-
.plan-sheet-how { flex: none; font-
|
|
1300
|
+
.plan-sheet-how { flex: none; font: var(--so-typography-caption); font-weight: 400; color: var(--so-muted); }
|
|
1274
1301
|
.plan-sheet-pair { display: flex; flex-wrap: wrap; gap: var(--so-space-lg) 40px; }
|
|
1275
1302
|
.plan-sheet-pair > .plan-sheet-part { flex: 1 1 220px; }
|
|
1276
1303
|
.plan-sheet .approval-paths li { color: var(--so-ink); font-size: 13px; line-height: 1.7; }
|