open-multi-agent-kit 0.90.3 → 0.90.5

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 (184) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +16 -14
  3. package/dist/config.d.ts +3 -6
  4. package/dist/config.d.ts.map +1 -1
  5. package/dist/config.js +27 -19
  6. package/dist/config.js.map +1 -1
  7. package/dist/core/adaptorch-bridge.d.ts +250 -0
  8. package/dist/core/adaptorch-bridge.d.ts.map +1 -0
  9. package/dist/core/adaptorch-bridge.js +466 -0
  10. package/dist/core/adaptorch-bridge.js.map +1 -0
  11. package/dist/core/agent-session.d.ts +97 -0
  12. package/dist/core/agent-session.d.ts.map +1 -1
  13. package/dist/core/agent-session.js +194 -0
  14. package/dist/core/agent-session.js.map +1 -1
  15. package/dist/core/bang-skill-invocation.d.ts.map +1 -1
  16. package/dist/core/bang-skill-invocation.js +149 -0
  17. package/dist/core/bang-skill-invocation.js.map +1 -1
  18. package/dist/core/compaction/utils.d.ts.map +1 -1
  19. package/dist/core/compaction/utils.js +15 -2
  20. package/dist/core/compaction/utils.js.map +1 -1
  21. package/dist/core/context-budget-v2-planner.d.ts.map +1 -1
  22. package/dist/core/context-budget-v2-planner.js +10 -2
  23. package/dist/core/context-budget-v2-planner.js.map +1 -1
  24. package/dist/core/context-budget-v2-types.d.ts +7 -1
  25. package/dist/core/context-budget-v2-types.d.ts.map +1 -1
  26. package/dist/core/context-budget-v2-types.js.map +1 -1
  27. package/dist/core/domain-loadouts.d.ts.map +1 -1
  28. package/dist/core/domain-loadouts.js +1 -1
  29. package/dist/core/domain-loadouts.js.map +1 -1
  30. package/dist/core/reasoning-router-bias.d.ts +107 -0
  31. package/dist/core/reasoning-router-bias.d.ts.map +1 -0
  32. package/dist/core/reasoning-router-bias.js +278 -0
  33. package/dist/core/reasoning-router-bias.js.map +1 -0
  34. package/dist/core/reasoning-router-resolver.d.ts +44 -0
  35. package/dist/core/reasoning-router-resolver.d.ts.map +1 -0
  36. package/dist/core/reasoning-router-resolver.js +79 -0
  37. package/dist/core/reasoning-router-resolver.js.map +1 -0
  38. package/dist/core/reasoning-router-v4-weights.d.ts +80 -0
  39. package/dist/core/reasoning-router-v4-weights.d.ts.map +1 -0
  40. package/dist/core/reasoning-router-v4-weights.js +68 -0
  41. package/dist/core/reasoning-router-v4-weights.js.map +1 -0
  42. package/dist/core/reasoning-router-v4.d.ts +118 -0
  43. package/dist/core/reasoning-router-v4.d.ts.map +1 -0
  44. package/dist/core/reasoning-router-v4.js +585 -0
  45. package/dist/core/reasoning-router-v4.js.map +1 -0
  46. package/dist/core/router-feedback-collector.d.ts +98 -0
  47. package/dist/core/router-feedback-collector.d.ts.map +1 -0
  48. package/dist/core/router-feedback-collector.js +236 -0
  49. package/dist/core/router-feedback-collector.js.map +1 -0
  50. package/dist/core/settings-manager.d.ts +28 -0
  51. package/dist/core/settings-manager.d.ts.map +1 -1
  52. package/dist/core/settings-manager.js +16 -0
  53. package/dist/core/settings-manager.js.map +1 -1
  54. package/dist/core/slash-commands.d.ts.map +1 -1
  55. package/dist/core/slash-commands.js +4 -1
  56. package/dist/core/slash-commands.js.map +1 -1
  57. package/dist/modes/interactive/components/control-panel-runtime-status.d.ts +15 -0
  58. package/dist/modes/interactive/components/control-panel-runtime-status.d.ts.map +1 -1
  59. package/dist/modes/interactive/components/control-panel-runtime-status.js +95 -5
  60. package/dist/modes/interactive/components/control-panel-runtime-status.js.map +1 -1
  61. package/dist/modes/interactive/interactive-mode.d.ts +4 -0
  62. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  63. package/dist/modes/interactive/interactive-mode.js +60 -17
  64. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  65. package/docs/loadout-domains/README.md +8 -6
  66. package/docs/loadout-domains/ai-agent-ops.md +3 -2
  67. package/docs/loadout-domains/backend-api.md +3 -2
  68. package/docs/loadout-domains/data-science.md +3 -2
  69. package/docs/loadout-domains/devops-infra.md +2 -1
  70. package/docs/loadout-domains/docs-writing.md +7 -2
  71. package/docs/loadout-domains/frontend-ui.md +42 -11
  72. package/docs/loadout-domains/korean-document.md +83 -0
  73. package/docs/loadout-domains/mobile.md +1 -1
  74. package/docs/loadout-domains/qa-testing.md +4 -2
  75. package/docs/loadout-domains/security-audit.md +2 -1
  76. package/docs/loadout-domains/visual-qa.md +94 -0
  77. package/docs/skills.md +4 -1
  78. package/docs/usage.md +36 -3
  79. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  80. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  81. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  82. package/examples/extensions/gondolin/package-lock.json +2 -2
  83. package/examples/extensions/gondolin/package.json +1 -1
  84. package/examples/extensions/sandbox/package-lock.json +2 -2
  85. package/examples/extensions/sandbox/package.json +1 -1
  86. package/examples/extensions/subagent/agent-capability-router.test.ts +123 -0
  87. package/examples/extensions/subagent/agent-capability-router.ts +274 -0
  88. package/examples/extensions/subagent/agents/planner.md +3 -0
  89. package/examples/extensions/subagent/agents/reviewer.md +3 -0
  90. package/examples/extensions/subagent/agents/scout.md +3 -0
  91. package/examples/extensions/subagent/agents/worker.md +2 -0
  92. package/examples/extensions/subagent/agents.ts +14 -0
  93. package/examples/extensions/subagent/capabilities.ts +368 -0
  94. package/examples/extensions/subagent/domain-profiles.ts +1089 -0
  95. package/examples/extensions/subagent/index.ts +71 -3
  96. package/examples/extensions/with-deps/package-lock.json +2 -2
  97. package/examples/extensions/with-deps/package.json +1 -1
  98. package/examples/sdk/12-full-control.ts +1 -1
  99. package/npm-shrinkwrap.json +12 -12
  100. package/package.json +4 -4
  101. package/dist/agents/jailbreak/index.d.ts +0 -7
  102. package/dist/agents/jailbreak/index.d.ts.map +0 -1
  103. package/dist/agents/jailbreak/index.js +0 -7
  104. package/dist/agents/jailbreak/index.js.map +0 -1
  105. package/dist/agents/jailbreak/subagent-f.d.ts +0 -44
  106. package/dist/agents/jailbreak/subagent-f.d.ts.map +0 -1
  107. package/dist/agents/jailbreak/subagent-f.js +0 -60
  108. package/dist/agents/jailbreak/subagent-f.js.map +0 -1
  109. package/dist/cli/jailbreak-args.d.ts +0 -26
  110. package/dist/cli/jailbreak-args.d.ts.map +0 -1
  111. package/dist/cli/jailbreak-args.js +0 -86
  112. package/dist/cli/jailbreak-args.js.map +0 -1
  113. package/dist/commands/jailbreak.d.ts +0 -49
  114. package/dist/commands/jailbreak.d.ts.map +0 -1
  115. package/dist/commands/jailbreak.js +0 -201
  116. package/dist/commands/jailbreak.js.map +0 -1
  117. package/dist/core/compactor.d.ts +0 -42
  118. package/dist/core/compactor.d.ts.map +0 -1
  119. package/dist/core/compactor.js +0 -128
  120. package/dist/core/compactor.js.map +0 -1
  121. package/dist/core/token-optimizer.d.ts +0 -58
  122. package/dist/core/token-optimizer.d.ts.map +0 -1
  123. package/dist/core/token-optimizer.js +0 -179
  124. package/dist/core/token-optimizer.js.map +0 -1
  125. package/dist/encoding/index.d.ts +0 -6
  126. package/dist/encoding/index.d.ts.map +0 -1
  127. package/dist/encoding/index.js +0 -6
  128. package/dist/encoding/index.js.map +0 -1
  129. package/dist/encoding/l4-encoder.d.ts +0 -96
  130. package/dist/encoding/l4-encoder.d.ts.map +0 -1
  131. package/dist/encoding/l4-encoder.js +0 -474
  132. package/dist/encoding/l4-encoder.js.map +0 -1
  133. package/dist/fuzzing/index.d.ts +0 -6
  134. package/dist/fuzzing/index.d.ts.map +0 -1
  135. package/dist/fuzzing/index.js +0 -6
  136. package/dist/fuzzing/index.js.map +0 -1
  137. package/dist/fuzzing/mutation-engine.d.ts +0 -93
  138. package/dist/fuzzing/mutation-engine.d.ts.map +0 -1
  139. package/dist/fuzzing/mutation-engine.js +0 -244
  140. package/dist/fuzzing/mutation-engine.js.map +0 -1
  141. package/dist/jailbreak-extension.d.ts +0 -48
  142. package/dist/jailbreak-extension.d.ts.map +0 -1
  143. package/dist/jailbreak-extension.js +0 -47
  144. package/dist/jailbreak-extension.js.map +0 -1
  145. package/dist/modules/index.d.ts +0 -8
  146. package/dist/modules/index.d.ts.map +0 -1
  147. package/dist/modules/index.js +0 -7
  148. package/dist/modules/index.js.map +0 -1
  149. package/dist/modules/lrl-bypass.d.ts +0 -40
  150. package/dist/modules/lrl-bypass.d.ts.map +0 -1
  151. package/dist/modules/lrl-bypass.js +0 -84
  152. package/dist/modules/lrl-bypass.js.map +0 -1
  153. package/dist/modules/lrl-deps.d.ts +0 -38
  154. package/dist/modules/lrl-deps.d.ts.map +0 -1
  155. package/dist/modules/lrl-deps.js +0 -128
  156. package/dist/modules/lrl-deps.js.map +0 -1
  157. package/dist/multiturn/easl-chain.d.ts +0 -113
  158. package/dist/multiturn/easl-chain.d.ts.map +0 -1
  159. package/dist/multiturn/easl-chain.js +0 -351
  160. package/dist/multiturn/easl-chain.js.map +0 -1
  161. package/dist/multiturn/index.d.ts +0 -6
  162. package/dist/multiturn/index.d.ts.map +0 -1
  163. package/dist/multiturn/index.js +0 -6
  164. package/dist/multiturn/index.js.map +0 -1
  165. package/dist/routing/fallback-router.d.ts +0 -123
  166. package/dist/routing/fallback-router.d.ts.map +0 -1
  167. package/dist/routing/fallback-router.js +0 -355
  168. package/dist/routing/fallback-router.js.map +0 -1
  169. package/dist/routing/index.d.ts +0 -6
  170. package/dist/routing/index.d.ts.map +0 -1
  171. package/dist/routing/index.js +0 -6
  172. package/dist/routing/index.js.map +0 -1
  173. package/dist/types/jailbreak.d.ts +0 -246
  174. package/dist/types/jailbreak.d.ts.map +0 -1
  175. package/dist/types/jailbreak.js +0 -8
  176. package/dist/types/jailbreak.js.map +0 -1
  177. package/dist/utils/jailbreak/common.d.ts +0 -63
  178. package/dist/utils/jailbreak/common.d.ts.map +0 -1
  179. package/dist/utils/jailbreak/common.js +0 -130
  180. package/dist/utils/jailbreak/common.js.map +0 -1
  181. package/dist/utils/jailbreak/index.d.ts +0 -7
  182. package/dist/utils/jailbreak/index.d.ts.map +0 -1
  183. package/dist/utils/jailbreak/index.js +0 -7
  184. package/dist/utils/jailbreak/index.js.map +0 -1
