@haikeilabs/agentware 0.1.0 → 0.1.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/dist/executor/agent_loop.d.ts +41 -0
- package/dist/executor/agent_loop.d.ts.map +1 -0
- package/dist/executor/agent_loop.js +206 -0
- package/dist/executor/index.d.ts +2 -1
- package/dist/executor/index.d.ts.map +1 -1
- package/dist/executor/index.js +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/llm/backend.d.ts +7 -0
- package/dist/llm/backend.d.ts.map +1 -1
- package/dist/llm/index.d.ts +2 -1
- package/dist/llm/index.d.ts.map +1 -1
- package/dist/llm/index.js +1 -0
- package/dist/llm/openai_backend.d.ts +51 -0
- package/dist/llm/openai_backend.d.ts.map +1 -0
- package/dist/llm/openai_backend.js +203 -0
- package/dist/llm/response.d.ts +5 -0
- package/dist/llm/response.d.ts.map +1 -1
- package/dist/middleware/guardrails/response_validator.d.ts +1 -1
- package/dist/middleware/guardrails/response_validator.d.ts.map +1 -1
- package/dist/middleware/guardrails/response_validator.js +1 -1
- package/dist/middleware/index.d.ts +5 -0
- package/dist/middleware/index.d.ts.map +1 -1
- package/dist/middleware/index.js +5 -0
- package/dist/middleware/inference.d.ts +8 -0
- package/dist/middleware/inference.d.ts.map +1 -1
- package/dist/middleware/inference.js +73 -31
- package/dist/reasoning/adapter.d.ts +33 -0
- package/dist/reasoning/adapter.d.ts.map +1 -0
- package/dist/reasoning/adapter.js +365 -0
- package/dist/reasoning/errors.d.ts +28 -0
- package/dist/reasoning/errors.d.ts.map +1 -0
- package/dist/reasoning/errors.js +57 -0
- package/dist/reasoning/index.d.ts +6 -0
- package/dist/reasoning/index.d.ts.map +1 -0
- package/dist/reasoning/index.js +4 -0
- package/dist/reasoning/options.d.ts +18 -0
- package/dist/reasoning/options.d.ts.map +1 -0
- package/dist/reasoning/options.js +18 -0
- package/dist/reasoning/types.d.ts +44 -0
- package/dist/reasoning/types.d.ts.map +1 -0
- package/dist/reasoning/types.js +32 -0
- package/dist/toolformat/formatter.d.ts +3 -3
- package/dist/toolformat/formatter.d.ts.map +1 -1
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +2 -2
- package/dist/tools/registry.d.ts +4 -4
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/tool.d.ts +8 -1
- package/dist/tools/tool.d.ts.map +1 -1
- package/dist/tools/tool.js +7 -0
- package/package.json +10 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ReasoningAdapter, ReasoningError } from "./adapter.js";
|
|
2
|
+
export { MalformedContentError, MalformedInputError, MalformedJSONError, MalformedReasoningFieldError, ReasoningTooLargeError, TooDeepError, TooManyNodesError, UnbalancedThinkingError, } from "./errors.js";
|
|
3
|
+
export { ReasoningOptions, normalizeOptions } from "./options.js";
|
|
4
|
+
export { CONTRACT_VERSION, Format, NodeKind, NodeStatus, isContextTreeEmpty, } from "./types.js";
|
|
5
|
+
export type { Node, ContextTree } from "./types.js";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/reasoning/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,4BAA4B,EAC5B,sBAAsB,EACtB,YAAY,EACZ,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EACL,gBAAgB,EAChB,MAAM,EACN,QAAQ,EACR,UAAU,EACV,kBAAkB,GACnB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ReasoningAdapter, ReasoningError } from "./adapter.js";
|
|
2
|
+
export { MalformedContentError, MalformedInputError, MalformedJSONError, MalformedReasoningFieldError, ReasoningTooLargeError, TooDeepError, TooManyNodesError, UnbalancedThinkingError, } from "./errors.js";
|
|
3
|
+
export { normalizeOptions } from "./options.js";
|
|
4
|
+
export { CONTRACT_VERSION, Format, NodeKind, NodeStatus, isContextTreeEmpty, } from "./types.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ReasoningOptions {
|
|
2
|
+
/** Cap on the size of the extracted reasoning text, in bytes. */
|
|
3
|
+
max_reasoning_bytes?: number;
|
|
4
|
+
/** Cap on the number of nodes a single tree may contain. */
|
|
5
|
+
max_nodes?: number;
|
|
6
|
+
/** Cap on the depth of the node chain. */
|
|
7
|
+
max_depth?: number;
|
|
8
|
+
/** Cap on the length of every node summary, in code points. */
|
|
9
|
+
max_summary_chars?: number;
|
|
10
|
+
/** Clock supplying timestamps for tree and nodes. Defaults to Date.now. */
|
|
11
|
+
clock?: () => Date;
|
|
12
|
+
}
|
|
13
|
+
export declare const DEFAULT_MAX_REASONING_BYTES: number;
|
|
14
|
+
export declare const DEFAULT_MAX_NODES = 64;
|
|
15
|
+
export declare const DEFAULT_MAX_DEPTH = 32;
|
|
16
|
+
export declare const DEFAULT_MAX_SUMMARY_CHARS = 512;
|
|
17
|
+
export declare function normalizeOptions(opts?: ReasoningOptions): Required<ReasoningOptions>;
|
|
18
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/reasoning/options.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,gBAAgB;IAC/B,iEAAiE;IACjE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,eAAO,MAAM,2BAA2B,QAAY,CAAC;AACrD,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C,wBAAgB,gBAAgB,CAAC,IAAI,CAAC,EAAE,gBAAgB,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAQpF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Bounds for the reasoning adapter (mirrors go/reasoning/options.go).
|
|
2
|
+
//
|
|
3
|
+
// All limits fail closed: an input that exceeds a bound raises an error rather
|
|
4
|
+
// than being truncated into a partial tree (summaries are the one bounded
|
|
5
|
+
// field by design; they are truncated, never the parse aborted).
|
|
6
|
+
export const DEFAULT_MAX_REASONING_BYTES = 64 * 1024;
|
|
7
|
+
export const DEFAULT_MAX_NODES = 64;
|
|
8
|
+
export const DEFAULT_MAX_DEPTH = 32;
|
|
9
|
+
export const DEFAULT_MAX_SUMMARY_CHARS = 512;
|
|
10
|
+
export function normalizeOptions(opts) {
|
|
11
|
+
return {
|
|
12
|
+
max_reasoning_bytes: opts?.max_reasoning_bytes ?? DEFAULT_MAX_REASONING_BYTES,
|
|
13
|
+
max_nodes: opts?.max_nodes ?? DEFAULT_MAX_NODES,
|
|
14
|
+
max_depth: opts?.max_depth ?? DEFAULT_MAX_DEPTH,
|
|
15
|
+
max_summary_chars: opts?.max_summary_chars ?? DEFAULT_MAX_SUMMARY_CHARS,
|
|
16
|
+
clock: opts?.clock ?? (() => new Date()),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare const CONTRACT_VERSION = "1";
|
|
2
|
+
export declare enum Format {
|
|
3
|
+
NATIVE = "native",
|
|
4
|
+
THINKING = "thinking",
|
|
5
|
+
MODEL_SPECIFIC = "model_specific",
|
|
6
|
+
NONE = "none"
|
|
7
|
+
}
|
|
8
|
+
export declare enum NodeKind {
|
|
9
|
+
GOAL = "goal",
|
|
10
|
+
OBSERVATION = "observation",
|
|
11
|
+
DECISION = "decision",
|
|
12
|
+
TOOL_CALL = "tool-call",
|
|
13
|
+
TOOL_RESULT = "tool-result",
|
|
14
|
+
CONCLUSION = "conclusion",
|
|
15
|
+
BLOCKER = "blocker"
|
|
16
|
+
}
|
|
17
|
+
export declare enum NodeStatus {
|
|
18
|
+
ACTIVE = "active",
|
|
19
|
+
COMPLETE = "complete",
|
|
20
|
+
BLOCKED = "blocked",
|
|
21
|
+
SUPERSEDED = "superseded"
|
|
22
|
+
}
|
|
23
|
+
export interface Node {
|
|
24
|
+
id: string;
|
|
25
|
+
parent_id: string;
|
|
26
|
+
kind: NodeKind;
|
|
27
|
+
status: NodeStatus;
|
|
28
|
+
summary: string;
|
|
29
|
+
evidence_refs: string[];
|
|
30
|
+
tool_call_refs: string[];
|
|
31
|
+
created_at: Date;
|
|
32
|
+
updated_at: Date;
|
|
33
|
+
}
|
|
34
|
+
export interface ContextTree {
|
|
35
|
+
version: string;
|
|
36
|
+
format: Format;
|
|
37
|
+
model: string;
|
|
38
|
+
backend: string;
|
|
39
|
+
created_at: Date;
|
|
40
|
+
root_id: string;
|
|
41
|
+
nodes: Node[];
|
|
42
|
+
}
|
|
43
|
+
export declare function isContextTreeEmpty(tree: ContextTree | null | undefined): boolean;
|
|
44
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/reasoning/types.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,oBAAY,MAAM;IAChB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,cAAc,mBAAmB;IACjC,IAAI,SAAS;CACd;AAGD,oBAAY,QAAQ;IAClB,IAAI,SAAS;IACb,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,UAAU,eAAe;IACzB,OAAO,YAAY;CACpB;AAGD,oBAAY,UAAU;IACpB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,UAAU,eAAe;CAC1B;AAID,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;CAClB;AAKD,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,IAAI,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAEhF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Versioned context-tree contract for normalized reasoning.
|
|
2
|
+
// Mirrors go/reasoning/types.go and python/src/pedro_agentware/reasoning/types.py.
|
|
3
|
+
export const CONTRACT_VERSION = "1";
|
|
4
|
+
export var Format;
|
|
5
|
+
(function (Format) {
|
|
6
|
+
Format["NATIVE"] = "native";
|
|
7
|
+
Format["THINKING"] = "thinking";
|
|
8
|
+
Format["MODEL_SPECIFIC"] = "model_specific";
|
|
9
|
+
Format["NONE"] = "none";
|
|
10
|
+
})(Format || (Format = {}));
|
|
11
|
+
// NodeKind is the closed vocabulary of context-tree node kinds.
|
|
12
|
+
export var NodeKind;
|
|
13
|
+
(function (NodeKind) {
|
|
14
|
+
NodeKind["GOAL"] = "goal";
|
|
15
|
+
NodeKind["OBSERVATION"] = "observation";
|
|
16
|
+
NodeKind["DECISION"] = "decision";
|
|
17
|
+
NodeKind["TOOL_CALL"] = "tool-call";
|
|
18
|
+
NodeKind["TOOL_RESULT"] = "tool-result";
|
|
19
|
+
NodeKind["CONCLUSION"] = "conclusion";
|
|
20
|
+
NodeKind["BLOCKER"] = "blocker";
|
|
21
|
+
})(NodeKind || (NodeKind = {}));
|
|
22
|
+
// NodeStatus is the closed vocabulary of context-tree node statuses.
|
|
23
|
+
export var NodeStatus;
|
|
24
|
+
(function (NodeStatus) {
|
|
25
|
+
NodeStatus["ACTIVE"] = "active";
|
|
26
|
+
NodeStatus["COMPLETE"] = "complete";
|
|
27
|
+
NodeStatus["BLOCKED"] = "blocked";
|
|
28
|
+
NodeStatus["SUPERSEDED"] = "superseded";
|
|
29
|
+
})(NodeStatus || (NodeStatus = {}));
|
|
30
|
+
export function isContextTreeEmpty(tree) {
|
|
31
|
+
return !tree || tree.nodes.length === 0;
|
|
32
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AnyTool, Result } from "../tools/index.js";
|
|
2
2
|
export interface ParsedToolCall {
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
@@ -6,13 +6,13 @@ export interface ParsedToolCall {
|
|
|
6
6
|
raw: string;
|
|
7
7
|
}
|
|
8
8
|
export interface ToolFormatter {
|
|
9
|
-
formatToolDefinitions(tools:
|
|
9
|
+
formatToolDefinitions(tools: AnyTool[]): string;
|
|
10
10
|
parseToolCalls(response: string): ParsedToolCall[];
|
|
11
11
|
formatToolResult(name: string, result: Result): string;
|
|
12
12
|
modelFamily(): string;
|
|
13
13
|
}
|
|
14
14
|
export declare class GenericFormatter implements ToolFormatter {
|
|
15
|
-
formatToolDefinitions(tools:
|
|
15
|
+
formatToolDefinitions(tools: AnyTool[]): string;
|
|
16
16
|
parseToolCalls(_response: string): ParsedToolCall[];
|
|
17
17
|
formatToolResult(name: string, result: Result): string;
|
|
18
18
|
modelFamily(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatter.d.ts","sourceRoot":"","sources":["../../src/toolformat/formatter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"formatter.d.ts","sourceRoot":"","sources":["../../src/toolformat/formatter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEzD,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,aAAa;IAC5B,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;IAChD,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,EAAE,CAAC;IACnD,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACvD,WAAW,IAAI,MAAM,CAAC;CACvB;AAED,qBAAa,gBAAiB,YAAW,aAAa;IACpD,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM;IAU/C,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc,EAAE;IAInD,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAMtD,WAAW,IAAI,MAAM;CAGtB"}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { Tool, BaseTool, Result, ToolExample } from "./tool.js";
|
|
1
|
+
export { Tool, ToolBase, AsyncTool, AnyTool, BaseTool, Result, ToolExample, executeTool, } from "./tool.js";
|
|
2
2
|
export { ToolRegistry } from "./registry.js";
|
|
3
|
-
export { wrapTool, ToolAbortedError, ToolTimeoutError
|
|
3
|
+
export { wrapTool, ToolAbortedError, ToolTimeoutError } from "./async.js";
|
|
4
4
|
export type { AsyncToolHandler, ToolInvocationOptions, ToolLifecycleEvent, ToolLifecycleHook, WrapToolOptions, WrappedTool, } from "./async.js";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,OAAO,EACP,QAAQ,EACR,MAAM,EACN,WAAW,EACX,WAAW,GACZ,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC1E,YAAY,EACV,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,WAAW,GACZ,MAAM,YAAY,CAAC"}
|
package/dist/tools/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { BaseTool, Result } from "./tool.js";
|
|
1
|
+
export { BaseTool, Result, executeTool, } from "./tool.js";
|
|
2
2
|
export { ToolRegistry } from "./registry.js";
|
|
3
|
-
export { wrapTool, ToolAbortedError, ToolTimeoutError
|
|
3
|
+
export { wrapTool, ToolAbortedError, ToolTimeoutError } from "./async.js";
|
package/dist/tools/registry.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AnyTool } from "./tool.js";
|
|
2
2
|
export declare class ToolRegistry {
|
|
3
3
|
private tools;
|
|
4
|
-
register(tool:
|
|
5
|
-
get(name: string):
|
|
6
|
-
all():
|
|
4
|
+
register(tool: AnyTool): void;
|
|
5
|
+
get(name: string): AnyTool | undefined;
|
|
6
|
+
all(): AnyTool[];
|
|
7
7
|
names(): string[];
|
|
8
8
|
schemas(): Record<string, Record<string, unknown>>;
|
|
9
9
|
clear(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/tools/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/tools/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,qBAAa,YAAY;IACvB,OAAO,CAAC,KAAK,CAAmC;IAEhD,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAI7B,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS;IAItC,GAAG,IAAI,OAAO,EAAE;IAMhB,KAAK,IAAI,MAAM,EAAE;IAIjB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAUlD,KAAK,IAAI,IAAI;CAGd"}
|
package/dist/tools/tool.d.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface ToolBase {
|
|
2
2
|
readonly name: string;
|
|
3
3
|
readonly description: string;
|
|
4
|
+
}
|
|
5
|
+
export interface Tool extends ToolBase {
|
|
4
6
|
execute(args: Record<string, unknown>): Result;
|
|
5
7
|
}
|
|
8
|
+
export interface AsyncTool extends ToolBase {
|
|
9
|
+
execute(args: Record<string, unknown>): Promise<Result>;
|
|
10
|
+
}
|
|
11
|
+
export type AnyTool = Tool | AsyncTool;
|
|
12
|
+
export declare function executeTool(tool: AnyTool, args: Record<string, unknown>): Promise<Result>;
|
|
6
13
|
export interface ToolExample {
|
|
7
14
|
input: Record<string, unknown>;
|
|
8
15
|
output: string;
|
package/dist/tools/tool.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../src/tools/tool.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../src/tools/tool.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,IAAK,SAAQ,QAAQ;IACpC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC;CAChD;AAED,MAAM,WAAW,SAAU,SAAQ,QAAQ;IACzC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACzD;AAED,MAAM,MAAM,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;AAEvC,wBAAsB,WAAW,CAC/B,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,MAAM,CAAC,CAMjB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,YAAa,SAAQ,IAAI;IACxC,WAAW,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,QAAQ,IAAI,WAAW,EAAE,CAAC;CAC3B;AAED,qBAAa,QAAS,YAAW,IAAI;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;gBAEjB,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;IAK7C,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;CAGhD;AAED,qBAAa,MAAM;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,CAAQ;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC5B,SAAS,EAAE,IAAI,CAAC;gBAEJ,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM;IAO5D,MAAM,IAAI,MAAM;CAQjB"}
|
package/dist/tools/tool.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haikeilabs/agentware",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Agent middleware and tooling for LLM tool calling",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/HaikeiLabs/Agentware.git",
|
|
8
|
+
"directory": "typescript"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/HaikeiLabs/Agentware#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/HaikeiLabs/Agentware/issues"
|
|
13
|
+
},
|
|
5
14
|
"main": "dist/index.js",
|
|
6
15
|
"types": "dist/index.d.ts",
|
|
7
16
|
"type": "module",
|