@wrongstack/core 0.236.0 → 0.255.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.
Files changed (49) hide show
  1. package/dist/{agent-bridge-Cimv7bK7.d.ts → agent-bridge-l_DsFEbr.d.ts} +1 -1
  2. package/dist/{agent-subagent-runner-C658wj_c.d.ts → agent-subagent-runner-DhYLgAJo.d.ts} +4 -4
  3. package/dist/{brain-sCZ3lCjq.d.ts → brain-BaQsRNka.d.ts} +17 -0
  4. package/dist/{config-Koq6f3fs.d.ts → config-eSsrto5d.d.ts} +6 -0
  5. package/dist/coordination/index.d.ts +11 -11
  6. package/dist/coordination/index.js +137 -3
  7. package/dist/coordination/index.js.map +1 -1
  8. package/dist/defaults/index.d.ts +14 -14
  9. package/dist/defaults/index.js +8 -10
  10. package/dist/defaults/index.js.map +1 -1
  11. package/dist/execution/index.d.ts +8 -8
  12. package/dist/execution/index.js +5 -3
  13. package/dist/execution/index.js.map +1 -1
  14. package/dist/extension/index.d.ts +4 -4
  15. package/dist/{goal-preamble-CnbzyVvl.d.ts → goal-preamble-BgoPmZ8l.d.ts} +5 -5
  16. package/dist/{index-BlMqh5GO.d.ts → index-BilZMsOK.d.ts} +4 -4
  17. package/dist/{index-C2eSNPsB.d.ts → index-Csoc_bKs.d.ts} +3 -3
  18. package/dist/index.d.ts +26 -26
  19. package/dist/index.js +168 -19
  20. package/dist/index.js.map +1 -1
  21. package/dist/infrastructure/index.d.ts +4 -4
  22. package/dist/infrastructure/index.js +12 -0
  23. package/dist/infrastructure/index.js.map +1 -1
  24. package/dist/kernel/index.d.ts +5 -5
  25. package/dist/kernel/index.js.map +1 -1
  26. package/dist/{mcp-servers-DFbirBv6.d.ts → mcp-servers-DfXxCASH.d.ts} +1 -1
  27. package/dist/models/index.d.ts +2 -2
  28. package/dist/{models-registry-CnJRjTXc.d.ts → models-registry-DpanBg8D.d.ts} +1 -1
  29. package/dist/{multi-agent-coordinator-60weDZoA.d.ts → multi-agent-coordinator-Bs-M0Mo6.d.ts} +1 -1
  30. package/dist/{null-fleet-bus-1068dEnr.d.ts → null-fleet-bus-CWdU1_cO.d.ts} +5 -5
  31. package/dist/observability/index.d.ts +1 -1
  32. package/dist/{package-outdated-watcher-pzJ5w7y8.d.ts → package-outdated-watcher-Dz-eNZlQ.d.ts} +23 -2
  33. package/dist/{parallel-eternal-engine-DtG1fjc9.d.ts → parallel-eternal-engine-CAMabk-X.d.ts} +5 -5
  34. package/dist/{path-resolver-CA1ULU0J.d.ts → path-resolver-B7VjhUHq.d.ts} +2 -2
  35. package/dist/{pipeline-DsmlwTXu.d.ts → pipeline-Bxa3wDcy.d.ts} +42 -2
  36. package/dist/{plan-templates-DPABrDvy.d.ts → plan-templates-D3guWwTi.d.ts} +2 -2
  37. package/dist/{provider-runner-D0HgUqwV.d.ts → provider-runner-C8_e4Lo1.d.ts} +1 -1
  38. package/dist/sdd/index.d.ts +5 -5
  39. package/dist/sdd/index.js +6 -8
  40. package/dist/sdd/index.js.map +1 -1
  41. package/dist/storage/index.d.ts +6 -6
  42. package/dist/storage/index.js.map +1 -1
  43. package/dist/types/index.d.ts +12 -12
  44. package/dist/types/index.js +17 -3
  45. package/dist/types/index.js.map +1 -1
  46. package/dist/utils/index.d.ts +11 -2
  47. package/dist/utils/index.js +8 -1
  48. package/dist/utils/index.js.map +1 -1
  49. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  import { T as Tool, n as TextBlock, g as ContentBlock } from './context-CLz3z_E8.js';
2
- import { H as HookEvent, e as HookMatcher, I as InProcessHook, S as ShellHook, f as HookEntry } from './config-Koq6f3fs.js';
2
+ import { H as HookEvent, e as HookMatcher, I as InProcessHook, S as ShellHook, f as HookEntry } from './config-eSsrto5d.js';
3
3
 
