@wrongstack/core 0.283.0 → 0.284.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 (79) hide show
  1. package/dist/{compactor-BxddyCFu.d.ts → compactor-DQLL4HTo.d.ts} +1 -1
  2. package/dist/{config-DkCbA3Bw.d.ts → config-MRqn1V-u.d.ts} +130 -22
  3. package/dist/coordination/index.d.ts +43 -20
  4. package/dist/coordination/index.js +1744 -912
  5. package/dist/coordination/index.js.map +1 -1
  6. package/dist/{default-config-Buho8yge.d.ts → default-config-B79_gJYv.d.ts} +7 -0
  7. package/dist/defaults/index.d.ts +25 -29
  8. package/dist/defaults/index.js +2546 -7396
  9. package/dist/defaults/index.js.map +1 -1
  10. package/dist/{director-state-B_GPa78Q.d.ts → director-state-CMS_bMs4.d.ts} +2 -0
  11. package/dist/{events-KmxSmvho.d.ts → events-Bgnh43r9.d.ts} +27 -10
  12. package/dist/execution/index.d.ts +15 -16
  13. package/dist/execution/index.js +534 -140
  14. package/dist/execution/index.js.map +1 -1
  15. package/dist/execution/prompt-enhancer.d.ts +1 -1
  16. package/dist/extension/index.d.ts +6 -6
  17. package/dist/{global-mailbox-rWVt8YlO.d.ts → global-mailbox-sZwyI6CS.d.ts} +13 -2
  18. package/dist/{goal-store-8owBXJT2.d.ts → goal-store-Datpp-ar.d.ts} +1 -1
  19. package/dist/hq/index.d.ts +35 -9
  20. package/dist/hq/index.js +80 -7
  21. package/dist/hq/index.js.map +1 -1
  22. package/dist/{index-BhCteHAF.d.ts → index--Gm41aBJ.d.ts} +26 -11
  23. package/dist/{index-BEFWNZYs.d.ts → index-CbyuOE5y.d.ts} +5 -1
  24. package/dist/index.d.ts +52 -1017
  25. package/dist/index.js +21053 -27778
  26. package/dist/index.js.map +1 -1
  27. package/dist/infrastructure/index.d.ts +9 -7
  28. package/dist/infrastructure/index.js +7 -2
  29. package/dist/infrastructure/index.js.map +1 -1
  30. package/dist/kernel/index.d.ts +11 -11
  31. package/dist/kernel/index.js.map +1 -1
  32. package/dist/{mcp-servers-BUx9A_AQ.d.ts → mcp-servers-DEV4s6Ks.d.ts} +3 -3
  33. package/dist/models/index.d.ts +4 -4
  34. package/dist/models/index.js +18 -3
  35. package/dist/models/index.js.map +1 -1
  36. package/dist/{agent-subagent-runner-BsuWhB28.d.ts → multi-agent-coordinator-4RCRZKjN.d.ts} +417 -9
  37. package/dist/{null-fleet-bus-D4e9R7Qc.d.ts → null-fleet-bus-CFoNVQEK.d.ts} +53 -12
  38. package/dist/observability/index.d.ts +3 -3
  39. package/dist/{parallel-eternal-engine-iY2uxocj.d.ts → parallel-eternal-engine-HUrtePLd.d.ts} +4 -5
  40. package/dist/{permission-B6YAtNFz.d.ts → permission-ByDKXEcG.d.ts} +1 -1
  41. package/dist/{pipeline-ixSFe5jg.d.ts → pipeline-DGDyIohT.d.ts} +28 -7
  42. package/dist/{provider-model-resolve-DIxKL_T-.d.ts → provider-model-resolve-o2hHLs79.d.ts} +3 -3
  43. package/dist/{provider-runner-oQhDaZmH.d.ts → provider-runner-ChL-kVg6.d.ts} +3 -3
  44. package/dist/{retry-policy-V67lBOJz.d.ts → retry-policy-CQ7KwXJa.d.ts} +2 -2
  45. package/dist/{secret-vault-D7jeyXUQ.d.ts → secret-vault-DxohkUBc.d.ts} +3 -2
  46. package/dist/security/index.d.ts +4 -4
  47. package/dist/security/index.js +232 -2
  48. package/dist/security/index.js.map +1 -1
  49. package/dist/{selector-Bx2HgUkU.d.ts → selector-D8O6B_Rm.d.ts} +1 -1
  50. package/dist/{session-event-bridge-Bkp7ORfc.d.ts → session-event-bridge-D_z_mBwk.d.ts} +3 -3
  51. package/dist/{session-reader-B-Fi9L6I.d.ts → session-reader-7Esxrkpw.d.ts} +1 -1
  52. package/dist/storage/index.d.ts +77 -39
  53. package/dist/storage/index.js +1223 -288
  54. package/dist/storage/index.js.map +1 -1
  55. package/dist/tasking/index.d.ts +124 -0
  56. package/dist/tasking/index.js +492 -0
  57. package/dist/tasking/index.js.map +1 -0
  58. package/dist/{todos-checkpoint-BwCrj4Cb.d.ts → todos-checkpoint-FY7PjmMx.d.ts} +13 -4
  59. package/dist/{tool-LVSLiE1s.d.ts → tool-BNlnIJvo.d.ts} +216 -17
  60. package/dist/{tool-executor-kElSEgO0.d.ts → tool-executor-CckSCM5E.d.ts} +12 -15
  61. package/dist/tools/index.d.ts +2 -2
  62. package/dist/tools/index.js.map +1 -1
  63. package/dist/types/index.d.ts +94 -19
  64. package/dist/types/index.js +76 -12
  65. package/dist/types/index.js.map +1 -1
  66. package/dist/utils/index.d.ts +44 -10
  67. package/dist/utils/index.js +106 -17
  68. package/dist/utils/index.js.map +1 -1
  69. package/dist/{worktree-manager-BjyAW30D.d.ts → worktree-manager-DzwxKE35.d.ts} +1 -1
  70. package/instructions/coordination/subagent-baseline.md +5 -0
  71. package/instructions/llm/autonomy-brain.md +3 -2
  72. package/instructions/system.md +4 -0
  73. package/package.json +10 -3
  74. package/skills/mailbox-bridge/SKILL.md +33 -0
  75. package/dist/multi-agent-coordinator-CrjeTB9i.d.ts +0 -357
  76. package/dist/sdd/index.d.ts +0 -1993
  77. package/dist/sdd/index.js +0 -9500
  78. package/dist/sdd/index.js.map +0 -1
  79. package/dist/spec-TBi3Jr6T.d.ts +0 -78
