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.
- package/CHANGELOG.md +38 -0
- package/README.md +16 -14
- package/dist/config.d.ts +3 -6
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +27 -19
- package/dist/config.js.map +1 -1
- package/dist/core/adaptorch-bridge.d.ts +250 -0
- package/dist/core/adaptorch-bridge.d.ts.map +1 -0
- package/dist/core/adaptorch-bridge.js +466 -0
- package/dist/core/adaptorch-bridge.js.map +1 -0
- package/dist/core/agent-session.d.ts +97 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +194 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/bang-skill-invocation.d.ts.map +1 -1
- package/dist/core/bang-skill-invocation.js +149 -0
- package/dist/core/bang-skill-invocation.js.map +1 -1
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js +15 -2
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/context-budget-v2-planner.d.ts.map +1 -1
- package/dist/core/context-budget-v2-planner.js +10 -2
- package/dist/core/context-budget-v2-planner.js.map +1 -1
- package/dist/core/context-budget-v2-types.d.ts +7 -1
- package/dist/core/context-budget-v2-types.d.ts.map +1 -1
- package/dist/core/context-budget-v2-types.js.map +1 -1
- package/dist/core/domain-loadouts.d.ts.map +1 -1
- package/dist/core/domain-loadouts.js +1 -1
- package/dist/core/domain-loadouts.js.map +1 -1
- package/dist/core/reasoning-router-bias.d.ts +107 -0
- package/dist/core/reasoning-router-bias.d.ts.map +1 -0
- package/dist/core/reasoning-router-bias.js +278 -0
- package/dist/core/reasoning-router-bias.js.map +1 -0
- package/dist/core/reasoning-router-resolver.d.ts +44 -0
- package/dist/core/reasoning-router-resolver.d.ts.map +1 -0
- package/dist/core/reasoning-router-resolver.js +79 -0
- package/dist/core/reasoning-router-resolver.js.map +1 -0
- package/dist/core/reasoning-router-v4-weights.d.ts +80 -0
- package/dist/core/reasoning-router-v4-weights.d.ts.map +1 -0
- package/dist/core/reasoning-router-v4-weights.js +68 -0
- package/dist/core/reasoning-router-v4-weights.js.map +1 -0
- package/dist/core/reasoning-router-v4.d.ts +118 -0
- package/dist/core/reasoning-router-v4.d.ts.map +1 -0
- package/dist/core/reasoning-router-v4.js +585 -0
- package/dist/core/reasoning-router-v4.js.map +1 -0
- package/dist/core/router-feedback-collector.d.ts +98 -0
- package/dist/core/router-feedback-collector.d.ts.map +1 -0
- package/dist/core/router-feedback-collector.js +236 -0
- package/dist/core/router-feedback-collector.js.map +1 -0
- package/dist/core/settings-manager.d.ts +28 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +16 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +4 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/modes/interactive/components/control-panel-runtime-status.d.ts +15 -0
- package/dist/modes/interactive/components/control-panel-runtime-status.d.ts.map +1 -1
- package/dist/modes/interactive/components/control-panel-runtime-status.js +95 -5
- package/dist/modes/interactive/components/control-panel-runtime-status.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +4 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +60 -17
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/loadout-domains/README.md +8 -6
- package/docs/loadout-domains/ai-agent-ops.md +3 -2
- package/docs/loadout-domains/backend-api.md +3 -2
- package/docs/loadout-domains/data-science.md +3 -2
- package/docs/loadout-domains/devops-infra.md +2 -1
- package/docs/loadout-domains/docs-writing.md +7 -2
- package/docs/loadout-domains/frontend-ui.md +42 -11
- package/docs/loadout-domains/korean-document.md +83 -0
- package/docs/loadout-domains/mobile.md +1 -1
- package/docs/loadout-domains/qa-testing.md +4 -2
- package/docs/loadout-domains/security-audit.md +2 -1
- package/docs/loadout-domains/visual-qa.md +94 -0
- package/docs/skills.md +4 -1
- package/docs/usage.md +36 -3
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/subagent/agent-capability-router.test.ts +123 -0
- package/examples/extensions/subagent/agent-capability-router.ts +274 -0
- package/examples/extensions/subagent/agents/planner.md +3 -0
- package/examples/extensions/subagent/agents/reviewer.md +3 -0
- package/examples/extensions/subagent/agents/scout.md +3 -0
- package/examples/extensions/subagent/agents/worker.md +2 -0
- package/examples/extensions/subagent/agents.ts +14 -0
- package/examples/extensions/subagent/capabilities.ts +368 -0
- package/examples/extensions/subagent/domain-profiles.ts +1089 -0
- package/examples/extensions/subagent/index.ts +71 -3
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/sdk/12-full-control.ts +1 -1
- package/npm-shrinkwrap.json +12 -12
- package/package.json +4 -4
- package/dist/agents/jailbreak/index.d.ts +0 -7
- package/dist/agents/jailbreak/index.d.ts.map +0 -1
- package/dist/agents/jailbreak/index.js +0 -7
- package/dist/agents/jailbreak/index.js.map +0 -1
- package/dist/agents/jailbreak/subagent-f.d.ts +0 -44
- package/dist/agents/jailbreak/subagent-f.d.ts.map +0 -1
- package/dist/agents/jailbreak/subagent-f.js +0 -60
- package/dist/agents/jailbreak/subagent-f.js.map +0 -1
- package/dist/cli/jailbreak-args.d.ts +0 -26
- package/dist/cli/jailbreak-args.d.ts.map +0 -1
- package/dist/cli/jailbreak-args.js +0 -86
- package/dist/cli/jailbreak-args.js.map +0 -1
- package/dist/commands/jailbreak.d.ts +0 -49
- package/dist/commands/jailbreak.d.ts.map +0 -1
- package/dist/commands/jailbreak.js +0 -201
- package/dist/commands/jailbreak.js.map +0 -1
- package/dist/core/compactor.d.ts +0 -42
- package/dist/core/compactor.d.ts.map +0 -1
- package/dist/core/compactor.js +0 -128
- package/dist/core/compactor.js.map +0 -1
- package/dist/core/token-optimizer.d.ts +0 -58
- package/dist/core/token-optimizer.d.ts.map +0 -1
- package/dist/core/token-optimizer.js +0 -179
- package/dist/core/token-optimizer.js.map +0 -1
- package/dist/encoding/index.d.ts +0 -6
- package/dist/encoding/index.d.ts.map +0 -1
- package/dist/encoding/index.js +0 -6
- package/dist/encoding/index.js.map +0 -1
- package/dist/encoding/l4-encoder.d.ts +0 -96
- package/dist/encoding/l4-encoder.d.ts.map +0 -1
- package/dist/encoding/l4-encoder.js +0 -474
- package/dist/encoding/l4-encoder.js.map +0 -1
- package/dist/fuzzing/index.d.ts +0 -6
- package/dist/fuzzing/index.d.ts.map +0 -1
- package/dist/fuzzing/index.js +0 -6
- package/dist/fuzzing/index.js.map +0 -1
- package/dist/fuzzing/mutation-engine.d.ts +0 -93
- package/dist/fuzzing/mutation-engine.d.ts.map +0 -1
- package/dist/fuzzing/mutation-engine.js +0 -244
- package/dist/fuzzing/mutation-engine.js.map +0 -1
- package/dist/jailbreak-extension.d.ts +0 -48
- package/dist/jailbreak-extension.d.ts.map +0 -1
- package/dist/jailbreak-extension.js +0 -47
- package/dist/jailbreak-extension.js.map +0 -1
- package/dist/modules/index.d.ts +0 -8
- package/dist/modules/index.d.ts.map +0 -1
- package/dist/modules/index.js +0 -7
- package/dist/modules/index.js.map +0 -1
- package/dist/modules/lrl-bypass.d.ts +0 -40
- package/dist/modules/lrl-bypass.d.ts.map +0 -1
- package/dist/modules/lrl-bypass.js +0 -84
- package/dist/modules/lrl-bypass.js.map +0 -1
- package/dist/modules/lrl-deps.d.ts +0 -38
- package/dist/modules/lrl-deps.d.ts.map +0 -1
- package/dist/modules/lrl-deps.js +0 -128
- package/dist/modules/lrl-deps.js.map +0 -1
- package/dist/multiturn/easl-chain.d.ts +0 -113
- package/dist/multiturn/easl-chain.d.ts.map +0 -1
- package/dist/multiturn/easl-chain.js +0 -351
- package/dist/multiturn/easl-chain.js.map +0 -1
- package/dist/multiturn/index.d.ts +0 -6
- package/dist/multiturn/index.d.ts.map +0 -1
- package/dist/multiturn/index.js +0 -6
- package/dist/multiturn/index.js.map +0 -1
- package/dist/routing/fallback-router.d.ts +0 -123
- package/dist/routing/fallback-router.d.ts.map +0 -1
- package/dist/routing/fallback-router.js +0 -355
- package/dist/routing/fallback-router.js.map +0 -1
- package/dist/routing/index.d.ts +0 -6
- package/dist/routing/index.d.ts.map +0 -1
- package/dist/routing/index.js +0 -6
- package/dist/routing/index.js.map +0 -1
- package/dist/types/jailbreak.d.ts +0 -246
- package/dist/types/jailbreak.d.ts.map +0 -1
- package/dist/types/jailbreak.js +0 -8
- package/dist/types/jailbreak.js.map +0 -1
- package/dist/utils/jailbreak/common.d.ts +0 -63
- package/dist/utils/jailbreak/common.d.ts.map +0 -1
- package/dist/utils/jailbreak/common.js +0 -130
- package/dist/utils/jailbreak/common.js.map +0 -1
- package/dist/utils/jailbreak/index.d.ts +0 -7
- package/dist/utils/jailbreak/index.d.ts.map +0 -1
- package/dist/utils/jailbreak/index.js +0 -7
- 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
|