@talqing/mcp 0.10.0 → 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.
Files changed (3) hide show
  1. package/SKILL.md +75 -32
  2. package/package.json +1 -1
  3. package/tools.json +62 -6
package/SKILL.md CHANGED
@@ -897,15 +897,15 @@ same lifecycle hooks as an agent — minus everything that belongs to a
897
897
  *session*, because a task never owns one.
898
898
 
899
899
  **It runs two ways, and declares nothing that ties it to either.** On its own —
900
- `POST /v1/tasks/{task_id}/runs`, or an email batch drafting a row — it is an LLM
901
- with tools and nobody to talk to. Attached to an agent through
900
+ `run_task` (`POST /v1/task-runs`), or an email batch drafting a row — it is an
901
+ LLM with tools and nobody to talk to. Attached to an agent through
902
902
  `AgentConfig.tasks`, it takes over that conversation for as long as the job
903
- takes, on the call's own voice and ears, and hands its result back as a tool
904
- result.
903
+ takes, on the call's own voice and ears, and hands its result back to the
904
+ calling agent as a JSON tool result.
905
905
 
906
906
  It is its own noun with its own operations (`list_tasks`, `create_task`,
907
- `get_task`, `update_task`, `delete_task`, `run_task`, `list_task_runs`) — not a
908
- fourth agent channel. Use one wherever the work has an input and an answer
907
+ `get_task`, `update_task`, `delete_task`, `run_task`, `list_task_runs`, …) — not
908
+ a fourth agent channel. Use one wherever the work has an input and an answer
909
909
  rather than a conversation: research a company from a domain, classify a
910
910
  message, draft an opening line, take a shipping address mid-call.
911
911
 
@@ -943,17 +943,31 @@ message, draft an opening line, take a shipping address mid-call.
943
943
  refused too, rather than silently dropped — which is the one difference from an
944
944
  agent, whose key space is open.
945
945
 
946
+ Two input kinds exist for tasks only. **`type: "file"`** takes a PDF (text or
947
+ scanned, up to 20 MB and 100 pages), supplied under the run's `files`; it has
948
+ no `default`. **`untrusted: true`** marks third-party text — a CV, an email, a
949
+ transcript. Both are **never templated**: `{{vars.cv}}` in the prompt, or an
950
+ untrusted value in a tool's URL, query or headers, is refused at save (a tool's
951
+ request body may carry untrusted text; nothing may carry a file). The run hands
952
+ them to the model as JSON in its opening message, under a line saying they are
953
+ data, not instructions — so the prompt should name them and say how to treat
954
+ them. Scanned pages reach the model as images, so they need a model with
955
+ vision. A task with either kind cannot be attached to an agent.
956
+
946
957
  **They are also the schema of the tool an agent enters the task with**, minus
947
958
  every name that agent declares and every name the session was started with. So
948
959
  declare a variable only for what the caller or the model must supply: anything
949
960
  the task can read for itself — `{{userdata.order_id}}`, `{{vars.region}}`,
950
961
  `{{system_vars.date}}` — belongs in the prompt. Declare it instead and the
951
962
  model is asked to invent it, and it will.
952
- - **`output`** — a flat list of the fields the model must produce, each with a
953
- `name`, a `type` (`string`, `boolean`, `integer` or `number`) and a
954
- `description`. At most 25, and at least one **to publish** — a draft may have
955
- none. No arrays and no nested objects: a task that wants to return five
956
- talking points returns one string containing them.
963
+ - **`output`** — the fields the model must produce, each with a `name`, a
964
+ `type` and a `description`. Types are `string`, `boolean`, `integer`,
965
+ `number`, `object` (takes `fields`, a list of the same shape) and `array`
966
+ (takes `items`: `{type, description, enum?, fields?, items?}` — an element has
967
+ no name and is never null). A `string` may take `enum`, 1–50 allowed values.
968
+ At most 25 top-level fields, 4 levels deep and 100 fields in all, and at least
969
+ one **to publish**. A grader returns `criteria: [{name, verdict, quote}]`
970
+ rather than one string to be parsed.
957
971
  - **`max_steps`** (default 25, max 50) — how many LLM → tools → LLM **rounds**
958
972
  a STANDALONE run may take. A round, not a tool call: four tools in one reply
