@wrongstack/cli 1.0.1 → 1.0.4

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 (109) hide show
  1. package/data/providers.json +21 -21
  2. package/dist/{acp-3LARESEO.js → acp-AB54FWM2.js} +122 -39
  3. package/dist/acp-agent-list.d.ts +14 -0
  4. package/dist/acp-hq-telemetry.d.ts +9 -2
  5. package/dist/acp-mcp-servers.d.ts +49 -0
  6. package/dist/acp-server-agent.d.ts +18 -6
  7. package/dist/{auth-ZUMCDNE5.js → auth-WDMSNZ3S.js} +79 -55
  8. package/dist/auth-menu/index.d.ts +1 -0
  9. package/dist/auth-menu/oauth-menu.d.ts +3 -1
  10. package/dist/auth-menu/panel-service.d.ts +2 -0
  11. package/dist/auth-menu/provider-auth-login.d.ts +12 -0
  12. package/dist/auth-menu/types.d.ts +3 -0
  13. package/dist/auto-discover-providers-DXR25GTG.js +7 -0
  14. package/dist/boot/dispatch-webui.d.ts +1 -0
  15. package/dist/boot/short-circuit-hq.d.ts +2 -0
  16. package/dist/boot/system-prompt-builder.d.ts +7 -0
  17. package/dist/boot/system-prompt.d.ts +2 -1
  18. package/dist/boot/tool-registry.d.ts +18 -1
  19. package/dist/chimera-reviewer-policy.d.ts +1 -1
  20. package/dist/{chunk-C2E24IXZ.js → chunk-3I5ZJXM5.js} +147 -241
  21. package/dist/{chunk-JHPXJRRI.js → chunk-4XCBEUBX.js} +13 -3
  22. package/dist/{chunk-FPIWTJ2G.js → chunk-6WRKAACA.js} +4 -4
  23. package/dist/chunk-AUQDGU5D.js +32 -0
  24. package/dist/{chunk-D2VCUN7M.js → chunk-BIWE22O5.js} +17 -17
  25. package/dist/{chunk-VOTTENR5.js → chunk-CDY4D5QK.js} +2 -2
  26. package/dist/chunk-D5GB5MHA.js +87 -0
  27. package/dist/chunk-DAKVBMD4.js +36 -0
  28. package/dist/{chunk-E6RFXHWD.js → chunk-EK2P53GL.js} +3 -2
  29. package/dist/chunk-I7V2OYVH.js +242 -0
  30. package/dist/{chunk-MXEJEYT7.js → chunk-JX6KL7OF.js} +15 -5
  31. package/dist/{chunk-ZSZ3EYWH.js → chunk-KEPABQYT.js} +109 -6
  32. package/dist/{chunk-IMWXXF4J.js → chunk-KNMIBKLV.js} +79 -1
  33. package/dist/{chunk-MNQQ4ZNF.js → chunk-ONOT5OJ2.js} +290 -687
  34. package/dist/chunk-Q7E3BPDU.js +62 -0
  35. package/dist/chunk-SIGUWXAA.js +43 -0
  36. package/dist/{chunk-TEBMCYZN.js → chunk-SIS37L3W.js} +58 -2
  37. package/dist/{chunk-KHWDTNBZ.js → chunk-U6PGWDMZ.js} +5 -5
  38. package/dist/{chunk-5IA5337I.js → chunk-XJ7K67PP.js} +8 -2
  39. package/dist/{cli-context-7X3M6U73.js → cli-context-WFC3BNGM.js} +131 -25
  40. package/dist/{cli-main-53KG6HAV.js → cli-main-GU3YZLMO.js} +3986 -2827
  41. package/dist/{diag-doctor-7LYUYU35.js → diag-doctor-PCER6KHH.js} +2 -2
  42. package/dist/execute-deps.d.ts +1 -0
  43. package/dist/{execution-MIBWBYB6.js → execution-RAZDDQFC.js} +115 -16
  44. package/dist/execution-specialist-trigger.d.ts +28 -0
  45. package/dist/fleet/acp-live-progress.d.ts +19 -0
  46. package/dist/fleet/host-acp-runner-cache.d.ts +3 -1
  47. package/dist/fleet/host-acp.d.ts +14 -2
  48. package/dist/fleet/host.d.ts +1 -0
  49. package/dist/{hq-IG3YRGCO.js → hq-5XHEIIH6.js} +127 -8
  50. package/dist/hq-command-controller.d.ts +31 -2
  51. package/dist/hq-server/client-address.d.ts +2 -0
  52. package/dist/hq-server/ip-allowlist.d.ts +16 -0
  53. package/dist/hq-server/preflight.d.ts +1 -0
  54. package/dist/hq-server/routes/auth/password-routes.d.ts +1 -1
  55. package/dist/hq-server/routes.d.ts +5 -4
  56. package/dist/hq-server/secret-input.d.ts +7 -0
  57. package/dist/hq-server/types.d.ts +3 -2
  58. package/dist/hq-server/upgrade-handler.d.ts +2 -0
  59. package/dist/hq-server/utils.d.ts +6 -0
  60. package/dist/{hq-server-OILU3NPI.js → hq-server-CNUTBWTK.js} +4 -3
  61. package/dist/hq-server.d.ts +4 -0
  62. package/dist/hq-service-L5INQFM4.js +507 -0
  63. package/dist/hq-service.d.ts +22 -0
  64. package/dist/index.js +4 -4
  65. package/dist/ip-allowlist-NHXO6AKJ.js +9 -0
  66. package/dist/live-settings-input.d.ts +4 -0
  67. package/dist/{mailbox-serve-VUCWZ2SJ.js → mailbox-serve-X3CR6VFW.js} +4 -3
  68. package/dist/{modeldiag-FMJT37SN.js → modeldiag-46CMWUNM.js} +31 -24
  69. package/dist/{per-subcommand-help-BWBHYVJO.js → per-subcommand-help-DHTYU524.js} +2 -2
  70. package/dist/{plugin-usage-HFBI3TFT.js → plugin-usage-M6KET4OZ.js} +2 -2
  71. package/dist/{plugins-PZ2VZL7V.js → plugins-WJLW6ULV.js} +3 -3
  72. package/dist/projects-LMNAGGEU.js +36 -0
  73. package/dist/{providers-models-YVMVYWRS.js → providers-models-6MOGAOVK.js} +2 -2
  74. package/dist/{proxy-wiring-MGRSKZZB.js → proxy-wiring-K2DORFFL.js} +3 -3
  75. package/dist/short-circuit-flags-YDMLAQ5R.js +10 -0
  76. package/dist/slash-commands/acp.d.ts +3 -0
  77. package/dist/slash-commands/codebase-map.d.ts +11 -0
  78. package/dist/slash-commands/command-context.d.ts +29 -0
  79. package/dist/slash-commands/context.d.ts +10 -0
  80. package/dist/slash-commands/ensemble.d.ts +1 -1
  81. package/dist/slash-commands/openai-quota.d.ts +31 -0
  82. package/dist/slash-commands/profile.d.ts +7 -0
  83. package/dist/subcommands/handlers/hq.d.ts +1 -0
  84. package/dist/subcommands/handlers/projects.d.ts +14 -0
  85. package/dist/{subcommands-WJLBHVKC.js → subcommands-7N4RIK6H.js} +2 -2
  86. package/dist/{version-help-MYKF724O.js → version-help-WXI42PZ3.js} +2 -2
  87. package/dist/{webui-server-5R35BHWZ.js → webui-server-OBV5JYJV.js} +27 -4
  88. package/dist/webui-server-options.d.ts +1 -0
  89. package/dist/wiring/atlas-prompt-contributor.d.ts +54 -0
  90. package/dist/wiring/cli-execute-builder.d.ts +1 -0
  91. package/dist/wiring/cli-slash-commands-setup.d.ts +7 -0
  92. package/dist/wiring/codebase-embeddings.d.ts +31 -0
  93. package/dist/wiring/command-host-state.d.ts +9 -0
  94. package/dist/wiring/concept-summarizer.d.ts +32 -0
  95. package/dist/wiring/external-plugins.d.ts +1 -0
  96. package/dist/wiring/lifecycle-plugins.d.ts +2 -1
  97. package/dist/wiring/pipeline.d.ts +2 -0
  98. package/dist/wiring/plugins.d.ts +2 -1
  99. package/dist/wiring/provider-runtime-setup.d.ts +1 -1
  100. package/dist/wiring/provider.d.ts +2 -1
  101. package/dist/wiring/session-command-handlers.d.ts +2 -1
  102. package/dist/wiring/slash-commands.d.ts +1 -0
  103. package/package.json +29 -29
  104. package/dist/auto-discover-providers-VQU3IZMR.js +0 -7
  105. package/dist/chunk-52C7PD2H.js +0 -61
  106. package/dist/chunk-Q5GTM25S.js +0 -17
  107. package/dist/chunk-TNK6237M.js +0 -262
  108. package/dist/projects-L6C6XLDY.js +0 -37
  109. package/dist/short-circuit-flags-UREFSYBL.js +0 -10