@@ -1,10 +1,10 @@
1
- import { s as TextBlock, g as Tool, z as ToolUseBlock, d as Context, A as ToolResultBlock, n as RiskTier, c as Request, e as Response, P as Provider, i as ContentBlock, aq as WrongStackError } from './tool-LVSLiE1s.js';
1
+ import { s as TextBlock, g as Tool, B as ToolUseBlock, d as Context, D as ToolResultBlock, n as RiskTier, c as Request, e as Response, P as Provider, i as ContentBlock, ay as WrongStackError } from './tool-BNlnIJvo.js';
2
2
  import { L as Logger } from './logger-B63L5bTg.js';
3
- import { B as BuildContext, H as HookRegistry, a as Renderer, P as Pipeline, C as Container } from './pipeline-ixSFe5jg.js';
4
- import { a as PermissionDecision, P as PermissionPolicy } from './permission-B6YAtNFz.js';
5
- import { a3 as ToolDescriptionMode, a4 as ToolDescriptionModeConfig, H as HookEvent, a5 as ToolResultRenderModeConfig, W as WireFamily, P as ProviderConfig } from './config-DkCbA3Bw.js';
3
+ import { B as BuildContext, H as HookRegistry, a as Renderer, P as Pipeline, C as Container } from './pipeline-DGDyIohT.js';
4
+ import { a as PermissionDecision, P as PermissionPolicy } from './permission-ByDKXEcG.js';
5
+ import { ac as ToolDescriptionMode, ad as ToolDescriptionModeConfig, H as HookEvent, ae as ToolResultRenderModeConfig, W as WireFamily, P as ProviderConfig, $ as LoopDetectionConfig } from './config-MRqn1V-u.js';
6
6
  import { T as Tracer } from './observability-D-HZN_mF.js';
7
- import { E as EventBus } from './events-KmxSmvho.js';
7
+ import { E as EventBus } from './events-Bgnh43r9.js';
8
8
  import { S as SecretScrubber } from './secret-scrubber-3MHDDAtm.js';
9
9
 
10
10
  /**
@@ -180,17 +180,20 @@ declare class ToolRegistry {
180
180
  /** Minimal run-state the runner reads. `Context` structurally satisfies it. */
181
181
  interface HookRunEnv {
182
182
  cwd: string;
183
+ signal?: AbortSignal | undefined;
183
184
  }
184
185
  interface HookRunnerOptions {
185
186
  registry: HookRegistry;
186
187
  logger?: Logger | undefined;
187
188
  /**
188
- * When false, shell hooks are skipped entirely (in-process hooks still run).
189
- * Set by the boot path under `--bare` / `--no-hooks` / untrusted sessions.
189
+ * When false, ordinary hooks are skipped across every transport;
190
+ * `policy: true` enforcement hooks still run.
190
191
  */
192
+ allowNonPolicy?: boolean | undefined;
193
+ /** @deprecated Use `allowNonPolicy`; retained for API compatibility. */
191
194
  allowShell?: boolean | undefined;
192
195
  /** Resolves the active session id for the `HookInput` payload. */
193
- sessionId?: ((() => string)) | undefined;
196
+ sessionId?: (() => string) | undefined;
194
197
  }
