@escapeaihq/client-core 0.8.0 → 0.42.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 +48 -4
- package/dist/adapters/capabilities.d.ts +10 -0
- package/dist/adapters/capabilities.d.ts.map +1 -0
- package/dist/adapters/capabilities.js +2 -0
- package/dist/adapters/capabilities.js.map +1 -0
- package/dist/adapters/chatAdapter.d.ts +38 -0
- package/dist/adapters/chatAdapter.d.ts.map +1 -0
- package/dist/adapters/chatAdapter.js +88 -0
- package/dist/adapters/chatAdapter.js.map +1 -0
- package/dist/adapters/directorAdapter.d.ts +62 -0
- package/dist/adapters/directorAdapter.d.ts.map +1 -0
- package/dist/adapters/directorAdapter.js +71 -0
- package/dist/adapters/directorAdapter.js.map +1 -0
- package/dist/adapters/imageAdapter.d.ts +44 -0
- package/dist/adapters/imageAdapter.d.ts.map +1 -0
- package/dist/adapters/imageAdapter.js +73 -0
- package/dist/adapters/imageAdapter.js.map +1 -0
- package/dist/adapters/index.d.ts +47 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +41 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/registry.d.ts +98 -0
- package/dist/adapters/registry.d.ts.map +1 -0
- package/dist/adapters/registry.js +106 -0
- package/dist/adapters/registry.js.map +1 -0
- package/dist/adapters/worldAdapter.d.ts +142 -0
- package/dist/adapters/worldAdapter.d.ts.map +1 -0
- package/dist/adapters/worldAdapter.js +164 -0
- package/dist/adapters/worldAdapter.js.map +1 -0
- package/dist/admin.d.ts +200 -0
- package/dist/admin.d.ts.map +1 -0
- package/dist/admin.js +124 -0
- package/dist/admin.js.map +1 -0
- package/dist/api.d.ts +1299 -3
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +683 -95
- package/dist/api.js.map +1 -1
- package/dist/audio.d.ts +33 -1
- package/dist/audio.d.ts.map +1 -1
- package/dist/audio.js +4 -1
- package/dist/audio.js.map +1 -1
- package/dist/castProjection.d.ts +35 -0
- package/dist/castProjection.d.ts.map +1 -0
- package/dist/castProjection.js +80 -0
- package/dist/castProjection.js.map +1 -0
- package/dist/conversation/binding.d.ts +62 -0
- package/dist/conversation/binding.d.ts.map +1 -0
- package/dist/conversation/binding.js +51 -0
- package/dist/conversation/binding.js.map +1 -0
- package/dist/conversation/controller.d.ts +209 -0
- package/dist/conversation/controller.d.ts.map +1 -0
- package/dist/conversation/controller.js +342 -0
- package/dist/conversation/controller.js.map +1 -0
- package/dist/conversation/effectiveModel.d.ts +62 -0
- package/dist/conversation/effectiveModel.d.ts.map +1 -0
- package/dist/conversation/effectiveModel.js +73 -0
- package/dist/conversation/effectiveModel.js.map +1 -0
- package/dist/conversation/index.d.ts +27 -0
- package/dist/conversation/index.d.ts.map +1 -0
- package/dist/conversation/index.js +27 -0
- package/dist/conversation/index.js.map +1 -0
- package/dist/conversation/participant.d.ts +66 -0
- package/dist/conversation/participant.d.ts.map +1 -0
- package/dist/conversation/participant.js +36 -0
- package/dist/conversation/participant.js.map +1 -0
- package/dist/conversation/presence.d.ts +56 -0
- package/dist/conversation/presence.d.ts.map +1 -0
- package/dist/conversation/presence.js +34 -0
- package/dist/conversation/presence.js.map +1 -0
- package/dist/conversation/presenceBus.d.ts +42 -0
- package/dist/conversation/presenceBus.d.ts.map +1 -0
- package/dist/conversation/presenceBus.js +81 -0
- package/dist/conversation/presenceBus.js.map +1 -0
- package/dist/conversation/presenceRegistry.d.ts +49 -0
- package/dist/conversation/presenceRegistry.d.ts.map +1 -0
- package/dist/conversation/presenceRegistry.js +59 -0
- package/dist/conversation/presenceRegistry.js.map +1 -0
- package/dist/conversation/roster.d.ts +72 -0
- package/dist/conversation/roster.d.ts.map +1 -0
- package/dist/conversation/roster.js +69 -0
- package/dist/conversation/roster.js.map +1 -0
- package/dist/conversation/rosterProjection.d.ts +52 -0
- package/dist/conversation/rosterProjection.d.ts.map +1 -0
- package/dist/conversation/rosterProjection.js +74 -0
- package/dist/conversation/rosterProjection.js.map +1 -0
- package/dist/conversation/router.d.ts +74 -0
- package/dist/conversation/router.d.ts.map +1 -0
- package/dist/conversation/router.js +58 -0
- package/dist/conversation/router.js.map +1 -0
- package/dist/conversation/runtime.d.ts +64 -0
- package/dist/conversation/runtime.d.ts.map +1 -0
- package/dist/conversation/runtime.js +172 -0
- package/dist/conversation/runtime.js.map +1 -0
- package/dist/conversation/types.d.ts +99 -0
- package/dist/conversation/types.d.ts.map +1 -0
- package/dist/conversation/types.js +13 -0
- package/dist/conversation/types.js.map +1 -0
- package/dist/conversation/voice.d.ts +185 -0
- package/dist/conversation/voice.d.ts.map +1 -0
- package/dist/conversation/voice.js +307 -0
- package/dist/conversation/voice.js.map +1 -0
- package/dist/graphSchema.d.ts +260 -0
- package/dist/graphSchema.d.ts.map +1 -0
- package/dist/graphSchema.js +354 -0
- package/dist/graphSchema.js.map +1 -0
- package/dist/http.d.ts +20 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +57 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/platformAssistant.d.ts +155 -0
- package/dist/platformAssistant.d.ts.map +1 -0
- package/dist/platformAssistant.js +256 -0
- package/dist/platformAssistant.js.map +1 -0
- package/dist/reactor/abortUtils.d.ts +16 -0
- package/dist/reactor/abortUtils.d.ts.map +1 -0
- package/dist/reactor/abortUtils.js +26 -0
- package/dist/reactor/abortUtils.js.map +1 -0
- package/dist/reactor/applyScenePrompt.d.ts +75 -0
- package/dist/reactor/applyScenePrompt.d.ts.map +1 -0
- package/dist/reactor/applyScenePrompt.js +60 -0
- package/dist/reactor/applyScenePrompt.js.map +1 -0
- package/dist/reactor/chunkDistribution.d.ts +43 -0
- package/dist/reactor/chunkDistribution.d.ts.map +1 -0
- package/dist/reactor/chunkDistribution.js +85 -0
- package/dist/reactor/chunkDistribution.js.map +1 -0
- package/dist/reactor/heliosCommandDispatcher.d.ts.map +1 -1
- package/dist/reactor/heliosCommandDispatcher.js +10 -15
- package/dist/reactor/heliosCommandDispatcher.js.map +1 -1
- package/dist/reactor/index.d.ts +4 -0
- package/dist/reactor/index.d.ts.map +1 -1
- package/dist/reactor/index.js +7 -0
- package/dist/reactor/index.js.map +1 -1
- package/dist/reactor/longLiveCommandDispatcher.d.ts +103 -0
- package/dist/reactor/longLiveCommandDispatcher.d.ts.map +1 -0
- package/dist/reactor/longLiveCommandDispatcher.js +87 -0
- package/dist/reactor/longLiveCommandDispatcher.js.map +1 -0
- package/dist/reactor/sceneEntry.d.ts +40 -6
- package/dist/reactor/sceneEntry.d.ts.map +1 -1
- package/dist/reactor/sceneEntry.js +63 -24
- package/dist/reactor/sceneEntry.js.map +1 -1
- package/dist/reactor/scenesFromEnrichment.d.ts.map +1 -1
- package/dist/reactor/scenesFromEnrichment.js +2 -66
- package/dist/reactor/scenesFromEnrichment.js.map +1 -1
- package/dist/reactor/seedImageOrchestrator.d.ts +42 -2
- package/dist/reactor/seedImageOrchestrator.d.ts.map +1 -1
- package/dist/reactor/seedImageOrchestrator.js +173 -4
- package/dist/reactor/seedImageOrchestrator.js.map +1 -1
- package/dist/reactor/storyTimeline.d.ts +44 -0
- package/dist/reactor/storyTimeline.d.ts.map +1 -0
- package/dist/reactor/storyTimeline.js +95 -0
- package/dist/reactor/storyTimeline.js.map +1 -0
- package/dist/storyGraph.d.ts +70 -0
- package/dist/storyGraph.d.ts.map +1 -0
- package/dist/storyGraph.js +178 -0
- package/dist/storyGraph.js.map +1 -0
- package/dist/timeFormat.d.ts +10 -0
- package/dist/timeFormat.d.ts.map +1 -1
- package/dist/timeFormat.js +12 -0
- package/dist/timeFormat.js.map +1 -1
- package/dist/toolSchemas.d.ts +370 -0
- package/dist/toolSchemas.d.ts.map +1 -0
- package/dist/toolSchemas.js +182 -0
- package/dist/toolSchemas.js.map +1 -0
- package/dist/vision/VisionPublisher.d.ts +115 -0
- package/dist/vision/VisionPublisher.d.ts.map +1 -0
- package/dist/vision/VisionPublisher.js +475 -0
- package/dist/vision/VisionPublisher.js.map +1 -0
- package/dist/vision/VisionSourceController.d.ts +127 -0
- package/dist/vision/VisionSourceController.d.ts.map +1 -0
- package/dist/vision/VisionSourceController.js +284 -0
- package/dist/vision/VisionSourceController.js.map +1 -0
- package/dist/vision/credentials.d.ts +22 -0
- package/dist/vision/credentials.d.ts.map +1 -0
- package/dist/vision/credentials.js +34 -0
- package/dist/vision/credentials.js.map +1 -0
- package/dist/vision/index.d.ts +18 -0
- package/dist/vision/index.d.ts.map +1 -0
- package/dist/vision/index.js +13 -0
- package/dist/vision/index.js.map +1 -0
- package/dist/vision/sourceKinds.d.ts +65 -0
- package/dist/vision/sourceKinds.d.ts.map +1 -0
- package/dist/vision/sourceKinds.js +26 -0
- package/dist/vision/sourceKinds.js.map +1 -0
- package/dist/vision/startVisionPublisher.d.ts +38 -0
- package/dist/vision/startVisionPublisher.d.ts.map +1 -0
- package/dist/vision/startVisionPublisher.js +44 -0
- package/dist/vision/startVisionPublisher.js.map +1 -0
- package/dist/vision/types.d.ts +95 -0
- package/dist/vision/types.d.ts.map +1 -0
- package/dist/vision/types.js +12 -0
- package/dist/vision/types.js.map +1 -0
- package/dist/vision/visionScheduler.d.ts +63 -0
- package/dist/vision/visionScheduler.d.ts.map +1 -0
- package/dist/vision/visionScheduler.js +67 -0
- package/dist/vision/visionScheduler.js.map +1 -0
- package/dist/websocket.d.ts +195 -0
- package/dist/websocket.d.ts.map +1 -1
- package/dist/websocket.js +179 -1
- package/dist/websocket.js.map +1 -1
- package/package.json +11 -1
- package/src/__tests__/adapters-capabilities.test.ts +46 -0
- package/src/__tests__/adapters-chat.test.ts +172 -0
- package/src/__tests__/adapters-director.test.ts +95 -0
- package/src/__tests__/adapters-image.test.ts +133 -0
- package/src/__tests__/adapters-platform.test.ts +95 -0
- package/src/__tests__/adapters-registry.test.ts +189 -0
- package/src/__tests__/adapters-world.test.ts +296 -0
- package/src/__tests__/admin.test.ts +312 -0
- package/src/__tests__/adventures-party.test.ts +219 -0
- package/src/__tests__/adventures.test.ts +282 -0
- package/src/__tests__/api-pollers.test.ts +104 -0
- package/src/__tests__/api.clip-lookup.test.ts +64 -0
- package/src/__tests__/api.list-images-filters.test.ts +103 -0
- package/src/__tests__/api.test.ts +470 -0
- package/src/__tests__/audio.test.ts +65 -0
- package/src/__tests__/cast.test.ts +95 -0
- package/src/__tests__/castProjection.test.ts +167 -0
- package/src/__tests__/chat-auth.test.ts +91 -0
- package/src/__tests__/conversation/controller.test.ts +697 -0
- package/src/__tests__/conversation/effectiveModel.test.ts +169 -0
- package/src/__tests__/conversation/headlessRenderer.ts +46 -0
- package/src/__tests__/conversation/presenceBus.test.ts +236 -0
- package/src/__tests__/conversation/presenceRegistry.test.ts +73 -0
- package/src/__tests__/conversation/roster.test.ts +100 -0
- package/src/__tests__/conversation/rosterProjection.test.ts +142 -0
- package/src/__tests__/conversation/router.test.ts +81 -0
- package/src/__tests__/conversation/runtime.test.ts +206 -0
- package/src/__tests__/conversation/voice.test.ts +440 -0
- package/src/__tests__/documents.test.ts +360 -0
- package/src/__tests__/graphSchema.test.ts +326 -0
- package/src/__tests__/longLiveCommandDispatcher.test.ts +185 -0
- package/src/__tests__/platformAssistant.test.ts +484 -0
- package/src/__tests__/reactor/applyScenePrompt.test.ts +192 -0
- package/src/__tests__/reactor/heliosCommandDispatcher.test.ts +4 -3
- package/src/__tests__/reactor/sceneEntry.test.ts +134 -10
- package/src/__tests__/reactor/seedImageOrchestrator.test.ts +51 -16
- package/src/__tests__/reactor/storyTimeline.test.ts +186 -0
- package/src/__tests__/regeneration.test.ts +486 -0
- package/src/__tests__/stories.test.ts +171 -0
- package/src/__tests__/storyGraph.test.ts +134 -0
- package/src/__tests__/timeFormat.test.ts +22 -1
- package/src/__tests__/toolSchemas.test.ts +57 -0
- package/src/__tests__/tools-wrappers.test.ts +272 -0
- package/src/__tests__/videoGraph.test.ts +94 -0
- package/src/__tests__/websocket-vision.test.ts +265 -0
- package/src/__tests__/websocket.test.ts +213 -0
- package/src/adapters/capabilities.ts +24 -0
- package/src/adapters/chatAdapter.ts +114 -0
- package/src/adapters/directorAdapter.ts +126 -0
- package/src/adapters/imageAdapter.ts +100 -0
- package/src/adapters/index.ts +67 -0
- package/src/adapters/registry.ts +159 -0
- package/src/adapters/worldAdapter.ts +272 -0
- package/src/admin.ts +310 -0
- package/src/api.ts +1890 -162
- package/src/audio.ts +35 -0
- package/src/castProjection.ts +95 -0
- package/src/conversation/binding.ts +81 -0
- package/src/conversation/controller.ts +439 -0
- package/src/conversation/effectiveModel.ts +111 -0
- package/src/conversation/index.ts +27 -0
- package/src/conversation/participant.ts +71 -0
- package/src/conversation/presence.ts +60 -0
- package/src/conversation/presenceBus.ts +109 -0
- package/src/conversation/presenceRegistry.ts +83 -0
- package/src/conversation/roster.ts +111 -0
- package/src/conversation/rosterProjection.ts +98 -0
- package/src/conversation/router.ts +96 -0
- package/src/conversation/runtime.ts +188 -0
- package/src/conversation/types.ts +100 -0
- package/src/conversation/voice.ts +402 -0
- package/src/graphSchema.ts +532 -0
- package/src/http.ts +72 -0
- package/src/index.ts +12 -0
- package/src/platformAssistant.ts +347 -0
- package/src/reactor/abortUtils.ts +22 -0
- package/src/reactor/applyScenePrompt.ts +136 -0
- package/src/reactor/chunkDistribution.ts +98 -0
- package/src/reactor/heliosCommandDispatcher.ts +10 -18
- package/src/reactor/index.ts +7 -0
- package/src/reactor/longLiveCommandDispatcher.ts +156 -0
- package/src/reactor/sceneEntry.ts +104 -33
- package/src/reactor/scenesFromEnrichment.ts +11 -76
- package/src/reactor/seedImageOrchestrator.ts +200 -4
- package/src/reactor/storyTimeline.ts +127 -0
- package/src/storyGraph.ts +298 -0
- package/src/timeFormat.ts +13 -0
- package/src/toolSchemas.ts +225 -0
- package/src/vision/VisionPublisher.ts +553 -0
- package/src/vision/VisionSourceController.ts +354 -0
- package/src/vision/__tests__/VisionPublisher.kvs.test.ts +244 -0
- package/src/vision/__tests__/VisionPublisher.test.ts +301 -0
- package/src/vision/__tests__/VisionSourceController.test.ts +719 -0
- package/src/vision/__tests__/startVisionPublisher.test.ts +251 -0
- package/src/vision/__tests__/toVisionRtcCredentials.test.ts +113 -0
- package/src/vision/__tests__/visionScheduler.test.ts +149 -0
- package/src/vision/credentials.ts +39 -0
- package/src/vision/index.ts +44 -0
- package/src/vision/sourceKinds.ts +75 -0
- package/src/vision/startVisionPublisher.ts +64 -0
- package/src/vision/types.ts +101 -0
- package/src/vision/visionScheduler.ts +102 -0
- package/src/websocket.ts +334 -4
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent tool-schema TypeScript mirror.
|
|
3
|
+
*
|
|
4
|
+
* This is the framework-agnostic TS view of the SERVER-SIDE RAG tool
|
|
5
|
+
* vocabulary whose canonical (single-source-of-truth) definition lives in
|
|
6
|
+
* the backend at `shared/tool_schemas.py` (Agent OS Phase 5 / P3). The Python
|
|
7
|
+
* module derives Bedrock Converse tool specs from Pydantic request models;
|
|
8
|
+
* this file mirrors the same 12 tool names, descriptions, and request field
|
|
9
|
+
* shapes so frontend code can introspect the agent's tool surface (e.g. for
|
|
10
|
+
* UI affordances, debugging panels, or future browser-defined-tool routing)
|
|
11
|
+
* without copy-pasting strings into each consumer.
|
|
12
|
+
*
|
|
13
|
+
* SCOPE: these are the *server-side* tools the agent executes inline
|
|
14
|
+
* (semantic_search, extract_image, generate_character, …). They are a
|
|
15
|
+
* DIFFERENT vocabulary from the Helios *browser-side* tools encoded in
|
|
16
|
+
* `reactor/heliosTools.ts` (`BEDROCK_TOOL_SCHEMAS`: set_scene, swap_seed, …).
|
|
17
|
+
* The two do not converge; both are intentionally separate tool surfaces.
|
|
18
|
+
*
|
|
19
|
+
* KEEP IN SYNC: when the backend's `shared/tool_schemas.py` adds/removes a
|
|
20
|
+
* tool or changes a field, mirror it here. This file is the seed that lets
|
|
21
|
+
* the web clients stop hand-copying tool metadata; the backend remains the
|
|
22
|
+
* source of truth. There is no codegen yet (tracked in the backend
|
|
23
|
+
* `specs/technical-debt.md`).
|
|
24
|
+
*/
|
|
25
|
+
/** JSON-schema-ish primitive types we expose for request fields. */
|
|
26
|
+
export type ToolFieldType = 'string' | 'number' | 'integer' | 'boolean';
|
|
27
|
+
/** Description of a single request field on a tool. */
|
|
28
|
+
export interface ToolRequestField {
|
|
29
|
+
/** Field name as the backend Pydantic model expects it (camelCase). */
|
|
30
|
+
readonly name: string;
|
|
31
|
+
readonly type: ToolFieldType;
|
|
32
|
+
/** Whether the backend model requires this field. */
|
|
33
|
+
readonly required: boolean;
|
|
34
|
+
/** Allowed values when the field is a constrained enum. */
|
|
35
|
+
readonly enum?: readonly string[];
|
|
36
|
+
readonly description: string;
|
|
37
|
+
}
|
|
38
|
+
/** A single agent tool's framework-agnostic metadata. */
|
|
39
|
+
export interface AgentToolSchema {
|
|
40
|
+
/** Tool name (matches the backend Bedrock toolSpec name). */
|
|
41
|
+
readonly name: string;
|
|
42
|
+
readonly description: string;
|
|
43
|
+
/** HTTP method the backend endpoint uses (mirrors ToolSchema.http_method). */
|
|
44
|
+
readonly httpMethod: 'GET' | 'POST';
|
|
45
|
+
/** Backend endpoint path the tool maps to. */
|
|
46
|
+
readonly endpoint: string;
|
|
47
|
+
readonly fields: readonly ToolRequestField[];
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The 12 server-side agent tools, mirroring `shared/tool_schemas.py`.
|
|
51
|
+
*
|
|
52
|
+
* Frozen at the type level via `as const` so consumers get literal
|
|
53
|
+
* `name`/`enum` types and cannot mutate the shared constant.
|
|
54
|
+
*/
|
|
55
|
+
export declare const AGENT_TOOL_SCHEMAS: readonly [{
|
|
56
|
+
readonly name: "list_videos";
|
|
57
|
+
readonly description: "List all ingested videos with metadata, download URLs, and durations.";
|
|
58
|
+
readonly httpMethod: "GET";
|
|
59
|
+
readonly endpoint: "/api/v1/ingestion/videos";
|
|
60
|
+
readonly fields: readonly [{
|
|
61
|
+
readonly name: "prefix";
|
|
62
|
+
readonly type: "string";
|
|
63
|
+
readonly required: false;
|
|
64
|
+
readonly description: "Optional prefix to filter objects by directory path";
|
|
65
|
+
}, {
|
|
66
|
+
readonly name: "pageSize";
|
|
67
|
+
readonly type: "integer";
|
|
68
|
+
readonly required: false;
|
|
69
|
+
readonly description: "Maximum number of videos to return per page (1-100)";
|
|
70
|
+
}, {
|
|
71
|
+
readonly name: "continuationToken";
|
|
72
|
+
readonly type: "string";
|
|
73
|
+
readonly required: false;
|
|
74
|
+
readonly description: "Token from previous response to continue pagination";
|
|
75
|
+
}];
|
|
76
|
+
}, {
|
|
77
|
+
readonly name: "semantic_search";
|
|
78
|
+
readonly description: "Hybrid semantic search across captions, entities, and vectors.";
|
|
79
|
+
readonly httpMethod: "POST";
|
|
80
|
+
readonly endpoint: "/api/v1/tools/semantic-search";
|
|
81
|
+
readonly fields: readonly [{
|
|
82
|
+
readonly name: "query";
|
|
83
|
+
readonly type: "string";
|
|
84
|
+
readonly required: false;
|
|
85
|
+
readonly description: "Natural language query";
|
|
86
|
+
}, {
|
|
87
|
+
readonly name: "videoId";
|
|
88
|
+
readonly type: "string";
|
|
89
|
+
readonly required: false;
|
|
90
|
+
readonly description: "Video to scope the search";
|
|
91
|
+
}, {
|
|
92
|
+
readonly name: "k";
|
|
93
|
+
readonly type: "integer";
|
|
94
|
+
readonly required: false;
|
|
95
|
+
readonly description: "Maximum records to return (1-50)";
|
|
96
|
+
}, {
|
|
97
|
+
readonly name: "offset";
|
|
98
|
+
readonly type: "integer";
|
|
99
|
+
readonly required: false;
|
|
100
|
+
readonly description: "Number of matches to skip before returning results";
|
|
101
|
+
}, {
|
|
102
|
+
readonly name: "scope";
|
|
103
|
+
readonly type: "string";
|
|
104
|
+
readonly required: false;
|
|
105
|
+
readonly enum: readonly ["shots", "videos", "hybrid"];
|
|
106
|
+
readonly description: "Search scope: shots, videos, or hybrid";
|
|
107
|
+
}];
|
|
108
|
+
}, {
|
|
109
|
+
readonly name: "events_for_range";
|
|
110
|
+
readonly description: "Retrieve segments overlapping a provided time range.";
|
|
111
|
+
readonly httpMethod: "POST";
|
|
112
|
+
readonly endpoint: "/api/v1/tools/events-for-range";
|
|
113
|
+
readonly fields: readonly [{
|
|
114
|
+
readonly name: "videoId";
|
|
115
|
+
readonly type: "string";
|
|
116
|
+
readonly required: true;
|
|
117
|
+
readonly description: "Video identifier";
|
|
118
|
+
}, {
|
|
119
|
+
readonly name: "t0";
|
|
120
|
+
readonly type: "number";
|
|
121
|
+
readonly required: true;
|
|
122
|
+
readonly description: "Start time in seconds";
|
|
123
|
+
}, {
|
|
124
|
+
readonly name: "t1";
|
|
125
|
+
readonly type: "number";
|
|
126
|
+
readonly required: true;
|
|
127
|
+
readonly description: "End time in seconds";
|
|
128
|
+
}, {
|
|
129
|
+
readonly name: "offset";
|
|
130
|
+
readonly type: "integer";
|
|
131
|
+
readonly required: false;
|
|
132
|
+
readonly description: "Number of segments to skip";
|
|
133
|
+
}, {
|
|
134
|
+
readonly name: "limit";
|
|
135
|
+
readonly type: "integer";
|
|
136
|
+
readonly required: false;
|
|
137
|
+
readonly description: "Maximum number of segments to return (1-200)";
|
|
138
|
+
}];
|
|
139
|
+
}, {
|
|
140
|
+
readonly name: "clip_lookup";
|
|
141
|
+
readonly description: "Return a signed URL for the requested clip window.";
|
|
142
|
+
readonly httpMethod: "POST";
|
|
143
|
+
readonly endpoint: "/api/v1/tools/clip-lookup";
|
|
144
|
+
readonly fields: readonly [{
|
|
145
|
+
readonly name: "videoId";
|
|
146
|
+
readonly type: "string";
|
|
147
|
+
readonly required: true;
|
|
148
|
+
readonly description: "Video identifier";
|
|
149
|
+
}, {
|
|
150
|
+
readonly name: "t0";
|
|
151
|
+
readonly type: "number";
|
|
152
|
+
readonly required: true;
|
|
153
|
+
readonly description: "Start time in seconds";
|
|
154
|
+
}, {
|
|
155
|
+
readonly name: "t1";
|
|
156
|
+
readonly type: "number";
|
|
157
|
+
readonly required: true;
|
|
158
|
+
readonly description: "End time in seconds";
|
|
159
|
+
}];
|
|
160
|
+
}, {
|
|
161
|
+
readonly name: "entity_timeline";
|
|
162
|
+
readonly description: "Find occurrences of an entity across the timeline.";
|
|
163
|
+
readonly httpMethod: "POST";
|
|
164
|
+
readonly endpoint: "/api/v1/tools/entity-timeline";
|
|
165
|
+
readonly fields: readonly [{
|
|
166
|
+
readonly name: "videoId";
|
|
167
|
+
readonly type: "string";
|
|
168
|
+
readonly required: true;
|
|
169
|
+
readonly description: "Video identifier";
|
|
170
|
+
}, {
|
|
171
|
+
readonly name: "entity";
|
|
172
|
+
readonly type: "string";
|
|
173
|
+
readonly required: true;
|
|
174
|
+
readonly description: "Entity name to locate";
|
|
175
|
+
}, {
|
|
176
|
+
readonly name: "t0";
|
|
177
|
+
readonly type: "number";
|
|
178
|
+
readonly required: false;
|
|
179
|
+
readonly description: "Optional start bound";
|
|
180
|
+
}, {
|
|
181
|
+
readonly name: "t1";
|
|
182
|
+
readonly type: "number";
|
|
183
|
+
readonly required: false;
|
|
184
|
+
readonly description: "Optional end bound";
|
|
185
|
+
}];
|
|
186
|
+
}, {
|
|
187
|
+
readonly name: "scene_neighbors";
|
|
188
|
+
readonly description: "Traverse graph neighbors for a shot within a video.";
|
|
189
|
+
readonly httpMethod: "POST";
|
|
190
|
+
readonly endpoint: "/api/v1/tools/scene-neighbors";
|
|
191
|
+
readonly fields: readonly [{
|
|
192
|
+
readonly name: "videoId";
|
|
193
|
+
readonly type: "string";
|
|
194
|
+
readonly required: true;
|
|
195
|
+
readonly description: "Video identifier";
|
|
196
|
+
}, {
|
|
197
|
+
readonly name: "shotId";
|
|
198
|
+
readonly type: "string";
|
|
199
|
+
readonly required: true;
|
|
200
|
+
readonly description: "Shot identifier";
|
|
201
|
+
}, {
|
|
202
|
+
readonly name: "depth";
|
|
203
|
+
readonly type: "integer";
|
|
204
|
+
readonly required: false;
|
|
205
|
+
readonly description: "Traversal depth (1-3)";
|
|
206
|
+
}];
|
|
207
|
+
}, {
|
|
208
|
+
readonly name: "dialog_search";
|
|
209
|
+
readonly description: "Search spoken dialog/transcript text within a video by keyword or phrase.";
|
|
210
|
+
readonly httpMethod: "POST";
|
|
211
|
+
readonly endpoint: "/api/v1/tools/dialog-search";
|
|
212
|
+
readonly fields: readonly [{
|
|
213
|
+
readonly name: "videoId";
|
|
214
|
+
readonly type: "string";
|
|
215
|
+
readonly required: true;
|
|
216
|
+
readonly description: "Video identifier";
|
|
217
|
+
}, {
|
|
218
|
+
readonly name: "query";
|
|
219
|
+
readonly type: "string";
|
|
220
|
+
readonly required: true;
|
|
221
|
+
readonly description: "Search query for dialog text";
|
|
222
|
+
}, {
|
|
223
|
+
readonly name: "limit";
|
|
224
|
+
readonly type: "integer";
|
|
225
|
+
readonly required: false;
|
|
226
|
+
readonly description: "Maximum results to return (1-100)";
|
|
227
|
+
}];
|
|
228
|
+
}, {
|
|
229
|
+
readonly name: "get_transcript";
|
|
230
|
+
readonly description: "Retrieve the full transcript of spoken dialog for a video, optionally filtered by time range.";
|
|
231
|
+
readonly httpMethod: "POST";
|
|
232
|
+
readonly endpoint: "/api/v1/tools/get-transcript";
|
|
233
|
+
readonly fields: readonly [{
|
|
234
|
+
readonly name: "videoId";
|
|
235
|
+
readonly type: "string";
|
|
236
|
+
readonly required: true;
|
|
237
|
+
readonly description: "Video identifier";
|
|
238
|
+
}, {
|
|
239
|
+
readonly name: "t0";
|
|
240
|
+
readonly type: "number";
|
|
241
|
+
readonly required: false;
|
|
242
|
+
readonly description: "Optional start time filter";
|
|
243
|
+
}, {
|
|
244
|
+
readonly name: "t1";
|
|
245
|
+
readonly type: "number";
|
|
246
|
+
readonly required: false;
|
|
247
|
+
readonly description: "Optional end time filter";
|
|
248
|
+
}];
|
|
249
|
+
}, {
|
|
250
|
+
readonly name: "speaker_dialog";
|
|
251
|
+
readonly description: "Retrieve all dialog spoken by a specific character in a video.";
|
|
252
|
+
readonly httpMethod: "POST";
|
|
253
|
+
readonly endpoint: "/api/v1/tools/speaker-dialog";
|
|
254
|
+
readonly fields: readonly [{
|
|
255
|
+
readonly name: "videoId";
|
|
256
|
+
readonly type: "string";
|
|
257
|
+
readonly required: true;
|
|
258
|
+
readonly description: "Video identifier";
|
|
259
|
+
}, {
|
|
260
|
+
readonly name: "entity";
|
|
261
|
+
readonly type: "string";
|
|
262
|
+
readonly required: true;
|
|
263
|
+
readonly description: "Character/entity name";
|
|
264
|
+
}, {
|
|
265
|
+
readonly name: "t0";
|
|
266
|
+
readonly type: "number";
|
|
267
|
+
readonly required: false;
|
|
268
|
+
readonly description: "Optional start time filter";
|
|
269
|
+
}, {
|
|
270
|
+
readonly name: "t1";
|
|
271
|
+
readonly type: "number";
|
|
272
|
+
readonly required: false;
|
|
273
|
+
readonly description: "Optional end time filter";
|
|
274
|
+
}];
|
|
275
|
+
}, {
|
|
276
|
+
readonly name: "extract_image";
|
|
277
|
+
readonly description: "Extract and show an actual frame from the video without AI modification. Provide the entity parameter to locate a relevant scene; optionally provide a timestamp.";
|
|
278
|
+
readonly httpMethod: "POST";
|
|
279
|
+
readonly endpoint: "/api/v1/tools/extract-image";
|
|
280
|
+
readonly fields: readonly [{
|
|
281
|
+
readonly name: "videoId";
|
|
282
|
+
readonly type: "string";
|
|
283
|
+
readonly required: true;
|
|
284
|
+
readonly description: "Video identifier";
|
|
285
|
+
}, {
|
|
286
|
+
readonly name: "entity";
|
|
287
|
+
readonly type: "string";
|
|
288
|
+
readonly required: true;
|
|
289
|
+
readonly description: "Name of a character, object, location, or visual element to locate";
|
|
290
|
+
}, {
|
|
291
|
+
readonly name: "timestamp";
|
|
292
|
+
readonly type: "number";
|
|
293
|
+
readonly required: false;
|
|
294
|
+
readonly description: "Optional specific timestamp (seconds) to extract the frame from";
|
|
295
|
+
}];
|
|
296
|
+
}, {
|
|
297
|
+
readonly name: "regenerate_image";
|
|
298
|
+
readonly description: "Generate an AI-modified image based on a video frame. Use only for creative transformations. The entity locates a scene; the prompt controls the transformation.";
|
|
299
|
+
readonly httpMethod: "POST";
|
|
300
|
+
readonly endpoint: "/api/v1/tools/regenerate-image";
|
|
301
|
+
readonly fields: readonly [{
|
|
302
|
+
readonly name: "videoId";
|
|
303
|
+
readonly type: "string";
|
|
304
|
+
readonly required: true;
|
|
305
|
+
readonly description: "Video identifier";
|
|
306
|
+
}, {
|
|
307
|
+
readonly name: "entity";
|
|
308
|
+
readonly type: "string";
|
|
309
|
+
readonly required: true;
|
|
310
|
+
readonly description: "Name of a character, object, location, or visual element to locate";
|
|
311
|
+
}, {
|
|
312
|
+
readonly name: "prompt";
|
|
313
|
+
readonly type: "string";
|
|
314
|
+
readonly required: true;
|
|
315
|
+
readonly description: "Text prompt describing what to generate from the frame";
|
|
316
|
+
}, {
|
|
317
|
+
readonly name: "timestamp";
|
|
318
|
+
readonly type: "number";
|
|
319
|
+
readonly required: false;
|
|
320
|
+
readonly description: "Optional specific timestamp (seconds) to extract the frame from";
|
|
321
|
+
}, {
|
|
322
|
+
readonly name: "model";
|
|
323
|
+
readonly type: "string";
|
|
324
|
+
readonly required: false;
|
|
325
|
+
readonly description: "Optional Gemini model override";
|
|
326
|
+
}];
|
|
327
|
+
}, {
|
|
328
|
+
readonly name: "generate_character";
|
|
329
|
+
readonly description: "Generate a clean 2D rest-pose character image for viseme bundle generation. Provide videoId+entity to extract a frame, or sourceImageId to start from an existing tracked image.";
|
|
330
|
+
readonly httpMethod: "POST";
|
|
331
|
+
readonly endpoint: "/api/v1/tools/generate-character";
|
|
332
|
+
readonly fields: readonly [{
|
|
333
|
+
readonly name: "videoId";
|
|
334
|
+
readonly type: "string";
|
|
335
|
+
readonly required: false;
|
|
336
|
+
readonly description: "Video to extract a reference frame from";
|
|
337
|
+
}, {
|
|
338
|
+
readonly name: "entity";
|
|
339
|
+
readonly type: "string";
|
|
340
|
+
readonly required: false;
|
|
341
|
+
readonly description: "Character/entity name to locate in the video";
|
|
342
|
+
}, {
|
|
343
|
+
readonly name: "timestamp";
|
|
344
|
+
readonly type: "number";
|
|
345
|
+
readonly required: false;
|
|
346
|
+
readonly description: "Optional timestamp for frame extraction";
|
|
347
|
+
}, {
|
|
348
|
+
readonly name: "sourceImageId";
|
|
349
|
+
readonly type: "string";
|
|
350
|
+
readonly required: false;
|
|
351
|
+
readonly description: "ID of an existing tracked image to use as reference";
|
|
352
|
+
}, {
|
|
353
|
+
readonly name: "style";
|
|
354
|
+
readonly type: "string";
|
|
355
|
+
readonly required: false;
|
|
356
|
+
readonly description: "Style hint (e.g., 'anime', 'pixel art', 'cartoon')";
|
|
357
|
+
}, {
|
|
358
|
+
readonly name: "model";
|
|
359
|
+
readonly type: "string";
|
|
360
|
+
readonly required: false;
|
|
361
|
+
readonly description: "Optional Gemini model override";
|
|
362
|
+
}];
|
|
363
|
+
}];
|
|
364
|
+
/** Union of the 12 server-side tool names (literal type). */
|
|
365
|
+
export type AgentToolName = (typeof AGENT_TOOL_SCHEMAS)[number]['name'];
|
|
366
|
+
/** Look up a single tool schema by name. Returns undefined if unknown. */
|
|
367
|
+
export declare function getAgentToolSchema(name: string): AgentToolSchema | undefined;
|
|
368
|
+
/** All 12 tool names, in canonical order. */
|
|
369
|
+
export declare const AGENT_TOOL_NAMES: readonly AgentToolName[];
|
|
370
|
+
//# sourceMappingURL=toolSchemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolSchemas.d.ts","sourceRoot":"","sources":["../src/toolSchemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,oEAAoE;AACpE,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;AAExE,uDAAuD;AACvD,MAAM,WAAW,gBAAgB;IAC/B,uEAAuE;IACvE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,qDAAqD;IACrD,QAAQ,CAAC,QAAQ,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
|
|
2
|
+
* Agent tool-schema TypeScript mirror.
|
|
3
|
+
*
|
|
4
|
+
* This is the framework-agnostic TS view of the SERVER-SIDE RAG tool
|
|
5
|
+
* vocabulary whose canonical (single-source-of-truth) definition lives in
|
|
6
|
+
* the backend at `shared/tool_schemas.py` (Agent OS Phase 5 / P3). The Python
|
|
7
|
+
* module derives Bedrock Converse tool specs from Pydantic request models;
|
|
8
|
+
* this file mirrors the same 12 tool names, descriptions, and request field
|
|
9
|
+
* shapes so frontend code can introspect the agent's tool surface (e.g. for
|
|
10
|
+
* UI affordances, debugging panels, or future browser-defined-tool routing)
|
|
11
|
+
* without copy-pasting strings into each consumer.
|
|
12
|
+
*
|
|
13
|
+
* SCOPE: these are the *server-side* tools the agent executes inline
|
|
14
|
+
* (semantic_search, extract_image, generate_character, …). They are a
|
|
15
|
+
* DIFFERENT vocabulary from the Helios *browser-side* tools encoded in
|
|
16
|
+
* `reactor/heliosTools.ts` (`BEDROCK_TOOL_SCHEMAS`: set_scene, swap_seed, …).
|
|
17
|
+
* The two do not converge; both are intentionally separate tool surfaces.
|
|
18
|
+
*
|
|
19
|
+
* KEEP IN SYNC: when the backend's `shared/tool_schemas.py` adds/removes a
|
|
20
|
+
* tool or changes a field, mirror it here. This file is the seed that lets
|
|
21
|
+
* the web clients stop hand-copying tool metadata; the backend remains the
|
|
22
|
+
* source of truth. There is no codegen yet (tracked in the backend
|
|
23
|
+
* `specs/technical-debt.md`).
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* The 12 server-side agent tools, mirroring `shared/tool_schemas.py`.
|
|
27
|
+
*
|
|
28
|
+
* Frozen at the type level via `as const` so consumers get literal
|
|
29
|
+
* `name`/`enum` types and cannot mutate the shared constant.
|
|
30
|
+
*/
|
|
31
|
+
export const AGENT_TOOL_SCHEMAS = [
|
|
32
|
+
{
|
|
33
|
+
name: 'list_videos',
|
|
34
|
+
description: 'List all ingested videos with metadata, download URLs, and durations.',
|
|
35
|
+
httpMethod: 'GET',
|
|
36
|
+
endpoint: '/api/v1/ingestion/videos',
|
|
37
|
+
fields: [
|
|
38
|
+
{ name: 'prefix', type: 'string', required: false, description: 'Optional prefix to filter objects by directory path' },
|
|
39
|
+
{ name: 'pageSize', type: 'integer', required: false, description: 'Maximum number of videos to return per page (1-100)' },
|
|
40
|
+
{ name: 'continuationToken', type: 'string', required: false, description: 'Token from previous response to continue pagination' },
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'semantic_search',
|
|
45
|
+
description: 'Hybrid semantic search across captions, entities, and vectors.',
|
|
46
|
+
httpMethod: 'POST',
|
|
47
|
+
endpoint: '/api/v1/tools/semantic-search',
|
|
48
|
+
fields: [
|
|
49
|
+
{ name: 'query', type: 'string', required: false, description: 'Natural language query' },
|
|
50
|
+
{ name: 'videoId', type: 'string', required: false, description: 'Video to scope the search' },
|
|
51
|
+
{ name: 'k', type: 'integer', required: false, description: 'Maximum records to return (1-50)' },
|
|
52
|
+
{ name: 'offset', type: 'integer', required: false, description: 'Number of matches to skip before returning results' },
|
|
53
|
+
{ name: 'scope', type: 'string', required: false, enum: ['shots', 'videos', 'hybrid'], description: 'Search scope: shots, videos, or hybrid' },
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'events_for_range',
|
|
58
|
+
description: 'Retrieve segments overlapping a provided time range.',
|
|
59
|
+
httpMethod: 'POST',
|
|
60
|
+
endpoint: '/api/v1/tools/events-for-range',
|
|
61
|
+
fields: [
|
|
62
|
+
{ name: 'videoId', type: 'string', required: true, description: 'Video identifier' },
|
|
63
|
+
{ name: 't0', type: 'number', required: true, description: 'Start time in seconds' },
|
|
64
|
+
{ name: 't1', type: 'number', required: true, description: 'End time in seconds' },
|
|
65
|
+
{ name: 'offset', type: 'integer', required: false, description: 'Number of segments to skip' },
|
|
66
|
+
{ name: 'limit', type: 'integer', required: false, description: 'Maximum number of segments to return (1-200)' },
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'clip_lookup',
|
|
71
|
+
description: 'Return a signed URL for the requested clip window.',
|
|
72
|
+
httpMethod: 'POST',
|
|
73
|
+
endpoint: '/api/v1/tools/clip-lookup',
|
|
74
|
+
fields: [
|
|
75
|
+
{ name: 'videoId', type: 'string', required: true, description: 'Video identifier' },
|
|
76
|
+
{ name: 't0', type: 'number', required: true, description: 'Start time in seconds' },
|
|
77
|
+
{ name: 't1', type: 'number', required: true, description: 'End time in seconds' },
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'entity_timeline',
|
|
82
|
+
description: 'Find occurrences of an entity across the timeline.',
|
|
83
|
+
httpMethod: 'POST',
|
|
84
|
+
endpoint: '/api/v1/tools/entity-timeline',
|
|
85
|
+
fields: [
|
|
86
|
+
{ name: 'videoId', type: 'string', required: true, description: 'Video identifier' },
|
|
87
|
+
{ name: 'entity', type: 'string', required: true, description: 'Entity name to locate' },
|
|
88
|
+
{ name: 't0', type: 'number', required: false, description: 'Optional start bound' },
|
|
89
|
+
{ name: 't1', type: 'number', required: false, description: 'Optional end bound' },
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: 'scene_neighbors',
|
|
94
|
+
description: 'Traverse graph neighbors for a shot within a video.',
|
|
95
|
+
httpMethod: 'POST',
|
|
96
|
+
endpoint: '/api/v1/tools/scene-neighbors',
|
|
97
|
+
fields: [
|
|
98
|
+
{ name: 'videoId', type: 'string', required: true, description: 'Video identifier' },
|
|
99
|
+
{ name: 'shotId', type: 'string', required: true, description: 'Shot identifier' },
|
|
100
|
+
{ name: 'depth', type: 'integer', required: false, description: 'Traversal depth (1-3)' },
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: 'dialog_search',
|
|
105
|
+
description: 'Search spoken dialog/transcript text within a video by keyword or phrase.',
|
|
106
|
+
httpMethod: 'POST',
|
|
107
|
+
endpoint: '/api/v1/tools/dialog-search',
|
|
108
|
+
fields: [
|
|
109
|
+
{ name: 'videoId', type: 'string', required: true, description: 'Video identifier' },
|
|
110
|
+
{ name: 'query', type: 'string', required: true, description: 'Search query for dialog text' },
|
|
111
|
+
{ name: 'limit', type: 'integer', required: false, description: 'Maximum results to return (1-100)' },
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: 'get_transcript',
|
|
116
|
+
description: 'Retrieve the full transcript of spoken dialog for a video, optionally filtered by time range.',
|
|
117
|
+
httpMethod: 'POST',
|
|
118
|
+
endpoint: '/api/v1/tools/get-transcript',
|
|
119
|
+
fields: [
|
|
120
|
+
{ name: 'videoId', type: 'string', required: true, description: 'Video identifier' },
|
|
121
|
+
{ name: 't0', type: 'number', required: false, description: 'Optional start time filter' },
|
|
122
|
+
{ name: 't1', type: 'number', required: false, description: 'Optional end time filter' },
|
|
123
|
+
],
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: 'speaker_dialog',
|
|
127
|
+
description: 'Retrieve all dialog spoken by a specific character in a video.',
|
|
128
|
+
httpMethod: 'POST',
|
|
129
|
+
endpoint: '/api/v1/tools/speaker-dialog',
|
|
130
|
+
fields: [
|
|
131
|
+
{ name: 'videoId', type: 'string', required: true, description: 'Video identifier' },
|
|
132
|
+
{ name: 'entity', type: 'string', required: true, description: 'Character/entity name' },
|
|
133
|
+
{ name: 't0', type: 'number', required: false, description: 'Optional start time filter' },
|
|
134
|
+
{ name: 't1', type: 'number', required: false, description: 'Optional end time filter' },
|
|
135
|
+
],
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: 'extract_image',
|
|
139
|
+
description: 'Extract and show an actual frame from the video without AI modification. Provide the entity parameter to locate a relevant scene; optionally provide a timestamp.',
|
|
140
|
+
httpMethod: 'POST',
|
|
141
|
+
endpoint: '/api/v1/tools/extract-image',
|
|
142
|
+
fields: [
|
|
143
|
+
{ name: 'videoId', type: 'string', required: true, description: 'Video identifier' },
|
|
144
|
+
{ name: 'entity', type: 'string', required: true, description: 'Name of a character, object, location, or visual element to locate' },
|
|
145
|
+
{ name: 'timestamp', type: 'number', required: false, description: 'Optional specific timestamp (seconds) to extract the frame from' },
|
|
146
|
+
],
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
name: 'regenerate_image',
|
|
150
|
+
description: 'Generate an AI-modified image based on a video frame. Use only for creative transformations. The entity locates a scene; the prompt controls the transformation.',
|
|
151
|
+
httpMethod: 'POST',
|
|
152
|
+
endpoint: '/api/v1/tools/regenerate-image',
|
|
153
|
+
fields: [
|
|
154
|
+
{ name: 'videoId', type: 'string', required: true, description: 'Video identifier' },
|
|
155
|
+
{ name: 'entity', type: 'string', required: true, description: 'Name of a character, object, location, or visual element to locate' },
|
|
156
|
+
{ name: 'prompt', type: 'string', required: true, description: 'Text prompt describing what to generate from the frame' },
|
|
157
|
+
{ name: 'timestamp', type: 'number', required: false, description: 'Optional specific timestamp (seconds) to extract the frame from' },
|
|
158
|
+
{ name: 'model', type: 'string', required: false, description: 'Optional Gemini model override' },
|
|
159
|
+
],
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
name: 'generate_character',
|
|
163
|
+
description: 'Generate a clean 2D rest-pose character image for viseme bundle generation. Provide videoId+entity to extract a frame, or sourceImageId to start from an existing tracked image.',
|
|
164
|
+
httpMethod: 'POST',
|
|
165
|
+
endpoint: '/api/v1/tools/generate-character',
|
|
166
|
+
fields: [
|
|
167
|
+
{ name: 'videoId', type: 'string', required: false, description: 'Video to extract a reference frame from' },
|
|
168
|
+
{ name: 'entity', type: 'string', required: false, description: 'Character/entity name to locate in the video' },
|
|
169
|
+
{ name: 'timestamp', type: 'number', required: false, description: 'Optional timestamp for frame extraction' },
|
|
170
|
+
{ name: 'sourceImageId', type: 'string', required: false, description: 'ID of an existing tracked image to use as reference' },
|
|
171
|
+
{ name: 'style', type: 'string', required: false, description: "Style hint (e.g., 'anime', 'pixel art', 'cartoon')" },
|
|
172
|
+
{ name: 'model', type: 'string', required: false, description: 'Optional Gemini model override' },
|
|
173
|
+
],
|
|
174
|
+
},
|
|
175
|
+
];
|
|
176
|
+
/** Look up a single tool schema by name. Returns undefined if unknown. */
|
|
177
|
+
export function getAgentToolSchema(name) {
|
|
178
|
+
return AGENT_TOOL_SCHEMAS.find((tool) => tool.name === name);
|
|
179
|
+
}
|
|
180
|
+
/** All 12 tool names, in canonical order. */
|
|
181
|
+
export const AGENT_TOOL_NAMES = AGENT_TOOL_SCHEMAS.map((tool) => tool.name);
|
|
182
|
+
//# sourceMappingURL=toolSchemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolSchemas.js","sourceRoot":"","sources":["../src/toolSchemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AA6BH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC;QACE,IAAI,EAAE,aAAa;QACnB,WAAW,EACT,uEAAuE;QACzE,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE,0BAA0B;QACpC,MAAM,EAAE;YACN,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,qDAAqD,EAAE;YACvH,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,qDAAqD,EAAE;YAC1H,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,qDAAqD,EAAE;SACnI;KACF;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,WAAW,EACT,gEAAgE;QAClE,UAAU,EAAE,MAAM;QAClB,QAAQ,EAAE,+BAA+B;QACzC,MAAM,EAAE;YACN,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QA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