@ttctl/mcp 0.1.0-rc.7 → 0.1.0-rc.8

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.
@@ -1 +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,qBAAqB,EAAE,cAAc,EAAE,YAAY,EAAgC,MAAM,cAAc,CAAC;AAEjH,MAAM,aAAa,GAAG,CAAC;KACpB,OAAO,EAAE;KACT,QAAQ,EAAE;KACV,QAAQ,CACP,+JAA+J,CAChK,CAAC;AAEJ;;;;;;;;;;;GAWG;AACH,MAAM,kBAAkB,GAAG,qBAAqB,CAAC;AAEjD,MAAM,cAAc,GAA2B;IAC7C,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,EAAE;IACL,CAAC,EAAE,EAAE,GAAG,CAAC;CACV,CAAC;AAEF,SAAS,mBAAmB,CAAC,KAAa;IACxC,MAAM,KAAK,GAAG,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IACpD,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAChC,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAC7B,IAAI,WAAW,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IAC3C,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,QAAQ,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IA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BAA8B,CAAC,GAAG,CAAC,CAAC;IAClD,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IACjC,IAAI,GAAG,YAAY,YAAY,CAAC,iBAAiB,EAAE,CAAC;QAClD,OAAO;YACL,OAAO,EAAE,IAAI;YACb,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE;wBACJ,UAAU,GAAG,CAAC,OAAO,EAAE;wBACvB,EAAE;wBACF,0DAA0D;wBAC1D,EAAE;wBACF,UAAU,GAAG,CAAC,IAAI,GAAG;qBACtB,CAAC,IAAI,CAAC,IAAI,CAAC;iBACb;aACF;SACF,CAAC;IACJ,CAAC;IACD,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,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"}
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,qBAAqB,EAAE,cAAc,EAAE,YAAY,EAAgC,MAAM,cAAc,CAAC;AAEjH,MAAM,aAAa,GAAG,CAAC;KACpB,OAAO,EAAE;KACT,QAAQ,EAAE;KACV,QAAQ,CACP,+JAA+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CAA4C,OAAO,EAAE;oBACrD,EAAE;oBACF,0DAA0D;oBAC1D,EAAE;oBACF,iBAAiB;iBAClB,CAAC,IAAI,CAAC,IAAI,CAAC;aACb;SACF;KACF,CAAC;AACJ,CAAC"}
@@ -7,7 +7,7 @@ import { type ToolRegistrationContext } from "./_shared.js";
7
7
  * `opportunities_*` aliasing (MCP tool names must be deterministic for
8
8
  * LLM clients).
9
9
  *
10
- * Tool surface (13 tools):
10
+ * Tool surface (17 tools):
11
11
  * - `ttctl_jobs_list`
12
12
  * - `ttctl_jobs_show`
13
13
  * - `ttctl_jobs_save`
@@ -21,6 +21,10 @@ import { type ToolRegistrationContext } from "./_shared.js";
21
21
  * - `ttctl_jobs_search_list`
22
22
  * - `ttctl_jobs_search_save`
23
23
  * - `ttctl_jobs_search_remove`
