@wrongstack/core 0.260.0 → 0.264.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 (80) hide show
  1. package/dist/{agent-bridge-BbskZ7HH.d.ts → agent-bridge-D8sa1vtv.d.ts} +1 -1
  2. package/dist/{agent-subagent-runner-BNIGZx18.d.ts → agent-subagent-runner-c9DLkaas.d.ts} +11 -9
  3. package/dist/{brain-C2yDd7Lw.d.ts → brain-O1IdKPaK.d.ts} +2 -2
  4. package/dist/{compactor-t0R_AIt_.d.ts → compactor-BBy0rCtB.d.ts} +1 -1
  5. package/dist/{config-FG6As4H5.d.ts → config-Dz2F3H2K.d.ts} +7 -1
  6. package/dist/{context-JFOVvu6z.d.ts → context-BGSpZNSE.d.ts} +11 -0
  7. package/dist/coordination/index.d.ts +1681 -15
  8. package/dist/coordination/index.js +2648 -388
  9. package/dist/coordination/index.js.map +1 -1
  10. package/dist/defaults/index.d.ts +25 -25
  11. package/dist/defaults/index.js +1414 -1387
  12. package/dist/defaults/index.js.map +1 -1
  13. package/dist/dispatcher-types.d-BBeXBQgS.d.ts +66 -0
  14. package/dist/execution/index.d.ts +15 -15
  15. package/dist/execution/index.js +410 -388
  16. package/dist/execution/index.js.map +1 -1
  17. package/dist/execution/prompt-enhancer.d.ts +2 -2
  18. package/dist/execution/prompt-enhancer.js +7 -1
  19. package/dist/execution/prompt-enhancer.js.map +1 -1
  20. package/dist/extension/index.d.ts +6 -6
  21. package/dist/extension/index.js.map +1 -1
  22. package/dist/{goal-preamble-B1IXJtLX.d.ts → goal-preamble-DzjFuN3p.d.ts} +21 -9
  23. package/dist/{goal-store-CPXz6Mml.d.ts → goal-store-CxWmCGbH.d.ts} +1 -1
  24. package/dist/{index-CebbJB94.d.ts → index-CYIQrXVF.d.ts} +8 -8
  25. package/dist/{index-BPcg4N3M.d.ts → index-CbLSI66_.d.ts} +5 -5
  26. package/dist/index.d.ts +45 -91
  27. package/dist/index.js +14976 -12551
  28. package/dist/index.js.map +1 -1
  29. package/dist/infrastructure/index.d.ts +6 -6
  30. package/dist/kernel/index.d.ts +9 -9
  31. package/dist/kernel/index.js +6 -1
  32. package/dist/kernel/index.js.map +1 -1
  33. package/dist/{llm-selector-DXxI2tlu.d.ts → llm-selector-DzxuZnNz.d.ts} +2 -2
  34. package/dist/{mcp-servers-OwNHo43-.d.ts → mcp-servers-DC4QRPUI.d.ts} +3 -3
  35. package/dist/models/index.d.ts +5 -5
  36. package/dist/models/index.js +6 -1
  37. package/dist/models/index.js.map +1 -1
  38. package/dist/{models-registry-Djlmq4uB.d.ts → models-registry-B_siPxqN.d.ts} +1 -1
  39. package/dist/{multi-agent-coordinator-CEmrSCMJ.d.ts → multi-agent-coordinator-CK5Jdj9K.d.ts} +2 -2
  40. package/dist/{null-fleet-bus-DT92xqgJ.d.ts → null-fleet-bus-DgvD4SCO.d.ts} +6 -6
  41. package/dist/observability/index.d.ts +2 -2
  42. package/dist/observability/index.js +8 -3
  43. package/dist/observability/index.js.map +1 -1
  44. package/dist/{parallel-eternal-engine-0SItuq5r.d.ts → parallel-eternal-engine-bK0JQBR_.d.ts} +9 -9
  45. package/dist/{path-resolver-DKBh6Jlo.d.ts → path-resolver-BPEDlN38.d.ts} +3 -3
  46. package/dist/{permission-BJ7eO9Vl.d.ts → permission-4yvGmMRB.d.ts} +1 -1
  47. package/dist/{permission-policy-DEXOfnpm.d.ts → permission-policy-C6XpsBOy.d.ts} +2 -2
  48. package/dist/{pipeline-zflkI2dp.d.ts → pipeline-CXCeMz8J.d.ts} +58 -3
  49. package/dist/{plan-templates-BFXyRkEK.d.ts → plan-templates-BvzRBkJc.d.ts} +5 -5
  50. package/dist/{provider-runner-BC-uywtT.d.ts → provider-runner-C5aQpDWE.d.ts} +3 -3
  51. package/dist/{retry-policy-Cavrzmtk.d.ts → retry-policy-CFhdtRzz.d.ts} +1 -1
  52. package/dist/sdd/index.d.ts +8 -8
  53. package/dist/sdd/index.js +39 -29
  54. package/dist/sdd/index.js.map +1 -1
  55. package/dist/{secret-vault-CDvDYXWX.d.ts → secret-vault-CxiVLbt1.d.ts} +1 -1
  56. package/dist/security/index.d.ts +4 -4
  57. package/dist/security/index.js +208 -203
  58. package/dist/security/index.js.map +1 -1
  59. package/dist/{selector-B7AivHsu.d.ts → selector-gIuhRTkN.d.ts} +1 -1
  60. package/dist/{session-event-bridge-BmIDxdJd.d.ts → session-event-bridge-DkvvrpDt.d.ts} +8 -2
  61. package/dist/{session-reader-DtofsB-2.d.ts → session-reader-KdfVwkKP.d.ts} +1 -1
  62. package/dist/skills/index.js +67 -64
  63. package/dist/skills/index.js.map +1 -1
  64. package/dist/storage/index.d.ts +31 -12
  65. package/dist/storage/index.js +441 -360
  66. package/dist/storage/index.js.map +1 -1
  67. package/dist/tools/index.d.ts +57 -0
  68. package/dist/tools/index.js +411 -0
  69. package/dist/tools/index.js.map +1 -0
  70. package/dist/types/index.d.ts +19 -19
  71. package/dist/types/index.js +703 -694
  72. package/dist/types/index.js.map +1 -1
  73. package/dist/utils/error.d.ts +7 -0
  74. package/dist/utils/error.js +8 -0
  75. package/dist/utils/error.js.map +1 -0
  76. package/dist/utils/index.d.ts +7 -67
  77. package/dist/utils/index.js +17 -5
  78. package/dist/utils/index.js.map +1 -1
  79. package/package.json +5 -1
  80. package/dist/package-outdated-watcher-C70ag2G9.d.ts +0 -581