@@ -37,6 +37,12 @@ export interface ParsedSkillBlock {
37
37
  * Returns null if the text doesn't contain a skill block.
38
38
  */
39
39
  export declare function parseSkillBlock(text: string): ParsedSkillBlock | null;
40
+ /**
41
+ * Thinking mode: "manual" keeps the user-selected level; "auto" resolves the
42
+ * level per turn via the reasoning router. Manual `/think <level>` always wins
43
+ * because the router only runs in auto mode.
44
+ */
45
+ export type ThinkingMode = "manual" | "auto";
40
46
  /** Session-specific events that extend the core AgentEvent */
41
47
  export type AgentSessionEvent = Exclude<AgentEvent, {
42
48
  type: "agent_end";
@@ -179,6 +185,27 @@ export declare class AgentSession {
179
185
  readonly sessionManager: SessionManager;
180
186
  readonly settingsManager: SettingsManager;
181
187
  private _scopedModels;
188
+ /**
189
+ * Thinking mode (default "manual"). Persists across turns within the session;
190
+ * auto-resolved levels are never written to the user's persisted settings.
191
+ */
192
+ private _thinkingMode;
193
+ /**
194
+ * N=8 ring buffer of recent auto-turn task classes (newest first), feeding
195
+ * v4's multi-turn prior feature. Never persisted to settings.
196
+ */
197
+ private _taskClassHistory;
198
+ /**
199
+ * Compiled reasoning-router bias snapshot for the opt-in v4 learning path
200
+ * (Goal 010 Lane I). Loaded at most once per session and pinned thereafter:
201
+ * `_reasoningRouterBiasSnapshotLoaded` flips to `true` on the first v4
202
+ * auto-turn that has learning enabled, and `_reasoningRouterBiasSnapshot`
203
+ * then stays fixed for the rest of the session (even across later settings
204
+ * reloads, and even if the on-disk file changes or the load failed/was
205
+ * invalid, in which case it stays `null`). See `_getReasoningRouterBiasSnapshot`.
206
+ */
207
+ private _reasoningRouterBiasSnapshot;
208
+ private _reasoningRouterBiasSnapshotLoaded;
182
209
  private _unsubscribeAgent?;
183
210
  private _eventListeners;
184
211
  /** Tracks pending steering messages for UI display. Removed when delivered. */
@@ -280,6 +307,8 @@ export declare class AgentSession {
280
307
  get model(): Model<any> | undefined;
281
308
  /** Current thinking level */
282
309
  get thinkingLevel(): ThinkingLevel;
310
+ /** Current thinking mode ("manual" = user-selected level, "auto" = per-turn router) */
311
+ get thinkingMode(): ThinkingMode;
283
312
  /** Whether agent is currently streaming a response */
284
313
  get isStreaming(): boolean;
285
314
  /** Current effective system prompt (includes any per-turn extension modifications) */
@@ -454,6 +483,74 @@ export declare class AgentSession {
454
483
  * Saves to session and settings only if the level actually changes.
455
484
  */
456
485
  setThinkingLevel(level: ThinkingLevel): void;
486
+ /**
487
+ * Set the thinking mode. "auto" resolves a level per turn via the reasoning
488
+ * router; "manual" keeps the explicitly selected level. The mode persists for
489
+ * the session lifetime and is never written to user settings.
490
+ */
491
+ setThinkingMode(mode: ThinkingMode): void;
492
+ /**
493
+ * In auto thinking mode, resolve and apply this turn's thinking level from the
494
+ * prompt content. Updates agent state, records the change in the session, and
495
+ * notifies observers - but never overwrites the user's persisted default
496
+ * thinking level in settings. Models without reasoning support bypass the
497
+ * router entirely (level stays "off").
498
+ */
499
+ private _applyAutoThinkingLevelForTurn;
500
+ /**
501
+ * Auto-mode resolver. Reuses the N=8 recent-class history and
502
+ * context-pressure bucket, routed through the confidence-bearing v4 classifier
503
+ * and its uncertainty-aware resolver. No
504
+ * `laneType` applies to the main session (always "none"/`undefined`);
505
+ * `hint` is permanently `null` -- the Adaptorch advisory bridge has no
506
+ * transport wired into the session (out of this lane's scope; see
507
+ * adaptorch-bridge.ts). `bias` stays `0` unless BOTH hold: (a) the global,
508
+ * owner-only `reasoningRouterLearning.enabled` setting is `true` (default
509
+ * off; a project-scope `.omk/settings.json` value for this key is never
510
+ * consulted -- see settings-manager.ts), and (b) a compiled
511
+ * `RouterBiasSnapshot` was found and passed strict validation at the
512
+ * configured/default path, loaded and cached ("pinned") at most once per
513
+ * session (see `_getReasoningRouterBiasSnapshot`). When learning is
514
+ * enabled, exactly one bounded "accepted" feedback record (no raw prompt/
515
+ * path/diff/session/model/provider/tool/hook content; see
516
+ * router-feedback-collector.ts's exact ten-key schema) is appended to the
517
+ * local ledger after every v4 auto-turn resolution, for a future, separate
518
+ * offline compile step to learn from -- this lane never records an
519
+ * override/fail/hook-outcome signal, only the neutral "accepted" one. The
520
+ * resolver's own confidence-band/fallback-reason escalation (see
521
+ * reasoning-router-v4.ts) still applies on top of the base+lane+bias
522
+ * target, so a low-confidence or fallback-decided verdict can still only
523
+ * match or exceed the confident-path level.
524
+ */
525
+ private _applyAutoThinkingLevelV4;
526
+ /**
527
+ * Loads and strictly validates the compiled reasoning-router bias snapshot
528
+ * for the opt-in v4 learning path (Goal 010 Lane I), at most once per
529
+ * session ("pinned"): the first call attempts the read and caches whatever
530
+ * it finds (including a `null` miss/failure); every later call in the same
531
+ * session reuses that cached result without touching disk again. Returns
532
+ * `null` when no file exists at the configured/default path, the file
533
+ * cannot be read, or its contents fail `parseRouterBiasSnapshot`'s schema
534
+ * validation -- never throws.
535
+ */
536
+ private _getReasoningRouterBiasSnapshot;
537
+ /**
538
+ * Locally derives the same three bounded, privacy-safe feedback-ledger
539
+ * features (`lenBucket`, `hadFence`, `hadDiff`) the v4 classifier computes
540
+ * internally (reasoning-router-v4.ts keeps those helpers file-private, so
541
+ * they cannot be imported here). Mirrors reasoning-router-v4.ts's
542
+ * length-bucket, `hasCodeFence`, and `hasDiffMarkers` helpers. Operates on the same trimmed prompt text
543
+ * the classifier scores; never returns raw prompt content or its exact
544
+ * length, only the clamped [0,7] bucket and two booleans.
545
+ */
546
+ private _deriveRouterFeedbackFeatures;
547
+ /**
548
+ * Context-pressure band 0..3 from the projected token estimate over the
549
+ * model context window (reuses estimateProjectedContextTokens). 0..<0.5,
550
+ * 1..<0.75, 2..<0.9, 3..>=0.9. Inert under DEFAULT_WEIGHTS (no pressure
551
+ * coefficient); computed for future calibrated weight presets.
552
+ */
553
+ private _computePressureBucket;
457
554
  /**
458
555
  * Cycle to next thinking level.
459
556
  * @returns New level, or undefined if model doesn't support thinking