@wrongstack/cli 0.319.1 → 1.0.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/data/providers.json +22 -15
- package/dist/{acp-5ANIAOZC.js → acp-3LARESEO.js} +113 -10
- package/dist/acp-hq-telemetry.d.ts +44 -0
- package/dist/{audit-ZPCLCC3C.js → audit-46YK5DSC.js} +1 -2
- package/dist/{auth-ND7J7DTD.js → auth-ZUMCDNE5.js} +6 -7
- package/dist/auth-menu/add-provider.d.ts +7 -0
- package/dist/auth-menu/panel-service.d.ts +2 -20
- package/dist/{auto-discover-providers-MHFLDSD3.js → auto-discover-providers-VQU3IZMR.js} +1 -2
- package/dist/{bench-XYG56AMO.js → bench-YBU6BVQP.js} +175 -35
- package/dist/boot/brain-decision-log.d.ts +22 -2
- package/dist/boot/system-prompt-menu.d.ts +7 -0
- package/dist/{boot-auto-thin-BZ675EVT.js → boot-auto-thin-MANHOYHE.js} +1 -2
- package/dist/{chronicle-6EPPMUC5.js → chronicle-UTFETHP6.js} +1 -2
- package/dist/{chunk-HF5VQWIY.js → chunk-5IA5337I.js} +3 -3
- package/dist/{chunk-TALOKMIC.js → chunk-C2E24IXZ.js} +31 -15
- package/dist/chunk-D2VCUN7M.js +54 -0
- package/dist/{chunk-XPX432BZ.js → chunk-DR2OXU46.js} +50 -39
- package/dist/{chunk-GGGUZSAU.js → chunk-E6RFXHWD.js} +18 -13
- package/dist/{chunk-TYO2OVAD.js → chunk-EWKESL4L.js} +8 -4
- package/dist/{chunk-QAC263FZ.js → chunk-FPIWTJ2G.js} +2 -3
- package/dist/{chunk-7YLN7YUA.js → chunk-IMWXXF4J.js} +61 -9
- package/dist/{chunk-LIWVIEZM.js → chunk-KHWDTNBZ.js} +5 -5
- package/dist/{chunk-IMT6PNV5.js → chunk-MNQQ4ZNF.js} +26 -22
- package/dist/{chunk-P2OKBDCH.js → chunk-MXEJEYT7.js} +53 -14
- package/dist/{chunk-PCBJSXYV.js → chunk-O4A3HHKD.js} +2 -2
- package/dist/{chunk-XYKYXFEE.js → chunk-TE3Q32JP.js} +10 -4
- package/dist/{chunk-635WW3II.js → chunk-TEBMCYZN.js} +67 -18
- package/dist/{chunk-E4I2TF5S.js → chunk-TNK6237M.js} +2 -2
- package/dist/chunk-UQUYBDMG.js +51 -0
- package/dist/{chunk-F5GA2QW2.js → chunk-ZSZ3EYWH.js} +2 -2
- package/dist/{cli-context-K73EIND5.js → cli-context-7X3M6U73.js} +59 -308
- package/dist/{cli-main-QXSKKANW.js → cli-main-53KG6HAV.js} +972 -293
- package/dist/config-transfer-2YF3CRTN.js +99 -0
- package/dist/{diag-doctor-QZVKUAE5.js → diag-doctor-7LYUYU35.js} +1 -2
- package/dist/execute-deps.d.ts +5 -1
- package/dist/{execution-7ZFY4FJY.js → execution-MIBWBYB6.js} +52 -35
- package/dist/{export-ROG3DKTZ.js → export-VVRIOWFV.js} +1 -2
- package/dist/{governance-JSGHHA2R.js → governance-RYSHV675.js} +1 -2
- package/dist/{hq-4QQJO2GN.js → hq-IG3YRGCO.js} +2 -3
- package/dist/hq-command-controller.d.ts +37 -7
- package/dist/hq-server/ws.d.ts +1 -1
- package/dist/{hq-server-CVAYICIS.js → hq-server-OILU3NPI.js} +2 -3
- package/dist/{hq-ttl-KUO3AU7X.js → hq-ttl-VJR65OBJ.js} +1 -2
- package/dist/{hq-tunnel-LO55RCZE.js → hq-tunnel-NIJ5EP2Y.js} +1 -2
- package/dist/index.js +5 -6
- package/dist/{init-4JQSG66Q.js → init-DRMMFG2G.js} +1 -2
- package/dist/{kanban-run-mirror-EKVNGXWW.js → kanban-run-mirror-22HQ5FNG.js} +1 -2
- package/dist/live-settings-input.d.ts +2 -0
- package/dist/{mailbox-serve-VKQIRCCB.js → mailbox-serve-VUCWZ2SJ.js} +2 -3
- package/dist/{mcp-AQKSASHD.js → mcp-HOMLC4WE.js} +1 -2
- package/dist/{modeldiag-ZL4ROTQ5.js → modeldiag-FMJT37SN.js} +2 -3
- package/dist/{per-subcommand-help-6VCIKDUW.js → per-subcommand-help-BWBHYVJO.js} +2 -3
- package/dist/{permissions-2PWBL4YU.js → permissions-CFDLXETM.js} +1 -2
- package/dist/{plugin-usage-7WCZW4NP.js → plugin-usage-HFBI3TFT.js} +2 -3
- package/dist/{plugins-7N3TF2QF.js → plugins-PZ2VZL7V.js} +4 -5
- package/dist/{project-BLQ3ALVL.js → project-AOQI5XTK.js} +1 -2
- package/dist/{project-manifest-RV5FXGQI.js → project-manifest-7NSFVBM3.js} +1 -2
- package/dist/{project-picker-CCQR3W4I.js → project-picker-SVBXMPKX.js} +1 -2
- package/dist/{projects-5J727S4L.js → projects-L6C6XLDY.js} +1 -2
- package/dist/provider-config-utils.d.ts +1 -1
- package/dist/{providers-models-OKKQZIWU.js → providers-models-YVMVYWRS.js} +3 -4
- package/dist/{proxy-wiring-QCI7EWQC.js → proxy-wiring-MGRSKZZB.js} +1 -2
- package/dist/{quick-XLYLZX4B.js → quick-CNB4Z3HS.js} +1 -2
- package/dist/{replay-RZXZKP2U.js → replay-JJ2NOWD6.js} +1 -2
- package/dist/{replay-FJ2JBXUA.js → replay-Z3FTJEMM.js} +1 -2
- package/dist/{rewind-2FFNOOKS.js → rewind-JA3ZLCNM.js} +1 -2
- package/dist/{sdd-runtime-R6FAK2G2.js → sdd-runtime-PTOSPYI4.js} +1 -2
- package/dist/services/statusline-config.d.ts +43 -13
- package/dist/{sessions-config-KAMEBVOX.js → sessions-config-UL45XKX7.js} +2 -3
- package/dist/{sessions-doctor-EXHAZSSE.js → sessions-doctor-QUL37U32.js} +1 -2
- package/dist/settings-behavior-sections.d.ts +20 -0
- package/dist/short-circuit-flags-UREFSYBL.js +10 -0
- package/dist/{simpleui-dist-JKNRCRRK.js → simpleui-dist-CXSIDAXZ.js} +1 -2
- package/dist/slash-commands/command-context.d.ts +10 -0
- package/dist/slash-commands/statusline.d.ts +1 -1
- package/dist/subcommands/handlers/bench-run-config.d.ts +18 -0
- package/dist/subcommands/handlers/bench.d.ts +8 -7
- package/dist/subcommands/handlers/config-transfer.d.ts +6 -0
- package/dist/subcommands-WJLBHVKC.js +9 -0
- package/dist/{tools-skills-Q4P27URS.js → tools-skills-GH24UCBY.js} +1 -2
- package/dist/{update-K45CS6SS.js → update-5DPB4YD4.js} +1 -2
- package/dist/{update-check-PKSMSMD6.js → update-check-BS3DHTSI.js} +1 -2
- package/dist/version-help-MYKF724O.js +10 -0
- package/dist/webui-server/client-registration.d.ts +9 -1
- package/dist/{webui-server-F7MSRHOF.js → webui-server-5R35BHWZ.js} +54 -15
- package/dist/wiring/brain-and-orchestration.d.ts +2 -0
- package/dist/wiring/cli-execute-builder.d.ts +4 -0
- package/dist/wiring/cli-slash-commands-setup.d.ts +1 -0
- package/dist/wiring/command-host-state.d.ts +50 -5
- package/dist/wiring/external-plugins.d.ts +9 -0
- package/dist/wiring/provider-runtime-setup.d.ts +2 -0
- package/dist/wiring/runtime-controller-deps.d.ts +3 -0
- package/dist/wiring/vector-memory-setup.d.ts +12 -0
- package/dist/wiring/wrongtrace-prompt-contributor.d.ts +5 -2
- package/dist/{wrongtrace-gate-counters-GSVY372D.js → wrongtrace-gate-counters-7C2EAAZL.js} +1 -2
- package/dist/{wrongtrace-telemetry-KBBM5NLQ.js → wrongtrace-telemetry-3ASFKOZO.js} +1 -2
- package/package.json +28 -28
- package/dist/chunk-7OCVIDC7.js +0 -11
- package/dist/chunk-KYDJJLJI.js +0 -52
- package/dist/launch-hints.d.ts +0 -49
- package/dist/short-circuit-flags-7YUCERBB.js +0 -11
- package/dist/subcommands-KE6MEQQP.js +0 -10
- package/dist/version-help-WMPSEL4U.js +0 -11
- package/dist/webui-server/privileged-actions.d.ts +0 -14
- package/dist/wiring/cli-heap-watchdog.d.ts +0 -34
package/data/providers.json
CHANGED
|
@@ -4,6 +4,28 @@
|
|
|
4
4
|
"name": "OpenAI Codex (ChatGPT sign-in)",
|
|
5
5
|
"doc": "https://developers.openai.com/codex/models",
|
|
6
6
|
"models": {
|
|
7
|
+
"gpt-6-astra": {
|
|
8
|
+
"id": "gpt-6-astra",
|
|
9
|
+
"name": "GPT-6 Astra",
|
|
10
|
+
"description": "Most capable model for complex work across code, apps, and research.",
|
|
11
|
+
"reasoning": true,
|
|
12
|
+
"reasoningConfig": {
|
|
13
|
+
"default": "enabled",
|
|
14
|
+
"disableSupported": false,
|
|
15
|
+
"effortSupported": true,
|
|
16
|
+
"effortLevels": ["low", "medium", "high", "xhigh", "max"],
|
|
17
|
+
"preserveThinking": "unsupported"
|
|
18
|
+
},
|
|
19
|
+
"tool_call": true,
|
|
20
|
+
"modalities": {
|
|
21
|
+
"input": ["text", "image"],
|
|
22
|
+
"output": ["text"]
|
|
23
|
+
},
|
|
24
|
+
"limit": {
|
|
25
|
+
"context": 1050000,
|
|
26
|
+
"output": 128000
|
|
27
|
+
}
|
|
28
|
+
},
|
|
7
29
|
"gpt-5.6-sol": {
|
|
8
30
|
"id": "gpt-5.6-sol",
|
|
9
31
|
"name": "GPT-5.6 Sol",
|
|
@@ -85,21 +107,6 @@
|
|
|
85
107
|
"output": 128000
|
|
86
108
|
}
|
|
87
109
|
},
|
|
88
|
-
"gpt-5.4": {
|
|
89
|
-
"id": "gpt-5.4",
|
|
90
|
-
"name": "GPT-5.4",
|
|
91
|
-
"description": "Strong model for everyday coding.",
|
|
92
|
-
"reasoning": true,
|
|
93
|
-
"tool_call": true,
|
|
94
|
-
"modalities": {
|
|
95
|
-
"input": ["text", "image"],
|
|
96
|
-
"output": ["text"]
|
|
97
|
-
},
|
|
98
|
-
"limit": {
|
|
99
|
-
"context": 1050000,
|
|
100
|
-
"output": 128000
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
110
|
"gpt-5.4-mini": {
|
|
104
111
|
"id": "gpt-5.4-mini",
|
|
105
112
|
"name": "GPT-5.4 Mini",
|
|
@@ -3,10 +3,12 @@ import {
|
|
|
3
3
|
loadCachedAcpRegistry,
|
|
4
4
|
refreshAcpRegistry,
|
|
5
5
|
setupProvider
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
} from "./chunk-ZSZ3EYWH.js";
|
|
7
|
+
import {
|
|
8
|
+
startCliHqConnection
|
|
9
|
+
} from "./chunk-TE3Q32JP.js";
|
|
10
|
+
import "./chunk-TNK6237M.js";
|
|
11
|
+
import "./chunk-DR2OXU46.js";
|
|
10
12
|
|
|
11
13
|
// src/subcommands/handlers/acp.ts
|
|
12
14
|
import { randomBytes } from "node:crypto";
|
|
@@ -30,6 +32,90 @@ import {
|
|
|
30
32
|
} from "@wrongstack/acp/agent";
|
|
31
33
|
import { WebSocketServer } from "ws";
|
|
32
34
|
|
|
35
|
+
// src/acp-hq-telemetry.ts
|
|
36
|
+
import { AgentStatusTracker } from "@wrongstack/core/coordination";
|
|
37
|
+
import { startSessionTelemetryBridge } from "@wrongstack/core/hq";
|
|
38
|
+
var NO_REGISTRY = { updateAgents: async () => void 0 };
|
|
39
|
+
function startAcpHqTelemetry(options) {
|
|
40
|
+
const connection = startCliHqConnection({
|
|
41
|
+
clientKind: "acp",
|
|
42
|
+
projectRoot: options.projectRoot,
|
|
43
|
+
...options.projectName !== void 0 ? { projectName: options.projectName } : {},
|
|
44
|
+
...options.appConfig !== void 0 ? { appConfig: options.appConfig } : {},
|
|
45
|
+
capabilities: ["telemetry.publish", "mailbox.summary", "fleet.summary", "session.summary"]
|
|
46
|
+
});
|
|
47
|
+
const entries = /* @__PURE__ */ new Map();
|
|
48
|
+
let stopped = false;
|
|
49
|
+
const attach = (sessionId, agent, cwd) => {
|
|
50
|
+
if (stopped || entries.has(sessionId)) return;
|
|
51
|
+
const publisher = connection.getPublisher();
|
|
52
|
+
if (publisher === void 0) return;
|
|
53
|
+
const events = agent.events;
|
|
54
|
+
if (events === void 0) return;
|
|
55
|
+
const tracker = new AgentStatusTracker({ events, registry: NO_REGISTRY, sessionId });
|
|
56
|
+
tracker.start();
|
|
57
|
+
let stopBridge;
|
|
58
|
+
try {
|
|
59
|
+
stopBridge = startSessionTelemetryBridge({
|
|
60
|
+
publisher,
|
|
61
|
+
events,
|
|
62
|
+
sessionId,
|
|
63
|
+
// An ACP session works in the directory the client opened, which is
|
|
64
|
+
// not necessarily where the server booted.
|
|
65
|
+
projectRoot: cwd,
|
|
66
|
+
projectName: options.projectName ?? options.projectRoot,
|
|
67
|
+
initialAgents: tracker.getAgents(),
|
|
68
|
+
startedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
69
|
+
});
|
|
70
|
+
} catch {
|
|
71
|
+
tracker.stop();
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
entries.set(sessionId, { tracker, stopBridge });
|
|
75
|
+
};
|
|
76
|
+
const detach = (sessionId) => {
|
|
77
|
+
const entry = entries.get(sessionId);
|
|
78
|
+
if (entry === void 0) return;
|
|
79
|
+
entries.delete(sessionId);
|
|
80
|
+
try {
|
|
81
|
+
entry.stopBridge();
|
|
82
|
+
} catch {
|
|
83
|
+
}
|
|
84
|
+
try {
|
|
85
|
+
entry.tracker.stop();
|
|
86
|
+
} catch {
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
return {
|
|
90
|
+
wrapAgentFactory(agentFor) {
|
|
91
|
+
const wrapped = async (sessionId, cwd, api) => {
|
|
92
|
+
const agent = await agentFor(sessionId, cwd, api);
|
|
93
|
+
try {
|
|
94
|
+
attach(sessionId, agent, cwd);
|
|
95
|
+
} catch {
|
|
96
|
+
}
|
|
97
|
+
return agent;
|
|
98
|
+
};
|
|
99
|
+
return wrapped;
|
|
100
|
+
},
|
|
101
|
+
wrapDispose(dispose) {
|
|
102
|
+
return (sessionId) => {
|
|
103
|
+
try {
|
|
104
|
+
detach(sessionId);
|
|
105
|
+
} catch {
|
|
106
|
+
}
|
|
107
|
+
dispose(sessionId);
|
|
108
|
+
};
|
|
109
|
+
},
|
|
110
|
+
active: () => [...entries.keys()],
|
|
111
|
+
stop: () => {
|
|
112
|
+
stopped = true;
|
|
113
|
+
for (const sessionId of [...entries.keys()]) detach(sessionId);
|
|
114
|
+
connection.stop();
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
33
119
|
// src/acp-server-agent.ts
|
|
34
120
|
import { Agent, Context, createDefaultPipelines } from "@wrongstack/core/agent";
|
|
35
121
|
import { ToolExecutor } from "@wrongstack/core/execution";
|
|
@@ -435,6 +521,7 @@ async function runACPWebSocketServer(deps, port) {
|
|
|
435
521
|
let turnFactory;
|
|
436
522
|
let echoTurn;
|
|
437
523
|
let store;
|
|
524
|
+
let hqTelemetry;
|
|
438
525
|
if (echo) {
|
|
439
526
|
echoTurn = async () => ({ stopReason: "end_turn" });
|
|
440
527
|
} else {
|
|
@@ -449,7 +536,13 @@ async function runACPWebSocketServer(deps, port) {
|
|
|
449
536
|
}
|
|
450
537
|
throw err;
|
|
451
538
|
}
|
|
452
|
-
|
|
539
|
+
hqTelemetry = startAcpHqTelemetry({
|
|
540
|
+
projectRoot: deps.cwd ?? process.cwd(),
|
|
541
|
+
projectName: path.basename(deps.cwd ?? process.cwd()),
|
|
542
|
+
appConfig: deps.config
|
|
543
|
+
});
|
|
544
|
+
const tracked = hqTelemetry.wrapAgentFactory(agentFor);
|
|
545
|
+
turnFactory = () => makeACPServerAgentTurn({ agentFor: tracked });
|
|
453
546
|
store = deps.paths?.projectDir ? new ACPSessionStore({ dir: path.join(deps.paths.projectDir, "acp-sessions") }) : void 0;
|
|
454
547
|
}
|
|
455
548
|
const acpToken = process.env["WRONGSTACK_ACP_TOKEN"]?.trim() || randomBytes(32).toString("hex");
|
|
@@ -482,7 +575,7 @@ async function runACPWebSocketServer(deps, port) {
|
|
|
482
575
|
...connectionTurn ? {
|
|
483
576
|
replayFor: connectionTurn.replay,
|
|
484
577
|
seedFor: connectionTurn.seed,
|
|
485
|
-
disposeFor: connectionTurn.dispose
|
|
578
|
+
disposeFor: hqTelemetry?.wrapDispose(connectionTurn.dispose) ?? connectionTurn.dispose
|
|
486
579
|
} : {},
|
|
487
580
|
...store ? { store } : {}
|
|
488
581
|
});
|
|
@@ -524,6 +617,7 @@ async function runACPWebSocketServer(deps, port) {
|
|
|
524
617
|
}
|
|
525
618
|
}
|
|
526
619
|
wss.close();
|
|
620
|
+
hqTelemetry?.stop();
|
|
527
621
|
resolve();
|
|
528
622
|
};
|
|
529
623
|
process.on("SIGINT", shutdown);
|
|
@@ -537,6 +631,7 @@ async function runACPServer(deps) {
|
|
|
537
631
|
return runACPWebSocketServer(deps, wsPort);
|
|
538
632
|
}
|
|
539
633
|
const echo = deps.flags?.echo === true || deps.flags?.echo === "true";
|
|
634
|
+
let stdioHqTelemetry;
|
|
540
635
|
const server = new WrongStackACPServer(
|
|
541
636
|
echo ? {} : (() => {
|
|
542
637
|
let agentFor;
|
|
@@ -550,13 +645,20 @@ async function runACPServer(deps) {
|
|
|
550
645
|
}
|
|
551
646
|
throw err;
|
|
552
647
|
}
|
|
553
|
-
|
|
648
|
+
stdioHqTelemetry = startAcpHqTelemetry({
|
|
649
|
+
projectRoot: deps.cwd ?? process.cwd(),
|
|
650
|
+
projectName: path.basename(deps.cwd ?? process.cwd()),
|
|
651
|
+
appConfig: deps.config
|
|
652
|
+
});
|
|
653
|
+
const turn = makeACPServerAgentTurn({
|
|
654
|
+
agentFor: stdioHqTelemetry.wrapAgentFactory(agentFor)
|
|
655
|
+
});
|
|
554
656
|
const store = deps.paths?.projectDir ? new ACPSessionStore({ dir: path.join(deps.paths.projectDir, "acp-sessions") }) : void 0;
|
|
555
657
|
return {
|
|
556
658
|
runTurn: turn,
|
|
557
659
|
replayFor: turn.replay,
|
|
558
660
|
seedFor: turn.seed,
|
|
559
|
-
disposeFor: turn.dispose,
|
|
661
|
+
disposeFor: stdioHqTelemetry.wrapDispose(turn.dispose),
|
|
560
662
|
...store ? { store } : {}
|
|
561
663
|
};
|
|
562
664
|
})()
|
|
@@ -577,13 +679,14 @@ async function runACPServer(deps) {
|
|
|
577
679
|
createGracefulShutdown({
|
|
578
680
|
run: async () => {
|
|
579
681
|
try {
|
|
580
|
-
server.stop();
|
|
682
|
+
await server.stop();
|
|
581
683
|
} catch (err) {
|
|
582
684
|
deps.renderer.writeError(
|
|
583
685
|
`ACP stop failed: ${err instanceof Error ? err.message : String(err)}
|
|
584
686
|
`
|
|
585
687
|
);
|
|
586
688
|
}
|
|
689
|
+
stdioHqTelemetry?.stop();
|
|
587
690
|
}
|
|
588
691
|
}).install();
|
|
589
692
|
try {
|
|
@@ -913,4 +1016,4 @@ ${renderAcpBenchText(result)}
|
|
|
913
1016
|
export {
|
|
914
1017
|
acpCmd
|
|
915
1018
|
};
|
|
916
|
-
//# sourceMappingURL=acp-
|
|
1019
|
+
//# sourceMappingURL=acp-3LARESEO.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ACP sessions on the HQ fleet map.
|
|
3
|
+
*
|
|
4
|
+
* An editor driving WrongStack over ACP (Zed, JetBrains, …) runs real turns:
|
|
5
|
+
* real provider calls, real tools, real cost. HQ never saw any of it. The only
|
|
6
|
+
* trace an ACP process left was the mailbox-only publisher every agent process
|
|
7
|
+
* opens, which shows up as a client with no session and no agents — so an
|
|
8
|
+
* operator watching the fleet had no way to tell an ACP server was working at
|
|
9
|
+
* all, let alone what it was doing.
|
|
10
|
+
*
|
|
11
|
+
* The wiring is unusually cheap here because ACP already gives every session
|
|
12
|
+
* its own `EventBus` (`buildAcpServerAgentFactory`): a tracker attached to that
|
|
13
|
+
* bus needs no session filtering, unlike the WebUI's shared-bus host.
|
|
14
|
+
*
|
|
15
|
+
* What this does NOT give you is a chat transcript. ACP sessions run on a
|
|
16
|
+
* no-op session writer — they do not persist a JSONL journal — so HQ's Console
|
|
17
|
+
* has nothing to replay for them. The agent card is live (status, current
|
|
18
|
+
* tool, iterations, tokens, cost, streaming tail); the conversation is not.
|
|
19
|
+
* Giving ACP a real journal is a separate change: it would also put ACP
|
|
20
|
+
* sessions into `/resume`, recovery and history.
|
|
21
|
+
*
|
|
22
|
+
* @module acp-hq-telemetry
|
|
23
|
+
*/
|
|
24
|
+
import type { Agent } from '@wrongstack/core/agent';
|
|
25
|
+
import type { Config } from '@wrongstack/core/types';
|
|
26
|
+
/** The per-session Agent factory shape `makeACPServerAgentTurn` consumes. */
|
|
27
|
+
type AcpAgentFactory = (sessionId: string, cwd: string, api?: never) => Promise<Agent>;
|
|
28
|
+
export interface AcpHqTelemetryOptions {
|
|
29
|
+
projectRoot: string;
|
|
30
|
+
projectName?: string | undefined;
|
|
31
|
+
appConfig?: Config | undefined;
|
|
32
|
+
}
|
|
33
|
+
export interface AcpHqTelemetry {
|
|
34
|
+
/** Wrap the agent factory so each new ACP session reports to HQ. */
|
|
35
|
+
wrapAgentFactory<T extends AcpAgentFactory>(agentFor: T): T;
|
|
36
|
+
/** Wrap `dispose` so a closed ACP session stops reporting. */
|
|
37
|
+
wrapDispose(dispose: (sessionId: string) => void): (sessionId: string) => void;
|
|
38
|
+
/** Session ids currently reporting. Exposed for tests and diagnostics. */
|
|
39
|
+
active(): string[];
|
|
40
|
+
stop(): void;
|
|
41
|
+
}
|
|
42
|
+
export declare function startAcpHqTelemetry(options: AcpHqTelemetryOptions): AcpHqTelemetry;
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=acp-hq-telemetry.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
restoreFlags
|
|
3
3
|
} from "./chunk-CSAPOCBP.js";
|
|
4
|
-
import "./chunk-7OCVIDC7.js";
|
|
5
4
|
|
|
6
5
|
// src/subcommands/handlers/audit.ts
|
|
7
6
|
import { ToolAuditLog } from "@wrongstack/core/storage";
|
|
@@ -103,4 +102,4 @@ async function listAudits(log, dir, deps) {
|
|
|
103
102
|
export {
|
|
104
103
|
auditCmd
|
|
105
104
|
};
|
|
106
|
-
//# sourceMappingURL=audit-
|
|
105
|
+
//# sourceMappingURL=audit-46YK5DSC.js.map
|
|
@@ -13,23 +13,23 @@ import {
|
|
|
13
13
|
runOAuthLoginKind,
|
|
14
14
|
runOAuthLoginMenu,
|
|
15
15
|
validateFamily
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-MNQQ4ZNF.js";
|
|
17
17
|
import {
|
|
18
18
|
renderAuthLocalHelpToString,
|
|
19
19
|
wantsLocalHelp
|
|
20
20
|
} from "./chunk-2VMJ3E5Z.js";
|
|
21
21
|
import "./chunk-B4JLSXZB.js";
|
|
22
|
-
import "./chunk-VUVOMXWP.js";
|
|
23
22
|
import {
|
|
24
23
|
restoreFlags
|
|
25
24
|
} from "./chunk-CSAPOCBP.js";
|
|
25
|
+
import "./chunk-VUVOMXWP.js";
|
|
26
26
|
import {
|
|
27
27
|
activeProfileConfigPath
|
|
28
28
|
} from "./chunk-YMXXOOFN.js";
|
|
29
29
|
import {
|
|
30
30
|
parseAuthFlags
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-E6RFXHWD.js";
|
|
32
|
+
import "./chunk-TNK6237M.js";
|
|
33
33
|
import {
|
|
34
34
|
loadConfigProviders,
|
|
35
35
|
maskedKey,
|
|
@@ -37,8 +37,7 @@ import {
|
|
|
37
37
|
normalizeKeys,
|
|
38
38
|
nowIso,
|
|
39
39
|
writeKeysBack
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import "./chunk-7OCVIDC7.js";
|
|
40
|
+
} from "./chunk-DR2OXU46.js";
|
|
42
41
|
|
|
43
42
|
// src/subcommands/handlers/auth.ts
|
|
44
43
|
import { color as color3 } from "@wrongstack/core/utils";
|
|
@@ -596,4 +595,4 @@ async function runAuthRemove(deps, providerId) {
|
|
|
596
595
|
export {
|
|
597
596
|
authCmd
|
|
598
597
|
};
|
|
599
|
-
//# sourceMappingURL=auth-
|
|
598
|
+
//# sourceMappingURL=auth-ZUMCDNE5.js.map
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { ProviderConfig, ResolvedProvider } from '@wrongstack/core/types';
|
|
2
2
|
import type { AuthMenuDeps } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Providers WrongStack defines itself but models.dev does not list under that
|
|
5
|
+
* id — the AI Gateway, which models.dev files as `vercel`. Without this they
|
|
6
|
+
* are unreachable from the catalog picker and the user has to hand-roll a
|
|
7
|
+
* custom entry to use them.
|
|
8
|
+
*/
|
|
9
|
+
export declare function ownDefinitionsAsCatalog(known: Set<string>): ResolvedProvider[];
|
|
3
10
|
export declare function addFromCatalog(deps: AuthMenuDeps): Promise<boolean>;
|
|
4
11
|
/**
|
|
5
12
|
* Prompt for family/baseUrl/alias overrides, then add a key.
|
|
@@ -1,23 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TUI auth-panel host — the structured, UI-agnostic surface behind the
|
|
3
|
-
* interactive `/auth` panel in the Ink TUI.
|
|
4
|
-
*
|
|
5
|
-
* Two kinds of operations:
|
|
6
|
-
*
|
|
7
|
-
* - **Direct mutations** (set active key, delete key, remove provider):
|
|
8
|
-
* plain async methods that mutate the config atomically and return an
|
|
9
|
-
* error string or `null`.
|
|
10
|
-
*
|
|
11
|
-
* - **Flows** (add key, add from catalog, add custom, add local, OAuth
|
|
12
|
-
* sign-in, field edits): the existing battle-tested readline flows from
|
|
13
|
-
* this package, driven through an {@link AuthFlowIo} bridge. The bridge
|
|
14
|
-
* adapts `renderer.write*` → panel log lines (ANSI-stripped) and
|
|
15
|
-
* `reader.readLine/readSecret` → the panel's modal prompt. A rejected
|
|
16
|
-
* prompt (TUI Esc) aborts the flow before anything is saved.
|
|
17
|
-
*
|
|
18
|
-
* Secrets never cross into the TUI: key values are masked here, and the
|
|
19
|
-
* modal prompt sends the plaintext only INTO the flow (never back out).
|
|
20
|
-
*/
|
|
21
1
|
import type { ModelsRegistry, SecretScrubber, SecretVault } from '@wrongstack/core/types';
|
|
22
2
|
import type { AuthPanelHost } from '@wrongstack/tui';
|
|
23
3
|
export interface AuthPanelServiceDeps {
|
|
@@ -26,6 +6,8 @@ export interface AuthPanelServiceDeps {
|
|
|
26
6
|
/** The sole config file read or written by auth operations. */
|
|
27
7
|
profileConfigPath: string;
|
|
28
8
|
secretScrubber?: SecretScrubber | undefined;
|
|
9
|
+
/** Re-read the live provider snapshot after a successful auth mutation. */
|
|
10
|
+
onProvidersChanged?: (() => Promise<void>) | undefined;
|
|
29
11
|
}
|
|
30
12
|
/** Plain (color-free) key mask: first 4 + last 4 characters. */
|
|
31
13
|
export declare function plainMaskedKey(key: string): string;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
discoverAndMergeProviders
|
|
3
3
|
} from "./chunk-52C7PD2H.js";
|
|
4
|
-
import "./chunk-7OCVIDC7.js";
|
|
5
4
|
export {
|
|
6
5
|
discoverAndMergeProviders
|
|
7
6
|
};
|
|
8
|
-
//# sourceMappingURL=auto-discover-providers-
|
|
7
|
+
//# sourceMappingURL=auto-discover-providers-VQU3IZMR.js.map
|