@ttctl/mcp 0.1.0-rc.2 → 0.1.0-rc.3

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 (58) hide show
  1. package/README.md +28 -0
  2. package/dist/tools/_shared.d.ts +16 -14
  3. package/dist/tools/_shared.d.ts.map +1 -1
  4. package/dist/tools/_shared.js +31 -20
  5. package/dist/tools/_shared.js.map +1 -1
  6. package/dist/tools/applications.d.ts +10 -0
  7. package/dist/tools/applications.d.ts.map +1 -1
  8. package/dist/tools/applications.js +87 -9
  9. package/dist/tools/applications.js.map +1 -1
  10. package/dist/tools/engagements.d.ts.map +1 -1
  11. package/dist/tools/engagements.js +44 -2
  12. package/dist/tools/engagements.js.map +1 -1
  13. package/dist/tools/index.d.ts +3 -2
  14. package/dist/tools/index.d.ts.map +1 -1
  15. package/dist/tools/index.js +9 -2
  16. package/dist/tools/index.js.map +1 -1
  17. package/dist/tools/interest_requests.d.ts +77 -0
  18. package/dist/tools/interest_requests.d.ts.map +1 -0
  19. package/dist/tools/interest_requests.js +219 -0
  20. package/dist/tools/interest_requests.js.map +1 -0
  21. package/dist/tools/jobs.d.ts +18 -3
  22. package/dist/tools/jobs.d.ts.map +1 -1
  23. package/dist/tools/jobs.js +177 -39
  24. package/dist/tools/jobs.js.map +1 -1
  25. package/dist/tools/payments.d.ts.map +1 -1
  26. package/dist/tools/payments.js +51 -2
  27. package/dist/tools/payments.js.map +1 -1
  28. package/dist/tools/profile/education.d.ts.map +1 -1
  29. package/dist/tools/profile/education.js +0 -4
  30. package/dist/tools/profile/education.js.map +1 -1
  31. package/dist/tools/profile/employment.d.ts.map +1 -1
  32. package/dist/tools/profile/employment.js +0 -4
  33. package/dist/tools/profile/employment.js.map +1 -1
  34. package/dist/tools/profile/industries.d.ts.map +1 -1
  35. package/dist/tools/profile/industries.js +0 -3
  36. package/dist/tools/profile/industries.js.map +1 -1
  37. package/dist/tools/profile/resume.d.ts.map +1 -1
  38. package/dist/tools/profile/resume.js +0 -2
  39. package/dist/tools/profile/resume.js.map +1 -1
  40. package/dist/tools/profile/shared.d.ts +12 -11
  41. package/dist/tools/profile/shared.d.ts.map +1 -1
  42. package/dist/tools/profile/shared.js +9 -8
  43. package/dist/tools/profile/shared.js.map +1 -1
  44. package/dist/tools/profile_basic_photo_upload.d.ts.map +1 -1
  45. package/dist/tools/profile_basic_photo_upload.js +0 -2
  46. package/dist/tools/profile_basic_photo_upload.js.map +1 -1
  47. package/dist/tools/profile_basic_update.d.ts.map +1 -1
  48. package/dist/tools/profile_basic_update.js +0 -2
  49. package/dist/tools/profile_basic_update.js.map +1 -1
  50. package/dist/tools/timesheet.d.ts +15 -5
  51. package/dist/tools/timesheet.d.ts.map +1 -1
  52. package/dist/tools/timesheet.js +89 -6
  53. package/dist/tools/timesheet.js.map +1 -1
  54. package/package.json +2 -2
  55. package/dist/tools/output-schemas.d.ts +0 -129
  56. package/dist/tools/output-schemas.d.ts.map +0 -1
  57. package/dist/tools/output-schemas.js +0 -138
  58. package/dist/tools/output-schemas.js.map +0 -1
@@ -4,6 +4,7 @@ import { registerApplicationsTools } from "./applications.js";
4
4
  import { registerAvailabilityTools } from "./availability.js";
5
5
  import { registerContractsTools } from "./contracts.js";
6
6
  import { registerEngagementsTools } from "./engagements.js";
7
+ import { registerInterestRequestsTools } from "./interest_requests.js";
7
8
  import { registerJobsTools } from "./jobs.js";
8
9
  import { registerPaymentsTools } from "./payments.js";
9
10
  import { registerTimesheetTools } from "./timesheet.js";
