@vextlabs/theron-agent-sdk 0.3.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 +59 -0
- package/LICENSE +21 -0
- package/README.md +270 -0
- package/dist/adapters/theron.cjs +92 -0
- package/dist/adapters/theron.d.cts +42 -0
- package/dist/adapters/theron.d.ts +42 -0
- package/dist/adapters/theron.js +89 -0
- package/dist/agent/index.cjs +33 -0
- package/dist/agent/index.d.cts +84 -0
- package/dist/agent/index.d.ts +84 -0
- package/dist/agent/index.js +31 -0
- package/dist/council/index.cjs +68 -0
- package/dist/council/index.d.cts +96 -0
- package/dist/council/index.d.ts +96 -0
- package/dist/council/index.js +66 -0
- package/dist/index.cjs +1288 -0
- package/dist/index.d.cts +60 -0
- package/dist/index.d.ts +60 -0
- package/dist/index.js +1244 -0
- package/dist/loop/index.cjs +106 -0
- package/dist/loop/index.d.cts +285 -0
- package/dist/loop/index.d.ts +285 -0
- package/dist/loop/index.js +95 -0
- package/dist/mcp/index.cjs +153 -0
- package/dist/mcp/index.d.cts +69 -0
- package/dist/mcp/index.d.ts +69 -0
- package/dist/mcp/index.js +150 -0
- package/dist/memory/index.cjs +53 -0
- package/dist/memory/index.d.cts +73 -0
- package/dist/memory/index.d.ts +73 -0
- package/dist/memory/index.js +50 -0
- package/dist/patterns/index.cjs +159 -0
- package/dist/patterns/index.d.cts +200 -0
- package/dist/patterns/index.d.ts +200 -0
- package/dist/patterns/index.js +150 -0
- package/dist/receipts/index.cjs +151 -0
- package/dist/receipts/index.d.cts +132 -0
- package/dist/receipts/index.d.ts +132 -0
- package/dist/receipts/index.js +146 -0
- package/dist/runtime/index.cjs +205 -0
- package/dist/runtime/index.d.cts +148 -0
- package/dist/runtime/index.d.ts +148 -0
- package/dist/runtime/index.js +203 -0
- package/dist/session/index.cjs +49 -0
- package/dist/session/index.d.cts +79 -0
- package/dist/session/index.d.ts +79 -0
- package/dist/session/index.js +47 -0
- package/dist/tools/index.cjs +51 -0
- package/dist/tools/index.d.cts +52 -0
- package/dist/tools/index.d.ts +52 -0
- package/dist/tools/index.js +46 -0
- package/dist/verifiers/index.cjs +96 -0
- package/dist/verifiers/index.d.cts +63 -0
- package/dist/verifiers/index.d.ts +63 -0
- package/dist/verifiers/index.js +93 -0
- package/examples/01_code_reviewer.ts +90 -0
- package/examples/02_research_assistant.ts +85 -0
- package/examples/03_council_of_three.ts +91 -0
- package/examples/_adapters/openrouter.ts +90 -0
- package/examples/adapters/openrouter.ts +144 -0
- package/examples/adapters/theron.ts +105 -0
- package/examples/basic-agent.ts +56 -0
- package/examples/council-deliberation.ts +90 -0
- package/examples/cyber-recon-bot.ts +163 -0
- package/examples/loop-primitives.ts +50 -0
- package/examples/meeting-prep-bot.ts +172 -0
- package/examples/reasoning-patterns.ts +125 -0
- package/examples/support-triage-bot.ts +181 -0
- package/examples/verifier-kernel.ts +108 -0
- package/package.json +154 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export { Agent, AgentConfig, AgentInstruction, AgentResult } from './agent/index.cjs';
|
|
2
|
+
export { Council, CouncilConfig, CouncilOutput, Reconciler } from './council/index.cjs';
|
|
3
|
+
export { Session, SessionConfig, SessionEvent } from './session/index.cjs';
|
|
4
|
+
export { InMemoryStore, Memory, MemoryQuery, MemoryRecord } from './memory/index.cjs';
|
|
5
|
+
export { Tool, ToolContext, ToolSchema, defineTool } from './tools/index.cjs';
|
|
6
|
+
export { Verifier, VerifierIssue, VerifierKernels, VerifierResult, defineVerifier } from './verifiers/index.cjs';
|
|
7
|
+
export { ModelAdapter, Runner, RunnerConfig, RunnerEvent } from './runtime/index.cjs';
|
|
8
|
+
export { MCPClient, McpServerConfig, McpTool, collectMcpTools } from './mcp/index.cjs';
|
|
9
|
+
export { TheronAdapterOptions, theron, theronAdapter } from './adapters/theron.cjs';
|
|
10
|
+
export { InMemoryReceiptSink, Receipt, ReceiptEmitter, ReceiptEmitterConfig, ReceiptInput, ReceiptSigner, ReceiptSink, fileReceiptSink, httpReceiptSink } from './receipts/index.cjs';
|
|
11
|
+
export { BoundWorkingSetResult, ChatMessage, CompactHistoryOptions, CompactHistoryResult, ImprovementCycleSpec, ImprovementResult, LoopState, Ratchet, RatchetDecision, RatchetVerdict, RunUntilOptions, RunUntilResult, StopPredicate, WorkingItem, allOf, anyOf, boundWorkingSet, compactHistory, costUsdAtLeast, runImprovementCycle, runUntil, stepCountIs, verifiedRatchet, verifierSatisfied } from './loop/index.cjs';
|
|
12
|
+
export { BestOfNOptions, BestOfNResult, ChainOfVerificationOptions, ChainOfVerificationResult, MeasureLiftOptions, MeasureLiftResult, MixtureOfAgentsOptions, MixtureOfAgentsResult, ReflexionOptions, ReflexionResult, SelfConsistencyOptions, SelfConsistencyResult, SelfRefineOptions, SelfRefineResult, TreeOfThoughtsOptions, TreeOfThoughtsResult, bestOfN, chainOfVerification, measureLift, mixtureOfAgents, reflexion, selfConsistency, selfRefine, treeOfThoughts } from './patterns/index.cjs';
|
|
13
|
+
export { z as zod } from 'zod';
|
|
14
|
+
|
|
15
|
+
/** OpenAI-compatible function tool definition (same shape as Anthropic via the `tools` field). */
|
|
16
|
+
interface LocalToolDef {
|
|
17
|
+
type: "function";
|
|
18
|
+
function: {
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
parameters: Record<string, unknown>;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Canonical JSON-Schema `parameters` objects for the 7 shared local tools.
|
|
26
|
+
*
|
|
27
|
+
* These are copied verbatim from both theron-cli and theron-vscode (the
|
|
28
|
+
* parameters blocks are identical across those two packages). Do NOT add
|
|
29
|
+
* surface-specific prose here — descriptions live per-surface.
|
|
30
|
+
*/
|
|
31
|
+
declare const LOCAL_TOOL_PARAMETERS: Record<string, Record<string, unknown>>;
|
|
32
|
+
/** Registry order for the 7 shared local tools. */
|
|
33
|
+
declare const LOCAL_TOOL_NAMES: readonly string[];
|
|
34
|
+
/**
|
|
35
|
+
* Tools that can mutate the user's machine.
|
|
36
|
+
*
|
|
37
|
+
* Surfaces that add their own tools (e.g. CLI's Stoa, which hits a real SaaS)
|
|
38
|
+
* should extend this set locally rather than modifying it here.
|
|
39
|
+
*/
|
|
40
|
+
declare const MUTATING_LOCAL_TOOLS: ReadonlySet<string>;
|
|
41
|
+
/**
|
|
42
|
+
* Build the full OpenAI-style tool schema array for the 7 local tools.
|
|
43
|
+
*
|
|
44
|
+
* Each surface supplies its own `descriptions` map (keyed by tool name) so
|
|
45
|
+
* the prose stays per-runtime (CLI vs VS Code). The shared `parameters` schema
|
|
46
|
+
* is filled in from `LOCAL_TOOL_PARAMETERS`. A missing description defaults to
|
|
47
|
+
* an empty string — no throw.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* const schemas = buildLocalToolSchemas({
|
|
51
|
+
* Read: "Read a file from the workspace.",
|
|
52
|
+
* Write: "Write a file to the workspace.",
|
|
53
|
+
* // ...
|
|
54
|
+
* });
|
|
55
|
+
*/
|
|
56
|
+
declare function buildLocalToolSchemas(descriptions: Record<string, string>): LocalToolDef[];
|
|
57
|
+
|
|
58
|
+
declare const VERSION = "0.3.0";
|
|
59
|
+
|
|
60
|
+
export { LOCAL_TOOL_NAMES, LOCAL_TOOL_PARAMETERS, type LocalToolDef, MUTATING_LOCAL_TOOLS, VERSION, buildLocalToolSchemas };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export { Agent, AgentConfig, AgentInstruction, AgentResult } from './agent/index.js';
|
|
2
|
+
export { Council, CouncilConfig, CouncilOutput, Reconciler } from './council/index.js';
|
|
3
|
+
export { Session, SessionConfig, SessionEvent } from './session/index.js';
|
|
4
|
+
export { InMemoryStore, Memory, MemoryQuery, MemoryRecord } from './memory/index.js';
|
|
5
|
+
export { Tool, ToolContext, ToolSchema, defineTool } from './tools/index.js';
|
|
6
|
+
export { Verifier, VerifierIssue, VerifierKernels, VerifierResult, defineVerifier } from './verifiers/index.js';
|
|
7
|
+
export { ModelAdapter, Runner, RunnerConfig, RunnerEvent } from './runtime/index.js';
|
|
8
|
+
export { MCPClient, McpServerConfig, McpTool, collectMcpTools } from './mcp/index.js';
|
|
9
|
+
export { TheronAdapterOptions, theron, theronAdapter } from './adapters/theron.js';
|
|
10
|
+
export { InMemoryReceiptSink, Receipt, ReceiptEmitter, ReceiptEmitterConfig, ReceiptInput, ReceiptSigner, ReceiptSink, fileReceiptSink, httpReceiptSink } from './receipts/index.js';
|
|
11
|
+
export { BoundWorkingSetResult, ChatMessage, CompactHistoryOptions, CompactHistoryResult, ImprovementCycleSpec, ImprovementResult, LoopState, Ratchet, RatchetDecision, RatchetVerdict, RunUntilOptions, RunUntilResult, StopPredicate, WorkingItem, allOf, anyOf, boundWorkingSet, compactHistory, costUsdAtLeast, runImprovementCycle, runUntil, stepCountIs, verifiedRatchet, verifierSatisfied } from './loop/index.js';
|
|
12
|
+
export { BestOfNOptions, BestOfNResult, ChainOfVerificationOptions, ChainOfVerificationResult, MeasureLiftOptions, MeasureLiftResult, MixtureOfAgentsOptions, MixtureOfAgentsResult, ReflexionOptions, ReflexionResult, SelfConsistencyOptions, SelfConsistencyResult, SelfRefineOptions, SelfRefineResult, TreeOfThoughtsOptions, TreeOfThoughtsResult, bestOfN, chainOfVerification, measureLift, mixtureOfAgents, reflexion, selfConsistency, selfRefine, treeOfThoughts } from './patterns/index.js';
|
|
13
|
+
export { z as zod } from 'zod';
|
|
14
|
+
|
|
15
|
+
/** OpenAI-compatible function tool definition (same shape as Anthropic via the `tools` field). */
|
|
16
|
+
interface LocalToolDef {
|
|
17
|
+
type: "function";
|
|
18
|
+
function: {
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
parameters: Record<string, unknown>;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Canonical JSON-Schema `parameters` objects for the 7 shared local tools.
|
|
26
|
+
*
|
|
27
|
+
* These are copied verbatim from both theron-cli and theron-vscode (the
|
|
28
|
+
* parameters blocks are identical across those two packages). Do NOT add
|
|
29
|
+
* surface-specific prose here — descriptions live per-surface.
|
|
30
|
+
*/
|
|
31
|
+
declare const LOCAL_TOOL_PARAMETERS: Record<string, Record<string, unknown>>;
|
|
32
|
+
/** Registry order for the 7 shared local tools. */
|
|
33
|
+
declare const LOCAL_TOOL_NAMES: readonly string[];
|
|
34
|
+
/**
|
|
35
|
+
* Tools that can mutate the user's machine.
|
|
36
|
+
*
|
|
37
|
+
* Surfaces that add their own tools (e.g. CLI's Stoa, which hits a real SaaS)
|
|
38
|
+
* should extend this set locally rather than modifying it here.
|
|
39
|
+
*/
|
|
40
|
+
declare const MUTATING_LOCAL_TOOLS: ReadonlySet<string>;
|
|
41
|
+
/**
|
|
42
|
+
* Build the full OpenAI-style tool schema array for the 7 local tools.
|
|
43
|
+
*
|
|
44
|
+
* Each surface supplies its own `descriptions` map (keyed by tool name) so
|
|
45
|
+
* the prose stays per-runtime (CLI vs VS Code). The shared `parameters` schema
|
|
46
|
+
* is filled in from `LOCAL_TOOL_PARAMETERS`. A missing description defaults to
|
|
47
|
+
* an empty string — no throw.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* const schemas = buildLocalToolSchemas({
|
|
51
|
+
* Read: "Read a file from the workspace.",
|
|
52
|
+
* Write: "Write a file to the workspace.",
|
|
53
|
+
* // ...
|
|
54
|
+
* });
|
|
55
|
+
*/
|
|
56
|
+
declare function buildLocalToolSchemas(descriptions: Record<string, string>): LocalToolDef[];
|
|
57
|
+
|
|
58
|
+
declare const VERSION = "0.3.0";
|
|
59
|
+
|
|
60
|
+
export { LOCAL_TOOL_NAMES, LOCAL_TOOL_PARAMETERS, type LocalToolDef, MUTATING_LOCAL_TOOLS, VERSION, buildLocalToolSchemas };
|