4
4
  /**
5
5
  * Mailbox — persistent inter-agent messaging system with cross-session support.
@@ -204,6 +204,33 @@ interface AgentRegistrationInput {
204
204
  pid: number;
205
205
  source?: 'cli' | 'webui' | 'mcp' | 'acp' | undefined;
206
206
  }
207
+ type ClientSource = 'repl' | 'tui' | 'webui';
208
+ interface ClientStatus {
209
+ /** Client id. */
210
+ clientId: string;
211
+ /** Human-readable name. */
212
+ name: string;
213
+ /** Client type. */
214
+ source: ClientSource;
215
+ /** Session id. */
216
+ sessionId: string;
217
+ /** ISO8601 — last activity timestamp. */
218
+ lastSeenAt: string;
219
+ /** Whether this client is currently online (heartbeat within threshold). */
220
+ online: boolean;
221
+ /** Which process. */
222
+ pid: number;
223
+ }
224
+ interface ClientRegistrationInput {
225
+ clientId: string;
226
+ sessionId: string;
227
+ name: string;
228
+ source: ClientSource;
229
+ pid: number;
230
+ }
231
+ interface ClientHeartbeatInput {
232
+ clientId: string;
233
+ }
207
234
  interface AgentHeartbeatInput {
208
235
  agentId: string;
209
236
  status?: RegisteredAgent['status'] | undefined;
@@ -248,6 +275,19 @@ interface Mailbox {
248
275
  * Agents and read receipts are preserved; only messages are cleared.
249
276
  */
250
277
  clearAll(): Promise<void>;
278
+ /**
279
+ * Register a client (REPL/TUI/WebUI). Called once per client on startup.
280
+ * Subsequent calls are idempotent — they update lastSeenAt.
281
+ */
282
+ registerClient(input: ClientRegistrationInput): Promise<void>;
283
+ /**
284
+ * Update client heartbeat. Called periodically (every 15s for clients).
285
+ */
286
+ clientHeartbeat(input: ClientHeartbeatInput): Promise<void>;
287
+ /**
288
+ * Get snapshot of online/offline clients and their last activity.
289
+ */
290
+ getClientStatuses(): Promise<ClientStatus[]>;
251
291
  }
252
292
 
253
293
  /** Model capabilities relevant to prompt composition. */
@@ -490,4 +530,4 @@ declare class Pipeline<T> {
490
530
  private ensureUnique;
491
531
  }
492
532
 
493
- export { type AgentRegistrationInput as A, type BuildContext as B, Container as C, type Decorator as D, type Factory as F, HookRegistry as H, type MiddlewareHandler as M, type NextFn as N, Pipeline as P, type ReadonlyPipeline as R, type SystemPromptBuilder as S, type Token as T, type Renderer as a, type Mailbox as b, type MailboxSendInput as c, type MailboxMessage as d, type MailboxQuery as e, type MailboxAckInput as f, type MailboxAgentStatus as g, type AgentHeartbeatInput as h, type MailboxMessageType as i, type MailboxTaskContext as j, type ReadReceipts as k, type RegisteredAgent as l, type ModelCapabilities as m, normalizeRecipient as n, type BindOptions as o, type Middleware as p, type PipelineOptions as q, hookMatcherMatches as r };
533
+ export { type AgentRegistrationInput as A, type BuildContext as B, Container as C, type Decorator as D, type Factory as F, HookRegistry as H, type MiddlewareHandler as M, type NextFn as N, Pipeline as P, type ReadonlyPipeline as R, type SystemPromptBuilder as S, type Token as T, type Renderer as a, type Mailbox as b, type MailboxSendInput as c, type MailboxMessage as d, type MailboxQuery as e, type MailboxAckInput as f, type MailboxAgentStatus as g, type AgentHeartbeatInput as h, type ClientRegistrationInput as i, type ClientHeartbeatInput as j, type ClientStatus as k, type MailboxMessageType as l, type MailboxTaskContext as m, type ReadReceipts as n, type RegisteredAgent as o, normalizeRecipient as p, type ModelCapabilities as q, type BindOptions as r, type Middleware as s, type PipelineOptions as t, hookMatcherMatches as u };
@@ -1,9 +1,9 @@
1
- import { E as EventBus, M as MemoryScope, k as MemoryEntry, l as MemoryStore, m as MemoryRelevanceContext, S as ScoredEntry } from './brain-sCZ3lCjq.js';
1
+ import { E as EventBus, M as MemoryScope, k as MemoryEntry, l as MemoryStore, m as MemoryRelevanceContext, S as ScoredEntry } from './brain-BaQsRNka.js';
2
2
  import { S as SecretScrubber } from './permission-DbWPbuoA.js';
3
3
  import { i as SessionStore, h as SessionMetadata, a as SessionWriter, p as ResumedSession, q as SessionData, r as SessionSummary, g as ContentBlock, S as SessionEvent, s as TodoItem, t as ConversationState } from './context-CLz3z_E8.js';
4
4
  import { A as AttachmentStore, a as AddAttachmentInput, b as AttachmentRef, c as Attachment } from './session-reader-CCOssnBS.js';
5
5
  import { W as WstackPaths } from './wstack-paths-CJjEwPXn.js';
6
- import { i as ConfigStore, h as Config, j as ConfigLoader, k as SyncConfig } from './config-Koq6f3fs.js';
6
+ import { i as ConfigStore, h as Config, j as ConfigLoader, k as SyncConfig } from './config-eSsrto5d.js';
7
7
  import { S as SecretVault } from './secret-vault-BJDY28ev.js';
8
8
 
9
9
  interface SessionStoreOptions {
@@ -1,4 +1,4 @@
1
- import { E as EventBus } from './brain-sCZ3lCjq.js';
1
+ import { E as EventBus } from './brain-BaQsRNka.js';
2
2
  import { L as Logger } from './logger-B63L5bTg.js';
3
3
  import { T as Tracer } from './observability-D-HZN_mF.js';
4
4
  import { P as Provider, R as Request, C as Context, b as Response } from './context-CLz3z_E8.js';
@@ -1,12 +1,12 @@
1
1
  import { h as Specification, S as SpecAnalysis, g as SpecValidationResult, e as SpecStatus, f as SpecTemplate, b as SpecRequirement } from '../spec-TBi3Jr6T.js';
2
2
  import { d as TaskGraph, e as TaskNode, i as TaskFilter, j as TaskSort, c as TaskProgress, T as TaskType, a as TaskPriority } from '../task-graph-u1q9Jkyk.js';
3
- import { E as EventBus } from '../brain-sCZ3lCjq.js';
4
- import { D as DoneCondition, g as Agent, h as AgentFactory, f as TaskResult } from '../agent-subagent-runner-C658wj_c.js';
3
+ import { E as EventBus } from '../brain-BaQsRNka.js';
4
+ import { D as DoneCondition, g as Agent, h as AgentFactory, f as TaskResult } from '../agent-subagent-runner-DhYLgAJo.js';
5
5
  import '../context-CLz3z_E8.js';
6
- import '../index-C2eSNPsB.js';
6
+ import '../index-Csoc_bKs.js';
7
7
  import '../logger-B63L5bTg.js';
8
- import '../pipeline-DsmlwTXu.js';
9
- import '../config-Koq6f3fs.js';
8
+ import '../pipeline-Bxa3wDcy.js';
9
+ import '../config-eSsrto5d.js';
10
10
  import '../observability-D-HZN_mF.js';
11
11
  import '../permission-DbWPbuoA.js';
12
12
  import '../retry-policy-BVnkbMET.js';
package/dist/sdd/index.js CHANGED
@@ -2016,6 +2016,11 @@ function templateToMarkdown(template, title) {
2016
2016
  return lines.join("\n");
2017
2017
  }
2018
2018
 
2019
+ // src/utils/string.ts
2020
+ function truncate(s, max) {
2021
+ return s.length <= max ? s : `${s.slice(0, max - 1)}\u2026`;
2022
+ }
2023
+
2019
2024
  // src/sdd/task-visualizer.ts
2020
2025
  var STATUS_ICON = {
2021
2026
  pending: "\u25CB",
@@ -2166,10 +2171,6 @@ function renderSpecAnalysis(spec, analysis) {
2166
2171
  }
2167
2172
  return lines.join("\n");
2168
2173
  }
2169
- function truncate(str, maxLen) {
2170
- if (str.length <= maxLen) return str;
2171
- return str.slice(0, maxLen - 1) + "\u2026";
2172
- }
2173
2174
 
2174
2175
  // src/sdd/critical-path.ts
2175
2176
  function analyzeCriticalPath(graph) {
@@ -3357,7 +3358,7 @@ var ProviderError = class extends WrongStackError {
3357
3358
  const detail = this.body?.message?.trim();
3358
3359
  const reqId = this.body?.requestId ? ` [req ${this.body.requestId.slice(0, 16)}${this.body.requestId.length > 16 ? "\u2026" : ""}]` : "";
3359
3360
  if (detail && detail.length > 0) {
3360
- return `${head}: ${truncate2(detail, 240)}${reqId}`;
3361
+ return `${head}: ${truncate(detail, 240)}${reqId}`;
3361
3362
  }
3362
3363
  return `${head}${reqId}`;
3363
3364
  }
@@ -3375,9 +3376,6 @@ function describeStatus(status, type) {
3375
3376
  if (type) return `${type} (${status})`;
3376
3377
  return `HTTP ${status}`;
3377
3378
  }
3378
- function truncate2(s, n) {
3379
- return s.length <= n ? s : `${s.slice(0, n - 1)}\u2026`;
3380
- }
3381
3379
  function providerStatusToCode(status, type) {
3382
3380
  if (status === 0) return ERROR_CODES.PROVIDER_NETWORK_ERROR;
3383
3381
  if (type === "rate_limit_error" || status === 429) return ERROR_CODES.PROVIDER_RATE_LIMITED;