@wrongstack/core 0.302.0 → 0.303.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/README.md +1 -1
- package/dist/agent-status-tracker.d.ts +6 -2
- package/dist/chronicle/index.js +1949 -1671
- package/dist/chronicle/metrics-store.d.ts +14 -0
- package/dist/chronicle/project-server-protocol.d.ts +13 -0
- package/dist/chronicle/project-server.js +1756 -1573
- package/dist/chronicle/rollup-adapter.d.ts +2 -0
- package/dist/chronicle/sqlite-journal.d.ts +59 -0
- package/dist/coordination/agents/index.js +4313 -3516
- package/dist/coordination/agents/project-agent-auto-optimize.d.ts +116 -0
- package/dist/coordination/agents/project-agent-capture-window.d.ts +29 -0
- package/dist/coordination/agents/project-agent-config-io.d.ts +11 -0
- package/dist/coordination/agents/project-agent-consolidation.d.ts +29 -2
- package/dist/coordination/agents/project-agent-files.d.ts +12 -3
- package/dist/coordination/agents/project-agent-identity-types.d.ts +4 -0
- package/dist/coordination/agents/project-agent-identity.d.ts +22 -9
- package/dist/coordination/agents/project-agent-learning-entries.d.ts +8 -2
- package/dist/coordination/agents/project-agent-learning-structured.d.ts +27 -1
- package/dist/coordination/agents/project-agent-optimizer.d.ts +49 -0
- package/dist/coordination/agents/project-agent-skill-layer.d.ts +101 -0
- package/dist/coordination/agents/role-skills.d.ts +11 -1
- package/dist/coordination/index.d.ts +1 -1
- package/dist/coordination/index.js +4927 -3589
- package/dist/coordination/mail-tools.d.ts +3 -3
- package/dist/core/context.d.ts +4 -0
- package/dist/core/continue-intent.d.ts +2 -0
- package/dist/core/conversation-state.d.ts +5 -0
- package/dist/core/index.js +129 -19
- package/dist/defaults/index.js +1620 -768
- package/dist/execution/index.js +2941 -2630
- package/dist/goal/index.js +7 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +12269 -9212
- package/dist/infrastructure/index.js +722 -672
- package/dist/kernel/events/agent-events.d.ts +28 -0
- package/dist/kernel/events/memory-events.d.ts +62 -0
- package/dist/plugin/index.js +2167 -1986
- package/dist/security/index.js +69 -3
- package/dist/security/kanban-boundary.d.ts +5 -1
- package/dist/session-catalog/client.d.ts +62 -0
- package/dist/session-catalog/endpoint.d.ts +6 -0
- package/dist/session-catalog/index.d.ts +6 -0
- package/dist/session-catalog/index.js +2000 -0
- package/dist/session-catalog/project-server.d.ts +3 -0
- package/dist/session-catalog/project-server.js +1861 -0
- package/dist/session-catalog/protocol.d.ts +284 -0
- package/dist/session-catalog/registry.d.ts +59 -0
- package/dist/session-catalog/store.d.ts +71 -0
- package/dist/storage/index.d.ts +42 -38
- package/dist/storage/index.js +13896 -12931
- package/dist/storage/plan-store.d.ts +1 -1
- package/dist/storage/session-event-bridge.d.ts +2 -2
- package/dist/storage/session-store.d.ts +6 -0
- package/dist/tasking/index.js +5 -0
- package/dist/tools/index.js +2832 -2606
- package/dist/types/config/root.d.ts +11 -1
- package/dist/types/config/skills-fleet-brain.d.ts +34 -0
- package/dist/types/config/ui.d.ts +14 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/context-evidence.d.ts +2 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +20 -0
- package/dist/types/messages.d.ts +8 -0
- package/dist/types/multi-agent.d.ts +7 -0
- package/dist/types/session.d.ts +19 -0
- package/dist/types/task-graph.d.ts +2 -0
- package/dist/types/tool-executor.d.ts +2 -0
- package/dist/utils/context-evidence.d.ts +13 -1
- package/dist/utils/index.js +29 -2
- package/instructions/system-lite.md +23 -8
- package/instructions/system-pro.md +29 -9
- package/instructions/system.md +29 -9
- package/package.json +7 -3
- package/skills/wrongstack-kanban/SKILL.md +39 -8
|
@@ -139,6 +139,34 @@ export interface AgentEventMap {
|
|
|
139
139
|
*/
|
|
140
140
|
transcriptPath?: string | undefined;
|
|
141
141
|
};
|
|
142
|
+
/**
|
|
143
|
+
* A spawn resolved fewer skills than it selected. Emitted so a skill that
|
|
144
|
+
* silently failed to load — missing from the loader, gated by a capability
|
|
145
|
+
* the subagent lacks, or cut by the prompt budget — is observable instead of
|
|
146
|
+
* leaving the agent believing it received guidance it never got.
|
|
147
|
+
*/
|
|
148
|
+
'subagent.skills.dropped': {
|
|
149
|
+
sessionId?: string | undefined;
|
|
150
|
+
role?: string | undefined;
|
|
151
|
+
/** Skills whose body (and project addendum) reached the prompt. */
|
|
152
|
+
selected: string[];
|
|
153
|
+
/** skill → reason it was dropped. */
|
|
154
|
+
dropped: Record<string, string>;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* A background learning-distillation pass finished for a roster role.
|
|
158
|
+
* Emitted by the fleet host's auto-optimize scheduler so surfaces can show
|
|
159
|
+
* that an agent's skills were refined without a user action.
|
|
160
|
+
*/
|
|
161
|
+
'agent.learning.optimized': {
|
|
162
|
+
sessionId?: string | undefined;
|
|
163
|
+
role: string;
|
|
164
|
+
trigger: string;
|
|
165
|
+
status: string;
|
|
166
|
+
/** Skill addenda refreshed by the pass. */
|
|
167
|
+
skills: string[];
|
|
168
|
+
error?: string | undefined;
|
|
169
|
+
};
|
|
142
170
|
'subagent.task_started': {
|
|
143
171
|
/** Parent/host session id. */
|
|
144
172
|
sessionId?: string | undefined;
|
|
@@ -29,6 +29,31 @@ export interface MemoryInjectorTraceMemory {
|
|
|
29
29
|
value: number;
|
|
30
30
|
}>;
|
|
31
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Per-memory rejection evidence emitted inside `memory.injector_run.rejectedDetail`.
|
|
34
|
+
*
|
|
35
|
+
* `gate` is one of the keys of the `rejected` integer map; `reason` is the
|
|
36
|
+
* same one-line rationale the SAGE injector attaches to `activated[].activationReasons`,
|
|
37
|
+
* so triage and Chronicle do not need to re-derive it. `relationStrength`
|
|
38
|
+
* and `score` are populated for the gates that compute them (`belowScore`,
|
|
39
|
+
* `budget`); other gates omit them.
|
|
40
|
+
*
|
|
41
|
+
* Structural on purpose: defined here (core) rather than in `@wrongstack/sage`
|
|
42
|
+
* because `MemoryEventMap` is structural and core must not depend on sage.
|
|
43
|
+
*/
|
|
44
|
+
export interface RejectedMemoryTraceEntry {
|
|
45
|
+
id: string;
|
|
46
|
+
kind: string;
|
|
47
|
+
gate: 'duplicate' | 'belowScore' | 'alreadyVisible' | 'cooldown' | 'budget';
|
|
48
|
+
/** Bounded to 200 chars at the emitter. */
|
|
49
|
+
reason: string;
|
|
50
|
+
/** Present when gate === 'belowScore' | 'budget'. */
|
|
51
|
+
relationStrength?: number | undefined;
|
|
52
|
+
/** Present when gate === 'belowScore' | 'budget'. */
|
|
53
|
+
score?: number | undefined;
|
|
54
|
+
/** ISO timestamp of the run. */
|
|
55
|
+
at: string;
|
|
56
|
+
}
|
|
32
57
|
export interface MemoryEventMap {
|
|
33
58
|
/** Cache hit on session store load — used by observability layers. */
|
|
34
59
|
'storage.cache_hit': {
|
|
@@ -229,6 +254,22 @@ export interface MemoryEventMap {
|
|
|
229
254
|
cooldown: number;
|
|
230
255
|
budget: number;
|
|
231
256
|
};
|
|
257
|
+
/**
|
|
258
|
+
* Per-memory rejection evidence. The `rejected` integer map above is
|
|
259
|
+
* preserved for cheap aggregation; `rejectedDetail` lets downstream
|
|
260
|
+
* consumers (triage, Chronicle, observability surfaces) reason about
|
|
261
|
+
* *which* memories were almost injected and *which* gate rejected them.
|
|
262
|
+
*
|
|
263
|
+
* Capped at 20 entries by the SAGE injector with FIFO eviction;
|
|
264
|
+
* `rejectedDetailTotal` carries the pre-cap count when truncated.
|
|
265
|
+
* Full history lives in the Chronicle journal.
|
|
266
|
+
*/
|
|
267
|
+
rejectedDetail: Array<RejectedMemoryTraceEntry>;
|
|
268
|
+
/**
|
|
269
|
+
* Pre-cap size of `rejectedDetail` when truncation happened. Undefined
|
|
270
|
+
* when `rejectedDetail.length === rejectedDetailTotal` (no truncation).
|
|
271
|
+
*/
|
|
272
|
+
rejectedDetailTotal?: number | undefined;
|
|
232
273
|
activated: MemoryInjectorTraceMemory[];
|
|
233
274
|
injected: MemoryInjectorTraceMemory[];
|
|
234
275
|
injectedChars: number;
|
|
@@ -236,6 +277,27 @@ export interface MemoryEventMap {
|
|
|
236
277
|
sessionId?: string | undefined;
|
|
237
278
|
traceId?: string | undefined;
|
|
238
279
|
};
|
|
280
|
+
/**
|
|
281
|
+
* Threshold-crossed rejection-burst signal. Emitted when a memory is
|
|
282
|
+
* rejected by `belowScore` >= 3 times within a 5-minute rolling window.
|
|
283
|
+
*
|
|
284
|
+
* The threshold and window are SAGE-side; the shape is structural here.
|
|
285
|
+
* Triage reads this to fold fresh per-memory evidence into
|
|
286
|
+
* `computeValueScore` without scanning the entire chronicle.
|
|
287
|
+
*
|
|
288
|
+
* Volume is bounded by the threshold — at most one event per memory
|
|
289
|
+
* per window.
|
|
290
|
+
*/
|
|
291
|
+
'memory.injector_rejection_burst': {
|
|
292
|
+
memoryId: string;
|
|
293
|
+
gate: 'belowScore';
|
|
294
|
+
windowMs: number;
|
|
295
|
+
count: number;
|
|
296
|
+
reason: string;
|
|
297
|
+
at: string;
|
|
298
|
+
sessionId?: string | undefined;
|
|
299
|
+
traceId?: string | undefined;
|
|
300
|
+
};
|
|
239
301
|
'memory.used': {
|
|
240
302
|
memoryIds: string[];
|
|
241
303
|
source: string;
|