iit-mcp-autotask 0.54.2
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/.env.example +123 -0
- package/LICENSE +21 -0
- package/README.md +788 -0
- package/capabilities.json +487 -0
- package/dist/access/gate.d.ts +34 -0
- package/dist/access/gate.js +76 -0
- package/dist/access/grants.d.ts +20 -0
- package/dist/access/grants.js +35 -0
- package/dist/access/write-env.d.ts +41 -0
- package/dist/access/write-env.js +166 -0
- package/dist/auth.d.ts +74 -0
- package/dist/auth.js +129 -0
- package/dist/base-hosts.d.ts +38 -0
- package/dist/base-hosts.js +70 -0
- package/dist/config/load.d.ts +28 -0
- package/dist/config/load.js +105 -0
- package/dist/config/schema.d.ts +166 -0
- package/dist/config/schema.js +311 -0
- package/dist/credential.d.ts +28 -0
- package/dist/credential.js +32 -0
- package/dist/doctor.d.ts +112 -0
- package/dist/doctor.js +154 -0
- package/dist/http-guard.d.ts +57 -0
- package/dist/http-guard.js +134 -0
- package/dist/http.d.ts +50 -0
- package/dist/http.js +290 -0
- package/dist/lifecycle.d.ts +29 -0
- package/dist/lifecycle.js +52 -0
- package/dist/logger.d.ts +26 -0
- package/dist/logger.js +28 -0
- package/dist/main.d.ts +12 -0
- package/dist/main.js +283 -0
- package/dist/policy.d.ts +54 -0
- package/dist/policy.js +80 -0
- package/dist/tools/aggregate.d.ts +16 -0
- package/dist/tools/aggregate.js +64 -0
- package/dist/tools/capabilities-manifest.d.ts +4 -0
- package/dist/tools/capabilities-manifest.js +94 -0
- package/dist/tools/catalog-data.d.ts +116 -0
- package/dist/tools/catalog-data.js +207 -0
- package/dist/tools/clock.d.ts +17 -0
- package/dist/tools/clock.js +43 -0
- package/dist/tools/composites.d.ts +36 -0
- package/dist/tools/composites.js +305 -0
- package/dist/tools/context/client.d.ts +41 -0
- package/dist/tools/context/client.js +139 -0
- package/dist/tools/context/derive.d.ts +9 -0
- package/dist/tools/context/derive.js +32 -0
- package/dist/tools/context/scope.d.ts +24 -0
- package/dist/tools/context/scope.js +180 -0
- package/dist/tools/context/types.d.ts +141 -0
- package/dist/tools/context/types.js +2 -0
- package/dist/tools/dispatch.d.ts +78 -0
- package/dist/tools/dispatch.js +272 -0
- package/dist/tools/field-pointer.d.ts +25 -0
- package/dist/tools/field-pointer.js +45 -0
- package/dist/tools/guide.d.ts +30 -0
- package/dist/tools/guide.js +97 -0
- package/dist/tools/lists.d.ts +9 -0
- package/dist/tools/lists.js +205 -0
- package/dist/tools/meta.d.ts +22 -0
- package/dist/tools/meta.js +709 -0
- package/dist/tools/output-file.d.ts +26 -0
- package/dist/tools/output-file.js +140 -0
- package/dist/tools/rank.d.ts +21 -0
- package/dist/tools/rank.js +57 -0
- package/dist/tools/reasons.d.ts +33 -0
- package/dist/tools/reasons.js +121 -0
- package/dist/tools/register.d.ts +23 -0
- package/dist/tools/register.js +50 -0
- package/dist/tools/resolves.d.ts +28 -0
- package/dist/tools/resolves.js +399 -0
- package/dist/tools/results/envelope.d.ts +55 -0
- package/dist/tools/results/envelope.js +63 -0
- package/dist/tools/results/errors.d.ts +147 -0
- package/dist/tools/results/errors.js +384 -0
- package/dist/tools/results/untrusted.d.ts +129 -0
- package/dist/tools/results/untrusted.js +218 -0
- package/dist/tools/revenue-rollup.d.ts +8 -0
- package/dist/tools/revenue-rollup.js +112 -0
- package/dist/tools/schemas.d.ts +467 -0
- package/dist/tools/schemas.js +444 -0
- package/dist/tools/scope-guard.d.ts +2 -0
- package/dist/tools/scope-guard.js +11 -0
- package/dist/tools/server-version.d.ts +3 -0
- package/dist/tools/server-version.js +14 -0
- package/dist/tools/server.d.ts +92 -0
- package/dist/tools/server.js +170 -0
- package/dist/tools/surface.d.ts +37 -0
- package/dist/tools/surface.js +94 -0
- package/dist/tools/tsv.d.ts +52 -0
- package/dist/tools/tsv.js +95 -0
- package/dist/tools/write/apply.d.ts +40 -0
- package/dist/tools/write/apply.js +500 -0
- package/dist/tools/write/checks.d.ts +39 -0
- package/dist/tools/write/checks.js +137 -0
- package/dist/tools/write/common.d.ts +23 -0
- package/dist/tools/write/common.js +33 -0
- package/dist/tools/write/facts.d.ts +52 -0
- package/dist/tools/write/facts.js +151 -0
- package/dist/tools/write/outcome.d.ts +23 -0
- package/dist/tools/write/outcome.js +67 -0
- package/dist/tools/write/parse.d.ts +37 -0
- package/dist/tools/write/parse.js +166 -0
- package/dist/tools/write/payload.d.ts +44 -0
- package/dist/tools/write/payload.js +119 -0
- package/dist/tools/write/preview.d.ts +3 -0
- package/dist/tools/write/preview.js +317 -0
- package/dist/tools/write/snapshot.d.ts +68 -0
- package/dist/tools/write/snapshot.js +360 -0
- package/dist/tools/write-guidance.d.ts +174 -0
- package/dist/tools/write-guidance.js +317 -0
- package/dist/tools/write.d.ts +9 -0
- package/dist/tools/write.js +10 -0
- package/dist/write/canonical.d.ts +12 -0
- package/dist/write/canonical.js +31 -0
- package/dist/write/evaluate.d.ts +77 -0
- package/dist/write/evaluate.js +91 -0
- package/dist/write/hard-rules.d.ts +49 -0
- package/dist/write/hard-rules.js +48 -0
- package/dist/write/runtime.d.ts +37 -0
- package/dist/write/runtime.js +72 -0
- package/dist/write/store/audit-log.d.ts +13 -0
- package/dist/write/store/audit-log.js +25 -0
- package/dist/write/store/constants.d.ts +34 -0
- package/dist/write/store/constants.js +35 -0
- package/dist/write/store/files.d.ts +44 -0
- package/dist/write/store/files.js +157 -0
- package/dist/write/store/heartbeat.d.ts +9 -0
- package/dist/write/store/heartbeat.js +65 -0
- package/dist/write/store/ledger.d.ts +15 -0
- package/dist/write/store/ledger.js +86 -0
- package/dist/write/store/lifecycle.d.ts +35 -0
- package/dist/write/store/lifecycle.js +114 -0
- package/dist/write/store/lock.d.ts +97 -0
- package/dist/write/store/lock.js +464 -0
- package/dist/write/store/op-lock.d.ts +13 -0
- package/dist/write/store/op-lock.js +175 -0
- package/dist/write/store/plan-store.d.ts +7 -0
- package/dist/write/store/plan-store.js +48 -0
- package/dist/write/store/plans.d.ts +5 -0
- package/dist/write/store/plans.js +19 -0
- package/dist/write/store/types.d.ts +195 -0
- package/dist/write/store/types.js +2 -0
- package/dist/write/store.d.ts +6 -0
- package/dist/write/store.js +182 -0
- package/examples/agentgateway.write-gate.yaml +29 -0
- package/package.json +71 -0
- package/server.json +69 -0
- package/skills/ar-aging.md +65 -0
- package/skills/company-360.md +69 -0
- package/skills/contract-profitability.md +65 -0
- package/skills/crm-management.md +87 -0
- package/skills/filter-semantics.md +75 -0
- package/skills/invoice-export.md +61 -0
- package/skills/log-time-entry.md +77 -0
- package/skills/non-chargeable-work.md +67 -0
- package/skills/portfolio-margin.md +66 -0
- package/skills/recurring-revenue.md +65 -0
- package/skills/revenue-rollup.md +65 -0
- package/skills/slim-reads.md +67 -0
- package/skills/ticket-triage.md +64 -0
- package/skills/unbilled-work-review.md +66 -0
- package/skills/wip-hours.md +68 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tools/lists.ts — `autotask_query`: the bounded filtered list over any `<resource>.query` surface
|
|
3
|
+
* (0.6.0 merged five list tools; #228 widened it to every query read in the registry), and its
|
|
4
|
+
* totals mode (`group_by` / `sum` / `count`, the SDK's operations.aggregate; #228 retired the
|
|
5
|
+
* separate autotask_aggregate tool). The top-level `filter` shape is refused by THIS server pre-request (accepted: a
|
|
6
|
+
* conditions array or { filter: [...] }); the condition grammar of a well-formed filter (13
|
|
7
|
+
* operators + and/or) and the URL cap are validated by the SDK. Result forms: JSON (default),
|
|
8
|
+
* `tsv` (the table as one string, items omitted) and `output_path` (stdio only: the full walk to a
|
|
9
|
+
* file, a summary back).
|
|
10
|
+
*/
|
|
11
|
+
import { AutotaskConfigError } from 'node-autotask';
|
|
12
|
+
import { QUERY_INPUT, QUERY_LIMIT, assertFilterShape, closedInput } from './schemas.js';
|
|
13
|
+
import { abortedAnswer, InputInvalidError } from './dispatch.js';
|
|
14
|
+
import { runAggregate } from './aggregate.js';
|
|
15
|
+
import { markResult, markServerField, sanitiseVendorOutput } from './results/untrusted.js';
|
|
16
|
+
import { ok } from './results/envelope.js';
|
|
17
|
+
import { sampleRows, toTsv, tsvColumns } from './tsv.js';
|
|
18
|
+
import { OUTPUT_MAX_ROWS, resolveOutputTarget } from './output-file.js';
|
|
19
|
+
import { assertOperationPermitted } from '../policy.js';
|
|
20
|
+
import { scopeRequiredInput } from './scope-guard.js';
|
|
21
|
+
import { fieldNameInput } from './field-pointer.js';
|
|
22
|
+
/** The noun per query resource (the human line); any other resource reads "<resource> row(s)". */
|
|
23
|
+
const NOUNS = {
|
|
24
|
+
tickets: 'ticket(s)',
|
|
25
|
+
time_entries: 'time entry(ies)',
|
|
26
|
+
service_calls: 'service call(s)',
|
|
27
|
+
contracts: 'contract(s)',
|
|
28
|
+
time_off_requests: 'time-off request(s)',
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* #235: the columns a tickets / time_entries row carries when include_fields is absent. A full row is
|
|
32
|
+
* about 4 KB (107 keys with labels) / 2 KB, so 12 tickets cost 50 KB; these cost about a quarter.
|
|
33
|
+
* output_path (a file, not context) and autotask_read of <resource>.query keep the full row.
|
|
34
|
+
*/
|
|
35
|
+
export const DEFAULT_COLUMNS = {
|
|
36
|
+
tickets: ['id', 'ticketNumber', 'title', 'status', 'priority', 'issueType', 'subIssueType', 'ticketType', 'queueID', 'companyID', 'contactID', 'assignedResourceID', 'contractID', 'createDate', 'lastActivityDate', 'completedDate', 'dueDateTime', 'estimatedHours'],
|
|
37
|
+
time_entries: ['id', 'ticketID', 'taskID', 'resourceID', 'dateWorked', 'hoursWorked', 'hoursToBill', 'isNonBillable', 'billingCodeID', 'contractID', 'roleID', 'timeEntryType', 'summaryNotes'],
|
|
38
|
+
};
|
|
39
|
+
export function buildQuery(ctx) {
|
|
40
|
+
return {
|
|
41
|
+
title: 'Query Autotask records with a bounded filter',
|
|
42
|
+
input: closedInput(QUERY_INPUT),
|
|
43
|
+
run: async (raw, signal) => {
|
|
44
|
+
const args = raw;
|
|
45
|
+
const operation = `${args.resource}.query`;
|
|
46
|
+
const noun = NOUNS[args.resource] ?? `${args.resource} row(s)`;
|
|
47
|
+
const rec = ctx.record(operation);
|
|
48
|
+
// #228: any resource with a query read in the registry; anything else is refused before any wire
|
|
49
|
+
if (rec === undefined || rec.effect !== 'read') {
|
|
50
|
+
throw new InputInvalidError(`query: "${args.resource}" has no ${operation} read in the registry (find the resource with autotask_catalog)`, 'resource');
|
|
51
|
+
}
|
|
52
|
+
// #241: filter is optional in the advertised schema (a form-filler dead-ends on a required Table), so a missing or
|
|
53
|
+
// empty one is refused here, rows and totals alike (unscoped totals answer the wrong scope), before any wire. An
|
|
54
|
+
// INPUT_INVALID error, as when the schema required it: a model retries it; needs_input reads as "stop" (rule 3). autotask_read *.query keeps its bounded no-filter default (limit 50; #83, #243).
|
|
55
|
+
const conditions = Array.isArray(args.filter) ? args.filter : args.filter?.filter;
|
|
56
|
+
if (args.filter === undefined || (Array.isArray(conditions) && conditions.length === 0)) {
|
|
57
|
+
// within the 200-char message bound (MAX_ERROR_MESSAGE_CHARS): a longer one is cut mid-word
|
|
58
|
+
throw new InputInvalidError('query: filter is missing or empty; call again with a scope such as {field: "companyID", op: "eq", value: "<id>"} (time_entries: ticket.companyID), or {field: "id", op: "exist"} for the whole entity', 'filter');
|
|
59
|
+
}
|
|
60
|
+
// #228: totals mode (group_by / sum / count) is the SDK's operations.aggregate over the same filter
|
|
61
|
+
if (args.group_by !== undefined || args.sum !== undefined || args.count === true) {
|
|
62
|
+
const clash = ['latest', 'include_fields', 'note_chars', 'format', 'output_path', 'acknowledge_unscoped'].find((k) => args[k] !== undefined);
|
|
63
|
+
if (clash !== undefined)
|
|
64
|
+
throw new InputInvalidError(`query: ${clash} lists rows; group_by, sum and count return totals only (pass filter, top and limit)`, clash);
|
|
65
|
+
return runAggregate(ctx, operation, args.filter, { groupBy: args.group_by, sum: args.sum, top: args.top, limit: args.limit }, signal, { resource: args.resource });
|
|
66
|
+
}
|
|
67
|
+
if (args.top !== undefined)
|
|
68
|
+
throw new InputInvalidError('query: top caps the groups of group_by / sum', 'top');
|
|
69
|
+
assertOperationPermitted(operation, rec, ctx.config, ctx.log);
|
|
70
|
+
const fields = ctx.untrustedFields(operation);
|
|
71
|
+
// #18: the top-level filter shape is refused pre-request (zero wire on a refused shape).
|
|
72
|
+
assertFilterShape(args.filter, operation);
|
|
73
|
+
if (args.output_path !== undefined)
|
|
74
|
+
return outputPathAnswer(ctx, args.resource, operation, noun, fields, args, signal);
|
|
75
|
+
// The CLOSED params bag (args[0] of the query-family verbs): only the keys the caller set travel.
|
|
76
|
+
const bag = {};
|
|
77
|
+
if (args.filter !== undefined)
|
|
78
|
+
bag.filter = args.filter;
|
|
79
|
+
bag.limit = args.limit ?? QUERY_LIMIT.parse(undefined);
|
|
80
|
+
// #235: no include_fields on tickets / time_entries sends the default columns
|
|
81
|
+
const defaults = args.include_fields === undefined ? DEFAULT_COLUMNS[args.resource] : undefined;
|
|
82
|
+
const includeFields = args.include_fields ?? defaults;
|
|
83
|
+
if (includeFields !== undefined)
|
|
84
|
+
bag.includeFields = [...includeFields];
|
|
85
|
+
if (args.latest !== undefined)
|
|
86
|
+
bag.latest = args.latest;
|
|
87
|
+
if (args.note_chars !== undefined)
|
|
88
|
+
bag.noteChars = args.note_chars;
|
|
89
|
+
if (args.acknowledge_unscoped !== undefined)
|
|
90
|
+
bag.acknowledgeUnscoped = args.acknowledge_unscoped;
|
|
91
|
+
const result = await ctx.ops.invokeRead(ctx.client, operation, [bag], undefined, signal)
|
|
92
|
+
.catch((err) => { throw fieldNameInput(scopeRequiredInput(err, 'filter', true), true); });
|
|
93
|
+
if (result === undefined)
|
|
94
|
+
return abortedAnswer(ctx.correlationId);
|
|
95
|
+
const v = result;
|
|
96
|
+
const n = v.count ?? v.total ?? (Array.isArray(v.items) ? v.items.length : undefined);
|
|
97
|
+
const capped = result.noteCharsTruncated;
|
|
98
|
+
// #231: note_chars capping is reported here and by noteCharsTruncated, never as a top-level truncated flag (rows: hasMore)
|
|
99
|
+
const countText = `${typeof n === 'number' ? `${n} ${noun}` : noun} returned.${typeof capped === 'number' ? ` ${capped} text field(s) cut by note_chars.` : ''}${defaults !== undefined ? ' Default columns: pass include_fields for any other field.' : ''}`;
|
|
100
|
+
const marked = markResult(result, fields);
|
|
101
|
+
// #227: the server-side enrich is gone; the SDK labels every row by default (<fk>Name, <picklist>Label).
|
|
102
|
+
// #11 N4: format 'tsv' serves the table as result.tsv and OMITS items (the size saving). The
|
|
103
|
+
// TSV is built from the items AFTER the untrusted marking, so the markers survive in cells.
|
|
104
|
+
if (args.format === 'tsv') {
|
|
105
|
+
// The cells pass through the vendor-text choke point before the table is built (the table
|
|
106
|
+
// itself is then exempt from it, so the wrappers in its cells survive).
|
|
107
|
+
const itemList = Array.isArray(marked.items) ? sanitiseVendorOutput(marked.items) : [];
|
|
108
|
+
const { tsv, columns, rowCount } = toTsv(itemList);
|
|
109
|
+
const rest = { ...marked };
|
|
110
|
+
delete rest.items;
|
|
111
|
+
// The table is built from cells that already passed the choke point: this exact object's
|
|
112
|
+
// `tsv` is recorded as server-built (by provenance, never by its key name).
|
|
113
|
+
const table = { ...rest, tsv, columns, rowCount };
|
|
114
|
+
markServerField(table, 'tsv', 'server');
|
|
115
|
+
markServerField(columns, '*', 'server');
|
|
116
|
+
return ok(`${countText} Served as TSV: data.result.tsv (${rowCount} row(s), ${columns.length} column(s)); items omitted.`, {
|
|
117
|
+
resource: args.resource,
|
|
118
|
+
result: table,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
return ok(countText, { resource: args.resource, result: marked });
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* The `output_path` answer (issue #11 ruling N6): resolve + contain the target FIRST (a bad path
|
|
127
|
+
* never reaches the vendor), invoke the SDK's capped query walk, then
|
|
128
|
+
* write the JSON envelope and return a SUMMARY (path, columns, row count, the first rows, bytes) —
|
|
129
|
+
* never the table.
|
|
130
|
+
*/
|
|
131
|
+
async function outputPathAnswer(ctx, resource, operation, noun, fields, args, signal) {
|
|
132
|
+
// One result form per call: the file carries the FULL walk, so the limiting / capping /
|
|
133
|
+
// reformatting options cannot combine with it (refused before any dial or write).
|
|
134
|
+
// `format` is NOT a clash (issue #101): tsv writes the table to the file, json is the default form.
|
|
135
|
+
const clash = args.latest !== undefined ? 'latest' : args.note_chars !== undefined ? 'note_chars' : undefined;
|
|
136
|
+
if (clash !== undefined) {
|
|
137
|
+
throw new AutotaskConfigError(`output_path: writes the FULL match set and cannot be combined with ${clash} — pass exactly one result form per call (nothing was dialled, nothing was written)`, { operation });
|
|
138
|
+
}
|
|
139
|
+
const target = await resolveOutputTarget({
|
|
140
|
+
root: ctx.config.AUTOTASK_OUTPUT_DIR,
|
|
141
|
+
stateDir: ctx.config.AUTOTASK_STATE_DIR,
|
|
142
|
+
transport: ctx.config.MCP_TRANSPORT,
|
|
143
|
+
relativePath: args.output_path,
|
|
144
|
+
});
|
|
145
|
+
const result = await ctx.ops.invokeRead(ctx.client, operation, [{
|
|
146
|
+
filter: args.filter,
|
|
147
|
+
limit: 500,
|
|
148
|
+
walk: { maxRows: OUTPUT_MAX_ROWS },
|
|
149
|
+
...(args.include_fields === undefined ? {} : { includeFields: args.include_fields }),
|
|
150
|
+
...(args.acknowledge_unscoped === undefined ? {} : { acknowledgeUnscoped: args.acknowledge_unscoped }),
|
|
151
|
+
}], undefined, signal).catch((err) => { throw fieldNameInput(scopeRequiredInput(err, 'filter', true), true); });
|
|
152
|
+
if (result === undefined)
|
|
153
|
+
return abortedAnswer(ctx.correlationId);
|
|
154
|
+
const walked = result;
|
|
155
|
+
const walkNotes = sanitiseVendorOutput({
|
|
156
|
+
...(walked.scopeNote === undefined ? {} : { scopeNote: walked.scopeNote }),
|
|
157
|
+
...(walked.names === undefined ? {} : { names: walked.names }),
|
|
158
|
+
...(walked.relationNote === undefined ? {} : { relationNote: walked.relationNote }),
|
|
159
|
+
...(walked.blindSurface === undefined ? {} : { blindSurface: walked.blindSurface }),
|
|
160
|
+
...(walked.emptyReason === undefined ? {} : { emptyReason: walked.emptyReason }),
|
|
161
|
+
}, { cap: false });
|
|
162
|
+
// M8: the file form keeps the full text (no 500-char cap) but is still stripped of control/bidi chars.
|
|
163
|
+
// The file is an output channel too: every vendor string is cleaned (never capped) before writing.
|
|
164
|
+
const marked = sanitiseVendorOutput(markResult(walked.items, fields), { cap: false });
|
|
165
|
+
const columns = tsvColumns(marked);
|
|
166
|
+
const rowCount = marked.length;
|
|
167
|
+
const truncatedNote = walked.truncated
|
|
168
|
+
? `the walk is incomplete after ${rowCount} rows (maximum ${OUTPUT_MAX_ROWS}); narrow the filter to capture the remainder`
|
|
169
|
+
: undefined;
|
|
170
|
+
const envelope = {
|
|
171
|
+
items: marked,
|
|
172
|
+
fetched: rowCount,
|
|
173
|
+
hasMore: walked.truncated,
|
|
174
|
+
...walkNotes,
|
|
175
|
+
...(truncatedNote !== undefined ? { truncated: true, truncatedNote } : {}),
|
|
176
|
+
};
|
|
177
|
+
const asTsv = args.format === 'tsv';
|
|
178
|
+
const bytes = await target.write(asTsv ? toTsv(marked, { spreadsheetSafe: true }).tsv : JSON.stringify(envelope, null, 2));
|
|
179
|
+
// The sample rows are built from the RAW walked items and recorded by provenance (sanitiser
|
|
180
|
+
// review S7), so the choke point cleans, caps and wraps them once; built from the file's already
|
|
181
|
+
// wrapped cells, a cut would leave half a wrapper that then crossed raw (0.9.0: the escape is
|
|
182
|
+
// gone, issue #70).
|
|
183
|
+
const firstRows = sampleRows(walked.items, columns);
|
|
184
|
+
for (const row of firstRows)
|
|
185
|
+
for (const column of columns)
|
|
186
|
+
if (fields.includes(column))
|
|
187
|
+
markServerField(row, column, 'wrap');
|
|
188
|
+
const capNote = walked.truncated ? ` The walk is incomplete after ${rowCount} rows (truncated).` : '';
|
|
189
|
+
return ok(`Wrote ${rowCount} ${noun} as ${asTsv ? 'TSV' : 'JSON'} to the output directory.${capNote} The summary carries the path, ${columns.length} column(s) and the first rows; result.items is omitted.`, {
|
|
190
|
+
resource,
|
|
191
|
+
result: {
|
|
192
|
+
outputPath: target.path,
|
|
193
|
+
fileFormat: asTsv ? 'tsv' : 'json',
|
|
194
|
+
columns,
|
|
195
|
+
rowCount,
|
|
196
|
+
fetched: rowCount,
|
|
197
|
+
hasMore: walked.truncated,
|
|
198
|
+
...walkNotes,
|
|
199
|
+
firstRows,
|
|
200
|
+
bytes,
|
|
201
|
+
...(truncatedNote !== undefined ? { truncated: true, truncatedNote } : {}),
|
|
202
|
+
},
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
//# sourceMappingURL=lists.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ToolContext } from './context/types.js';
|
|
2
|
+
import type { BuiltTool } from './surface.js';
|
|
3
|
+
/** `autotask_catalog`: the filtered, ranked, paged registry rows with this deployment's verdicts. */
|
|
4
|
+
export declare function buildCatalog(ctx: ToolContext): BuiltTool;
|
|
5
|
+
/**
|
|
6
|
+
* The SDK camelCase param -> autotask_query snake_case arg crosswalk (#76), derived from QUERY_INPUT's own
|
|
7
|
+
* keys (lists.ts maps include_fields -> includeFields, note_chars -> noteChars ...) and kept only for the
|
|
8
|
+
* names the record documents. Undefined when the record is not served by autotask_query.
|
|
9
|
+
*/
|
|
10
|
+
export declare function paramNames(operation: string, rec: unknown): Record<string, unknown> | undefined;
|
|
11
|
+
/** `autotask_describe`: one operation's record + verdict + playbooks, or one resource's relationship map. */
|
|
12
|
+
export declare function buildDescribe(ctx: ToolContext): BuiltTool;
|
|
13
|
+
/** The single place to extend: entities the registry has no create for, yet the vendor documentation lists one, so the
|
|
14
|
+
* note would be false. `time_off_requests`: the swagger has a child create (POST /V1.0/Resources/{parentId}/TimeOffRequests,
|
|
15
|
+
* TimeOffRequestsChild_CreateEntity) and the SDK defines TimeOffRequestCreate; the SDK plan simply has no create row. */
|
|
16
|
+
export declare const NO_CREATE_EXCLUDED: ReadonlySet<string>;
|
|
17
|
+
/** The entities that carry the noCreate note (pinned by name in a test). */
|
|
18
|
+
export declare const NO_CREATE_ENTITIES: ReadonlySet<string>;
|
|
19
|
+
/** `autotask_read`: one read by exact key, or up to 10 (`items`) with per-item results. */
|
|
20
|
+
export declare function buildRead(ctx: ToolContext): BuiltTool;
|
|
21
|
+
/** `autotask_tenant_status`: identity / version / thresholds / server / time; each part degrades to typed absent. */
|
|
22
|
+
export declare function buildTenantStatus(ctx: ToolContext): BuiltTool;
|