@@ -50,8 +51,9 @@ import { registerProfileSkillsUpdateTool } from "./profile_skills_update.js";
50
51
  * sub-domain registering its full leaf set) + 8 `profile.portfolio` +
51
52
  * 4 `profile.visas` + 2 `profile.resume` (#75) + 6 `profile.external` +
52
53
  * 4 `profile.reviews` (#76, one tool per file) = 56 profile tools, plus
53
- * 3 `applications` (#15) + 8 `engagements` (#147 + #155 + #156) + 5 `availability`
54
- * (#146 amended) + 13 `jobs` (#148) + 3 `timesheet` (#13) = 88 tools total.
54
+ * 3 `applications` (#15) + 1 `interest_requests` (#371) + 8 `engagements`
55
+ * (#147 + #155 + #156) + 5 `availability` (#146 amended) + 13 `jobs` (#148)
56
+ * + 3 `timesheet` (#13) = 89 tools total.
55
57
  *
56
58
  * Post-#113: takes a `ToolRegistrationContext` carrying the per-session
57
59
  * auth resolvers bound to the config path captured at `buildServer()`
@@ -99,6 +101,11 @@ export function registerAllTools(server, ctx) {
99
101
  // Toptal Talent Activity view (TalentJobActivityItem rows). Per
100
102
  // project non-goals, no apply / withdraw / edit tools are exposed.
101
103
  registerApplicationsTools(server, ctx);
104
+ // interest_requests — 1 leaf (#371). LLM-agent affordance for the
105
+ // UI-level "Interest Request" concept. Thin projection over
106
+ // `applications.list({ statusGroups: ["ON_RECRUITER_REVIEW"] })`
107
+ // with an optional client-side staleness filter; no new wire op.
108
+ registerInterestRequestsTools(server, ctx);
102
109
  // contracts — 2 leaves (#195). Read-only talent-level legal documents
103
110
  // (Toptal Direct, MSA, etc.) via `viewer.contracts` on the portal
104
111
  // surface. Engagement-attached commercial agreements stay in
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAKpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,s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EAAE,GAAG,CAAC,CAAC;IAE3D,mCAAmC;IACnC,8BAA8B,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5C,qCAAqC,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnD,wCAAwC,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACtD,yCAAyC,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEvD,gEAAgE;IAChE,gEAAgE;IAChE,mEAAmE;IACnE,yBAAyB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEvC,kEAAkE;IAClE,4DAA4D;IAC5D,iEAAiE;IACjE,iEAAiE;IACjE,6BAA6B,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE3C,sEAAsE;IACtE,kEAAkE;IAClE,6DAA6D;IAC7D,iEAAiE;IACjE,sBAAsB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEpC,oEAAoE;IACpE,oEAAoE;IACpE,oDAAoD;IACpD,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEtC,6EAA6E;IAC7E,6EAA6E;IAC7E,2DAA2D;IAC3D,yBAAyB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEvC,yEAAyE;IACzE,sEAAsE;IACtE,kEAAkE;IAClE,yEAAyE;IACzE,sEAAsE;IACtE,aAAa;IACb,iBAAiB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE/B,gEAAgE;IAChE,qEAAqE;IACrE,uEAAuE;IACvE,sEAAsE;IACtE,qEAAqE;IACrE,qBAAqB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEnC,qEAAqE;IACrE,uEAAuE;IACvE,mEAAmE;IACnE,sBAAsB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AACtC,CAAC"}
@@ -0,0 +1,77 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { type ToolRegistrationContext } from "./_shared.js";
3
+ /**
4
+ * Project an activity-item row into the trim "Interest Request" shape the
5
+ * tool surfaces. Computes `daysPending` from `lastUpdatedAt`; rounds down
6
+ * to integer days. Returns the same `id` so callers can drill into
7
+ * `ttctl_applications_show` for the full detail view.
8
+ *
9
+ * @internal Exported for unit tests.
10
+ */
11
+ export interface InterestRequestRow {
12
+ /** Activity-item id; pass to `ttctl_applications_show` for detail. */
13
+ id: string;
14
+ /** Server-rendered status label (e.g. "Job Interest Request"). */
15
+ statusVerbose: string;
16
+ /** Underlying job title (may be null if the wire elided it). */
17
+ jobTitle: string | null;
18
+ /** Client company name (may be null). */
19
+ clientName: string | null;
20
+ /** Toptal portal URL for the job (may be null). */
21
+ jobUrl: string | null;
22
+ /** ISO timestamp of the last server-side activity update. */
23
+ lastUpdatedAt: string;
24
+ /** Whole days between `lastUpdatedAt` and `now`; null if unparseable. */
25
+ daysPending: number | null;
26
+ }
27
+ /**
28
+ * @internal Exported for unit tests.
29
+ */
30
+ export declare function projectRow(row: {
31
+ id: string;
32
+ lastUpdatedAt: string;
33
+ statusV2: {
34
+ verbose: string;
35
+ };
36
+ job: {
37
+ title: string | null;
38
+ url: string | null;
39
+ client: {
40
+ fullName: string | null;
41
+ } | null;
42
+ };
43
+ }, now: number): InterestRequestRow;
44
+ /**
45
+ * Register `ttctl_interest_requests_list` (#371) — a dedicated MCP affordance
46
+ * for the UI-level "Interest Request" concept (recruiter-initiated
47
+ * availability checks on the Toptal portal). LLM agents asking
48
+ * "show me my interest requests" can resolve directly to this tool
49
+ * without having to know the canonical API status-group spelling.
50
+ *
51
+ * The tool wraps `applications.list(token, { statusGroups: ["ON_RECRUITER_REVIEW"] })`
52
+ * and projects each row into a trimmed triage shape: title, client,
53
+ * lastUpdatedAt, computed daysPending, jobUrl, statusVerbose. The optional
54
+ * `olderThan` filter narrows the result client-side by days-pending — the
55
+ * wire has no server-side staleness argument on the underlying
56
+ * `JobActivityItems` operation, so the filter is applied after the fetch
57
+ * (acceptable because `ON_RECRUITER_REVIEW` is a small per-user cohort).
58
+ *
59
+ * **Why dedicated over a description hint** (issue #371 § Proposed Solution):
60
+ * The tool name is the LLM discovery surface; `ttctl_applications_list`
61
+ * does not lexically include "interest requests" and the
62
+ * `ON_RECRUITER_REVIEW` enum value does not either. A dedicated tool
63
+ * resolves the discovery gap directly. Terminology-mapping hints on
64
+ * `ttctl_applications_list` are tracked separately in sibling issue #370.
65
+ *
66
+ * **No new wire op**: this tool calls the existing
67
+ * `applications.list` core function, which calls the existing
68
+ * `JobActivityItems` operation. Per the schema/contract rule, no new
69
+ * E2E is required — the operation is already covered by
70
+ * `15-applications-list.e2e.test.ts`.
71
+ *
72
+ * Dry-run path (issue #165): emits the singular `{ preview }` envelope
73
+ * carrying the same `JobActivityItems` variables the apply path would
74
+ * send (`onlyStatusGroupFilter: ["ON_RECRUITER_REVIEW"]`).
75
+ */
76
+ export declare function registerInterestRequestsTools(server: McpServer, ctx: ToolRegistrationContext): void;
77
+ //# sourceMappingURL=interest_requests.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interest_requests.d.ts","sourceRoot":"","sources":["../../src/tools/interest_requests.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAMzE,OAAO,EAAuD,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AA0CjH;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,sEAAsE;IACtE,EAAE,EAAE,MAAM,CAAC;IACX,kEAAkE;IAClE,aAAa,EAAE,MAAM,CAAC;IACtB,gEAAgE;IAChE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,yCAAyC;IACzC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,mDAAmD;IACnD,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,6DAA6D;IAC7D,aAAa,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE;IACH,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9B,GAAG,EAAE;QAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,MAAM,EAAE;YAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,GAAG,IAAI,CAAA;KAAE,CAAC;CAC/F,EACD,GAAG,EAAE,MAAM,GACV,kBAAkB,CAcpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,uBAAuB,GAAG,IAAI,CAmFnG"}
@@ -0,0 +1,219 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import { applications } from "@ttctl/core";
4
+ import { z } from "zod";
5
+ import { ttctlErrorToToolResponseOrNull } from "../errors.js";
6
+ import { buildMcpDryRunPreview, dryRunResponse, jsonResponse } from "./_shared.js";
7
+ const DRY_RUN_FIELD = z
8
+ .boolean()
9
+ .optional()
10
+ .describe("Preview the request without executing. Returns `{ ok: true, dryRun: true, preview }` with operationName + variables + redacted bearer header. Default: false.");
11
+ /**
12
+ * Recognized duration suffixes for the `olderThan` staleness filter. The
13
+ * input is parsed client-side — the wire has no server-side staleness
14
+ * argument on the underlying `JobActivityItems` operation, so the tool
15
+ * fetches the full pending list and filters by computed days-pending.
16
+ *
17
+ * - `d` — days (e.g. `7d`, `14d`)
18
+ * - `w` — weeks (e.g. `2w`)
19
+ * - `h` — hours (e.g. `48h`)
20
+ *
21
+ * Bare integer is interpreted as days (e.g. `14` ⇒ `14d`).
22
+ */
23
+ const OLDER_THAN_PATTERN = /^(\d+)\s*(d|w|h)?$/i;
24
+ const HOURS_PER_UNIT = {
25
+ h: 1,
26
+ d: 24,
27
+ w: 24 * 7,
28
+ };
29
+ function parseOlderThanHours(input) {
30
+ const match = OLDER_THAN_PATTERN.exec(input.trim());
31
+ if (match === null)
32
+ return null;
33
+ const quantityStr = match[1];
34
+ if (quantityStr === undefined)
35
+ return null;
36
+ const quantity = Number.parseInt(quantityStr, 10);
37
+ if (!Number.isFinite(quantity) || quantity < 0)
38
+ return null;
39
+ const unit = (match[2] ?? "d").toLowerCase();
40
+ const perUnit = HOURS_PER_UNIT[unit];
41
+ if (perUnit === undefined)
42
+ return null;
43
+ return quantity * perUnit;
44
+ }
45
+ /**
46
+ * @internal Exported for unit tests.
47
+ */
48
+ export function projectRow(row, now) {
49
+ const updatedAtMs = Date.parse(row.lastUpdatedAt);
50
+ const daysPending = Number.isFinite(updatedAtMs)
51
+ ? Math.max(0, Math.floor((now - updatedAtMs) / (24 * 60 * 60 * 1000)))
52
+ : null;
53
+ return {
54
+ id: row.id,
55
+ statusVerbose: row.statusV2.verbose,
56
+ jobTitle: row.job.title,
57
+ clientName: row.job.client?.fullName ?? null,
58
+ jobUrl: row.job.url,
59
+ lastUpdatedAt: row.lastUpdatedAt,
60
+ daysPending,
61
+ };
62
+ }
63
+ /**
64
+ * Register `ttctl_interest_requests_list` (#371) — a dedicated MCP affordance
65
+ * for the UI-level "Interest Request" concept (recruiter-initiated
66
+ * availability checks on the Toptal portal). LLM agents asking
67
+ * "show me my interest requests" can resolve directly to this tool
68
+ * without having to know the canonical API status-group spelling.
69
+ *
70
+ * The tool wraps `applications.list(token, { statusGroups: ["ON_RECRUITER_REVIEW"] })`
71
+ * and projects each row into a trimmed triage shape: title, client,
72
+ * lastUpdatedAt, computed daysPending, jobUrl, statusVerbose. The optional
73
+ * `olderThan` filter narrows the result client-side by days-pending — the
74
+ * wire has no server-side staleness argument on the underlying
75
+ * `JobActivityItems` operation, so the filter is applied after the fetch
76
+ * (acceptable because `ON_RECRUITER_REVIEW` is a small per-user cohort).
77
+ *
78
+ * **Why dedicated over a description hint** (issue #371 § Proposed Solution):
79
+ * The tool name is the LLM discovery surface; `ttctl_applications_list`
80
+ * does not lexically include "interest requests" and the
81
+ * `ON_RECRUITER_REVIEW` enum value does not either. A dedicated tool
82
+ * resolves the discovery gap directly. Terminology-mapping hints on
83
+ * `ttctl_applications_list` are tracked separately in sibling issue #370.
84
+ *
85
+ * **No new wire op**: this tool calls the existing
86
+ * `applications.list` core function, which calls the existing
87
+ * `JobActivityItems` operation. Per the schema/contract rule, no new
88
+ * E2E is required — the operation is already covered by
89
+ * `15-applications-list.e2e.test.ts`.
90
+ *
91
+ * Dry-run path (issue #165): emits the singular `{ preview }` envelope
92
+ * carrying the same `JobActivityItems` variables the apply path would
93
+ * send (`onlyStatusGroupFilter: ["ON_RECRUITER_REVIEW"]`).
94
+ */
95
+ export function registerInterestRequestsTools(server, ctx) {
96
+ server.registerTool("ttctl_interest_requests_list", {
97
+ title: "List pending Interest Requests",
98
+ description: [
99
+ "List the signed-in user's pending Toptal Interest Requests —",
100
+ 'the UI label for recruiter-initiated availability checks ("respond" / "decline" decision flow).',
101
+ "",
102
+ "On the wire these are activity-list rows in the `ON_RECRUITER_REVIEW` status group;",
103
+ "this tool wraps `ttctl_applications_list --statusGroups ON_RECRUITER_REVIEW` and",
104
+ "projects each row into a trimmed triage shape: id, statusVerbose, jobTitle, clientName,",
105
+ "jobUrl, lastUpdatedAt, daysPending.",
106
+ "",
107
+ "Optional filter:",
108
+ " - `olderThan`: staleness threshold. Accepts `<N>d` (days), `<N>w` (weeks),",
109
+ " `<N>h` (hours), or a bare integer (interpreted as days). Examples: `14d`, `2w`, `48h`, `14`.",
110
+ " Rows with `daysPending` >= the parsed threshold are returned; useful for surfacing",
111
+ " requests at expiry-risk (Toptal Interest Requests auto-expire on the recruiter side).",
112
+ "",
113
+ "Returns the raw array of rows; pair with `ttctl_applications_show <id>` for full detail.",
114
+ "",
115
+ "Example user prompts:",
116
+ ' - "Show me my pending Toptal Interest Requests."',
117
+ ' - "Which Interest Requests are older than two weeks?" (uses `olderThan: 2w`)',
118
+ ' - "Any new Interest Requests today?" (no filter; sort by daysPending ascending in the client)',
119
+ ].join("\n"),
120
+ inputSchema: {
121
+ olderThan: z
122
+ .string()
123
+ .optional()
124
+ .describe("Staleness threshold expressed as `<N>d` (days), `<N>w` (weeks), `<N>h` (hours), or bare integer days. Returns rows with daysPending >= the parsed threshold."),
125
+ dryRun: DRY_RUN_FIELD,
126
+ },
127
+ }, async (args) => {
128
+ const auth = await ctx.resolveToolAuth();
129
+ if (!auth.ok)
130
+ return auth.response;
131
+ let olderThanHours = null;
132
+ if (args.olderThan !== undefined) {
133
+ olderThanHours = parseOlderThanHours(args.olderThan);
134
+ if (olderThanHours === null) {
135
+ return invalidOlderThanResponse(args.olderThan);
136
+ }
137
+ }
138
+ if (args.dryRun === true) {
139
+ // Dry-run mirrors the apply path's wire call: a single
140
+ // JobActivityItems request restricted to ON_RECRUITER_REVIEW.
141
+ // The client-side `olderThan` filter is NOT part of the wire
142
+ // payload — it's applied after the fetch — so the preview's
143
+ // `variables` block stays faithful to what the gateway sees.
144
+ return dryRunResponse(buildMcpDryRunPreview("JobActivityItems", "mobile-gateway", { onlyStatusGroupFilter: ["ON_RECRUITER_REVIEW"] }, auth.token));
145
+ }
146
+ try {
147
+ // #377: applications.list now returns a JobActivityListPage
148
+ // envelope. This tool is a filtered convenience surface (it
149
+ // does not paginate at the MCP layer — see #372 / R1 framing);
150
+ // unwrap `.items` and keep the existing client-side projection.
151
+ const { items: rows } = await applications.list(auth.token, { statusGroups: ["ON_RECRUITER_REVIEW"] });
152
+ const now = Date.now();
153
+ const projected = rows.map((row) => projectRow(row, now));
154
+ const filtered = olderThanHours === null
155
+ ? projected
156
+ : projected.filter((row) => row.daysPending !== null && row.daysPending * 24 >= olderThanHours);
157
+ return jsonResponse(filtered);
158
+ }
159
+ catch (err) {
160
+ return mapInterestRequestsError(err);
161
+ }
162
+ });
163
+ }
164
+ function invalidOlderThanResponse(supplied) {
165
+ return {
166
+ isError: true,
167
+ content: [
168
+ {
169
+ type: "text",
170
+ text: [
171
+ `Error: ttctl_interest_requests_list failed (VALIDATION): \`olderThan\` value "${supplied}" is not a recognized duration.`,
172
+ "",
173
+ "Recovery: Use `<N>d` (days), `<N>w` (weeks), `<N>h` (hours), or a bare integer (days). Examples: `14d`, `2w`, `48h`, `14`.",
174
+ "",
175
+ "(Code: VALIDATION)",
176
+ ].join("\n"),
177
+ },
178
+ ],
179
+ };
180
+ }
181
+ function mapInterestRequestsError(err) {
182
+ const typed = ttctlErrorToToolResponseOrNull(err);
183
+ if (typed !== null)
184
+ return typed;
185
+ if (err instanceof applications.ApplicationsError) {
186
+ return {
187
+ isError: true,
188
+ content: [
189
+ {
190
+ type: "text",
191
+ text: [
192
+ `Error: ${err.message}`,
193
+ "",
194
+ "Recovery: Retry; if the failure persists, file an issue.",
195
+ "",
196
+ `(Code: ${err.code})`,
197
+ ].join("\n"),
198
+ },
199
+ ],
200
+ };
201
+ }
202
+ const message = err instanceof Error ? err.message : String(err);
203
+ return {
204
+ isError: true,
205
+ content: [
206
+ {
207
+ type: "text",
208
+ text: [
209
+ `Error: interest_requests request failed: ${message}`,
210
+ "",
211
+ "Recovery: Retry; if the failure persists, file an issue.",
212
+ "",
213
+ "(Code: UNKNOWN)",
214
+ ].join("\n"),
215
+ },
216
+ ],
217
+ };
218
+ }
219
+ //# sourceMappingURL=interest_requests.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interest_requests.js","sourceRoot":"","sources":["../../src/tools/interest_requests.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAGpC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,8BAA8B,EAAE,MAAM,cAAc,CAAC;AAE9D,OAAO,EAAE,qBAA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CAAC,CAAC;IACjE,OAAO;QACL,OAAO,EAAE,IAAI;QACb,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE;oBACJ,4CAA4C,OAAO,EAAE;oBACrD,EAAE;oBACF,0DAA0D;oBAC1D,EAAE;oBACF,iBAAiB;iBAClB,CAAC,IAAI,CAAC,IAAI,CAAC;aACb;SACF;KACF,CAAC;AACJ,CAAC"}
@@ -22,9 +22,24 @@ import { type ToolRegistrationContext } from "./_shared.js";
22
22
  * - `ttctl_jobs_search_save`
23
23
  * - `ttctl_jobs_search_remove`
24
24
  *
25
- * **Wire-shape notes** (R1 / R2): `jobs_viewed` is scoped to the first
26
- * page (≤20 jobs, client-side filter); `jobs_search_*` operates on a
27
- * single subscription per user. The tool descriptions surface these.
25
+ * **Wire-shape notes** (R1 / R2): `jobs_viewed` aggregates the FULL
26
+ * eligibleJobs pool and applies a client-side filter on the `viewed`
27
+ * boolean (the wire confirmed has no `viewed` filter — Toptal's own
28
+ * mobile app uses only `notInterested` / `saved` on the filter input;
29
+ * see #372 for the empirical analysis and `viewedList` doc-comment
30
+ * for the cost trade-off); `jobs_search_*` operates on a single
31
+ * subscription per user. The tool descriptions surface these.
32
+ *
33
+ * Pagination (issue #369): the four read-list tools — `jobs_list`,
34
+ * `jobs_saved`, `jobs_viewed`, `jobs_not_interested_list` — accept
35
+ * `page?: number` (1-indexed) and `perPage?: number` (server-capped),
36
+ * mirroring the CLI's `--page` / `--per-page` flags that #138/#183
37
+ * shipped. Each list response is `{ items, pageInfo }`, where `pageInfo`
38
+ * mirrors the CLI's `EnvelopePageInfo` shape so LLM callers can detect
39
+ * `hasNextPage` and iterate. For `jobs_viewed` specifically (post-#372),
40
+ * `pageInfo` reflects the POST-FILTER count (the count of viewed jobs),
41
+ * NOT the underlying eligibleJobs pool size — `page` / `perPage` slice
42
+ * the post-filter list.
28
43
  *
29
44
  * Dry-run path (issue #165): every tool accepts `dryRun?: boolean`. Read
30
45
  * tools build the preview at the MCP layer; the 7 mutations (save,
@@ -1 +1 @@
1
- {"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../../src/tools/jobs.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAMzE,OAAO,EAAyC,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAmCnG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,uBAAuB,GAAG,IAAI,CAyavF"}
1
+ {"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../../src/tools/jobs.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAMzE,OAAO,EAAyC,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAoFnG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,uBAAuB,GAAG,IAAI,CAsgBvF"}