svamp-cli 0.2.307 → 0.2.308
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adminCommands-DZ9MECkY.mjs → adminCommands-CtecEU3a.mjs} +1 -1
- package/dist/{agentCommands-D68wBf-y.mjs → agentCommands-DEJpgdgc.mjs} +5 -5
- package/dist/{auth-DDgr4YFE.mjs → auth-BTodo5Et.mjs} +1 -1
- package/dist/{cli-Bk6IPB9M.mjs → cli-Ko4XpjRo.mjs} +76 -70
- package/dist/cli.mjs +2 -2
- package/dist/{commands-Bl9AtWkD.mjs → commands-B-u0fICz.mjs} +2 -2
- package/dist/{commands-BlIR3KBq.mjs → commands-B2ARVwag.mjs} +2 -2
- package/dist/{commands-CJVqMnNf.mjs → commands-D3Nu5cYE.mjs} +1 -1
- package/dist/{commands-DJwSJOPD.mjs → commands-DA7rAZqn.mjs} +1 -1
- package/dist/{commands-Dh2S9Gf1.mjs → commands-DKOYCcmo.mjs} +1 -1
- package/dist/{commands-CESl13XD.mjs → commands-DfbOYRLs.mjs} +2 -2
- package/dist/{commands-rGFSTXKu.mjs → commands-GNplzSQX.mjs} +2 -2
- package/dist/{commands-DsfIIri_.mjs → commands-dBiQcDJ1.mjs} +7 -7
- package/dist/{fleet-okzhGLEY.mjs → fleet-CXixARxe.mjs} +38 -2
- package/dist/{frpc-NDcBtpwa.mjs → frpc-DV_IIYpM.mjs} +1 -1
- package/dist/{headlessCli-BkU5B5Jp.mjs → headlessCli-DfkgeGnQ.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{notifyCommands-Oh0kvQgj.mjs → notifyCommands-BUE_-OCX.mjs} +1 -1
- package/dist/{package-k1G6ygGP.mjs → package-GdCOuQCx.mjs} +2 -2
- package/dist/{rpc-DSyBSuTF.mjs → rpc-BjKmyKdA.mjs} +1 -1
- package/dist/{rpc-K5xzddMF.mjs → rpc-wL-45Raf.mjs} +1 -1
- package/dist/{run-DYVmYsvg.mjs → run-VQIHMUdo.mjs} +126 -33
- package/dist/{run-09G0RL2B.mjs → run-ofbo9uzA.mjs} +1 -1
- package/dist/{scheduler-CtKlSyIq.mjs → scheduler-Dia9Akaw.mjs} +1 -1
- package/dist/{serveCommands-BnOmV2Z3.mjs → serveCommands-DehmO1cO.mjs} +5 -5
- package/dist/{sideband-CdJ0O6L6.mjs → sideband-CGiNKfNE.mjs} +1 -1
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
|
2
2
|
import { execSync, execFileSync } from 'node:child_process';
|
|
3
3
|
import { basename, resolve, join, isAbsolute } from 'node:path';
|
|
4
4
|
import os from 'node:os';
|
|
5
|
-
import {
|
|
5
|
+
import { a5 as formatHandle, a6 as normalizeAllowedUser, a7 as loadSecurityContextConfig, a8 as resolveSecurityContext, a9 as buildSecurityContextFromFlags, aa as mergeSecurityContexts, c as connectToHypha, ab as buildSessionShareUrl, ac as computeOutboundHop, i as shortId, ad as registerAwaitingReply, ae as buildMachineShareUrl, af as parseHandle, ag as handleMatchesMetadata } from './run-VQIHMUdo.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
8
8
|
import 'fs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import os from 'os';
|
|
2
2
|
import fs__default from 'fs';
|
|
3
3
|
import { resolve, join, relative } from 'path';
|
|
4
|
-
import {
|
|
4
|
+
import { U as parseFrontmatter, V as getSkillsServer, W as getSkillsWorkspaceName, X as getSkillsCollectionName, Y as fetchWithTimeout, Z as searchSkills, _ as SKILLS_DIR, $ as getSkillInfo, a0 as downloadSkillFile, a1 as listSkillFiles } from './run-VQIHMUdo.mjs';
|
|
5
5
|
import 'fs/promises';
|
|
6
6
|
import 'url';
|
|
7
7
|
import 'child_process';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { spawnSync } from 'node:child_process';
|
|
2
|
-
import { j as resolveProjectRoot, J as workflowSteps, z as setWorkflowEnabled, F as isWorkflowEnabled, A as removeWorkflow, x as getWorkflow, E as listWorkflows, C as saveWorkflow, D as rawWorkflow } from './run-
|
|
2
|
+
import { j as resolveProjectRoot, J as workflowSteps, z as setWorkflowEnabled, F as isWorkflowEnabled, A as removeWorkflow, x as getWorkflow, E as listWorkflows, C as saveWorkflow, D as rawWorkflow } from './run-VQIHMUdo.mjs';
|
|
3
3
|
import 'os';
|
|
4
4
|
import 'fs/promises';
|
|
5
5
|
import 'fs';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { execSync } from 'node:child_process';
|
|
2
2
|
import { existsSync, readFileSync } from 'node:fs';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import { f as flushAndExit } from './cli-
|
|
5
|
-
import { j as resolveProjectRoot, q as searchIssues, o as listIssues, l as resumeIssue, p as pauseIssue, m as addComment, u as updateIssue, k as getIssue, t as isVisibleTo, I as summarize, n as addIssue } from './run-
|
|
4
|
+
import { f as flushAndExit } from './cli-Ko4XpjRo.mjs';
|
|
5
|
+
import { j as resolveProjectRoot, q as searchIssues, o as listIssues, l as resumeIssue, p as pauseIssue, m as addComment, u as updateIssue, k as getIssue, t as isVisibleTo, I as summarize, n as addIssue } from './run-VQIHMUdo.mjs';
|
|
6
6
|
import './serviceManager-hlOVxkhW.mjs';
|
|
7
7
|
import 'os';
|
|
8
8
|
import 'fs/promises';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { resolve } from 'node:path';
|
|
3
|
-
import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-
|
|
3
|
+
import { connectAndGetMachine, resolveSessionId, createWorktree, connectAndResolveSession } from './commands-D3Nu5cYE.mjs';
|
|
4
4
|
import { execFileSync } from 'node:child_process';
|
|
5
|
-
import { u as updateIssue, m as addComment, n as addIssue, i as shortId } from './run-
|
|
5
|
+
import { u as updateIssue, m as addComment, n as addIssue, i as shortId } from './run-VQIHMUdo.mjs';
|
|
6
6
|
import 'node:os';
|
|
7
7
|
import 'os';
|
|
8
8
|
import 'fs/promises';
|
|
@@ -60,7 +60,7 @@ async function serviceExpose(args) {
|
|
|
60
60
|
process.exit(1);
|
|
61
61
|
}
|
|
62
62
|
if (foreground) {
|
|
63
|
-
const { runFrpcTunnel } = await import('./frpc-
|
|
63
|
+
const { runFrpcTunnel } = await import('./frpc-DV_IIYpM.mjs');
|
|
64
64
|
await runFrpcTunnel(name, ports, void 0, {
|
|
65
65
|
group,
|
|
66
66
|
groupKey,
|
|
@@ -70,7 +70,7 @@ async function serviceExpose(args) {
|
|
|
70
70
|
});
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
73
|
+
const { connectAndGetMachine } = await import('./commands-D3Nu5cYE.mjs');
|
|
74
74
|
const { server, machine } = await connectAndGetMachine();
|
|
75
75
|
try {
|
|
76
76
|
const status = await machine.tunnelStart({
|
|
@@ -92,7 +92,7 @@ async function serviceExpose(args) {
|
|
|
92
92
|
console.log(` port ${port}: ${url}`);
|
|
93
93
|
}
|
|
94
94
|
if (process.env.SVAMP_SESSION_ID) {
|
|
95
|
-
const { autoAddSessionLink } = await import('./agentCommands-
|
|
95
|
+
const { autoAddSessionLink } = await import('./agentCommands-DEJpgdgc.mjs');
|
|
96
96
|
let added = 0;
|
|
97
97
|
for (const [port, url] of urlEntries) {
|
|
98
98
|
const label = urlEntries.length > 1 ? `${name}:${port}` : name;
|
|
@@ -129,7 +129,7 @@ async function serviceServe(args) {
|
|
|
129
129
|
console.log(`Serving ${resolvedDir}`);
|
|
130
130
|
const servePort = 18080;
|
|
131
131
|
const http = await import('http');
|
|
132
|
-
const { serveStaticMount } = await import('./run-
|
|
132
|
+
const { serveStaticMount } = await import('./run-VQIHMUdo.mjs').then(function (n) { return n.an; });
|
|
133
133
|
const server = http.createServer((req, res) => {
|
|
134
134
|
const u = new URL(req.url || "/", "http://127.0.0.1");
|
|
135
135
|
let rel = u.pathname;
|
|
@@ -140,7 +140,7 @@ async function serviceServe(args) {
|
|
|
140
140
|
server.once("error", reject);
|
|
141
141
|
server.listen(servePort, "127.0.0.1", () => resolve());
|
|
142
142
|
});
|
|
143
|
-
const { runFrpcTunnel } = await import('./frpc-
|
|
143
|
+
const { runFrpcTunnel } = await import('./frpc-DV_IIYpM.mjs');
|
|
144
144
|
void server;
|
|
145
145
|
await runFrpcTunnel(name, [servePort]);
|
|
146
146
|
} catch (err) {
|
|
@@ -150,7 +150,7 @@ async function serviceServe(args) {
|
|
|
150
150
|
}
|
|
151
151
|
async function serviceList(_args) {
|
|
152
152
|
try {
|
|
153
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
153
|
+
const { connectAndGetMachine } = await import('./commands-D3Nu5cYE.mjs');
|
|
154
154
|
const { server, machine } = await connectAndGetMachine();
|
|
155
155
|
try {
|
|
156
156
|
const tunnels = await machine.tunnelList({});
|
|
@@ -190,7 +190,7 @@ async function serviceDelete(args) {
|
|
|
190
190
|
process.exit(1);
|
|
191
191
|
}
|
|
192
192
|
try {
|
|
193
|
-
const { connectAndGetMachine } = await import('./commands-
|
|
193
|
+
const { connectAndGetMachine } = await import('./commands-D3Nu5cYE.mjs');
|
|
194
194
|
const { server, machine } = await connectAndGetMachine();
|
|
195
195
|
try {
|
|
196
196
|
await machine.tunnelStop({ name });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import os from 'node:os';
|
|
4
|
-
import { c as connectToHypha } from './run-
|
|
4
|
+
import { T as PINNED_CODEX_VERSION, c as connectToHypha } from './run-VQIHMUdo.mjs';
|
|
5
5
|
import { PINNED_CLAUDE_CODE_VERSION } from './pinnedClaudeCode-BaMR97BE.mjs';
|
|
6
6
|
import 'os';
|
|
7
7
|
import 'fs/promises';
|
|
@@ -246,6 +246,42 @@ ${rows.length - failures}/${rows.length} machines on ${version}.`);
|
|
|
246
246
|
await server.disconnect();
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
+
async function fleetUpgradeCodex(opts) {
|
|
250
|
+
const version = opts?.version || PINNED_CODEX_VERSION;
|
|
251
|
+
const { server, machines } = await discoverMachines();
|
|
252
|
+
if (machines.length === 0) {
|
|
253
|
+
console.log("No machines found.");
|
|
254
|
+
await server.disconnect();
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
console.log(`Reconciling Codex to ${version} on ${machines.length} machine(s)...
|
|
258
|
+
`);
|
|
259
|
+
console.log("Note: Codex is a global npm package (@openai/codex); machines that never use it can ignore this.");
|
|
260
|
+
console.log(` ${version} is the pinned build tested for native mid-turn steering (turn/steer, >= 0.129.0).
|
|
261
|
+
`);
|
|
262
|
+
try {
|
|
263
|
+
printHeader(["MACHINE ID", "LABEL", "STATE", "DETAIL"], [20, 24, 6, 60]);
|
|
264
|
+
const cmd = `bash -lc 'npm install -g @openai/codex@${version} 2>&1 | tail -5'`;
|
|
265
|
+
const rows = await fanOut(machines, async (m) => await m.rpc.bash(cmd, void 0));
|
|
266
|
+
let failures = 0;
|
|
267
|
+
for (const r of rows) {
|
|
268
|
+
if (!r.ok) {
|
|
269
|
+
printResultRow(r.machine, "FAIL", r.error || "");
|
|
270
|
+
failures += 1;
|
|
271
|
+
continue;
|
|
272
|
+
}
|
|
273
|
+
const ok = r.result.exitCode === 0;
|
|
274
|
+
const detail = (r.result.stdout?.trim().split("\n").slice(-1)[0] || r.result.stderr?.trim().slice(-200) || "").replace(/\s+/g, " ");
|
|
275
|
+
printResultRow(r.machine, ok ? "OK" : "FAIL", detail);
|
|
276
|
+
if (!ok) failures += 1;
|
|
277
|
+
}
|
|
278
|
+
console.log(`
|
|
279
|
+
${rows.length - failures}/${rows.length} machines on codex ${version}.`);
|
|
280
|
+
if (failures > 0) process.exitCode = 1;
|
|
281
|
+
} finally {
|
|
282
|
+
await server.disconnect();
|
|
283
|
+
}
|
|
284
|
+
}
|
|
249
285
|
async function fleetUpgradeSvamp(opts) {
|
|
250
286
|
const version = opts?.version || "latest";
|
|
251
287
|
const { server, machines } = await discoverMachines();
|
|
@@ -361,4 +397,4 @@ ${rows.length - failures}/${rows.length} updated.`);
|
|
|
361
397
|
}
|
|
362
398
|
}
|
|
363
399
|
|
|
364
|
-
export { fleetDaemonRestart, fleetExec, fleetPushSkill, fleetStatus, fleetUpgradeClaude, fleetUpgradeSvamp, partitionSelf };
|
|
400
|
+
export { fleetDaemonRestart, fleetExec, fleetPushSkill, fleetStatus, fleetUpgradeClaude, fleetUpgradeCodex, fleetUpgradeSvamp, partitionSelf };
|
|
@@ -4,7 +4,7 @@ import { mkdirSync, chmodSync, writeFileSync, unlinkSync, existsSync, readFileSy
|
|
|
4
4
|
import { join } from 'path';
|
|
5
5
|
import { homedir, platform, arch } from 'os';
|
|
6
6
|
import { randomUUID, createHash } from 'crypto';
|
|
7
|
-
import { e as getFrpsSubdomainHost, f as getFrpsServerPort, h as getFrpsServerAddr } from './run-
|
|
7
|
+
import { e as getFrpsSubdomainHost, f as getFrpsServerPort, h as getFrpsServerAddr } from './run-VQIHMUdo.mjs';
|
|
8
8
|
import 'fs/promises';
|
|
9
9
|
import 'url';
|
|
10
10
|
import 'node:crypto';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-
|
|
1
|
+
import { a2 as resolveModel, ah as describeMisconfiguration, ai as buildMachineDeps } from './run-VQIHMUdo.mjs';
|
|
2
|
+
import { handleRealtimeEvent, initMachineVoiceSession } from './sideband-CGiNKfNE.mjs';
|
|
3
3
|
import { WebSocket } from 'ws';
|
|
4
4
|
import { execSync, spawn } from 'child_process';
|
|
5
5
|
import 'os';
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as connectToHypha, a as createSessionStore, d as daemonStatus, g as getHyphaServerUrl, r as registerMachineService, s as startDaemon, b as stopDaemon } from './run-
|
|
1
|
+
export { c as connectToHypha, a as createSessionStore, d as daemonStatus, g as getHyphaServerUrl, r as registerMachineService, s as startDaemon, b as stopDaemon } from './run-VQIHMUdo.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as connectToHypha, S as SharingNotificationSync, K as parseJwtEmail } from './run-
|
|
1
|
+
import { c as connectToHypha, S as SharingNotificationSync, K as parseJwtEmail } from './run-VQIHMUdo.mjs';
|
|
2
2
|
import { randomUUID } from 'node:crypto';
|
|
3
3
|
import { existsSync, readFileSync } from 'node:fs';
|
|
4
4
|
import { join } from 'node:path';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var name = "svamp-cli";
|
|
2
|
-
var version = "0.2.
|
|
2
|
+
var version = "0.2.308";
|
|
3
3
|
var description = "Svamp CLI — AI workspace daemon on Hypha Cloud";
|
|
4
4
|
var author = "Amun AI AB";
|
|
5
5
|
var license = "SEE LICENSE IN LICENSE";
|
|
@@ -19,7 +19,7 @@ var exports$1 = {
|
|
|
19
19
|
var scripts = {
|
|
20
20
|
build: "rm -rf dist bin/skills bin/commands && mkdir -p bin/skills && cp -r ../../skills/artifact bin/skills/artifact && cp -r ../../skills/crew bin/skills/crew && cp -r ../../commands bin/commands && tsc --noEmit && pkgroll",
|
|
21
21
|
typecheck: "tsc --noEmit",
|
|
22
|
-
test: "npx tsx test/test-context-window.mjs && npx tsx test/test-ratelimit-retry.mjs && npx tsx test/test-instance-config.mjs && npx tsx test/test-authorize.mjs && npx tsx test/test-normalize-allowed-user.mjs && npx tsx test/test-share-url.mjs && npx tsx test/test-update-sharing-normalization.mjs && npx tsx test/test-sharing-notify-sync.mjs && npx tsx test/test-sharing-notify-resolve.mjs && npx tsx test/test-staged-homes-sweep.mjs && npx tsx test/test-session-helpers.mjs && npx tsx test/test-cli-routing.mjs && npx tsx test/test-security-context.mjs && npx tsx test/test-isolation-decision.mjs && npx tsx test/test-message-helpers.mjs && npx tsx test/test-agent-config.mjs && npx tsx test/test-wrap-command.mjs && npx tsx test/test-credential-staging.mjs && npx tsx test/test-claude-auth.mjs && npx tsx test/test-backend-accounts.mjs && npx tsx test/test-codex-force-model.mjs && npx tsx test/test-backend-oauth.mjs && npx tsx test/test-btw-proxy-env.mjs && npx tsx test/test-output-formatters.mjs && npx tsx test/test-inbox-guard.mjs && npx tsx test/test-user-events.mjs && npx tsx test/test-migrate-children.mjs && npx tsx test/test-outpost-install.mjs && npx tsx test/test-outpost-setup.mjs && npx tsx test/test-outpost-pairing.mjs && npx tsx test/test-outpost-coordinator.mjs && npx tsx test/e2e-outpost-transport.mjs && npx tsx test/test-inbox-reconcile.mjs && npx tsx test/test-auto-topic.mjs && npx tsx test/test-project-info.mjs && npx tsx test/test-agent-types.mjs && npx tsx test/test-transport.mjs && npx tsx test/test-session-update-handlers.mjs && npx tsx test/test-session-scanner.mjs && npx tsx test/test-hypha-client.mjs && npx tsx test/test-hook-settings.mjs && npx tsx test/test-session-service-logic.mjs && npx tsx test/test-daemon-persistence.mjs && npx tsx test/test-detect-isolation.mjs && npx tsx test/test-isolation-disable.mjs && npx tsx test/test-machine-service-logic.mjs && npx tsx test/test-session-access-fallback.mjs && npx tsx test/test-session-rpc-role-map.mjs && npx tsx test/test-interactive-helpers.mjs && npx tsx test/test-codex-app-server.mjs && npx tsx test/test-acp-backend.mjs && npx tsx test/test-acp-bridge.mjs && npx tsx test/test-listener-backoff.mjs && npx tsx test/test-session-identity-env.mjs && npx tsx test/test-hook-server.mjs && npx tsx test/test-session-commands.mjs && npx tsx test/test-interactive-console.mjs && npx tsx test/test-session-messages.mjs && npx tsx test/test-session-send-query.mjs && npx tsx test/test-skills.mjs && npx tsx test/test-agent-grouping.mjs && npx tsx test/test-machine-list-directory.mjs && npx tsx test/test-service-commands.mjs && npx tsx test/test-supervisor.mjs && npx tsx test/test-supervisor-lock.mjs && node test/test-supervisor-restart.mjs && npx tsx test/test-clear-detection.mjs && npx tsx test/test-compact-detect.mjs && npx tsx test/test-session-consolidation.mjs && npx tsx test/test-inbox-store.mjs && npx tsx test/test-inbox.mjs && npx tsx test/test-inbox-cross-machine.mjs && npx tsx test/test-issue-store.mjs && npx tsx test/test-issue-store-lock.mjs && npx tsx test/test-issue-close-gate.mjs && npx tsx test/test-loop-verify.mjs && npx tsx test/test-restore-decision.mjs && npx tsx test/test-issue-rpc.mjs && npx tsx test/test-issue-pause.mjs && npx tsx test/test-workflow-store.mjs && npx tsx test/test-workflow-rpc.mjs && npx tsx test/test-workflow-scheduler.mjs && npx tsx test/test-cron.mjs && npx tsx test/test-workflow-runs.mjs && npx tsx test/test-workflow-runs-lock.mjs && npx tsx test/test-workflow-idle.mjs && npx tsx test/test-workflow-reconcile.mjs && npx tsx test/test-serve-link-subdomain.mjs && npx tsx test/test-short-id.mjs && npx tsx test/test-transcript-edit.mjs && npx tsx test/test-edit-history.mjs && npx tsx test/test-friendly-name.mjs && npx tsx test/test-session-rpc-dispatch.mjs && npx tsx test/test-sandbox-cli.mjs && npx tsx test/test-serve-manager.mjs && npx tsx test/test-serve-ws-upgrade.mjs && npx tsx test/test-serve-auth.mjs && npx tsx test/test-static-file-server.mjs && npx tsx test/test-serve-stability.mjs && npx tsx test/test-frpc-e2e.mjs --unit-only && npx tsx test/test-frpc-status.mjs && node test/pinnedClaudeCode.test.mjs && node test/fleet.test.mjs && npx tsx test/test-session-file.mjs && npx tsx test/test-channel-rpc.mjs && npx tsx test/test-wise-agent.mjs && npx tsx test/test-channel-agent.mjs && npx tsx test/test-channels-service.mjs && npx tsx test/test-hotreload-seam.mjs && npx tsx test/test-hot-reload.mjs && npx tsx test/test-hot-reload-live.mjs && npx tsx test/test-session-core.mjs && npx tsx test/test-channel-async-reply.mjs && npx tsx test/test-outbox-reload.mjs && npx tsx test/test-channel-binding.mjs && npx tsx test/test-channel-store-lock.mjs && npx tsx test/test-channel-identity.mjs && npx tsx test/test-stateless-dispatch-limiter.mjs && npx tsx test/test-shared-session-identity.mjs && npx tsx test/test-wise-agent-auth.mjs && npx tsx test/test-channel-http.mjs && npx tsx test/test-channel-upload.mjs && npx tsx test/test-wise-voice.mjs && npx tsx test/test-wise-headless.mjs && npx tsx test/test-wise-machine.mjs && npx tsx test/test-crew-merge.mjs && npx tsx test/test-crew-verdict-routing.mjs && npx tsx test/test-crew-standalone.mjs && npx tsx test/test-session-links.mjs && npx tsx test/test-issue-loop-pause-guard.mjs && npx tsx test/test-artifact-guard.mjs && npx tsx test/test-artifact-sync-pagination.mjs && npx tsx test/test-graceful-restart.mjs && npx tsx test/test-flush-exit.mjs && npx tsx test/test-codex-skills.mjs",
|
|
22
|
+
test: "npx tsx test/test-context-window.mjs && npx tsx test/test-ratelimit-retry.mjs && npx tsx test/test-instance-config.mjs && npx tsx test/test-authorize.mjs && npx tsx test/test-normalize-allowed-user.mjs && npx tsx test/test-share-url.mjs && npx tsx test/test-update-sharing-normalization.mjs && npx tsx test/test-sharing-notify-sync.mjs && npx tsx test/test-sharing-notify-resolve.mjs && npx tsx test/test-staged-homes-sweep.mjs && npx tsx test/test-session-helpers.mjs && npx tsx test/test-cli-routing.mjs && npx tsx test/test-security-context.mjs && npx tsx test/test-isolation-decision.mjs && npx tsx test/test-message-helpers.mjs && npx tsx test/test-agent-config.mjs && npx tsx test/test-wrap-command.mjs && npx tsx test/test-credential-staging.mjs && npx tsx test/test-claude-auth.mjs && npx tsx test/test-backend-accounts.mjs && npx tsx test/test-codex-force-model.mjs && npx tsx test/test-backend-oauth.mjs && npx tsx test/test-btw-proxy-env.mjs && npx tsx test/test-output-formatters.mjs && npx tsx test/test-inbox-guard.mjs && npx tsx test/test-user-events.mjs && npx tsx test/test-migrate-children.mjs && npx tsx test/test-outpost-install.mjs && npx tsx test/test-outpost-setup.mjs && npx tsx test/test-outpost-pairing.mjs && npx tsx test/test-outpost-coordinator.mjs && npx tsx test/e2e-outpost-transport.mjs && npx tsx test/test-inbox-reconcile.mjs && npx tsx test/test-auto-topic.mjs && npx tsx test/test-project-info.mjs && npx tsx test/test-agent-types.mjs && npx tsx test/test-transport.mjs && npx tsx test/test-session-update-handlers.mjs && npx tsx test/test-session-scanner.mjs && npx tsx test/test-hypha-client.mjs && npx tsx test/test-hook-settings.mjs && npx tsx test/test-session-service-logic.mjs && npx tsx test/test-daemon-persistence.mjs && npx tsx test/test-detect-isolation.mjs && npx tsx test/test-isolation-disable.mjs && npx tsx test/test-machine-service-logic.mjs && npx tsx test/test-session-access-fallback.mjs && npx tsx test/test-session-rpc-role-map.mjs && npx tsx test/test-interactive-helpers.mjs && npx tsx test/test-pinned-codex.mjs && npx tsx test/test-codex-app-server.mjs && npx tsx test/e2e-codex-midturn-steer.mjs && npx tsx test/test-acp-backend.mjs && npx tsx test/test-acp-bridge.mjs && npx tsx test/test-listener-backoff.mjs && npx tsx test/test-session-identity-env.mjs && npx tsx test/test-hook-server.mjs && npx tsx test/test-session-commands.mjs && npx tsx test/test-interactive-console.mjs && npx tsx test/test-session-messages.mjs && npx tsx test/test-session-send-query.mjs && npx tsx test/test-skills.mjs && npx tsx test/test-agent-grouping.mjs && npx tsx test/test-machine-list-directory.mjs && npx tsx test/test-service-commands.mjs && npx tsx test/test-supervisor.mjs && npx tsx test/test-supervisor-lock.mjs && node test/test-supervisor-restart.mjs && npx tsx test/test-clear-detection.mjs && npx tsx test/test-compact-detect.mjs && npx tsx test/test-session-consolidation.mjs && npx tsx test/test-inbox-store.mjs && npx tsx test/test-inbox.mjs && npx tsx test/test-inbox-cross-machine.mjs && npx tsx test/test-issue-store.mjs && npx tsx test/test-issue-store-lock.mjs && npx tsx test/test-issue-close-gate.mjs && npx tsx test/test-loop-verify.mjs && npx tsx test/test-restore-decision.mjs && npx tsx test/test-issue-rpc.mjs && npx tsx test/test-issue-pause.mjs && npx tsx test/test-workflow-store.mjs && npx tsx test/test-workflow-rpc.mjs && npx tsx test/test-workflow-scheduler.mjs && npx tsx test/test-cron.mjs && npx tsx test/test-workflow-runs.mjs && npx tsx test/test-workflow-runs-lock.mjs && npx tsx test/test-workflow-idle.mjs && npx tsx test/test-workflow-reconcile.mjs && npx tsx test/test-serve-link-subdomain.mjs && npx tsx test/test-short-id.mjs && npx tsx test/test-transcript-edit.mjs && npx tsx test/test-edit-history.mjs && npx tsx test/test-friendly-name.mjs && npx tsx test/test-session-rpc-dispatch.mjs && npx tsx test/test-sandbox-cli.mjs && npx tsx test/test-serve-manager.mjs && npx tsx test/test-serve-ws-upgrade.mjs && npx tsx test/test-serve-auth.mjs && npx tsx test/test-static-file-server.mjs && npx tsx test/test-serve-stability.mjs && npx tsx test/test-frpc-e2e.mjs --unit-only && npx tsx test/test-frpc-status.mjs && node test/pinnedClaudeCode.test.mjs && node test/fleet.test.mjs && npx tsx test/test-session-file.mjs && npx tsx test/test-channel-rpc.mjs && npx tsx test/test-wise-agent.mjs && npx tsx test/test-channel-agent.mjs && npx tsx test/test-channels-service.mjs && npx tsx test/test-hotreload-seam.mjs && npx tsx test/test-hot-reload.mjs && npx tsx test/test-hot-reload-live.mjs && npx tsx test/test-session-core.mjs && npx tsx test/test-channel-async-reply.mjs && npx tsx test/test-outbox-reload.mjs && npx tsx test/test-channel-binding.mjs && npx tsx test/test-channel-store-lock.mjs && npx tsx test/test-channel-identity.mjs && npx tsx test/test-stateless-dispatch-limiter.mjs && npx tsx test/test-shared-session-identity.mjs && npx tsx test/test-wise-agent-auth.mjs && npx tsx test/test-channel-http.mjs && npx tsx test/test-channel-upload.mjs && npx tsx test/test-wise-voice.mjs && npx tsx test/test-wise-headless.mjs && npx tsx test/test-wise-machine.mjs && npx tsx test/test-crew-merge.mjs && npx tsx test/test-crew-verdict-routing.mjs && npx tsx test/test-crew-standalone.mjs && npx tsx test/test-session-links.mjs && npx tsx test/test-issue-loop-pause-guard.mjs && npx tsx test/test-artifact-guard.mjs && npx tsx test/test-artifact-sync-pagination.mjs && npx tsx test/test-graceful-restart.mjs && npx tsx test/test-flush-exit.mjs && npx tsx test/test-codex-skills.mjs",
|
|
23
23
|
"test:hypha": "node --no-warnings test/test-hypha-service.mjs",
|
|
24
24
|
dev: "tsx src/cli.ts",
|
|
25
25
|
"dev:daemon": "tsx src/cli.ts daemon start-sync",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as resolveProjectRoot, v as getRun, w as listRuns, x as getWorkflow, y as runWorkflow, z as setWorkflowEnabled, A as removeWorkflow, B as validateWorkflowName, C as saveWorkflow, D as rawWorkflow, E as listWorkflows } from './run-
|
|
1
|
+
import { j as resolveProjectRoot, v as getRun, w as listRuns, x as getWorkflow, y as runWorkflow, z as setWorkflowEnabled, A as removeWorkflow, B as validateWorkflowName, C as saveWorkflow, D as rawWorkflow, E as listWorkflows } from './run-VQIHMUdo.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as resolveProjectRoot, u as updateIssue, k as getIssue, l as resumeIssue, p as pauseIssue, m as addComment, n as addIssue, o as listIssues, q as searchIssues, t as isVisibleTo } from './run-
|
|
1
|
+
import { j as resolveProjectRoot, u as updateIssue, k as getIssue, l as resumeIssue, p as pauseIssue, m as addComment, n as addIssue, o as listIssues, q as searchIssues, t as isVisibleTo } from './run-VQIHMUdo.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|
|
@@ -3047,7 +3047,7 @@ Connection: close\r
|
|
|
3047
3047
|
const mount = this.mounts.get(mountName);
|
|
3048
3048
|
const subdomainOverride = mount?.access === "link" && mount.linkToken ? /* @__PURE__ */ new Map([[this.port, buildLinkSubdomain(subdomainSafe, mount.linkToken)]]) : void 0;
|
|
3049
3049
|
try {
|
|
3050
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
3050
|
+
const { FrpcTunnel } = await import('./frpc-DV_IIYpM.mjs');
|
|
3051
3051
|
let tunnel;
|
|
3052
3052
|
tunnel = new FrpcTunnel({
|
|
3053
3053
|
name: tunnelName,
|
|
@@ -4857,8 +4857,43 @@ const SESSION_METHOD_MIN_ROLE = {
|
|
|
4857
4857
|
refineLastReply: "admin",
|
|
4858
4858
|
undoLastEdit: "admin"
|
|
4859
4859
|
};
|
|
4860
|
+
const SESSION_VIEW_METHODS = /* @__PURE__ */ new Set([
|
|
4861
|
+
// read-only (authorizeRequest at view-role)
|
|
4862
|
+
"getMessages",
|
|
4863
|
+
"getLatestMessages",
|
|
4864
|
+
"getMessageCount",
|
|
4865
|
+
"getMetadata",
|
|
4866
|
+
"getSharing",
|
|
4867
|
+
"getInbox",
|
|
4868
|
+
"getEffectiveRole",
|
|
4869
|
+
"getActivityState",
|
|
4870
|
+
"getAgentState",
|
|
4871
|
+
"getChannelSkill",
|
|
4872
|
+
"getMeetingActivity",
|
|
4873
|
+
"listChannels",
|
|
4874
|
+
"outpostList",
|
|
4875
|
+
"registerListener",
|
|
4876
|
+
// self-authenticating (own capability key / token) or liveness — machine role stays view
|
|
4877
|
+
"channelDescribe",
|
|
4878
|
+
"channelExecTool",
|
|
4879
|
+
"channelGetProfile",
|
|
4880
|
+
"channelList",
|
|
4881
|
+
"channelOwns",
|
|
4882
|
+
"channelReceive",
|
|
4883
|
+
"channelSend",
|
|
4884
|
+
"channelUpload",
|
|
4885
|
+
"outpostHello",
|
|
4886
|
+
"outpostPoll",
|
|
4887
|
+
"outpostResult",
|
|
4888
|
+
"disconnect",
|
|
4889
|
+
"reregister",
|
|
4890
|
+
"recordMeetingActivity"
|
|
4891
|
+
]);
|
|
4860
4892
|
function sessionMethodMinRole(method) {
|
|
4861
|
-
|
|
4893
|
+
const mapped = SESSION_METHOD_MIN_ROLE[method];
|
|
4894
|
+
if (mapped) return mapped;
|
|
4895
|
+
if (SESSION_VIEW_METHODS.has(method)) return "view";
|
|
4896
|
+
return "admin";
|
|
4862
4897
|
}
|
|
4863
4898
|
function getParamNames(fn) {
|
|
4864
4899
|
const src = fn.toString();
|
|
@@ -6088,7 +6123,7 @@ async function registerMachineService(server, machineId, metadata, daemonState,
|
|
|
6088
6123
|
const tunnels = handlers.tunnels;
|
|
6089
6124
|
if (!tunnels) throw new Error("Tunnel management not available");
|
|
6090
6125
|
if (tunnels.has(params.name)) throw new Error(`Tunnel '${params.name}' already running`);
|
|
6091
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
6126
|
+
const { FrpcTunnel } = await import('./frpc-DV_IIYpM.mjs');
|
|
6092
6127
|
const tunnel = new FrpcTunnel({
|
|
6093
6128
|
name: params.name,
|
|
6094
6129
|
ports: params.ports,
|
|
@@ -6573,7 +6608,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
|
|
|
6573
6608
|
let owner;
|
|
6574
6609
|
try {
|
|
6575
6610
|
role2 = (await rpc.getEffectiveRole(context))?.role ?? null;
|
|
6576
|
-
if (!role2) return { success: false, error: "Not authorized
|
|
6611
|
+
if (!roleAtLeast(role2, "interact")) return { success: false, error: "Not authorized: WISE ask requires interact access to this session." };
|
|
6577
6612
|
const m = await rpc.getMetadata(context);
|
|
6578
6613
|
cwd = m?.metadata?.path;
|
|
6579
6614
|
owner = m?.metadata?.sharing?.owner;
|
|
@@ -6582,12 +6617,12 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
|
|
|
6582
6617
|
}
|
|
6583
6618
|
const deps = buildSessionDeps(rpc, { cwd, ownerEmail: owner });
|
|
6584
6619
|
const sender = { name: context?.user?.email || context?.user?.id || "user", kind: "user", verified: true };
|
|
6585
|
-
const { toolsForRole } = await import('./sideband-
|
|
6620
|
+
const { toolsForRole } = await import('./sideband-CGiNKfNE.mjs');
|
|
6586
6621
|
const r2 = await runWiseAgent({ message: params.message, sender, config: { tools: toolsForRole(role2) }, deps, transport, model: resolved.model });
|
|
6587
6622
|
return fmt(r2);
|
|
6588
6623
|
}
|
|
6589
6624
|
const role = getEffectiveRole(context, currentMetadata.sharing);
|
|
6590
|
-
if (!role) return { success: false, error: "Not authorized
|
|
6625
|
+
if (!roleAtLeast(role, "interact")) return { success: false, error: "Not authorized: WISE ask requires interact access to this machine." };
|
|
6591
6626
|
const machineDeps = buildMachineDeps(
|
|
6592
6627
|
{
|
|
6593
6628
|
getSessionIds: handlers.getSessionIds,
|
|
@@ -6687,7 +6722,7 @@ QUESTION: ${params.question || "Summarize this concisely."}` }
|
|
|
6687
6722
|
return { ok: false, call_id: callId, status: "busy", error: "channel is busy (too many concurrent requests) \u2014 retry shortly" };
|
|
6688
6723
|
}
|
|
6689
6724
|
const rendered = renderMessage(c, { sender: r.sender, body: { message: kwargs.message }, callId });
|
|
6690
|
-
const { queryCore } = await import('./commands-
|
|
6725
|
+
const { queryCore } = await import('./commands-D3Nu5cYE.mjs');
|
|
6691
6726
|
const timeout = c.reply?.timeout_sec || 120;
|
|
6692
6727
|
let result;
|
|
6693
6728
|
try {
|
|
@@ -7457,6 +7492,7 @@ class OutpostCoordinator {
|
|
|
7457
7492
|
clearTimer;
|
|
7458
7493
|
execTimeoutMs;
|
|
7459
7494
|
staleMs;
|
|
7495
|
+
randToken;
|
|
7460
7496
|
sweeper = null;
|
|
7461
7497
|
constructor(opts = {}) {
|
|
7462
7498
|
this.now = opts.now || (() => Date.now());
|
|
@@ -7464,6 +7500,7 @@ class OutpostCoordinator {
|
|
|
7464
7500
|
this.clearTimer = opts.clearTimer || ((t) => clearTimeout(t));
|
|
7465
7501
|
this.execTimeoutMs = opts.execTimeoutMs ?? OUTPOST_EXEC_TIMEOUT_MS;
|
|
7466
7502
|
this.staleMs = opts.staleMs ?? OUTPOST_STALE_MS;
|
|
7503
|
+
this.randToken = opts.randToken || (() => randomBytes(9).toString("base64url"));
|
|
7467
7504
|
}
|
|
7468
7505
|
isStale(c, at) {
|
|
7469
7506
|
return at - c.lastSeen > this.staleMs;
|
|
@@ -7575,7 +7612,7 @@ class OutpostCoordinator {
|
|
|
7575
7612
|
* machine is not connected.
|
|
7576
7613
|
*/
|
|
7577
7614
|
enqueueExec(machine, cmd, cwd) {
|
|
7578
|
-
const id = `x${(++this.seq).toString(36)}_${this.now().toString(36)}`;
|
|
7615
|
+
const id = `x${(++this.seq).toString(36)}_${this.now().toString(36)}_${this.randToken()}`;
|
|
7579
7616
|
if (!this.isConnected(machine)) {
|
|
7580
7617
|
return {
|
|
7581
7618
|
id,
|
|
@@ -10470,8 +10507,23 @@ function computeCollectionConfigUpdate(existingConfig, extra) {
|
|
|
10470
10507
|
function emailHash(email) {
|
|
10471
10508
|
return createHash("sha256").update(email.toLowerCase()).digest("hex").slice(0, 12);
|
|
10472
10509
|
}
|
|
10510
|
+
function sessionIdHash(sessionId) {
|
|
10511
|
+
return createHash("sha256").update(sessionId).digest("hex").slice(0, 12);
|
|
10512
|
+
}
|
|
10513
|
+
function roleLabel(role) {
|
|
10514
|
+
switch (role) {
|
|
10515
|
+
case "admin":
|
|
10516
|
+
return "full access";
|
|
10517
|
+
case "interact":
|
|
10518
|
+
return "can interact";
|
|
10519
|
+
case "view":
|
|
10520
|
+
return "view only";
|
|
10521
|
+
default:
|
|
10522
|
+
return String(role);
|
|
10523
|
+
}
|
|
10524
|
+
}
|
|
10473
10525
|
function shareAlias(sessionId, recipientEmail) {
|
|
10474
|
-
return `share-${sessionId
|
|
10526
|
+
return `share-${sessionIdHash(sessionId)}-${emailHash(recipientEmail)}`;
|
|
10475
10527
|
}
|
|
10476
10528
|
function eventAlias(eventId, recipientEmail) {
|
|
10477
10529
|
return `evt-${emailHash(recipientEmail)}-${eventId.slice(0, 8)}`;
|
|
@@ -10585,8 +10637,10 @@ class SharingNotificationSync {
|
|
|
10585
10637
|
userEmail: params.ownerEmail
|
|
10586
10638
|
},
|
|
10587
10639
|
title: `${typeLabel} shared with you`,
|
|
10588
|
-
//
|
|
10589
|
-
|
|
10640
|
+
// #0689: render the recipient's ACTUAL role (view/interact/admin) — authorize.ts genuinely
|
|
10641
|
+
// enforces per-user roles, so the old hardcoded "(full access)" misstated a view/interact
|
|
10642
|
+
// invitee's access.
|
|
10643
|
+
body: `${params.ownerEmail} shared "${params.label || "Untitled"}" with you (${roleLabel(params.role)})`,
|
|
10590
10644
|
level: "info",
|
|
10591
10645
|
action: shareType === "session" ? {
|
|
10592
10646
|
type: "add-session-bookmark",
|
|
@@ -10766,13 +10820,15 @@ class SharingNotificationSync {
|
|
|
10766
10820
|
// ── Sharing config diff + sync ───────────────────────────────────
|
|
10767
10821
|
async syncSharing(sessionId, oldSharing, newSharing, context) {
|
|
10768
10822
|
if (!this.initialized) return;
|
|
10769
|
-
const
|
|
10770
|
-
(oldSharing?.allowedUsers || []).map((u) => u.email.toLowerCase())
|
|
10823
|
+
const oldRoleByEmail = new Map(
|
|
10824
|
+
(oldSharing?.allowedUsers || []).map((u) => [u.email.toLowerCase(), u.role])
|
|
10771
10825
|
);
|
|
10826
|
+
const oldEmails = new Set(oldRoleByEmail.keys());
|
|
10772
10827
|
const newUsers = newSharing.allowedUsers || [];
|
|
10773
10828
|
const newEmails = new Set(newUsers.map((u) => u.email.toLowerCase()));
|
|
10774
10829
|
for (const user of newUsers) {
|
|
10775
|
-
|
|
10830
|
+
const prevRole = oldRoleByEmail.get(user.email.toLowerCase());
|
|
10831
|
+
if (prevRole === void 0 || prevRole !== user.role) {
|
|
10776
10832
|
this.notifyShare({
|
|
10777
10833
|
recipientEmail: user.email,
|
|
10778
10834
|
sessionId,
|
|
@@ -12209,6 +12265,16 @@ function codexCumulativeTokens(payload) {
|
|
|
12209
12265
|
return nonCachedInput + output + Math.round(cached * 0.1);
|
|
12210
12266
|
}
|
|
12211
12267
|
|
|
12268
|
+
const PINNED_CODEX_VERSION = "0.146.0";
|
|
12269
|
+
const MIN_CODEX_STEER_VERSION = { major: 0, minor: 129, patch: 0 };
|
|
12270
|
+
function cmpVer(a, b) {
|
|
12271
|
+
return a.major - b.major || a.minor - b.minor || a.patch - b.patch;
|
|
12272
|
+
}
|
|
12273
|
+
function codexSupportsSteer(v) {
|
|
12274
|
+
if (!v) return false;
|
|
12275
|
+
return cmpVer(v, MIN_CODEX_STEER_VERSION) >= 0;
|
|
12276
|
+
}
|
|
12277
|
+
|
|
12212
12278
|
function parseCodexVersion(v) {
|
|
12213
12279
|
const m = v.match(/codex-cli\s+(\d+)\.(\d+)\.(\d+)/);
|
|
12214
12280
|
if (!m) return null;
|
|
@@ -12225,6 +12291,16 @@ function codexAppServerAvailable() {
|
|
|
12225
12291
|
return null;
|
|
12226
12292
|
}
|
|
12227
12293
|
}
|
|
12294
|
+
let _steerSupport = null;
|
|
12295
|
+
function codexSupportsSteerInstalled() {
|
|
12296
|
+
if (_steerSupport !== null) return _steerSupport;
|
|
12297
|
+
try {
|
|
12298
|
+
_steerSupport = codexSupportsSteer(parseCodexVersion(execSync$1("codex --version", { encoding: "utf8" }).trim()));
|
|
12299
|
+
} catch {
|
|
12300
|
+
_steerSupport = false;
|
|
12301
|
+
}
|
|
12302
|
+
return _steerSupport;
|
|
12303
|
+
}
|
|
12228
12304
|
class CodexAppServerClient {
|
|
12229
12305
|
constructor(opts) {
|
|
12230
12306
|
this.opts = opts;
|
|
@@ -12381,19 +12457,36 @@ class CodexAppServerClient {
|
|
|
12381
12457
|
/**
|
|
12382
12458
|
* Inject additional input into the CURRENTLY RUNNING turn (Claude-Code-style mid-turn steering).
|
|
12383
12459
|
*
|
|
12384
|
-
* codex app-server
|
|
12385
|
-
*
|
|
12386
|
-
*
|
|
12387
|
-
*
|
|
12388
|
-
*
|
|
12460
|
+
* Uses codex app-server's NATIVE `turn/steer` — the correct primitive for "append this message to
|
|
12461
|
+
* the in-flight turn without interrupting it." The steered input is applied at the next model step
|
|
12462
|
+
* (it does NOT abort a running tool call), the assistant finishes the current work and drains the
|
|
12463
|
+
* steered message as user input before its next LLM call, and NO separate `turn/started` /
|
|
12464
|
+
* `turn/completed` fires — the original single in-flight completion still resolves `sendTurnAndWait`.
|
|
12465
|
+
* So we send it WITHOUT arming a new `pendingTurn` slot and WITHOUT overwriting `_turnId`.
|
|
12466
|
+
*
|
|
12467
|
+
* (The earlier #86 implementation fired a second `turn/start` mid-turn; on codex 0.144 that
|
|
12468
|
+
* ABORTS/REPLACES the running turn instead of folding — the "cuts off the previous task" bug.)
|
|
12389
12469
|
*
|
|
12390
|
-
* Returns false when there is
|
|
12391
|
-
* turn
|
|
12470
|
+
* Returns false when there is no active turn to steer, or when the server REJECTS the steer
|
|
12471
|
+
* (no active turn / expectedTurnId mismatch / non-steerable turn kind such as review or manual
|
|
12472
|
+
* compact). The caller then falls back to client-side queueing (post-turn drain via sendPrompt),
|
|
12473
|
+
* so a rejected steer degrades gracefully rather than losing the message.
|
|
12392
12474
|
*/
|
|
12393
|
-
async injectInput(prompt,
|
|
12394
|
-
if (!this._threadId || !this.pendingTurn) return false;
|
|
12395
|
-
|
|
12396
|
-
|
|
12475
|
+
async injectInput(prompt, _o) {
|
|
12476
|
+
if (!this._threadId || !this.pendingTurn || !this._turnId) return false;
|
|
12477
|
+
if (!codexSupportsSteerInstalled()) return false;
|
|
12478
|
+
const params = {
|
|
12479
|
+
threadId: this._threadId,
|
|
12480
|
+
expectedTurnId: this._turnId,
|
|
12481
|
+
input: [{ type: "text", text: prompt }]
|
|
12482
|
+
};
|
|
12483
|
+
try {
|
|
12484
|
+
await this.request("turn/steer", params);
|
|
12485
|
+
return true;
|
|
12486
|
+
} catch (e) {
|
|
12487
|
+
this.log("[codex-app-server] turn/steer rejected \u2014 falling back to post-turn queue", e);
|
|
12488
|
+
return false;
|
|
12489
|
+
}
|
|
12397
12490
|
}
|
|
12398
12491
|
/** Interrupt the in-flight turn (real server-side abort — the old MCP path couldn't do this). */
|
|
12399
12492
|
async interrupt() {
|
|
@@ -17519,7 +17612,7 @@ async function startDaemon(options) {
|
|
|
17519
17612
|
try {
|
|
17520
17613
|
const dir = loadSessionIndex()[sessionId]?.directory;
|
|
17521
17614
|
if (!dir) return;
|
|
17522
|
-
const { reconcileServiceLinks } = await import('./agentCommands-
|
|
17615
|
+
const { reconcileServiceLinks } = await import('./agentCommands-DEJpgdgc.mjs');
|
|
17523
17616
|
const configPath = getSvampConfigPath(dir, sessionId);
|
|
17524
17617
|
const config = readSvampConfig(configPath);
|
|
17525
17618
|
const entries = Array.from(urls.entries());
|
|
@@ -17537,7 +17630,7 @@ async function startDaemon(options) {
|
|
|
17537
17630
|
}
|
|
17538
17631
|
}
|
|
17539
17632
|
async function createExposedTunnel(spec) {
|
|
17540
|
-
const { FrpcTunnel } = await import('./frpc-
|
|
17633
|
+
const { FrpcTunnel } = await import('./frpc-DV_IIYpM.mjs');
|
|
17541
17634
|
const tunnel = new FrpcTunnel({
|
|
17542
17635
|
name: spec.name,
|
|
17543
17636
|
ports: spec.ports,
|
|
@@ -19755,11 +19848,11 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
19755
19848
|
});
|
|
19756
19849
|
},
|
|
19757
19850
|
onIssue: async (params) => {
|
|
19758
|
-
const { issueRpc } = await import('./rpc-
|
|
19851
|
+
const { issueRpc } = await import('./rpc-wL-45Raf.mjs');
|
|
19759
19852
|
return issueRpc(params?.cwd || directory, params || {}, { notifySession: notifyIssueOwner, rekickLoopOwner });
|
|
19760
19853
|
},
|
|
19761
19854
|
onWorkflow: async (params) => {
|
|
19762
|
-
const { workflowRpc } = await import('./rpc-
|
|
19855
|
+
const { workflowRpc } = await import('./rpc-BjKmyKdA.mjs');
|
|
19763
19856
|
return workflowRpc(params?.cwd || directory, params || {});
|
|
19764
19857
|
},
|
|
19765
19858
|
onRipgrep: async (args, cwd) => {
|
|
@@ -20391,11 +20484,11 @@ ${capturedError}${buildClaudeErrorHint(capturedError)}`;
|
|
|
20391
20484
|
});
|
|
20392
20485
|
},
|
|
20393
20486
|
onIssue: async (params) => {
|
|
20394
|
-
const { issueRpc } = await import('./rpc-
|
|
20487
|
+
const { issueRpc } = await import('./rpc-wL-45Raf.mjs');
|
|
20395
20488
|
return issueRpc(params?.cwd || directory, params || {}, { notifySession: notifyIssueOwner, rekickLoopOwner });
|
|
20396
20489
|
},
|
|
20397
20490
|
onWorkflow: async (params) => {
|
|
20398
|
-
const { workflowRpc } = await import('./rpc-
|
|
20491
|
+
const { workflowRpc } = await import('./rpc-BjKmyKdA.mjs');
|
|
20399
20492
|
return workflowRpc(params?.cwd || directory, params || {});
|
|
20400
20493
|
},
|
|
20401
20494
|
onRipgrep: async (args, cwd) => {
|
|
@@ -21546,7 +21639,7 @@ ${oracle.output.trim().slice(0, 500)}`, "\u{1F501} Continuing loop");
|
|
|
21546
21639
|
const PING_TIMEOUT_MS = 15e3;
|
|
21547
21640
|
const POST_RECONNECT_GRACE_MS = 2e4;
|
|
21548
21641
|
const RECONNECT_JITTER_MS = 2500;
|
|
21549
|
-
const { WorkflowScheduler } = await import('./scheduler-
|
|
21642
|
+
const { WorkflowScheduler } = await import('./scheduler-Dia9Akaw.mjs');
|
|
21550
21643
|
const workflowProjectRoots = () => {
|
|
21551
21644
|
const dirs = /* @__PURE__ */ new Set();
|
|
21552
21645
|
for (const s of pidToTrackedSession.values()) {
|
|
@@ -22179,4 +22272,4 @@ var run = /*#__PURE__*/Object.freeze({
|
|
|
22179
22272
|
writeStopMarker: writeStopMarker
|
|
22180
22273
|
});
|
|
22181
22274
|
|
|
22182
|
-
export {
|
|
22275
|
+
export { getSkillInfo as $, removeWorkflow as A, validateWorkflowName as B, saveWorkflow as C, rawWorkflow as D, listWorkflows as E, isWorkflowEnabled as F, workflowCrons as G, cronMatches as H, summarize as I, workflowSteps as J, parseJwtEmail as K, computeCollectionConfigUpdate as L, SYSTEM_COLLECTION_CONFIG as M, loadMachineContext as N, buildMachineInstructions as O, machineToolsForRole as P, buildMachineTools as Q, READ_ONLY_TOOLS as R, SharingNotificationSync as S, PINNED_CODEX_VERSION as T, parseFrontmatter as U, getSkillsServer as V, getSkillsWorkspaceName as W, getSkillsCollectionName as X, fetchWithTimeout as Y, searchSkills as Z, SKILLS_DIR as _, createSessionStore as a, downloadSkillFile as a0, listSkillFiles as a1, resolveModel as a2, clearStopMarker as a3, stopMarkerExists as a4, formatHandle as a5, normalizeAllowedUser as a6, loadSecurityContextConfig as a7, resolveSecurityContext as a8, buildSecurityContextFromFlags as a9, mergeSecurityContexts as aa, buildSessionShareUrl as ab, computeOutboundHop as ac, registerAwaitingReply as ad, buildMachineShareUrl as ae, parseHandle as af, handleMatchesMetadata as ag, describeMisconfiguration as ah, buildMachineDeps as ai, applyClaudeProxyEnv as aj, composeSessionId as ak, generateFriendlyName as al, generateHookSettings as am, staticFileServer as an, instanceConfig as ao, claudeAuth as ap, codexProvider as aq, projectInfo as ar, DefaultTransport$1 as as, acpBackend as at, acpAgentConfig as au, codexAppServerBackend as av, GeminiTransport$1 as aw, api as ax, run as ay, stopDaemon as b, connectToHypha as c, daemonStatus as d, getFrpsSubdomainHost as e, getFrpsServerPort as f, getHyphaServerUrl$1 as g, getFrpsServerAddr as h, shortId as i, resolveProjectRoot as j, getIssue as k, resumeIssue as l, addComment as m, addIssue as n, listIssues as o, pauseIssue as p, searchIssues as q, registerMachineService as r, startDaemon as s, isVisibleTo as t, updateIssue as u, getRun as v, listRuns as w, getWorkflow as x, runWorkflow as y, setWorkflowEnabled as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import {
|
|
1
|
+
import{createRequire as _pkgrollCR}from"node:module";const require=_pkgrollCR(import.meta.url);import { aj as applyClaudeProxyEnv, ak as composeSessionId, al as generateFriendlyName, c as connectToHypha, a as createSessionStore, r as registerMachineService, am as generateHookSettings } from './run-VQIHMUdo.mjs';
|
|
2
2
|
import os from 'node:os';
|
|
3
3
|
import { resolve, join } from 'node:path';
|
|
4
4
|
import { existsSync, readFileSync, watch } from 'node:fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as resolveProjectRoot, E as listWorkflows, F as isWorkflowEnabled, G as workflowCrons, y as runWorkflow, H as cronMatches } from './run-
|
|
1
|
+
import { j as resolveProjectRoot, E as listWorkflows, F as isWorkflowEnabled, G as workflowCrons, y as runWorkflow, H as cronMatches } from './run-VQIHMUdo.mjs';
|
|
2
2
|
import 'os';
|
|
3
3
|
import 'fs/promises';
|
|
4
4
|
import 'fs';
|