@theokit/sdk 5.1.0 → 5.2.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 +88 -0
- package/dist/{agent-ARLOD4JX.cjs → agent-GACKKINM.cjs} +7 -7
- package/dist/{agent-ARLOD4JX.cjs.map → agent-GACKKINM.cjs.map} +1 -1
- package/dist/{agent-N6WJ54ML.js → agent-VUNM33WJ.js} +6 -6
- package/dist/{agent-N6WJ54ML.js.map → agent-VUNM33WJ.js.map} +1 -1
- package/dist/{chunk-OYD3U3LY.js → chunk-43H4EBS2.js} +7 -7
- package/dist/{chunk-OYD3U3LY.js.map → chunk-43H4EBS2.js.map} +1 -1
- package/dist/{chunk-AW6F6HZR.js → chunk-AI4MXACC.js} +3 -3
- package/dist/{chunk-AW6F6HZR.js.map → chunk-AI4MXACC.js.map} +1 -1
- package/dist/{chunk-D3CCY3A2.cjs → chunk-DEJCKB65.cjs} +39 -39
- package/dist/{chunk-D3CCY3A2.cjs.map → chunk-DEJCKB65.cjs.map} +1 -1
- package/dist/{chunk-OQRGVTQF.js → chunk-DLFWMJE3.js} +3 -3
- package/dist/{chunk-OQRGVTQF.js.map → chunk-DLFWMJE3.js.map} +1 -1
- package/dist/{chunk-NYQ3IS7K.cjs → chunk-DWB3CN46.cjs} +8 -3
- package/dist/chunk-DWB3CN46.cjs.map +1 -0
- package/dist/{chunk-QYLZQ43D.cjs → chunk-IQBDR5YZ.cjs} +5 -5
- package/dist/{chunk-QYLZQ43D.cjs.map → chunk-IQBDR5YZ.cjs.map} +1 -1
- package/dist/{chunk-67SBTGMA.cjs → chunk-PEAOQMWE.cjs} +4 -4
- package/dist/{chunk-67SBTGMA.cjs.map → chunk-PEAOQMWE.cjs.map} +1 -1
- package/dist/{chunk-WMWEI3NS.js → chunk-RP3VXJMA.js} +8 -3
- package/dist/chunk-RP3VXJMA.js.map +1 -0
- package/dist/{chunk-KGANQYP7.cjs → chunk-SSIRPWWD.cjs} +5 -5
- package/dist/{chunk-KGANQYP7.cjs.map → chunk-SSIRPWWD.cjs.map} +1 -1
- package/dist/{chunk-XU6MLSC6.js → chunk-WHTMFN4Q.js} +3 -3
- package/dist/{chunk-XU6MLSC6.js.map → chunk-WHTMFN4Q.js.map} +1 -1
- package/dist/{context-4QOEWRDF.cjs → context-3YMZDEX5.cjs} +7 -7
- package/dist/{context-4QOEWRDF.cjs.map → context-3YMZDEX5.cjs.map} +1 -1
- package/dist/context-XNREEC7M.js +6 -0
- package/dist/{context-Z3CFTT3H.js.map → context-XNREEC7M.js.map} +1 -1
- package/dist/cron.cjs +6 -6
- package/dist/cron.js +5 -5
- package/dist/eval.cjs +5 -5
- package/dist/eval.js +4 -4
- package/dist/index.cjs +55 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +66 -1
- package/dist/index.d.ts +66 -1
- package/dist/index.js +41 -8
- package/dist/index.js.map +1 -1
- package/dist/internal/persistence/index.cjs +4 -4
- package/dist/internal/persistence/index.js +1 -1
- package/dist/internal/runtime/compat/foreign-config-sources.d.ts +16 -6
- package/dist/subagents-loader-7G76XOZU.cjs +16 -0
- package/dist/{subagents-loader-GEHYCMEX.cjs.map → subagents-loader-7G76XOZU.cjs.map} +1 -1
- package/dist/subagents-loader-PAZVOZHI.js +7 -0
- package/dist/{subagents-loader-DOBTTICM.js.map → subagents-loader-PAZVOZHI.js.map} +1 -1
- package/dist/subagents-loader.cjs +3 -3
- package/dist/subagents-loader.js +2 -2
- package/docs/harness-capability-map.md +4 -1
- package/package.json +1 -1
- package/dist/chunk-NYQ3IS7K.cjs.map +0 -1
- package/dist/chunk-WMWEI3NS.js.map +0 -1
- package/dist/context-Z3CFTT3H.js +0 -6
- package/dist/subagents-loader-DOBTTICM.js +0 -7
- package/dist/subagents-loader-GEHYCMEX.cjs +0 -16
package/dist/eval.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { shellEscapePosix, LocalSandbox } from './chunk-O6USDERH.js';
|
|
2
|
-
import { openRouterMemoryEmbeddingProviderAdapter } from './chunk-
|
|
2
|
+
import { openRouterMemoryEmbeddingProviderAdapter } from './chunk-43H4EBS2.js';
|
|
3
3
|
import './chunk-K2VMFZQ5.js';
|
|
4
4
|
import './chunk-AWINL3ZC.js';
|
|
5
5
|
import { getTracer } from './chunk-K2BQQ445.js';
|
|
6
6
|
import './chunk-7SZAV6QG.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-AI4MXACC.js';
|
|
8
8
|
import './chunk-2SFBB54R.js';
|
|
9
9
|
import './chunk-55GB6JYQ.js';
|
|
10
10
|
import './chunk-H73MEMQB.js';
|
|
@@ -43,8 +43,8 @@ export { JsonlParseError, loadJsonl } from './chunk-TA3K7SBK.js';
|
|
|
43
43
|
import './chunk-Q5EWJPRY.js';
|
|
44
44
|
import './chunk-EIQFAOFD.js';
|
|
45
45
|
import './chunk-3JHIFQ4I.js';
|
|
46
|
-
import './chunk-
|
|
47
|
-
import './chunk-
|
|
46
|
+
import './chunk-DLFWMJE3.js';
|
|
47
|
+
import './chunk-RP3VXJMA.js';
|
|
48
48
|
import './chunk-JNAA4G4H.js';
|
|
49
49
|
import './chunk-6M2OIS4Y.js';
|
|
50
50
|
import './chunk-R7WIIPUR.js';
|
package/dist/index.cjs
CHANGED
|
@@ -9,13 +9,13 @@ require('./chunk-7JJ3A6AT.cjs');
|
|
|
9
9
|
var chunk4HS6FFGL_cjs = require('./chunk-4HS6FFGL.cjs');
|
|
10
10
|
require('./chunk-4A3SKJ53.cjs');
|
|
11
11
|
require('./chunk-VTYY7XL5.cjs');
|
|
12
|
-
var
|
|
13
|
-
var
|
|
12
|
+
var chunkPEAOQMWE_cjs = require('./chunk-PEAOQMWE.cjs');
|
|
13
|
+
var chunkDEJCKB65_cjs = require('./chunk-DEJCKB65.cjs');
|
|
14
14
|
var chunkKVSAY6NZ_cjs = require('./chunk-KVSAY6NZ.cjs');
|
|
15
15
|
require('./chunk-Y2KYR2ED.cjs');
|
|
16
16
|
require('./chunk-BUUUWQMB.cjs');
|
|
17
17
|
require('./chunk-Z2JFX372.cjs');
|
|
18
|
-
require('./chunk-
|
|
18
|
+
require('./chunk-SSIRPWWD.cjs');
|
|
19
19
|
require('./chunk-BV2MWEMV.cjs');
|
|
20
20
|
require('./chunk-D6POWE7E.cjs');
|
|
21
21
|
require('./chunk-GHX4P3V2.cjs');
|
|
@@ -53,8 +53,8 @@ require('./chunk-BJUJT5ED.cjs');
|
|
|
53
53
|
var chunkZF2LDKQQ_cjs = require('./chunk-ZF2LDKQQ.cjs');
|
|
54
54
|
var chunkHCT4HPCL_cjs = require('./chunk-HCT4HPCL.cjs');
|
|
55
55
|
var chunkJLRLCBJ4_cjs = require('./chunk-JLRLCBJ4.cjs');
|
|
56
|
-
require('./chunk-
|
|
57
|
-
require('./chunk-
|
|
56
|
+
require('./chunk-IQBDR5YZ.cjs');
|
|
57
|
+
require('./chunk-DWB3CN46.cjs');
|
|
58
58
|
require('./chunk-HW7SEELD.cjs');
|
|
59
59
|
var chunkATT276RD_cjs = require('./chunk-ATT276RD.cjs');
|
|
60
60
|
var chunk3EE6LVWT_cjs = require('./chunk-3EE6LVWT.cjs');
|
|
@@ -74,8 +74,8 @@ var path = require('path');
|
|
|
74
74
|
// src/agent-factory.ts
|
|
75
75
|
function createAgentFactory(common) {
|
|
76
76
|
return {
|
|
77
|
-
forSession: (agentId, overrides) =>
|
|
78
|
-
getOrCreate: (agentId, overrides) =>
|
|
77
|
+
forSession: (agentId, overrides) => chunkDEJCKB65_cjs.Agent.create(mergeAgentOptions(common, overrides, agentId)),
|
|
78
|
+
getOrCreate: (agentId, overrides) => chunkDEJCKB65_cjs.Agent.getOrCreate(agentId, mergeAgentOptions(common, overrides, agentId))
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
function mergeAgentOptions(common, overrides, agentId) {
|
|
@@ -914,6 +914,39 @@ var NoopMemoryProvider = class {
|
|
|
914
914
|
return createNoopMemoryProvider();
|
|
915
915
|
}
|
|
916
916
|
};
|
|
917
|
+
|
|
918
|
+
// src/internal/runtime/validation/effective-tools.ts
|
|
919
|
+
var ALWAYS_REGISTERED = ["shell"];
|
|
920
|
+
var MEMORY_BUILTINS = ["memory_search", "memory_get"];
|
|
921
|
+
function effectiveToolNames(options) {
|
|
922
|
+
return { names: resolvableNames(options), unresolved: unresolvableSources(options) };
|
|
923
|
+
}
|
|
924
|
+
function resolvableNames(options) {
|
|
925
|
+
const withheld = new Set(options.withheldBuiltinTools ?? []);
|
|
926
|
+
const builtins = [
|
|
927
|
+
...ALWAYS_REGISTERED,
|
|
928
|
+
...options.memory?.enabled === true ? MEMORY_BUILTINS : []
|
|
929
|
+
];
|
|
930
|
+
return [
|
|
931
|
+
...builtins.filter((builtin) => !withheld.has(builtin)),
|
|
932
|
+
...(options.tools ?? []).map((tool) => tool.name)
|
|
933
|
+
];
|
|
934
|
+
}
|
|
935
|
+
function unresolvableSources(options) {
|
|
936
|
+
const unresolved = [];
|
|
937
|
+
if (options.mcpServers !== void 0 && Object.keys(options.mcpServers).length > 0) {
|
|
938
|
+
unresolved.push("mcp");
|
|
939
|
+
}
|
|
940
|
+
if (hasPlugins(options.plugins)) unresolved.push("plugins");
|
|
941
|
+
if (options.reasoning === true) unresolved.push("reasoning");
|
|
942
|
+
return unresolved;
|
|
943
|
+
}
|
|
944
|
+
function hasPlugins(plugins) {
|
|
945
|
+
if (plugins === void 0) return false;
|
|
946
|
+
if (Array.isArray(plugins)) return plugins.length > 0;
|
|
947
|
+
const enabled = plugins.enabled;
|
|
948
|
+
return enabled === void 0 || enabled.length > 0;
|
|
949
|
+
}
|
|
917
950
|
var JobQueue = class {
|
|
918
951
|
jobs = /* @__PURE__ */ new Map();
|
|
919
952
|
controllers = /* @__PURE__ */ new Map();
|
|
@@ -1293,7 +1326,7 @@ var Memory = {
|
|
|
1293
1326
|
return await peer.IndexManager.open(openArgs);
|
|
1294
1327
|
}
|
|
1295
1328
|
const { IndexManager } = await import('./index-manager-3UNPYH34.cjs');
|
|
1296
|
-
openArgs.embedding = await resolveEmbedding(opts.embedding,
|
|
1329
|
+
openArgs.embedding = await resolveEmbedding(opts.embedding, chunkDEJCKB65_cjs.MEMORY_EMBEDDING_ADAPTERS);
|
|
1297
1330
|
return await IndexManager.open(openArgs);
|
|
1298
1331
|
},
|
|
1299
1332
|
/**
|
|
@@ -1304,7 +1337,7 @@ var Memory = {
|
|
|
1304
1337
|
*/
|
|
1305
1338
|
async runDreamingSweep(opts) {
|
|
1306
1339
|
const peer = await tryLoadSdkMemoryPeer();
|
|
1307
|
-
const catalog = peer !== null ? peer.MEMORY_EMBEDDING_ADAPTERS :
|
|
1340
|
+
const catalog = peer !== null ? peer.MEMORY_EMBEDDING_ADAPTERS : chunkDEJCKB65_cjs.MEMORY_EMBEDDING_ADAPTERS;
|
|
1308
1341
|
const sweepArgs = await buildDreamingSweepArgs(opts, catalog);
|
|
1309
1342
|
const result = peer !== null ? (
|
|
1310
1343
|
// biome-ignore lint/suspicious/noExplicitAny: peer is dynamically loaded — structural compat ensured by sdk-memory
|
|
@@ -1728,7 +1761,7 @@ function guardSessionDestruction(sessionId, live) {
|
|
|
1728
1761
|
// src/session-messages.ts
|
|
1729
1762
|
async function readSessionMessages2(options) {
|
|
1730
1763
|
const cwd = options.cwd ?? process.cwd();
|
|
1731
|
-
const baseDir =
|
|
1764
|
+
const baseDir = chunkDEJCKB65_cjs.resolveSessionDir({ sessionDir: options.sessionDir });
|
|
1732
1765
|
return chunkYIFFF23U_cjs.readSessionMessages(new chunk7FDKWDA2_cjs.FsSessionStore({ baseDir, cwd }), options.sessionId);
|
|
1733
1766
|
}
|
|
1734
1767
|
|
|
@@ -1745,7 +1778,7 @@ function isBuiltAgent(m) {
|
|
|
1745
1778
|
return typeof m.send === "function";
|
|
1746
1779
|
}
|
|
1747
1780
|
async function materialize(def, index) {
|
|
1748
|
-
const { Agent: Agent2 } = await import('./agent-
|
|
1781
|
+
const { Agent: Agent2 } = await import('./agent-GACKKINM.cjs');
|
|
1749
1782
|
return Agent2.create({
|
|
1750
1783
|
// `AgentDefinition.model` admits the sentinel `'inherit'`, which is not a model id. Inheriting
|
|
1751
1784
|
// here means "declare nothing and let the default apply" — forwarding the literal would create
|
|
@@ -1887,7 +1920,7 @@ var FIXTURE_USER = {
|
|
|
1887
1920
|
};
|
|
1888
1921
|
var FIXTURE_MODELS = [
|
|
1889
1922
|
{
|
|
1890
|
-
id:
|
|
1923
|
+
id: chunkDEJCKB65_cjs.DEFAULT_AGENTIC_MODEL_ID,
|
|
1891
1924
|
name: "Gemini 2.0 Flash",
|
|
1892
1925
|
displayName: "Gemini 2.0 Flash",
|
|
1893
1926
|
parameters: [
|
|
@@ -2090,7 +2123,7 @@ var Theokit = class {
|
|
|
2090
2123
|
envVars: p.envVars
|
|
2091
2124
|
}));
|
|
2092
2125
|
},
|
|
2093
|
-
embeddingAdapters: () => Object.entries(
|
|
2126
|
+
embeddingAdapters: () => Object.entries(chunkDEJCKB65_cjs.MEMORY_EMBEDDING_ADAPTERS).map(([id, adapter]) => ({
|
|
2094
2127
|
id,
|
|
2095
2128
|
transport: adapter.transport,
|
|
2096
2129
|
defaultModel: adapter.defaultModel
|
|
@@ -2309,35 +2342,35 @@ Object.defineProperty(exports, "fn", {
|
|
|
2309
2342
|
});
|
|
2310
2343
|
Object.defineProperty(exports, "Cron", {
|
|
2311
2344
|
enumerable: true,
|
|
2312
|
-
get: function () { return
|
|
2345
|
+
get: function () { return chunkPEAOQMWE_cjs.Cron; }
|
|
2313
2346
|
});
|
|
2314
2347
|
Object.defineProperty(exports, "Agent", {
|
|
2315
2348
|
enumerable: true,
|
|
2316
|
-
get: function () { return
|
|
2349
|
+
get: function () { return chunkDEJCKB65_cjs.Agent; }
|
|
2317
2350
|
});
|
|
2318
2351
|
Object.defineProperty(exports, "AgentBuilder", {
|
|
2319
2352
|
enumerable: true,
|
|
2320
|
-
get: function () { return
|
|
2353
|
+
get: function () { return chunkDEJCKB65_cjs.AgentBuilder; }
|
|
2321
2354
|
});
|
|
2322
2355
|
Object.defineProperty(exports, "Tool", {
|
|
2323
2356
|
enumerable: true,
|
|
2324
|
-
get: function () { return
|
|
2357
|
+
get: function () { return chunkDEJCKB65_cjs.Tool; }
|
|
2325
2358
|
});
|
|
2326
2359
|
Object.defineProperty(exports, "ToolError", {
|
|
2327
2360
|
enumerable: true,
|
|
2328
|
-
get: function () { return
|
|
2361
|
+
get: function () { return chunkDEJCKB65_cjs.ToolError; }
|
|
2329
2362
|
});
|
|
2330
2363
|
Object.defineProperty(exports, "UsageAccumulator", {
|
|
2331
2364
|
enumerable: true,
|
|
2332
|
-
get: function () { return
|
|
2365
|
+
get: function () { return chunkDEJCKB65_cjs.UsageAccumulator; }
|
|
2333
2366
|
});
|
|
2334
2367
|
Object.defineProperty(exports, "computeCost", {
|
|
2335
2368
|
enumerable: true,
|
|
2336
|
-
get: function () { return
|
|
2369
|
+
get: function () { return chunkDEJCKB65_cjs.computeCost; }
|
|
2337
2370
|
});
|
|
2338
2371
|
Object.defineProperty(exports, "getPricingEntry", {
|
|
2339
2372
|
enumerable: true,
|
|
2340
|
-
get: function () { return
|
|
2373
|
+
get: function () { return chunkDEJCKB65_cjs.getPricingEntry; }
|
|
2341
2374
|
});
|
|
2342
2375
|
Object.defineProperty(exports, "emitRunEvent", {
|
|
2343
2376
|
enumerable: true,
|
|
@@ -2462,6 +2495,7 @@ exports.createCounterBudgetTracker = createCounterBudgetTracker;
|
|
|
2462
2495
|
exports.decideApproval = decideApproval;
|
|
2463
2496
|
exports.describeAction = describeAction;
|
|
2464
2497
|
exports.describeCredential = describeCredential;
|
|
2498
|
+
exports.effectiveToolNames = effectiveToolNames;
|
|
2465
2499
|
exports.evaluateBlastRadius = evaluateBlastRadius;
|
|
2466
2500
|
exports.extractRawId = extractRawId;
|
|
2467
2501
|
exports.foldLayers = foldLayers;
|