@wrongstack/cli 1.0.28 → 1.0.32

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.
Files changed (135) hide show
  1. package/data/providers.json +8 -177
  2. package/dist/{acp-M4565YUW.js → acp-EDGUWU7N.js} +4 -7
  3. package/dist/{audit-46YK5DSC.js → audit-KCBTHUQI.js} +1 -1
  4. package/dist/{auth-TE55JF4Z.js → auth-SUHKFFO4.js} +136 -59
  5. package/dist/auth-menu/github-copilot-oauth.d.ts +1 -35
  6. package/dist/auth-menu/index-input.d.ts +3 -0
  7. package/dist/auth-menu/panel-flow-bridge.d.ts +29 -0
  8. package/dist/auth-menu/panel-service.d.ts +3 -34
  9. package/dist/auth-menu/provider-auth-login.d.ts +1 -1
  10. package/dist/auto-discover-providers-QIL34K3U.js +7 -0
  11. package/dist/automation-MCDFCIMV.js +369 -0
  12. package/dist/{bench-GTLPM22B.js → bench-MMZHFHDL.js} +152 -43
  13. package/dist/boot/brain-decision-log.d.ts +1 -1
  14. package/dist/boot/system-prompt-builder.d.ts +1 -1
  15. package/dist/boot/system-prompt-menu.d.ts +11 -2
  16. package/dist/boot/tui-coordinator-setup.d.ts +2 -0
  17. package/dist/boot/tui-startup-output.d.ts +11 -0
  18. package/dist/{boot-auto-thin-6Q56FY3F.js → boot-auto-thin-K2DHHYIW.js} +3 -3
  19. package/dist/{chronicle-UTFETHP6.js → chronicle-PBJS7BN6.js} +5 -3
  20. package/dist/{chunk-EPR42SWM.js → chunk-2EZ2DHOW.js} +60 -7
  21. package/dist/{chunk-7IQWQCBH.js → chunk-3LEFXLAW.js} +39 -39
  22. package/dist/{chunk-WSTVGC2C.js → chunk-4BX2YDTQ.js} +13 -6
  23. package/dist/{chunk-SFBFYIOW.js → chunk-4MDRHMX4.js} +3 -2
  24. package/dist/{chunk-RGFWGUAB.js → chunk-4UWCMBPG.js} +159 -3
  25. package/dist/{chunk-RDGGWMTI.js → chunk-65VNCAF6.js} +2 -22
  26. package/dist/{chunk-WQZW3RDP.js → chunk-7BNBD4PE.js} +2 -2
  27. package/dist/chunk-CFHWIFXL.js +123 -0
  28. package/dist/{chunk-RZ4ZDRYA.js → chunk-DIOODAYM.js} +2 -2
  29. package/dist/{chunk-L2RVEQWO.js → chunk-HHRYIDOW.js} +2 -2
  30. package/dist/chunk-LIZXJHZQ.js +61 -0
  31. package/dist/{chunk-YHYINL47.js → chunk-LKFKO4JW.js} +2 -2
  32. package/dist/{chunk-Q4INH2DG.js → chunk-MPQCHBDJ.js} +2 -1
  33. package/dist/{chunk-2ERX3RPN.js → chunk-P3GRLV47.js} +30 -17
  34. package/dist/{chunk-ZMX5HRLI.js → chunk-P3Q3KMFH.js} +6 -4
  35. package/dist/{chunk-KOEO4CJG.js → chunk-PGNERAZL.js} +4 -4
  36. package/dist/{chunk-ENRYW73H.js → chunk-RQ4UBKYH.js} +81 -10
  37. package/dist/{chunk-X756ZS72.js → chunk-SUDNPYWD.js} +2 -2
  38. package/dist/{chunk-LDCGZJTC.js → chunk-TWSQTQKR.js} +12 -4
  39. package/dist/chunk-TXAFIERF.js +37 -0
  40. package/dist/{chunk-UZ2TMHNH.js → chunk-UKP7H2U4.js} +10 -2
  41. package/dist/{chunk-5JYDKG5B.js → chunk-WHEYHDIE.js} +7 -2
  42. package/dist/{chunk-LBPLTTZ6.js → chunk-WTJDSTYD.js} +4 -4
  43. package/dist/{chunk-L5TD7UIG.js → chunk-WXJH4F6K.js} +7 -7
  44. package/dist/{chunk-IS2PPBQV.js → chunk-X4LW5CZM.js} +8 -4
  45. package/dist/{chunk-BBHWW6LR.js → chunk-YL4KCHZG.js} +18 -6
  46. package/dist/{chunk-LUMETJFO.js → chunk-ZYACRPLN.js} +2 -2
  47. package/dist/{cli-context-O2SHBDFH.js → cli-context-ITHGP2CE.js} +91 -84
  48. package/dist/cli-context.d.ts +3 -1
  49. package/dist/cli-infrastructure.d.ts +33 -0
  50. package/dist/{cli-main-BKG4ZVLN.js → cli-main-TQGLKB6D.js} +3783 -2753
  51. package/dist/config-doctor.d.ts +1 -1
  52. package/dist/{config-transfer-RUWLDCNK.js → config-transfer-UE37X4B5.js} +2 -2
  53. package/dist/{execution-THXWTHYT.js → execution-C2IECWF7.js} +5271 -5118
  54. package/dist/execution-chimera-handlers.d.ts +6 -0
  55. package/dist/execution-session-callbacks.d.ts +36 -0
  56. package/dist/execution-webui.d.ts +3 -0
  57. package/dist/execution.d.ts +1 -1
  58. package/dist/fleet/host-acp-runner.d.ts +15 -0
  59. package/dist/fleet/host-budget.d.ts +13 -0
  60. package/dist/fleet/host-context.d.ts +5 -0
  61. package/dist/fleet/host-explore-companion.d.ts +7 -16
  62. package/dist/fleet/host.d.ts +2 -0
  63. package/dist/fleet/status-broadcast.d.ts +1 -1
  64. package/dist/{hq-44F4OQH2.js → hq-KBFDKTDD.js} +13 -7
  65. package/dist/hq-publisher.d.ts +4 -1
  66. package/dist/hq-server/sage-sync-send.d.ts +5 -0
  67. package/dist/hq-server/server-lifecycle.d.ts +1 -1
  68. package/dist/hq-server/snapshot.d.ts +1 -1
  69. package/dist/{hq-server-UIB24LU6.js → hq-server-AVNKZ2PV.js} +2 -2
  70. package/dist/{hq-service-BMMJAHRT.js → hq-service-FGB7BY2D.js} +3 -3
  71. package/dist/hq-ttl-N4DAIAVX.js +7 -0
  72. package/dist/index.js +126 -10
  73. package/dist/{mailbox-serve-GNGXEQ2R.js → mailbox-serve-S536N66F.js} +4 -3
  74. package/dist/{modeldiag-W7XAE625.js → modeldiag-PQILD7TN.js} +26 -8
  75. package/dist/{per-subcommand-help-QDAQASPZ.js → per-subcommand-help-VKPV3OEY.js} +2 -2
  76. package/dist/{plugin-usage-CIGOOTX3.js → plugin-usage-3TZGROK7.js} +3 -3
  77. package/dist/{plugins-HQTXUD6A.js → plugins-ITH4SLO6.js} +4 -4
  78. package/dist/pre-launch/project-check.d.ts +2 -8
  79. package/dist/pre-launch.d.ts +1 -1
  80. package/dist/{project-manifest-7NSFVBM3.js → project-manifest-FTFDCCTZ.js} +2 -2
  81. package/dist/{project-picker-SVBXMPKX.js → project-picker-NZYJKQQC.js} +3 -3
  82. package/dist/provider-cloud-config.d.ts +4 -0
  83. package/dist/provider-config-utils.d.ts +1 -1
  84. package/dist/{providers-models-5Z2PJTEW.js → providers-models-W57I3QOA.js} +3 -3
  85. package/dist/{remote-GB5VXCCT.js → remote-C74BCNND.js} +5 -5
  86. package/dist/{rewind-JA3ZLCNM.js → rewind-7AULJS7F.js} +7 -5
  87. package/dist/sage-FFKUOCQL.js +475 -0
  88. package/dist/sage-connect.d.ts +62 -0
  89. package/dist/sage-hq-sync.d.ts +8 -0
  90. package/dist/sage-sync-ZMTHB477.js +69 -0
  91. package/dist/sandbox-TYGD6FI2.js +131 -0
  92. package/dist/services/sdd/project-context.d.ts +1 -1
  93. package/dist/{sessions-config-XHLXJ5C3.js → sessions-config-VE26SB56.js} +19 -8
  94. package/dist/short-circuit-flags-6LB3EGF7.js +10 -0
  95. package/dist/slash-commands/openai-quota.d.ts +12 -6
  96. package/dist/slash-commands/sandbox.d.ts +5 -0
  97. package/dist/slash-commands/scout-stats.d.ts +46 -0
  98. package/dist/slash-commands/sdd-inspect-commands.d.ts +9 -0
  99. package/dist/slash-commands/sdd-session-commands.d.ts +19 -0
  100. package/dist/slash-commands/sdd.d.ts +1 -1
  101. package/dist/slash-commands/zai-plan.d.ts +26 -0
  102. package/dist/{standalone-auto-update-TOTRGCSA.js → standalone-auto-update-VQC4GYCM.js} +3 -3
  103. package/dist/{standalone-update-LZO3MNLH.js → standalone-update-HZHDZZOR.js} +2 -2
  104. package/dist/subcommands/handlers/automation-credentials.d.ts +8 -0
  105. package/dist/subcommands/handlers/automation.d.ts +3 -0
  106. package/dist/subcommands/handlers/bench-experiments.d.ts +5 -0
  107. package/dist/subcommands/handlers/helpers.d.ts +1 -1
  108. package/dist/subcommands/handlers/sage-sync.d.ts +4 -0
  109. package/dist/subcommands/handlers/sage.d.ts +5 -0
  110. package/dist/subcommands/handlers/sandbox.d.ts +5 -0
  111. package/dist/{subcommands-SRRB3RAS.js → subcommands-QO7VYTSS.js} +2 -2
  112. package/dist/{tools-skills-GH24UCBY.js → tools-skills-33AI6K6S.js} +2 -2
  113. package/dist/tui-provider-quota-menu.d.ts +5 -0
  114. package/dist/{typesafe-WA5O3KVS.js → typesafe-NHC322W5.js} +27 -8
  115. package/dist/{typesafe-topic-replay-ZILIU3WS.js → typesafe-topic-replay-DB2AYL7V.js} +2 -2
  116. package/dist/{typesafe-triage-replay-FGAW7QM7.js → typesafe-triage-replay-27NDAZ3V.js} +2 -2
  117. package/dist/{update-TDZX4IL2.js → update-J5WHAFPE.js} +3 -3
  118. package/dist/{update-check-J5ZVKS73.js → update-check-VLVT4IV2.js} +2 -2
  119. package/dist/{version-help-XJJQ7YSH.js → version-help-ATOKGMTK.js} +2 -2
  120. package/dist/webui-server/prefs-seeding.d.ts +1 -0
  121. package/dist/webui-server/route-contexts.d.ts +1 -0
  122. package/dist/{webui-server-GCXIO3JY.js → webui-server-GQOVLQS3.js} +79 -40
  123. package/dist/webui-session-retirement.d.ts +10 -0
  124. package/dist/wiring/command-host-state.d.ts +2 -0
  125. package/dist/wiring/director-announcement.d.ts +3 -1
  126. package/dist/wiring/session-establishment.d.ts +10 -8
  127. package/dist/wiring/session-runtime.d.ts +1 -1
  128. package/dist/wiring/session.d.ts +3 -0
  129. package/package.json +30 -29
  130. package/dist/auto-discover-providers-DXR25GTG.js +0 -7
  131. package/dist/chunk-3ZTLPNEQ.js +0 -58
  132. package/dist/chunk-D5GB5MHA.js +0 -87
  133. package/dist/chunk-SIGUWXAA.js +0 -43
  134. package/dist/hq-ttl-VJR65OBJ.js +0 -7
  135. package/dist/short-circuit-flags-BSIPTAPD.js +0 -10
