@sepveneto/dnde-agent 0.2.0-beta.8 → 0.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/README.md +151 -115
- package/dist/{agent-CfRVWxVS.js → agent-DZUWgLKQ.js} +1 -1
- package/dist/agentInstructions.d.ts +13 -0
- package/dist/agentInstructions.d.ts.map +1 -0
- package/dist/agents.d.ts +8 -10
- package/dist/agents.d.ts.map +1 -1
- package/dist/editorDsl.d.ts +25 -0
- package/dist/editorDsl.d.ts.map +1 -0
- package/dist/element.js +11342 -11356
- package/dist/{index-0F_QrOIG.js → index-DGG6v34-.js} +11049 -11063
- package/dist/index.d.ts +7 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -22
- package/dist/runtime.d.ts +3 -4
- package/dist/runtime.d.ts.map +1 -1
- package/dist/types.d.ts +12 -28
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -1
- package/dist/editorContext.d.ts +0 -26
- package/dist/editorContext.d.ts.map +0 -1
- package/dist/initialization.d.ts +0 -50
- package/dist/initialization.d.ts.map +0 -1
- package/dist/tool.d.ts +0 -36
- package/dist/tool.d.ts.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -5,18 +5,17 @@ export declare const MpdAgent: import("vue").DefineComponent<Record<string, unkn
|
|
|
5
5
|
* bundled into this package.
|
|
6
6
|
*/
|
|
7
7
|
export declare function createAgentElement(): VueElementConstructor;
|
|
8
|
-
export
|
|
8
|
+
export { MAIN_AGENT_NAME, } from './agentInstructions';
|
|
9
|
+
export type { MainAgentInfo } from './agentInstructions';
|
|
10
|
+
export type { AgentSubAgent, CreateAgentsOptions, } from './agents';
|
|
9
11
|
export { createAgents, DEFAULT_AGENT_BFF_URL, DEFAULT_AGENT_MODEL, } from './agents';
|
|
10
|
-
export type {
|
|
11
|
-
export {
|
|
12
|
-
export type { AgentInitializationMode, AgentInitializationRequest, AgentInitializationResult, AgentInitializationTool, } from './initialization';
|
|
13
|
-
export { defineInitializationTool, findInitializationTool, INITIALIZATION_TOOL_ROLE, } from './initialization';
|
|
12
|
+
export type { CreateEditorDslToolsOptions, } from './editorDsl';
|
|
13
|
+
export { APPLY_EDITOR_DSL_TOOL_NAME, createEditorDslTools, createEditorTools, GET_CURRENT_EDITOR_TOOL_NAME, GET_WIDGETS_TOOL_NAME, UNDO_EDITOR_DSL_TOOL_NAME, VALIDATE_EDITOR_DSL_TOOL_NAME, } from './editorDsl';
|
|
14
14
|
export type { AgentRuntime, AgentRuntimeConfig, AgentRuntimeOptions, AgentRuntimeTurn, } from './runtime';
|
|
15
15
|
export { createAgentRuntime } from './runtime';
|
|
16
16
|
export type { AgentUploadedFile } from './services';
|
|
17
17
|
export { resolveAgentServiceURL } from './services';
|
|
18
|
-
export type {
|
|
19
|
-
export { defineAgentTool, defineCapability, } from './tool';
|
|
20
|
-
export type { AgentApiMode, AgentEditorApi, AgentEditorOperation, AgentFileKind, AgentHostApi, AgentModelConfig, ChatMessage, ChatMode, DataPart, EditorAgentContext, FilePart, MessagePart, MessageRole, ReasoningPart, TextPart, ToolPart, } from './types';
|
|
18
|
+
export type { AgentApiMode, AgentEditorApi, AgentEditorDsl, AgentEditorDslValidation, AgentFileKind, AgentHostApi, AgentModelConfig, ChatMessage, ChatMode, DataPart, EditorAgentContext, FilePart, MessagePart, MessageRole, ReasoningPart, TextPart, ToolPart, } from './types';
|
|
21
19
|
export { Agent, MemorySession, run, Runner, tool, } from '@openai/agents';
|
|
20
|
+
export type { DslAddOperation, DslCustomOperation, DslDeleteOperation, DslDocumentSnapshot, DslIssue, DslOperation, DslPlacement, DslScope, DslScopeMode, DslUpdateOperation, DslValidationOptions, DslValidationResult, EditorDsl, } from '@sepveneto/dnde-core';
|
|
22
21
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"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AW,EACX,WAAW,EACX,aAAa,EACb,QAAQ,EACR,QAAQ,GACT,MAAM,SAAS,CAAA;AAEhB,OAAO,EACL,KAAK,EACL,aAAa,EACb,GAAG,EACH,MAAM,EACN,IAAI,GACL,MAAM,gBAAgB,CAAA;AAEvB,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,SAAS,GACV,MAAM,sBAAsB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as _, c as a, D as E, l as A, G as T, v as t, j as O, B as D, g as L, R as r, x as o, V as n, h as N, y as R, k as M, q as c, u as g, z as l, E as G, t as I } from "./index-DGG6v34-.js";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
f as tool
|
|
3
|
+
_ as APPLY_EDITOR_DSL_TOOL_NAME,
|
|
4
|
+
a as Agent,
|
|
5
|
+
E as DEFAULT_AGENT_BFF_URL,
|
|
6
|
+
A as DEFAULT_AGENT_MODEL,
|
|
7
|
+
T as GET_CURRENT_EDITOR_TOOL_NAME,
|
|
8
|
+
t as GET_WIDGETS_TOOL_NAME,
|
|
9
|
+
O as MAIN_AGENT_NAME,
|
|
10
|
+
D as MemorySession,
|
|
11
|
+
L as MpdAgent,
|
|
12
|
+
r as Runner,
|
|
13
|
+
o as UNDO_EDITOR_DSL_TOOL_NAME,
|
|
14
|
+
n as VALIDATE_EDITOR_DSL_TOOL_NAME,
|
|
15
|
+
N as createAgentElement,
|
|
16
|
+
R as createAgentRuntime,
|
|
17
|
+
M as createAgents,
|
|
18
|
+
c as createEditorDslTools,
|
|
19
|
+
g as createEditorTools,
|
|
20
|
+
l as resolveAgentServiceURL,
|
|
21
|
+
G as run,
|
|
22
|
+
I as tool
|
|
24
23
|
};
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { AgentSubAgent } from './agents';
|
|
2
|
+
import type { ChatMessage, ChatMode, FilePart } from './types';
|
|
3
3
|
export interface AgentRuntimeConfig {
|
|
4
4
|
baseURL: string;
|
|
5
5
|
model: string;
|
|
6
6
|
apiMode: 'responses' | 'chat_completions';
|
|
7
7
|
}
|
|
8
8
|
export interface AgentRuntimeOptions extends Partial<AgentRuntimeConfig> {
|
|
9
|
-
|
|
10
|
-
tools?: AgentToolDefinition[];
|
|
9
|
+
subAgents?: AgentSubAgent[];
|
|
11
10
|
getContext?: () => Record<string, unknown>;
|
|
12
11
|
}
|
|
13
12
|
export interface AgentRuntimeTurn {
|
package/dist/runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,KAAK,EACV,WAAW,EACX,QAAQ,EACR,QAAQ,EAGT,MAAM,SAAS,CAAA;AAuBhB,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,WAAW,GAAG,kBAAkB,CAAA;CAC1C;AAED,MAAM,WAAW,mBAAoB,SAAQ,OAAO,CAAC,kBAAkB,CAAC;IACtE,SAAS,CAAC,EAAE,aAAa,EAAE,CAAA;IAC3B,UAAU,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC3C;AAED,MAAM,WAAW,gBAAgB;IAC/B,gBAAgB,EAAE,MAAM,CAAA;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,QAAQ,CAAA;IACd,OAAO,EAAE,WAAW,CAAA;IACpB,OAAO,EAAE,WAAW,EAAE,CAAA;IACtB,WAAW,CAAC,EAAE,QAAQ,EAAE,CAAA;IACxB,MAAM,EAAE,WAAW,CAAA;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAA;IAC7C,OAAO,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACnD;AA+KD;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,GAAE,mBAAwB,GAChC,YAAY,CA4Od"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DslValidationResult, EditorDsl } from '@sepveneto/dnde-core';
|
|
1
2
|
export type ChatMode = 'data' | 'text';
|
|
2
3
|
export type MessageRole = 'system' | 'user' | 'assistant';
|
|
3
4
|
export type AgentApiMode = 'responses' | 'chat_completions';
|
|
@@ -8,32 +9,11 @@ export interface AgentModelConfig {
|
|
|
8
9
|
model?: string;
|
|
9
10
|
apiMode?: AgentApiMode;
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
widget?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Editor data assembled by a business tool and injected by the host.
|
|
19
|
-
* This field is intentionally absent from the model-facing tool schema.
|
|
20
|
-
*/
|
|
21
|
-
items?: unknown[];
|
|
22
|
-
changes?: Record<string, unknown>;
|
|
23
|
-
style?: Record<string, unknown>;
|
|
24
|
-
before?: string;
|
|
25
|
-
after?: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Mutable state scoped to one Agent Run.
|
|
29
|
-
*
|
|
30
|
-
* Business tools write complete editor data into `pendingItems`; the editor
|
|
31
|
-
* tool consumes it after a successful operation. A fresh object is created for
|
|
32
|
-
* every turn so concurrent runs and conversations never share business data.
|
|
33
|
-
*/
|
|
34
|
-
export interface EditorAgentContext extends Record<string, unknown> {
|
|
35
|
-
pendingItems: unknown[];
|
|
36
|
-
}
|
|
12
|
+
/** The public, versioned DSL used by host sub-agents to edit the document. */
|
|
13
|
+
export type AgentEditorDsl = EditorDsl;
|
|
14
|
+
export type AgentEditorDslValidation = DslValidationResult;
|
|
15
|
+
/** Mutable state scoped to one Agent Run. */
|
|
16
|
+
export type EditorAgentContext = Record<string, unknown>;
|
|
37
17
|
/**
|
|
38
18
|
* APIs implemented by the host. The agent runtime only knows this contract, so
|
|
39
19
|
* the editor document and business data never become part of the agent package.
|
|
@@ -41,8 +21,12 @@ export interface EditorAgentContext extends Record<string, unknown> {
|
|
|
41
21
|
export interface AgentEditorApi {
|
|
42
22
|
getCurrentEditor: () => unknown | Promise<unknown>;
|
|
43
23
|
getWidgets: () => unknown | Promise<unknown>;
|
|
44
|
-
/**
|
|
45
|
-
|
|
24
|
+
/** Stable widget capability catalog used for component and DSL validation. */
|
|
25
|
+
getCapabilities?: () => unknown | Promise<unknown>;
|
|
26
|
+
getRevision?: () => number | Promise<number>;
|
|
27
|
+
validateDsl: (dsl: AgentEditorDsl, context?: EditorAgentContext) => AgentEditorDslValidation | Promise<AgentEditorDslValidation>;
|
|
28
|
+
applyDsl: (dsl: AgentEditorDsl, context?: EditorAgentContext) => unknown | Promise<unknown>;
|
|
29
|
+
undo?: (revision?: number) => unknown | Promise<unknown>;
|
|
46
30
|
}
|
|
47
31
|
export interface AgentHostApi {
|
|
48
32
|
model?: AgentModelConfig;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAA;AACtC,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAA;AACzD,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,kBAAkB,CAAA;AAC3D,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,OAAO,CAAA;AAEhD,MAAM,WAAW,gBAAgB;IAC/B,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,YAAY,CAAA;CACvB;AAED,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,SAAS,EACV,MAAM,sBAAsB,CAAA;AAE7B,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAA;AACtC,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAA;AACzD,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,kBAAkB,CAAA;AAC3D,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,OAAO,CAAA;AAEhD,MAAM,WAAW,gBAAgB;IAC/B,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,YAAY,CAAA;CACvB;AAED,8EAA8E;AAC9E,MAAM,MAAM,cAAc,GAAG,SAAS,CAAA;AACtC,MAAM,MAAM,wBAAwB,GAAG,mBAAmB,CAAA;AAE1D,6CAA6C;AAC7C,MAA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K,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAA;IACZ,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAA;IACZ,+CAA+C;IAC/C,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,8EAA8E;IAC9E,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAED,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,aAAa,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAEnF,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,WAAW,CAAA;IACjB,KAAK,EAAE,WAAW,EAAE,CAAA;CACrB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sepveneto/dnde-agent",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.0
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "",
|
|
7
7
|
"license": "ISC",
|
|
@@ -29,6 +29,9 @@
|
|
|
29
29
|
"files": [
|
|
30
30
|
"dist"
|
|
31
31
|
],
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@sepveneto/dnde-core": " *"
|
|
34
|
+
},
|
|
32
35
|
"devDependencies": {
|
|
33
36
|
"@openai/agents": "^0.19.0",
|
|
34
37
|
"@vitejs/plugin-vue": "^5.2.4",
|
package/dist/editorContext.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { AgentEditorOperation, EditorAgentContext } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Create isolated editor/business state for one Agent Run.
|
|
4
|
-
*
|
|
5
|
-
* Host context is copied in as read-only starting data. `pendingItems` is
|
|
6
|
-
* always reset so data prepared by a previous turn cannot leak into this one.
|
|
7
|
-
*/
|
|
8
|
-
export declare function createEditorAgentContext(initial?: Record<string, unknown>): EditorAgentContext;
|
|
9
|
-
export interface PreparedEditorOperation {
|
|
10
|
-
operation: AgentEditorOperation;
|
|
11
|
-
/** Items reserved for this add operation; cleared only after success. */
|
|
12
|
-
pendingItems?: unknown[];
|
|
13
|
-
error?: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Remove any model-produced items and, for add operations, inject the data
|
|
17
|
-
* prepared by a business tool for this run.
|
|
18
|
-
*/
|
|
19
|
-
export declare function prepareEditorOperation(input: unknown, context: EditorAgentContext): PreparedEditorOperation;
|
|
20
|
-
export declare function editorOperationSucceeded(result: unknown): boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Consume pending items only after the editor confirms success. A failed
|
|
23
|
-
* operation keeps them available for a corrected retry in the same Run.
|
|
24
|
-
*/
|
|
25
|
-
export declare function completeEditorOperation(context: EditorAgentContext, prepared: PreparedEditorOperation, result: unknown): void;
|
|
26
|
-
//# sourceMappingURL=editorContext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editorContext.d.ts","sourceRoot":"","sources":["../src/editorContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,SAAS,CAAA;AAEhB;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACpC,kBAAkB,CAKpB;AAED,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,oBAAoB,CAAA;IAC/B,yEAAyE;IACzE,YAAY,CAAC,EAAE,OAAO,EAAE,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,kBAAkB,GAC1B,uBAAuB,CA2BzB;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CASjE;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,EAAE,uBAAuB,EACjC,MAAM,EAAE,OAAO,GACd,IAAI,CAGN"}
|
package/dist/initialization.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { AgentToolDefinition } from './tool';
|
|
2
|
-
export declare const INITIALIZATION_TOOL_ROLE: "initialization";
|
|
3
|
-
/** Lightweight context a host can show while asking how to initialize a page. */
|
|
4
|
-
export interface AgentInitializationRequest {
|
|
5
|
-
/**
|
|
6
|
-
* A short summary of the user's checklist or page request. The full document
|
|
7
|
-
* remains in the conversation and is intentionally not duplicated here.
|
|
8
|
-
*/
|
|
9
|
-
checklistSummary?: string;
|
|
10
|
-
}
|
|
11
|
-
export type AgentInitializationMode = 'custom' | 'reference' | 'cancelled';
|
|
12
|
-
/**
|
|
13
|
-
* Host-owned result of the initialization choice.
|
|
14
|
-
*
|
|
15
|
-
* `custom` lets the model design from the user's checklist. `reference` uses a
|
|
16
|
-
* reference ID explicitly entered by the user. `cancelled` stops initialization
|
|
17
|
-
* and waits for the user.
|
|
18
|
-
*/
|
|
19
|
-
export interface AgentInitializationResult {
|
|
20
|
-
mode: AgentInitializationMode;
|
|
21
|
-
/** Required when mode is `reference`; entered by the user. */
|
|
22
|
-
referenceId?: string;
|
|
23
|
-
/** Reference data fetched by the host using `referenceId`. */
|
|
24
|
-
referenceData?: unknown;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Optional host tool invoked whenever the agent enters initialization mode.
|
|
28
|
-
* The host owns the interaction and result shape; the agent only consumes the
|
|
29
|
-
* returned value as context for the initialization.
|
|
30
|
-
*/
|
|
31
|
-
export type AgentInitializationTool = AgentToolDefinition<AgentInitializationRequest, unknown> & {
|
|
32
|
-
role: typeof INITIALIZATION_TOOL_ROLE;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Define the optional host-owned initialization tool.
|
|
36
|
-
*/
|
|
37
|
-
export declare function defineInitializationTool(definition: Omit<AgentInitializationTool, 'kind' | 'role'>): AgentInitializationTool;
|
|
38
|
-
/** Find the optional host-owned initialization tool. */
|
|
39
|
-
export declare function findInitializationTool(tools?: readonly AgentToolDefinition[]): AgentToolDefinition | undefined;
|
|
40
|
-
export declare const INITIALIZATION_AGENT_NAME = "Initialization Agent";
|
|
41
|
-
export declare const INITIALIZATION_HANDOFF_TOOL_NAME = "start_initialization";
|
|
42
|
-
export declare const INITIALIZATION_RETURN_TOOL_NAME = "finish_initialization";
|
|
43
|
-
/** Main-agent instructions for deciding when to hand off to the initializer. */
|
|
44
|
-
export declare function buildInitializationInstructions(options?: {
|
|
45
|
-
toolName?: string;
|
|
46
|
-
agentName?: string;
|
|
47
|
-
}): string[];
|
|
48
|
-
/** Instructions for the isolated initialization sub-agent. */
|
|
49
|
-
export declare function buildInitializationAgentInstructions(toolName: string, mainAgentName: string): string[];
|
|
50
|
-
//# sourceMappingURL=initialization.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"initialization.d.ts","sourceRoot":"","sources":["../src/initialization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAA;AAEjD,eAAO,MAAM,wBAAwB,EAAG,gBAAyB,CAAA;AAEjE,iFAAiF;AACjF,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,WAAW,GAAG,WAAW,CAAA;AAE1E;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,uBAAuB,CAAA;IAC7B,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,mBAAmB,CACvD,0BAA0B,EAC1B,OAAO,CACR,GAAG;IACF,IAAI,EAAE,OAAO,wBAAwB,CAAA;CACtC,CAAA;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,IAAI,CAAC,uBAAuB,EAAE,MAAM,GAAG,MAAM,CAAC,GACzD,uBAAuB,CAMzB;AAED,wDAAwD;AACxD,wBAAgB,sBAAsB,CACpC,KAAK,GAAE,SAAS,mBAAmB,EAAO,GACzC,mBAAmB,GAAG,SAAS,CAEjC;AAED,eAAO,MAAM,yBAAyB,yBAAyB,CAAA;AAC/D,eAAO,MAAM,gCAAgC,yBAAyB,CAAA;AACtE,eAAO,MAAM,+BAA+B,0BAA0B,CAAA;AAEtE,gFAAgF;AAChF,wBAAgB,+BAA+B,CAC7C,OAAO,GAAE;IACP,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACd,GACL,MAAM,EAAE,CAwBV;AAED,8DAA8D;AAC9D,wBAAgB,oCAAoC,CAClD,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,GACpB,MAAM,EAAE,CASV"}
|
package/dist/tool.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { z } from 'zod';
|
|
2
|
-
import type { AgentHostApi, EditorAgentContext } from './types';
|
|
3
|
-
/** Workflow roles understood by the built-in agent topology. */
|
|
4
|
-
export type AgentToolRole = 'initialization';
|
|
5
|
-
export interface AgentToolContext {
|
|
6
|
-
api: AgentHostApi;
|
|
7
|
-
getContext: () => Record<string, unknown>;
|
|
8
|
-
/** Mutable context belonging to the current Agent Run. */
|
|
9
|
-
context: EditorAgentContext;
|
|
10
|
-
signal?: AbortSignal;
|
|
11
|
-
}
|
|
12
|
-
export interface AgentToolApprovalOptions {
|
|
13
|
-
message?: (input: any) => string;
|
|
14
|
-
}
|
|
15
|
-
export interface AgentToolDefinition<TInput = unknown, TOutput = unknown> {
|
|
16
|
-
/** Discriminator that keeps plain tool definitions distinct from SDK objects. */
|
|
17
|
-
kind?: 'agent-tool';
|
|
18
|
-
name: string;
|
|
19
|
-
description: string;
|
|
20
|
-
/** Optional workflow role used by the agent topology. */
|
|
21
|
-
role?: AgentToolRole;
|
|
22
|
-
parameters?: z.ZodType;
|
|
23
|
-
/** Alias kept for existing capability definitions. */
|
|
24
|
-
inputSchema?: z.ZodType;
|
|
25
|
-
needsApproval?: boolean | ((input: TInput) => boolean | Promise<boolean>);
|
|
26
|
-
approval?: AgentToolApprovalOptions;
|
|
27
|
-
execute: (input: TInput, context: AgentToolContext) => TOutput | Promise<TOutput>;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Define a business tool consumed by the agent. Tools stay owned by the host:
|
|
31
|
-
* the element only adapts them to the Agents SDK at runtime.
|
|
32
|
-
*/
|
|
33
|
-
export declare function defineAgentTool<TInput = unknown, TOutput = unknown>(definition: AgentToolDefinition<TInput, TOutput>): AgentToolDefinition<TInput, TOutput>;
|
|
34
|
-
/** Backwards-compatible name for hosts that already use the capability API. */
|
|
35
|
-
export declare const defineCapability: typeof defineAgentTool;
|
|
36
|
-
//# sourceMappingURL=tool.d.ts.map
|
package/dist/tool.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../src/tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK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