@wiro-ai/wiro-mcp 1.3.4 → 1.4.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 +173 -16
- package/dist/client.d.ts +10 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +39 -20
- package/dist/client.js.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.ts +2 -0
- package/dist/instructions.d.ts.map +1 -0
- package/dist/instructions.js +25 -0
- package/dist/instructions.js.map +1 -0
- package/dist/playbooks.d.ts +8 -0
- package/dist/playbooks.d.ts.map +1 -0
- package/dist/playbooks.js +665 -0
- package/dist/playbooks.js.map +1 -0
- package/dist/prompts.d.ts +4 -0
- package/dist/prompts.d.ts.map +1 -0
- package/dist/prompts.js +133 -0
- package/dist/prompts.js.map +1 -0
- package/dist/server.d.ts +9 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +9 -3
- package/dist/server.js.map +1 -1
- package/dist/tools/apply-agent-skills.d.ts +4 -0
- package/dist/tools/apply-agent-skills.d.ts.map +1 -0
- package/dist/tools/apply-agent-skills.js +545 -0
- package/dist/tools/apply-agent-skills.js.map +1 -0
- package/dist/tools/cancel-agent-message.d.ts +4 -0
- package/dist/tools/cancel-agent-message.d.ts.map +1 -0
- package/dist/tools/cancel-agent-message.js +126 -0
- package/dist/tools/cancel-agent-message.js.map +1 -0
- package/dist/tools/cancel-task.js +3 -3
- package/dist/tools/cancel-task.js.map +1 -1
- package/dist/tools/clone-workflow.d.ts +4 -0
- package/dist/tools/clone-workflow.d.ts.map +1 -0
- package/dist/tools/clone-workflow.js +83 -0
- package/dist/tools/clone-workflow.js.map +1 -0
- package/dist/tools/connect-agent-oauth.d.ts +4 -0
- package/dist/tools/connect-agent-oauth.d.ts.map +1 -0
- package/dist/tools/connect-agent-oauth.js +508 -0
- package/dist/tools/connect-agent-oauth.js.map +1 -0
- package/dist/tools/control-agent.d.ts +4 -0
- package/dist/tools/control-agent.d.ts.map +1 -0
- package/dist/tools/control-agent.js +274 -0
- package/dist/tools/control-agent.js.map +1 -0
- package/dist/tools/create-workflow.d.ts +100 -0
- package/dist/tools/create-workflow.d.ts.map +1 -0
- package/dist/tools/create-workflow.js +103 -0
- package/dist/tools/create-workflow.js.map +1 -0
- package/dist/tools/delete-agent-session.d.ts +6 -0
- package/dist/tools/delete-agent-session.d.ts.map +1 -0
- package/dist/tools/delete-agent-session.js +134 -0
- package/dist/tools/delete-agent-session.js.map +1 -0
- package/dist/tools/delete-agent.d.ts +4 -0
- package/dist/tools/delete-agent.d.ts.map +1 -0
- package/dist/tools/delete-agent.js +144 -0
- package/dist/tools/delete-agent.js.map +1 -0
- package/dist/tools/delete-workflow.d.ts +4 -0
- package/dist/tools/delete-workflow.d.ts.map +1 -0
- package/dist/tools/delete-workflow.js +77 -0
- package/dist/tools/delete-workflow.js.map +1 -0
- package/dist/tools/deploy-agent.d.ts +4 -0
- package/dist/tools/deploy-agent.d.ts.map +1 -0
- package/dist/tools/deploy-agent.js +455 -0
- package/dist/tools/deploy-agent.js.map +1 -0
- package/dist/tools/disconnect-agent-oauth.d.ts +4 -0
- package/dist/tools/disconnect-agent-oauth.d.ts.map +1 -0
- package/dist/tools/disconnect-agent-oauth.js +118 -0
- package/dist/tools/disconnect-agent-oauth.js.map +1 -0
- package/dist/tools/get-account.d.ts +4 -0
- package/dist/tools/get-account.d.ts.map +1 -0
- package/dist/tools/get-account.js +110 -0
- package/dist/tools/get-account.js.map +1 -0
- package/dist/tools/get-agent-activity.d.ts +4 -0
- package/dist/tools/get-agent-activity.d.ts.map +1 -0
- package/dist/tools/get-agent-activity.js +383 -0
- package/dist/tools/get-agent-activity.js.map +1 -0
- package/dist/tools/get-agent-conversation.d.ts +4 -0
- package/dist/tools/get-agent-conversation.d.ts.map +1 -0
- package/dist/tools/get-agent-conversation.js +224 -0
- package/dist/tools/get-agent-conversation.js.map +1 -0
- package/dist/tools/get-agent-message.d.ts +4 -0
- package/dist/tools/get-agent-message.d.ts.map +1 -0
- package/dist/tools/get-agent-message.js +68 -0
- package/dist/tools/get-agent-message.js.map +1 -0
- package/dist/tools/get-agent-template.d.ts +4 -0
- package/dist/tools/get-agent-template.d.ts.map +1 -0
- package/dist/tools/get-agent-template.js +107 -0
- package/dist/tools/get-agent-template.js.map +1 -0
- package/dist/tools/get-model-schema.d.ts +5 -1
- package/dist/tools/get-model-schema.d.ts.map +1 -1
- package/dist/tools/get-model-schema.js +136 -8
- package/dist/tools/get-model-schema.js.map +1 -1
- package/dist/tools/get-my-agent.d.ts +4 -0
- package/dist/tools/get-my-agent.d.ts.map +1 -0
- package/dist/tools/get-my-agent.js +78 -0
- package/dist/tools/get-my-agent.js.map +1 -0
- package/dist/tools/get-playbook.d.ts +3 -0
- package/dist/tools/get-playbook.d.ts.map +1 -0
- package/dist/tools/get-playbook.js +50 -0
- package/dist/tools/get-playbook.js.map +1 -0
- package/dist/tools/get-task-price.d.ts.map +1 -1
- package/dist/tools/get-task-price.js +42 -15
- package/dist/tools/get-task-price.js.map +1 -1
- package/dist/tools/get-task.d.ts.map +1 -1
- package/dist/tools/get-task.js +4 -3
- package/dist/tools/get-task.js.map +1 -1
- package/dist/tools/get-workflow.d.ts +9 -0
- package/dist/tools/get-workflow.d.ts.map +1 -0
- package/dist/tools/get-workflow.js +99 -0
- package/dist/tools/get-workflow.js.map +1 -0
- package/dist/tools/index.d.ts +62 -2
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +127 -14
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/kill-task.d.ts.map +1 -1
- package/dist/tools/kill-task.js +10 -6
- package/dist/tools/kill-task.js.map +1 -1
- package/dist/tools/list-agent-skills.d.ts +4 -0
- package/dist/tools/list-agent-skills.d.ts.map +1 -0
- package/dist/tools/list-agent-skills.js +242 -0
- package/dist/tools/list-agent-skills.js.map +1 -0
- package/dist/tools/list-agent-templates.d.ts +4 -0
- package/dist/tools/list-agent-templates.d.ts.map +1 -0
- package/dist/tools/list-agent-templates.js +110 -0
- package/dist/tools/list-agent-templates.js.map +1 -0
- package/dist/tools/list-my-agents.d.ts +4 -0
- package/dist/tools/list-my-agents.d.ts.map +1 -0
- package/dist/tools/list-my-agents.js +90 -0
- package/dist/tools/list-my-agents.js.map +1 -0
- package/dist/tools/list-studio-results.d.ts +4 -0
- package/dist/tools/list-studio-results.d.ts.map +1 -0
- package/dist/tools/list-studio-results.js +95 -0
- package/dist/tools/list-studio-results.js.map +1 -0
- package/dist/tools/list-tasks.d.ts.map +1 -1
- package/dist/tools/list-tasks.js +7 -5
- package/dist/tools/list-tasks.js.map +1 -1
- package/dist/tools/list-workflow-runs.d.ts +4 -0
- package/dist/tools/list-workflow-runs.d.ts.map +1 -0
- package/dist/tools/list-workflow-runs.js +110 -0
- package/dist/tools/list-workflow-runs.js.map +1 -0
- package/dist/tools/list-workflows.d.ts +4 -0
- package/dist/tools/list-workflows.d.ts.map +1 -0
- package/dist/tools/list-workflows.js +143 -0
- package/dist/tools/list-workflows.js.map +1 -0
- package/dist/tools/manage-agent-billing.d.ts +4 -0
- package/dist/tools/manage-agent-billing.d.ts.map +1 -0
- package/dist/tools/manage-agent-billing.js +764 -0
- package/dist/tools/manage-agent-billing.js.map +1 -0
- package/dist/tools/manage-agent-custom-skill.d.ts +4 -0
- package/dist/tools/manage-agent-custom-skill.d.ts.map +1 -0
- package/dist/tools/manage-agent-custom-skill.js +537 -0
- package/dist/tools/manage-agent-custom-skill.js.map +1 -0
- package/dist/tools/recommend-model.d.ts.map +1 -1
- package/dist/tools/recommend-model.js +6 -5
- package/dist/tools/recommend-model.js.map +1 -1
- package/dist/tools/resume-workflow-run.d.ts +4 -0
- package/dist/tools/resume-workflow-run.d.ts.map +1 -0
- package/dist/tools/resume-workflow-run.js +69 -0
- package/dist/tools/resume-workflow-run.js.map +1 -0
- package/dist/tools/run-model.d.ts.map +1 -1
- package/dist/tools/run-model.js +39 -3
- package/dist/tools/run-model.js.map +1 -1
- package/dist/tools/run-workflow.d.ts +6 -0
- package/dist/tools/run-workflow.d.ts.map +1 -0
- package/dist/tools/run-workflow.js +132 -0
- package/dist/tools/run-workflow.js.map +1 -0
- package/dist/tools/save-workflow-from-agent.d.ts +4 -0
- package/dist/tools/save-workflow-from-agent.d.ts.map +1 -0
- package/dist/tools/save-workflow-from-agent.js +283 -0
- package/dist/tools/save-workflow-from-agent.js.map +1 -0
- package/dist/tools/schemas.d.ts +62 -12
- package/dist/tools/schemas.d.ts.map +1 -1
- package/dist/tools/schemas.js +17 -3
- package/dist/tools/schemas.js.map +1 -1
- package/dist/tools/search-models.js +6 -6
- package/dist/tools/search-models.js.map +1 -1
- package/dist/tools/send-agent-message.d.ts +4 -0
- package/dist/tools/send-agent-message.d.ts.map +1 -0
- package/dist/tools/send-agent-message.js +156 -0
- package/dist/tools/send-agent-message.js.map +1 -0
- package/dist/tools/set-agent-credentials.d.ts +4 -0
- package/dist/tools/set-agent-credentials.d.ts.map +1 -0
- package/dist/tools/set-agent-credentials.js +529 -0
- package/dist/tools/set-agent-credentials.js.map +1 -0
- package/dist/tools/update-agent.d.ts +4 -0
- package/dist/tools/update-agent.d.ts.map +1 -0
- package/dist/tools/update-agent.js +178 -0
- package/dist/tools/update-agent.js.map +1 -0
- package/dist/tools/update-workflow.d.ts +201 -0
- package/dist/tools/update-workflow.d.ts.map +1 -0
- package/dist/tools/update-workflow.js +168 -0
- package/dist/tools/update-workflow.js.map +1 -0
- package/dist/tools/upload-file.d.ts.map +1 -1
- package/dist/tools/upload-file.js +4 -3
- package/dist/tools/upload-file.js.map +1 -1
- package/dist/tools/wait-for-workflow-run.d.ts +259 -0
- package/dist/tools/wait-for-workflow-run.d.ts.map +1 -0
- package/dist/tools/wait-for-workflow-run.js +190 -0
- package/dist/tools/wait-for-workflow-run.js.map +1 -0
- package/dist/types.d.ts +12 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/agent-catalog.d.ts +1256 -0
- package/dist/utils/agent-catalog.d.ts.map +1 -0
- package/dist/utils/agent-catalog.js +388 -0
- package/dist/utils/agent-catalog.js.map +1 -0
- package/dist/utils/agent-config.d.ts +441 -0
- package/dist/utils/agent-config.d.ts.map +1 -0
- package/dist/utils/agent-config.js +1667 -0
- package/dist/utils/agent-config.js.map +1 -0
- package/dist/utils/agent-message.d.ts +115 -0
- package/dist/utils/agent-message.d.ts.map +1 -0
- package/dist/utils/agent-message.js +246 -0
- package/dist/utils/agent-message.js.map +1 -0
- package/dist/utils/agent-targets.d.ts +76 -0
- package/dist/utils/agent-targets.d.ts.map +1 -0
- package/dist/utils/agent-targets.js +408 -0
- package/dist/utils/agent-targets.js.map +1 -0
- package/dist/utils/agent-turns.d.ts +354 -0
- package/dist/utils/agent-turns.d.ts.map +1 -0
- package/dist/utils/agent-turns.js +623 -0
- package/dist/utils/agent-turns.js.map +1 -0
- package/dist/utils/api.d.ts +40 -0
- package/dist/utils/api.d.ts.map +1 -0
- package/dist/utils/api.js +111 -0
- package/dist/utils/api.js.map +1 -0
- package/dist/utils/format.d.ts +38 -1
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/format.js +162 -13
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/media.d.ts +28 -0
- package/dist/utils/media.d.ts.map +1 -0
- package/dist/utils/media.js +65 -0
- package/dist/utils/media.js.map +1 -0
- package/dist/utils/poll.d.ts +39 -0
- package/dist/utils/poll.d.ts.map +1 -0
- package/dist/utils/poll.js +111 -0
- package/dist/utils/poll.js.map +1 -0
- package/dist/utils/remote-file.js +2 -2
- package/dist/utils/remote-file.js.map +1 -1
- package/dist/utils/structured.d.ts +2 -0
- package/dist/utils/structured.d.ts.map +1 -1
- package/dist/utils/structured.js +9 -6
- package/dist/utils/structured.js.map +1 -1
- package/dist/utils/studio-runs.d.ts +87 -0
- package/dist/utils/studio-runs.d.ts.map +1 -0
- package/dist/utils/studio-runs.js +167 -0
- package/dist/utils/studio-runs.js.map +1 -0
- package/dist/utils/user-agent.d.ts +1140 -0
- package/dist/utils/user-agent.d.ts.map +1 -0
- package/dist/utils/user-agent.js +802 -0
- package/dist/utils/user-agent.js.map +1 -0
- package/dist/utils/workflow-agent.d.ts +151 -0
- package/dist/utils/workflow-agent.d.ts.map +1 -0
- package/dist/utils/workflow-agent.js +292 -0
- package/dist/utils/workflow-agent.js.map +1 -0
- package/dist/utils/workflow-artifacts.d.ts +160 -0
- package/dist/utils/workflow-artifacts.d.ts.map +1 -0
- package/dist/utils/workflow-artifacts.js +801 -0
- package/dist/utils/workflow-artifacts.js.map +1 -0
- package/dist/utils/workflow-save.d.ts +123 -0
- package/dist/utils/workflow-save.d.ts.map +1 -0
- package/dist/utils/workflow-save.js +734 -0
- package/dist/utils/workflow-save.js.map +1 -0
- package/dist/utils/workflow.d.ts +559 -0
- package/dist/utils/workflow.d.ts.map +1 -0
- package/dist/utils/workflow.js +613 -0
- package/dist/utils/workflow.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { errorResult } from '../utils/api.js';
|
|
3
|
+
import { extractReply } from '../utils/agent-message.js';
|
|
4
|
+
import { readAgentMessage, resolveAgentTarget } from '../utils/agent-targets.js';
|
|
5
|
+
import { parseAgentChatArtifacts } from '../utils/workflow-artifacts.js';
|
|
6
|
+
import { formatWorkflowInputs, parseWorkflowSlug, workflowUrl } from '../utils/workflow.js';
|
|
7
|
+
import { createWorkflow, findHiddenValues, prepareIssuesText, tagProblem, updateWorkflow, WorkflowConflictError, WorkflowPrepareError, } from '../utils/workflow-save.js';
|
|
8
|
+
import { formatUpdatedWorkflow, updatedWorkflowSchema } from './update-workflow.js';
|
|
9
|
+
// Remembers which proposal was already saved as a new workflow, so a repeated
|
|
10
|
+
// call (a retry, or the model asking twice) does not create a copy such as
|
|
11
|
+
// "Title-1". A create in progress is shared with any concurrent call for the
|
|
12
|
+
// same proposal. This is best effort: the memory is this process's, for an
|
|
13
|
+
// hour, so a server with several processes or a restart can still save a
|
|
14
|
+
// second copy.
|
|
15
|
+
const CREATED = new Map();
|
|
16
|
+
const CREATED_TTL_MS = 60 * 60 * 1000;
|
|
17
|
+
const CREATED_MAX = 500;
|
|
18
|
+
function trimCreated() {
|
|
19
|
+
while (CREATED.size > CREATED_MAX) {
|
|
20
|
+
const oldest = CREATED.keys().next().value;
|
|
21
|
+
if (oldest === undefined)
|
|
22
|
+
break;
|
|
23
|
+
CREATED.delete(oldest);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function pickArtifact(text, artifactHash) {
|
|
27
|
+
const parsed = parseAgentChatArtifacts(text);
|
|
28
|
+
const segments = parsed.artifacts;
|
|
29
|
+
const describe = (segment) => segment.issues.slice(0, 4).map(issue => issue.message).join('; ');
|
|
30
|
+
if (artifactHash) {
|
|
31
|
+
const segment = segments.find(candidate => candidate.artifactHash === artifactHash);
|
|
32
|
+
if (!segment)
|
|
33
|
+
throw new Error('That reply has no workflow with this artifact_hash. Read the reply again with get_agent_message.');
|
|
34
|
+
if (segment.status !== 'valid' || segment.issues.length > 0 || !segment.artifact) {
|
|
35
|
+
throw new Error(`The Workflow Agent's proposal is not valid (${describe(segment)}). Send the problems back to the Workflow Agent in the same session and ask it to fix them.`);
|
|
36
|
+
}
|
|
37
|
+
return { artifact: segment.artifact, hash: artifactHash };
|
|
38
|
+
}
|
|
39
|
+
// Only a segment the parser marked valid with no issues counts; an oversize
|
|
40
|
+
// reply keeps its artifact object while being marked unusable.
|
|
41
|
+
const valid = segments.filter(segment => segment.status === 'valid' && segment.issues.length === 0 && segment.artifact && segment.artifactHash);
|
|
42
|
+
if (valid.length === 1)
|
|
43
|
+
return { artifact: valid[0].artifact, hash: valid[0].artifactHash };
|
|
44
|
+
if (valid.length > 1) {
|
|
45
|
+
throw new Error(`That reply proposes ${valid.length} workflows. Pass artifact_hash to choose one: `
|
|
46
|
+
+ valid.map(segment => `${segment.artifactHash} ("${segment.artifact.title}")`).join(', '));
|
|
47
|
+
}
|
|
48
|
+
const invalid = segments.find(segment => segment.status !== 'valid' || segment.issues.length > 0);
|
|
49
|
+
if (invalid) {
|
|
50
|
+
throw new Error(`The Workflow Agent's proposal is not valid (${describe(invalid) || invalid.status}). Send the problems back to the Workflow Agent in the same session and ask it to fix them.`);
|
|
51
|
+
}
|
|
52
|
+
throw new Error('That reply does not contain a workflow proposal.');
|
|
53
|
+
}
|
|
54
|
+
/** Saves the proposal as a new workflow once, sharing an in-flight create. */
|
|
55
|
+
async function createOnce(client, key, create, signal) {
|
|
56
|
+
const entry = CREATED.get(key);
|
|
57
|
+
if (entry && Date.now() - entry.at <= CREATED_TTL_MS) {
|
|
58
|
+
if (entry.pending)
|
|
59
|
+
return { saved: await entry.pending };
|
|
60
|
+
if (entry.fullSlug) {
|
|
61
|
+
const detail = await client.post('/Workflow/Detail', { slug: entry.fullSlug }, signal);
|
|
62
|
+
if (detail.result === true && Array.isArray(detail.workflow) && detail.workflow.length > 0) {
|
|
63
|
+
return { previous: entry.fullSlug };
|
|
64
|
+
}
|
|
65
|
+
if (detail.notFound !== true) {
|
|
66
|
+
throw new Error(`Could not check whether this proposal was already saved as ${entry.fullSlug}. Look for it with list_workflows before saving again.`);
|
|
67
|
+
}
|
|
68
|
+
// The earlier copy was deleted, so saving again is what the user wants.
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const pending = create();
|
|
72
|
+
CREATED.set(key, { pending, at: Date.now() });
|
|
73
|
+
trimCreated();
|
|
74
|
+
try {
|
|
75
|
+
const saved = await pending;
|
|
76
|
+
CREATED.set(key, { fullSlug: saved.fullSlug, at: Date.now() });
|
|
77
|
+
return { saved };
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
CREATED.delete(key);
|
|
81
|
+
throw error;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
export function registerSaveWorkflowFromAgent(server, client) {
|
|
85
|
+
server.registerTool('save_workflow_from_agent', {
|
|
86
|
+
title: 'Save a workflow from the Workflow Agent',
|
|
87
|
+
description: 'Save the workflow the Workflow Agent proposed in one of its replies. Without '
|
|
88
|
+
+ '`workflow` it is saved as a new private workflow. With `workflow` (the workflow that was '
|
|
89
|
+
+ 'attached when the agent was asked to edit it) the proposal replaces that workflow\'s '
|
|
90
|
+
+ 'steps, title and description; its saved input values and hidden secret inputs are kept. Applying needs the '
|
|
91
|
+
+ 'attached workflow\'s `loaded_updatetime`, and without `confirm: true` it only returns '
|
|
92
|
+
+ 'what would change: show that to the user and repeat the call with `confirm: true` after '
|
|
93
|
+
+ 'they agree. The reply is read again from Wiro, so pass its ids, not the JSON. Wiro '
|
|
94
|
+
+ 'checks and prepares the graph against the live model catalog first; if it finds '
|
|
95
|
+
+ 'problems, send them back to the Workflow Agent in the same session. Save each proposal '
|
|
96
|
+
+ 'once: a repeated save is caught only while this server remembers the first one, so it '
|
|
97
|
+
+ 'can still create a second copy. Saving is free; running the workflow is charged.',
|
|
98
|
+
inputSchema: {
|
|
99
|
+
message_id: z.string().min(1).describe('The message id from send_agent_message or get_agent_message. One id covers the message and its reply.'),
|
|
100
|
+
session: z.string().min(1).describe('The session that reply belongs to.'),
|
|
101
|
+
artifact_hash: z.string().optional()
|
|
102
|
+
.describe('Which proposal to save when the reply has more than one (from send_agent_message or get_agent_message).'),
|
|
103
|
+
workflow: z.string().optional()
|
|
104
|
+
.describe('Full slug or URL of the workflow to apply the proposal to. Leave it out to save a new workflow.'),
|
|
105
|
+
loaded_updatetime: z.string().optional()
|
|
106
|
+
.describe('Required with `workflow`: the attached workflow\'s `updatetime` from send_agent_message or get_agent_message. Stops the save if someone changed the workflow since.'),
|
|
107
|
+
tags: z.array(z.string()).max(20).optional().describe('Tags for the workflow.'),
|
|
108
|
+
confirm: z.boolean().default(false)
|
|
109
|
+
.describe('Required to apply a proposal to an existing workflow, after the user approved the change summary.'),
|
|
110
|
+
force: z.boolean().default(false)
|
|
111
|
+
.describe('When applying: overwrite a newer version. Only when the user explicitly wants that.'),
|
|
112
|
+
acknowledge_review_reset: z.boolean().default(false)
|
|
113
|
+
.describe('Required to change a published workflow, after the user agreed it leaves the gallery until reviewed.'),
|
|
114
|
+
},
|
|
115
|
+
outputSchema: {
|
|
116
|
+
...updatedWorkflowSchema,
|
|
117
|
+
reviewReset: z.boolean().optional(),
|
|
118
|
+
contentsChanged: z.boolean().optional(),
|
|
119
|
+
unchanged: z.boolean().optional(),
|
|
120
|
+
mode: z.enum(['create', 'apply']),
|
|
121
|
+
alreadySaved: z.boolean(),
|
|
122
|
+
},
|
|
123
|
+
annotations: {
|
|
124
|
+
readOnlyHint: false,
|
|
125
|
+
destructiveHint: true,
|
|
126
|
+
idempotentHint: false,
|
|
127
|
+
openWorldHint: true,
|
|
128
|
+
},
|
|
129
|
+
}, async (args, extra) => {
|
|
130
|
+
try {
|
|
131
|
+
const problem = args.tags ? tagProblem(args.tags) : null;
|
|
132
|
+
if (problem)
|
|
133
|
+
throw new Error(problem);
|
|
134
|
+
if (args.workflow && !args.loaded_updatetime) {
|
|
135
|
+
throw new Error('Applying a proposal needs loaded_updatetime: the attached workflow\'s updatetime from the '
|
|
136
|
+
+ 'send_agent_message or get_agent_message result. If you do not have it, ask the user whether to apply the '
|
|
137
|
+
+ 'proposal onto the current version, then read it with get_workflow and pass that updatetime.');
|
|
138
|
+
}
|
|
139
|
+
const target = resolveAgentTarget('workflow-agent');
|
|
140
|
+
const row = await readAgentMessage(client, target, args.message_id, args.session, extra.signal);
|
|
141
|
+
if (row.status !== 'agent_end') {
|
|
142
|
+
throw new Error(`That reply is not finished (status ${String(row.status)}). Wait for it with get_agent_message first.`);
|
|
143
|
+
}
|
|
144
|
+
const { artifact, hash } = pickArtifact(extractReply(row), args.artifact_hash);
|
|
145
|
+
const contents = JSON.parse(JSON.stringify(artifact.contents));
|
|
146
|
+
if (args.workflow) {
|
|
147
|
+
const fullSlug = parseWorkflowSlug(args.workflow);
|
|
148
|
+
const saved = await updateWorkflow(client, {
|
|
149
|
+
fullSlug,
|
|
150
|
+
title: artifact.title,
|
|
151
|
+
...(artifact.description ? { description: artifact.description } : {}),
|
|
152
|
+
tags: args.tags,
|
|
153
|
+
contents,
|
|
154
|
+
loadedUpdatetime: args.loaded_updatetime,
|
|
155
|
+
force: args.force,
|
|
156
|
+
acknowledgeReviewReset: args.acknowledge_review_reset,
|
|
157
|
+
preview: !args.confirm,
|
|
158
|
+
}, extra.signal);
|
|
159
|
+
if (saved.preview) {
|
|
160
|
+
return {
|
|
161
|
+
content: [{ type: 'text', text: formatUpdatedWorkflow(saved, '## Review the change before saving') }],
|
|
162
|
+
structuredContent: {
|
|
163
|
+
...saved,
|
|
164
|
+
mode: 'apply',
|
|
165
|
+
alreadySaved: false,
|
|
166
|
+
nextAction: {
|
|
167
|
+
tool: 'save_workflow_from_agent',
|
|
168
|
+
arguments: {
|
|
169
|
+
message_id: args.message_id,
|
|
170
|
+
session: args.session,
|
|
171
|
+
artifact_hash: hash,
|
|
172
|
+
workflow: fullSlug,
|
|
173
|
+
loaded_updatetime: args.loaded_updatetime,
|
|
174
|
+
...(args.tags ? { tags: args.tags } : {}),
|
|
175
|
+
confirm: true,
|
|
176
|
+
...(args.force ? { force: true } : {}),
|
|
177
|
+
...(saved.reviewReset ? { acknowledge_review_reset: true } : {}),
|
|
178
|
+
},
|
|
179
|
+
reason: 'Show the user what will change and save only after they agree.',
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
const heading = saved.unchanged ? '## Already applied' : '## Workflow updated';
|
|
185
|
+
return {
|
|
186
|
+
content: [{ type: 'text', text: formatUpdatedWorkflow(saved, heading) }],
|
|
187
|
+
structuredContent: {
|
|
188
|
+
...saved,
|
|
189
|
+
mode: 'apply',
|
|
190
|
+
alreadySaved: saved.unchanged,
|
|
191
|
+
nextAction: {
|
|
192
|
+
tool: 'run_workflow',
|
|
193
|
+
arguments: { slug: saved.fullSlug },
|
|
194
|
+
reason: runReason(saved),
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
const hidden = findHiddenValues(contents);
|
|
200
|
+
if (hidden.length > 0) {
|
|
201
|
+
throw new Error(`This proposal still has hidden values copied from the workflow the agent was shown (${hidden.join(', ')}). `
|
|
202
|
+
+ 'Apply it to that workflow with `workflow` so the real values are kept, or ask the agent to leave those inputs empty and set them yourself.');
|
|
203
|
+
}
|
|
204
|
+
const key = `${String(client.identity)}:${args.message_id}:${hash}`;
|
|
205
|
+
const outcome = await createOnce(client, key, () => createWorkflow(client, {
|
|
206
|
+
title: artifact.title,
|
|
207
|
+
description: artifact.description,
|
|
208
|
+
contents,
|
|
209
|
+
tags: args.tags,
|
|
210
|
+
}, extra.signal), extra.signal);
|
|
211
|
+
if (outcome.previous) {
|
|
212
|
+
return {
|
|
213
|
+
content: [{ type: 'text', text: `## Already saved\n\nThis proposal was already saved as \`${outcome.previous}\`. Nothing new was created.` }],
|
|
214
|
+
structuredContent: {
|
|
215
|
+
mode: 'create',
|
|
216
|
+
alreadySaved: true,
|
|
217
|
+
fullSlug: outcome.previous,
|
|
218
|
+
url: workflowUrl(outcome.previous),
|
|
219
|
+
title: artifact.title,
|
|
220
|
+
renamed: false,
|
|
221
|
+
inputs: [],
|
|
222
|
+
outputs: {},
|
|
223
|
+
warnings: [],
|
|
224
|
+
nextAction: {
|
|
225
|
+
tool: 'get_workflow',
|
|
226
|
+
arguments: { slug: outcome.previous },
|
|
227
|
+
reason: 'Read the saved workflow.',
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
const saved = outcome.saved;
|
|
233
|
+
const lines = ['## Workflow saved', ''];
|
|
234
|
+
lines.push(`**Title:** ${saved.title}${saved.renamed ? ' (renamed because the title was already used)' : ''}`);
|
|
235
|
+
lines.push(`**Slug:** \`${saved.fullSlug}\``);
|
|
236
|
+
lines.push(`**Page:** ${saved.url}`);
|
|
237
|
+
lines.push('', '### Inputs', '', ...formatWorkflowInputs(saved.inputs));
|
|
238
|
+
if (saved.warnings.length > 0) {
|
|
239
|
+
lines.push('', '### Notes', '', ...saved.warnings.map(warning => `- ${warning.nodeId ? `\`${warning.nodeId}\`: ` : ''}${warning.message}`));
|
|
240
|
+
}
|
|
241
|
+
return {
|
|
242
|
+
content: [{ type: 'text', text: lines.join('\n') }],
|
|
243
|
+
structuredContent: {
|
|
244
|
+
...saved,
|
|
245
|
+
mode: 'create',
|
|
246
|
+
alreadySaved: false,
|
|
247
|
+
nextAction: {
|
|
248
|
+
tool: 'run_workflow',
|
|
249
|
+
arguments: { slug: saved.fullSlug },
|
|
250
|
+
reason: runReason(saved),
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
catch (error) {
|
|
256
|
+
if (error instanceof WorkflowPrepareError) {
|
|
257
|
+
return {
|
|
258
|
+
content: [{
|
|
259
|
+
type: 'text',
|
|
260
|
+
text: `${prepareIssuesText(error)}\n\nYou can send these problems to the Workflow Agent in the same session (send_agent_message with agent "workflow-agent" and session "${args.session}") and ask it to fix them.`,
|
|
261
|
+
}],
|
|
262
|
+
isError: true,
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
if (error instanceof WorkflowConflictError) {
|
|
266
|
+
return {
|
|
267
|
+
content: [{
|
|
268
|
+
type: 'text',
|
|
269
|
+
text: `## Not saved: newer changes exist\n\n${error.message} You can also attach the current version to a new message for the Workflow Agent so it edits the latest steps.`,
|
|
270
|
+
}],
|
|
271
|
+
isError: true,
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
return errorResult(error);
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
function runReason(saved) {
|
|
279
|
+
const keys = saved.inputs.map(input => input.key);
|
|
280
|
+
return 'Run it only if the user asked for a run, after telling them the estimate; otherwise ask the user first (each model step is charged). Call run_workflow with input values'
|
|
281
|
+
+ (keys.length > 0 ? ` for: ${keys.join(', ')}. A key you leave out uses its saved value or default.` : '.');
|
|
282
|
+
}
|
|
283
|
+
//# sourceMappingURL=save-workflow-from-agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"save-workflow-from-agent.js","sourceRoot":"","sources":["../../src/tools/save-workflow-from-agent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAoB,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAyB,MAAM,gCAAgC,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,qBAAqB,EACrB,oBAAoB,GAErB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAEpF,8EAA8E;AAC9E,2EAA2E;AAC3E,6EAA6E;AAC7E,2EAA2E;AAC3E,yEAAyE;AACzE,eAAe;AACf,MAAM,OAAO,GAAG,IAAI,GAAG,EAA+E,CAAC;AACvG,MAAM,cAAc,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACtC,MAAM,WAAW,GAAG,GAAG,CAAC;AAExB,SAAS,WAAW;IAClB,OAAO,OAAO,CAAC,IAAI,GAAG,WAAW,EAAE,CAAC;QAClC,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC;QAC3C,IAAI,MAAM,KAAK,SAAS;YAAE,MAAM;QAChC,OAAO,CAAC,MAAM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KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,oBAAoB,EAAE,CAAC;gBAC1C,OAAO;oBACL,OAAO,EAAE,CAAC;4BACR,IAAI,EAAE,MAAe;4BACrB,IAAI,EAAE,GAAG,iBAAiB,CAAC,KAAK,CAAC,0IAA0I,IAAI,CAAC,OAAO,4BAA4B;yBACpN,CAAC;oBACF,OAAO,EAAE,IAAI;iBACd,CAAC;YACJ,CAAC;YACD,IAAI,KAAK,YAAY,qBAAqB,EAAE,CAAC;gBAC3C,OAAO;oBACL,OAAO,EAAE,CAAC;4BACR,IAAI,EAAE,MAAe;4BACrB,IAAI,EAAE,wCAAwC,KAAK,CAAC,OAAO,gHAAgH;yBAC5K,CAAC;oBACF,OAAO,EAAE,IAAI;iBACd,CAAC;YACJ,CAAC;YACD,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,KAAoB;IACrC,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClD,OAAO,0KAA0K;UAC7K,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AACjH,CAAC"}
|
package/dist/tools/schemas.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export declare const taskReferenceSchema: z.ZodObject<{
|
|
|
21
21
|
exitCode: z.ZodOptional<z.ZodString>;
|
|
22
22
|
durationSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
23
23
|
costUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
24
|
+
chargedUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
24
25
|
}, "strip", z.ZodTypeAny, {
|
|
25
26
|
model?: string | undefined;
|
|
26
27
|
id?: string | undefined;
|
|
@@ -29,6 +30,7 @@ export declare const taskReferenceSchema: z.ZodObject<{
|
|
|
29
30
|
exitCode?: string | undefined;
|
|
30
31
|
durationSeconds?: number | null | undefined;
|
|
31
32
|
costUsd?: number | null | undefined;
|
|
33
|
+
chargedUsd?: number | null | undefined;
|
|
32
34
|
}, {
|
|
33
35
|
model?: string | undefined;
|
|
34
36
|
id?: string | undefined;
|
|
@@ -37,6 +39,7 @@ export declare const taskReferenceSchema: z.ZodObject<{
|
|
|
37
39
|
exitCode?: string | undefined;
|
|
38
40
|
durationSeconds?: number | null | undefined;
|
|
39
41
|
costUsd?: number | null | undefined;
|
|
42
|
+
chargedUsd?: number | null | undefined;
|
|
40
43
|
}>;
|
|
41
44
|
export declare const taskFinishReasonSchema: z.ZodEnum<["stop", "tool_calls", "length", "content_filter", "error"]>;
|
|
42
45
|
export declare const taskToolCallStatusSchema: z.ZodEnum<["in_progress", "completed", "incomplete"]>;
|
|
@@ -587,6 +590,7 @@ export declare const taskResultOutputSchema: {
|
|
|
587
590
|
exitCode: z.ZodOptional<z.ZodString>;
|
|
588
591
|
durationSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
589
592
|
costUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
593
|
+
chargedUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
590
594
|
}, "strip", z.ZodTypeAny, {
|
|
591
595
|
model?: string | undefined;
|
|
592
596
|
id?: string | undefined;
|
|
@@ -595,6 +599,7 @@ export declare const taskResultOutputSchema: {
|
|
|
595
599
|
exitCode?: string | undefined;
|
|
596
600
|
durationSeconds?: number | null | undefined;
|
|
597
601
|
costUsd?: number | null | undefined;
|
|
602
|
+
chargedUsd?: number | null | undefined;
|
|
598
603
|
}, {
|
|
599
604
|
model?: string | undefined;
|
|
600
605
|
id?: string | undefined;
|
|
@@ -603,6 +608,7 @@ export declare const taskResultOutputSchema: {
|
|
|
603
608
|
exitCode?: string | undefined;
|
|
604
609
|
durationSeconds?: number | null | undefined;
|
|
605
610
|
costUsd?: number | null | undefined;
|
|
611
|
+
chargedUsd?: number | null | undefined;
|
|
606
612
|
}>;
|
|
607
613
|
outputs: z.ZodArray<z.ZodObject<{
|
|
608
614
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -964,6 +970,7 @@ export declare const taskListOutputSchema: {
|
|
|
964
970
|
exitCode: z.ZodOptional<z.ZodString>;
|
|
965
971
|
durationSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
966
972
|
costUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
973
|
+
chargedUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
967
974
|
}, "strip", z.ZodTypeAny, {
|
|
968
975
|
model?: string | undefined;
|
|
969
976
|
id?: string | undefined;
|
|
@@ -972,6 +979,7 @@ export declare const taskListOutputSchema: {
|
|
|
972
979
|
exitCode?: string | undefined;
|
|
973
980
|
durationSeconds?: number | null | undefined;
|
|
974
981
|
costUsd?: number | null | undefined;
|
|
982
|
+
chargedUsd?: number | null | undefined;
|
|
975
983
|
}, {
|
|
976
984
|
model?: string | undefined;
|
|
977
985
|
id?: string | undefined;
|
|
@@ -980,6 +988,7 @@ export declare const taskListOutputSchema: {
|
|
|
980
988
|
exitCode?: string | undefined;
|
|
981
989
|
durationSeconds?: number | null | undefined;
|
|
982
990
|
costUsd?: number | null | undefined;
|
|
991
|
+
chargedUsd?: number | null | undefined;
|
|
983
992
|
}>;
|
|
984
993
|
outputs: z.ZodArray<z.ZodObject<Omit<{
|
|
985
994
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1284,6 +1293,7 @@ export declare const taskListOutputSchema: {
|
|
|
1284
1293
|
exitCode?: string | undefined;
|
|
1285
1294
|
durationSeconds?: number | null | undefined;
|
|
1286
1295
|
costUsd?: number | null | undefined;
|
|
1296
|
+
chargedUsd?: number | null | undefined;
|
|
1287
1297
|
};
|
|
1288
1298
|
outputs: {
|
|
1289
1299
|
mimeType: string;
|
|
@@ -1336,6 +1346,7 @@ export declare const taskListOutputSchema: {
|
|
|
1336
1346
|
exitCode?: string | undefined;
|
|
1337
1347
|
durationSeconds?: number | null | undefined;
|
|
1338
1348
|
costUsd?: number | null | undefined;
|
|
1349
|
+
chargedUsd?: number | null | undefined;
|
|
1339
1350
|
};
|
|
1340
1351
|
outputs: {
|
|
1341
1352
|
mimeType: string;
|
|
@@ -1466,6 +1477,7 @@ export declare const modelParameterSchema: z.ZodObject<{
|
|
|
1466
1477
|
label: z.ZodString;
|
|
1467
1478
|
description: z.ZodOptional<z.ZodString>;
|
|
1468
1479
|
default: z.ZodOptional<z.ZodString>;
|
|
1480
|
+
sample: z.ZodOptional<z.ZodString>;
|
|
1469
1481
|
required: z.ZodBoolean;
|
|
1470
1482
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
1471
1483
|
note: z.ZodOptional<z.ZodString>;
|
|
@@ -1473,11 +1485,11 @@ export declare const modelParameterSchema: z.ZodObject<{
|
|
|
1473
1485
|
label: z.ZodString;
|
|
1474
1486
|
value: z.ZodString;
|
|
1475
1487
|
}, "strip", z.ZodTypeAny, {
|
|
1476
|
-
label: string;
|
|
1477
1488
|
value: string;
|
|
1478
|
-
}, {
|
|
1479
1489
|
label: string;
|
|
1490
|
+
}, {
|
|
1480
1491
|
value: string;
|
|
1492
|
+
label: string;
|
|
1481
1493
|
}>, "many">;
|
|
1482
1494
|
min: z.ZodOptional<z.ZodNumber>;
|
|
1483
1495
|
max: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1490,11 +1502,12 @@ export declare const modelParameterSchema: z.ZodObject<{
|
|
|
1490
1502
|
label: string;
|
|
1491
1503
|
required: boolean;
|
|
1492
1504
|
options: {
|
|
1493
|
-
label: string;
|
|
1494
1505
|
value: string;
|
|
1506
|
+
label: string;
|
|
1495
1507
|
}[];
|
|
1496
1508
|
advanced: boolean;
|
|
1497
1509
|
default?: string | undefined;
|
|
1510
|
+
sample?: string | undefined;
|
|
1498
1511
|
description?: string | undefined;
|
|
1499
1512
|
placeholder?: string | undefined;
|
|
1500
1513
|
note?: string | undefined;
|
|
@@ -1508,11 +1521,12 @@ export declare const modelParameterSchema: z.ZodObject<{
|
|
|
1508
1521
|
label: string;
|
|
1509
1522
|
required: boolean;
|
|
1510
1523
|
options: {
|
|
1511
|
-
label: string;
|
|
1512
1524
|
value: string;
|
|
1525
|
+
label: string;
|
|
1513
1526
|
}[];
|
|
1514
1527
|
advanced: boolean;
|
|
1515
1528
|
default?: string | undefined;
|
|
1529
|
+
sample?: string | undefined;
|
|
1516
1530
|
description?: string | undefined;
|
|
1517
1531
|
placeholder?: string | undefined;
|
|
1518
1532
|
note?: string | undefined;
|
|
@@ -1538,6 +1552,7 @@ export declare const modelDetailOutputSchema: {
|
|
|
1538
1552
|
label: z.ZodString;
|
|
1539
1553
|
description: z.ZodOptional<z.ZodString>;
|
|
1540
1554
|
default: z.ZodOptional<z.ZodString>;
|
|
1555
|
+
sample: z.ZodOptional<z.ZodString>;
|
|
1541
1556
|
required: z.ZodBoolean;
|
|
1542
1557
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
1543
1558
|
note: z.ZodOptional<z.ZodString>;
|
|
@@ -1545,11 +1560,11 @@ export declare const modelDetailOutputSchema: {
|
|
|
1545
1560
|
label: z.ZodString;
|
|
1546
1561
|
value: z.ZodString;
|
|
1547
1562
|
}, "strip", z.ZodTypeAny, {
|
|
1548
|
-
label: string;
|
|
1549
1563
|
value: string;
|
|
1550
|
-
}, {
|
|
1551
1564
|
label: string;
|
|
1565
|
+
}, {
|
|
1552
1566
|
value: string;
|
|
1567
|
+
label: string;
|
|
1553
1568
|
}>, "many">;
|
|
1554
1569
|
min: z.ZodOptional<z.ZodNumber>;
|
|
1555
1570
|
max: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1562,11 +1577,12 @@ export declare const modelDetailOutputSchema: {
|
|
|
1562
1577
|
label: string;
|
|
1563
1578
|
required: boolean;
|
|
1564
1579
|
options: {
|
|
1565
|
-
label: string;
|
|
1566
1580
|
value: string;
|
|
1581
|
+
label: string;
|
|
1567
1582
|
}[];
|
|
1568
1583
|
advanced: boolean;
|
|
1569
1584
|
default?: string | undefined;
|
|
1585
|
+
sample?: string | undefined;
|
|
1570
1586
|
description?: string | undefined;
|
|
1571
1587
|
placeholder?: string | undefined;
|
|
1572
1588
|
note?: string | undefined;
|
|
@@ -1580,11 +1596,12 @@ export declare const modelDetailOutputSchema: {
|
|
|
1580
1596
|
label: string;
|
|
1581
1597
|
required: boolean;
|
|
1582
1598
|
options: {
|
|
1583
|
-
label: string;
|
|
1584
1599
|
value: string;
|
|
1600
|
+
label: string;
|
|
1585
1601
|
}[];
|
|
1586
1602
|
advanced: boolean;
|
|
1587
1603
|
default?: string | undefined;
|
|
1604
|
+
sample?: string | undefined;
|
|
1588
1605
|
description?: string | undefined;
|
|
1589
1606
|
placeholder?: string | undefined;
|
|
1590
1607
|
note?: string | undefined;
|
|
@@ -1601,11 +1618,12 @@ export declare const modelDetailOutputSchema: {
|
|
|
1601
1618
|
label: string;
|
|
1602
1619
|
required: boolean;
|
|
1603
1620
|
options: {
|
|
1604
|
-
label: string;
|
|
1605
1621
|
value: string;
|
|
1622
|
+
label: string;
|
|
1606
1623
|
}[];
|
|
1607
1624
|
advanced: boolean;
|
|
1608
1625
|
default?: string | undefined;
|
|
1626
|
+
sample?: string | undefined;
|
|
1609
1627
|
description?: string | undefined;
|
|
1610
1628
|
placeholder?: string | undefined;
|
|
1611
1629
|
note?: string | undefined;
|
|
@@ -1622,11 +1640,12 @@ export declare const modelDetailOutputSchema: {
|
|
|
1622
1640
|
label: string;
|
|
1623
1641
|
required: boolean;
|
|
1624
1642
|
options: {
|
|
1625
|
-
label: string;
|
|
1626
1643
|
value: string;
|
|
1644
|
+
label: string;
|
|
1627
1645
|
}[];
|
|
1628
1646
|
advanced: boolean;
|
|
1629
1647
|
default?: string | undefined;
|
|
1648
|
+
sample?: string | undefined;
|
|
1630
1649
|
description?: string | undefined;
|
|
1631
1650
|
placeholder?: string | undefined;
|
|
1632
1651
|
note?: string | undefined;
|
|
@@ -1636,6 +1655,20 @@ export declare const modelDetailOutputSchema: {
|
|
|
1636
1655
|
jsonSchema?: Record<string, unknown> | undefined;
|
|
1637
1656
|
}[];
|
|
1638
1657
|
}>, "many">;
|
|
1658
|
+
outputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1659
|
+
id: z.ZodString;
|
|
1660
|
+
label: z.ZodString;
|
|
1661
|
+
type: z.ZodString;
|
|
1662
|
+
}, "strip", z.ZodTypeAny, {
|
|
1663
|
+
type: string;
|
|
1664
|
+
id: string;
|
|
1665
|
+
label: string;
|
|
1666
|
+
}, {
|
|
1667
|
+
type: string;
|
|
1668
|
+
id: string;
|
|
1669
|
+
label: string;
|
|
1670
|
+
}>, "many">>;
|
|
1671
|
+
dynamicOutputs: z.ZodOptional<z.ZodBoolean>;
|
|
1639
1672
|
}, "strip", z.ZodTypeAny, {
|
|
1640
1673
|
categories: string[];
|
|
1641
1674
|
slug: string;
|
|
@@ -1648,11 +1681,12 @@ export declare const modelDetailOutputSchema: {
|
|
|
1648
1681
|
label: string;
|
|
1649
1682
|
required: boolean;
|
|
1650
1683
|
options: {
|
|
1651
|
-
label: string;
|
|
1652
1684
|
value: string;
|
|
1685
|
+
label: string;
|
|
1653
1686
|
}[];
|
|
1654
1687
|
advanced: boolean;
|
|
1655
1688
|
default?: string | undefined;
|
|
1689
|
+
sample?: string | undefined;
|
|
1656
1690
|
description?: string | undefined;
|
|
1657
1691
|
placeholder?: string | undefined;
|
|
1658
1692
|
note?: string | undefined;
|
|
@@ -1662,9 +1696,15 @@ export declare const modelDetailOutputSchema: {
|
|
|
1662
1696
|
jsonSchema?: Record<string, unknown> | undefined;
|
|
1663
1697
|
}[];
|
|
1664
1698
|
}[];
|
|
1699
|
+
outputs?: {
|
|
1700
|
+
type: string;
|
|
1701
|
+
id: string;
|
|
1702
|
+
label: string;
|
|
1703
|
+
}[] | undefined;
|
|
1665
1704
|
description?: string | undefined;
|
|
1666
1705
|
pricing?: string | undefined;
|
|
1667
1706
|
estimatedCostUsd?: number | null | undefined;
|
|
1707
|
+
dynamicOutputs?: boolean | undefined;
|
|
1668
1708
|
}, {
|
|
1669
1709
|
categories: string[];
|
|
1670
1710
|
slug: string;
|
|
@@ -1677,11 +1717,12 @@ export declare const modelDetailOutputSchema: {
|
|
|
1677
1717
|
label: string;
|
|
1678
1718
|
required: boolean;
|
|
1679
1719
|
options: {
|
|
1680
|
-
label: string;
|
|
1681
1720
|
value: string;
|
|
1721
|
+
label: string;
|
|
1682
1722
|
}[];
|
|
1683
1723
|
advanced: boolean;
|
|
1684
1724
|
default?: string | undefined;
|
|
1725
|
+
sample?: string | undefined;
|
|
1685
1726
|
description?: string | undefined;
|
|
1686
1727
|
placeholder?: string | undefined;
|
|
1687
1728
|
note?: string | undefined;
|
|
@@ -1691,9 +1732,15 @@ export declare const modelDetailOutputSchema: {
|
|
|
1691
1732
|
jsonSchema?: Record<string, unknown> | undefined;
|
|
1692
1733
|
}[];
|
|
1693
1734
|
}[];
|
|
1735
|
+
outputs?: {
|
|
1736
|
+
type: string;
|
|
1737
|
+
id: string;
|
|
1738
|
+
label: string;
|
|
1739
|
+
}[] | undefined;
|
|
1694
1740
|
description?: string | undefined;
|
|
1695
1741
|
pricing?: string | undefined;
|
|
1696
1742
|
estimatedCostUsd?: number | null | undefined;
|
|
1743
|
+
dynamicOutputs?: boolean | undefined;
|
|
1697
1744
|
}>;
|
|
1698
1745
|
nextAction: z.ZodObject<{
|
|
1699
1746
|
tool: z.ZodString;
|
|
@@ -1782,6 +1829,7 @@ export declare const taskPriceOutputSchema: {
|
|
|
1782
1829
|
exitCode: z.ZodOptional<z.ZodString>;
|
|
1783
1830
|
durationSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1784
1831
|
costUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1832
|
+
chargedUsd: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1785
1833
|
}, "strip", z.ZodTypeAny, {
|
|
1786
1834
|
model?: string | undefined;
|
|
1787
1835
|
id?: string | undefined;
|
|
@@ -1790,6 +1838,7 @@ export declare const taskPriceOutputSchema: {
|
|
|
1790
1838
|
exitCode?: string | undefined;
|
|
1791
1839
|
durationSeconds?: number | null | undefined;
|
|
1792
1840
|
costUsd?: number | null | undefined;
|
|
1841
|
+
chargedUsd?: number | null | undefined;
|
|
1793
1842
|
}, {
|
|
1794
1843
|
model?: string | undefined;
|
|
1795
1844
|
id?: string | undefined;
|
|
@@ -1798,6 +1847,7 @@ export declare const taskPriceOutputSchema: {
|
|
|
1798
1847
|
exitCode?: string | undefined;
|
|
1799
1848
|
durationSeconds?: number | null | undefined;
|
|
1800
1849
|
costUsd?: number | null | undefined;
|
|
1850
|
+
chargedUsd?: number | null | undefined;
|
|
1801
1851
|
}>;
|
|
1802
1852
|
billed: z.ZodNullable<z.ZodBoolean>;
|
|
1803
1853
|
costUsd: z.ZodNullable<z.ZodNumber>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/tools/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,eAAe,yEAM1B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAI3B,CAAC;AAEH,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/tools/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,eAAe,yEAM1B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAI3B,CAAC;AAEH,eAAO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