959
973
  cost one step. This is the runaway-loop guard. Entered by an agent the task
@@ -985,7 +999,7 @@ trees, and the email batches already drafting with this task. Run it before
985
999
  are worth reporting but never block.
986
1000
 
987
1001
  **Build order:** create the draft → write the prompt, `vars` and `output` →
988
- `run_task` with `version: "draft"` to try it → fix → `validate_task` →
1002
+ `run_task` with `task_id` and `task_version: "draft"` to try it → fix → `validate_task` →
989
1003
  `publish_task` **when the person asks you to**. Publishing is their call, not
990
1004
  yours: it changes what every run and every live email batch does.
991
1005
 
@@ -1002,7 +1016,7 @@ job is done enough to call it. It is required and
1002
1016
  non-empty; a new task starts with `"Submit results if you are sure that you have achieved the goal of this task"`. **Make it specific**: what
1003
1017
  "achieved" means for this task (e.g. "once the caller has confirmed the address").
1004
1018
 
1005
- Every output field is a **required argument** of that tool — an optional one lets
1019
+ Every output field is a **required argument** of that tool, at every depth — an optional one lets
1006
1020
  the model silently omit the address it failed to find, and "omitted" and "not
1007
1021
  generated yet" then look identical to whoever reads the row. A field's own
1008
1022
  `required` flag (default `true`) decides whether `null` is accepted: turn it off