@@ -1,87 +0,0 @@
1
-
2
- // src/boot/auto-discover-providers.ts
3
- import * as fs from "node:fs/promises";
4
- import * as path from "node:path";
5
- import { discoverOpenAICompatibleModels, resolveDiscoveryTargets } from "@wrongstack/providers";
6
- async function readCache(file) {
7
- try {
8
- return JSON.parse(await fs.readFile(file, "utf8"));
9
- } catch {
10
- return {};
11
- }
12
- }
13
- async function discoverAndMergeProviders(opts) {
14
- const targets = resolveDiscoveryTargets(opts.config);
15
- if (targets.length === 0) return;
16
- const cacheFile = path.join(opts.cacheDir, "discovered-models-cache.json");
17
- const cache = await readCache(cacheFile);
18
- let cacheDirty = false;
19
- await Promise.all(
20
- targets.map(
21
- async ({
22
- id,
23
- cfg,
24
- baseUrl,
25
- apiKey,
26
- cacheKey,
27
- modelDiscoveryPath,
28
- modelDiscoveryAuthoritative
29
- }) => {
30
- const provider = await discoverOpenAICompatibleModels(id, {
31
- baseUrl,
32
- apiKey,
33
- headers: cfg.headers,
34
- providerName: id,
35
- modelDiscoveryPath,
36
- fetchImpl: opts.fetchImpl
37
- });
38
- if (provider) {
39
- const fetchedAt = (/* @__PURE__ */ new Date()).toISOString();
40
- cache[cacheKey] = { fetchedAt, provider };
41
- cacheDirty = true;
42
- if (modelDiscoveryAuthoritative) {
43
- opts.registry.mergeOverlay(
44
- { [id]: provider },
45
- { observedAt: fetchedAt, authoritativeProviderIds: [id] }
46
- );
47
- } else {
48
- opts.registry.mergeOverlay({ [id]: provider });
49
- }
50
- opts.logger?.info(
51
- `auto-discovered ${Object.keys(provider.models).length} models for "${id}" from ${baseUrl}`
52
- );
53
- return;
54
- }
55
- const cached = cache[cacheKey];
56
- if (cached) {
57
- if (modelDiscoveryAuthoritative) {
58
- opts.registry.mergeOverlay(
59
- { [id]: cached.provider },
60
- { observedAt: cached.fetchedAt, authoritativeProviderIds: [id] }
61
- );
62
- } else {
63
- opts.registry.mergeOverlay({ [id]: cached.provider });
64
- }
65
- opts.logger?.warn(
66
- `auto-discovery for "${id}" failed; using ${Object.keys(cached.provider.models).length} cached models from ${cached.fetchedAt}`
67
- );
68
- } else {
69
- opts.logger?.warn(
70
- `auto-discovery for "${id}" failed and no cache available (server at ${baseUrl} unreachable?)`
71
- );
72
- }
73
- }
74
- )
75
- );
76
- if (cacheDirty) {
77
- try {
78
- await fs.writeFile(cacheFile, JSON.stringify(cache), "utf8");
79
- } catch {
80
- }
81
- }
82
- }
83
-
84
- export {
85
- discoverAndMergeProviders
86
- };
87
- //# sourceMappingURL=chunk-D5GB5MHA.js.map
@@ -1,43 +0,0 @@
1
-
2
- // src/auth-menu/openai-codex-oauth.ts
3
- import { color } from "@wrongstack/core/utils";
4
- import {
5
- buildCodexAuthorizeUrl,
6
- CODEX_BASE_URL,
7
- CODEX_FALLBACK_REDIRECT_PORT,
8
- CODEX_PROVIDER_ID,
9
- CODEX_REDIRECT_HOST,
10
- CODEX_REDIRECT_PATH,
11
- CODEX_REDIRECT_PORT,
12
- CODEX_SCOPE,
13
- codexRedirectUri,
14
- createState,
15
- exchangeCodexAuthorizationCode,
16
- extractAccountId,
17
- generatePkce,
18
- parseAuthorizationInput,
19
- refreshCodexTokens,
20
- resolveCodexModels
21
- } from "@wrongstack/providers/oauth";
22
- import {
23
- CODEX_BASE_URL as CODEX_BASE_URL2,
24
- CODEX_CATALOG_FAMILIES,
25
- CODEX_PROVIDER_ID as CODEX_PROVIDER_ID2,
26
- extractAccountId as extractAccountId2,
27
- FALLBACK_CODEX_MODELS,
28
- fallbackCodexModelIds,
29
- fallbackCodexProviderModels,
30
- fetchCodexModels,
31
- filterCurrentCodexModelIds,
32
- generatePkce as generatePkce2,
33
- isCodexCatalogModel,
34
- parseAuthorizationInput as parseAuthorizationInput2,
35
- resolveCodexModels as resolveCodexModels2
36
- } from "@wrongstack/providers/oauth";
37
-
38
- export {
39
- fallbackCodexProviderModels,
40
- filterCurrentCodexModelIds,
41
- isCodexCatalogModel
42
- };
43
- //# sourceMappingURL=chunk-SIGUWXAA.js.map
@@ -1,7 +0,0 @@
1
- import {
2
- parseTokenTtlValue
3
- } from "./chunk-UZ2TMHNH.js";
4
- export {
5
- parseTokenTtlValue
6
- };
7
- //# sourceMappingURL=hq-ttl-VJR65OBJ.js.map
@@ -1,10 +0,0 @@
1
- import {
2
- handleHelpVersionShortCircuit
3
- } from "./chunk-L5TD7UIG.js";
4
- import "./chunk-5JYDKG5B.js";
5
- import "./chunk-F5DCFAKI.js";
6
- import "./chunk-Q4INH2DG.js";
7
- export {
8
- handleHelpVersionShortCircuit
9
- };
10
- //# sourceMappingURL=short-circuit-flags-BSIPTAPD.js.map