@talonic/mcp 0.1.75 → 0.1.77
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/CHANGELOG.md +9 -0
- package/README.md +22 -4
- package/dist/content.js +1756 -180
- package/dist/content.js.map +1 -1
- package/dist/http-server.js +676 -3
- package/dist/http-server.js.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.js +659 -1
- package/dist/index.js.map +1 -1
- package/dist/server.js +659 -1
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2147,6 +2147,306 @@ function registerAdminAgentTaskTools(server, getToken, baseUrl) {
|
|
|
2147
2147
|
async (args) => handleAdminSubmitAgentTask(getToken, baseUrl, args)
|
|
2148
2148
|
);
|
|
2149
2149
|
}
|
|
2150
|
+
|
|
2151
|
+
// src/tools/_http.ts
|
|
2152
|
+
var DEFAULT_BASE3 = "https://api.talonic.com";
|
|
2153
|
+
function buildUrl(baseUrl, path, params = {}) {
|
|
2154
|
+
const qs = new URLSearchParams();
|
|
2155
|
+
for (const [k, v] of Object.entries(params)) {
|
|
2156
|
+
if (v === void 0 || v === "") continue;
|
|
2157
|
+
qs.set(k, String(v));
|
|
2158
|
+
}
|
|
2159
|
+
return `${baseUrl ?? DEFAULT_BASE3}${path}${qs.size ? `?${qs}` : ""}`;
|
|
2160
|
+
}
|
|
2161
|
+
async function apiJson(getToken, baseUrl, method, path, opts = {}) {
|
|
2162
|
+
const url = buildUrl(baseUrl, path, opts.params);
|
|
2163
|
+
const res = await fetch(url, {
|
|
2164
|
+
method,
|
|
2165
|
+
headers: {
|
|
2166
|
+
Authorization: `Bearer ${getToken()}`,
|
|
2167
|
+
Accept: "application/json",
|
|
2168
|
+
...opts.body !== void 0 ? { "Content-Type": "application/json" } : {}
|
|
2169
|
+
},
|
|
2170
|
+
...opts.body !== void 0 ? { body: JSON.stringify(opts.body) } : {}
|
|
2171
|
+
});
|
|
2172
|
+
if (!res.ok) {
|
|
2173
|
+
const text = await res.text().catch(() => "");
|
|
2174
|
+
throw new Error(`Talonic API error: HTTP ${res.status}${text ? ` \u2014 ${text}` : ""}`);
|
|
2175
|
+
}
|
|
2176
|
+
return await res.json();
|
|
2177
|
+
}
|
|
2178
|
+
async function runTool(fn) {
|
|
2179
|
+
try {
|
|
2180
|
+
return jsonOk(await fn());
|
|
2181
|
+
} catch (err) {
|
|
2182
|
+
return toolError(err);
|
|
2183
|
+
}
|
|
2184
|
+
}
|
|
2185
|
+
|
|
2186
|
+
// src/tools/decision-tasks.ts
|
|
2187
|
+
var DECIDE_SCOPE = "apps:decide";
|
|
2188
|
+
var TASK_STATUSES2 = [
|
|
2189
|
+
"available",
|
|
2190
|
+
"claimed",
|
|
2191
|
+
"submitted",
|
|
2192
|
+
"released",
|
|
2193
|
+
"failed",
|
|
2194
|
+
"timed_out",
|
|
2195
|
+
"cancelled"
|
|
2196
|
+
];
|
|
2197
|
+
var PACKAGE_PAGE_LIMIT_MAX = 2e3;
|
|
2198
|
+
var appId = z.string().uuid().describe("App UUID whose decision-task inbox to read.");
|
|
2199
|
+
var taskId2 = z.string().uuid().describe("Decision task UUID.");
|
|
2200
|
+
var executionEpoch2 = z.number().int().min(1).max(2147483647).describe("Execution epoch returned by the successful claim. Stale epochs are rejected with 409.");
|
|
2201
|
+
var status2 = z.enum(TASK_STATUSES2).optional().describe("Optional task-status filter.");
|
|
2202
|
+
var listLimit = z.number().int().min(1).max(100).optional().describe("Page size (default 50).");
|
|
2203
|
+
var cursor2 = z.string().min(1).optional().describe("Opaque cursor from pagination.next_cursor.");
|
|
2204
|
+
var packageCursor = z.string().min(1).optional().describe(
|
|
2205
|
+
"Opaque package cursor: package.first_cursor from the claim, then pagination.next_cursor. Omit for the first page."
|
|
2206
|
+
);
|
|
2207
|
+
var packageLimit = z.number().int().min(1).max(PACKAGE_PAGE_LIMIT_MAX).optional().describe(
|
|
2208
|
+
`Records per page, 1 to ${PACKAGE_PAGE_LIMIT_MAX}. Defaults to the platform page size (package.page_size from the claim).`
|
|
2209
|
+
);
|
|
2210
|
+
var outcome = z.record(z.string(), z.json()).describe(
|
|
2211
|
+
"The decision, shaped by output_contract from the claim: for a plain JSON Schema contract the object that schema validates; for a verdict_matrix contract { subjects: [{ subject_key, rule_outcomes, auto?, detail? }] }; for a record_set contract its fields-and-rows envelope."
|
|
2212
|
+
);
|
|
2213
|
+
var evidence = z.array(z.string().min(1).max(512)).max(1e4).describe(
|
|
2214
|
+
"Provenance locators the decision relied on, each copied verbatim from the input package (or a db:/ref: locator the app holds a read grant on). Required; [] is accepted only when the app allows unevidenced decisions."
|
|
2215
|
+
);
|
|
2216
|
+
var rationale = z.string().min(1).max(4e3).describe(
|
|
2217
|
+
"Short decision rationale (a summary, never private chain-of-thought), up to 4,000 characters."
|
|
2218
|
+
);
|
|
2219
|
+
var confidence = z.number().min(0).max(1).optional().describe("Optional confidence from 0 to 1.");
|
|
2220
|
+
var serviceVersion = z.string().min(1).max(64).optional().describe("Optional build identifier of the deciding service; recorded as decided_by.label.");
|
|
2221
|
+
var failReason = z.string().min(1).max(2e3).describe(
|
|
2222
|
+
"Why the task cannot be decided, up to 2,000 characters. Recorded on the Human Review the fail raises."
|
|
2223
|
+
);
|
|
2224
|
+
var listInput2 = { app_id: appId, status: status2, limit: listLimit, cursor: cursor2 };
|
|
2225
|
+
var idInput2 = { task_id: taskId2 };
|
|
2226
|
+
var packageInput = { task_id: taskId2, cursor: packageCursor, limit: packageLimit };
|
|
2227
|
+
var epochInput = { task_id: taskId2, execution_epoch: executionEpoch2 };
|
|
2228
|
+
var submitInput2 = {
|
|
2229
|
+
task_id: taskId2,
|
|
2230
|
+
execution_epoch: executionEpoch2,
|
|
2231
|
+
outcome,
|
|
2232
|
+
evidence,
|
|
2233
|
+
rationale,
|
|
2234
|
+
confidence,
|
|
2235
|
+
service_version: serviceVersion
|
|
2236
|
+
};
|
|
2237
|
+
var failInput = { task_id: taskId2, execution_epoch: executionEpoch2, reason: failReason };
|
|
2238
|
+
function taskPath(taskId3, suffix = "") {
|
|
2239
|
+
return `/v1/decision-tasks/${encodeURIComponent(taskId3)}${suffix}`;
|
|
2240
|
+
}
|
|
2241
|
+
function handleListDecisionTasks(getToken, baseUrl, args) {
|
|
2242
|
+
return runTool(
|
|
2243
|
+
() => apiJson(
|
|
2244
|
+
getToken,
|
|
2245
|
+
baseUrl,
|
|
2246
|
+
"GET",
|
|
2247
|
+
`/v1/apps/${encodeURIComponent(args.app_id)}/decision-tasks`,
|
|
2248
|
+
{
|
|
2249
|
+
params: { status: args.status, limit: args.limit, cursor: args.cursor }
|
|
2250
|
+
}
|
|
2251
|
+
)
|
|
2252
|
+
);
|
|
2253
|
+
}
|
|
2254
|
+
function handleClaimDecisionTask(getToken, baseUrl, args) {
|
|
2255
|
+
return runTool(() => apiJson(getToken, baseUrl, "POST", taskPath(args.task_id, "/claim")));
|
|
2256
|
+
}
|
|
2257
|
+
function handleReadDecisionPackage(getToken, baseUrl, args) {
|
|
2258
|
+
return runTool(
|
|
2259
|
+
() => apiJson(getToken, baseUrl, "GET", taskPath(args.task_id, "/package"), {
|
|
2260
|
+
params: { cursor: args.cursor, limit: args.limit }
|
|
2261
|
+
})
|
|
2262
|
+
);
|
|
2263
|
+
}
|
|
2264
|
+
function handleHeartbeatDecisionTask(getToken, baseUrl, args) {
|
|
2265
|
+
return runTool(
|
|
2266
|
+
() => apiJson(getToken, baseUrl, "POST", taskPath(args.task_id, "/heartbeat"), {
|
|
2267
|
+
body: { execution_epoch: args.execution_epoch }
|
|
2268
|
+
})
|
|
2269
|
+
);
|
|
2270
|
+
}
|
|
2271
|
+
function handleSubmitDecisionTask(getToken, baseUrl, args) {
|
|
2272
|
+
return runTool(
|
|
2273
|
+
() => apiJson(getToken, baseUrl, "POST", taskPath(args.task_id, "/submit"), {
|
|
2274
|
+
body: {
|
|
2275
|
+
execution_epoch: args.execution_epoch,
|
|
2276
|
+
outcome: args.outcome,
|
|
2277
|
+
evidence: args.evidence,
|
|
2278
|
+
rationale: args.rationale,
|
|
2279
|
+
...args.confidence === void 0 ? {} : { confidence: args.confidence },
|
|
2280
|
+
...args.service_version === void 0 ? {} : { service_version: args.service_version }
|
|
2281
|
+
}
|
|
2282
|
+
})
|
|
2283
|
+
);
|
|
2284
|
+
}
|
|
2285
|
+
function handleReleaseDecisionTask(getToken, baseUrl, args) {
|
|
2286
|
+
return runTool(
|
|
2287
|
+
() => apiJson(getToken, baseUrl, "POST", taskPath(args.task_id, "/release"), {
|
|
2288
|
+
body: { execution_epoch: args.execution_epoch }
|
|
2289
|
+
})
|
|
2290
|
+
);
|
|
2291
|
+
}
|
|
2292
|
+
function handleFailDecisionTask(getToken, baseUrl, args) {
|
|
2293
|
+
return runTool(
|
|
2294
|
+
() => apiJson(getToken, baseUrl, "POST", taskPath(args.task_id, "/fail"), {
|
|
2295
|
+
body: { execution_epoch: args.execution_epoch, reason: args.reason }
|
|
2296
|
+
})
|
|
2297
|
+
);
|
|
2298
|
+
}
|
|
2299
|
+
var READ_ONLY3 = {
|
|
2300
|
+
readOnlyHint: true,
|
|
2301
|
+
destructiveHint: false,
|
|
2302
|
+
openWorldHint: false
|
|
2303
|
+
};
|
|
2304
|
+
var MUTATING2 = {
|
|
2305
|
+
readOnlyHint: false,
|
|
2306
|
+
destructiveHint: false,
|
|
2307
|
+
openWorldHint: false
|
|
2308
|
+
};
|
|
2309
|
+
var AUTH_NOTE = "AUTH: a tlnc_ key needs a per-app 'decide' grant; an OAuth connector session needs the apps:decide scope (consented at connect) and a live workspace role of senior_member or above. A 403 (decide_grant_required, insufficient_scope, insufficient_tier) names what is missing \u2014 tell the user, do not retry.";
|
|
2310
|
+
var NOT_INVOCABLE_PREFIX = "NOT INVOCABLE IN THIS SESSION: the connector's OAuth token lacks the apps:decide scope. Ask the user to reconnect the Talonic connector and approve 'Claim and decide tasks' before calling this; a call now returns 403 insufficient_scope.\n\n";
|
|
2311
|
+
var DESCRIPTIONS2 = {
|
|
2312
|
+
list: [
|
|
2313
|
+
"List one External-mode app's decision tasks (runs parked for an outside agent to decide), newest first.",
|
|
2314
|
+
"",
|
|
2315
|
+
"USE WHEN: looking for decisions to make for an app; begin with status 'available'. This is the polling alternative to the app.decision_task.offered webhook.",
|
|
2316
|
+
"NOT FOR: Agent-stage document tasks (use talonic_list_agent_tasks), reading a task's input package (claim it, then talonic_read_decision_package), or taking a lease (talonic_claim_decision_task).",
|
|
2317
|
+
"ARGS: app_id, optional status, limit, cursor. RETURNS: task metadata only (id, run_id, status, execution_epoch, lease and sla_deadline_at timing) plus pagination.next_cursor.",
|
|
2318
|
+
AUTH_NOTE
|
|
2319
|
+
].join("\n"),
|
|
2320
|
+
claim: [
|
|
2321
|
+
"Claim an available decision task (or reclaim one whose lease expired) and receive the decision bundle: task metadata with the new execution_epoch, output_contract, precedents, and a package descriptor { package_kind, record_count, page_size, first_cursor, documents }.",
|
|
2322
|
+
"",
|
|
2323
|
+
"USE WHEN: ready to decide a listed task. There is no separate get: claiming IS the payload fetch. Save execution_epoch and lease_expires_at; then read the records with talonic_read_decision_package starting at first_cursor (null means the package has no records).",
|
|
2324
|
+
"NOT FOR: extending a live lease (talonic_heartbeat_decision_task) or returning a decision (talonic_submit_decision_task). A conflicting live claim returns HTTP 409.",
|
|
2325
|
+
AUTH_NOTE
|
|
2326
|
+
].join("\n"),
|
|
2327
|
+
package: [
|
|
2328
|
+
"Read one page of a claimed decision task's frozen input package: the records the decision must be made from, with their provenance locators. Only the current claimant may read it; each page read is journaled onto the run.",
|
|
2329
|
+
"",
|
|
2330
|
+
"USE WHEN: after a successful claim, walking pages from package.first_cursor while pagination.has_more is true. The first page also carries the source documents list. A mining_round package is one record { system_prompt, first_turn, tools }.",
|
|
2331
|
+
"NOT FOR: unclaimed tasks (HTTP 409; claim first) or listing tasks (talonic_list_decision_tasks).",
|
|
2332
|
+
"ARGS: task_id, optional cursor and limit (1 to 2000). Copy evidence locators verbatim from these records for the submit.",
|
|
2333
|
+
AUTH_NOTE
|
|
2334
|
+
].join("\n"),
|
|
2335
|
+
heartbeat: [
|
|
2336
|
+
"Extend the lease on a claimed decision task, never past its sla_deadline_at.",
|
|
2337
|
+
"",
|
|
2338
|
+
"USE WHEN: deciding may run past lease_expires_at; heartbeat before expiry using the epoch from claim.",
|
|
2339
|
+
"NOT FOR: acquiring a task (talonic_claim_decision_task) or finishing one (talonic_submit_decision_task / talonic_release_decision_task / talonic_fail_decision_task).",
|
|
2340
|
+
"ARGS: task_id and execution_epoch. A stale or foreign epoch returns HTTP 409: stop, discard the work, and re-list.",
|
|
2341
|
+
AUTH_NOTE
|
|
2342
|
+
].join("\n"),
|
|
2343
|
+
submit: [
|
|
2344
|
+
"Submit the decision for a claimed decision task; the platform verifies it transactionally and resumes the run.",
|
|
2345
|
+
"",
|
|
2346
|
+
"USE WHEN: the decision is final. outcome must satisfy output_contract from the claim (plain JSON Schema, or the verdict_matrix / record_set envelope), evidence lists the package locators relied on (verbatim; [] only if the app allows unevidenced decisions), rationale is a short summary. Rejections are HTTP 422 with the reason and change nothing; the task stays claimed under your epoch, so fix and resubmit before the lease ends.",
|
|
2347
|
+
"NOT FOR: giving the task back undecided (talonic_release_decision_task) or declaring it undecidable (talonic_fail_decision_task). Stale epoch is HTTP 409.",
|
|
2348
|
+
"ARGS: task_id, execution_epoch, outcome, evidence, rationale, optional confidence and service_version.",
|
|
2349
|
+
AUTH_NOTE
|
|
2350
|
+
].join("\n"),
|
|
2351
|
+
release: [
|
|
2352
|
+
"Release a claimed decision task back to 'available' without deciding it; the next claim bumps the epoch.",
|
|
2353
|
+
"",
|
|
2354
|
+
"USE WHEN: you cannot finish within the lease or SLA but another claimant could decide it.",
|
|
2355
|
+
"NOT FOR: declaring the task undecidable (talonic_fail_decision_task, which raises a review and applies the app's fallback) or keeping the lease (talonic_heartbeat_decision_task).",
|
|
2356
|
+
"ARGS: task_id and execution_epoch. Stale epoch is HTTP 409.",
|
|
2357
|
+
AUTH_NOTE
|
|
2358
|
+
].join("\n"),
|
|
2359
|
+
fail: [
|
|
2360
|
+
"Report that the claimed decision task cannot be decided: raises a Human Review with your reason AND applies the app's declared fallback policy (rules decide, hold for review, or fail the run).",
|
|
2361
|
+
"",
|
|
2362
|
+
"USE WHEN: the package is insufficient or contradictory and no claimant could decide it. This ends the task (status 'failed').",
|
|
2363
|
+
"NOT FOR: temporary give-backs (talonic_release_decision_task) or a decision you can make with low confidence (submit it with confidence set).",
|
|
2364
|
+
"ARGS: task_id, execution_epoch, reason (up to 2,000 characters). Stale epoch is HTTP 409.",
|
|
2365
|
+
AUTH_NOTE
|
|
2366
|
+
].join("\n")
|
|
2367
|
+
};
|
|
2368
|
+
function registerDecisionTaskTools(server, getToken, baseUrl, options = {}) {
|
|
2369
|
+
const invocable = options.invocable !== false;
|
|
2370
|
+
const describe = (text) => invocable ? text : NOT_INVOCABLE_PREFIX + text;
|
|
2371
|
+
const meta = invocable ? {} : { _meta: { "talonic/can_invoke": false, "talonic/required_scope": DECIDE_SCOPE } };
|
|
2372
|
+
server.registerTool(
|
|
2373
|
+
"talonic_list_decision_tasks",
|
|
2374
|
+
{
|
|
2375
|
+
title: "List Decision Tasks",
|
|
2376
|
+
description: describe(DESCRIPTIONS2.list),
|
|
2377
|
+
inputSchema: listInput2,
|
|
2378
|
+
annotations: { title: "List Decision Tasks", ...READ_ONLY3 },
|
|
2379
|
+
...meta
|
|
2380
|
+
},
|
|
2381
|
+
async (args) => handleListDecisionTasks(getToken, baseUrl, args)
|
|
2382
|
+
);
|
|
2383
|
+
server.registerTool(
|
|
2384
|
+
"talonic_claim_decision_task",
|
|
2385
|
+
{
|
|
2386
|
+
title: "Claim Decision Task",
|
|
2387
|
+
description: describe(DESCRIPTIONS2.claim),
|
|
2388
|
+
inputSchema: idInput2,
|
|
2389
|
+
annotations: { title: "Claim Decision Task", ...MUTATING2 },
|
|
2390
|
+
...meta
|
|
2391
|
+
},
|
|
2392
|
+
async (args) => handleClaimDecisionTask(getToken, baseUrl, args)
|
|
2393
|
+
);
|
|
2394
|
+
server.registerTool(
|
|
2395
|
+
"talonic_read_decision_package",
|
|
2396
|
+
{
|
|
2397
|
+
title: "Read Decision Package",
|
|
2398
|
+
description: describe(DESCRIPTIONS2.package),
|
|
2399
|
+
inputSchema: packageInput,
|
|
2400
|
+
annotations: { title: "Read Decision Package", ...READ_ONLY3 },
|
|
2401
|
+
...meta
|
|
2402
|
+
},
|
|
2403
|
+
async (args) => handleReadDecisionPackage(getToken, baseUrl, args)
|
|
2404
|
+
);
|
|
2405
|
+
server.registerTool(
|
|
2406
|
+
"talonic_heartbeat_decision_task",
|
|
2407
|
+
{
|
|
2408
|
+
title: "Heartbeat Decision Task",
|
|
2409
|
+
description: describe(DESCRIPTIONS2.heartbeat),
|
|
2410
|
+
inputSchema: epochInput,
|
|
2411
|
+
annotations: { title: "Heartbeat Decision Task", ...MUTATING2 },
|
|
2412
|
+
...meta
|
|
2413
|
+
},
|
|
2414
|
+
async (args) => handleHeartbeatDecisionTask(getToken, baseUrl, args)
|
|
2415
|
+
);
|
|
2416
|
+
server.registerTool(
|
|
2417
|
+
"talonic_submit_decision_task",
|
|
2418
|
+
{
|
|
2419
|
+
title: "Submit Decision Task",
|
|
2420
|
+
description: describe(DESCRIPTIONS2.submit),
|
|
2421
|
+
inputSchema: submitInput2,
|
|
2422
|
+
annotations: { title: "Submit Decision Task", ...MUTATING2 },
|
|
2423
|
+
...meta
|
|
2424
|
+
},
|
|
2425
|
+
async (args) => handleSubmitDecisionTask(getToken, baseUrl, args)
|
|
2426
|
+
);
|
|
2427
|
+
server.registerTool(
|
|
2428
|
+
"talonic_release_decision_task",
|
|
2429
|
+
{
|
|
2430
|
+
title: "Release Decision Task",
|
|
2431
|
+
description: describe(DESCRIPTIONS2.release),
|
|
2432
|
+
inputSchema: epochInput,
|
|
2433
|
+
annotations: { title: "Release Decision Task", ...MUTATING2 },
|
|
2434
|
+
...meta
|
|
2435
|
+
},
|
|
2436
|
+
async (args) => handleReleaseDecisionTask(getToken, baseUrl, args)
|
|
2437
|
+
);
|
|
2438
|
+
server.registerTool(
|
|
2439
|
+
"talonic_fail_decision_task",
|
|
2440
|
+
{
|
|
2441
|
+
title: "Fail Decision Task",
|
|
2442
|
+
description: describe(DESCRIPTIONS2.fail),
|
|
2443
|
+
inputSchema: failInput,
|
|
2444
|
+
annotations: { title: "Fail Decision Task", ...MUTATING2 },
|
|
2445
|
+
...meta
|
|
2446
|
+
},
|
|
2447
|
+
async (args) => handleFailDecisionTask(getToken, baseUrl, args)
|
|
2448
|
+
);
|
|
2449
|
+
}
|
|
2150
2450
|
var DESCRIPTION11 = [
|
|
2151
2451
|
"Get the OCR-converted markdown text of a document.",
|
|
2152
2452
|
"",
|
|
@@ -2251,10 +2551,348 @@ function registerToMarkdown(server, getTalonic) {
|
|
|
2251
2551
|
async (args) => handleToMarkdown(getTalonic(), args)
|
|
2252
2552
|
);
|
|
2253
2553
|
}
|
|
2554
|
+
var MATURITIES = ["core", "proven", "candidate"];
|
|
2555
|
+
var maturityArg = z.enum(MATURITIES).optional().describe(
|
|
2556
|
+
"Filter by maturity: `core` (universal, fully trusted \u2014 safe to build on), `proven` (recurring, stable id), `candidate` (newly discovered, may still be merged or renamed)."
|
|
2557
|
+
);
|
|
2558
|
+
var fieldIdArg = z.string().uuid().optional().describe("Field UUID (from talonic_list_fields / talonic_search).");
|
|
2559
|
+
var fieldNameArg = z.string().min(1).optional().describe(
|
|
2560
|
+
"Field NAME instead of an id \u2014 resolved through canonical name, synonyms, merge aliases and the registry's spelling fold, then followed to the live concept. Use the user's wording ('Invoice No', 'Vertragsnummer')."
|
|
2561
|
+
);
|
|
2562
|
+
async function resolveFieldId(getToken, baseUrl, args) {
|
|
2563
|
+
if (args.field_id) return { id: args.field_id };
|
|
2564
|
+
const resolved = await apiJson(getToken, baseUrl, "GET", "/v1/fields/resolve", {
|
|
2565
|
+
params: { name: args.name, follow_redirects: true }
|
|
2566
|
+
});
|
|
2567
|
+
return {
|
|
2568
|
+
id: resolved.field.id,
|
|
2569
|
+
resolution: { matched_by: resolved.matched_by, redirected_from: resolved.redirected_from }
|
|
2570
|
+
};
|
|
2571
|
+
}
|
|
2572
|
+
var LIST_DESCRIPTION = [
|
|
2573
|
+
"List the workspace's Field Registry \u2014 the canonical concepts Talonic has discovered across every ingested document, each with a stable id, maturity level, data type, synonyms and occurrence count.",
|
|
2574
|
+
"",
|
|
2575
|
+
"USE WHEN: you need to know WHAT data exists before querying it, want to pick the right concept for a question, or need the exact field id for talonic_get_field / talonic_field_values.",
|
|
2576
|
+
"NOT FOR: locating a specific document (talonic_search) or filtering documents by a value (talonic_filter).",
|
|
2577
|
+
"",
|
|
2578
|
+
"ARGS: `search` (case-insensitive contains on name), `maturity` (core | proven | candidate \u2014 prefer `core`/`proven` for anything you will build on), `include_superseded` (default false: rows merged into another concept are hidden so you never see two ids for one concept), `limit`, `cursor`.",
|
|
2579
|
+
"RETURNS: data[] of { id, canonical_name, display_name, data_type, maturity, tier, synonyms, description, occurrence_count, superseded_by, links } plus cursor pagination."
|
|
2580
|
+
].join("\n");
|
|
2581
|
+
var listFieldsInputSchema = {
|
|
2582
|
+
search: z.string().optional().describe("Case-insensitive contains match on canonical_name / display_name."),
|
|
2583
|
+
maturity: maturityArg,
|
|
2584
|
+
include_superseded: z.boolean().optional().describe("Include rows merged into a survivor (they carry `superseded_by`). Default false."),
|
|
2585
|
+
limit: z.number().int().min(1).max(100).optional().describe("Page size (default 20, max 100)."),
|
|
2586
|
+
cursor: z.string().optional().describe("Opaque cursor from pagination.next_cursor.")
|
|
2587
|
+
};
|
|
2588
|
+
async function handleListFields(getToken, baseUrl, args) {
|
|
2589
|
+
return runTool(
|
|
2590
|
+
() => apiJson(getToken, baseUrl, "GET", "/v1/fields", {
|
|
2591
|
+
params: {
|
|
2592
|
+
search: args.search,
|
|
2593
|
+
maturity: args.maturity,
|
|
2594
|
+
include_superseded: args.include_superseded,
|
|
2595
|
+
limit: args.limit,
|
|
2596
|
+
cursor: args.cursor
|
|
2597
|
+
}
|
|
2598
|
+
})
|
|
2599
|
+
);
|
|
2600
|
+
}
|
|
2601
|
+
var GET_DESCRIPTION = [
|
|
2602
|
+
"Get the CONCEPT CARD for one Field Registry field: what it means (curated description + extraction instruction), its synonyms and aliases, maturity, where it occurs (document/occurrence counts, first/last seen, document-type spread), its value distribution (top values with counts, distinct count, examples), schema usage, and identity links (superseded_by, absorbed concepts).",
|
|
2603
|
+
"",
|
|
2604
|
+
"USE WHEN: you must decide whether a field is the right concept for a question, need example values or the value shape before writing a filter, or hold a field NAME from the user and need the live concept behind it.",
|
|
2605
|
+
"NOT FOR: listing many fields (talonic_list_fields) or reading every value (talonic_field_values).",
|
|
2606
|
+
"",
|
|
2607
|
+
"ARGS: exactly one of `field_id` or `name`. Names are resolved through canonical name \u2192 spelling fold \u2192 merge aliases \u2192 synonyms (then case-insensitive fallbacks) and followed to the live concept; the response says which arm matched. `include_history: true` appends the curation trail (merges, renames, maturity moves).",
|
|
2608
|
+
"RETURNS: the card { id, canonical_name, maturity, data_type, definition, identity, occurrence, values, usage, links } plus `resolution` when a name was given and `history` when requested."
|
|
2609
|
+
].join("\n");
|
|
2610
|
+
var getFieldInputSchema = {
|
|
2611
|
+
field_id: fieldIdArg,
|
|
2612
|
+
name: fieldNameArg,
|
|
2613
|
+
include_history: z.boolean().optional().describe(
|
|
2614
|
+
"Append the concept's curation history (tier changes, merges, renames), newest first."
|
|
2615
|
+
)
|
|
2616
|
+
};
|
|
2617
|
+
async function handleGetField(getToken, baseUrl, args) {
|
|
2618
|
+
if (!args.field_id && !args.name) return validationError("Provide `field_id` or `name`.");
|
|
2619
|
+
if (args.field_id && args.name)
|
|
2620
|
+
return validationError("Provide either `field_id` or `name`, not both.");
|
|
2621
|
+
return runTool(async () => {
|
|
2622
|
+
const { id, resolution } = await resolveFieldId(getToken, baseUrl, args);
|
|
2623
|
+
const card = await apiJson(
|
|
2624
|
+
getToken,
|
|
2625
|
+
baseUrl,
|
|
2626
|
+
"GET",
|
|
2627
|
+
`/v1/fields/${id}/card`,
|
|
2628
|
+
{
|
|
2629
|
+
params: { follow_redirects: true }
|
|
2630
|
+
}
|
|
2631
|
+
);
|
|
2632
|
+
const out = { ...card };
|
|
2633
|
+
if (resolution) out["resolution"] = resolution;
|
|
2634
|
+
if (args.include_history) {
|
|
2635
|
+
out["history"] = await apiJson(getToken, baseUrl, "GET", `/v1/fields/${id}/history`, {
|
|
2636
|
+
params: { limit: 50 }
|
|
2637
|
+
});
|
|
2638
|
+
}
|
|
2639
|
+
return out;
|
|
2640
|
+
});
|
|
2641
|
+
}
|
|
2642
|
+
var VALUES_DESCRIPTION = [
|
|
2643
|
+
"Read a field's CURRENT VALUES across documents, with provenance \u2014 one row per bound occurrence: document id + filename + type, the value, confidence, the raw name it was captured under, the verbatim source text, and the resolution band that bound it.",
|
|
2644
|
+
"",
|
|
2645
|
+
"USE WHEN: the user asks 'what are all the X across my documents', you need to tabulate or aggregate one concept across the corpus, or you want the evidence (source text + document) behind a value.",
|
|
2646
|
+
"NOT FOR: multi-field row-shaped queries over documents (talonic_filter) or one document's full field set (talonic_get_document).",
|
|
2647
|
+
"",
|
|
2648
|
+
"ARGS: exactly one of `field_id` or `name`; optional `document_id` (one document), `value` (case-insensitive contains filter), `limit` (max 100), `cursor`.",
|
|
2649
|
+
"RETURNS: { field_id, canonical_name, concept_ids, data[] of { occurrence_id, document_id, document_filename, value, confidence, provenance{ raw_field_name, source_text, resolved_by, needs_confirmation, via_redirect }, links }, pagination }. Rows are Sources-IAM filtered for the caller."
|
|
2650
|
+
].join("\n");
|
|
2651
|
+
var fieldValuesInputSchema = {
|
|
2652
|
+
field_id: fieldIdArg,
|
|
2653
|
+
name: fieldNameArg,
|
|
2654
|
+
document_id: z.string().uuid().optional().describe("Only occurrences on this document."),
|
|
2655
|
+
value: z.string().optional().describe("Case-insensitive contains filter on the value text."),
|
|
2656
|
+
limit: z.number().int().min(1).max(100).optional().describe("Page size (default 20, max 100)."),
|
|
2657
|
+
cursor: z.string().optional().describe("Opaque cursor from pagination.next_cursor.")
|
|
2658
|
+
};
|
|
2659
|
+
async function handleFieldValues(getToken, baseUrl, args) {
|
|
2660
|
+
if (!args.field_id && !args.name) return validationError("Provide `field_id` or `name`.");
|
|
2661
|
+
if (args.field_id && args.name)
|
|
2662
|
+
return validationError("Provide either `field_id` or `name`, not both.");
|
|
2663
|
+
return runTool(async () => {
|
|
2664
|
+
const { id, resolution } = await resolveFieldId(getToken, baseUrl, args);
|
|
2665
|
+
const params = {
|
|
2666
|
+
document_id: args.document_id,
|
|
2667
|
+
value: args.value,
|
|
2668
|
+
limit: args.limit,
|
|
2669
|
+
cursor: args.cursor
|
|
2670
|
+
};
|
|
2671
|
+
const page = await apiJson(
|
|
2672
|
+
getToken,
|
|
2673
|
+
baseUrl,
|
|
2674
|
+
"GET",
|
|
2675
|
+
`/v1/fields/${id}/values`,
|
|
2676
|
+
{ params }
|
|
2677
|
+
);
|
|
2678
|
+
return resolution ? { ...page, resolution } : page;
|
|
2679
|
+
});
|
|
2680
|
+
}
|
|
2681
|
+
function registerFieldTools(server, getToken, baseUrl) {
|
|
2682
|
+
server.registerTool(
|
|
2683
|
+
"talonic_list_fields",
|
|
2684
|
+
{
|
|
2685
|
+
title: "List registry fields",
|
|
2686
|
+
description: LIST_DESCRIPTION,
|
|
2687
|
+
inputSchema: listFieldsInputSchema,
|
|
2688
|
+
annotations: {
|
|
2689
|
+
readOnlyHint: true,
|
|
2690
|
+
destructiveHint: false,
|
|
2691
|
+
idempotentHint: true,
|
|
2692
|
+
openWorldHint: false
|
|
2693
|
+
}
|
|
2694
|
+
},
|
|
2695
|
+
async (args) => handleListFields(getToken, baseUrl, args)
|
|
2696
|
+
);
|
|
2697
|
+
server.registerTool(
|
|
2698
|
+
"talonic_get_field",
|
|
2699
|
+
{
|
|
2700
|
+
title: "Get a field's concept card",
|
|
2701
|
+
description: GET_DESCRIPTION,
|
|
2702
|
+
inputSchema: getFieldInputSchema,
|
|
2703
|
+
annotations: {
|
|
2704
|
+
readOnlyHint: true,
|
|
2705
|
+
destructiveHint: false,
|
|
2706
|
+
idempotentHint: true,
|
|
2707
|
+
openWorldHint: false
|
|
2708
|
+
}
|
|
2709
|
+
},
|
|
2710
|
+
async (args) => handleGetField(getToken, baseUrl, args)
|
|
2711
|
+
);
|
|
2712
|
+
server.registerTool(
|
|
2713
|
+
"talonic_field_values",
|
|
2714
|
+
{
|
|
2715
|
+
title: "Read a field's values across documents",
|
|
2716
|
+
description: VALUES_DESCRIPTION,
|
|
2717
|
+
inputSchema: fieldValuesInputSchema,
|
|
2718
|
+
annotations: {
|
|
2719
|
+
readOnlyHint: true,
|
|
2720
|
+
destructiveHint: false,
|
|
2721
|
+
idempotentHint: true,
|
|
2722
|
+
openWorldHint: false
|
|
2723
|
+
}
|
|
2724
|
+
},
|
|
2725
|
+
async (args) => handleFieldValues(getToken, baseUrl, args)
|
|
2726
|
+
);
|
|
2727
|
+
}
|
|
2728
|
+
function unwrap(res) {
|
|
2729
|
+
let result = res.content;
|
|
2730
|
+
if (typeof res.content === "string") {
|
|
2731
|
+
try {
|
|
2732
|
+
result = JSON.parse(res.content);
|
|
2733
|
+
} catch {
|
|
2734
|
+
result = res.content;
|
|
2735
|
+
}
|
|
2736
|
+
}
|
|
2737
|
+
const out = { tool: res.tool, result };
|
|
2738
|
+
if (res.citations?.length) out["citations"] = res.citations;
|
|
2739
|
+
if (res.artifacts?.length) out["artifacts"] = res.artifacts;
|
|
2740
|
+
if (res.cards?.length) out["cards"] = res.cards;
|
|
2741
|
+
return out;
|
|
2742
|
+
}
|
|
2743
|
+
var documentIdsArg = z.array(z.string().uuid()).max(1e3).optional().describe("Restrict to these document ids (hard filter, enforced server-side).");
|
|
2744
|
+
var FIND_DESCRIPTION = [
|
|
2745
|
+
"Locate the REAL data behind a natural-language concept before querying anything: semantic + lexical retrieval that resolves a phrase ('payment volume per transaction', 'counterparty', 'Vertragslaufzeit') to the registry fields, values, documents and text passages that carry it \u2014 even when the field is captured under a different name.",
|
|
2746
|
+
"",
|
|
2747
|
+
"USE WHEN: the user asks about a concept and you are not sure which field holds it, when talonic_list_fields / talonic_search came back empty or ambiguous, or when the answer may live in document prose rather than a captured cell.",
|
|
2748
|
+
"NOT FOR: reading a known field's values (talonic_field_values) or filtering by a known field (talonic_filter).",
|
|
2749
|
+
"",
|
|
2750
|
+
"ARGS: `query` (the concept, in the user's words), optional `top_k` (1\u201325, default 10), `document_ids` (hard scope).",
|
|
2751
|
+
"RETURNS: ranked planes \u2014 FIELDS (canonical_name, field ids/keys, maturity/tier, occurrence_count, sample values with their documents), VALUES, DOCUMENTS and PASSAGES \u2014 every item a ready handle for the next call. Read-only, no LLM cost."
|
|
2752
|
+
].join("\n");
|
|
2753
|
+
var findDataInputSchema = {
|
|
2754
|
+
query: z.string().min(1).describe("The natural-language concept to locate."),
|
|
2755
|
+
top_k: z.number().int().min(1).max(25).optional().describe("Max results per plane (default 10)."),
|
|
2756
|
+
document_ids: documentIdsArg
|
|
2757
|
+
};
|
|
2758
|
+
async function handleFindData(getToken, baseUrl, args) {
|
|
2759
|
+
return runTool(async () => {
|
|
2760
|
+
const res = await apiJson(
|
|
2761
|
+
getToken,
|
|
2762
|
+
baseUrl,
|
|
2763
|
+
"POST",
|
|
2764
|
+
"/v1/agent/tools/find_data/invoke",
|
|
2765
|
+
{
|
|
2766
|
+
body: {
|
|
2767
|
+
args: {
|
|
2768
|
+
query: args.query,
|
|
2769
|
+
...args.top_k !== void 0 ? { top_k: args.top_k } : {},
|
|
2770
|
+
...args.document_ids?.length ? { document_scope: args.document_ids } : {}
|
|
2771
|
+
}
|
|
2772
|
+
}
|
|
2773
|
+
}
|
|
2774
|
+
);
|
|
2775
|
+
return unwrap(res);
|
|
2776
|
+
});
|
|
2777
|
+
}
|
|
2778
|
+
var LIST_TOOLS_DESCRIPTION = [
|
|
2779
|
+
"List the platform's agent tool registry \u2014 every retrieval, provenance and analysis primitive the in-product Talonic agent runs on (find_data, describe_data, query_data for read-only SQL over the extracted data, get_document_markdown, workspace_overview, \u2026) with its input schema and whether THIS credential may invoke it.",
|
|
2780
|
+
"",
|
|
2781
|
+
"USE WHEN: you want a capability talonic_* tools do not cover directly (e.g. SQL over the structured data, a workspace overview, cohort discovery) \u2014 list here, then call talonic_invoke_agent_tool with the tool name and its args.",
|
|
2782
|
+
"NOT FOR: discovering fields (talonic_list_fields / talonic_find_data) or documents (talonic_search) \u2014 those are shaped for you.",
|
|
2783
|
+
"",
|
|
2784
|
+
"ARGS: `only_invocable` (default true \u2014 hide tools this key cannot run), `include_schemas` (default true \u2014 include each tool's JSON input schema).",
|
|
2785
|
+
"RETURNS: { tools[] of { name, description, impact, capability, can_invoke, input_schema? }, invocable_count, totalCount }."
|
|
2786
|
+
].join("\n");
|
|
2787
|
+
var listAgentToolsInputSchema = {
|
|
2788
|
+
only_invocable: z.boolean().optional().describe("Hide tools this credential cannot invoke. Default true."),
|
|
2789
|
+
include_schemas: z.boolean().optional().describe("Include each tool's JSON input schema. Default true.")
|
|
2790
|
+
};
|
|
2791
|
+
async function handleListAgentTools(getToken, baseUrl, args) {
|
|
2792
|
+
return runTool(async () => {
|
|
2793
|
+
const res = await apiJson(getToken, baseUrl, "GET", "/v1/agent/tools");
|
|
2794
|
+
const onlyInvocable = args.only_invocable ?? true;
|
|
2795
|
+
const includeSchemas = args.include_schemas ?? true;
|
|
2796
|
+
const tools = (res.tools ?? []).filter((t) => !onlyInvocable || t.can_invoke).map((t) => {
|
|
2797
|
+
const item = {
|
|
2798
|
+
name: t.name,
|
|
2799
|
+
description: t.description,
|
|
2800
|
+
impact: t.impact,
|
|
2801
|
+
capability: t.capability,
|
|
2802
|
+
can_invoke: t.can_invoke
|
|
2803
|
+
};
|
|
2804
|
+
if (includeSchemas) item["input_schema"] = t.input_schema;
|
|
2805
|
+
return item;
|
|
2806
|
+
});
|
|
2807
|
+
return {
|
|
2808
|
+
tools,
|
|
2809
|
+
invocable_count: res.invocable_count ?? tools.length,
|
|
2810
|
+
totalCount: res.totalCount ?? res.tools?.length ?? 0
|
|
2811
|
+
};
|
|
2812
|
+
});
|
|
2813
|
+
}
|
|
2814
|
+
var INVOKE_DESCRIPTION = [
|
|
2815
|
+
"Invoke ONE named tool from the platform's agent tool registry directly, with no model in the loop \u2014 you choose the arguments. This is how an external agent uses Talonic's retrieval and provenance while driving control flow itself (e.g. `query_data` for a read-only SQL SELECT over the extracted data, `describe_data` for the queryable field list, `get_document_markdown` to read a document's text).",
|
|
2816
|
+
"",
|
|
2817
|
+
"USE WHEN: talonic_list_agent_tools showed a tool with can_invoke: true that does what you need. Pass exactly the `args` its input_schema declares.",
|
|
2818
|
+
"NOT FOR: anything a dedicated talonic_* tool already does (prefer those \u2014 they are shaped for you).",
|
|
2819
|
+
"",
|
|
2820
|
+
"ARGS: `name` (tool name), `args` (object matching the tool's input_schema), optional `document_ids` (hard scope for scope-aware tools).",
|
|
2821
|
+
"RETURNS: { tool, result (the tool's parsed output), citations?, artifacts?, cards? }. Denied capabilities come back as an error naming the capability required; the platform re-checks every call."
|
|
2822
|
+
].join("\n");
|
|
2823
|
+
var invokeAgentToolInputSchema = {
|
|
2824
|
+
name: z.string().min(1).describe("Tool name from talonic_list_agent_tools, e.g. `query_data`."),
|
|
2825
|
+
args: z.record(z.string(), z.unknown()).optional().describe("Arguments matching the tool's input_schema."),
|
|
2826
|
+
document_ids: documentIdsArg
|
|
2827
|
+
};
|
|
2828
|
+
async function handleInvokeAgentTool(getToken, baseUrl, args) {
|
|
2829
|
+
return runTool(async () => {
|
|
2830
|
+
const res = await apiJson(
|
|
2831
|
+
getToken,
|
|
2832
|
+
baseUrl,
|
|
2833
|
+
"POST",
|
|
2834
|
+
`/v1/agent/tools/${encodeURIComponent(args.name)}/invoke`,
|
|
2835
|
+
{
|
|
2836
|
+
body: {
|
|
2837
|
+
args: args.args ?? {},
|
|
2838
|
+
...args.document_ids?.length ? { scope: { document_ids: args.document_ids } } : {}
|
|
2839
|
+
}
|
|
2840
|
+
}
|
|
2841
|
+
);
|
|
2842
|
+
return unwrap(res);
|
|
2843
|
+
});
|
|
2844
|
+
}
|
|
2845
|
+
function registerAgentRegistryTools(server, getToken, baseUrl) {
|
|
2846
|
+
server.registerTool(
|
|
2847
|
+
"talonic_find_data",
|
|
2848
|
+
{
|
|
2849
|
+
title: "Find the data behind a concept",
|
|
2850
|
+
description: FIND_DESCRIPTION,
|
|
2851
|
+
inputSchema: findDataInputSchema,
|
|
2852
|
+
annotations: {
|
|
2853
|
+
readOnlyHint: true,
|
|
2854
|
+
destructiveHint: false,
|
|
2855
|
+
idempotentHint: true,
|
|
2856
|
+
openWorldHint: false
|
|
2857
|
+
}
|
|
2858
|
+
},
|
|
2859
|
+
async (args) => handleFindData(getToken, baseUrl, args)
|
|
2860
|
+
);
|
|
2861
|
+
server.registerTool(
|
|
2862
|
+
"talonic_list_agent_tools",
|
|
2863
|
+
{
|
|
2864
|
+
title: "List the platform agent tools",
|
|
2865
|
+
description: LIST_TOOLS_DESCRIPTION,
|
|
2866
|
+
inputSchema: listAgentToolsInputSchema,
|
|
2867
|
+
annotations: {
|
|
2868
|
+
readOnlyHint: true,
|
|
2869
|
+
destructiveHint: false,
|
|
2870
|
+
idempotentHint: true,
|
|
2871
|
+
openWorldHint: false
|
|
2872
|
+
}
|
|
2873
|
+
},
|
|
2874
|
+
async (args) => handleListAgentTools(getToken, baseUrl, args)
|
|
2875
|
+
);
|
|
2876
|
+
server.registerTool(
|
|
2877
|
+
"talonic_invoke_agent_tool",
|
|
2878
|
+
{
|
|
2879
|
+
title: "Invoke a platform agent tool",
|
|
2880
|
+
description: INVOKE_DESCRIPTION,
|
|
2881
|
+
inputSchema: invokeAgentToolInputSchema,
|
|
2882
|
+
annotations: {
|
|
2883
|
+
readOnlyHint: true,
|
|
2884
|
+
destructiveHint: false,
|
|
2885
|
+
idempotentHint: false,
|
|
2886
|
+
openWorldHint: false
|
|
2887
|
+
}
|
|
2888
|
+
},
|
|
2889
|
+
async (args) => handleInvokeAgentTool(getToken, baseUrl, args)
|
|
2890
|
+
);
|
|
2891
|
+
}
|
|
2254
2892
|
|
|
2255
2893
|
// package.json
|
|
2256
2894
|
var package_default = {
|
|
2257
|
-
version: "0.1.
|
|
2895
|
+
version: "0.1.77"};
|
|
2258
2896
|
|
|
2259
2897
|
// src/version.ts
|
|
2260
2898
|
var VERSION = package_default.version;
|
|
@@ -2346,9 +2984,24 @@ function createServer(options) {
|
|
|
2346
2984
|
"with that id \u2014 do not ask the user for an id.",
|
|
2347
2985
|
"talonic_search matches LITERAL keywords: query with one short singular term or an",
|
|
2348
2986
|
"exact filename, never a sentence; on an empty result retry with a shorter keyword.",
|
|
2987
|
+
"The Field Registry is the source of truth for WHAT data exists: talonic_find_data",
|
|
2988
|
+
"resolves a concept in the user's words to the fields/documents that carry it,",
|
|
2989
|
+
"talonic_list_fields / talonic_get_field describe concepts (prefer maturity core or",
|
|
2990
|
+
"proven for anything you build on), talonic_field_values reads one concept across all",
|
|
2991
|
+
"documents with provenance. Anything else the in-product agent can do is reachable via",
|
|
2992
|
+
"talonic_list_agent_tools + talonic_invoke_agent_tool (e.g. query_data for SQL).",
|
|
2349
2993
|
"For Agent-stage work, follow list -> get -> claim -> heartbeat while needed ->",
|
|
2350
2994
|
"submit. Preserve the execution_epoch from claim and return only fields declared",
|
|
2351
2995
|
"in the task output_contract; never continue after a lease or epoch conflict.",
|
|
2996
|
+
"For External-mode app decisions, follow talonic_list_decision_tasks (by app_id) ->",
|
|
2997
|
+
"talonic_claim_decision_task (the claim IS the payload: output_contract, precedents,",
|
|
2998
|
+
"package descriptor) -> talonic_read_decision_package pages from package.first_cursor ->",
|
|
2999
|
+
"talonic_heartbeat_decision_task while needed -> talonic_submit_decision_task with the",
|
|
3000
|
+
"outcome, verbatim evidence locators and a short rationale, or release / fail it. A",
|
|
3001
|
+
"tlnc_ key needs a per-app decide grant; an OAuth connector session needs the",
|
|
3002
|
+
"apps:decide scope and a senior_member role or above. If a decision tool is marked NOT",
|
|
3003
|
+
"INVOCABLE IN THIS SESSION, or a call returns 403, tell the user what consent or role",
|
|
3004
|
+
"is missing instead of retrying.",
|
|
2352
3005
|
"Prefer acting over explaining."
|
|
2353
3006
|
].join(" ")
|
|
2354
3007
|
}
|
|
@@ -2372,7 +3025,12 @@ function createServer(options) {
|
|
|
2372
3025
|
registerGetPricing(server, getTalonic);
|
|
2373
3026
|
registerGetUsage(server, getTalonic);
|
|
2374
3027
|
registerRequestUpload(server, getToken, baseUrl);
|
|
3028
|
+
registerFieldTools(server, getToken, baseUrl);
|
|
3029
|
+
registerAgentRegistryTools(server, getToken, baseUrl);
|
|
2375
3030
|
registerAgentTaskTools(server, getToken, baseUrl);
|
|
3031
|
+
registerDecisionTaskTools(server, getToken, baseUrl, {
|
|
3032
|
+
invocable: options.decisionTasksInvocable !== false
|
|
3033
|
+
});
|
|
2376
3034
|
if (options.includeGrowthTools) {
|
|
2377
3035
|
registerGrowthTools(server, getToken, baseUrl);
|
|
2378
3036
|
}
|