195
198
  interface PreToolUseResult {
196
199
  block?: boolean | undefined;
@@ -206,8 +209,8 @@ interface PromptResult {
206
209
  /**
207
210
  * Drives the registered hooks at each lifecycle phase. Pure orchestration —
208
211
  * the executor / pipeline / agent extension call the matching method and act on
209
- * the returned decision. Hook failures are caught and logged; they never abort
210
- * the agent.
212
+ * the returned decision. Fail-open hooks are skipped on failure; fail-closed
213
+ * policy hooks turn failures into explicit denials without prompting the user.
211
214
  */
212
215
  declare class HookRunner {
213
216
  private readonly opts;
@@ -231,6 +234,8 @@ declare class HookRunner {
231
234
  private base;
232
235
  private matching;
233
236
  private invoke;
237
+ private invokeInProcess;
238
+ private failureOutcome;
234
239
  private collectContext;
235
240
  }
236
241
 
@@ -630,6 +635,16 @@ interface AgentInit {
630
635
  tracer?: Tracer | undefined;
631
636
  extensions?: ExtensionRegistry | undefined;
632
637
  toolExecutor: ToolExecutorLike;
638
+ /** Loop-detector tuning (`tools.loopDetection`). Omitted fields use defaults. */
639
+ loopDetection?: LoopDetectionConfig | undefined;
640
+ }
641
+ /** Fully-resolved loop-detector settings (defaults applied, bounds clamped). */
642
+ interface ResolvedLoopDetectionConfig {
643
+ mode: 'steer-then-cut' | 'cut' | 'off';
644
+ steerThreshold: number;
645
+ cutThreshold: number;
646
+ windowSize: number;
647
+ callRepeatThreshold: number;
633
648
  }
634
649
  interface AgentPipelines {
635
650
  request: Pipeline<Request>;
@@ -653,4 +668,4 @@ interface ToolCallPipelinePayload {
653
668
  }
654
669
  declare function createDefaultPipelines(): AgentPipelines;
655
670
 
656
- export { type AgentPipelines as A, type BeforeIterationHook as B, DEFAULT_MAX_ITERATIONS as D, ExtensionRegistry as E, type HookRunEnv as H, type OnErrorHook as O, ProviderRegistry as P, type RunResult as R, type SystemPromptContributor as S, type ToolCallPipelinePayload as T, type UserInputPayload as U, type ToolWrapper as a, ToolRegistry as b, type ToolExecutorLike as c, type AgentInit as d, type AgentInput as e, type ToolExecutorOptions as f, type ToolExecutorStrategy as g, type ToolBatchResult as h, type AgentExtension as i, type AfterIterationHook as j, type AfterRunHook as k, type AfterToolExecutionHook as l, type BeforeRunHook as m, type BeforeToolExecutionHook as n, HookRunner as o, type HookRunnerOptions as p, type PreToolUseResult as q, type PromptResult as r, type ProviderFactory as s, type ProviderRunnerWrapper as t, createDefaultPipelines as u, type ProviderRunnerFn as v };
671
+ export { type AgentPipelines as A, type BeforeIterationHook as B, DEFAULT_MAX_ITERATIONS as D, ExtensionRegistry as E, type HookRunEnv as H, type OnErrorHook as O, ProviderRegistry as P, type ResolvedLoopDetectionConfig as R, type SystemPromptContributor as S, type ToolCallPipelinePayload as T, type UserInputPayload as U, type ToolWrapper as a, ToolRegistry as b, type ToolExecutorLike as c, type AgentInit as d, type AgentInput as e, type RunResult as f, type ToolExecutorOptions as g, type ToolExecutorStrategy as h, type ToolBatchResult as i, type AgentExtension as j, type AfterIterationHook as k, type AfterRunHook as l, type AfterToolExecutionHook as m, type BeforeRunHook as n, type BeforeToolExecutionHook as o, HookRunner as p, type HookRunnerOptions as q, type PreToolUseResult as r, type PromptResult as s, type ProviderFactory as t, type ProviderRunnerWrapper as u, createDefaultPipelines as v, type ProviderRunnerFn as w };
@@ -1,4 +1,4 @@
1
- import './secret-vault-D7jeyXUQ.js';
1
+ import './secret-vault-DxohkUBc.js';
2
2
 
3
3
  /**
4
4
  * Well-known tool capabilities used for authorization decisions.
@@ -46,6 +46,10 @@ declare const ToolCapabilities: {
46
46
  readonly SUBAGENT_SPAWN: "subagent.spawn";
47
47
  /** Can inspect fleet/subagent coordination state without mutating it. */
48
48
  readonly COORDINATION_FLEET_READ: "coordination.fleet.read";
49
+ /** Can publish attributed, schema-checked events onto the fleet bus. */
50
+ readonly COORDINATION_FLEET_EMIT: "coordination.fleet.emit";
51
+ /** Can submit a task-local structured result to the parent Director. */
52
+ readonly COORDINATION_RESULT_SUBMIT: "coordination.result.submit";
49
53
  /** Can read or write inter-agent mailbox messages. */
50
54
  readonly COORDINATION_MAIL: "coordination.mail";
51
55
  /** Can schedule, inspect, or cancel in-session cron jobs. */