open-multi-agent-kit 0.90.5 → 0.90.7
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 +39 -1
- package/README.md +9 -9
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +2 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/codexbar-cli.d.ts +39 -0
- package/dist/codexbar-cli.d.ts.map +1 -0
- package/dist/codexbar-cli.js +230 -0
- package/dist/codexbar-cli.js.map +1 -0
- package/dist/commands/doctor-provider.d.ts.map +1 -1
- package/dist/commands/doctor-provider.js +16 -3
- package/dist/commands/doctor-provider.js.map +1 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +30 -8
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/codexbar-adapter.d.ts +44 -0
- package/dist/core/codexbar-adapter.d.ts.map +1 -0
- package/dist/core/codexbar-adapter.js +211 -0
- package/dist/core/codexbar-adapter.js.map +1 -0
- package/dist/core/command-safety.d.ts.map +1 -1
- package/dist/core/command-safety.js +7 -0
- package/dist/core/command-safety.js.map +1 -1
- package/dist/core/compaction/index.d.ts +2 -0
- package/dist/core/compaction/index.d.ts.map +1 -1
- package/dist/core/compaction/index.js +2 -0
- package/dist/core/compaction/index.js.map +1 -1
- package/dist/core/compaction/model-policy.d.ts +9 -0
- package/dist/core/compaction/model-policy.d.ts.map +1 -0
- package/dist/core/compaction/model-policy.js +37 -0
- package/dist/core/compaction/model-policy.js.map +1 -0
- package/dist/core/compaction/resume-policy.d.ts +6 -0
- package/dist/core/compaction/resume-policy.d.ts.map +1 -0
- package/dist/core/compaction/resume-policy.js +8 -0
- package/dist/core/compaction/resume-policy.js.map +1 -0
- package/dist/core/domain-loadouts.d.ts.map +1 -1
- package/dist/core/domain-loadouts.js +68 -1
- package/dist/core/domain-loadouts.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +12 -0
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +3 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +15 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/grok-harness-dispatch.d.ts +22 -0
- package/dist/core/grok-harness-dispatch.d.ts.map +1 -0
- package/dist/core/grok-harness-dispatch.js +44 -0
- package/dist/core/grok-harness-dispatch.js.map +1 -0
- package/dist/core/grok-harness.d.ts +25 -0
- package/dist/core/grok-harness.d.ts.map +1 -0
- package/dist/core/grok-harness.js +61 -0
- package/dist/core/grok-harness.js.map +1 -0
- package/dist/core/grok-playbook.d.ts +7 -0
- package/dist/core/grok-playbook.d.ts.map +1 -0
- package/dist/core/grok-playbook.js +34 -0
- package/dist/core/grok-playbook.js.map +1 -0
- package/dist/core/reasoning-router-v4-normalize.d.ts +11 -0
- package/dist/core/reasoning-router-v4-normalize.d.ts.map +1 -0
- package/dist/core/reasoning-router-v4-normalize.js +224 -0
- package/dist/core/reasoning-router-v4-normalize.js.map +1 -0
- package/dist/core/reasoning-router-v4-weights.d.ts +13 -5
- package/dist/core/reasoning-router-v4-weights.d.ts.map +1 -1
- package/dist/core/reasoning-router-v4-weights.js +8 -4
- package/dist/core/reasoning-router-v4-weights.js.map +1 -1
- package/dist/core/reasoning-router-v4.d.ts +3 -3
- package/dist/core/reasoning-router-v4.d.ts.map +1 -1
- package/dist/core/reasoning-router-v4.js +394 -58
- package/dist/core/reasoning-router-v4.js.map +1 -1
- package/dist/core/router-feedback-collector.d.ts +1 -1
- package/dist/core/router-feedback-collector.d.ts.map +1 -1
- package/dist/core/router-feedback-collector.js +9 -1
- package/dist/core/router-feedback-collector.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +31 -12
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-manager.d.ts +3 -3
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +4 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +1 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +1 -0
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +2 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/utils/tools-manager.d.ts +3 -2
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +42 -17
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/adaptorch-preview.md +84 -0
- package/docs/correctness-wall.md +117 -0
- package/docs/grok-harness.md +63 -0
- package/docs/loadout-domains/README.md +2 -1
- package/docs/loadout-domains/ai-agent-ops.md +8 -1
- package/docs/loadout-domains/frontend-ui.md +5 -1
- package/docs/loadout-domains/grok-harness.md +74 -0
- package/docs/providers.md +4 -0
- package/examples/extensions/correctness-wall/LOADOUT.md +87 -0
- package/examples/extensions/correctness-wall/README.md +111 -0
- package/examples/extensions/correctness-wall/adjudication-fixture.ts +151 -0
- package/examples/extensions/correctness-wall/index.ts +470 -0
- package/examples/extensions/correctness-wall/repair-state.ts +77 -0
- package/examples/extensions/correctness-wall/wall-cache.ts +81 -0
- 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/preset.ts +2 -2
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +12 -12
- package/package.json +5 -5
|
@@ -23,13 +23,16 @@ import { formatNoApiKeyFoundMessage, formatNoModelSelectedMessage } from "./auth
|
|
|
23
23
|
import { parseBangInvocation } from "./bang-skill-invocation.js";
|
|
24
24
|
import { executeBashWithOperations } from "./bash-executor.js";
|
|
25
25
|
import { classifyShellCommand } from "./command-safety.js";
|
|
26
|
-
import { calculateContextTokens, collectEntriesForBranchSummary, compact, estimateContextTokens, estimateProjectedContextTokens, generateBranchSummary, prepareCompaction, shouldCompact, } from "./compaction/index.js";
|
|
26
|
+
import { calculateContextTokens, collectEntriesForBranchSummary, compact, estimateContextTokens, estimateProjectedContextTokens, generateBranchSummary, prepareCompaction, resolveCompactionModel, shouldCompact, } from "./compaction/index.js";
|
|
27
|
+
import { compactionEmitWillRetry } from "./compaction/resume-policy.js";
|
|
27
28
|
import { DEFAULT_THINKING_LEVEL } from "./defaults.js";
|
|
28
29
|
import { exportSessionToHtml } from "./export-html/index.js";
|
|
29
30
|
import { createToolHtmlRenderer } from "./export-html/tool-renderer.js";
|
|
30
31
|
import { buildBlockedBashResult, evaluateCommandGate, isCommandSafetyAssumeYesEnabled, } from "./extensions/builtin/command-safety-gate.js";
|
|
31
32
|
import { ExtensionRunner, wrapRegisteredTools, } from "./extensions/index.js";
|
|
32
33
|
import { emitSessionShutdownEvent } from "./extensions/runner.js";
|
|
34
|
+
import { assertTextChatModelForCompletion } from "./grok-harness.js";
|
|
35
|
+
import { grokPlaybookAppendForProvider } from "./grok-playbook.js";
|
|
33
36
|
import { assertLoadoutAccess, decideLoadoutAccess } from "./loadout-access-policy.js";
|
|
34
37
|
import { expandPromptTemplate } from "./prompt-templates.js";
|
|
35
38
|
import { getBiasStepsForCell, getDefaultRouterBiasSnapshotPath, parseRouterBiasSnapshot, } from "./reasoning-router-bias.js";
|
|
@@ -825,7 +828,12 @@ export class AgentSession {
|
|
|
825
828
|
}
|
|
826
829
|
const loaderSystemPrompt = this._resourceLoader.getSystemPrompt();
|
|
827
830
|
const loaderAppendSystemPrompt = this._resourceLoader.getAppendSystemPrompt();
|
|
828
|
-
const
|
|
831
|
+
const grokAppend = grokPlaybookAppendForProvider(this.model?.provider);
|
|
832
|
+
const appendParts = [...loaderAppendSystemPrompt];
|
|
833
|
+
if (grokAppend) {
|
|
834
|
+
appendParts.push(grokAppend);
|
|
835
|
+
}
|
|
836
|
+
const appendSystemPrompt = appendParts.length > 0 ? appendParts.join("\n\n") : undefined;
|
|
829
837
|
const loadedSkills = this._resourceLoader.getSkills().skills;
|
|
830
838
|
const loadedContextFiles = this._resourceLoader.getAgentsFiles().agentsFiles;
|
|
831
839
|
this._baseSystemPromptOptions = {
|
|
@@ -960,6 +968,8 @@ export class AgentSession {
|
|
|
960
968
|
if (!this.model) {
|
|
961
969
|
throw new Error(formatNoModelSelectedMessage());
|
|
962
970
|
}
|
|
971
|
+
// Grok OAuth: refuse Imagine ids on the chat/completions path (tool-only).
|
|
972
|
+
assertTextChatModelForCompletion(this.model.id, this.model.provider);
|
|
963
973
|
if (!this._modelRegistry.hasConfiguredAuth(this.model)) {
|
|
964
974
|
const isOAuth = this._modelRegistry.isUsingOAuth(this.model);
|
|
965
975
|
if (isOAuth) {
|
|
@@ -1318,6 +1328,8 @@ export class AgentSession {
|
|
|
1318
1328
|
if (!this._modelRegistry.hasConfiguredAuth(model)) {
|
|
1319
1329
|
throw new Error(`No API key for ${model.provider}/${model.id}`);
|
|
1320
1330
|
}
|
|
1331
|
+
// Grok OAuth: block selecting Imagine models as the session chat model.
|
|
1332
|
+
assertTextChatModelForCompletion(model.id, model.provider);
|
|
1321
1333
|
const previousModel = this.model;
|
|
1322
1334
|
const thinkingLevel = this._getThinkingLevelForModelSwitch();
|
|
1323
1335
|
this.agent.state.model = model;
|
|
@@ -1651,7 +1663,8 @@ export class AgentSession {
|
|
|
1651
1663
|
if (!this.model) {
|
|
1652
1664
|
throw new Error(formatNoModelSelectedMessage());
|
|
1653
1665
|
}
|
|
1654
|
-
const
|
|
1666
|
+
const compactionModel = resolveCompactionModel(this.model, this._modelRegistry.getAvailable());
|
|
1667
|
+
const { apiKey, headers } = await this._getCompactionRequestAuth(compactionModel);
|
|
1655
1668
|
const pathEntries = this.sessionManager.getBranch();
|
|
1656
1669
|
const settings = this.settingsManager.getCompactionSettings();
|
|
1657
1670
|
const preparation = prepareCompaction(pathEntries, settings);
|
|
@@ -1694,7 +1707,7 @@ export class AgentSession {
|
|
|
1694
1707
|
}
|
|
1695
1708
|
else {
|
|
1696
1709
|
// Generate compaction result
|
|
1697
|
-
const result = await compact(preparation,
|
|
1710
|
+
const result = await compact(preparation, compactionModel, apiKey, headers, customInstructions, this._compactionAbortController.signal, this.thinkingLevel, this.agent.streamFn);
|
|
1698
1711
|
summary = result.summary;
|
|
1699
1712
|
firstKeptEntryId = result.firstKeptEntryId;
|
|
1700
1713
|
tokensBefore = result.tokensBefore;
|
|
@@ -1884,17 +1897,21 @@ export class AgentSession {
|
|
|
1884
1897
|
});
|
|
1885
1898
|
return false;
|
|
1886
1899
|
}
|
|
1900
|
+
const compactionModel = resolveCompactionModel(this.model, this._modelRegistry.getAvailable());
|
|
1887
1901
|
let apiKey;
|
|
1888
1902
|
let headers;
|
|
1889
1903
|
if (this.agent.streamFn === streamSimple) {
|
|
1890
|
-
const authResult = await this._modelRegistry.getApiKeyAndHeaders(
|
|
1904
|
+
const authResult = await this._modelRegistry.getApiKeyAndHeaders(compactionModel);
|
|
1891
1905
|
if (!authResult.ok || !authResult.apiKey) {
|
|
1906
|
+
const providerLabel = compactionModel.provider;
|
|
1892
1907
|
this._emit({
|
|
1893
1908
|
type: "compaction_end",
|
|
1894
1909
|
reason,
|
|
1895
1910
|
result: undefined,
|
|
1896
1911
|
aborted: false,
|
|
1897
1912
|
willRetry: false,
|
|
1913
|
+
errorMessage: `Auto-compaction could not authenticate for "${providerLabel}" (${compactionModel.id}). ` +
|
|
1914
|
+
`Check proxy/OAuth health and run '/login ${providerLabel}' if needed.`,
|
|
1898
1915
|
});
|
|
1899
1916
|
return false;
|
|
1900
1917
|
}
|
|
@@ -1902,7 +1919,7 @@ export class AgentSession {
|
|
|
1902
1919
|
headers = authResult.headers;
|
|
1903
1920
|
}
|
|
1904
1921
|
else {
|
|
1905
|
-
({ apiKey, headers } = await this._getCompactionRequestAuth(
|
|
1922
|
+
({ apiKey, headers } = await this._getCompactionRequestAuth(compactionModel));
|
|
1906
1923
|
}
|
|
1907
1924
|
const pathEntries = this.sessionManager.getBranch();
|
|
1908
1925
|
const preparation = prepareCompaction(pathEntries, settings);
|
|
@@ -1954,7 +1971,7 @@ export class AgentSession {
|
|
|
1954
1971
|
}
|
|
1955
1972
|
else {
|
|
1956
1973
|
// Generate compaction result
|
|
1957
|
-
const compactResult = await compact(preparation,
|
|
1974
|
+
const compactResult = await compact(preparation, compactionModel, apiKey, headers, undefined, this._autoCompactionAbortController.signal, this.thinkingLevel, this.agent.streamFn);
|
|
1958
1975
|
summary = compactResult.summary;
|
|
1959
1976
|
firstKeptEntryId = compactResult.firstKeptEntryId;
|
|
1960
1977
|
tokensBefore = compactResult.tokensBefore;
|
|
@@ -1989,7 +2006,8 @@ export class AgentSession {
|
|
|
1989
2006
|
tokensBefore,
|
|
1990
2007
|
details,
|
|
1991
2008
|
};
|
|
1992
|
-
|
|
2009
|
+
const emitWillRetry = compactionEmitWillRetry(willRetry, this.agent.hasQueuedMessages());
|
|
2010
|
+
this._emit({ type: "compaction_end", reason, result, aborted: false, willRetry: emitWillRetry });
|
|
1993
2011
|
if (willRetry) {
|
|
1994
2012
|
const messages = this.agent.state.messages;
|
|
1995
2013
|
const lastMsg = messages[messages.length - 1];
|
|
@@ -2178,6 +2196,10 @@ export class AgentSession {
|
|
|
2178
2196
|
},
|
|
2179
2197
|
getThinkingLevel: () => this.thinkingLevel,
|
|
2180
2198
|
setThinkingLevel: (level) => this.setThinkingLevel(level),
|
|
2199
|
+
// Optional: no in-process MCP client manager yet. Leave unbound so
|
|
2200
|
+
// ExtensionAPI.callMcpTool remains present (load-time capture) but throws
|
|
2201
|
+
// until a session-level handler is provided. Tests / future MCP hub bind here.
|
|
2202
|
+
callMcpTool: undefined,
|
|
2181
2203
|
}, {
|
|
2182
2204
|
getModel: () => this.model,
|
|
2183
2205
|
isIdle: () => !this.isStreaming,
|