24
+ * - `ttctl_jobs_apply_data` (#436 — read)
25
+ * - `ttctl_jobs_apply_questions` (#436 — read)
26
+ * - `ttctl_jobs_apply_rate_insight` (#436 — read)
27
+ * - `ttctl_jobs_apply` (#436 — DESTRUCTIVE; consent-gated)
24
28
  *
25
29
  * **Wire-shape notes** (R1 / R2): `jobs_viewed` aggregates the FULL
26
30
  * eligibleJobs pool and applies a client-side filter on the `viewed`
@@ -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;AAoFnG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,uBAAuB,GAAG,IAAI,CAsgBvF"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,uBAAuB,GAAG,IAAI,CAuiBvF"}
@@ -1,6 +1,6 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-only
2
2
  // Copyright (C) 2026 Oleksii PELYKH
3
- import { jobs } from "@ttctl/core";
3
+ import { applications, jobs } from "@ttctl/core";
4
4
  import { z } from "zod";
5
5
  import { ttctlErrorToToolResponseOrNull } from "../errors.js";
6
6
  import { buildMcpDryRunPreview, dryRunResponse } from "./_shared.js";
@@ -64,7 +64,7 @@ function buildJobsPageInfo(page) {
64
64
  * `opportunities_*` aliasing (MCP tool names must be deterministic for
65
65
  * LLM clients).
66
66
  *
67
- * Tool surface (13 tools):
67
+ * Tool surface (17 tools):
68
68
  * - `ttctl_jobs_list`
69
69
  * - `ttctl_jobs_show`
70
70
  * - `ttctl_jobs_save`
@@ -78,6 +78,10 @@ function buildJobsPageInfo(page) {
78
78
  * - `ttctl_jobs_search_list`
79
79
  * - `ttctl_jobs_search_save`
80
80
  * - `ttctl_jobs_search_remove`
81
+ * - `ttctl_jobs_apply_data` (#436 — read)
82
+ * - `ttctl_jobs_apply_questions` (#436 — read)
83
+ * - `ttctl_jobs_apply_rate_insight` (#436 — read)
84
+ * - `ttctl_jobs_apply` (#436 — DESTRUCTIVE; consent-gated)
81
85
  *
82
86
  * **Wire-shape notes** (R1 / R2): `jobs_viewed` aggregates the FULL
83
87
  * eligibleJobs pool and applies a client-side filter on the `viewed`
@@ -592,6 +596,376 @@ export function registerJobsTools(server, ctx) {
592
596
  return mapJobsError(err);
593
597
  }
594
598
  });
599
+ // -------- apply tools (#436) -------------------------------------------
600
+ // Application-funnel write side: one DESTRUCTIVE mutation tool
601
+ // (`ttctl_jobs_apply`) + three read-only pre-apply tools
602
+ // (`ttctl_jobs_apply_data`, `ttctl_jobs_apply_questions`,
603
+ // `ttctl_jobs_apply_rate_insight`). The four tools mirror the CLI's
604
+ // application-funnel surface (#437 / #430) on the MCP side and
605
+ // delegate to the `applications.*` core fns landed in #424 / #426.
606
+ // ADR-008 § Decision Part 4 is the consent-gate substrate; Part 5
607
+ // is the apply core fn substrate.
608
+ //
609
+ // **`SimilarJobQuestionAnswers`**: the opt-in
610
+ // `ttctl_jobs_apply_similar_answers` tool (#452) registered below
611
+ // surfaces the talent's historical answers to questions
612
+ // semantically similar to those on a given job's apply form. The
613
+ // tool is read-only and explicitly OFF the agent's critical apply
614
+ // path — it is provided as a separate read tool so the LLM agent
615
+ // can choose to consult it before authoring `matcherAnswers` /
616
+ // `expertiseAnswers` for `ttctl_jobs_apply`.
617
+ //
618
+ // **Redaction**: the `matcherAnswers`, `expertiseAnswers`, and
619
+ // `pitchData` payloads are free-text talent-authored content and
620
+ // SHOULD be added to the diagnostic-log redaction allowlist
621
+ // (`packages/core/src/lib/redact.ts § SECRET_BODY_FIELD_NAMES`)
622
+ // so the MCP debug taxonomy's `args_redacted` slot does not echo
623
+ // them. That extension ships in #446 (docs + redaction) per the
624
+ // #436 AC; this tool registers the surface, #446 closes the
625
+ // redaction loop. Tracking comment lives at #446.
626
+ registerJobsApplyDataTool(server, ctx);
627
+ registerJobsApplyQuestionsTool(server, ctx);
628
+ registerJobsApplyRateInsightTool(server, ctx);
629
+ registerJobsApplyTool(server, ctx);
630
+ registerJobsApplySimilarAnswersTool(server, ctx);
631
+ }
632
+ // ---------------------------------------------------------------------
633
+ // Apply-funnel write-side tools (#436)
634
+ // ---------------------------------------------------------------------
635
+ function registerJobsApplyDataTool(server, ctx) {
636
+ server.registerTool("ttctl_jobs_apply_data", {
637
+ title: "Fetch pre-apply data for a job",
638
+ description: [
639
+ "Fetch the pre-apply data the Toptal portal renders on the",
640
+ "apply screen for a given job: position summary, recruiter-pinned",
641
+ "rate, suggested rate (defaults to the talent's configured rate),",
642
+ "currency, application status, and a `canApply` flag.",
643
+ "",
644
+ "Read-only — does not mutate any server state.",
645
+ "",
646
+ "Use this together with `ttctl_jobs_apply_questions` and",
647
+ "`ttctl_jobs_apply_rate_insight` to compose the context an LLM",
648
+ "agent needs before authoring an application via `ttctl_jobs_apply`.",
649
+ "",
650
+ "Example user prompts:",
651
+ ' - "What\'s the apply context for Toptal job <id>?"',
652
+ ' - "What rate is suggested for job <id>?"',
653
+ ].join("\n"),
654
+ inputSchema: {
655
+ id: z.string().describe("Job id (NOT the activity-item id)"),
656
+ dryRun: DRY_RUN_FIELD,
657
+ },
658
+ }, async (args) => {
659
+ const auth = await ctx.resolveToolAuth();
660
+ if (!auth.ok)
661
+ return auth.response;
662
+ if (args.dryRun === true) {
663
+ return dryRunResponse(buildMcpDryRunPreview("JobApplyData", "mobile-gateway", { jobId: args.id }, auth.token));
664
+ }
665
+ try {
666
+ const data = await applications.applyData(auth.token, args.id);
667
+ return successResponse(data);
668
+ }
669
+ catch (err) {
670
+ return mapApplicationsError(err);
671
+ }
672
+ });
673
+ }
674
+ function registerJobsApplyQuestionsTool(server, ctx) {
675
+ server.registerTool("ttctl_jobs_apply_questions", {
676
+ title: "Fetch matcher + expertise questions for a job's apply form",
677
+ description: [
678
+ "Fetch the matcher-questions and expertise-questions a job's",
679
+ "apply form requires the talent to answer. Returns",
680
+ "`{ matcherQuestions: [...], expertiseQuestions: [...] }` with",
681
+ "each entry carrying `identifier`, `body`, and any choice metadata",
682
+ "(for choice-style questions).",
683
+ "",
684
+ "Read-only — does not mutate any server state.",
685
+ "",
686
+ "Pair the returned `identifier` values with answers in the",
687
+ "`matcherAnswers` / `expertiseAnswers` payloads passed to",
688
+ "`ttctl_jobs_apply`; unknown identifiers are rejected by the",
689
+ "apply path with `WIRE_SHAPE_ERROR`.",
690
+ "",
691
+ "Example user prompts:",
692
+ ' - "What questions does Toptal job <id> ask on the apply form?"',
693
+ ' - "List the matcher and expertise questions for job <id>."',
694
+ ].join("\n"),
695
+ inputSchema: {
696
+ id: z.string().describe("Job id (NOT the activity-item id)"),
697
+ dryRun: DRY_RUN_FIELD,
698
+ },
699
+ }, async (args) => {
700
+ const auth = await ctx.resolveToolAuth();
701
+ if (!auth.ok)
702
+ return auth.response;
703
+ if (args.dryRun === true) {
704
+ return dryRunResponse(buildMcpDryRunPreview("JobApplicationQuestions", "mobile-gateway", { jobId: args.id }, auth.token));
705
+ }
706
+ try {
707
+ const questions = await applications.applyQuestions(auth.token, args.id);
708
+ return successResponse(questions);
709
+ }
710
+ catch (err) {
711
+ return mapApplicationsError(err);
712
+ }
713
+ });
714
+ }
715
+ function registerJobsApplyRateInsightTool(server, ctx) {
716
+ server.registerTool("ttctl_jobs_apply_rate_insight", {
717
+ title: "Fetch rate-competitiveness insight for a job",
718
+ description: [
719
+ "Fetch the rate-competitiveness insight the Toptal portal renders",
720
+ "alongside the apply screen's rate input. Returns either a",
721
+ "`competitive` variant (talent's rate is in range; carries a",
722
+ "`recommendedRate`) or an `uncompetitive` variant (talent's rate",
723
+ "is above the platform's expected band for this job).",
724
+ "",
725
+ "Read-only — does not mutate any server state.",
726
+ "",
727
+ "Pair this with `ttctl_jobs_apply_data` (which supplies the",
728
+ "suggested rate) to compose the rate-decision context an LLM",
729
+ "agent needs before invoking `ttctl_jobs_apply`. Returns `null`",
730
+ "when the platform does not surface an insight for this job.",
731
+ "",
732
+ "Example user prompts:",
733
+ ' - "Is my rate competitive for Toptal job <id>?"',
734
+ ' - "Get rate insight for job <id>."',
735
+ ].join("\n"),
736
+ inputSchema: {
737
+ id: z.string().describe("Job id (NOT the activity-item id)"),
738
+ dryRun: DRY_RUN_FIELD,
739
+ },
740
+ }, async (args) => {
741
+ const auth = await ctx.resolveToolAuth();
742
+ if (!auth.ok)
743
+ return auth.response;
744
+ if (args.dryRun === true) {
745
+ return dryRunResponse(buildMcpDryRunPreview("JobApplicationRateInsight", "mobile-gateway", { jobId: args.id }, auth.token));
746
+ }
747
+ try {
748
+ const insight = await applications.rateInsight(auth.token, args.id);
749
+ return successResponse(insight);
750
+ }
751
+ catch (err) {
752
+ return mapApplicationsError(err);
753
+ }
754
+ });
755
+ }
756
+ function registerJobsApplyTool(server, ctx) {
757
+ server.registerTool("ttctl_jobs_apply", {
758
+ title: "Apply to a Toptal job",
759
+ description: [
760
+ "Submit a direct application to a Toptal job — the wire mutation",
761
+ "`JobApply` (mobile-gateway). Mirror of the Toptal portal's",
762
+ "apply screen submit action.",
763
+ "",
764
+ "**DESTRUCTIVE** — applying creates a new `JobApplication` row on",
765
+ "the user's Toptal activity and notifies the recruiter. There is",
766
+ "no withdraw operation on the wire. Always preview with",
767
+ "`dryRun: true` first if uncertain.",
768
+ "",
769
+ "**Consent gate (legal compliance)**: `consentIssued` MUST be the",
770
+ "literal `true` — represents the talent's acceptance of Toptal's",
771
+ "apply terms (the consent affirmation rendered on the apply",
772
+ "screen). Auto-filling this on the talent's behalf without",
773
+ "explicit user direction is FORBIDDEN per ADR-008 § Decision",
774
+ "Part 4. The Zod schema enforces the literal at the input-",
775
+ "validation boundary; the core service repeats the runtime check",
776
+ "before any wire call.",
777
+ "",
778
+ "**Fields**:",
779
+ " - `id` (required): Job id (NOT the activity-item id). Discover",
780
+ " via `ttctl_jobs_list` or `ttctl_jobs_search_*`.",
781
+ " - `consentIssued` (required, MUST be `true`): legal-compliance",
782
+ " attestation. See gate above.",
783
+ " - `requestedHourlyRate` (required): decimal hourly rate (e.g.",
784
+ ' `"95.00"`) the talent requests. The portal pre-fills this',
785
+ " from `ttctl_jobs_apply_data.suggestedRate`; agents SHOULD",
786
+ " surface that value to the user and pass it back explicitly.",
787
+ " - `message` (optional): free-text accompanying message. Mapped",
788
+ " to the wire's `comment` field.",
789
+ " - `matcherAnswers` (optional): array of matcher-question",
790
+ " answers. Each entry is `{ id: string, answer: string }` per",
791
+ " the recovered `JobPositionAnswerInput` shape (#438 Stage-2);",
792
+ " `id` MUST match an `identifier` returned from",
793
+ " `ttctl_jobs_apply_questions`. Forwarded as the wire's",
794
+ " `matcherQuestionsAnswers` variable. Validated against",
795
+ " `z.array(JobPositionAnswerInputSchema().strict())` — extra",
796
+ " unknown keys reject with a field-path error.",
797
+ " - `expertiseAnswers` (optional): array of expertise-question",
798
+ " answers. Each entry is `{ questionId: string, other: string|null,",
799
+ " subjectId: string|null }` per the recovered",
800
+ " `JobExpertiseAnswerInput` shape. Note the asymmetric id-field",
801
+ " name vs matcher: `questionId` here, `id` for matcher.",
802
+ " Forwarded as the wire's `expertiseQuestionsAnswers` variable.",
803
+ " - `pitchData` (optional): a `PitchInput` object — see the",
804
+ " recovered `PitchInputSchema` for the field surface (arrays of",
805
+ " typed `PitchItem*Input` plus the opaque `mentorship` position).",
806
+ " Forwarded as the wire's `talentCard` variable. Validated",
807
+ " against the recovered Zod shape per #438.",
808
+ "",
809
+ "Example call with question answers and a pitch:",
810
+ " ```json",
811
+ " {",
812
+ ' "id": "<jobId>",',
813
+ ' "consentIssued": true,',
814
+ ' "requestedHourlyRate": "95.00",',
815
+ ' "matcherAnswers": [',
816
+ ' { "id": "MQ-1", "answer": "..." },',
817
+ ' { "id": "MQ-2", "answer": "..." }',
818
+ " ],",
819
+ ' "expertiseAnswers": [',
820
+ ' { "questionId": "EQ-1", "other": null, "subjectId": "Skill:1" }',
821
+ " ],",
822
+ ' "pitchData": { "skillPitchItems": [{ "skillSetId": "S1" }] },',
823
+ ' "message": "Available starting next Monday."',
824
+ " }",
825
+ " ```",
826
+ "",
827
+ "Returns the new `JobApplication` record (`id`, `statusV2`,",
828
+ "`requestedHourlyRate`, `jobActivityItemId`) on success.",
829
+ "Already-applied requests surface as a structured",
830
+ "`(ALREADY_APPLIED)` error with a hint pointing at",
831
+ "`ttctl_applications_show <activity-id>` for the existing row.",
832
+ ].join("\n"),
833
+ inputSchema: {
834
+ id: z.string().describe("Job id (NOT the activity-item id)"),
835
+ consentIssued: z
836
+ .literal(true)
837
+ .describe("MUST be true. Legal-compliance gate per Toptal apply screen — represents the talent's acceptance of Toptal's apply terms. Auto-filling without explicit user direction is FORBIDDEN."),
838
+ requestedHourlyRate: z
839
+ .string()
840
+ .describe("Decimal hourly rate (e.g. '95.00'). The portal pre-fills this from `ttctl_jobs_apply_data.suggestedRate` — surface that value to the user and pass it back explicitly."),
841
+ message: z
842
+ .string()
843
+ .optional()
844
+ .describe("Optional talent free-text accompanying message. Wire field: `comment`."),
845
+ matcherAnswers: z
846
+ .array(applications.JobPositionAnswerInputSchema().strict())
847
+ .optional()
848
+ .describe("Optional matcher-questions answers. Array of `{ id: string, answer: string }` objects (`JobPositionAnswerInput[]`); `id` references an `identifier` returned from `ttctl_jobs_apply_questions`. Forwarded as the wire's `matcherQuestionsAnswers` variable. Validated against the recovered Zod shape per #438 — extra keys reject."),
849
+ expertiseAnswers: z
850
+ .array(applications.JobExpertiseAnswerInputSchema().strict())
851
+ .optional()
852
+ .describe("Optional expertise-questions answers. Array of `{ questionId: string, other: string|null, subjectId: string|null }` objects (`JobExpertiseAnswerInput[]`); `questionId` references an `identifier` returned from `ttctl_jobs_apply_questions`. Forwarded as the wire's `expertiseQuestionsAnswers` variable. Validated against the recovered Zod shape per #438."),
853
+ pitchData: applications
854
+ .PitchInputSchema()
855
+ .strict()
856
+ .optional()
857
+ .describe("Optional `PitchInput` object — see the recovered `PitchInputSchema` for the field surface. Forwarded as the wire's `talentCard` variable. Validated against the recovered Zod shape per #438; extra keys reject."),
858
+ dryRun: DRY_RUN_FIELD,
859
+ },
860
+ }, async (args) => {
861
+ const auth = await ctx.resolveToolAuth();
862
+ if (!auth.ok)
863
+ return auth.response;
864
+ // The Zod schema's `consentIssued: z.literal(true)` already
865
+ // enforces the consent gate at the input-validation boundary —
866
+ // any other value (false / undefined / wrong type) rejects
867
+ // BEFORE this handler runs. The runtime narrowing here just
868
+ // propagates the literal type into the `ApplyInput` shape.
869
+ const input = {
870
+ consentIssued: args.consentIssued,
871
+ requestedHourlyRate: args.requestedHourlyRate,
872
+ };
873
+ if (args.message !== undefined)
874
+ input.message = args.message;
875
+ if (args.matcherAnswers !== undefined)
876
+ input.matcherAnswers = args.matcherAnswers;
877
+ if (args.expertiseAnswers !== undefined)
878
+ input.expertiseAnswers = args.expertiseAnswers;
879
+ if (args.pitchData !== undefined)
880
+ input.pitchData = args.pitchData;
881
+ try {
882
+ const outcome = await applications.apply(auth.token, args.id, input, {
883
+ dryRun: args.dryRun === true,
884
+ });
885
+ if (outcome.kind === "preview") {
886
+ return dryRunResponse(outcome.preview);
887
+ }
888
+ return successResponse(outcome.result);
889
+ }
890
+ catch (err) {
891
+ return mapApplicationsError(err);
892
+ }
893
+ });
894
+ }
895
+ function registerJobsApplySimilarAnswersTool(server, ctx) {
896
+ server.registerTool("ttctl_jobs_apply_similar_answers", {
897
+ title: "Fetch similar historical answers for a job's apply-form questions",
898
+ description: [
899
+ "Fetch the talent's own historical answers to questions",
900
+ "semantically similar to those on a given job's apply form —",
901
+ "advisory autocomplete suggestions an LLM agent can offer the",
902
+ "user when authoring `matcherAnswers` / `expertiseAnswers` for",
903
+ "`ttctl_jobs_apply`.",
904
+ "",
905
+ "Read-only — does not mutate any server state.",
906
+ "",
907
+ "**Off the critical apply path**: this tool is intentionally a",
908
+ "SEPARATE read step from `ttctl_jobs_apply_data` /",
909
+ "`ttctl_jobs_apply_questions` / `ttctl_jobs_apply_rate_insight`.",
910
+ "The underlying wire query (`SimilarJobQuestionAnswers`) is",
911
+ "heavier (server-side semantic-similarity computation) and many",
912
+ "talent accounts — especially new specializations — have no",
913
+ "similar-job history, so the result is often empty. Call this",
914
+ "tool when the user wants autocomplete suggestions; skip it",
915
+ "otherwise.",
916
+ "",
917
+ "**How to use the output**: the tool returns one",
918
+ "`SimilarJobAnswerGroup` per question on the job's apply form",
919
+ "(matcher AND expertise, interleaved in the same order as the",
920
+ "`ttctl_jobs_apply_questions` inventory). Each group's",
921
+ "`suggestions` array carries `{ id, answer, createdAt }` entries.",
922
+ "The `answer` text can be surfaced to the user as candidate",
923
+ "values for the corresponding question; **DO NOT** silently",
924
+ "auto-fill the apply payload — these are advisory suggestions,",
925
+ "not the talent's stated answers.",
926
+ "",
927
+ "Returns `[]` when the job has no questions on its apply form,",
928
+ "or one group per question with an empty `suggestions` array",
929
+ "when the talent has no similar-job history for that question.",
930
+ "",
931
+ "**Cardinality note**: under the hood, this issues one",
932
+ "`SimilarJobQuestionAnswers` call per question on the job's",
933
+ "apply form (one per matcher + one per expertise question). The",
934
+ "fan-out is internal; a single tool invocation returns the",
935
+ "aggregated result.",
936
+ "",
937
+ "Example user prompts:",
938
+ ' - "What past answers do I have that might fit job <id>?"',
939
+ ' - "Suggest answers for the apply form of job <id>."',
940
+ ' - "Show me autocomplete candidates for job <id>\'s questions."',
941
+ ].join("\n"),
942
+ inputSchema: {
943
+ id: z.string().describe("Job id (NOT the activity-item id)"),
944
+ dryRun: DRY_RUN_FIELD,
945
+ },
946
+ }, async (args) => {
947
+ const auth = await ctx.resolveToolAuth();
948
+ if (!auth.ok)
949
+ return auth.response;
950
+ if (args.dryRun === true) {
951
+ // Dry-run preview surfaces the OUTER `JobApplicationQuestions`
952
+ // pre-fetch (which `similarAnswers` calls first to enumerate
953
+ // question identifiers). The N parallel
954
+ // `SimilarJobQuestionAnswers` calls that fan out from there
955
+ // are internal to the core fn and are NOT represented in the
956
+ // preview envelope — the agent can read the question inventory
957
+ // separately via `ttctl_jobs_apply_questions` if they want to
958
+ // see what the fan-out would touch.
959
+ return dryRunResponse(buildMcpDryRunPreview("JobApplicationQuestions", "mobile-gateway", { jobId: args.id }, auth.token));
960
+ }
961
+ try {
962
+ const suggestions = await applications.similarAnswers(auth.token, args.id);
963
+ return successResponse(suggestions);
964
+ }
965
+ catch (err) {
966
+ return mapApplicationsError(err);
967
+ }
968
+ });
595
969
  }
596
970
  function successResponse(data) {
597
971
  return {
@@ -640,4 +1014,63 @@ function mapJobsError(err) {
640
1014
  ],
641
1015
  };
642
1016
  }
1017
+ /**
1018
+ * Error mapping for the `ttctl_jobs_apply*` tools (#436). The four
1019
+ * apply-funnel tools all delegate to `applications.*` core fns, which
1020
+ * throw {@link applications.ApplicationsError} (NOT
1021
+ * {@link jobs.JobsError}). Mirrors the `mapInterestRequestsError`
1022
+ * pattern in `interest_requests.ts`, with apply-specific recovery
1023
+ * hints for `NOT_FOUND` (verify job id), `CONSENT_REQUIRED`
1024
+ * (defense-in-depth — the Zod literal gate already covers the input
1025
+ * boundary), and `ALREADY_APPLIED` (route the caller to
1026
+ * `ttctl_applications_show` for the existing row).
1027
+ */
1028
+ function mapApplicationsError(err) {
1029
+ const typed = ttctlErrorToToolResponseOrNull(err);
1030
+ if (typed !== null)
1031
+ return typed;
1032
+ if (err instanceof applications.ApplicationsError) {
1033
+ return {
1034
+ isError: true,
1035
+ content: [
1036
+ {
1037
+ type: "text",
1038
+ text: [
1039
+ `Error: ${err.message}`,
1040
+ "",
1041
+ err.code === "NOT_FOUND"
1042
+ ? "Recovery: Verify the job id (use ttctl_jobs_list to discover it)."
1043
+ : err.code === "CONSENT_REQUIRED"
1044
+ ? "Recovery: Pass `consentIssued: true` explicitly. Do NOT auto-fill on the talent's behalf without explicit user direction (ADR-008 § Decision Part 4)."
1045
+ : err.code === "ALREADY_APPLIED"
1046
+ ? "Recovery: You have already applied to this job. Use `ttctl_applications_show <activity-id>` to view the existing application."
1047
+ : err.code === "MUTATION_ERROR"
1048
+ ? "Recovery: Check the mutation input — the server reported a per-field validation failure."
1049
+ : err.code === "WIRE_SHAPE_ERROR"
1050
+ ? "Recovery: One of the supplied answers references a `questionId` not returned from `ttctl_jobs_apply_questions`. Re-fetch the questions and retry with valid identifiers."
1051
+ : "Recovery: Adjust the tool input or retry; see the code below.",
1052
+ "",
1053
+ `(Code: ${err.code})`,
1054
+ ].join("\n"),
1055
+ },
1056
+ ],
1057
+ };
1058
+ }
1059
+ const message = err instanceof Error ? err.message : String(err);
1060
+ return {
1061
+ isError: true,
1062
+ content: [
1063
+ {
1064
+ type: "text",
1065
+ text: [
1066
+ `Error: jobs request failed: ${message}`,
1067
+ "",
1068
+ "Recovery: Retry; if the failure persists, file an issue.",
1069
+ "",
1070
+ "(Code: UNKNOWN)",
1071
+ ].join("\n"),
1072
+ },
1073
+ ],
1074
+ };
1075
+ }
643
1076
  //# sourceMappingURL=jobs.js.map