@wrongstack/core 0.2.0 → 0.3.1

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 (53) hide show
  1. package/dist/{agent-bridge-DmBiCipY.d.ts → agent-bridge-C3DUGjSb.d.ts} +1 -1
  2. package/dist/{compactor-DSl2FK7a.d.ts → compactor-BUU6Zm_3.d.ts} +1 -1
  3. package/dist/{config-DXrqb41m.d.ts → config-CKLYPkCi.d.ts} +1 -1
  4. package/dist/{context-u0bryklF.d.ts → context-IovtuTf8.d.ts} +2 -0
  5. package/dist/coordination/index.d.ts +11 -11
  6. package/dist/coordination/index.js +24 -1
  7. package/dist/coordination/index.js.map +1 -1
  8. package/dist/defaults/index.d.ts +30 -15
  9. package/dist/defaults/index.js +321 -2
  10. package/dist/defaults/index.js.map +1 -1
  11. package/dist/{events-B6Q03pTu.d.ts → events-CNB9PALO.d.ts} +27 -1
  12. package/dist/execution/index.d.ts +12 -12
  13. package/dist/extension/index.d.ts +9 -0
  14. package/dist/extension/index.js +234 -0
  15. package/dist/extension/index.js.map +1 -0
  16. package/dist/{plugin-CoYYZKdn.d.ts → index-BDb0cAMP.d.ts} +370 -11
  17. package/dist/index.d.ts +75 -25
  18. package/dist/index.js +1864 -1347
  19. package/dist/index.js.map +1 -1
  20. package/dist/infrastructure/index.d.ts +6 -6
  21. package/dist/kernel/index.d.ts +12 -9
  22. package/dist/kernel/index.js +73 -7
  23. package/dist/kernel/index.js.map +1 -1
  24. package/dist/{mcp-servers-BA1Ofmfj.d.ts → mcp-servers-DR35ojJZ.d.ts} +3 -3
  25. package/dist/models/index.d.ts +2 -2
  26. package/dist/models/index.js +24 -1
  27. package/dist/models/index.js.map +1 -1
  28. package/dist/{multi-agent-BDfkxL5C.d.ts → multi-agent-B9a6sflH.d.ts} +2 -2
  29. package/dist/observability/index.d.ts +2 -2
  30. package/dist/{path-resolver-Crkt8wTQ.d.ts → path-resolver-Cl_q0u-R.d.ts} +2 -2
  31. package/dist/provider-runner-BXuADQqQ.d.ts +36 -0
  32. package/dist/sdd/index.d.ts +3 -3
  33. package/dist/{secret-scrubber-3TLUkiCV.d.ts → secret-scrubber-CgG2tV2B.d.ts} +1 -1
  34. package/dist/{secret-scrubber-CwYliRWd.d.ts → secret-scrubber-Cuy5afaQ.d.ts} +1 -1
  35. package/dist/security/index.d.ts +3 -3
  36. package/dist/security/index.js +24 -1
  37. package/dist/security/index.js.map +1 -1
  38. package/dist/{selector-BRqzvugb.d.ts → selector-wT2fv9Fg.d.ts} +1 -1
  39. package/dist/{session-reader-C3x96CDR.d.ts → session-reader-CcPi4BQ8.d.ts} +1 -1
  40. package/dist/{skill-Bx8jxznf.d.ts → skill-C_7znCIC.d.ts} +2 -2
  41. package/dist/storage/index.d.ts +5 -5
  42. package/dist/storage/index.js +24 -1
  43. package/dist/storage/index.js.map +1 -1
  44. package/dist/{renderer-0A2ZEtca.d.ts → system-prompt-Dk1qm8ey.d.ts} +30 -2
  45. package/dist/{tool-executor-CYdZdtno.d.ts → tool-executor-DKu4A6nB.d.ts} +5 -5
  46. package/dist/types/index.d.ts +16 -16
  47. package/dist/types/index.js +24 -1
  48. package/dist/types/index.js.map +1 -1
  49. package/dist/utils/index.d.ts +1 -1
  50. package/dist/utils/index.js +24 -1
  51. package/dist/utils/index.js.map +1 -1
  52. package/package.json +5 -1
  53. package/dist/system-prompt-CG9jU5-5.d.ts +0 -31
@@ -1,4 +1,4 @@
1
- import { p as BridgeTransport, q as BridgeMessage, A as AgentBridge, r as AgentBridgeConfig } from './multi-agent-BDfkxL5C.js';
1
+ import { B as BridgeTransport, l as BridgeMessage, A as AgentBridge, m as AgentBridgeConfig } from './multi-agent-B9a6sflH.js';
2
2
 
