@theokit/sdk 5.4.0 → 5.5.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 +41 -0
- package/dist/{agent-Bmy2G_ml.d.ts → agent-CjMVbhhY.d.ts} +22 -0
- package/dist/{agent-C1Efo7PI.d.cts → agent-DyB_lzrx.d.cts} +22 -0
- package/dist/{agent-MNINE73R.js → agent-G3T7Q3SQ.js} +4 -4
- package/dist/{agent-MNINE73R.js.map → agent-G3T7Q3SQ.js.map} +1 -1
- package/dist/{agent-AUVD4TI4.cjs → agent-YWSIHHFM.cjs} +5 -5
- package/dist/{agent-AUVD4TI4.cjs.map → agent-YWSIHHFM.cjs.map} +1 -1
- package/dist/{chunk-J6KZE2ZQ.cjs → chunk-2ZLQZHZC.cjs} +4 -4
- package/dist/{chunk-J6KZE2ZQ.cjs.map → chunk-2ZLQZHZC.cjs.map} +1 -1
- package/dist/{chunk-KWGSBZ2Q.js → chunk-M3ZGRGOG.js} +3 -3
- package/dist/{chunk-KWGSBZ2Q.js.map → chunk-M3ZGRGOG.js.map} +1 -1
- package/dist/{chunk-IKBLU7ZS.js → chunk-ODBID5TG.js} +11 -6
- package/dist/chunk-ODBID5TG.js.map +1 -0
- package/dist/{chunk-XD3FS5OI.js → chunk-S6B5XYC3.js} +3 -3
- package/dist/chunk-S6B5XYC3.js.map +1 -0
- package/dist/{chunk-UALC6Q3J.cjs → chunk-UKJJRU7C.cjs} +28 -23
- package/dist/chunk-UKJJRU7C.cjs.map +1 -0
- package/dist/{chunk-3FDU5JFE.cjs → chunk-VY6NKMOA.cjs} +3 -3
- package/dist/chunk-VY6NKMOA.cjs.map +1 -0
- package/dist/{context-EGM6CHXD.js → context-3HPU754C.js} +3 -3
- package/dist/{context-EGM6CHXD.js.map → context-3HPU754C.js.map} +1 -1
- package/dist/{context-4AIK26QB.cjs → context-JTGSBJT6.cjs} +6 -6
- package/dist/{context-4AIK26QB.cjs.map → context-JTGSBJT6.cjs.map} +1 -1
- package/dist/{cron-DSMdlhyF.d.cts → cron-Bgivg88c.d.cts} +1 -1
- package/dist/{cron-Dcdrdv_T.d.ts → cron-CNUa7PDo.d.ts} +1 -1
- package/dist/cron.cjs +4 -4
- package/dist/cron.d.cts +2 -2
- package/dist/cron.d.ts +2 -2
- package/dist/cron.js +3 -3
- package/dist/eval.cjs +3 -3
- package/dist/eval.js +2 -2
- package/dist/index.cjs +19 -19
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +5 -5
- package/dist/internal/runtime/hooks/hooks-executor.d.ts +10 -0
- package/dist/internal/runtime/hooks/hooks-source.d.ts +10 -0
- package/dist/subagents-loader.d.cts +1 -1
- package/dist/subagents-loader.d.ts +1 -1
- package/dist/types/hooks.d.ts +22 -0
- package/docs/error-codes.md +4 -4
- package/package.json +1 -1
- package/dist/chunk-3FDU5JFE.cjs.map +0 -1
- package/dist/chunk-IKBLU7ZS.js.map +0 -1
- package/dist/chunk-UALC6Q3J.cjs.map +0 -1
- package/dist/chunk-XD3FS5OI.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { submit, emitRunEvent } from './chunk-K2VMFZQ5.js';
|
|
2
2
|
import { enqueueSessionWrite, hydrateSession, persistTurnToTranscript, flushSessionWrites, appendSessionMessage, getSessionMessages, discardSession, clearSession } from './chunk-2QKV4CGK.js';
|
|
3
3
|
import { IndexManager } from './chunk-7SZAV6QG.js';
|
|
4
|
-
import { loadHookConfig, warnOnce, currentPersonalityContext, warnPersonalitySwitchInsideFork } from './chunk-
|
|
4
|
+
import { loadHookConfig, warnOnce, currentPersonalityContext, warnPersonalitySwitchInsideFork } from './chunk-S6B5XYC3.js';
|
|
5
5
|
import { extractCodePlugins } from './chunk-2SFBB54R.js';
|
|
6
6
|
import { createOpenAiCompatibleRuntime } from './chunk-55GB6JYQ.js';
|
|
7
7
|
import { persistActiveMemoryTranscript } from './chunk-OR6XIWLB.js';
|
|
@@ -2656,19 +2656,24 @@ var HooksExecutor = class {
|
|
|
2656
2656
|
*
|
|
2657
2657
|
* No gate means no refusal, which is what every consumer gets today.
|
|
2658
2658
|
*/
|
|
2659
|
-
async refusedByConsumer(command, payload) {
|
|
2659
|
+
async refusedByConsumer(command, payload, timeoutMs) {
|
|
2660
2660
|
if (this.gate?.approve === void 0) return false;
|
|
2661
2661
|
const request = {
|
|
2662
2662
|
command: command.command,
|
|
2663
2663
|
event: payload.event,
|
|
2664
|
+
// #637 — the EFFECTIVE timeout, passed in rather than recomputed here, so the number the
|
|
2665
|
+
// consumer is shown and the number `spawnAndCollect` enforces are the same expression.
|
|
2666
|
+
// Recomputing would be one line and would be the place they later diverge.
|
|
2667
|
+
timeoutMs,
|
|
2668
|
+
sourceEvent: command.sourceEvent,
|
|
2664
2669
|
...command.sourcePath === void 0 ? {} : { sourcePath: command.sourcePath },
|
|
2665
2670
|
...command.matcher === void 0 ? {} : { matcher: command.matcher }
|
|
2666
2671
|
};
|
|
2667
2672
|
return !await this.gate.approve(request);
|
|
2668
2673
|
}
|
|
2669
2674
|
async executeOne(command, payload) {
|
|
2670
|
-
if (await this.refusedByConsumer(command, payload)) return { decision: "allow" };
|
|
2671
2675
|
const timeoutMs = command.timeoutMs ?? 3e4;
|
|
2676
|
+
if (await this.refusedByConsumer(command, payload, timeoutMs)) return { decision: "allow" };
|
|
2672
2677
|
const env = runtimeEnvFor(command.sourcePath, this.cwd);
|
|
2673
2678
|
const result = await spawnAndCollect({
|
|
2674
2679
|
command: "sh",
|
|
@@ -9152,7 +9157,7 @@ async function* localAgentStreamToCompletion(agent, message, options) {
|
|
|
9152
9157
|
async function localAgentFork(parent, options) {
|
|
9153
9158
|
const { forkAgentImpl } = await import('./fork-agent-S2EPIML7.js');
|
|
9154
9159
|
const { getAgentFacade } = await import('./agent-factory-registry-ZVTABLEY.js');
|
|
9155
|
-
const { withPersonalityContext } = await import('./context-
|
|
9160
|
+
const { withPersonalityContext } = await import('./context-3HPU754C.js');
|
|
9156
9161
|
const create = getAgentFacade().create;
|
|
9157
9162
|
return withPersonalityContext(
|
|
9158
9163
|
{ slug: parent.personalitySlugSnapshot, isFork: true },
|
|
@@ -11036,5 +11041,5 @@ async function openLocalStore(reg) {
|
|
|
11036
11041
|
}
|
|
11037
11042
|
|
|
11038
11043
|
export { Agent, AgentBuilder, DEFAULT_AGENTIC_MODEL_ID, MEMORY_EMBEDDING_ADAPTERS, Tool, ToolError, UsageAccumulator, computeCost, generateCronId, getPricingEntry, openRouterMemoryEmbeddingProviderAdapter, resolveSessionDir };
|
|
11039
|
-
//# sourceMappingURL=chunk-
|
|
11040
|
-
//# sourceMappingURL=chunk-
|
|
11044
|
+
//# sourceMappingURL=chunk-ODBID5TG.js.map
|
|
11045
|
+
//# sourceMappingURL=chunk-ODBID5TG.js.map
|