@@ -0,0 +1,66 @@
1
+ import * as https from 'node:https';
2
+ import { Dispatcher } from 'undici';
3
+
4
+ /**
5
+ * `dispatcher-types.d.ts` — Unify `https.Agent` and `undici.Dispatcher` types.
6
+ *
7
+ * Problem: `https.Agent` (Node.js built-in) and `undici.Dispatcher` implement the
8
+ * same interface at runtime — `fetch`'s `RequestInit.dispatcher` accepts anything
9
+ * with a `dispatch(req, opts)` method. However, TypeScript's type definitions
10
+ * treat them as unrelated types because they come from different `@types/*` packages
11
+ * (or undici@7 bundles its own Dispatcher type that conflicts with @types/node's
12
+ * copy of the same concept via undici-types).
13
+ *
14
+ * Solution: This module augments the global `RequestInit` type so that
15
+ * `https.Agent` is accepted as a valid `dispatcher` value without a cast.
16
+ *
17
+ * Usage:
18
+ * import '@wrongstack/core/utils/dispatcher-types';
19
+ * const agent = new https.Agent({ rejectUnauthorized: false });
20
+ * fetch(url, { dispatcher: agent }); // ✅ no cast needed
21
+ *
22
+ * Alternatively, use `as HttpsAgentAsDispatcher` to silence any remaining
23
+ * conflicts at the call site.
24
+ *
25
+ * Verified at runtime: `https.Agent` has a `dispatch(req, opts)` method and
26
+ * is callable by the built-in fetch implementation — this shim is a type-level
27
+ * correction only, not a runtime polyfill.
28
+ */
29
+
30
+
31
+
32
+ /**
33
+ * Marker type: a value that fetch's `RequestInit.dispatcher` accepts at runtime.
34
+ * Both `https.Agent` and `undici.Dispatcher` satisfy this structural interface.
35
+ */
36
+ type HttpDispatcher = Pick<Dispatcher, 'dispatch'>;
37
+
38
+ /**
39
+ * Augment `RequestInit` so that `https.Agent` is a valid dispatcher type.
40
+ * Without this, TypeScript rejects `https.Agent` for `dispatcher` because the
41
+ * two agent types are not structurally compatible in the installed @types set.
42
+ */
43
+ declare global {
44
+ interface RequestInit {
45
+ /**
46
+ * Accepts `https.Agent` in addition to `undici.Dispatcher`.
47
+ * Runtime type-check is performed by Node.js / undici — this declaration
48
+ * only tells TypeScript the same thing.
49
+ */
50
+ dispatcher?: HttpDispatcher | undefined;
51
+ }
52
+ }
53
+
54
+ /**
55
+ * Use this cast at call sites where `https.Agent` must be passed to a function
56
+ * typed for `undici.Dispatcher`. Documents the trust boundary: the cast is safe
57
+ * because both types share a `dispatch(req, opts)` method at runtime.
58
+ *
59
+ * @example
60
+ * import type { HttpsAgentAsDispatcher } from '@wrongstack/core';
61
+ * const agent = new https.Agent({ rejectUnauthorized: false });
62
+ * fetch(url, { dispatcher: agent as HttpsAgentAsDispatcher });
63
+ */
64
+ type HttpsAgentAsDispatcher = https.Agent;
65
+
66
+ export type { HttpDispatcher as H, HttpsAgentAsDispatcher as a };
@@ -1,23 +1,23 @@
1
- export { C as CompactorOptions, a as DefaultErrorHandler, b as DefaultRetryPolicy, E as EternalAutonomyEngine, c as EternalAutonomyOptions, d as EternalEngineState, H as HybridCompactor, I as IterationStage, P as ParallelEngineState, e as ParallelEternalEngine, f as ParallelEternalOptions, g as ParallelIterationStage, T as ToolExecutor } from '../parallel-eternal-engine-0SItuq5r.js';
2
- export { A as AutoCompactionMiddleware, a as AutonomousRunner, b as AutonomousRunnerOptions, c as AutonomyPromptContributorOptions, C as CompactorStrategy, D as DefaultSkillLoader, d as DoneCheckResult, e as DoneConditionChecker, I as IntelligentCompactor, f as IntelligentCompactorOptions, S as SelectiveCompactor, g as SelectiveCompactorOptions, h as SkillLoaderOptions, i as StrategyCompactorOptions, j as buildGoalPreamble, k as createStrategyCompactor, m as makeAutonomyPromptContributor } from '../goal-preamble-B1IXJtLX.js';
3
- import { P as Provider } from '../context-JFOVvu6z.js';
4
- import { b as BrainDecision, e as BrainDecisionRequest, B as BrainArbiter } from '../brain-C2yDd7Lw.js';
5
- import '../retry-policy-Cavrzmtk.js';
6
- import '../compactor-t0R_AIt_.js';
7
- import '../config-FG6As4H5.js';
8
- import '../index-BPcg4N3M.js';
1
+ export { C as CompactorOptions, a as DefaultErrorHandler, b as DefaultRetryPolicy, E as EternalAutonomyEngine, c as EternalAutonomyOptions, d as EternalEngineState, H as HybridCompactor, I as IterationStage, P as ParallelEngineState, e as ParallelEternalEngine, f as ParallelEternalOptions, g as ParallelIterationStage, T as ToolExecutor } from '../parallel-eternal-engine-bK0JQBR_.js';
2
+ export { A as AutoCompactionMiddleware, a as AutonomousRunner, b as AutonomousRunnerOptions, c as AutonomyPromptContributorOptions, C as CompactorStrategy, D as DefaultSkillLoader, d as DoneCheckResult, e as DoneConditionChecker, I as IntelligentCompactor, f as IntelligentCompactorOptions, S as SelectiveCompactor, g as SelectiveCompactorOptions, h as SkillLoaderOptions, i as StrategyCompactorOptions, j as buildGoalPreamble, k as createStrategyCompactor, m as makeAutonomyPromptContributor } from '../goal-preamble-DzjFuN3p.js';
3
+ import { P as Provider } from '../context-BGSpZNSE.js';
4
+ import { e as BrainDecision, h as BrainDecisionRequest, B as BrainArbiter } from '../brain-O1IdKPaK.js';
5
+ import '../retry-policy-CFhdtRzz.js';
6
+ import '../compactor-BBy0rCtB.js';
7
+ import '../config-Dz2F3H2K.js';
8
+ import '../index-CbLSI66_.js';
9
9
  import '../logger-B63L5bTg.js';
10
- import '../pipeline-zflkI2dp.js';
10
+ import '../pipeline-CXCeMz8J.js';
11
11
  import '../observability-D-HZN_mF.js';
12
- import '../permission-BJ7eO9Vl.js';
13
- import '../agent-subagent-runner-BNIGZx18.js';
14
- import '../goal-store-CPXz6Mml.js';
15
- import '../multi-agent-coordinator-CEmrSCMJ.js';
12
+ import '../permission-4yvGmMRB.js';
13
+ import '../agent-subagent-runner-c9DLkaas.js';
14
+ import '../goal-store-CxWmCGbH.js';
15
+ import '../multi-agent-coordinator-CK5Jdj9K.js';
16
16
  import 'node:events';
17
17
  import '../skill-DGIXCtdv.js';
18
18
  import '../wstack-paths-CJjEwPXn.js';
19
- import '../selector-B7AivHsu.js';
20
- import '../session-event-bridge-BmIDxdJd.js';
19
+ import '../selector-gIuhRTkN.js';
20
+ import '../session-event-bridge-DkvvrpDt.js';
21
21
 
22
22
  /**
23
23
  * AutonomyBrain — a self-driving decision layer for autonomous workflows.