3
3
  /**
4
4
  * In-memory pub/sub transport for agent-to-agent messaging.
@@ -1,4 +1,4 @@
1
- import { a0 as Context } from './context-u0bryklF.js';
1
+ import { a0 as Context } from './context-IovtuTf8.js';
2
2
 
3
3
  interface CompactReport {
4
4
  before: number;
@@ -1,5 +1,5 @@
1
1
  import { W as WireFamily } from './models-registry-Y2xbog0E.js';
2
- import { P as Permission } from './context-u0bryklF.js';
2
+ import { P as Permission } from './context-IovtuTf8.js';
3
3
 
4
4
  interface ContextConfig {
5
5
  warnThreshold: number;
@@ -238,6 +238,8 @@ interface Tool<I = unknown, O = unknown> {
238
238
  name: string;
239
239
  description: string;
240
240
  usageHint?: string;
241
+ /** Optional category for grouping in help lists and system prompts. */
242
+ category?: string;
241
243
  inputSchema: JSONSchema;
242
244
  permission: Permission;
243
245
  mutating: boolean;
@@ -1,17 +1,17 @@
1
- import { M as MultiAgentConfig, m as SubagentRunner, g as SubagentConfig, o as TaskSpec, n as TaskResult, d as CoordinatorStatus, e as MultiAgentCoordinator, f as SpawnResult, q as BridgeMessage, A as AgentBridge } from '../multi-agent-BDfkxL5C.js';
2
- export { B as BudgetExceededError, a as BudgetKind, b as BudgetLimits, c as BudgetUsage, S as SubagentBudget } from '../multi-agent-BDfkxL5C.js';
3
- import { q as SessionWriter, u as Tool, o as SessionStore } from '../context-u0bryklF.js';
4
- import { I as InMemoryAgentBridge } from '../agent-bridge-DmBiCipY.js';
5
- export { a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-DmBiCipY.js';
6
- import { E as EventBus } from '../events-B6Q03pTu.js';
1
+ import { M as MultiAgentConfig, i as SubagentRunner, c as SubagentConfig, k as TaskSpec, j as TaskResult, a as CoordinatorStatus, b as MultiAgentCoordinator, S as SpawnResult, l as BridgeMessage, A as AgentBridge } from '../multi-agent-B9a6sflH.js';
2
+ export { n as BudgetExceededError, o as BudgetKind, p as BudgetLimits, q as BudgetUsage, r as SubagentBudget } from '../multi-agent-B9a6sflH.js';
3
+ import { q as SessionWriter, u as Tool, o as SessionStore } from '../context-IovtuTf8.js';
4
+ import { I as InMemoryAgentBridge } from '../agent-bridge-C3DUGjSb.js';
5
+ export { a as InMemoryBridgeTransport, c as createMessage } from '../agent-bridge-C3DUGjSb.js';
6
+ import { E as EventBus } from '../events-CNB9PALO.js';
7
7
  import { EventEmitter } from 'node:events';
8
- import { A as Agent, n as AgentInput } from '../plugin-CoYYZKdn.js';
8
+ import { r as Agent, u as AgentInput } from '../index-BDb0cAMP.js';
9
+ import '../logger-BMQgxvdy.js';
10
+ import '../system-prompt-Dk1qm8ey.js';
9
11
  import '../observability-BhnVLBLS.js';
10
- import '../renderer-0A2ZEtca.js';
11
- import '../secret-scrubber-3TLUkiCV.js';
12
- import '../config-DXrqb41m.js';
12
+ import '../secret-scrubber-CgG2tV2B.js';
13
+ import '../config-CKLYPkCi.js';
13
14
  import '../models-registry-Y2xbog0E.js';
14
- import '../logger-BMQgxvdy.js';
15
15
 
16
16
  /**
17
17
  * Single fleet-wide event with subagent attribution. Whatever a child
@@ -33,7 +33,7 @@ async function atomicWrite(targetPath, content, opts = {}) {
33
33
  if (mode !== void 0) {
34
34
  await fsp4.chmod(tmp, mode);
35
35
  }
36
- await fsp4.rename(tmp, targetPath);
36
+ await renameWithRetry(tmp, targetPath);
37
37
  } catch (err) {
38
38
  try {
39
39
  await fsp4.unlink(tmp);
@@ -45,6 +45,29 @@ async function atomicWrite(targetPath, content, opts = {}) {
45
45
  async function ensureDir(dir) {
46
46
  await fsp4.mkdir(dir, { recursive: true });
47
47
  }
48
+ var TRANSIENT_RENAME_CODES = /* @__PURE__ */ new Set(["EPERM", "EBUSY", "EACCES", "ENOTEMPTY"]);
49
+ async function renameWithRetry(from, to) {
50
+ if (process.platform !== "win32") {
51
+ await fsp4.rename(from, to);
52
+ return;
53
+ }
54
+ const delays = [10, 25, 60, 120, 250];
55
+ let lastErr;
56
+ for (let i = 0; i <= delays.length; i++) {
57
+ try {
58
+ await fsp4.rename(from, to);
59
+ return;
60
+ } catch (err) {
61
+ lastErr = err;
62
+ const code = err?.code;
63
+ if (!code || !TRANSIENT_RENAME_CODES.has(code) || i === delays.length) {
64
+ throw err;
65
+ }
66
+ await new Promise((resolve) => setTimeout(resolve, delays[i]));
67
+ }
68
+ }
69
+ throw lastErr;
70
+ }
48
71
 
49
72
  // src/storage/director-state.ts
50
73
  var DirectorStateCheckpoint = class {