@evolinkai/cli 0.10.3 → 0.11.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 +27 -3
- package/package.json +1 -1
- package/skills/evolink-cli/SKILL.md +10 -2
- package/skills/evolink-cli/references/usage-and-budget.md +16 -1
- package/src/api.mjs +2 -1
- package/src/cli.mjs +2 -1
- package/src/help.mjs +1 -1
- package/src/media.mjs +18 -3
- package/src/platform/core/src/data/model-constraints.js +27 -0
- package/src/platform/core/src/data/model-params.js +8 -1
- package/src/platform/core/src/data/model-params.overrides.generated.js +4 -0
- package/src/platform/core/src/services/api-client.js +8 -10
- package/src/platform/core/src/services/http-policy.js +2 -1
- package/src/platform/core/src/services/pricing-quote-client.js +16 -2
- package/src/platform/core/src/services/pricing-rules-estimate.js +31 -2
- package/src/platform/core/src/services/public-error.js +1 -1
- package/src/platform/core/src/services/search-usage.js +22 -0
- package/src/platform/core/src/services/seedance-input.js +75 -0
- package/src/platform/core/src/services/task-response.js +176 -0
- package/src/platform/core/src/tool-guidance.js +3 -1
- package/src/platform/core/src/tools/estimate-cost.js +12 -2
- package/src/platform/core/src/tools/generate.js +27 -8
- package/src/platform/core/src/tools/get-model.js +8 -3
- package/src/platform/core/src/tools/get-task.js +3 -2
- package/src/platform/core/src/tools/list-tasks.js +69 -29
- package/src/platform/core/src/tools/shared.js +22 -2
- package/src/platform/core/src/tools/task-format.js +27 -9
- package/src/platform/core/src/version.js +1 -1
- package/src/platform/source.json +44 -36
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { listTasks, queryTasks } from '../services/api-client.js';
|
|
5
5
|
import { publicTaskErrorCode } from '../services/error-handler.js';
|
|
6
|
-
import {
|
|
6
|
+
import { parseBatchTasks } from '../services/task-response.js';
|
|
7
|
+
import { DASHBOARD_CHECK_GUIDANCE, READ_ONLY, dashboardCheck, errorResult, failure, money, ok, usdOf } from './shared.js';
|
|
7
8
|
import { TASK_ID } from './get-task.js';
|
|
8
9
|
import { RESULT_DELIVERY_GUIDANCE, RESULT_DELIVERY_INSTRUCTIONS, RESULT_LINK_HOURS, resultDeliveryMarkdown, resultLinks, resultResources, taskOutputs } from './task-format.js';
|
|
9
10
|
const MAX_IDS = 50;
|
|
@@ -25,7 +26,9 @@ export function parseSince(value, now = Date.now()) {
|
|
|
25
26
|
}
|
|
26
27
|
function rowFromTask(task) {
|
|
27
28
|
const row = { task_id: task.id, status: task.status, model: task.model, type: task.type, progress: task.progress };
|
|
28
|
-
if (task.
|
|
29
|
+
if (task.response_warnings?.length)
|
|
30
|
+
row.response_warnings = task.response_warnings;
|
|
31
|
+
if (task.created !== undefined)
|
|
29
32
|
row.created_at = new Date(task.created * 1000).toISOString();
|
|
30
33
|
const links = resultLinks(task);
|
|
31
34
|
if (links.length > 0)
|
|
@@ -46,7 +49,9 @@ function rowFromTask(task) {
|
|
|
46
49
|
return row;
|
|
47
50
|
}
|
|
48
51
|
function rowLine(row) {
|
|
49
|
-
const parts = [`- ${row.task_id}`, row.status
|
|
52
|
+
const parts = [`- ${row.task_id}`, `${row.status}${!['completed', 'failed'].includes(row.status) && row.progress !== undefined ? ` ${row.progress}%` : ''}`];
|
|
53
|
+
if (row.model)
|
|
54
|
+
parts.push(row.model);
|
|
50
55
|
if (row.created_at)
|
|
51
56
|
parts.push(row.created_at);
|
|
52
57
|
if (row.charged_credits !== undefined)
|
|
@@ -66,6 +71,7 @@ export function registerListTasks(server, config) {
|
|
|
66
71
|
'since and until filter only the selected page by creation time. total is the server count before these time filters; an empty page does not prove a submission was absent.',
|
|
67
72
|
'Use it to recover tasks after a lost connection or a timed-out submit before submitting anything again.',
|
|
68
73
|
'Recent tasks cover the whole EvoLink account, newest first.',
|
|
74
|
+
'partial means some rows or details could not be verified. Retain verified tasks and the base page, disclose incomplete coverage and query the original missing or details_missing IDs. Missing costs are not zero; do not regenerate to repair a read.',
|
|
69
75
|
RESULT_DELIVERY_GUIDANCE,
|
|
70
76
|
].join(' '),
|
|
71
77
|
inputSchema: {
|
|
@@ -92,17 +98,25 @@ export function registerListTasks(server, config) {
|
|
|
92
98
|
if (task_ids && task_ids.length > 0) {
|
|
93
99
|
const unique = [...new Set(task_ids)];
|
|
94
100
|
const tasks = await queryTasks(config, unique);
|
|
95
|
-
const rows = tasks.map(rowFromTask);
|
|
96
|
-
const
|
|
97
|
-
const missing = unique.filter(id => !found.has(id));
|
|
101
|
+
const rows = tasks.tasks.map(rowFromTask);
|
|
102
|
+
const missing = tasks.missing;
|
|
98
103
|
const lines = [`${rows.length} of ${unique.length} tasks found.`, ...rows.map(rowLine)];
|
|
99
104
|
if (missing.length > 0)
|
|
100
|
-
lines.push(`Not
|
|
105
|
+
lines.push(`Not verified or absent from this response: ${missing.join(', ')}. This does not prove the tasks were never submitted. Query these original IDs again; do not generate again.`);
|
|
106
|
+
if (tasks.issues.length)
|
|
107
|
+
lines.push('Some task responses were invalid or conflicting and were omitted. Verified tasks are retained.');
|
|
108
|
+
if (rows.some(row => row.response_warnings))
|
|
109
|
+
lines.push('Some optional fields were omitted; missing values do not mean zero. See response_warnings.');
|
|
110
|
+
const websiteCheck = missing.length > 0 || tasks.issues.length > 0 || rows.some(row => row.response_warnings || ['failed', 'cancelled'].includes(row.status));
|
|
111
|
+
if (websiteCheck)
|
|
112
|
+
lines.push(DASHBOARD_CHECK_GUIDANCE);
|
|
101
113
|
if (rows.some(row => row.results))
|
|
102
114
|
lines.push(`Result links expire after ${RESULT_LINK_HOURS} hours.`);
|
|
103
115
|
if (rows.some(row => row.results))
|
|
104
116
|
lines.push(`Next step: ${RESULT_DELIVERY_INSTRUCTIONS}`);
|
|
105
|
-
return ok(lines.join('\n'), { tasks: rows, missing
|
|
117
|
+
return ok(lines.join('\n'), { tasks: rows, missing, partial: missing.length > 0 || tasks.issues.length > 0, issues: tasks.issues,
|
|
118
|
+
...(websiteCheck ? dashboardCheck() : {}),
|
|
119
|
+
}, rows.flatMap(row => resultResources(row.task_id, row.results ?? [])));
|
|
106
120
|
}
|
|
107
121
|
const now = Date.now();
|
|
108
122
|
let sinceMs;
|
|
@@ -120,40 +134,59 @@ export function registerListTasks(server, config) {
|
|
|
120
134
|
}
|
|
121
135
|
const pageSize = limit ?? 20;
|
|
122
136
|
const page = await listTasks(config, { status, type, model, page: pageNumber, pageSize });
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
137
|
+
// Compact rows have the same identity/state boundary, but do not need detail-only fields.
|
|
138
|
+
const compact = parseBatchTasks({ data: page.data.map(item => item && typeof item === 'object'
|
|
139
|
+
? { ...item, created: item.created_at, usage: { credits_used: item.credits_used } } : item) }, page.data.flatMap(item => item && typeof item.id === 'string' ? [item.id] : []));
|
|
140
|
+
let items = compact.tasks;
|
|
141
|
+
const issues = [...compact.issues];
|
|
142
|
+
if (sinceMs !== undefined || untilMs !== undefined) {
|
|
143
|
+
items = items.filter(item => {
|
|
144
|
+
if (item.created === undefined) {
|
|
145
|
+
issues.push({ task_id: item.id, code: 'task_creation_time_unverified' });
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
return (sinceMs === undefined || item.created * 1000 >= sinceMs) && (untilMs === undefined || item.created * 1000 <= untilMs);
|
|
149
|
+
});
|
|
150
|
+
}
|
|
128
151
|
// The list endpoint omits result links and error codes; read those tasks in one batch to include them.
|
|
129
|
-
const finished = items.filter(item => item.status === 'completed' && item.has_results || item.status === 'failed')
|
|
152
|
+
const finished = items.filter(item => item.status === 'completed' && page.data.some(raw => raw?.id === item.id && raw.has_results === true) || item.status === 'failed')
|
|
130
153
|
.map(item => item.id).slice(0, MAX_IDS);
|
|
131
154
|
const details = new Map();
|
|
155
|
+
let detailsMissing = [];
|
|
132
156
|
if (finished.length > 0) {
|
|
133
|
-
|
|
134
|
-
|
|
157
|
+
try {
|
|
158
|
+
const batch = await queryTasks(config, finished);
|
|
159
|
+
for (const task of batch.tasks)
|
|
160
|
+
details.set(task.id, task);
|
|
161
|
+
detailsMissing = batch.missing;
|
|
162
|
+
issues.push(...batch.issues);
|
|
163
|
+
}
|
|
164
|
+
catch {
|
|
165
|
+
detailsMissing = finished;
|
|
166
|
+
issues.push({ code: 'task_details_unavailable' });
|
|
167
|
+
}
|
|
135
168
|
}
|
|
136
169
|
const rows = items.map(item => {
|
|
137
170
|
const detailed = details.get(item.id);
|
|
138
171
|
if (detailed)
|
|
139
172
|
return rowFromTask(detailed);
|
|
140
|
-
const row =
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
progress: item.progress,
|
|
146
|
-
created_at: new Date(item.created_at * 1000).toISOString(),
|
|
147
|
-
};
|
|
148
|
-
if (typeof item.credits_used === 'number' && item.status === 'completed') {
|
|
149
|
-
row.charged_credits = item.credits_used;
|
|
150
|
-
row.charged_usd = usdOf(item.credits_used);
|
|
151
|
-
}
|
|
173
|
+
const row = rowFromTask(item);
|
|
174
|
+
// Compact pages do not establish a detailed execution error code.
|
|
175
|
+
delete row.error_code;
|
|
176
|
+
if (detailsMissing.includes(item.id))
|
|
177
|
+
row.details_available = false;
|
|
152
178
|
return row;
|
|
153
179
|
});
|
|
154
180
|
const filters = [status && `status ${status}`, type && `type ${type}`, model && `model ${model}`, since && `since ${since}`, until && `until ${until}`].filter(Boolean).join(', ');
|
|
155
181
|
const lines = [`${rows.length} recent task${rows.length === 1 ? '' : 's'} on this account${filters ? ` (${filters})` : ''}, newest first:`];
|
|
156
182
|
lines.push(...(rows.length > 0 ? rows.map(rowLine) : ['(none)']));
|
|
183
|
+
if (issues.length || detailsMissing.length)
|
|
184
|
+
lines.push(`Partial response: verified base rows were retained; some rows or details could not be verified. Missing details: ${detailsMissing.join(', ') || 'none'}. Query the original IDs again; do not infer zero usage or generate again.`);
|
|
185
|
+
if (rows.some(row => row.response_warnings))
|
|
186
|
+
lines.push('Some optional fields were omitted; missing values do not mean zero. See response_warnings.');
|
|
187
|
+
const websiteCheck = issues.length > 0 || detailsMissing.length > 0 || rows.some(row => row.response_warnings || ['failed', 'cancelled'].includes(row.status));
|
|
188
|
+
if (websiteCheck)
|
|
189
|
+
lines.push(DASHBOARD_CHECK_GUIDANCE);
|
|
157
190
|
const nextPage = page.page * page.page_size < page.total ? page.page + 1 : null;
|
|
158
191
|
lines.push(`Page ${page.page}; ${page.total} tasks before page-local time filtering.${nextPage ? ` Continue with page ${nextPage}.` : ''}`);
|
|
159
192
|
if (rows.some(row => row.results))
|
|
@@ -162,10 +195,17 @@ export function registerListTasks(server, config) {
|
|
|
162
195
|
lines.push(`Next step: ${RESULT_DELIVERY_INSTRUCTIONS}`);
|
|
163
196
|
return ok(lines.join('\n'), { tasks: rows, total: page.total, page: page.page, page_size: page.page_size,
|
|
164
197
|
next_page: nextPage, time_filter_scope: 'selected_page', total_scope: 'server_filters_before_time_filter',
|
|
198
|
+
partial: issues.length > 0 || detailsMissing.length > 0, issues, details_missing: detailsMissing,
|
|
199
|
+
...(websiteCheck ? dashboardCheck() : {}),
|
|
165
200
|
}, rows.flatMap(row => resultResources(row.task_id, row.results ?? [])));
|
|
166
201
|
}
|
|
167
202
|
catch (error) {
|
|
168
|
-
|
|
203
|
+
const result = errorResult(error, { phase: 'query' });
|
|
204
|
+
if (task_ids) {
|
|
205
|
+
result.structuredContent = { ...result.structuredContent, requested_task_ids: [...new Set(task_ids)],
|
|
206
|
+
phase: 'query', status_check: 'unverified' };
|
|
207
|
+
}
|
|
208
|
+
return result;
|
|
169
209
|
}
|
|
170
210
|
});
|
|
171
211
|
}
|
|
@@ -5,14 +5,19 @@ import { publicIdentifier, publicErrorDetails, publicText } from '../services/pu
|
|
|
5
5
|
import { processCredentialsAllowed } from '../request-context.js';
|
|
6
6
|
import { ApiHttpError } from '../services/api-client.js';
|
|
7
7
|
import { CREDITS_PER_USD, formatCredits, formatUsd } from '../services/error-handler.js';
|
|
8
|
-
import { API_KEYS_URL, PaidRequestOutcomeUnknownError, RequestTimeoutError, SubmissionNotStartedError } from '../services/http-policy.js';
|
|
8
|
+
import { API_KEYS_URL, DASHBOARD_URL, PaidRequestOutcomeUnknownError, RequestTimeoutError, SubmissionNotStartedError } from '../services/http-policy.js';
|
|
9
9
|
import { trackedLink } from '../services/utm.js';
|
|
10
|
+
import { TaskResponseError } from '../services/task-response.js';
|
|
10
11
|
/** Free lookups: clients can run them without asking. */
|
|
11
12
|
export const READ_ONLY = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
|
|
12
13
|
/** Spends the user's balance and cannot be undone: clients ask before running it. */
|
|
13
14
|
export const PAID = { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false };
|
|
14
15
|
/** Changes stored state without spending money (uploads). */
|
|
15
16
|
export const WRITES = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false };
|
|
17
|
+
export const DASHBOARD_CHECK_GUIDANCE = `Check your task and account records in the EvoLink Dashboard: ${DASHBOARD_URL}. Sign in with the same EvoLink account and keep the original task ID. This link does not confirm completion, charges or refunds.`;
|
|
18
|
+
export function dashboardCheck() {
|
|
19
|
+
return { dashboard_url: DASHBOARD_URL, dashboard_guidance: DASHBOARD_CHECK_GUIDANCE };
|
|
20
|
+
}
|
|
16
21
|
/** The media_seconds argument of estimate_cost and the generate tools. */
|
|
17
22
|
export const MEDIA_SECONDS_MAX = 3_600;
|
|
18
23
|
export const MEDIA_SECONDS_DESCRIPTION = 'Only for models billed per second that have no duration parameter (get_model explains which length is billed): usually the input video or audio length; for generated audio with unknown duration, only an expected output length for an illustrative estimate. It is not sent to the model, and EvoLink charges by the measured duration. It cannot establish max_cost_usd for unknown output duration or for per-second video requests with video_urls, video_url or source_task_id, whose billing is not fully covered by published prices.';
|
|
@@ -44,6 +49,12 @@ export function usdOf(credits) {
|
|
|
44
49
|
return Number((credits / CREDITS_PER_USD).toFixed(6));
|
|
45
50
|
}
|
|
46
51
|
function infoFor(error) {
|
|
52
|
+
if (error instanceof TaskResponseError)
|
|
53
|
+
return {
|
|
54
|
+
status: 0, category: 'server_error', code: error.code, message: error.message,
|
|
55
|
+
next_step: 'Retry the free query with the original task ID. Its status, charge and refund are unverified; do not generate again.',
|
|
56
|
+
retryable: true, request_id: error.requestId,
|
|
57
|
+
};
|
|
47
58
|
if (error instanceof SubmissionNotStartedError)
|
|
48
59
|
return infoFor(error.cause);
|
|
49
60
|
if (error instanceof ApiHttpError && error.info)
|
|
@@ -86,7 +97,10 @@ export function errorResult(error, context = {}) {
|
|
|
86
97
|
const info = infoFor(error);
|
|
87
98
|
const requestId = publicIdentifier(info.request_id);
|
|
88
99
|
const clientRequestId = publicIdentifier(context.clientRequestId);
|
|
89
|
-
const taskId = publicIdentifier(context.taskId);
|
|
100
|
+
const taskId = publicIdentifier(context.taskId ?? (error instanceof TaskResponseError ? error.taskId : undefined));
|
|
101
|
+
const queryUnverified = context.phase === 'query' || error instanceof TaskResponseError;
|
|
102
|
+
if (queryUnverified && taskId)
|
|
103
|
+
info.next_step = `Query the original task ${taskId} again. This read could not verify its latest status, charge or refund. Do not generate again to recover it.`;
|
|
90
104
|
const label = `${info.category}${info.code ? `, ${info.code}` : ''}${info.status ? `, HTTP ${info.status}` : ''}`;
|
|
91
105
|
const lines = info.headline ? [info.headline] : [`Error (${label}): ${info.message}`];
|
|
92
106
|
let charged;
|
|
@@ -110,6 +124,9 @@ export function errorResult(error, context = {}) {
|
|
|
110
124
|
lines.push(beforeSubmit ? 'Nothing was submitted or charged.' : 'Nothing was submitted or charged. Gateway admission rejected the generation before dispatch.');
|
|
111
125
|
}
|
|
112
126
|
lines.push(`Next step: ${info.next_step}`);
|
|
127
|
+
const websiteCheck = queryUnverified || charged === 'unknown';
|
|
128
|
+
if (websiteCheck)
|
|
129
|
+
lines.push(DASHBOARD_CHECK_GUIDANCE);
|
|
113
130
|
// No HTTP status: the request timed out or the connection dropped, so the upload's outcome is unknown.
|
|
114
131
|
if (context.upload && info.category === 'server_error' && !info.status) {
|
|
115
132
|
lines.push('The upload may not have finished. Calling upload_file again is safe.');
|
|
@@ -124,6 +141,9 @@ export function errorResult(error, context = {}) {
|
|
|
124
141
|
...(submissionState ? { submission_state: submissionState } : {}),
|
|
125
142
|
...(clientRequestId && context.paid ? { client_request_id: clientRequestId } : {}),
|
|
126
143
|
...(taskId ? { task_id: taskId } : {}),
|
|
144
|
+
...(websiteCheck ? dashboardCheck() : {}),
|
|
145
|
+
...(queryUnverified ? { phase: 'query', status_check: 'unverified',
|
|
146
|
+
...(error instanceof TaskResponseError && error.rawStatus ? { raw_status: error.rawStatus } : {}) } : {}),
|
|
127
147
|
});
|
|
128
148
|
}
|
|
129
149
|
/** Sends a progress notification when the client asked for them; failures are ignored. */
|
|
@@ -4,7 +4,7 @@ import { queryTask } from '../services/api-client.js';
|
|
|
4
4
|
import { publicIdentifier } from '../services/public-error.js';
|
|
5
5
|
import { publicTaskError } from '../services/error-handler.js';
|
|
6
6
|
import { taskBilling } from './task-billing.js';
|
|
7
|
-
import { money, sleep, usdOf } from './shared.js';
|
|
7
|
+
import { DASHBOARD_CHECK_GUIDANCE, dashboardCheck, money, sleep, usdOf } from './shared.js';
|
|
8
8
|
/** Result links from the gateway stay downloadable for this long. */
|
|
9
9
|
export const RESULT_LINK_HOURS = 24;
|
|
10
10
|
/** Generation permission does not also authorize the assistant to alter the output. */
|
|
@@ -141,22 +141,38 @@ export function resultDeliveryMarkdown(taskId, links) {
|
|
|
141
141
|
].join('\n\n');
|
|
142
142
|
}
|
|
143
143
|
/** One task as text lines and the same facts as structured content. */
|
|
144
|
-
export function describeTask(task) {
|
|
145
|
-
const status =
|
|
144
|
+
export function describeTask(task, statusCheck = 'verified') {
|
|
145
|
+
const status = statusCheck === 'unverified' ? undefined : task.status;
|
|
146
146
|
const links = resultLinks(task);
|
|
147
147
|
const lines = [
|
|
148
|
-
`Task ${task.id}: ${status}${status
|
|
149
|
-
`Model: ${task.model}`,
|
|
148
|
+
`Task ${task.id}: ${status ?? 'accepted; latest status unverified'}${status && status !== 'completed' && status !== 'failed' && task.progress !== undefined ? ` (${task.progress}%)` : ''}`,
|
|
150
149
|
];
|
|
150
|
+
if (task.model)
|
|
151
|
+
lines.push(`Model: ${task.model}`);
|
|
151
152
|
const structured = {
|
|
152
153
|
task_id: task.id,
|
|
153
|
-
status,
|
|
154
|
-
|
|
154
|
+
...(status ? { status } : {}),
|
|
155
|
+
status_check: status ? statusCheck : 'unverified',
|
|
156
|
+
...(task.progress !== undefined && status ? { progress: task.progress } : {}),
|
|
155
157
|
model: task.model,
|
|
156
158
|
type: task.type,
|
|
157
159
|
billing: taskBilling(task),
|
|
158
160
|
};
|
|
161
|
+
if (!status && task.status)
|
|
162
|
+
structured.last_known_status = task.status;
|
|
163
|
+
if (task.response_warnings?.length) {
|
|
164
|
+
structured.response_warnings = task.response_warnings;
|
|
165
|
+
lines.push(`Some optional response fields were unavailable or invalid and were omitted: ${task.response_warnings.join(', ')}. Missing values do not mean zero.`);
|
|
166
|
+
}
|
|
167
|
+
if (!status)
|
|
168
|
+
lines.push('The task was accepted, but its latest status could not be verified. This does not mean the generation failed, was free, or was refunded. Query the original task ID; do not submit another generation.');
|
|
159
169
|
const outputs = taskOutputs(task);
|
|
170
|
+
const reusableResource = outputs.some(output => ['voice', 'voice_id', 'persona_id', 'result_id', 'id'].some(key => typeof output[key] === 'string'));
|
|
171
|
+
if (!status || status === 'failed' || status === 'cancelled' || task.response_warnings?.length
|
|
172
|
+
|| status === 'completed' && links.length === 0 && !reusableResource) {
|
|
173
|
+
Object.assign(structured, dashboardCheck());
|
|
174
|
+
lines.push(DASHBOARD_CHECK_GUIDANCE);
|
|
175
|
+
}
|
|
160
176
|
if (outputs.length) {
|
|
161
177
|
structured.outputs = outputs;
|
|
162
178
|
lines.push(`Public output metadata: ${JSON.stringify(outputs)}`);
|
|
@@ -180,7 +196,7 @@ export function describeTask(task) {
|
|
|
180
196
|
structured.reserved_credits = reserved;
|
|
181
197
|
structured.reserved_usd = usdOf(reserved);
|
|
182
198
|
}
|
|
183
|
-
if (typeof task.duration === 'number' && task.duration > 0 && TERMINAL_STATUSES.has(status)) {
|
|
199
|
+
if (typeof task.duration === 'number' && task.duration > 0 && status && TERMINAL_STATUSES.has(status)) {
|
|
184
200
|
lines.push(`Took: ${task.duration} s`);
|
|
185
201
|
structured.took_seconds = task.duration;
|
|
186
202
|
}
|
|
@@ -223,7 +239,9 @@ export function describeTask(task) {
|
|
|
223
239
|
}
|
|
224
240
|
lines.push(links.length > 0
|
|
225
241
|
? `Next step: ${RESULT_DELIVERY_INSTRUCTIONS}`
|
|
226
|
-
:
|
|
242
|
+
: reusableResource
|
|
243
|
+
? 'Next step: the task completed with reusable resource identifiers in outputs. Deliver these identifiers to the user; no download links were returned. Do not generate again automatically.'
|
|
244
|
+
: 'Next step: the task completed but returned no result links. Tell the user; use get_task or list_tasks to recover them. Do not generate again automatically.');
|
|
227
245
|
}
|
|
228
246
|
else {
|
|
229
247
|
const eta = task.task_info?.estimated_time;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// Copyright 2024 EvoLink AI. SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
// Generated from Evolink-AI/evolink-mcp; adapted for direct REST operations. See platform/LICENSE and platform/NOTICE.
|
|
3
3
|
/** Version reported in serverInfo and in the X-Evo-Client-Version header. */
|
|
4
|
-
export const MCP_VERSION = '1.
|
|
4
|
+
export const MCP_VERSION = '1.9.0';
|
package/src/platform/source.json
CHANGED
|
@@ -2,91 +2,99 @@
|
|
|
2
2
|
"schema_version": 1,
|
|
3
3
|
"repository": "Evolink-AI/evolink-mcp",
|
|
4
4
|
"baseline": "acc9fd43b945e3917b47809fc94f85ba26c7c8db",
|
|
5
|
-
"source_sha256": "
|
|
5
|
+
"source_sha256": "29ca2f1978406a8791fbbd3aaa17a6b7649ea4c639113c9a35fc4381e80131a0",
|
|
6
6
|
"files": {
|
|
7
7
|
"packages/core/src/branding.ts": "534b944a1370f210a3858c1a85b1a23071aca8e26b7a3e70e4d859ba5b152ff7",
|
|
8
8
|
"packages/core/src/config.ts": "208496230e22f43817cfb9b3805cde279fcce61a82227dfbd9f63485a33d33c7",
|
|
9
|
-
"packages/core/src/data/model-constraints.ts": "
|
|
9
|
+
"packages/core/src/data/model-constraints.ts": "2c02ee6a8915c6bcfb8a3e3cb288ac12404e47305695cd93ae996602a7e65767",
|
|
10
10
|
"packages/core/src/data/model-params.generated.ts": "9641f2c80475259964104be11f1de86f64c23ccfa6defabb7614ff88ed93d819",
|
|
11
|
-
"packages/core/src/data/model-params.ts": "
|
|
11
|
+
"packages/core/src/data/model-params.overrides.generated.ts": "99bd3f49ab9418f568e94912bc71e8a17c46ac68179ede0440bdc27ba29f6b43",
|
|
12
|
+
"packages/core/src/data/model-params.ts": "1296c1b85dc0bd5fa1b201269318b5301aeac60a3fb208c198ced3127ad51be3",
|
|
12
13
|
"packages/core/src/platform-client.ts": "d272d1fbd7939acd69482207f1a75550e4ff8f584deee8f6d0c8ace86e453b6d",
|
|
13
14
|
"packages/core/src/platform-operations.ts": "3239283b4cff2490dd42ac006d03165ef2843eb05cfaece3572d1aacde2e7e32",
|
|
14
15
|
"packages/core/src/request-context.ts": "22ca68d74abc6d5549e20362c6081179d5888f884f74371a95280009d4a59225",
|
|
15
|
-
"packages/core/src/server.ts": "
|
|
16
|
-
"packages/core/src/services/api-client.ts": "
|
|
16
|
+
"packages/core/src/server.ts": "22d3ef130ad5f7c906deb7ea02454df6767c0208b56e838b239ba85bec6103ad",
|
|
17
|
+
"packages/core/src/services/api-client.ts": "aee5d028506bfe8e090fa9a553635429ba4faf49273ef583187a612b635d4291",
|
|
17
18
|
"packages/core/src/services/catalog-client.ts": "c2bcfb0f2780112bcddf6a42537cf9f6264717d0b3685c896790339b0f9bb7df",
|
|
18
19
|
"packages/core/src/services/error-handler.ts": "fd07d5dbd4cad3b4e75d7192c4d49623d92666fef40bd688646e0f756c208d5a",
|
|
19
20
|
"packages/core/src/services/file-client.ts": "9bd94da9a0719fba0050be261fb5210397be4e8b9e6ebc8a2e916fcc185fd2d2",
|
|
20
|
-
"packages/core/src/services/http-policy.ts": "
|
|
21
|
+
"packages/core/src/services/http-policy.ts": "7e0f6419c833251da7163bd7ac6a7060f149be62cc90c7cf175f66a37c365d58",
|
|
21
22
|
"packages/core/src/services/media-preview.ts": "89410d8eb9a02e6fb9d9bc0de8a69b48bec7a06039e54569b9fea7e35527b6c4",
|
|
22
23
|
"packages/core/src/services/model-capabilities.ts": "b41c8b6dd34432cd2e44529e7f40aa1dd7c3b5d0d20e5964b78468517e1979df",
|
|
23
24
|
"packages/core/src/services/model-catalog.ts": "0cad28a41774ea99ff6caf66860ac33a02e8fab254243368d502935b33842364",
|
|
24
25
|
"packages/core/src/services/model-recommendations.ts": "e986db35ac3a5e3c0c8daa1d4b9e5426e081b90674740de96fbcb11ddc2baf35",
|
|
25
26
|
"packages/core/src/services/param-validator.ts": "506e6d6f6a1ad170024d6a24ffcd2434c73e7ac855a89bbba9fdbb81653416fb",
|
|
26
27
|
"packages/core/src/services/preview-download.ts": "719e100e05f7632f633551773159ba7202f755c6d6ff5ecf364b40eeb26bee7b",
|
|
27
|
-
"packages/core/src/services/pricing-client.ts": "
|
|
28
|
-
"packages/core/src/services/pricing-quote-client.ts": "
|
|
28
|
+
"packages/core/src/services/pricing-client.ts": "84a2d12cb36e41df5eae8cb7c9f4361cf970010f9c18fc374ea0173c91a4e1b8",
|
|
29
|
+
"packages/core/src/services/pricing-quote-client.ts": "289f9182afcb4c2661b7a72c2ad9c300da541b86b123c8be083983d2a9491402",
|
|
29
30
|
"packages/core/src/services/pricing-rules-client.ts": "d9424c7b249f2f559b50bf0a356fb5062a37460f9340213ea5488099d2c43c66",
|
|
30
|
-
"packages/core/src/services/pricing-rules-estimate.ts": "
|
|
31
|
-
"packages/core/src/services/public-error.ts": "
|
|
31
|
+
"packages/core/src/services/pricing-rules-estimate.ts": "b96fab7509b73eaad0147743619a41870795d3ce6f3878cfc667a55eab91b82b",
|
|
32
|
+
"packages/core/src/services/public-error.ts": "b74fbaf9a8b5265a392939e744d33a0b30783d287334a7c68e7d4a27d9e34937",
|
|
33
|
+
"packages/core/src/services/search-usage.ts": "8c5997b79a699d176313cc2a2f2b2e6ebd23b878e66035bc39600180de3266ad",
|
|
34
|
+
"packages/core/src/services/seedance-input.ts": "e16fa0c03af1afe3afba12045e69b731ec71a9d8af6ef0e30a0a988a36de251b",
|
|
35
|
+
"packages/core/src/services/task-response.ts": "09887c6c325dd04b4f6569ca243673d499cfe4acd414e8209cc8c9e9349513f2",
|
|
32
36
|
"packages/core/src/services/upload-policy.ts": "2dc36716a3b9e78b078c618b029499bf6e27448dd44900b6f917dda5f8046ce3",
|
|
33
37
|
"packages/core/src/services/upload-slots.ts": "80da2511394daf61e3b8ed3b9fbed06c28fec7d4d5b1c3d68585bd89fa816096",
|
|
34
38
|
"packages/core/src/services/utm.ts": "adb224e91531b0db809b5de086ddc97bb5a383184458554dcdf784a65cd941a5",
|
|
35
|
-
"packages/core/src/tool-guidance.ts": "
|
|
39
|
+
"packages/core/src/tool-guidance.ts": "752dd39fc04dceeaa0f64c20a62301ab3b5b20187726bcbd0d0e6141ec921093",
|
|
36
40
|
"packages/core/src/tools/check-balance.ts": "f27b269a3c3c838a54fe54005eb72f637ddfdc2982d932901282bbf072d1efca",
|
|
37
41
|
"packages/core/src/tools/discovery.ts": "50adaf61d2e159a78348661b1b49b0332d47079275f943da67b5f132f8997218",
|
|
38
|
-
"packages/core/src/tools/estimate-cost.ts": "
|
|
39
|
-
"packages/core/src/tools/generate.ts": "
|
|
40
|
-
"packages/core/src/tools/get-model.ts": "
|
|
42
|
+
"packages/core/src/tools/estimate-cost.ts": "685ff2cbfcb97ddba51e2f0e0f79681851ffdb194558bef95825e3465c74f3ea",
|
|
43
|
+
"packages/core/src/tools/generate.ts": "05d67b8f5d291d6360e463d430dcb8cc8b1462f2e18d18a30b18eb199692c3c7",
|
|
44
|
+
"packages/core/src/tools/get-model.ts": "c322861d2bb0436de28a8eda634ae3d2fbb97dda95fc93e704a3bdcac82f5986",
|
|
41
45
|
"packages/core/src/tools/get-pricing-rules.ts": "6fdd62f1f09804c6149c423f8203c89b8e9a7c181f661e0d49d7468f7ceb5f00",
|
|
42
|
-
"packages/core/src/tools/get-task.ts": "
|
|
43
|
-
"packages/core/src/tools/list-tasks.ts": "
|
|
46
|
+
"packages/core/src/tools/get-task.ts": "6c656893927d65806c855726568cf574553fffa9b8269efb0a180472358d8799",
|
|
47
|
+
"packages/core/src/tools/list-tasks.ts": "1cb1a0fda2b39b544e2813de16393a5603a07cb04b4f9f736446b30367b0a457",
|
|
44
48
|
"packages/core/src/tools/prepare-upload.ts": "c58cfb04725cc660e34f68391727e99f726e355f9329d91ced56878212294d40",
|
|
45
49
|
"packages/core/src/tools/search-models.ts": "3b950140240ac6c5f0dfdc0264cb4b66d0583e05e220c67245b6e8a7616fc55e",
|
|
46
|
-
"packages/core/src/tools/shared.ts": "
|
|
47
|
-
"packages/core/src/tools/task-billing.ts": "
|
|
48
|
-
"packages/core/src/tools/task-format.ts": "
|
|
50
|
+
"packages/core/src/tools/shared.ts": "96bf26192a2a8bc1c326a54500761efd6c15959803eacdfe44f5de8ea23d3ed7",
|
|
51
|
+
"packages/core/src/tools/task-billing.ts": "bf0dec37aed3fc5396d653c481b790ea63a413c23fc78e2949f8c288c53f9e12",
|
|
52
|
+
"packages/core/src/tools/task-format.ts": "5f6536ce15d42a67fec741dd3c9863960bfc1d0580a3a500da92aa52e2fe63d5",
|
|
49
53
|
"packages/core/src/tools/task-usage.ts": "ba05d054e1d60d67f6ab75cc6d9169f453c87e0e89c17a2c1be5fc429e8f9f47",
|
|
50
54
|
"packages/core/src/tools/upload-file.ts": "da6f239d1b1e6a13a7b418d24e738ebabf9823b2656111eeaa70eb247421ad40",
|
|
51
|
-
"packages/core/src/version.ts": "
|
|
55
|
+
"packages/core/src/version.ts": "f3eee957b447a0ec39b03de0c7ccdb440dda84b00d6454d2b48e50be4a6f6385"
|
|
52
56
|
},
|
|
53
57
|
"artifacts": {
|
|
54
58
|
"core/src/config.js": "e5f001e6bb30fa3ca49ca1383b3deb83ea495d20079adefad6d0451f5bbee0e3",
|
|
55
|
-
"core/src/data/model-constraints.js": "
|
|
59
|
+
"core/src/data/model-constraints.js": "b70a134c59a7600bc82d2fe694a3b55f0e1d8c01cb416d6a00dc7d9df818e413",
|
|
56
60
|
"core/src/data/model-params.generated.js": "9f6ee98f59b9571797ab8e3d5ed874724fe386ec7616ae338596db15de8f3f78",
|
|
57
|
-
"core/src/data/model-params.js": "
|
|
61
|
+
"core/src/data/model-params.js": "d3741791777a4c8fde11b0fb99b76258323260fc8611a6158f44daad9739c3b1",
|
|
62
|
+
"core/src/data/model-params.overrides.generated.js": "dea0cf07f7d20d0a0efd74638a110bc67db4df3214edeb7d9c9cc9af5bed3089",
|
|
58
63
|
"core/src/platform-client.js": "7268a23e0c42ac454bc78bb4a768166670ad3996c13fa88ede03007dbee755e7",
|
|
59
64
|
"core/src/platform-operations.js": "534da709afd69e664c25e173adb8662644340b7024666036c0c98347e8833cfc",
|
|
60
65
|
"core/src/request-context.js": "ed22b79db1fc8b20c57f0a58e938ff4a833bb6a75a16d2246f732a41256c21e8",
|
|
61
|
-
"core/src/services/api-client.js": "
|
|
66
|
+
"core/src/services/api-client.js": "d58656608beaa078233b95e4f2794eab163da78fa82fce3325c823d9477a434b",
|
|
62
67
|
"core/src/services/catalog-client.js": "f438fdb13fa9e9ddbf539b265bfcbb77c4d5024835130cbade3b83e9952893cf",
|
|
63
68
|
"core/src/services/error-handler.js": "edea48a8eaf90b4193a503c0418ba7157acabfe89833a39c1d41bbf568de8355",
|
|
64
69
|
"core/src/services/file-client.js": "d11798bfddc6637727a874532ad218b5deac58d6bca8f20abcd2c30b132210e4",
|
|
65
|
-
"core/src/services/http-policy.js": "
|
|
70
|
+
"core/src/services/http-policy.js": "c3e6fe080afefdc65a9ec67115e6dc2f4fddb9c0fd58e30d414222e599f6f35b",
|
|
66
71
|
"core/src/services/model-capabilities.js": "2ad86bc08c82cce82964b18d6187632fc738f8cd17d03de1ef04f27b1e35cfe1",
|
|
67
72
|
"core/src/services/model-catalog.js": "e25b005d48a38106565919cdfb50abf2b018b92e7d762a88470ba3af1ba2fa06",
|
|
68
73
|
"core/src/services/model-recommendations.js": "f330f941d26aa9fc127c2f7479cb2be026d6111a3f3066e89442ff29ec33803a",
|
|
69
74
|
"core/src/services/param-validator.js": "9e3fba916a39140614851689fcf47f1aa644a30b6192b6126af4d78695f88b10",
|
|
70
75
|
"core/src/services/pricing-client.js": "2f0f74f7769442e4edf8c3f37a66bb1c6c099253189e9b2079ad265d1327225d",
|
|
71
|
-
"core/src/services/pricing-quote-client.js": "
|
|
76
|
+
"core/src/services/pricing-quote-client.js": "5d07cf0b38b1ca81ac89c8b69314d90380fbeab9132dbceca3c2785d2495bb32",
|
|
72
77
|
"core/src/services/pricing-rules-client.js": "6c6a6de64a2fbf816f7be5661712bc18ae996328ffcb53401fe0cc0ce3123b6f",
|
|
73
|
-
"core/src/services/pricing-rules-estimate.js": "
|
|
74
|
-
"core/src/services/public-error.js": "
|
|
78
|
+
"core/src/services/pricing-rules-estimate.js": "bec240eb2d8993d1097dd0ef5916e4a8e1b79efd77af4cb069776850c84822cb",
|
|
79
|
+
"core/src/services/public-error.js": "60995dcbcb23d43800a9db36acefe86402781226516e3634b3bf0351ba0623e8",
|
|
80
|
+
"core/src/services/search-usage.js": "35e99dae5a548bef57a9b3b61d8ed28f4e6444308943baa71c608ad79953588a",
|
|
81
|
+
"core/src/services/seedance-input.js": "cfe5ea052c7926c31e2492bcb3e524cec0c3e4f4419f1f823d2f9cf275b52220",
|
|
82
|
+
"core/src/services/task-response.js": "28969c1aa86a8bcdf5dbfa4149fa86fa526dcd5730f922df0eed882ec30ddeaa",
|
|
75
83
|
"core/src/services/utm.js": "8aa328ddb92c3ef65568fab60226cb5fa2e940449d7ac3d6c2e35b6f9bcf835d",
|
|
76
|
-
"core/src/tool-guidance.js": "
|
|
84
|
+
"core/src/tool-guidance.js": "03fa3cc496e2c6a09397e4b9172b1e9b5f8ffc98de16767dfbf85cd64b857381",
|
|
77
85
|
"core/src/tools/check-balance.js": "75baa61e57e289fd61a45251665df599967ba0beb4b33cc3976280a9d89421bf",
|
|
78
86
|
"core/src/tools/discovery.js": "6095a2f699fbf465bcae3387b137901ecdbbbb00bbfa6f4b3250a7c293c45b70",
|
|
79
|
-
"core/src/tools/estimate-cost.js": "
|
|
80
|
-
"core/src/tools/generate.js": "
|
|
81
|
-
"core/src/tools/get-model.js": "
|
|
87
|
+
"core/src/tools/estimate-cost.js": "bda58bfbafc0c76e4e3354f4b77aa7d9fef2aa5b43e742f611a8630ca5376fb5",
|
|
88
|
+
"core/src/tools/generate.js": "1fa64509a860f7c4a7b723ea5ce79d2f8408dc0a3853ce1e76df4c921a47a79f",
|
|
89
|
+
"core/src/tools/get-model.js": "84334af0c5c0eb648fbe53a929de241ff1f86faa39c7f091987d0cd532f96976",
|
|
82
90
|
"core/src/tools/get-pricing-rules.js": "3dcab9b74ec08156a27f34a0930363b7dead5d00bba8e6cdbb47cd68ea76aaad",
|
|
83
|
-
"core/src/tools/get-task.js": "
|
|
84
|
-
"core/src/tools/list-tasks.js": "
|
|
91
|
+
"core/src/tools/get-task.js": "a8e67526ebaa381c360667c13cc69e3a3db310ef7b64435da698b0748fe8cb41",
|
|
92
|
+
"core/src/tools/list-tasks.js": "791d9b688e0425a9ddc1bb694313f7b94077dee1437254db8ebd363257edee97",
|
|
85
93
|
"core/src/tools/search-models.js": "9850b7d2d74a1d69229400d465b21ecb9ede79c75dddeb41787668f418c5bd06",
|
|
86
|
-
"core/src/tools/shared.js": "
|
|
94
|
+
"core/src/tools/shared.js": "1bbc7ac4a0d8e9bcba382f063f5422269cddf4742389b920503d3bafbb01f414",
|
|
87
95
|
"core/src/tools/task-billing.js": "f49b252afcaf4a6275f5db6ebc8e6380387b2406bd5fc91e7367e3523025af8b",
|
|
88
|
-
"core/src/tools/task-format.js": "
|
|
96
|
+
"core/src/tools/task-format.js": "ac8f8eac7d95b7e25618c78de391f37a9eeb785fee3213d130e7d370cd200fdb",
|
|
89
97
|
"core/src/tools/task-usage.js": "3aae5d7807efc2c762bf604cf9ecfecf8f9008185bcef584e6d4243404418dc5",
|
|
90
|
-
"core/src/version.js": "
|
|
98
|
+
"core/src/version.js": "05d7ca646738513202228de9b9f149b3757efec3b0d970df5474f64f84194813"
|
|
91
99
|
}
|
|
92
100
|
}
|