@triflux/remote 10.50.2 → 10.52.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/cto/brief.mjs +0 -20
- package/cto/collect.mjs +1 -200
- package/cto/current.schema.json +2 -23
- package/cto/hygiene.mjs +2 -61
- package/cto/lake-root.mjs +0 -56
- package/cto/status.mjs +5 -187
- package/hub/index.mjs +0 -17
- package/hub/team/agent-map.json +0 -1
- package/hub/team/agents-row-attach.py +120 -0
- package/hub/team/agents-row.mjs +200 -0
- package/hub/team/ansi.mjs +1 -35
- package/hub/team/backend.mjs +9 -145
- package/hub/team/claude-daemon-control.mjs +1 -2
- package/hub/team/claude-session-projection.mjs +5 -73
- package/hub/team/cli/commands/attach.mjs +1 -17
- package/hub/team/cli/commands/control.mjs +12 -38
- package/hub/team/cli/commands/debug.mjs +2 -39
- package/hub/team/cli/commands/focus.mjs +5 -31
- package/hub/team/cli/commands/interrupt.mjs +6 -25
- package/hub/team/cli/commands/kill.mjs +1 -30
- package/hub/team/cli/commands/list.mjs +0 -16
- package/hub/team/cli/commands/send.mjs +6 -26
- package/hub/team/cli/commands/start/index.mjs +42 -133
- package/hub/team/cli/commands/start/parse-args.mjs +15 -40
- package/hub/team/cli/commands/start/start-headless.mjs +138 -105
- package/hub/team/cli/commands/start/start-mux.mjs +2 -7
- package/hub/team/cli/commands/status.mjs +2 -57
- package/hub/team/cli/commands/stop.mjs +14 -19
- package/hub/team/cli/help.mjs +4 -5
- package/hub/team/cli/manifest.mjs +5 -1
- package/hub/team/cli/render.mjs +0 -12
- package/hub/team/cli/services/runtime-mode.mjs +27 -98
- package/hub/team/cli/services/state-store.mjs +5 -20
- package/hub/team/handoff.mjs +3 -34
- package/hub/team/headless.mjs +108 -1296
- package/hub/team/orchestrator.mjs +4 -30
- package/hub/team/pane.mjs +6 -28
- package/hub/team/psmux.mjs +3 -34
- package/hub/team/remote-session.mjs +1 -2
- package/hub/team/session-context.mjs +1 -1
- package/hub/team/session.mjs +7 -91
- package/hub/team/tui-core.mjs +1 -1
- package/hub/team/tui-viewer.mjs +11 -58
- package/hub/team/tui.mjs +8 -306
- package/hub/team/uds-orchestrator.mjs +2 -580
- package/hub/team/wt-manager.mjs +2 -2
- package/hub/workers/factory.mjs +6 -84
- package/hub/workers/interface.mjs +1 -7
- package/hub/workers/lib/jsonrpc-core.mjs +11 -0
- package/hub/workers/lib/jsonrpc-ws-uds.mjs +5 -8
- package/package.json +3 -8
- package/scripts/lib/agent-route-policy.mjs +143 -62
- package/scripts/lib/cli-claude.mjs +0 -14
- package/scripts/lib/env-probe.mjs +2 -131
- package/scripts/lib/gemini-profiles.mjs +2 -69
- package/scripts/lib/legacy-mcp-cleanup.mjs +283 -0
- package/scripts/lib/machine-profile.mjs +3 -17
- package/scripts/lib/mcp-filter.mjs +109 -53
- package/scripts/lib/mcp-guard-engine.mjs +40 -98
- package/scripts/lib/mcp-health.mjs +2 -2
- package/scripts/lib/mcp-server-catalog.mjs +2 -2
- package/scripts/lib/psmux-info.mjs +11 -59
- package/scripts/lib/skill-template.mjs +0 -245
- package/hub/hub-lifecycle.mjs +0 -248
- package/hub/pipe.mjs +0 -825
- package/hub/promote-penalties.mjs +0 -138
- package/hub/public/dashboard.html +0 -416
- package/hub/schema.sql +0 -209
- package/hub/server.mjs +0 -3048
- package/hub/store-adapter.mjs +0 -182
- package/hub/store.mjs +0 -1736
- package/hub/team/build-worker-prompt.mjs +0 -92
- package/hub/team/check-mcp-hub.mjs +0 -49
- package/hub/team/claude-native-bridge.mjs +0 -987
- package/hub/team/cli/commands/start/start-in-process.mjs +0 -50
- package/hub/team/cli/commands/start/start-wt.mjs +0 -86
- package/hub/team/cli/services/hub-client.mjs +0 -264
- package/hub/team/cli/services/native-control.mjs +0 -145
- package/hub/team/codex-review.mjs +0 -520
- package/hub/team/conductor-mesh-bridge.mjs +0 -122
- package/hub/team/conductor-registry.mjs +0 -121
- package/hub/team/conductor.mjs +0 -1529
- package/hub/team/consensus-meta.mjs +0 -176
- package/hub/team/cto-auto-collect.mjs +0 -115
- package/hub/team/cto-pull.mjs +0 -31
- package/hub/team/daemon-pty-tmux-bridge.mjs +0 -146
- package/hub/team/dashboard.mjs +0 -322
- package/hub/team/event-log.mjs +0 -84
- package/hub/team/execution-mode.mjs +0 -324
- package/hub/team/extract-completion-payload.mjs +0 -110
- package/hub/team/headless-bridge-session.mjs +0 -17
- package/hub/team/health-probe.mjs +0 -435
- package/hub/team/interactive-native-launcher.mjs +0 -119
- package/hub/team/interactive-native-worker.mjs +0 -80
- package/hub/team/interactive-tui-transport.mjs +0 -479
- package/hub/team/launcher-template.mjs +0 -144
- package/hub/team/lead-control.mjs +0 -191
- package/hub/team/mcp-selector.mjs +0 -145
- package/hub/team/native-supervisor.mjs +0 -460
- package/hub/team/native.mjs +0 -727
- package/hub/team/recovery-store.mjs +0 -149
- package/hub/team/remote-probe.mjs +0 -292
- package/hub/team/remote-watcher.mjs +0 -506
- package/hub/team/runtime-strategy.mjs +0 -200
- package/hub/team/schemas/worker-completion.json +0 -39
- package/hub/team/sentinel-capture.mjs +0 -127
- package/hub/team/session-sync.mjs +0 -316
- package/hub/team/swarm-cli.mjs +0 -390
- package/hub/team/swarm-hypervisor.mjs +0 -2206
- package/hub/team/swarm-intent.mjs +0 -216
- package/hub/team/swarm-locks.mjs +0 -335
- package/hub/team/swarm-planner.mjs +0 -371
- package/hub/team/swarm-preflight.mjs +0 -366
- package/hub/team/swarm-reconciler.mjs +0 -242
- package/hub/team/synapse-cli.mjs +0 -458
- package/hub/team/synapse-http.mjs +0 -311
- package/hub/team/synapse-registry.mjs +0 -618
- package/hub/team/tui-remote-adapter.mjs +0 -377
- package/hub/team/tui-synapse.mjs +0 -223
- package/hub/team/worker-completion-validator.mjs +0 -79
- package/hub/team/worker-sandbox.mjs +0 -125
- package/hub/team/worktree-lifecycle.mjs +0 -639
- package/hub/team/wt-templates.json +0 -43
- package/hub/tools.mjs +0 -900
- package/hub/workers/antigravity-route-worker.mjs +0 -179
- package/hub/workers/codex-app-server-worker.mjs +0 -1067
- package/hub/workers/delegator-mcp.mjs +0 -1098
- package/hub/workers/lib/jsonrpc-stdio.mjs +0 -204
- package/scripts/lib/claudemd-scanner.mjs +0 -223
- package/scripts/lib/context.mjs +0 -67
- package/scripts/lib/dynamic-route-cli.mjs +0 -107
- package/scripts/lib/handoff.mjs +0 -187
- package/scripts/lib/logger.mjs +0 -122
- package/scripts/lib/stealth-fetch.mjs +0 -176
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
// hub/team/worker-sandbox.mjs — local worker HOME/APPDATA isolation helpers
|
|
2
|
-
//
|
|
3
|
-
// Team/swarm workers run untrusted task-specific CLIs. Keep their mutable user
|
|
4
|
-
// state under the worker worktree instead of the operator's real home/appdata,
|
|
5
|
-
// while preserving explicitly brokered auth homes such as CODEX_HOME.
|
|
6
|
-
|
|
7
|
-
import { mkdirSync } from "node:fs";
|
|
8
|
-
import { join, resolve, win32 } from "node:path";
|
|
9
|
-
|
|
10
|
-
const SAFE_SEGMENT_RE = /[^a-zA-Z0-9._-]/g;
|
|
11
|
-
|
|
12
|
-
function safeSegment(value, fallback = "worker") {
|
|
13
|
-
const raw = String(value ?? "").trim();
|
|
14
|
-
const cleaned = raw.replace(SAFE_SEGMENT_RE, "_").replace(/^_+|_+$/g, "");
|
|
15
|
-
return cleaned || fallback;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function isDisabled(env = {}) {
|
|
19
|
-
return /^(0|false|no|off)$/i.test(String(env.TFX_WORKER_SANDBOX ?? ""));
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// Antigravity-family CLIs (agy/gemini) authenticate only via interactive OAuth and
|
|
23
|
-
// store credentials in the OS keyring plus HOME-relative ~/.gemini state bound to the
|
|
24
|
-
// logged-in user. They expose no headless-auth flag and no config-home env
|
|
25
|
-
// (antigravity-cli issues #223/#155/#316), so overriding HOME forces a re-auth that
|
|
26
|
-
// never completes in a headless swarm/team worker — the worker times out at the OAuth
|
|
27
|
-
// wait and does no work (the agy "no_commit" symptom). Keep the host HOME for these
|
|
28
|
-
// agents so the keyring and ~/.gemini resolve. Codex stays isolated via CODEX_HOME.
|
|
29
|
-
const AUTH_HOME_BOUND_AGENTS = new Set(["antigravity", "agy", "gemini"]);
|
|
30
|
-
|
|
31
|
-
function isAuthHomeBoundAgent(agent) {
|
|
32
|
-
return AUTH_HOME_BOUND_AGENTS.has(
|
|
33
|
-
String(agent ?? "")
|
|
34
|
-
.trim()
|
|
35
|
-
.toLowerCase(),
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function windowsHomeParts(home) {
|
|
40
|
-
const normalized = String(home || "").replace(/\//g, "\\");
|
|
41
|
-
const match = normalized.match(/^([a-zA-Z]:)(\\.*)$/);
|
|
42
|
-
if (!match) return null;
|
|
43
|
-
return { drive: match[1], path: match[2] || "\\" };
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function mkdirAll(paths) {
|
|
47
|
-
for (const path of paths) mkdirSync(path, { recursive: true });
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Build a deterministic sandbox home for a local team/swarm worker.
|
|
52
|
-
*
|
|
53
|
-
* @param {object} opts
|
|
54
|
-
* @param {string} [opts.cwd] Worktree/current working directory for the worker.
|
|
55
|
-
* @param {string} [opts.sessionId] Stable session/member id.
|
|
56
|
-
* @param {string} [opts.agent] Worker CLI/agent; antigravity-family agents skip the
|
|
57
|
-
* HOME override so their keyring/OAuth credentials resolve (see note above).
|
|
58
|
-
* @param {object} [opts.env] Existing env used for opt-out and explicit root.
|
|
59
|
-
* @param {boolean} [opts.create=true] Create directories eagerly.
|
|
60
|
-
* @returns {{env: object, root: string|null, home: string|null, disabled: boolean, reason?: string}}
|
|
61
|
-
*/
|
|
62
|
-
export function buildWorkerSandboxEnv(opts = {}) {
|
|
63
|
-
const env = opts.env && typeof opts.env === "object" ? opts.env : {};
|
|
64
|
-
if (isDisabled(env)) {
|
|
65
|
-
return { env: {}, root: null, home: null, disabled: true };
|
|
66
|
-
}
|
|
67
|
-
if (isAuthHomeBoundAgent(opts.agent)) {
|
|
68
|
-
return {
|
|
69
|
-
env: {},
|
|
70
|
-
root: null,
|
|
71
|
-
home: null,
|
|
72
|
-
disabled: true,
|
|
73
|
-
reason: "auth-home-bound-agent",
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const cwd = resolve(opts.cwd || process.cwd());
|
|
78
|
-
const sessionId = safeSegment(opts.sessionId, "worker");
|
|
79
|
-
const home = resolve(
|
|
80
|
-
env.TFX_WORKER_HOME || join(cwd, ".triflux", "worker-home", sessionId),
|
|
81
|
-
);
|
|
82
|
-
const appData = join(home, "AppData", "Roaming");
|
|
83
|
-
const localAppData = join(home, "AppData", "Local");
|
|
84
|
-
const xdgConfig = join(home, ".config");
|
|
85
|
-
const xdgCache = join(home, ".cache");
|
|
86
|
-
const xdgState = join(home, ".local", "state");
|
|
87
|
-
|
|
88
|
-
if (opts.create !== false) {
|
|
89
|
-
mkdirAll([home, appData, localAppData, xdgConfig, xdgCache, xdgState]);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const overlay = {
|
|
93
|
-
TFX_WORKER_HOME: home,
|
|
94
|
-
HOME: home,
|
|
95
|
-
USERPROFILE: home,
|
|
96
|
-
APPDATA: appData,
|
|
97
|
-
LOCALAPPDATA: localAppData,
|
|
98
|
-
XDG_CONFIG_HOME: xdgConfig,
|
|
99
|
-
XDG_CACHE_HOME: xdgCache,
|
|
100
|
-
XDG_STATE_HOME: xdgState,
|
|
101
|
-
};
|
|
102
|
-
const hostHome = env.HOME || env.USERPROFILE;
|
|
103
|
-
if (!env.CODEX_HOME && hostHome) {
|
|
104
|
-
overlay.CODEX_HOME = join(hostHome, ".codex");
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
const winParts =
|
|
108
|
-
windowsHomeParts(home) ||
|
|
109
|
-
(process.platform === "win32"
|
|
110
|
-
? {
|
|
111
|
-
drive: win32.parse(home).root.replace(/[\\/]$/, "") || "C:",
|
|
112
|
-
path:
|
|
113
|
-
win32
|
|
114
|
-
.relative(win32.parse(home).root, home)
|
|
115
|
-
.replace(/\//g, "\\")
|
|
116
|
-
.replace(/^/, "\\") || "\\",
|
|
117
|
-
}
|
|
118
|
-
: null);
|
|
119
|
-
if (winParts) {
|
|
120
|
-
overlay.HOMEDRIVE = winParts.drive;
|
|
121
|
-
overlay.HOMEPATH = winParts.path;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
return { env: overlay, root: home, home, disabled: false };
|
|
125
|
-
}
|