@theokit/sdk 5.12.1 → 5.13.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.
- package/CHANGELOG.md +40 -0
- package/dist/{agent-IG7BP6GN.js → agent-5DSDDH7K.js} +5 -5
- package/dist/{agent-IG7BP6GN.js.map → agent-5DSDDH7K.js.map} +1 -1
- package/dist/{agent-CVzDy_Oj.d.ts → agent-DSMuwADp.d.ts} +9 -2
- package/dist/{agent-BVKIUP7F.cjs → agent-WOMRT3KX.cjs} +6 -6
- package/dist/{agent-BVKIUP7F.cjs.map → agent-WOMRT3KX.cjs.map} +1 -1
- package/dist/{agent-Cn0sphpA.d.cts → agent-iW5kPpfT.d.cts} +9 -2
- package/dist/{chunk-XJ4C4NFX.js → chunk-2PRGRYEQ.js} +61 -47
- package/dist/chunk-2PRGRYEQ.js.map +1 -0
- package/dist/{chunk-HN4IKB6X.cjs → chunk-2XWAYCFM.cjs} +15 -13
- package/dist/chunk-2XWAYCFM.cjs.map +1 -0
- package/dist/{chunk-VVGFZQZC.js → chunk-3LMVJTNJ.js} +9 -5
- package/dist/chunk-3LMVJTNJ.js.map +1 -0
- package/dist/{chunk-IO4RI5ZJ.cjs → chunk-47EACDOC.cjs} +4 -4
- package/dist/{chunk-IO4RI5ZJ.cjs.map → chunk-47EACDOC.cjs.map} +1 -1
- package/dist/{chunk-LSWHDOCL.cjs → chunk-4UYHP6NF.cjs} +64 -48
- package/dist/chunk-4UYHP6NF.cjs.map +1 -0
- package/dist/{chunk-ZLFFDPXC.js → chunk-73IITAF7.js} +36 -14
- package/dist/chunk-73IITAF7.js.map +1 -0
- package/dist/{chunk-XRPMZ7TO.js → chunk-CYWOJA6B.js} +6 -4
- package/dist/chunk-CYWOJA6B.js.map +1 -0
- package/dist/{chunk-AQW54OWQ.js → chunk-DFBWYETS.js} +5 -3
- package/dist/chunk-DFBWYETS.js.map +1 -0
- package/dist/{chunk-YOVZMN4P.cjs → chunk-DVP3YMDA.cjs} +3 -3
- package/dist/{chunk-YOVZMN4P.cjs.map → chunk-DVP3YMDA.cjs.map} +1 -1
- package/dist/{chunk-EPANMGH7.cjs → chunk-FLDHYF5C.cjs} +11 -2
- package/dist/chunk-FLDHYF5C.cjs.map +1 -0
- package/dist/{chunk-BJ7BPLQK.js → chunk-JX4LB6XO.js} +124 -13
- package/dist/chunk-JX4LB6XO.js.map +1 -0
- package/dist/{chunk-Q6WT5535.cjs → chunk-KL7ZUMK3.cjs} +161 -50
- package/dist/chunk-KL7ZUMK3.cjs.map +1 -0
- package/dist/{chunk-FEAWEBWN.cjs → chunk-PDOXYXWX.cjs} +6 -4
- package/dist/chunk-PDOXYXWX.cjs.map +1 -0
- package/dist/{chunk-NBNRQN6T.js → chunk-QGDPMM3C.js} +11 -2
- package/dist/chunk-QGDPMM3C.js.map +1 -0
- package/dist/{chunk-ZWLFHSON.cjs → chunk-R35ZJAYT.cjs} +38 -15
- package/dist/chunk-R35ZJAYT.cjs.map +1 -0
- package/dist/{chunk-4YD2WI57.cjs → chunk-R427EOZE.cjs} +19 -15
- package/dist/chunk-R427EOZE.cjs.map +1 -0
- package/dist/{chunk-TLVI2OQK.cjs → chunk-SETHRLQS.cjs} +18 -2
- package/dist/chunk-SETHRLQS.cjs.map +1 -0
- package/dist/{chunk-BO3PV3OP.js → chunk-TDED5XES.js} +18 -3
- package/dist/chunk-TDED5XES.js.map +1 -0
- package/dist/{chunk-4GUFNDZR.js → chunk-XOYNB3YN.js} +3 -3
- package/dist/{chunk-4GUFNDZR.js.map → chunk-XOYNB3YN.js.map} +1 -1
- package/dist/{chunk-NJBJ3CUG.js → chunk-ZTP6ZACR.js} +3 -3
- package/dist/{chunk-NJBJ3CUG.js.map → chunk-ZTP6ZACR.js.map} +1 -1
- package/dist/{compact-session-3U2JYTVG.js → compact-session-5HMX6KYT.js} +3 -3
- package/dist/{compact-session-3U2JYTVG.js.map → compact-session-5HMX6KYT.js.map} +1 -1
- package/dist/{compact-session-NM56BREJ.cjs → compact-session-B7P6EU3Z.cjs} +12 -12
- package/dist/{compact-session-NM56BREJ.cjs.map → compact-session-B7P6EU3Z.cjs.map} +1 -1
- package/dist/{cron-BWDYetbq.d.cts → cron-BvxrLW5J.d.cts} +1 -1
- package/dist/{cron-CHn-F0fC.d.ts → cron-DdKzwJqK.d.ts} +1 -1
- package/dist/cron.cjs +5 -5
- package/dist/cron.d.cts +2 -2
- package/dist/cron.d.ts +2 -2
- package/dist/cron.js +4 -4
- package/dist/eval.cjs +9 -9
- package/dist/eval.js +4 -4
- package/dist/{executor-HKHT4CWS.cjs → executor-5QL5AXIZ.cjs} +18 -15
- package/dist/executor-5QL5AXIZ.cjs.map +1 -0
- package/dist/{executor-3D2UDJHW.js → executor-THUXNAFR.js} +6 -3
- package/dist/executor-THUXNAFR.js.map +1 -0
- package/dist/generate-object-A5F576IT.cjs +20 -0
- package/dist/{generate-object-XBWD2PU7.cjs.map → generate-object-A5F576IT.cjs.map} +1 -1
- package/dist/{generate-object-S7MNVF2V.js → generate-object-TBDOBBYW.js} +4 -4
- package/dist/{generate-object-S7MNVF2V.js.map → generate-object-TBDOBBYW.js.map} +1 -1
- package/dist/generate-object.d.ts +14 -1
- package/dist/index.cjs +43 -43
- package/dist/index.d.cts +30 -4
- package/dist/index.d.ts +30 -4
- package/dist/index.js +13 -13
- package/dist/{inject-session-THABTKJY.js → inject-session-75L3NCNL.js} +3 -3
- package/dist/{inject-session-THABTKJY.js.map → inject-session-75L3NCNL.js.map} +1 -1
- package/dist/{inject-session-JVTZNQF6.cjs → inject-session-WOH7TPDX.cjs} +4 -4
- package/dist/{inject-session-JVTZNQF6.cjs.map → inject-session-WOH7TPDX.cjs.map} +1 -1
- package/dist/internal/providers/discovery.d.ts +2 -2
- package/dist/internal/providers/trust-gate.d.ts +35 -0
- package/dist/internal/runtime/plugin-loader/manifest-entry-import.d.ts +17 -0
- package/dist/internal/runtime/plugin-loader/workspace-plugin-trust.d.ts +16 -0
- package/dist/internal/structured-output-helpers.d.ts +5 -2
- package/dist/sandbox/bwrap.d.cts +10 -8
- package/dist/sandbox/bwrap.d.ts +10 -8
- package/dist/sandbox/deny-read.d.cts +24 -0
- package/dist/sandbox/deny-read.d.ts +24 -0
- package/dist/sandbox/index.cjs +114 -35
- package/dist/sandbox/index.cjs.map +1 -1
- package/dist/sandbox/index.d.cts +2 -1
- package/dist/sandbox/index.d.ts +2 -1
- package/dist/sandbox/index.js +96 -21
- package/dist/sandbox/index.js.map +1 -1
- package/dist/sandbox/linux-sandbox.d.cts +16 -1
- package/dist/sandbox/linux-sandbox.d.ts +16 -1
- package/dist/sandbox/local-sandbox.d.cts +3 -1
- package/dist/sandbox/local-sandbox.d.ts +3 -1
- package/dist/sandbox/seccomp-delivery.d.cts +3 -0
- package/dist/sandbox/seccomp-delivery.d.ts +3 -0
- package/dist/sandbox/shell-escape.d.cts +14 -2
- package/dist/sandbox/shell-escape.d.ts +14 -2
- package/dist/sandbox/types.d.cts +45 -0
- package/dist/sandbox/types.d.ts +45 -0
- package/dist/stream-object-AS4YYM4B.cjs +20 -0
- package/dist/{stream-object-TEEK3CAX.cjs.map → stream-object-AS4YYM4B.cjs.map} +1 -1
- package/dist/stream-object-EKM4WGTI.js +7 -0
- package/dist/{stream-object-R6SMYV4R.js.map → stream-object-EKM4WGTI.js.map} +1 -1
- package/dist/stream-object.d.ts +14 -1
- package/dist/subagents-loader.d.cts +1 -1
- package/dist/subagents-loader.d.ts +1 -1
- package/dist/types/agent.d.ts +8 -1
- package/dist/workflow-as-tool.d.ts +39 -5
- package/dist/workflow-errors.d.ts +16 -0
- package/dist/workflow.cjs +31 -23
- package/dist/workflow.d.cts +54 -4
- package/dist/workflow.d.ts +54 -4
- package/dist/workflow.js +2 -2
- package/docs/error-codes.md +16 -13
- package/docs/harness-capability-map.md +50 -4
- package/package.json +1 -1
- package/dist/chunk-4YD2WI57.cjs.map +0 -1
- package/dist/chunk-AQW54OWQ.js.map +0 -1
- package/dist/chunk-BJ7BPLQK.js.map +0 -1
- package/dist/chunk-BO3PV3OP.js.map +0 -1
- package/dist/chunk-EPANMGH7.cjs.map +0 -1
- package/dist/chunk-FEAWEBWN.cjs.map +0 -1
- package/dist/chunk-HN4IKB6X.cjs.map +0 -1
- package/dist/chunk-LSWHDOCL.cjs.map +0 -1
- package/dist/chunk-NBNRQN6T.js.map +0 -1
- package/dist/chunk-Q6WT5535.cjs.map +0 -1
- package/dist/chunk-TLVI2OQK.cjs.map +0 -1
- package/dist/chunk-VVGFZQZC.js.map +0 -1
- package/dist/chunk-XJ4C4NFX.js.map +0 -1
- package/dist/chunk-XRPMZ7TO.js.map +0 -1
- package/dist/chunk-ZLFFDPXC.js.map +0 -1
- package/dist/chunk-ZWLFHSON.cjs.map +0 -1
- package/dist/executor-3D2UDJHW.js.map +0 -1
- package/dist/executor-HKHT4CWS.cjs.map +0 -1
- package/dist/generate-object-XBWD2PU7.cjs +0 -20
- package/dist/stream-object-R6SMYV4R.js +0 -7
- package/dist/stream-object-TEEK3CAX.cjs +0 -20
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { submit, emitRunEvent } from './chunk-HWMGR3HA.js';
|
|
2
|
-
import { enqueueSessionWrite, hydrateSession, persistTurnToTranscript, flushSessionWrites, appendSessionMessage, getSessionMessages, discardSession, clearSession } from './chunk-
|
|
2
|
+
import { enqueueSessionWrite, hydrateSession, persistTurnToTranscript, flushSessionWrites, appendSessionMessage, getSessionMessages, discardSession, clearSession } from './chunk-XOYNB3YN.js';
|
|
3
3
|
import { IndexManager } from './chunk-2C24NSNV.js';
|
|
4
4
|
import { currentPersonalityContext, warnPersonalitySwitchInsideFork } from './chunk-HJ2LV464.js';
|
|
5
|
-
import { extractCodePlugins } from './chunk-2SFBB54R.js';
|
|
5
|
+
import { extractCodePlugins, isCodePlugin } from './chunk-2SFBB54R.js';
|
|
6
6
|
import { createOpenAiCompatibleRuntime } from './chunk-H7G65PNI.js';
|
|
7
7
|
import { persistActiveMemoryTranscript } from './chunk-QK2ERTO3.js';
|
|
8
8
|
import { resolveMaxFacts, writeSessionSummary, resolveMemoryRoot, MEMORY_KINDS, appendFact, readFacts, legacyMemoryJsonPath, memoryMdPath, appendFactToMarkdown } from './chunk-DF77RBF4.js';
|
|
9
9
|
import { FsSessionStore } from './chunk-AB4OPJLD.js';
|
|
10
|
-
import { discoverProviderPlugins, validateApiKeyShape, getConfiguredBaseUrl, httpRequest, isFixtureApiKey, presentProviderCredentialEnvVars, buildDefaultSummarizer, shouldUseRealLocalRuntime, parseSseStream, CircuitBreaker, resolveRunProvider, mergeExplicitApiKey, resolveProviderChain, abortError, tryFirstEvent, relayStream, renderToolResultContentText } from './chunk-
|
|
10
|
+
import { discoverProviderPlugins, validateApiKeyShape, getConfiguredBaseUrl, httpRequest, isFixtureApiKey, presentProviderCredentialEnvVars, readTrustArray, buildDefaultSummarizer, shouldUseRealLocalRuntime, parseSseStream, CircuitBreaker, trustFilePath, resolveRunProvider, mergeExplicitApiKey, resolveProviderChain, abortError, tryFirstEvent, relayStream, renderToolResultContentText } from './chunk-2PRGRYEQ.js';
|
|
11
11
|
import { resolveChildEnv } from './chunk-HKCKOAIO.js';
|
|
12
12
|
import { DEFAULT_MAX_BYTES_PER_FILE, runDiscovery, truncateWithMarker } from './chunk-KCM3RMKR.js';
|
|
13
13
|
import { warnFailureOnce, loadHookConfig, warnOnce } from './chunk-XJ3WU5CZ.js';
|
|
@@ -39,10 +39,11 @@ import { AgentRunError, coerceToKnownAgentRunErrorCode, UnknownAgentError, Confi
|
|
|
39
39
|
import { diag, resolveApiKey, API_KEY_ENV_VAR, redactSecrets, diagFailure } from './chunk-3OY6H3I7.js';
|
|
40
40
|
import { stat, mkdir, readFile, readdir, access, unlink } from 'fs/promises';
|
|
41
41
|
import { randomUUID, createHash } from 'crypto';
|
|
42
|
-
import { join, dirname, resolve, relative
|
|
43
|
-
import { existsSync, readFileSync } from 'fs';
|
|
42
|
+
import { join, dirname, isAbsolute, resolve, relative } from 'path';
|
|
43
|
+
import { existsSync, readFileSync, realpathSync } from 'fs';
|
|
44
44
|
import { platform } from 'process';
|
|
45
45
|
import { spawn } from 'child_process';
|
|
46
|
+
import { pathToFileURL } from 'url';
|
|
46
47
|
import { z } from 'zod';
|
|
47
48
|
import { createRequire } from 'module';
|
|
48
49
|
import { homedir } from 'os';
|
|
@@ -161,7 +162,7 @@ async function agentGenerate(agent, agentModel, agentApiKey, agentLocal, input,
|
|
|
161
162
|
const { output, maxRetries, errorStrategy, ...sendOptions } = options;
|
|
162
163
|
const run = await agent.send(input, sendOptions);
|
|
163
164
|
const result = await run.wait();
|
|
164
|
-
const { generateObjectImpl, GenerateObjectError } = await import('./generate-object-
|
|
165
|
+
const { generateObjectImpl, GenerateObjectError } = await import('./generate-object-TBDOBBYW.js');
|
|
165
166
|
const answer = structurableAnswerOrThrow(result, GenerateObjectError);
|
|
166
167
|
const { getAgentFacade } = await import('./agent-factory-registry-ZVTABLEY.js');
|
|
167
168
|
const facade = getAgentFacade();
|
|
@@ -3081,6 +3082,87 @@ async function safeConversation(run) {
|
|
|
3081
3082
|
return [];
|
|
3082
3083
|
}
|
|
3083
3084
|
}
|
|
3085
|
+
var WORKSPACE_TRUST = {
|
|
3086
|
+
subject: "workspace plugins",
|
|
3087
|
+
entries: "absolute folder realpaths"
|
|
3088
|
+
};
|
|
3089
|
+
function workspaceTrustRecordPath() {
|
|
3090
|
+
return join(dirname(trustFilePath()), "trusted-workspace-plugins.json");
|
|
3091
|
+
}
|
|
3092
|
+
function readTrustedWorkspaceFolders() {
|
|
3093
|
+
const path = workspaceTrustRecordPath();
|
|
3094
|
+
const trusted = /* @__PURE__ */ new Set();
|
|
3095
|
+
for (const entry of readTrustArray(path, WORKSPACE_TRUST)) {
|
|
3096
|
+
if (isAbsolute(entry)) {
|
|
3097
|
+
trusted.add(entry);
|
|
3098
|
+
continue;
|
|
3099
|
+
}
|
|
3100
|
+
diag(
|
|
3101
|
+
`[theokit-sdk] WARN: ${path} entry "${entry}" is not an absolute path \u2014 discarded (entries must be ${WORKSPACE_TRUST.entries})
|
|
3102
|
+
`
|
|
3103
|
+
);
|
|
3104
|
+
}
|
|
3105
|
+
return trusted;
|
|
3106
|
+
}
|
|
3107
|
+
|
|
3108
|
+
// src/internal/runtime/plugin-loader/manifest-entry-import.ts
|
|
3109
|
+
var warnedFolders = globalSingleton(
|
|
3110
|
+
"theokit-sdk.plugins.manifest-untrusted-warned",
|
|
3111
|
+
() => /* @__PURE__ */ new Set()
|
|
3112
|
+
);
|
|
3113
|
+
async function importTrustedManifestPlugins(candidates, trustedFolders) {
|
|
3114
|
+
const plugins = [];
|
|
3115
|
+
for (const candidate of candidates) {
|
|
3116
|
+
const realFolder = realpathOrUndefined(candidate.folderPath);
|
|
3117
|
+
if (realFolder === void 0 || !trustedFolders.has(realFolder)) {
|
|
3118
|
+
warnUntrustedOnce(candidate, realFolder ?? candidate.folderPath);
|
|
3119
|
+
continue;
|
|
3120
|
+
}
|
|
3121
|
+
plugins.push(await importEntry(candidate));
|
|
3122
|
+
}
|
|
3123
|
+
return plugins;
|
|
3124
|
+
}
|
|
3125
|
+
function realpathOrUndefined(path) {
|
|
3126
|
+
try {
|
|
3127
|
+
return realpathSync(path);
|
|
3128
|
+
} catch {
|
|
3129
|
+
return void 0;
|
|
3130
|
+
}
|
|
3131
|
+
}
|
|
3132
|
+
function warnUntrustedOnce(candidate, realFolder) {
|
|
3133
|
+
if (warnedFolders.has(candidate.entryPath)) return;
|
|
3134
|
+
warnedFolders.add(candidate.entryPath);
|
|
3135
|
+
const { folder, metadata } = candidate;
|
|
3136
|
+
const declared = metadata.name === folder ? "" : ` (declares name "${metadata.name}")`;
|
|
3137
|
+
diag(
|
|
3138
|
+
`[theokit-sdk] workspace plugin folder "${folder}"${declared} is not trusted \u2014 its entry was not imported. To trust it, add "${realFolder}" to ${workspaceTrustRecordPath()} (JSON array of folder realpaths).
|
|
3139
|
+
`
|
|
3140
|
+
);
|
|
3141
|
+
}
|
|
3142
|
+
async function importEntry(candidate) {
|
|
3143
|
+
const { metadata } = candidate;
|
|
3144
|
+
const entry = metadata.entry ?? "";
|
|
3145
|
+
let mod;
|
|
3146
|
+
try {
|
|
3147
|
+
mod = await import(pathToFileURL(candidate.entryPath).href);
|
|
3148
|
+
} catch (cause) {
|
|
3149
|
+
throw new ConfigurationError(`Plugin ${metadata.name} entry failed to import: ${entry}`, {
|
|
3150
|
+
code: "plugin_entry_import_failed",
|
|
3151
|
+
cause
|
|
3152
|
+
});
|
|
3153
|
+
}
|
|
3154
|
+
const plugin = mod.default;
|
|
3155
|
+
if (!isGeneralPlugin(plugin)) {
|
|
3156
|
+
throw new ConfigurationError(
|
|
3157
|
+
`Plugin ${metadata.name} entry must default-export a general plugin (kind "general", name, register): ${entry}`,
|
|
3158
|
+
{ code: "plugin_entry_shape" }
|
|
3159
|
+
);
|
|
3160
|
+
}
|
|
3161
|
+
return plugin;
|
|
3162
|
+
}
|
|
3163
|
+
function isGeneralPlugin(value) {
|
|
3164
|
+
return isCodePlugin(value) && value.kind === "general" && typeof value.name === "string";
|
|
3165
|
+
}
|
|
3084
3166
|
var SkillsManager = class {
|
|
3085
3167
|
constructor(cwd, _enabled, settingSourcesIncludeProject, skillsDir, inline, compatSources = []) {
|
|
3086
3168
|
this.cwd = cwd;
|
|
@@ -4576,6 +4658,12 @@ var PluginsManager = class {
|
|
|
4576
4658
|
localPaths;
|
|
4577
4659
|
compatSources;
|
|
4578
4660
|
plugins = [];
|
|
4661
|
+
/**
|
|
4662
|
+
* B-686 — where each listed object was discovered. Keyed by the object, not by name: two plugins
|
|
4663
|
+
* may share a declared name across roots or folders, and a field would leak a host path through
|
|
4664
|
+
* `plugins.list()`. `refresh()` replaces the objects, so stale origins are collected with them.
|
|
4665
|
+
*/
|
|
4666
|
+
#origin = /* @__PURE__ */ new WeakMap();
|
|
4579
4667
|
async initialize() {
|
|
4580
4668
|
this.assertCloudRules();
|
|
4581
4669
|
if (!this.settingSourcesIncludePlugins) {
|
|
@@ -4601,6 +4689,7 @@ var PluginsManager = class {
|
|
|
4601
4689
|
const cliMetadata = await loadPluginManifestFromJson(this.cwd, cliPath, folderName);
|
|
4602
4690
|
if (this.enabled === void 0 || this.enabled.includes(cliMetadata.name)) {
|
|
4603
4691
|
this.plugins.push(cliMetadata);
|
|
4692
|
+
this.#origin.set(cliMetadata, { root: pluginsRoot, folder: folderName });
|
|
4604
4693
|
}
|
|
4605
4694
|
continue;
|
|
4606
4695
|
}
|
|
@@ -4623,12 +4712,26 @@ var PluginsManager = class {
|
|
|
4623
4712
|
if (this.enabled === void 0 || this.enabled.includes(metadata.name)) {
|
|
4624
4713
|
await this.assertEntryFileExists(metadata, folderName, pluginsRoot);
|
|
4625
4714
|
this.plugins.push(metadata);
|
|
4715
|
+
this.#origin.set(metadata, { root: pluginsRoot, folder: folderName });
|
|
4626
4716
|
}
|
|
4627
4717
|
}
|
|
4628
4718
|
}
|
|
4629
4719
|
list() {
|
|
4630
4720
|
return Promise.resolve(this.plugins);
|
|
4631
4721
|
}
|
|
4722
|
+
/** Listed native-root plugins that declare an `entry`, in list order. Reads no file. */
|
|
4723
|
+
nativeEntryCandidates() {
|
|
4724
|
+
const nativeRoot = join(theokitConfigRoot(this.cwd), "plugins");
|
|
4725
|
+
return this.plugins.flatMap((metadata) => {
|
|
4726
|
+
const origin = this.#origin.get(metadata);
|
|
4727
|
+
if (origin === void 0 || origin.root !== nativeRoot || metadata.entry === void 0) {
|
|
4728
|
+
return [];
|
|
4729
|
+
}
|
|
4730
|
+
const folderPath = join(origin.root, origin.folder);
|
|
4731
|
+
const entryPath = safePathJoin(folderPath, metadata.entry);
|
|
4732
|
+
return [{ metadata, folder: origin.folder, folderPath, entryPath }];
|
|
4733
|
+
});
|
|
4734
|
+
}
|
|
4632
4735
|
async assertEntryFileExists(metadata, folderName, pluginsRoot) {
|
|
4633
4736
|
const entry = metadata.entry;
|
|
4634
4737
|
if (entry === void 0) return;
|
|
@@ -7846,6 +7949,7 @@ var RealLocalRun = class extends FixtureRunBase {
|
|
|
7846
7949
|
}
|
|
7847
7950
|
async initializeMcp(inputs) {
|
|
7848
7951
|
for (const [name, client] of inputs.mcp.entries()) {
|
|
7952
|
+
if (this.terminated) break;
|
|
7849
7953
|
try {
|
|
7850
7954
|
await client.initialize();
|
|
7851
7955
|
} catch (cause) {
|
|
@@ -10286,13 +10390,20 @@ var LocalAgent = class {
|
|
|
10286
10390
|
workspaceCwd: this.workspaceCwd
|
|
10287
10391
|
});
|
|
10288
10392
|
}
|
|
10393
|
+
/** B-686 — the workspace trust record is read only when a native manifest declares an entry. */
|
|
10394
|
+
async importManifestPlugins() {
|
|
10395
|
+
const candidates = this.pluginsManager?.nativeEntryCandidates() ?? [];
|
|
10396
|
+
if (candidates.length === 0) return [];
|
|
10397
|
+
return importTrustedManifestPlugins(candidates, readTrustedWorkspaceFolders());
|
|
10398
|
+
}
|
|
10289
10399
|
async initialize() {
|
|
10290
10400
|
await this.hooksExecutor.initialize(this.settingSourcesIncludeProject);
|
|
10291
10401
|
if (this.context !== void 0) await this.context.initialize();
|
|
10292
10402
|
if (this.skillsManager !== void 0) await this.skillsManager.initialize();
|
|
10293
10403
|
if (this.pluginsManager !== void 0) await this.pluginsManager.initialize();
|
|
10294
10404
|
const codePlugins = extractCodePlugins(this.options.plugins);
|
|
10295
|
-
await this.
|
|
10405
|
+
const manifestPlugins = await this.importManifestPlugins();
|
|
10406
|
+
await this.pluginManagerCode.initialize([...codePlugins, ...manifestPlugins]);
|
|
10296
10407
|
this.resolvedSubagents = await loadSubagents(
|
|
10297
10408
|
this.workspaceCwd,
|
|
10298
10409
|
this.settingSourcesIncludeProject,
|
|
@@ -10983,7 +11094,7 @@ var Agent = class _Agent {
|
|
|
10983
11094
|
* @public
|
|
10984
11095
|
*/
|
|
10985
11096
|
static async generateObject(options) {
|
|
10986
|
-
const { generateObjectImpl } = await import('./generate-object-
|
|
11097
|
+
const { generateObjectImpl } = await import('./generate-object-TBDOBBYW.js');
|
|
10987
11098
|
return generateObjectImpl(options, {
|
|
10988
11099
|
create: (opts) => _Agent.create(opts),
|
|
10989
11100
|
delete: (agentId) => _Agent.delete(agentId)
|
|
@@ -11007,7 +11118,7 @@ var Agent = class _Agent {
|
|
|
11007
11118
|
delete: (agentId) => _Agent.delete(agentId)
|
|
11008
11119
|
};
|
|
11009
11120
|
async function* wrapper() {
|
|
11010
|
-
streamObjectImport ??= import('./stream-object-
|
|
11121
|
+
streamObjectImport ??= import('./stream-object-EKM4WGTI.js');
|
|
11011
11122
|
const { streamObjectImpl } = await streamObjectImport;
|
|
11012
11123
|
yield* streamObjectImpl(options, deps);
|
|
11013
11124
|
}
|
|
@@ -11183,7 +11294,7 @@ var Agent = class _Agent {
|
|
|
11183
11294
|
*/
|
|
11184
11295
|
static async compact(agentId, options = {}) {
|
|
11185
11296
|
const reg = await requireLocalAgent(agentId, "compact");
|
|
11186
|
-
const { compactSessionTranscript, buildDefaultSummarizer: buildDefaultSummarizer2 } = await import('./compact-session-
|
|
11297
|
+
const { compactSessionTranscript, buildDefaultSummarizer: buildDefaultSummarizer2 } = await import('./compact-session-5HMX6KYT.js');
|
|
11187
11298
|
const { cwd, model, store } = await openLocalStore(reg);
|
|
11188
11299
|
return enqueueSessionWrite(
|
|
11189
11300
|
cwd,
|
|
@@ -11213,7 +11324,7 @@ var Agent = class _Agent {
|
|
|
11213
11324
|
*/
|
|
11214
11325
|
static async injectSessionTurn(agentId, turn) {
|
|
11215
11326
|
const reg = await requireLocalAgent(agentId, "injectSessionTurn");
|
|
11216
|
-
const { injectSessionTurn } = await import('./inject-session-
|
|
11327
|
+
const { injectSessionTurn } = await import('./inject-session-75L3NCNL.js');
|
|
11217
11328
|
const { cwd, model, store } = await openLocalStore(reg);
|
|
11218
11329
|
await injectSessionTurn({
|
|
11219
11330
|
store,
|
|
@@ -11371,5 +11482,5 @@ async function openLocalStore(reg) {
|
|
|
11371
11482
|
}
|
|
11372
11483
|
|
|
11373
11484
|
export { Agent, AgentBuilder, DEFAULT_AGENTIC_MODEL_ID, MEMORY_EMBEDDING_ADAPTERS, Tool, ToolError, UsageAccumulator, computeCost, generateCronId, getPricingEntry, managedSettingsPathFor, openRouterMemoryEmbeddingProviderAdapter, readManagedSettings, resolveSessionDir };
|
|
11374
|
-
//# sourceMappingURL=chunk-
|
|
11375
|
-
//# sourceMappingURL=chunk-
|
|
11485
|
+
//# sourceMappingURL=chunk-JX4LB6XO.js.map
|
|
11486
|
+
//# sourceMappingURL=chunk-JX4LB6XO.js.map
|