@@ -1020,21 +1034,50 @@ IS how a task reports failure, so never add a success/failure boolean to `output
1020
1034
  a value it may legitimately not find is a field with `required` off. Publishing
1021
1035
  refuses either description blank.
1022
1036
 
1023
- ### Reading a run
1037
+ ### Running one
1024
1038
 
1025
1039
  `run_task` **executes for real**: the tools call the tenant's endpoints with
1026
1040
  their secrets, the MCP servers spend their credits, and the model spends their
1027
1041
  tokens. A task that books, charges or sends will do so.
1028
1042
 
1029
- It runs the published version unless `version` says otherwise. Pass
1030
- `version: "draft"` to try the unpublished config — that is the loop you build
1031
- in, and it is refused with the publish errors when the draft does not hold
1032
- together.
1043
+ **What runs** is named like an agent on a call: `task_id` (the published
1044
+ version, an int `task_version`, or `task_version: "draft"` — the loop you build
1045
+ in, refused with the publish errors when the draft does not hold together), or
1046
+ a whole inline `task`. `task_override` changes anything for this run only
1047
+ (objects merge, lists replace, null clears) — a different model, say. The run
1048
+ stores the exact resolved config as `config`.
1049
+
1050
+ **Inline or background.** By default the call waits and answers with the
1051
+ finished run. `background: true` queues it and answers `202` at once; the
1052
+ workspace runs up to 3 background runs at a time, oldest first, and queues the
1053
+ rest — it never refuses for load. `run_task_batch` queues up to 1000 runs of one task in one
1054
+ call, all or nothing: one invalid item refuses the batch, naming `runs[i]`. Give
1055
+ each run `metadata` (≤16 string labels, e.g. `{candidate_id: "c_42"}`) and an
1056
+ `idempotency_key`: resending a key returns the existing run (`deduplicated`)
1057
+ instead of starting another, and the same key with a different request is a
1058
+ `409`. Read results with `list_task_runs` (filter by `task_id`, `status`,
1059
+ `metadata=key:value`, a creation window) and `get_task_run`, or subscribe a
1060
+ webhook to `task_run.completed`, sent once per run as it finishes.
1061
+
1062
+ **Retries.** A background run is tried again — at most 3 tries — when its
1063
+ worker stopped under it, or when the model provider failed transiently before
1064
+ any tool ran, so a side-effecting tool never runs twice. Everything else settles
1065
+ on the first try. `tries` says how many there were; cost adds up across them.
1066
+
1067
+ `cancel_task_run` stops a queued run at once and a running background one
1068
+ within seconds; an inline run cannot be canceled. `delete_task_run` (and
1069
+ `delete_task_runs` by metadata) erases a run's inputs, files, output, trace and
1070
+ config, keeping its cost and metadata — and a workspace's retention policy does
1071
+ the same on schedule (`content_expires_at`).
1072
+
1073
+ ### Reading a run
1033
1074
 
1034
- The response is the whole run — `output`, a `trace` of every tool call and
1035
- everything the model wrote (secrets redacted, long fields truncated and marked),
1036
- `steps_used` against `max_steps`, the tokens each model spent and
1037
- `provider_cost`.
1075
+ `get_task_run` is the whole run — `config`, `vars`, `files` (each PDF's
1076
+ extracted text and its scanned pages, exactly what the model saw), `output`, a
1077
+ `trace` of every tool call and everything the model wrote (secrets redacted,
1078
+ long fields truncated and marked), `steps_used` against `max_steps`, the tokens
1079
+ each model spent and `provider_cost`. A result over 64 KB is refused back to the
1080
+ model, which is told to shorten it.
1038
1081
 
1039
1082
  **`attempts` is worth reading.** A run that ends without calling `submit_result`
1040
1083
  is re-prompted rather than failed, and **each re-prompt starts the step budget
@@ -1043,28 +1086,28 @@ the third go, having used up to three times the rounds `steps_used` shows.
1043
1086
  `steps_used` is the busiest attempt's count, because that is the number the cap
1044
1087
  governs; `timeout_seconds`, not `max_steps`, is what actually bounds a run.
1045
1088
 
1046
- A failure carries `error.type`, and it is a closed vocabulary that says whose
1047
- problem it is:
1089
+ `status` is `queued`, `running`, `completed`, `failed` or `canceled`. A failure
1090
+ carries `error.type`, a closed vocabulary that says whose problem it is:
1048
1091
 
1049
- - `missing_vars` — a required input had no value and no default. Caught before
1050
- anything ran, so it cost nothing.
1092
+ - `invalid_input` — a required input was missing, a file could not be
1093
+ downloaded or read, or the model cannot see scanned pages. Caught before the
1094
+ model ran, so it cost nothing.
1051
1095
  - `no_output` — the model finished without calling `submit_result`, twice; the
1052
1096
  framework already re-prompted it once. **Fix the prompt**: say what the task
1053
1097
  is for and that finishing means calling the tool.
1054
1098
  - `step_limit` — every round of an attempt was used and no result came back.
1055
1099
  **Fix `max_steps`**, or narrow what the task does. Reported apart from
1056
1100
  `no_output` precisely so nobody rewrites a prompt that was never the problem.
1057
- - `timeout` — `timeout_seconds` elapsed.
1101
+ - `timeout` — `timeout_seconds` elapsed (reading the files counts).
1058
1102
  - `provider_error` — the model or an MCP server failed. Not yours to fix.
1059
1103
  - `configuration` — yours to tell them: a missing BYOK key, a tool version this
1060
1104
  publish pinned that has since been deleted, an integration whose credential no
1061
1105
  longer resolves.
1062
1106
  - `platform` — ours.
1063
- - `canceled` — a deploy or restart stopped the run. A batch row is drafted again
1064
- automatically; a run started by hand is run again.
1107
+ - `canceled` — someone canceled it, or a deploy stopped an inline run.
1065
1108
 
1066
- Each run records `task_version` — which published definition ran it, and null
1067
- for a `version: "draft"` run. That is what makes two runs either side of an edit
1109
+ Each run records `task_version` — which published definition was its base, null
1110
+ for a draft or inline task. That is what makes two runs either side of an edit
1068
1111
  tell apart.
1069
1112
 
1070
1113
  Task runs are **not** in the Observability charts, which are built on calls and
@@ -1269,7 +1312,7 @@ collides with an output field name (one of the two would be unreachable); a
1269
1312
  `from_email` whose domain is not verified on that Resend account right now.
1270
1313
 
1271
1314
  **A header that exists but is blank on some rows still passes create** and fails
1272
- those rows at draft time with `missing_vars` — one row, not the batch, and with
1315
+ those rows at draft time with `invalid_input` — one row, not the batch, and with
1273
1316
  no tokens spent. Flag blank cells in a required column before creating.
1274
1317
 
1275
1318
  **A row that can never be sent is never drafted.** If a mapped column the task
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talqing/mcp",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "MCP server for building Talqing AI voice, video and text agents from Claude Code, Codex, or any MCP client.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://talqing.com",
package/tools.json CHANGED
@@ -395,7 +395,7 @@
395
395
  "role": "write"
396
396
  },
397
397
  {
398
- "description": "Run the task once with the variables you supply, and wait for the result.",
398
+ "description": "Run a task for real: its tools, MCP servers and model all act and spend.",
399
399
  "method": "POST",
400
400
  "name": "run_task",
401
401
  "parameters": {
@@ -404,12 +404,26 @@
404
404
  "properties": {},
405
405
  "type": "object"
406
406
  },
407
- "path": "/v1/tasks/{task_id}/runs",
407
+ "path": "/v1/task-runs",
408
408
  "read_only": false,
409
409
  "role": "write"
410
410
  },
411
411
  {
412
- "description": "This task's runs, newest first, each with its output, trace and cost.",
412
+ "description": "Queue up to 1000 runs of one task, in the background. One invalid item refuses all.",
413
+ "method": "POST",
414
+ "name": "run_task_batch",
415
+ "parameters": {
416
+ "additionalProperties": true,
417
+ "description": "Arguments not inlined: call describe_function('run_task_batch').",
418
+ "properties": {},
419
+ "type": "object"
420
+ },
421
+ "path": "/v1/task-runs/batch",
422
+ "read_only": false,
423
+ "role": "write"
424
+ },
425
+ {
426
+ "description": "Task runs, newest first, without traces or inputs.",
413
427
  "method": "GET",
414
428
  "name": "list_task_runs",
415
429
  "parameters": {
@@ -418,12 +432,12 @@
418
432
  "properties": {},
419
433
  "type": "object"
420
434
  },
421
- "path": "/v1/tasks/{task_id}/runs",
435
+ "path": "/v1/task-runs",
422
436
  "read_only": true,
423
437
  "role": "read"
424
438
  },
425
439
  {
426
- "description": "One run in full: what it produced, every tool it called on the way, and what it cost.",
440
+ "description": "One run in full: its config, inputs, output, trace and cost. Secrets are redacted.",
427
441
  "method": "GET",
428
442
  "name": "get_task_run",
429
443
  "parameters": {
@@ -432,10 +446,52 @@
432
446
  "properties": {},
433
447
  "type": "object"
434
448
  },
435
- "path": "/v1/tasks/{task_id}/runs/{run_id}",
449
+ "path": "/v1/task-runs/{run_id}",
436
450
  "read_only": true,
437
451
  "role": "read"
438
452
  },
453
+ {
454
+ "description": "Cancel a queued or background run. A running one stops within seconds.",
455
+ "method": "POST",
456
+ "name": "cancel_task_run",
457
+ "parameters": {
458
+ "additionalProperties": true,
459
+ "description": "Arguments not inlined: call describe_function('cancel_task_run').",
460
+ "properties": {},
461
+ "type": "object"
462
+ },
463
+ "path": "/v1/task-runs/{run_id}/cancel",
464
+ "read_only": false,
465
+ "role": "write"
466
+ },
467
+ {
468
+ "description": "Delete a run's inputs, files, output and trace; its cost and metadata stay.",
469
+ "method": "DELETE",
470
+ "name": "delete_task_run",
471
+ "parameters": {
472
+ "additionalProperties": true,
473
+ "description": "Arguments not inlined: call describe_function('delete_task_run').",
474
+ "properties": {},
475
+ "type": "object"
476
+ },
477
+ "path": "/v1/task-runs/{run_id}",
478
+ "read_only": false,
479
+ "role": "write"
480
+ },
481
+ {
482
+ "description": "Delete the content of every run whose metadata matches, as `delete_task_run` does.",
483
+ "method": "POST",
484
+ "name": "delete_task_runs",
485
+ "parameters": {
486
+ "additionalProperties": true,
487
+ "description": "Arguments not inlined: call describe_function('delete_task_runs').",
488
+ "properties": {},
489
+ "type": "object"
490
+ },
491
+ "path": "/v1/task-runs/delete",
492
+ "read_only": false,
493
+ "role": "write"
494
+ },
439
495
  {
440
496
  "description": "List the workspace's integrations with their provider, status and config.",
441
497
  "method": "GET",