@@ -53,6 +53,12 @@ export declare function setupCliSlashCommands(params: {
53
53
  agentMonitor: B['agentMonitor'];
54
54
  onPanelOpen: B['onPanelOpen'];
55
55
  configStore: B['configStore'];
56
+ /**
57
+ * Forwards the store's new merged config back to the host after an in-process
58
+ * selection change (`/profile switch`). Optional: hosts without a live merged
59
+ * config leave it unset and the selection still applies on their next boot.
60
+ */
61
+ onActiveProfileChange?: B['onActiveProfileChange'];
56
62
  secretInputController: {
57
63
  readSecret: NonNullable<B['readSecret']>;
58
64
  readText: NonNullable<B['readText']>;
@@ -79,6 +85,7 @@ export declare function setupCliSlashCommands(params: {
79
85
  };
80
86
  mcpRegistry: SE['mcpRegistry'];
81
87
  setYoloMode: SE['onYolo'];
88
+ setYoloConfirm: SE['onYoloConfirm'];
82
89
  getNextPredict: SE['getNextPredict'];
83
90
  setNextPredict: SE['setNextPredict'];
84
91
  getCurrentSuggestions: SE['getCurrentSuggestions'];
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Host-side wiring for the codebase index's semantic embeddings.
3
+ *
4
+ * The model is `packages/vector-memory`'s transformers-backed provider, which
5
+ * already emits 384-dimensional vectors — the width `file_vectors` stores. It
6
+ * arrives here rather than inside `packages/tools` for two reasons:
7
+ *
8
+ * - `@huggingface/transformers` is an **opt-in** backend. A repository
9
+ * that never enables semantic search should not have to install a model
10
+ * runtime, and `packages/tools` must stay importable without one.
11
+ * - A function cannot cross the project daemon's IPC boundary. The daemon
12
+ * compares vectors; the host produces them. That also keeps a ~90 MB model
13
+ * out of every per-project daemon process.
14
+ *
15
+ * Everything here is best-effort. When the optional dependency is absent, the
16
+ * model cannot load, or the config leaves embeddings off, the port is simply
17
+ * `undefined` and retrieval stays lexical — which is the behaviour that
18
+ * shipped before embeddings existed.
19
+ */
20
+ import type { IndexingEmbeddingsConfig } from '@wrongstack/core/types';
21
+ import type { EmbeddingPort } from '@wrongstack/tools';
22
+ /**
23
+ * Build the embedding port, or `undefined` when semantic search is off or
24
+ * unavailable.
25
+ *
26
+ * The dynamic import is what keeps `@huggingface/transformers` opt-in: a
27
+ * missing package throws here and is reported as "unavailable", never as a
28
+ * startup failure.
29
+ */
30
+ export declare function createCodebaseEmbeddingPort(settings: IndexingEmbeddingsConfig | undefined): Promise<EmbeddingPort | undefined>;
31
+ //# sourceMappingURL=codebase-embeddings.d.ts.map
@@ -1,6 +1,7 @@
1
1
  /** Mutable command-host state created after the runtime fleet is available. */
2
2
  import { type BrainArbiter, type Director } from '@wrongstack/core/coordination';
3
3
  import type { EventBus } from '@wrongstack/core/kernel';
4
+ import { type DestructiveKind } from '@wrongstack/core/security';
4
5
  import type { StatuslineDensities, StatuslineLines } from '@wrongstack/core/statusline';
5
6
  import { type Config, type SessionWriter } from '@wrongstack/core/types';
6
7
  import type { WstackPaths } from '@wrongstack/core/utils';
@@ -28,6 +29,8 @@ interface CommandHostStateInput {
28
29
  permissionPolicy: {
29
30
  setYolo?(enabled: boolean): void;
30
31
  getYolo?(): boolean;
32
+ setYoloConfirmKinds?(kinds: Iterable<DestructiveKind>): void;
33
+ getYoloConfirmKinds?(): ReadonlySet<DestructiveKind>;
31
34
  };
32
35
  /**
33
36
  * The live conversation's meta bag.
@@ -77,6 +80,7 @@ export declare function setupCommandHostState(input: CommandHostStateInput): Pro
77
80
  project?: import("@wrongstack/core/statusline").StatuslineLine;
78
81
  prompt_variant?: import("@wrongstack/core/statusline").StatuslineLine;
79
82
  queue?: import("@wrongstack/core/statusline").StatuslineLine;
83
+ quota?: import("@wrongstack/core/statusline").StatuslineLine;
80
84
  sessions?: import("@wrongstack/core/statusline").StatuslineLine;
81
85
  side_effects?: import("@wrongstack/core/statusline").StatuslineLine;
82
86
  state?: import("@wrongstack/core/statusline").StatuslineLine;
@@ -122,6 +126,7 @@ export declare function setupCommandHostState(input: CommandHostStateInput): Pro
122
126
  project?: import("@wrongstack/core/statusline").StatuslineDensity;
123
127
  prompt_variant?: import("@wrongstack/core/statusline").StatuslineDensity;
124
128
  queue?: import("@wrongstack/core/statusline").StatuslineDensity;
129
+ quota?: import("@wrongstack/core/statusline").StatuslineDensity;
125
130
  sessions?: import("@wrongstack/core/statusline").StatuslineDensity;
126
131
  side_effects?: import("@wrongstack/core/statusline").StatuslineDensity;
127
132
  state?: import("@wrongstack/core/statusline").StatuslineDensity;
@@ -177,6 +182,10 @@ export declare function setupCommandHostState(input: CommandHostStateInput): Pro
177
182
  } | null>) | undefined;
178
183
  };
179
184
  setYoloMode: (enabled?: boolean) => boolean;
185
+ setYoloConfirm: (update?: {
186
+ kind: DestructiveKind;
187
+ confirm: boolean;
188
+ }) => Record<DestructiveKind, boolean>;
180
189
  secretInputController: {
181
190
  readSecret: (prompt: string) => Promise<string>;
182
191
  readText: (prompt: string) => Promise<string>;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Host-side implementation of the codebase index's {@link SummarizerPort}.
3
+ *
4
+ * `packages/tools` defines what a summariser must answer; producing that answer
5
+ * needs a configured provider and the model-tier policy, both of which live
6
+ * here. The port is therefore injected rather than imported, the same way SAGE
7
+ * takes `getLlmCall` — a host that supplies nothing simply gets no concept
8
+ * layer, and the index carries on working without one.
9
+ *
10
+ * ## Cost shape
11
+ *
12
+ * One call per file, and only for files whose bytes changed since the last
13
+ * pass. Enrichment is the one part of the index that spends money, so the model
14
+ * is resolved through the tier layer at its cheapest configured level unless
15
+ * the caller pins one, and both the token ceiling and the timeout are small.
16
+ */
17
+ import { OneShotOrchestrator } from '@wrongstack/core/execution';
18
+ import type { Config } from '@wrongstack/core/types';
19
+ import type { SummarizerPort } from '@wrongstack/tools';
20
+ type OrchestratorOptions = ConstructorParameters<typeof OneShotOrchestrator>[0];
21
+ export interface ConceptSummarizerDeps {
22
+ buildProvider: OrchestratorOptions['buildProvider'];
23
+ getConfig: () => Config;
24
+ fallbackProfileManager: OrchestratorOptions['fallbackProfileManager'];
25
+ statusTracker?: OrchestratorOptions['statusTracker'];
26
+ wrapProviderCall?: OrchestratorOptions['wrapProviderCall'];
27
+ /** Explicit model override; otherwise the configured budget tier decides. */
28
+ model?: string | undefined;
29
+ }
30
+ export declare function createConceptSummarizer(deps: ConceptSummarizerDeps): SummarizerPort;
31
+ export {};
32
+ //# sourceMappingURL=concept-summarizer.d.ts.map
@@ -64,5 +64,6 @@ interface LoadExternalPluginsContext {
64
64
  importModule?: ((url: string) => Promise<unknown>) | undefined;
65
65
  }
66
66
  export declare function loadExternalPlugins(ctx: LoadExternalPluginsContext, hooks: ExternalPluginHooks): Promise<Plugin[]>;
67
+ export declare function hashPluginClosure(entryPath: string): Promise<string>;
67
68
  export {};
68
69
  //# sourceMappingURL=external-plugins.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { type RemoteMailbox } from '@wrongstack/core/coordination';
2
2
  import { HookRegistry, HookRunner } from '@wrongstack/core/hooks';
3
3
  import type { PluginHostHandle } from '@wrongstack/core/plugin';
4
- import { type ProviderRegistry, SlashCommandRegistry, type ToolRegistry } from '@wrongstack/core/registry';
4
+ import { type ProviderAuthRegistry, type ProviderRegistry, SlashCommandRegistry, type ToolRegistry } from '@wrongstack/core/registry';
5
5
  import type { Config, HealthRegistry, Logger, MetricsRuntimeStatus, ModelsRegistry, PromptLoader, Provider, ProviderConfig, SecretVault, SessionWriter, SkillLoader } from '@wrongstack/core/types';
6
6
  import type { WstackPaths } from '@wrongstack/core/utils';
7
7
  import { MCPRegistry } from '@wrongstack/mcp';
@@ -27,6 +27,7 @@ interface LifecyclePluginsDeps {
27
27
  wpaths: WstackPaths;
28
28
  toolRegistry: ToolRegistry;
29
29
  providerRegistry: ProviderRegistry;
30
+ providerAuthRegistry: ProviderAuthRegistry;
30
31
  configStore: any;
31
32
  eventWiring: EventWiring;
32
33
  healthRegistry: HealthRegistry | undefined;
@@ -82,6 +82,8 @@ export declare function createAgent(params: {
82
82
  /** Opt-in Kanban governance gate; see ToolsConfig.kanbanGovernance. */
83
83
  kanbanGovernance?: boolean | undefined;
84
84
  loopDetection?: import('@wrongstack/core/types').LoopDetectionConfig | undefined;
85
+ autoExtendLimit?: boolean | undefined;
86
+ maxAutoExtensions?: number | undefined;
85
87
  };
86
88
  };
87
89
  confirmAwaiter: import('@wrongstack/core/agent').AgentInit['confirmAwaiter'];
@@ -2,7 +2,7 @@ import type { AgentPipelines } from '@wrongstack/core/agent';
2
2
  import type { ExtensionRegistry } from '@wrongstack/core/extension';
3
3
  import type { Container, EventBus } from '@wrongstack/core/kernel';
4
4
  import type { PluginAPIInit, PluginHostHandle } from '@wrongstack/core/plugin';
5
- import type { ProviderRegistry, SlashCommandRegistry, ToolRegistry } from '@wrongstack/core/registry';
5
+ import type { ProviderAuthRegistry, ProviderRegistry, SlashCommandRegistry, ToolRegistry } from '@wrongstack/core/registry';
6
6
  import type { Config, ConfigStore, HealthRegistry, Logger, MetricsRuntimeStatus, MetricsSinkView, ModelsRegistry, Plugin, PromptLoader, SessionWriter, SkillLoader } from '@wrongstack/core/types';
7
7
  import type { MCPRegistry } from '@wrongstack/mcp';
8
8
  export declare const DEPRECATED_PLUGIN_NAMES: Record<string, string>;
@@ -34,6 +34,7 @@ export interface PluginsWiringDeps {
34
34
  pipelines: AgentPipelines;
35
35
  toolRegistry: ToolRegistry;
36
36
  providerRegistry: ProviderRegistry;
37
+ providerAuthRegistry?: ProviderAuthRegistry | undefined;
37
38
  slashCommandRegistry: SlashCommandRegistry;
38
39
  mcpRegistry: MCPRegistry;
39
40
  log: Logger;
@@ -3,7 +3,7 @@ import type { ProviderModelStatusTracker } from '@wrongstack/core/coordination';
3
3
  import type { EventBus } from '@wrongstack/core/kernel';
4
4
  import type { ProviderRegistry } from '@wrongstack/core/registry';
5
5
  import type { Config, Logger, ModelsRegistry, Provider, ProviderConfig, SecretVault } from '@wrongstack/core/types';
6
- import type { WstackPaths } from '@wrongstack/core/utils';
6
+ import { type WstackPaths } from '@wrongstack/core/utils';
7
7
  export declare function serializeProviderRuntimeSnapshot(snapshot: unknown): string;
8
8
  type AnyObj = any;
9
9
  export interface ProviderRuntimeDeps {
@@ -1,10 +1,11 @@
1
- import { ProviderRegistry } from '@wrongstack/core/registry';
1
+ import { ProviderAuthRegistry, ProviderRegistry } from '@wrongstack/core/registry';
2
2
  import type { ResolvedProvider } from '@wrongstack/core/types';
3
3
  import { type Config, type Logger, type ModelsRegistry } from '@wrongstack/core/types';
4
4
  interface ProviderSetupResult {
5
5
  resolvedProvider: ResolvedProvider | undefined;
6
6
  provider: ReturnType<ProviderRegistry['create']>;
7
7
  providerRegistry: ProviderRegistry;
8
+ providerAuthRegistry: ProviderAuthRegistry;
8
9
  }
9
10
  export declare function setupProvider(params: {
10
11
  config: Config;
@@ -7,7 +7,7 @@ import type { MultiAgentHost } from '../multi-agent.js';
7
7
  import type { SessionStats } from '../session-stats.js';
8
8
  import type { BuiltinSlashCommandDeps } from './slash-commands.js';
9
9
  type SlashCommandDeps = BuiltinSlashCommandDeps;
10
- type SessionCommandHandlers = Pick<SlashCommandDeps, 'onPlugin' | 'onContextLimit' | 'onMcp' | 'mcpRegistry' | 'mcpStatus' | 'onYolo' | 'onNextPredict' | 'onSuggestions' | 'onExit' | 'onBeforeExit' | 'onClear' | 'onNewSession' | 'onDiag' | 'onStats' | 'generateCommitMessage' | 'onDispatchClassify'>;
10
+ type SessionCommandHandlers = Pick<SlashCommandDeps, 'onPlugin' | 'onContextLimit' | 'onMcp' | 'mcpRegistry' | 'mcpStatus' | 'onYolo' | 'onYoloConfirm' | 'onNextPredict' | 'onSuggestions' | 'onExit' | 'onBeforeExit' | 'onClear' | 'onNewSession' | 'onDiag' | 'onStats' | 'generateCommitMessage' | 'onDispatchClassify'>;
11
11
  interface ErrorRecord {
12
12
  ts: string;
13
13
  phase: string;
@@ -30,6 +30,7 @@ interface SessionCommandHandlersInput {
30
30
  setEventMaxContext: (tokens: number) => void;
31
31
  mcpRegistry: MCPRegistry;
32
32
  onYolo: NonNullable<SlashCommandDeps['onYolo']>;
33
+ onYoloConfirm: SlashCommandDeps['onYoloConfirm'];
33
34
  getNextPredict: () => boolean;
34
35
  setNextPredict: (enabled: boolean) => void;
35
36
  getCurrentSuggestions: () => string[];
@@ -65,6 +65,7 @@ interface SlashCommandsDeps {
65
65
  }): Promise<CompactReport>;
66
66
  };
67
67
  configStore: ConfigStore;
68
+ onActiveProfileChange?: BuiltinSlashCommandDeps['onActiveProfileChange'];
68
69
  /** Called by /clear after wiping the session on disk — tells the TUI to reset its UI state. */
69
70
  onNewSession?: (() => Promise<void>) | undefined;
70
71
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/cli",
3
- "version": "1.0.1",
3
+ "version": "1.0.4",
4
4
  "license": "MIT",
5
5
  "description": "WrongStack CLI — terminal AI coding agent with provider catalog from models.dev. Provides `wrongstack` and `wstack` binaries.",
6
6
  "keywords": [
@@ -41,36 +41,36 @@
41
41
  "data"
42
42
  ],
43
43
  "dependencies": {
44
- "@wrongstack/acp": "1.0.1",
45
- "@wrongstack/bench": "1.0.1",
46
- "@wrongstack/core": "1.0.1",
47
- "@wrongstack/primitives": "1.0.1",
48
- "@wrongstack/kanban": "1.0.1",
49
- "@wrongstack/mcp": "1.0.1",
50
- "@wrongstack/persistence": "1.0.1",
51
- "@wrongstack/plug-lsp": "1.0.1",
52
- "@wrongstack/plugins": "1.0.1",
53
- "@wrongstack/providers": "1.0.1",
54
- "@wrongstack/requirement-intake": "1.0.1",
55
- "@wrongstack/runtime": "1.0.1",
56
- "@wrongstack/sage": "1.0.1",
57
- "@wrongstack/sdd": "1.0.1",
58
- "@wrongstack/security-scanner": "1.0.1",
59
- "@wrongstack/simpleui": "1.0.1",
60
- "@wrongstack/techstack": "1.0.1",
61
- "@wrongstack/telegram": "1.0.1",
62
- "@wrongstack/tools": "1.0.1",
63
- "@wrongstack/tui": "1.0.1",
64
- "@wrongstack/vector-memory": "1.0.0",
65
- "@wrongstack/webui": "1.0.1",
66
- "@wrongstack/webui-hq": "1.0.1",
67
- "@wrongstack/webui-protocol": "1.0.1",
68
- "@wrongstack/wrongtrace": "1.0.1",
69
- "@wrongstack/webui-server": "1.0.1",
44
+ "@wrongstack/acp": "1.0.4",
45
+ "@wrongstack/bench": "1.0.4",
46
+ "@wrongstack/core": "1.0.4",
47
+ "@wrongstack/primitives": "1.0.4",
48
+ "@wrongstack/kanban": "1.0.4",
49
+ "@wrongstack/mcp": "1.0.4",
50
+ "@wrongstack/persistence": "1.0.4",
51
+ "@wrongstack/plug-lsp": "1.0.4",
52
+ "@wrongstack/plugins": "1.0.4",
53
+ "@wrongstack/providers": "1.0.4",
54
+ "@wrongstack/requirement-intake": "1.0.4",
55
+ "@wrongstack/runtime": "1.0.4",
56
+ "@wrongstack/sage": "1.0.4",
57
+ "@wrongstack/sdd": "1.0.4",
58
+ "@wrongstack/security-scanner": "1.0.4",
59
+ "@wrongstack/simpleui": "1.0.4",
60
+ "@wrongstack/techstack": "1.0.4",
61
+ "@wrongstack/telegram": "1.0.4",
62
+ "@wrongstack/tools": "1.0.4",
63
+ "@wrongstack/tui": "1.0.4",
64
+ "@wrongstack/vector-memory": "1.0.4",
65
+ "@wrongstack/webui": "1.0.4",
66
+ "@wrongstack/webui-hq": "1.0.4",
67
+ "@wrongstack/webui-protocol": "1.0.4",
68
+ "@wrongstack/wrongtrace": "1.0.4",
69
+ "@wrongstack/webui-server": "1.0.4",
70
70
  "ws": "^8.21.3"
71
71
  },
72
72
  "optionalDependencies": {
73
- "@wrongstack/desktop": "1.0.1"
73
+ "@wrongstack/desktop": "1.0.4"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@types/node": "^26.2.0",
@@ -83,7 +83,7 @@
83
83
  },
84
84
  "scripts": {
85
85
  "build": "node ../../scripts/build-package.mjs",
86
- "typecheck": "pnpm --filter @wrongstack/tools run build && pnpm --filter @wrongstack/tui run build && tsc --noEmit && tsc --noEmit -p tsconfig.test.json",
86
+ "typecheck": "pnpm --filter @wrongstack/tools run build && pnpm --filter @wrongstack/tui run build && pnpm --filter @wrongstack/webui-server run build && tsc --noEmit && tsc --noEmit -p tsconfig.test.json",
87
87
  "test": "vitest run",
88
88
  "test:hqdash": "vitest run --config vitest.hqdash.config.ts",
89
89
  "clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\""
@@ -1,7 +0,0 @@
1
- import {
2
- discoverAndMergeProviders
3
- } from "./chunk-52C7PD2H.js";
4
- export {
5
- discoverAndMergeProviders
6
- };
7
- //# sourceMappingURL=auto-discover-providers-VQU3IZMR.js.map
@@ -1,61 +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(async ({ id, cfg, baseUrl, apiKey, cacheKey }) => {
21
- const provider = await discoverOpenAICompatibleModels(id, {
22
- baseUrl,
23
- apiKey,
24
- headers: cfg.headers,
25
- providerName: id,
26
- fetchImpl: opts.fetchImpl
27
- });
28
- if (provider) {
29
- cache[cacheKey] = { fetchedAt: (/* @__PURE__ */ new Date()).toISOString(), provider };
30
- cacheDirty = true;
31
- opts.registry.mergeOverlay({ [id]: provider });
32
- opts.logger?.info(
33
- `auto-discovered ${Object.keys(provider.models).length} models for "${id}" from ${baseUrl}`
34
- );
35
- return;
36
- }
37
- const cached = cache[cacheKey];
38
- if (cached) {
39
- opts.registry.mergeOverlay({ [id]: cached.provider });
40
- opts.logger?.warn(
41
- `auto-discovery for "${id}" failed; using ${Object.keys(cached.provider.models).length} cached models from ${cached.fetchedAt}`
42
- );
43
- } else {
44
- opts.logger?.warn(
45
- `auto-discovery for "${id}" failed and no cache available (server at ${baseUrl} unreachable?)`
46
- );
47
- }
48
- })
49
- );
50
- if (cacheDirty) {
51
- try {
52
- await fs.writeFile(cacheFile, JSON.stringify(cache), "utf8");
53
- } catch {
54
- }
55
- }
56
- }
57
-
58
- export {
59
- discoverAndMergeProviders
60
- };
61
- //# sourceMappingURL=chunk-52C7PD2H.js.map
@@ -1,17 +0,0 @@
1
-
2
- // src/hq-server/audit-actor.ts
3
- import * as os from "node:os";
4
- function resolveAuditActor() {
5
- const user = (process.env.USERNAME ?? process.env.USER ?? "").toString();
6
- try {
7
- const host = os.hostname();
8
- return user ? `${user}@${host}` : `cli@${host}`;
9
- } catch {
10
- return user ? `${user}@unknown` : "cli";
11
- }
12
- }
13
-
14
- export {
15
- resolveAuditActor
16
- };
17
- //# sourceMappingURL=chunk-Q5GTM25S.js.map