@theokit/sdk 1.9.0 → 2.0.1
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 +32 -1
- package/dist/a2a/index.cjs +154 -148
- package/dist/a2a/index.cjs.map +1 -1
- package/dist/a2a/index.js +154 -148
- package/dist/a2a/index.js.map +1 -1
- package/dist/{cron-Ci_NUkUj.d.ts → cron-Bj8-Aq1O.d.ts} +1 -1
- package/dist/{cron-Bse1MbaE.d.cts → cron-DFG9-W17.d.cts} +1 -1
- package/dist/cron.cjs +135 -128
- package/dist/cron.cjs.map +1 -1
- package/dist/cron.d.cts +1 -1
- package/dist/cron.d.ts +1 -1
- package/dist/cron.js +138 -131
- package/dist/cron.js.map +1 -1
- package/dist/eval.cjs +134 -124
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.d.cts +1 -0
- package/dist/eval.d.ts +1 -0
- package/dist/eval.js +137 -127
- package/dist/eval.js.map +1 -1
- package/dist/index.cjs +113 -106
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +113 -106
- package/dist/index.js.map +1 -1
- package/dist/internal/runtime/{fork-agent.d.ts → lifecycle/fork-agent.d.ts} +1 -1
- package/dist/internal/runtime/{run-until.d.ts → lifecycle/run-until.d.ts} +3 -3
- package/dist/internal/runtime/local-agent/local-agent-bootstrap.d.ts +1 -1
- package/dist/internal/runtime/registry/agent-factory-registry.d.ts +12 -9
- package/dist/internal/scorers/llm-judge.d.ts +4 -4
- package/dist/internal/security/index.d.cts +1 -1
- package/dist/internal/security/index.d.ts +1 -1
- package/dist/types/fork.d.ts +1 -1
- package/dist/workflow.cjs +2 -2
- package/dist/workflow.cjs.map +1 -1
- package/dist/workflow.js +2 -2
- package/dist/workflow.js.map +1 -1
- package/package.json +6 -12
- package/dist/rag/index.cjs +0 -136
- package/dist/rag/index.cjs.map +0 -1
- package/dist/rag/index.d.cts +0 -11
- package/dist/rag/index.d.ts +0 -11
- package/dist/rag/index.js +0 -129
- package/dist/rag/index.js.map +0 -1
- package/dist/rag/reranker.d.cts +0 -26
- package/dist/rag/reranker.d.ts +0 -26
- package/dist/rag/retriever.d.cts +0 -25
- package/dist/rag/retriever.d.ts +0 -25
- package/dist/rag/text-splitter.d.cts +0 -12
- package/dist/rag/text-splitter.d.ts +0 -12
- package/dist/rag/types.d.cts +0 -37
- package/dist/rag/types.d.ts +0 -37
- package/dist/voice/index.d.ts +0 -7
- package/dist/voice/openai-realtime.d.ts +0 -21
- package/dist/voice/types.d.ts +0 -35
- /package/dist/internal/{errors/mappers → error-mappers}/anthropic.d.ts +0 -0
- /package/dist/internal/{errors/mappers → error-mappers}/bedrock.d.ts +0 -0
- /package/dist/internal/{errors/mappers → error-mappers}/ollama.d.ts +0 -0
- /package/dist/internal/{errors/mappers → error-mappers}/openai-compatible.d.ts +0 -0
- /package/dist/internal/{errors/mappers → error-mappers}/shared.d.ts +0 -0
- /package/dist/internal/{errors/mappers → error-mappers}/vertex.d.ts +0 -0
- /package/dist/internal/runtime/{abort-utils.d.ts → concurrency/abort-utils.d.ts} +0 -0
- /package/dist/internal/runtime/{async-local-storage.d.ts → concurrency/async-local-storage.d.ts} +0 -0
- /package/dist/internal/runtime/{async-semaphore.d.ts → concurrency/async-semaphore.d.ts} +0 -0
- /package/dist/internal/runtime/{default-model.d.ts → config/default-model.d.ts} +0 -0
- /package/dist/internal/runtime/{providers-manager.d.ts → config/providers-manager.d.ts} +0 -0
- /package/dist/internal/runtime/{workspace-dir.d.ts → config/workspace-dir.d.ts} +0 -0
- /package/dist/internal/runtime/{yaml-frontmatter.d.ts → context/yaml-frontmatter.d.ts} +0 -0
- /package/dist/internal/runtime/{post-run-lifecycle.d.ts → lifecycle/post-run-lifecycle.d.ts} +0 -0
- /package/dist/internal/runtime/{spawn-collect.d.ts → lifecycle/spawn-collect.d.ts} +0 -0
- /package/dist/internal/runtime/{system-prompt.d.ts → system-prompt/system-prompt.d.ts} +0 -0
- /package/dist/internal/runtime/{shell-tool.d.ts → tools/shell-tool.d.ts} +0 -0
- /package/dist/internal/runtime/{validate-agent-options.d.ts → validation/validate-agent-options.d.ts} +0 -0
- /package/dist/internal/runtime/{validate-response.d.ts → validation/validate-response.d.ts} +0 -0
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
*
|
|
13
13
|
* @internal
|
|
14
14
|
*/
|
|
15
|
-
import type { GoalEvent, GoalOptions, GoalResult } from "
|
|
16
|
-
import type { JudgeContext, JudgeOptions } from "
|
|
17
|
-
import type { JudgeResult } from "
|
|
15
|
+
import type { GoalEvent, GoalOptions, GoalResult } from "../../../types/goal-events.js";
|
|
16
|
+
import type { JudgeContext, JudgeOptions } from "../../judge/judge-call.js";
|
|
17
|
+
import type { JudgeResult } from "../../judge/types.js";
|
|
18
18
|
/** DI contract: the judge is the only external touchpoint. */
|
|
19
19
|
export interface RunUntilDeps {
|
|
20
20
|
judge: (ctx: JudgeContext, opts?: JudgeOptions) => Promise<JudgeResult>;
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
|
10
|
+
import { ProvidersManagerImpl } from "../config/providers-manager.js";
|
|
10
11
|
import { FileContextManager } from "../context/context-manager.js";
|
|
11
12
|
import { type PluginMetadata, PluginsManager } from "../plugins/plugins-manager.js";
|
|
12
|
-
import { ProvidersManagerImpl } from "../providers-manager.js";
|
|
13
13
|
import { type SkillMetadata, SkillsManager } from "../skills/skills-manager.js";
|
|
14
14
|
export declare function registerLocalAgent(args: {
|
|
15
15
|
agentId: string;
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Internal DI seam for the public `Agent` facade.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* `agent.ts`
|
|
8
|
-
*
|
|
4
|
+
* Several internal subsystems (`LocalAgent.runUntil`/`fork`, eval, scorers,
|
|
5
|
+
* cron) need to invoke `Agent.create`/`prompt`/`get`/`resume`/`batch`. A direct
|
|
6
|
+
* `import { Agent }` would invert the public-api -> internal dependency
|
|
7
|
+
* direction (and `agent.ts` already imports much of `internal/`). This module
|
|
8
|
+
* is the inversion seam: `agent.ts` registers the facade at module-init time;
|
|
9
|
+
* internal consumers read it on-demand via `getAgentFacade()`. The
|
|
10
|
+
* `internal-must-not-import-facade` dependency-cruiser rule enforces that no
|
|
11
|
+
* `internal/*` module bypasses this seam with a direct facade import.
|
|
9
12
|
*
|
|
10
13
|
* Throws if accessed before registration — should never happen because
|
|
11
|
-
* `agent.ts` evaluation always precedes
|
|
12
|
-
*
|
|
14
|
+
* `agent.ts` evaluation always precedes any internal call (the consumer must
|
|
15
|
+
* obtain a handle from the `Agent` facade first).
|
|
13
16
|
*
|
|
14
17
|
* @internal
|
|
15
18
|
*/
|
|
16
|
-
export
|
|
19
|
+
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* LLM-as-judge scorer implementation (ADR D205).
|
|
3
3
|
*
|
|
4
|
-
* Builds a transient agent with the judge model + apiKey, calls
|
|
5
|
-
* `
|
|
6
|
-
* the response. Returns 0 (with
|
|
4
|
+
* Builds a transient agent with the judge model + apiKey, calls the public
|
|
5
|
+
* Agent facade's `prompt` (via the `getAgentFacade()` inversion seam) with a
|
|
6
|
+
* structured judge prompt, parses score from the response. Returns 0 (with
|
|
7
|
+
* diagnostic reason) on any parse failure.
|
|
7
8
|
*
|
|
8
9
|
* @internal
|
|
9
10
|
*/
|
|
10
|
-
import type { ModelSelection } from "../../types/agent.js";
|
|
11
11
|
import type { Score } from "../../types/eval.js";
|
|
12
12
|
import type { ProviderRoutingSettings } from "../../types/providers.js";
|
|
13
13
|
export interface LlmJudgeOptions {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Barrel for the canonical secret-redaction module (ADRs D68-D73).
|
|
3
3
|
*
|
|
4
4
|
* Consumers across the SDK output boundaries import from here:
|
|
5
|
-
* `internal/
|
|
5
|
+
* `internal/error-mappers/shared.ts`, `internal/telemetry/tracer.ts`,
|
|
6
6
|
* `internal/runtime/agent-session-store.ts`,
|
|
7
7
|
* `internal/memory/migrate-sqlite-to-lance.ts`.
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Barrel for the canonical secret-redaction module (ADRs D68-D73).
|
|
3
3
|
*
|
|
4
4
|
* Consumers across the SDK output boundaries import from here:
|
|
5
|
-
* `internal/
|
|
5
|
+
* `internal/error-mappers/shared.ts`, `internal/telemetry/tracer.ts`,
|
|
6
6
|
* `internal/runtime/agent-session-store.ts`,
|
|
7
7
|
* `internal/memory/migrate-sqlite-to-lance.ts`.
|
|
8
8
|
*
|
package/dist/types/fork.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extracted into a leaf type module (arch-review ADR 0001) so the public
|
|
5
5
|
* `types/agent.ts` barrel can reference `ForkOptions`/`ForkResult` without
|
|
6
|
-
* importing the `internal/runtime/fork-agent.ts` implementation — which in
|
|
6
|
+
* importing the `internal/runtime/lifecycle/fork-agent.ts` implementation — which in
|
|
7
7
|
* turn imports back from `types/agent.ts`. That mutual reference created a
|
|
8
8
|
* type-only `madge` cycle. These interfaces are self-contained (no SDKAgent
|
|
9
9
|
* / AgentOptions references), so co-locating them here breaks the cycle with
|
package/dist/workflow.cjs
CHANGED
|
@@ -927,7 +927,7 @@ var init_step_fn = __esm({
|
|
|
927
927
|
}
|
|
928
928
|
});
|
|
929
929
|
|
|
930
|
-
// src/internal/runtime/async-semaphore.ts
|
|
930
|
+
// src/internal/runtime/concurrency/async-semaphore.ts
|
|
931
931
|
function createSemaphore(permits) {
|
|
932
932
|
if (!Number.isInteger(permits) || permits < 1) {
|
|
933
933
|
throw new ConfigurationError(
|
|
@@ -965,7 +965,7 @@ function createSemaphore(permits) {
|
|
|
965
965
|
};
|
|
966
966
|
}
|
|
967
967
|
var init_async_semaphore = __esm({
|
|
968
|
-
"src/internal/runtime/async-semaphore.ts"() {
|
|
968
|
+
"src/internal/runtime/concurrency/async-semaphore.ts"() {
|
|
969
969
|
init_errors();
|
|
970
970
|
}
|
|
971
971
|
});
|