triflux 10.50.0 → 10.50.1
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/bin/tfx-live.mjs +0 -47
- package/package.json +1 -1
package/bin/tfx-live.mjs
CHANGED
|
@@ -14,8 +14,6 @@ import { homedir, tmpdir } from "node:os";
|
|
|
14
14
|
import { join as pathJoin, resolve as pathResolve } from "node:path";
|
|
15
15
|
import { fileURLToPath } from "node:url";
|
|
16
16
|
import { promisify } from "node:util";
|
|
17
|
-
import { runHygiene } from "../cto/hygiene.mjs";
|
|
18
|
-
import { notifyCtoHygieneOnce } from "../cto/hygiene-notify.mjs";
|
|
19
17
|
import {
|
|
20
18
|
codexThreadNames,
|
|
21
19
|
readCodexSessionRecords,
|
|
@@ -26,7 +24,6 @@ import {
|
|
|
26
24
|
findClaudeTranscript,
|
|
27
25
|
readClaudeTranscript,
|
|
28
26
|
} from "../hub/team/claude-transcript.mjs";
|
|
29
|
-
import { createNotifier } from "../hub/team/notify.mjs";
|
|
30
27
|
import {
|
|
31
28
|
escapePwshSingleQuoted as escapeRemotePwshSingleQuoted,
|
|
32
29
|
probeRemoteEnv as probeRemoteHostEnv,
|
|
@@ -100,8 +97,6 @@ function usage(command) {
|
|
|
100
97
|
" tfx-live orchestrate --task TEXT [--mode peer|codex-led|claude-led] [--codex-transport exec|app-server-uds] [--codex-socket PATH|default] [--cwd DIR] [--timeout 120]",
|
|
101
98
|
" Codex TUI may use a shared app-server daemon. UDS ask resumes the thread to receive answer events; sending to an active thread with --if-busy steer merges input into that turn.",
|
|
102
99
|
" Runs the Claude(UDS)+Codex orchestration engine. --codex-transport app-server-uds drives a real `codex app-server` over WebSocket-over-UDS (experimental); default exec keeps the codex stdio one-shot path.",
|
|
103
|
-
" tfx-live cto-hygiene-notify --root DIR --state-file PATH [--json]",
|
|
104
|
-
" One-shot CTO hygiene dry-run notification: sends only when actionable hygiene state changes; no polling or apply/steward lock.",
|
|
105
100
|
];
|
|
106
101
|
if (!command) return lines.join("\n");
|
|
107
102
|
const selected = lines.filter(
|
|
@@ -4141,45 +4136,6 @@ function printJson(value) {
|
|
|
4141
4136
|
process.stdout.write(`${JSON.stringify(value, null, 2)}\n`);
|
|
4142
4137
|
}
|
|
4143
4138
|
|
|
4144
|
-
async function ctoHygieneNotify(flags) {
|
|
4145
|
-
const rootDir = flags.root ? pathResolve(flags.root) : process.cwd();
|
|
4146
|
-
const stateFile = flags["state-file"]
|
|
4147
|
-
? pathResolve(flags["state-file"])
|
|
4148
|
-
: pathJoin(rootDir, ".triflux", "cto-hygiene-notify-state.json");
|
|
4149
|
-
|
|
4150
|
-
const projection = await runHygiene(["--dry-run", "--json"], {
|
|
4151
|
-
rootDir,
|
|
4152
|
-
dryRun: true,
|
|
4153
|
-
json: false,
|
|
4154
|
-
stdout: {
|
|
4155
|
-
write() {
|
|
4156
|
-
return true;
|
|
4157
|
-
},
|
|
4158
|
-
},
|
|
4159
|
-
});
|
|
4160
|
-
|
|
4161
|
-
const notifier = createNotifier({ stdout: process.stderr });
|
|
4162
|
-
const result = await notifyCtoHygieneOnce(projection, {
|
|
4163
|
-
notifier,
|
|
4164
|
-
stateFile,
|
|
4165
|
-
});
|
|
4166
|
-
const payload = {
|
|
4167
|
-
ok: true,
|
|
4168
|
-
stateFile,
|
|
4169
|
-
counts: projection.counts,
|
|
4170
|
-
...result,
|
|
4171
|
-
};
|
|
4172
|
-
|
|
4173
|
-
if (flags.json) {
|
|
4174
|
-
printJson(payload);
|
|
4175
|
-
return;
|
|
4176
|
-
}
|
|
4177
|
-
|
|
4178
|
-
process.stdout.write(
|
|
4179
|
-
`cto hygiene notify: ${payload.reason} (${payload.hash})\n`,
|
|
4180
|
-
);
|
|
4181
|
-
}
|
|
4182
|
-
|
|
4183
4139
|
async function main() {
|
|
4184
4140
|
const { command, flags } = parseCli(process.argv.slice(2));
|
|
4185
4141
|
|
|
@@ -4214,8 +4170,6 @@ async function main() {
|
|
|
4214
4170
|
await peer(flags);
|
|
4215
4171
|
} else if (command === "orchestrate") {
|
|
4216
4172
|
await orchestrate(flags);
|
|
4217
|
-
} else if (command === "cto-hygiene-notify") {
|
|
4218
|
-
await ctoHygieneNotify(flags);
|
|
4219
4173
|
} else {
|
|
4220
4174
|
throw new Error(`Unknown subcommand: ${command}\n${usage()}`);
|
|
4221
4175
|
}
|
|
@@ -4230,7 +4184,6 @@ export {
|
|
|
4230
4184
|
callRemoteLive,
|
|
4231
4185
|
classifyPeerExitReason,
|
|
4232
4186
|
createPeerSignalController,
|
|
4233
|
-
ctoHygieneNotify,
|
|
4234
4187
|
derivePeerStatus,
|
|
4235
4188
|
discoverClaudeTmuxSessions,
|
|
4236
4189
|
discoverCodexTmuxSessions,
|