@ttctl/mcp 0.1.0-rc.2 → 0.1.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -0
- package/dist/tools/_shared.d.ts +16 -14
- package/dist/tools/_shared.d.ts.map +1 -1
- package/dist/tools/_shared.js +31 -20
- package/dist/tools/_shared.js.map +1 -1
- package/dist/tools/applications.d.ts +10 -0
- package/dist/tools/applications.d.ts.map +1 -1
- package/dist/tools/applications.js +87 -9
- package/dist/tools/applications.js.map +1 -1
- package/dist/tools/engagements.d.ts.map +1 -1
- package/dist/tools/engagements.js +44 -2
- package/dist/tools/engagements.js.map +1 -1
- package/dist/tools/index.d.ts +3 -2
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +9 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/interest_requests.d.ts +77 -0
- package/dist/tools/interest_requests.d.ts.map +1 -0
- package/dist/tools/interest_requests.js +219 -0
- package/dist/tools/interest_requests.js.map +1 -0
- package/dist/tools/jobs.d.ts +18 -3
- package/dist/tools/jobs.d.ts.map +1 -1
- package/dist/tools/jobs.js +177 -39
- package/dist/tools/jobs.js.map +1 -1
- package/dist/tools/payments.d.ts.map +1 -1
- package/dist/tools/payments.js +51 -2
- package/dist/tools/payments.js.map +1 -1
- package/dist/tools/profile/education.d.ts.map +1 -1
- package/dist/tools/profile/education.js +0 -4
- package/dist/tools/profile/education.js.map +1 -1
- package/dist/tools/profile/employment.d.ts.map +1 -1
- package/dist/tools/profile/employment.js +52 -12
- package/dist/tools/profile/employment.js.map +1 -1
- package/dist/tools/profile/industries.d.ts.map +1 -1
- package/dist/tools/profile/industries.js +0 -3
- package/dist/tools/profile/industries.js.map +1 -1
- package/dist/tools/profile/resume.d.ts.map +1 -1
- package/dist/tools/profile/resume.js +0 -2
- package/dist/tools/profile/resume.js.map +1 -1
- package/dist/tools/profile/shared.d.ts +12 -11
- package/dist/tools/profile/shared.d.ts.map +1 -1
- package/dist/tools/profile/shared.js +9 -8
- package/dist/tools/profile/shared.js.map +1 -1
- package/dist/tools/profile_basic_photo_upload.d.ts.map +1 -1
- package/dist/tools/profile_basic_photo_upload.js +0 -2
- package/dist/tools/profile_basic_photo_upload.js.map +1 -1
- package/dist/tools/profile_basic_update.d.ts.map +1 -1
- package/dist/tools/profile_basic_update.js +0 -2
- package/dist/tools/profile_basic_update.js.map +1 -1
- package/dist/tools/timesheet.d.ts +15 -5
- package/dist/tools/timesheet.d.ts.map +1 -1
- package/dist/tools/timesheet.js +89 -6
- package/dist/tools/timesheet.js.map +1 -1
- package/package.json +2 -2
- package/dist/tools/output-schemas.d.ts +0 -129
- package/dist/tools/output-schemas.d.ts.map +0 -1
- package/dist/tools/output-schemas.js +0 -138
- package/dist/tools/output-schemas.js.map +0 -1
package/dist/tools/timesheet.js
CHANGED
|
@@ -18,11 +18,12 @@ const DRY_RUN_FIELD = z
|
|
|
18
18
|
*/
|
|
19
19
|
const SUBMIT_AUTO_RESOLVE_PLACEHOLDER = "<auto-resolved-at-apply-time>";
|
|
20
20
|
/**
|
|
21
|
-
* Register the `ttctl_timesheet_*` MCP tools per the #13 spec
|
|
22
|
-
*
|
|
23
|
-
* with `_`:
|
|
21
|
+
* Register the `ttctl_timesheet_*` MCP tools per the #13 spec, plus
|
|
22
|
+
* the #374 pending-list pagination sibling. Tool names use the
|
|
23
|
+
* `ttctl_` prefix and the canonical CLI path joined with `_`:
|
|
24
24
|
*
|
|
25
25
|
* - `ttctl_timesheet_list`
|
|
26
|
+
* - `ttctl_timesheet_pending_list` (#374)
|
|
26
27
|
* - `ttctl_timesheet_show`
|
|
27
28
|
* - `ttctl_timesheet_submit`
|
|
28
29
|
*
|
|
@@ -30,12 +31,21 @@ const SUBMIT_AUTO_RESOLVE_PLACEHOLDER = "<auto-resolved-at-apply-time>";
|
|
|
30
31
|
* fields. Identity model:
|
|
31
32
|
*
|
|
32
33
|
* - `BillingCycle.id` — the "timesheet id" returned by
|
|
33
|
-
* `timesheet_list`
|
|
34
|
-
* `timesheet_show` /
|
|
34
|
+
* `timesheet_list` / `timesheet_pending_list`
|
|
35
|
+
* and consumed by `timesheet_show` /
|
|
36
|
+
* `timesheet_submit`.
|
|
35
37
|
* - `JobActivityItem.id` — the "engagement id" exposed by
|
|
36
38
|
* `engagements_list`. Passed via
|
|
37
39
|
* `engagement` to scope.
|
|
38
40
|
*
|
|
41
|
+
* **`timesheet_pending_list` pagination divergence** (#374, per
|
|
42
|
+
* ADR-007 row 3): the viewer-wide `PendingTimesheets` wire op
|
|
43
|
+
* accepts ONLY a `pagination: { limit: Int }` input — no `offset`,
|
|
44
|
+
* no cursor — so this tool exposes `limit` rather than the
|
|
45
|
+
* offset-style `page` / `perPage` used by jobs / applications /
|
|
46
|
+
* engagements / payouts. Surface-honest: MCP keys mirror wire arg
|
|
47
|
+
* keys.
|
|
48
|
+
*
|
|
39
49
|
* Submit is destructive — its tool description explicitly warns
|
|
40
50
|
* humans, and per #13 the CLI gates on `--confirm` / TTY interactive
|
|
41
51
|
* confirm. The MCP side has no analogous gate (LLM clients are
|
|
@@ -55,6 +65,11 @@ export function registerTimesheetTools(server, ctx) {
|
|
|
55
65
|
"`engagements_list`) to scope to one engagement (returns ALL cycles for",
|
|
56
66
|
"that engagement, regardless of submission state).",
|
|
57
67
|
"",
|
|
68
|
+
"For viewer-wide pagination, prefer `ttctl_timesheet_pending_list`",
|
|
69
|
+
"(#374) — it exposes the wire's `limit` input surface-honestly. This",
|
|
70
|
+
"tool keeps its pre-#374 shape (no pagination args) for backward",
|
|
71
|
+
"compatibility.",
|
|
72
|
+
"",
|
|
58
73
|
"Example user prompts:",
|
|
59
74
|
' - "Show my pending Toptal timesheets."',
|
|
60
75
|
' - "What timesheets do I need to submit?"',
|
|
@@ -80,7 +95,12 @@ export function registerTimesheetTools(server, ctx) {
|
|
|
80
95
|
// that branch in the preview so callers see the exact wire
|
|
81
96
|
// operation that would fire.
|
|
82
97
|
if (opts.engagement === undefined) {
|
|
83
|
-
|
|
98
|
+
// #374: PendingTimesheets is now parameterised with $limit;
|
|
99
|
+
// the dry-run preview surfaces the DEFAULT value the apply
|
|
100
|
+
// path will pass when the caller omits `limit` (which this
|
|
101
|
+
// pre-#374 tool always does — only the new
|
|
102
|
+
// `ttctl_timesheet_pending_list` exposes `limit`).
|
|
103
|
+
return dryRunResponse(buildMcpDryRunPreview("PendingTimesheets", "mobile-gateway", { limit: timesheet.DEFAULT_PENDING_LIMIT }, auth.token));
|
|
84
104
|
}
|
|
85
105
|
return dryRunResponse(buildMcpDryRunPreview("Timesheets", "mobile-gateway", { jobActivityItemId: opts.engagement }, auth.token));
|
|
86
106
|
}
|
|
@@ -92,6 +112,69 @@ export function registerTimesheetTools(server, ctx) {
|
|
|
92
112
|
return mapTimesheetError(err);
|
|
93
113
|
}
|
|
94
114
|
});
|
|
115
|
+
// `ttctl_timesheet_pending_list` (#374) — surface-honest viewer-wide
|
|
116
|
+
// pending pagination. Schema mirrors the wire arg name exactly:
|
|
117
|
+
// `{ limit? }` maps directly to `pagination: { limit: $limit }` on
|
|
118
|
+
// `Viewer.billingCycles`. See ADR-007 row 3 ("limit-only wrapper").
|
|
119
|
+
server.registerTool("ttctl_timesheet_pending_list", {
|
|
120
|
+
title: "List viewer-wide pending timesheets (limit-only pagination)",
|
|
121
|
+
description: [
|
|
122
|
+
"List the signed-in user's Toptal Talent viewer-wide pending billing",
|
|
123
|
+
"cycles — the timesheets that currently need submission. Use this",
|
|
124
|
+
"tool when the user wants to enumerate or paginate over their pending",
|
|
125
|
+
"timesheets and `ttctl_timesheet_list` (no pagination args) returns",
|
|
126
|
+
"a too-narrow window.",
|
|
127
|
+
"",
|
|
128
|
+
"**Pagination divergence** (#374, per ADR-007): unlike",
|
|
129
|
+
"`ttctl_jobs_list` / `ttctl_applications_list` / `ttctl_engagements_list`",
|
|
130
|
+
"/ `ttctl_payments_payouts_list` (offset-style with `page` /",
|
|
131
|
+
"`perPage`), this tool exposes ONLY `limit` because the underlying",
|
|
132
|
+
"wire field is `LimitPagination` (no `offset`, no cursor). MCP keys",
|
|
133
|
+
"mirror wire arg names verbatim. Default `limit` when omitted is 50",
|
|
134
|
+
"(the historical wire default).",
|
|
135
|
+
"",
|
|
136
|
+
"For the per-engagement variant (all cycles for one engagement,",
|
|
137
|
+
"regardless of submission state) use `ttctl_timesheet_list` with",
|
|
138
|
+
"the `engagement` arg — that wire op carries no pagination input.",
|
|
139
|
+
"",
|
|
140
|
+
"Example user prompts:",
|
|
141
|
+
' - "Show me 5 of my pending Toptal timesheets."',
|
|
142
|
+
' - "List my pending timesheets, limit 10."',
|
|
143
|
+
' - "What are the next few timesheets I need to submit?"',
|
|
144
|
+
].join("\n"),
|
|
145
|
+
inputSchema: {
|
|
146
|
+
limit: z
|
|
147
|
+
.number()
|
|
148
|
+
.int()
|
|
149
|
+
.positive()
|
|
150
|
+
.optional()
|
|
151
|
+
.describe("Maximum number of pending cycles to return. Maps to `pagination: { limit: $limit }` on the wire. Default 50 when omitted."),
|
|
152
|
+
dryRun: DRY_RUN_FIELD,
|
|
153
|
+
},
|
|
154
|
+
}, async (args) => {
|
|
155
|
+
const auth = await ctx.resolveToolAuth();
|
|
156
|
+
if (!auth.ok)
|
|
157
|
+
return auth.response;
|
|
158
|
+
const opts = {};
|
|
159
|
+
if (args.limit !== undefined)
|
|
160
|
+
opts.limit = args.limit;
|
|
161
|
+
if (args.dryRun === true) {
|
|
162
|
+
// Surface the actual wire variable (`limit`) the apply path
|
|
163
|
+
// will send. When the caller omits `limit`, the apply path
|
|
164
|
+
// defaults to {@link timesheet.DEFAULT_PENDING_LIMIT}; the
|
|
165
|
+
// preview surfaces the same default so the dry-run reflects
|
|
166
|
+
// the exact request shape.
|
|
167
|
+
const limit = args.limit ?? timesheet.DEFAULT_PENDING_LIMIT;
|
|
168
|
+
return dryRunResponse(buildMcpDryRunPreview("PendingTimesheets", "mobile-gateway", { limit }, auth.token));
|
|
169
|
+
}
|
|
170
|
+
try {
|
|
171
|
+
const items = await timesheet.list(auth.token, opts);
|
|
172
|
+
return successResponse(items);
|
|
173
|
+
}
|
|
174
|
+
catch (err) {
|
|
175
|
+
return mapTimesheetError(err);
|
|
176
|
+
}
|
|
177
|
+
});
|
|
95
178
|
server.registerTool("ttctl_timesheet_show", {
|
|
96
179
|
title: "Show one timesheet by id",
|
|
97
180
|
description: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timesheet.js","sourceRoot":"","sources":["../../src/tools/timesheet.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAGpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,8BAA8B,EAAE,MAAM,cAAc,CAAC;AAE9D,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAgC,MAAM,cAAc,CAAC;AAEnG,MAAM,aAAa,GAAG,CAAC;KACpB,OAAO,EAAE;KACT,QAAQ,EAAE;KACV,QAAQ,CACP,+JAA+J,CAChK,CAAC;AAEJ;;;;;;;GAOG;AACH,MAAM,+BAA+B,GAAG,+BAA+B,CAAC;AAExE
|
|
1
|
+
{"version":3,"file":"timesheet.js","sourceRoot":"","sources":["../../src/tools/timesheet.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAGpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,8BAA8B,EAAE,MAAM,cAAc,CAAC;AAE9D,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAgC,MAAM,cAAc,CAAC;AAEnG,MAAM,aAAa,GAAG,CAAC;KACpB,OAAO,EAAE;KACT,QAAQ,EAAE;KACV,QAAQ,CACP,+JAA+J,CAChK,CAAC;AAEJ;;;;;;;GAOG;AACH,MAAM,+BAA+B,GAAG,+BAA+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AC;QACjJ;YACE,OAAO,qDAAqD,CAAC;IACjE,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttctl/mcp",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.4",
|
|
4
4
|
"description": "TTCtl MCP server exposing Toptal Talent operations to AI assistants",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@modelcontextprotocol/sdk": "^1.28.0",
|
|
39
39
|
"zod": "^4.4.3",
|
|
40
|
-
"@ttctl/core": "^0.1.0-rc.
|
|
40
|
+
"@ttctl/core": "^0.1.0-rc.4"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"clean": "rm -rf dist tsconfig.tsbuildinfo",
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
/**
|
|
3
|
-
* MCP `outputSchema` definitions for the top-10 write-capable tools
|
|
4
|
-
* (#226). Each schema mirrors the TypeScript return type from
|
|
5
|
-
* `@ttctl/core` so LLM clients reading the tool registry can validate
|
|
6
|
-
* the structured payload they receive.
|
|
7
|
-
*
|
|
8
|
-
* Each schema describes the SUCCESS-path payload only. Dry-run responses
|
|
9
|
-
* use the uniform `{ ok, dryRun, preview }` envelope advertised via the
|
|
10
|
-
* tool description (see `_shared.ts` § `dryRunResponse`) and intentionally
|
|
11
|
-
* carry NO `structuredContent` — the SDK skips `outputSchema` validation
|
|
12
|
-
* when `structuredContent` is absent (per `@modelcontextprotocol/sdk`
|
|
13
|
-
* `_validateOutput`), so dry-run paths bypass success-shape validation
|
|
14
|
-
* cleanly.
|
|
15
|
-
*
|
|
16
|
-
* The MCP SDK's `normalizeObjectSchema` accepts only ZodObject shapes for
|
|
17
|
-
* `outputSchema`; unions and discriminated unions are silently dropped.
|
|
18
|
-
* Therefore each schema below is a single `z.object()` describing the
|
|
19
|
-
* apply-path payload — sufficient for the AC ("LLM clients can validate
|
|
20
|
-
* tool output against the schema").
|
|
21
|
-
*/
|
|
22
|
-
/**
|
|
23
|
-
* Shape returned by `profile.basic.set()` on the apply path —
|
|
24
|
-
* mirrors `UpdateProfileResult` from `@ttctl/core`.
|
|
25
|
-
*/
|
|
26
|
-
export declare const profileBasicUpdateOutputSchema: z.ZodObject<{
|
|
27
|
-
profile: z.ZodObject<{
|
|
28
|
-
id: z.ZodString;
|
|
29
|
-
about: z.ZodNullable<z.ZodString>;
|
|
30
|
-
quote: z.ZodNullable<z.ZodString>;
|
|
31
|
-
}, z.core.$strip>;
|
|
32
|
-
notice: z.ZodNullable<z.ZodString>;
|
|
33
|
-
}, z.core.$strip>;
|
|
34
|
-
/**
|
|
35
|
-
* Shape returned by `profile.basic.photoUpload()` — mirrors `PhotoUrl`
|
|
36
|
-
* from `@ttctl/core`.
|
|
37
|
-
*/
|
|
38
|
-
export declare const profileBasicPhotoUploadOutputSchema: z.ZodObject<{
|
|
39
|
-
default: z.ZodNullable<z.ZodString>;
|
|
40
|
-
original: z.ZodNullable<z.ZodString>;
|
|
41
|
-
small: z.ZodNullable<z.ZodString>;
|
|
42
|
-
cropped: z.ZodNullable<z.ZodObject<{
|
|
43
|
-
x: z.ZodNumber;
|
|
44
|
-
y: z.ZodNumber;
|
|
45
|
-
width: z.ZodNumber;
|
|
46
|
-
height: z.ZodNumber;
|
|
47
|
-
}, z.core.$strip>>;
|
|
48
|
-
isResolutionSatisfied: z.ZodBoolean;
|
|
49
|
-
}, z.core.$strip>;
|
|
50
|
-
/**
|
|
51
|
-
* Shape returned by `profile.resume.upload()` — mirrors
|
|
52
|
-
* `UploadResumeResult` from `@ttctl/core`.
|
|
53
|
-
*/
|
|
54
|
-
export declare const profileResumeUploadOutputSchema: z.ZodObject<{
|
|
55
|
-
success: z.ZodBoolean;
|
|
56
|
-
}, z.core.$strip>;
|
|
57
|
-
/**
|
|
58
|
-
* Shape returned by `profile.education.add()` / `update()` — mirrors
|
|
59
|
-
* `Education` from `@ttctl/core`.
|
|
60
|
-
*/
|
|
61
|
-
export declare const profileEducationRowOutputSchema: z.ZodObject<{
|
|
62
|
-
id: z.ZodString;
|
|
63
|
-
institution: z.ZodString;
|
|
64
|
-
degree: z.ZodString;
|
|
65
|
-
fieldOfStudy: z.ZodNullable<z.ZodString>;
|
|
66
|
-
location: z.ZodNullable<z.ZodString>;
|
|
67
|
-
title: z.ZodNullable<z.ZodString>;
|
|
68
|
-
yearFrom: z.ZodNullable<z.ZodNumber>;
|
|
69
|
-
yearTo: z.ZodNullable<z.ZodNumber>;
|
|
70
|
-
highlight: z.ZodBoolean;
|
|
71
|
-
}, z.core.$strip>;
|
|
72
|
-
/**
|
|
73
|
-
* Shape returned by the `*_remove` tools' structured-content slot —
|
|
74
|
-
* `{ id, removed: true }`. The `text` content slot retains the
|
|
75
|
-
* human-readable confirmation; `structuredContent` exposes a typed
|
|
76
|
-
* acknowledgment.
|
|
77
|
-
*/
|
|
78
|
-
export declare const profileRowRemoveOutputSchema: z.ZodObject<{
|
|
79
|
-
id: z.ZodString;
|
|
80
|
-
removed: z.ZodLiteral<true>;
|
|
81
|
-
}, z.core.$strip>;
|
|
82
|
-
/**
|
|
83
|
-
* Shape returned by `profile.employment.add()` / `update()` — mirrors
|
|
84
|
-
* `Employment` from `@ttctl/core`. The last four fields were added in
|
|
85
|
-
* #344 to close the write/read asymmetry; they MUST stay in sync with
|
|
86
|
-
* the `Employment` interface or the `add`/`update` tools' declared
|
|
87
|
-
* output schema would under-report the rows they actually return.
|
|
88
|
-
*/
|
|
89
|
-
export declare const profileEmploymentRowOutputSchema: z.ZodObject<{
|
|
90
|
-
id: z.ZodString;
|
|
91
|
-
company: z.ZodString;
|
|
92
|
-
position: z.ZodString;
|
|
93
|
-
companyWebsite: z.ZodNullable<z.ZodString>;
|
|
94
|
-
noWebsite: z.ZodBoolean;
|
|
95
|
-
startDate: z.ZodNullable<z.ZodNumber>;
|
|
96
|
-
endDate: z.ZodNullable<z.ZodNumber>;
|
|
97
|
-
experienceItems: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
98
|
-
highlight: z.ZodBoolean;
|
|
99
|
-
showViaToptal: z.ZodBoolean;
|
|
100
|
-
toptalRelated: z.ZodBoolean;
|
|
101
|
-
publicationPermit: z.ZodNullable<z.ZodBoolean>;
|
|
102
|
-
reportingTo: z.ZodNullable<z.ZodString>;
|
|
103
|
-
industries: z.ZodArray<z.ZodObject<{
|
|
104
|
-
id: z.ZodString;
|
|
105
|
-
name: z.ZodString;
|
|
106
|
-
}, z.core.$strip>>;
|
|
107
|
-
primaryGeography: z.ZodNullable<z.ZodObject<{
|
|
108
|
-
id: z.ZodString;
|
|
109
|
-
code: z.ZodNullable<z.ZodString>;
|
|
110
|
-
name: z.ZodNullable<z.ZodString>;
|
|
111
|
-
}, z.core.$strip>>;
|
|
112
|
-
}, z.core.$strip>;
|
|
113
|
-
/**
|
|
114
|
-
* Shape returned by `profile.industries.update()` / `show()` — mirrors
|
|
115
|
-
* `IndustryProfile` from `@ttctl/core`.
|
|
116
|
-
*/
|
|
117
|
-
export declare const profileIndustriesRowOutputSchema: z.ZodObject<{
|
|
118
|
-
id: z.ZodString;
|
|
119
|
-
title: z.ZodString;
|
|
120
|
-
about: z.ZodNullable<z.ZodString>;
|
|
121
|
-
domainArea: z.ZodNullable<z.ZodString>;
|
|
122
|
-
}, z.core.$strip>;
|
|
123
|
-
/**
|
|
124
|
-
* Tool names (frozen) that the test suite asserts must carry a populated
|
|
125
|
-
* `outputSchema`. Adding a new write-capable tool: append its name here
|
|
126
|
-
* and define the schema above.
|
|
127
|
-
*/
|
|
128
|
-
export declare const TOOLS_WITH_OUTPUT_SCHEMA: readonly ["ttctl_profile_basic_update", "ttctl_profile_basic_photo_upload", "ttctl_profile_resume_upload", "ttctl_profile_education_add", "ttctl_profile_education_update", "ttctl_profile_education_remove", "ttctl_profile_employment_add", "ttctl_profile_employment_update", "ttctl_profile_employment_remove", "ttctl_profile_industries_update", "ttctl_profile_industries_show"];
|
|
129
|
-
//# sourceMappingURL=output-schemas.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"output-schemas.d.ts","sourceRoot":"","sources":["../../src/tools/output-schemas.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;GAGG;AACH,eAAO,MAAM,8BAA8B;;;;;;;iBAOzC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;iBAa9C,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;iBAE1C,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;iBAU1C,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B;;;iBAGvC,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;iBAgB3C,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,gCAAgC;;;;;iBAK3C,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,yXAY3B,CAAC"}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
-
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
/**
|
|
5
|
-
* MCP `outputSchema` definitions for the top-10 write-capable tools
|
|
6
|
-
* (#226). Each schema mirrors the TypeScript return type from
|
|
7
|
-
* `@ttctl/core` so LLM clients reading the tool registry can validate
|
|
8
|
-
* the structured payload they receive.
|
|
9
|
-
*
|
|
10
|
-
* Each schema describes the SUCCESS-path payload only. Dry-run responses
|
|
11
|
-
* use the uniform `{ ok, dryRun, preview }` envelope advertised via the
|
|
12
|
-
* tool description (see `_shared.ts` § `dryRunResponse`) and intentionally
|
|
13
|
-
* carry NO `structuredContent` — the SDK skips `outputSchema` validation
|
|
14
|
-
* when `structuredContent` is absent (per `@modelcontextprotocol/sdk`
|
|
15
|
-
* `_validateOutput`), so dry-run paths bypass success-shape validation
|
|
16
|
-
* cleanly.
|
|
17
|
-
*
|
|
18
|
-
* The MCP SDK's `normalizeObjectSchema` accepts only ZodObject shapes for
|
|
19
|
-
* `outputSchema`; unions and discriminated unions are silently dropped.
|
|
20
|
-
* Therefore each schema below is a single `z.object()` describing the
|
|
21
|
-
* apply-path payload — sufficient for the AC ("LLM clients can validate
|
|
22
|
-
* tool output against the schema").
|
|
23
|
-
*/
|
|
24
|
-
/**
|
|
25
|
-
* Shape returned by `profile.basic.set()` on the apply path —
|
|
26
|
-
* mirrors `UpdateProfileResult` from `@ttctl/core`.
|
|
27
|
-
*/
|
|
28
|
-
export const profileBasicUpdateOutputSchema = z.object({
|
|
29
|
-
profile: z.object({
|
|
30
|
-
id: z.string(),
|
|
31
|
-
about: z.string().nullable(),
|
|
32
|
-
quote: z.string().nullable(),
|
|
33
|
-
}),
|
|
34
|
-
notice: z.string().nullable(),
|
|
35
|
-
});
|
|
36
|
-
/**
|
|
37
|
-
* Shape returned by `profile.basic.photoUpload()` — mirrors `PhotoUrl`
|
|
38
|
-
* from `@ttctl/core`.
|
|
39
|
-
*/
|
|
40
|
-
export const profileBasicPhotoUploadOutputSchema = z.object({
|
|
41
|
-
default: z.string().nullable(),
|
|
42
|
-
original: z.string().nullable(),
|
|
43
|
-
small: z.string().nullable(),
|
|
44
|
-
cropped: z
|
|
45
|
-
.object({
|
|
46
|
-
x: z.number(),
|
|
47
|
-
y: z.number(),
|
|
48
|
-
width: z.number(),
|
|
49
|
-
height: z.number(),
|
|
50
|
-
})
|
|
51
|
-
.nullable(),
|
|
52
|
-
isResolutionSatisfied: z.boolean(),
|
|
53
|
-
});
|
|
54
|
-
/**
|
|
55
|
-
* Shape returned by `profile.resume.upload()` — mirrors
|
|
56
|
-
* `UploadResumeResult` from `@ttctl/core`.
|
|
57
|
-
*/
|
|
58
|
-
export const profileResumeUploadOutputSchema = z.object({
|
|
59
|
-
success: z.boolean(),
|
|
60
|
-
});
|
|
61
|
-
/**
|
|
62
|
-
* Shape returned by `profile.education.add()` / `update()` — mirrors
|
|
63
|
-
* `Education` from `@ttctl/core`.
|
|
64
|
-
*/
|
|
65
|
-
export const profileEducationRowOutputSchema = z.object({
|
|
66
|
-
id: z.string(),
|
|
67
|
-
institution: z.string(),
|
|
68
|
-
degree: z.string(),
|
|
69
|
-
fieldOfStudy: z.string().nullable(),
|
|
70
|
-
location: z.string().nullable(),
|
|
71
|
-
title: z.string().nullable(),
|
|
72
|
-
yearFrom: z.number().nullable(),
|
|
73
|
-
yearTo: z.number().nullable(),
|
|
74
|
-
highlight: z.boolean(),
|
|
75
|
-
});
|
|
76
|
-
/**
|
|
77
|
-
* Shape returned by the `*_remove` tools' structured-content slot —
|
|
78
|
-
* `{ id, removed: true }`. The `text` content slot retains the
|
|
79
|
-
* human-readable confirmation; `structuredContent` exposes a typed
|
|
80
|
-
* acknowledgment.
|
|
81
|
-
*/
|
|
82
|
-
export const profileRowRemoveOutputSchema = z.object({
|
|
83
|
-
id: z.string(),
|
|
84
|
-
removed: z.literal(true),
|
|
85
|
-
});
|
|
86
|
-
/**
|
|
87
|
-
* Shape returned by `profile.employment.add()` / `update()` — mirrors
|
|
88
|
-
* `Employment` from `@ttctl/core`. The last four fields were added in
|
|
89
|
-
* #344 to close the write/read asymmetry; they MUST stay in sync with
|
|
90
|
-
* the `Employment` interface or the `add`/`update` tools' declared
|
|
91
|
-
* output schema would under-report the rows they actually return.
|
|
92
|
-
*/
|
|
93
|
-
export const profileEmploymentRowOutputSchema = z.object({
|
|
94
|
-
id: z.string(),
|
|
95
|
-
company: z.string(),
|
|
96
|
-
position: z.string(),
|
|
97
|
-
companyWebsite: z.string().nullable(),
|
|
98
|
-
noWebsite: z.boolean(),
|
|
99
|
-
startDate: z.number().nullable(),
|
|
100
|
-
endDate: z.number().nullable(),
|
|
101
|
-
experienceItems: z.array(z.string()).nullable(),
|
|
102
|
-
highlight: z.boolean(),
|
|
103
|
-
showViaToptal: z.boolean(),
|
|
104
|
-
toptalRelated: z.boolean(),
|
|
105
|
-
publicationPermit: z.boolean().nullable(),
|
|
106
|
-
reportingTo: z.string().nullable(),
|
|
107
|
-
industries: z.array(z.object({ id: z.string(), name: z.string() })),
|
|
108
|
-
primaryGeography: z.object({ id: z.string(), code: z.string().nullable(), name: z.string().nullable() }).nullable(),
|
|
109
|
-
});
|
|
110
|
-
/**
|
|
111
|
-
* Shape returned by `profile.industries.update()` / `show()` — mirrors
|
|
112
|
-
* `IndustryProfile` from `@ttctl/core`.
|
|
113
|
-
*/
|
|
114
|
-
export const profileIndustriesRowOutputSchema = z.object({
|
|
115
|
-
id: z.string(),
|
|
116
|
-
title: z.string(),
|
|
117
|
-
about: z.string().nullable(),
|
|
118
|
-
domainArea: z.string().nullable(),
|
|
119
|
-
});
|
|
120
|
-
/**
|
|
121
|
-
* Tool names (frozen) that the test suite asserts must carry a populated
|
|
122
|
-
* `outputSchema`. Adding a new write-capable tool: append its name here
|
|
123
|
-
* and define the schema above.
|
|
124
|
-
*/
|
|
125
|
-
export const TOOLS_WITH_OUTPUT_SCHEMA = [
|
|
126
|
-
"ttctl_profile_basic_update",
|
|
127
|
-
"ttctl_profile_basic_photo_upload",
|
|
128
|
-
"ttctl_profile_resume_upload",
|
|
129
|
-
"ttctl_profile_education_add",
|
|
130
|
-
"ttctl_profile_education_update",
|
|
131
|
-
"ttctl_profile_education_remove",
|
|
132
|
-
"ttctl_profile_employment_add",
|
|
133
|
-
"ttctl_profile_employment_update",
|
|
134
|
-
"ttctl_profile_employment_remove",
|
|
135
|
-
"ttctl_profile_industries_update",
|
|
136
|
-
"ttctl_profile_industries_show",
|
|
137
|
-
];
|
|
138
|
-
//# sourceMappingURL=output-schemas.js.map
|
|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