@wrongstack/core 0.270.0 → 0.272.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.
- package/dist/{agent-bridge-PcHQl_UQ.d.ts → agent-bridge-jVSZiygR.d.ts} +1 -1
- package/dist/{agent-subagent-runner-SHJW7t8q.d.ts → agent-subagent-runner-DOLIwBRo.d.ts} +7 -7
- package/dist/{brain-BYcK__Ym.d.ts → brain-CdbbJWi3.d.ts} +71 -1
- package/dist/{compactor-C2RKEBtC.d.ts → compactor-72ug-ZRB.d.ts} +1 -1
- package/dist/{config-C_ae2k86.d.ts → config-D2DGoGSQ.d.ts} +29 -2
- package/dist/{context-Dp87Bcaq.d.ts → context-Dw55zZ_Q.d.ts} +110 -1
- package/dist/coordination/index.d.ts +121 -17
- package/dist/coordination/index.js +738 -74
- package/dist/coordination/index.js.map +1 -1
- package/dist/defaults/index.d.ts +25 -25
- package/dist/defaults/index.js +599 -86
- package/dist/defaults/index.js.map +1 -1
- package/dist/execution/index.d.ts +23 -18
- package/dist/execution/index.js +136 -41
- package/dist/execution/index.js.map +1 -1
- package/dist/execution/prompt-enhancer.d.ts +36 -6
- package/dist/execution/prompt-enhancer.js +35 -9
- package/dist/execution/prompt-enhancer.js.map +1 -1
- package/dist/extension/index.d.ts +6 -6
- package/dist/{global-mailbox-Bvrz1P3f.d.ts → global-mailbox-CQj_C9Dp.d.ts} +139 -3
- package/dist/{goal-preamble-CA_4yiGQ.d.ts → goal-preamble-ZXDjjR1y.d.ts} +9 -9
- package/dist/{goal-store-DhuJoUNG.d.ts → goal-store-CcJBd-g1.d.ts} +1 -1
- package/dist/hq/index.d.ts +93 -6
- package/dist/hq/index.js +616 -46
- package/dist/hq/index.js.map +1 -1
- package/dist/{index-whDfTANu.d.ts → index-2Lhk5v0o.d.ts} +2 -2
- package/dist/{index-CZQ6Pwbs.d.ts → index-BL7BAx0p.d.ts} +8 -8
- package/dist/{index-W4VJCzHa.d.ts → index-Qo4kTzgw.d.ts} +5 -5
- package/dist/index.d.ts +96 -56
- package/dist/index.js +1938 -349
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +6 -6
- package/dist/infrastructure/index.js +5 -3
- package/dist/infrastructure/index.js.map +1 -1
- package/dist/kernel/index.d.ts +9 -9
- package/dist/kernel/index.js.map +1 -1
- package/dist/{mcp-servers-DJdZiRcv.d.ts → mcp-servers-DS-YUXvF.d.ts} +3 -3
- package/dist/models/index.d.ts +5 -5
- package/dist/models/index.js +28 -5
- package/dist/models/index.js.map +1 -1
- package/dist/{models-registry-C3a-2-Yd.d.ts → models-registry-DP6pGHet.d.ts} +1 -1
- package/dist/{multi-agent-coordinator-CJSpTe5O.d.ts → multi-agent-coordinator-BvbdNQ14.d.ts} +1 -1
- package/dist/{null-fleet-bus-QVshIsDx.d.ts → null-fleet-bus-BxTfXBKo.d.ts} +6 -6
- package/dist/observability/index.d.ts +2 -2
- package/dist/{parallel-eternal-engine-D9y5Pkcc.d.ts → parallel-eternal-engine-Cf-GTegR.d.ts} +9 -9
- package/dist/{path-resolver-CnQ8SIfh.d.ts → path-resolver-DztfnFcv.d.ts} +3 -3
- package/dist/{permission-CvYQNUqZ.d.ts → permission-CC7XFYWG.d.ts} +1 -1
- package/dist/{permission-policy-D5Ss8j4B.d.ts → permission-policy-cYR4RJmw.d.ts} +2 -2
- package/dist/{pipeline-l_zzFRh3.d.ts → pipeline-sNIkhXeB.d.ts} +2 -2
- package/dist/{plan-templates-NtPgyeJA.d.ts → plan-templates-DYiKFmEb.d.ts} +11 -5
- package/dist/{provider-model-resolve-d5poT5y0.d.ts → provider-model-resolve-dYAbTs_i.d.ts} +3 -3
- package/dist/{provider-runner-gkctlQV_.d.ts → provider-runner-Dw8x0F7u.d.ts} +3 -3
- package/dist/{retry-policy-CtFhfwa8.d.ts → retry-policy-BV7nzeAd.d.ts} +1 -1
- package/dist/sdd/index.d.ts +8 -8
- package/dist/sdd/index.js +2 -0
- package/dist/sdd/index.js.map +1 -1
- package/dist/{secret-vault-BLsVmTIK.d.ts → secret-vault-eMBKfheR.d.ts} +9 -1
- package/dist/security/index.d.ts +5 -5
- package/dist/security/index.js +137 -10
- package/dist/security/index.js.map +1 -1
- package/dist/{selector-CXl2_y9W.d.ts → selector-C4ORTOid.d.ts} +1 -1
- package/dist/{session-event-bridge-Ccud20CC.d.ts → session-event-bridge-CeNpUL9w.d.ts} +1 -1
- package/dist/{session-reader-ZeXQmsmE.d.ts → session-reader-BepLSnGL.d.ts} +1 -1
- package/dist/storage/index.d.ts +45 -13
- package/dist/storage/index.js +374 -113
- package/dist/storage/index.js.map +1 -1
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.js +9 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/types/index.d.ts +19 -19
- package/dist/types/index.js +202 -41
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +17 -4
- package/dist/utils/index.js +48 -9
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
package/dist/hq/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { D as DEFAULT_HQ_REDACTION_POLICY, H as HQ_PROTOCOL_VERSION, a as
|
|
3
|
-
import { E as EventBus } from '../brain-
|
|
4
|
-
import { x as HqClientConfig } from '../config-
|
|
1
|
+
import { Z as HqRedactionPolicy, r as HqEventEnvelope, U as HqPublisher, n as HqClientIdentity, aa as HqSocketFactory, G as GlobalMailbox, ah as HqTranscriptEntry } from '../global-mailbox-CQj_C9Dp.js';
|
|
2
|
+
export { D as DEFAULT_HQ_REDACTION_POLICY, H as HQ_PROTOCOL_VERSION, a as HqAgentMessagePayload, b as HqAgentStatusPayload, c as HqAlertMessage, d as HqBrowserEventMessage, e as HqBrowserMessage, f as HqBrowserSnapshotMessage, g as HqClientCapability, h as HqClientCommandAckMessage, i as HqClientCommandPollMessage, j as HqClientEventMessage, k as HqClientHeartbeatPayload, l as HqClientHelloMessage, m as HqClientHelloPayload, o as HqClientKind, p as HqClientMessage, q as HqClientRecord, s as HqEventPayloadResult, t as HqEventType, u as HqFleetEventPayload, v as HqFleetSnapshotPayload, w as HqFleetSummary, x as HqGitSnapshotPayload, y as HqMachineRecord, z as HqMailboxAgentStatus, A as HqMailboxAgentSummary, B as HqMailboxEventAction, C as HqMailboxEventPayload, E as HqMailboxMappingOptions, F as HqMailboxMessageSummary, I as HqMailboxMessageType, J as HqMailboxPriority, K as HqMailboxSnapshotOptions, L as HqMailboxSnapshotPayload, M as HqMailboxSummary, N as HqParseResult, O as HqPathPolicy, P as HqProjectIdentity, Q as HqProjectRecord, R as HqProjectStatus, S as HqProtocolVersion, T as HqPublishEventOptions, V as HqPublisherCommandHandler, W as HqPublisherCommandResult, X as HqPublisherOptions, Y as HqQueuedCommand, _ as HqServerCommandBatchMessage, $ as HqServerMessage, a0 as HqSessionAgentLiveStatus, a1 as HqSessionAgentSummary, a2 as HqSessionEndedPayload, a3 as HqSessionLiveStatus, a4 as HqSessionSnapshotPayload, a5 as HqSessionStartedPayload, a6 as HqSessionStatus, a7 as HqSessionStatusPayload, a8 as HqSessionSummary, a9 as HqSnapshot, ab as HqSocketLike, ac as HqSubagentSummary, ad as HqToolArgsPolicy, ae as HqToolCompletedPayload, af as HqToolStartedPayload, ag as HqTranscriptAppendPayload, ai as HqTranscriptRole, aj as HqUsagePayload, ak as HqWelcomePayload, al as HqWorklistCounts, am as HqWorklistSnapshotPayload, an as HqWorkspaceKind, ao as createHqEventEnvelope, ap as createMailboxEventPayload, aq as createMailboxSnapshotPayload, ar as createMailboxSnapshotPayloadFromMailbox, as as mapMailboxAgentToHqSummary, at as mapMailboxMessageToHqSummary, au as parseHqEventPayload, av as parseHqFrame } from '../global-mailbox-CQj_C9Dp.js';
|
|
3
|
+
import { E as EventBus } from '../brain-CdbbJWi3.js';
|
|
4
|
+
import { x as HqClientConfig } from '../config-D2DGoGSQ.js';
|
|
5
5
|
import '../mailbox-types-Ct2hJq0P.js';
|
|
6
|
-
import '../context-
|
|
6
|
+
import '../context-Dw55zZ_Q.js';
|
|
7
7
|
|
|
8
8
|
interface HqRedactOptions {
|
|
9
9
|
policy?: Partial<HqRedactionPolicy>;
|
|
@@ -201,4 +201,91 @@ declare function watchHqAuthFile(dataDir: string, onChange: (file: HqAuthFile) =
|
|
|
201
201
|
close: () => void;
|
|
202
202
|
};
|
|
203
203
|
|
|
204
|
-
|
|
204
|
+
/**
|
|
205
|
+
* AgentMonitorEventBridge — forwards local agent timeline and status events
|
|
206
|
+
* to the HQ publisher as structured HQ event envelopes, so the HQ browser
|
|
207
|
+
* dashboard sees real-time agent conversation streams.
|
|
208
|
+
*/
|
|
209
|
+
|
|
210
|
+
type HqAgentEventPublisher = (envelope: HqEventEnvelope) => void;
|
|
211
|
+
interface AgentMonitorEventBridgeOptions {
|
|
212
|
+
/** Local EventBus emitting agent.timeline.* and agent.status_changed events. */
|
|
213
|
+
events: EventBus;
|
|
214
|
+
/** Client/project identifiers for HQ envelope authorship. */
|
|
215
|
+
clientId: string;
|
|
216
|
+
projectId: string;
|
|
217
|
+
/**
|
|
218
|
+
* Publish callback — called with each HQ event envelope. Wire this to
|
|
219
|
+
* your HQ publisher's `send()` or queue method when connected.
|
|
220
|
+
* When null (no HQ connection), events are silently dropped.
|
|
221
|
+
*/
|
|
222
|
+
publish?: HqAgentEventPublisher | undefined;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Start forwarding agent monitoring events to HQ. Returns a disposer that
|
|
226
|
+
* unsubscribes all listeners — call on shutdown.
|
|
227
|
+
*/
|
|
228
|
+
declare function startAgentMonitorEventBridge(opts: AgentMonitorEventBridgeOptions): () => void;
|
|
229
|
+
|
|
230
|
+
interface SessionTelemetryBridgeOptions {
|
|
231
|
+
publisher: HqPublisher;
|
|
232
|
+
/** Local bus carrying `session.agents_updated`. When omitted, snapshots
|
|
233
|
+
* still publish (with empty/last-known agents) and the transcript still
|
|
234
|
+
* streams from disk. */
|
|
235
|
+
events?: EventBus | undefined;
|
|
236
|
+
sessionId: string;
|
|
237
|
+
projectRoot: string;
|
|
238
|
+
projectName?: string | undefined;
|
|
239
|
+
/** Override the global root used to resolve the session JSONL path. */
|
|
240
|
+
globalRoot?: string | undefined;
|
|
241
|
+
gitBranch?: string | undefined;
|
|
242
|
+
startedAt?: string | undefined;
|
|
243
|
+
/** Snapshot republish interval (also refreshes lastActivity). Default 2500ms. */
|
|
244
|
+
snapshotIntervalMs?: number | undefined;
|
|
245
|
+
/** Transcript tail poll interval. Default 1200ms. */
|
|
246
|
+
transcriptIntervalMs?: number | undefined;
|
|
247
|
+
now?: (() => string) | undefined;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Start streaming this surface's session telemetry to HQ. Returns a disposer
|
|
251
|
+
* that stops both streams and publishes a final `session.ended`.
|
|
252
|
+
*/
|
|
253
|
+
declare function startSessionTelemetryBridge(opts: SessionTelemetryBridgeOptions): () => void;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Transcript mapper — converts raw session JSONL events into the canonical
|
|
257
|
+
* {@link HqTranscriptEntry} shape used by HQ for full chat-history rendering.
|
|
258
|
+
*
|
|
259
|
+
* On-disk reality (see `types/session.ts` + `core/agent-tools.ts`):
|
|
260
|
+
* - A tool CALL (with its arguments) is NOT a standalone event — it is a
|
|
261
|
+
* `tool_use` content block inside the assistant's `llm_response`.
|
|
262
|
+
* - The tool RESULT is a separate `tool_result` event carrying the matching
|
|
263
|
+
* `id`.
|
|
264
|
+
* So we extract each `tool_use` block as a tool entry (args) at the assistant's
|
|
265
|
+
* position, then merge the later `tool_result` (matched by `id`) INTO that same
|
|
266
|
+
* entry — giving one box per tool (args + result) in strict chronological order.
|
|
267
|
+
*
|
|
268
|
+
* @module hq/transcript-mapper
|
|
269
|
+
*/
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Map a single raw JSONL session event to zero or more transcript entries.
|
|
273
|
+
* An `llm_response` can yield an assistant text entry PLUS one tool entry per
|
|
274
|
+
* embedded `tool_use` block.
|
|
275
|
+
*/
|
|
276
|
+
declare function mapSessionEventToEntries(ev: Record<string, unknown>): HqTranscriptEntry[];
|
|
277
|
+
/**
|
|
278
|
+
* Merge each tool result into its matching args entry (by `toolUseId`),
|
|
279
|
+
* keeping the args entry's chronological position. Results with no matching
|
|
280
|
+
* args entry are kept as their own entries. Mutates/keeps order; pure w.r.t.
|
|
281
|
+
* input ordering.
|
|
282
|
+
*/
|
|
283
|
+
declare function mergeToolResults(flat: readonly HqTranscriptEntry[]): HqTranscriptEntry[];
|
|
284
|
+
/**
|
|
285
|
+
* Map + merge an array of raw JSONL events into the final transcript-entry
|
|
286
|
+
* list: strict chronological order, with each tool's args and result combined
|
|
287
|
+
* into a single entry.
|
|
288
|
+
*/
|
|
289
|
+
declare function buildTranscriptFromEvents(events: Iterable<Record<string, unknown>>): HqTranscriptEntry[];
|
|
290
|
+
|
|
291
|
+
export { type AgentMonitorEventBridgeOptions, type CreateGlobalMailboxOptions, type CreateHqPublisherOptions, type EnsureHqFirstRunAuthResult, HQ_AUTH_FILE_VERSION, type HqAgentEventPublisher, type HqAuthFile, type HqBrowserToken, HqClientIdentity, HqEventEnvelope, HqPublisher, type HqPublisherEnvConfig, type HqRedactOptions, HqRedactionPolicy, type HqRedactionResult, type HqRuntimeFile, HqSocketFactory, type HqToken, HqTranscriptEntry, type SessionTelemetryBridgeOptions, buildTranscriptFromEvents, createGlobalMailbox, createHqPublisherFromEnv, defaultHqDataDir, emptyHqAuthFile, ensureHqFirstRunAuthFile, hqAuthFilePath, hqRuntimeFilePath, mapSessionEventToEntries, mergeToolResults, mintHqBrowserToken, mintHqToken, mutateHqAuthFile, readHqAuthFile, readHqRuntimeFileSync, redactHqEvent, redactHqValue, resolveHqConfig, resolveHqConfigFromEnv, resolveHqDataDir, scrubAndTruncateHqPreview, startAgentMonitorEventBridge, startSessionTelemetryBridge, summarizeHqToolArgs, watchHqAuthFile, writeHqAuthFile, writeHqRuntimeFile };
|