@clien-ai/mcp 0.8.1 → 0.10.0

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":"interview.js","sourceRoot":"","sources":["../../src/tools/interview.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EACL,OAAO,EACP,oBAAoB,GAGrB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAE5E,MAAM,0BAA0B,GAAG,MAAM,CAAA;AAEzC,qFAAqF;AACrF,MAAM,WAAW,GAAG,MAAM,CAAA;AAE1B,6EAA6E;AAC7E,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,SAAS,EAAE,YAAY;IACvB,SAAS,EAAE,YAAY;IACvB,WAAW,EAAE,cAAc;CACnB,CAAA;AAEV,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,MAAM,EAAE,CAAC;SACN,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;SAC3D,QAAQ,CACP,kFAAkF;QAChF,uFAAuF;QACvF,sFAAsF;QACtF,kFAAkF;QAClF,4DAA4D,CAC/D;IACH,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,IAAI,EAAE;SACN,QAAQ,EAAE;SACV,QAAQ,CACP,2FAA2F;QACzF,2EAA2E,CAC9E;IACH,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,IAAI,EAAE;SACN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O,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,CAAC,SAAS,CAAC,EAAE,CAAC;QAC9D,KAAK,EAAE,EAAE,SAAS,EAAE;KACrB,CAAA;AACH,CAAC"}
@@ -125,6 +125,53 @@ export const LIST_PROJECTS_OUTPUT_SCHEMA = listSchema('projects');
125
125
  export const LIST_INTERVIEWS_OUTPUT_SCHEMA = listSchema('interviews');
126
126
  export const LIST_COMPETITORS_OUTPUT_SCHEMA = listSchema('competitors');
127
127
  export const LIST_COMMUNITY_SIGNALS_OUTPUT_SCHEMA = listSchema('communitySignals');
128
+ /**
129
+ * `get_market` → `{ market }` (FUL-511).
130
+ *
131
+ * `market` is `required` because the handler always sets the key — that PRESENCE
132
+ * is load-bearing, not bookkeeping: it is what lets a structured consumer tell
133
+ * "this project has no market snapshot" (`market: null`) from "the tool did not
134
+ * answer". The handler throws rather than emit the key on an unreadable body.
135
+ *
136
+ * Its VALUE is unconstrained for the usual reason plus one specific to this tool:
137
+ * `null` is a legitimate, meaningful answer here, so `type: 'object'` would make
138
+ * the honest empty state fail a strict client's validation.
139
+ */
140
+ export const GET_MARKET_OUTPUT_SCHEMA = objectSchema({ market: ANYTHING }, ['market']);
141
+ /**
142
+ * `list_interview_scripts` → `{ interviewScripts, sourceRun }` (FUL-514).
143
+ *
144
+ * `interviewScripts` is `required` because the handler always sets the key — that
145
+ * PRESENCE is load-bearing, not bookkeeping: it is what lets a structured consumer
146
+ * tell "no run has written scripts" (`null`) from "the tool did not answer". The
147
+ * handler throws rather than emit the key on an unreadable body.
148
+ *
149
+ * Its VALUE is unconstrained: `null` is a legitimate answer, so `type: 'array'`
150
+ * would make the honest empty state fail a strict client. `sourceRun` is NOT
151
+ * required — it is `null` on the no-run branch and, being backend-sourced, must not
152
+ * turn version skew into a hard failure.
153
+ */
154
+ export const LIST_INTERVIEW_SCRIPTS_OUTPUT_SCHEMA = objectSchema({ interviewScripts: ANYTHING, sourceRun: ANYTHING }, ['interviewScripts']);
128
155
  /** `list_reports` returns no pagination envelope — the endpoint takes `limit` only. */
129
156
  export const LIST_REPORTS_OUTPUT_SCHEMA = listSchema('jobs', false);
157
+ /**
158
+ * `get_credit_balance` → `{ credits }` (FUL-513).
159
+ *
160
+ * `credits` is `required` because the handler always sets the key — it throws rather
161
+ * than return a result without one, so its PRESENCE is what tells a structured consumer
162
+ * "here is the account's position" apart from "the tool did not answer". That matters
163
+ * more here than on most reads: the alternative reading of a missing balance is "zero",
164
+ * and zero is the answer that stops an agent doing work the user has already paid for.
165
+ *
166
+ * Its inner fields are NOT required and NOT typed, for this module's usual reason
167
+ * doubled. `balance` / `spendable` are legitimately `null` when the server sent no
168
+ * usable number — a real answer meaning "unknown", which a `type: 'number'` constraint
169
+ * would turn into a hard client-side failure at exactly the moment the honest degraded
170
+ * state was supposed to survive. `costs` is backend-sourced in full: the prices come
171
+ * from the app's pricing table, which this package cannot import and must never
172
+ * second-guess.
173
+ */
174
+ export const GET_CREDIT_BALANCE_OUTPUT_SCHEMA = objectSchema({
175
+ credits: objectSchema({ balance: ANYTHING, spendable: ANYTHING, costs: ANY_OBJECT_ARRAY }, []),
176
+ }, ['credits']);
130
177
  //# sourceMappingURL=output-schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"output-schemas.js","sourceRoot":"","sources":["../../src/tools/output-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,sEAAsE;AACtE,MAAM,UAAU,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,oBAAoB,EAAE,IAAI,EAAW,CAAA;AAE1E;;;;;;;;;;;GAWG;AACH,MAAM,QAAQ,GAAG,EAAW,CAAA;AAE5B,2EAA2E;AAC3E,MAAM,gBAAgB,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAW,CAAA;AAEtE;;;;;;;;;;GAUG;AACH,MAAM,UAAU,GAAG;IACj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UAAU,CAAC,kBAAkB,CAAC,CAAA;AAClF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEtF;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,YAAY,CAC9D,EAAE,gBAAgB,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,EACnD,CAAC,kBAAkB,CAAC,CACrB,CAAA;AAED,uFAAuF;AACvF,MAAM,CAAC,MAAM,0BAA0B,GAAG,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAEnE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,YAAY,CAC1D;IACE,OAAO,EAAE,YAAY,CACnB,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,gBAAgB,EAAE,EACnE,EAAE,CACH;CACF,EACD,CAAC,SAAS,CAAC,CACZ,CAAA"}
@@ -50,8 +50,11 @@
50
50
  * trajectory — persisted to the structured `personas.seniority` /
51
51
  * `personas.career_path` columns (the demographic shape of the role). Unlike
52
52
  * endowment/scope (folded into `background`), these are NOT echoed in the
53
- * returned persona object — they are a write-only persistence target that
54
- * M5c later reads back to calibrate against aggregate people distributions.
53
+ * returned persona object — this call only writes them, and M5c later reads
54
+ * them back to calibrate against aggregate people distributions. ⚠️ The
55
+ * COLUMNS are not write-only: FUL-488 lets the user overwrite both in the web
56
+ * app, so what this generation wrote is not necessarily what a later
57
+ * `get_persona` reads back (FUL-540).
55
58
  * - `enrich_persona` (FUL-77) — AI-fills the blank (or explicitly refreshed)
56
59
  * scalar fields of an EXISTING persona over `POST /api/personas/ai-enrich`.
57
60
  * Debits one `enrich_persona` credit, refunded if the enrichment fails; a
@@ -68,18 +71,38 @@ import { deprecatedAlias } from './param-aliases.js';
68
71
  import { apiCall, categorizeFetchError, } from './research.js';
69
72
  import { truncate, collapseWhitespace, safeInline, safeId, safeBlock, clipReceiptQuote, RECEIPT_QUOTE_MAX, } from './render-safety.js';
70
73
  const PERSONAS_FETCH_TIMEOUT_MS = 30_000;
71
- // Caps re-declared locally: the @clien-ai/mcp package is published separately
72
- // and cannot import from the Next.js app. Kept in sync with `CreatePersonaSchema`
73
- // in app/api/personas/route.ts (name/role/company/location max 200, description
74
- // max 5000, companySize/industry max 100). The server re-validates regardless;
75
- // this is the advertised spec.
74
+ /**
75
+ * Persona field-length caps, hand-copied from `PERSONA_PROFILE_FIELD_RULES`
76
+ * (app/lib/personas/persona-profile-fields.ts). The @clien-ai/mcp package is
77
+ * published separately and cannot import from the Next.js app, so a copy is the
78
+ * only option — but every persona-writing route now READS those rules
79
+ * (`POST /api/personas`, `POST /api/personas/ai-generate`,
80
+ * `PATCH /api/personas/[personaId]` and its `identity-priors` sibling), so
81
+ * these numbers are the one advertised spec rather than a fourth opinion.
82
+ *
83
+ * That sync is ENFORCED, not trusted:
84
+ * `__tests__/integration/mcp/persona-field-cap-coupling.test.ts` pins all nine
85
+ * caps on both sides AND each route's derivation of them. Change a number here
86
+ * and its twin in the rules file in the same commit, or that guard fails.
87
+ *
88
+ * FUL-579 widened `location` 200 → 300 and `company_size` / `industry`
89
+ * 100 → 300 to match the web editor, which had always accepted them; `name`
90
+ * stayed 200 and the editor's 150 was raised to meet it, because narrowing a cap
91
+ * strands rows already over it. `company` went 200 → 255, not 300: it is the one
92
+ * widened field whose column is `VARCHAR(255)`, and advertising 300 there would
93
+ * hand an agent a length Postgres rejects with a 22001 the route surfaces as a
94
+ * 500 (FUL-600). `PERSONA_COLUMN_LENGTH_LIMITS` in the rules file is the ceiling.
95
+ */
76
96
  const NAME_MAX = 200;
77
97
  const ROLE_MAX = 200;
78
- const COMPANY_MAX = 200;
98
+ const COMPANY_MAX = 255;
79
99
  const DESCRIPTION_MAX = 5000;
80
- const COMPANY_SIZE_MAX = 100;
81
- const INDUSTRY_MAX = 100;
82
- const LOCATION_MAX = 200;
100
+ const COMPANY_SIZE_MAX = 300;
101
+ const INDUSTRY_MAX = 300;
102
+ const LOCATION_MAX = 300;
103
+ /** FUL-545 identity priors — same rules file, same guard. */
104
+ const SENIORITY_MAX = 300;
105
+ const CAREER_PATH_MAX = 300;
83
106
  /** FUL-233: legacy camelCase spellings `create_persona` still accepts. */
84
107
  export const CREATE_PERSONA_ALIASES = {
85
108
  projectId: 'project_id',
@@ -188,8 +211,10 @@ function requireId(value, canonical, alias) {
188
211
  }
189
212
  /**
190
213
  * Shared non-ok handling: 401 drops the cached session (so the next tool call
191
- * rebuilds from disk) and surfaces a re-auth message; 403 `PERSONA_LOCKED`
192
- * surfaces an upgrade message (a locked persona/project is read-only); 404 means
214
+ * rebuilds from disk) and surfaces a re-auth message; 403 `PERSONA_LOCKED` and
215
+ * `PROJECT_LOCKED` each surface an upgrade message naming the object that is
216
+ * actually locked (the project wording also covers create, where no persona
217
+ * exists to "edit"); 404 means
193
218
  * the caller does not own the target (the default message points at the project;
194
219
  * pass `notFound` for a persona-scoped 404); 400 surfaces the server's
195
220
  * validation detail; everything else surfaces a generic HTTP error.
@@ -212,8 +237,14 @@ async function throwForResponse(response, deps, action, options) {
212
237
  catch {
213
238
  // non-JSON body — fall back to the truncated raw text below.
214
239
  }
215
- if (response.status === 403 && parsed?.code === 'PERSONA_LOCKED') {
216
- throw new PersonaToolError(`Could not ${action} — it is locked due to subscription limits. Upgrade to Pro to edit it.`);
240
+ if (response.status === 403 &&
241
+ (parsed?.code === 'PERSONA_LOCKED' || parsed?.code === 'PROJECT_LOCKED')) {
242
+ // Name the object that is actually locked. PROJECT_LOCKED can reach a
243
+ // CREATE call, where "edit it" describes a persona that was never created
244
+ // and sends the agent looking for a row that does not exist.
245
+ throw new PersonaToolError(parsed.code === 'PROJECT_LOCKED'
246
+ ? `Could not ${action} — the project is locked due to subscription limits and is read-only. Upgrade to Pro to change it.`
247
+ : `Could not ${action} — it is locked due to subscription limits. Upgrade to Pro to edit it.`);
217
248
  }
218
249
  if (response.status === 404) {
219
250
  throw new PersonaToolError(options?.notFound ??
@@ -484,15 +515,17 @@ export async function generatePersona(input, deps) {
484
515
  const insightsNote = ephemeral
485
516
  ? ' Marked ephemeral — excluded from project insights.'
486
517
  : '';
487
- // FUL-96: surface how many real user-voice receipts grounded the persona. An
488
- // empty/absent list means retrieval found nothing (or grounding was disabled) —
489
- // the persona is still valid, just invented-from-brief.
490
- const sources = Array.isArray(persona.sources) ? persona.sources : [];
518
+ // FUL-96/FUL-425: only a successfully returned array can answer grounding.
519
+ // An absent field can be transport skew or a failed/not-loaded read, so it is
520
+ // UNKNOWN rather than an invented count of zero.
521
+ const sources = Array.isArray(persona.sources) ? persona.sources : undefined;
491
522
  const groundingNote = groundInEvidence === false
492
523
  ? ' Grounding was disabled.'
493
- : sources.length > 0
494
- ? ` Grounded in ${sources.length} real source${sources.length === 1 ? '' : 's'} (user voice from forums + Stack Exchange).`
495
- : ' No matching real-world evidence was found, so it was generated from the brief.';
524
+ : sources === undefined
525
+ ? ' Grounding is unknown because the source receipts were not returned.'
526
+ : sources.length > 0
527
+ ? ` Grounded in ${sources.length} real source${sources.length === 1 ? '' : 's'} (user voice from forums + Stack Exchange).`
528
+ : ' No matching real-world evidence was found, so it was generated from the brief.';
496
529
  // FUL-243: render the GENERATED profile, not just a confirmation line. This
497
530
  // tool's whole output is content the caller did not supply — the model wrote
498
531
  // the background, company, industry, size and location — so a one-line receipt
@@ -702,13 +735,17 @@ export async function enrichPersona(input, deps) {
702
735
  // are read-only over the existing bearer endpoints — zero credit cost, zero side
703
736
  // effects — mirroring `list_reports`/`get_report`.
704
737
  //
705
- // NOTE: this is the entity-discovery surface, NOT the grounding surface — with
706
- // one exception. FUL-208: `toPersona` now maps the M5b identity columns, so both
707
- // tools return FLAT `persona.seniority` / `persona.careerPath` strings when the
708
- // run populated them (absent otherwise; read-only — see `update_persona`). Forum
709
- // grounding (`sources[]`) and the report-level `identityProvenance` are still
710
- // `report_data.personas[]` only, read via `get_report` — and the shape differs
711
- // there: the same two leaf names are NESTED under `identityPriors`.
738
+ // NOTE: this is the entity-discovery surface, NOT the grounding surface — and
739
+ // since FUL-540 there is no exception to that. FUL-208: `toPersona` maps the M5b
740
+ // identity columns, so both tools return FLAT `persona.seniority` /
741
+ // `persona.careerPath` strings when the row has them (absent otherwise; written
742
+ // through `update_persona_identity_priors`, not `update_persona`). Those were
743
+ // research-only when FUL-208 shipped; FUL-488 made them web-editable and FUL-545
744
+ // made them agent-writable, and nothing on the entity records which of the three
745
+ // a given value is, so they are profile data here like every other field. Forum grounding (`sources[]`), the report-level `identityProvenance`,
746
+ // and the run's own un-editable copy of the priors are all `report_data.personas[]`
747
+ // only, read via `get_report` — and the shape differs there: the same two leaf
748
+ // names are NESTED under `identityPriors`.
712
749
  const LIST_LIMIT_MAX = 100;
713
750
  const LIST_LIMIT_DEFAULT = 20;
714
751
  export const ListPersonasInputSchema = z.object({
@@ -747,9 +784,14 @@ export const GetPersonaInputSchema = z.object({
747
784
  'the id printed by `create_persona` / `generate_persona`. Rejected with a ' +
748
785
  '404 if you do not own it. ' +
749
786
  'Returns the persona ENTITY (name, role, company, industry, etc.) for ' +
750
- 'discovery/correction, including read-only `seniority` / `careerPath` when ' +
751
- 'the persona has identity grounding. Forum sources and `identityProvenance` ' +
752
- 'live in `report_data`, read them via `get_report`.'),
787
+ 'discovery/correction, including `seniority` / `careerPath` when the persona ' +
788
+ 'has them. Those two are user-editable in the web app and writable through ' +
789
+ '`update_persona_identity_priors`, and this response does NOT record whether a ' +
790
+ 'given value came from a research run, from an agent, or from a person typing ' +
791
+ 'it — so do not read them as ' +
792
+ 'a research signal. The run-written copy, where a run produced one, is at ' +
793
+ '`report_data.personas[].identityPriors`; forum sources and `identityProvenance` ' +
794
+ 'live there too. Read all three via `get_report`.'),
753
795
  });
754
796
  /**
755
797
  * Render a persona's FULL profile into readable text (FUL-243).
@@ -774,11 +816,17 @@ export const GetPersonaInputSchema = z.object({
774
816
  * class this change exists to fix. (FUL-242 removes the field outright.)
775
817
  *
776
818
  * The closing caveat mirrors `list_competitors`: it makes a reader UNDER-trust
777
- * the record. Almost nothing here is evidence — with one exception since FUL-208.
778
- * `seniority` / `careerPath` ARE identity grounding and are rendered above, but
779
- * they are aggregate-calibrated rather than span-receipted, so the caveat names
780
- * them explicitly as un-citable instead of claiming the record carries no
781
- * grounding at all. Everything else still lives on `report_data`.
819
+ * the record. NOTHING here is evidence. FUL-208 carved out one exception —
820
+ * `seniority` / `careerPath` were research output, so the caveat named them as
821
+ * grounding that merely could not be cited. FUL-540 removes that carve-out:
822
+ * FUL-488 made both web-editable, so a rendered value may be a person's typing,
823
+ * and FUL-545 added a third origin by making both writable over this server —
824
+ * the entity carries no marker for any of them (see `interface Persona` for why
825
+ * `authorship` cannot stand in). The caveat now says that outright rather than
826
+ * going silent on it — an agent that is told nothing will fall back on the
827
+ * fields' research-sounding names, which is the same wrong conclusion the old
828
+ * text produced. It points at `report_data.personas[].identityPriors` for the
829
+ * value that IS run-written, as everything else on `report_data` already was.
782
830
  */
783
831
  export function renderPersonaProfile(persona, fallbackId) {
784
832
  // FUL-263: every entity value below now goes through `safeInline`. This renderer
@@ -834,10 +882,24 @@ export function renderPersonaProfile(persona, fallbackId) {
834
882
  // genuinely different answers to "can I edit this?" — and an agent that assumes
835
883
  // editable will meet a 403 from `update_persona`.
836
884
  const provenance = safeInline(persona.source, 60);
885
+ const authorship = persona.authorship === 'manual' ||
886
+ persona.authorship === 'ai_generated' ||
887
+ persona.authorship === 'unknown'
888
+ ? persona.authorship
889
+ : 'unknown';
837
890
  const enhancementStatus = safeInline(persona.enhancementStatus, 60);
838
891
  const validationJobId = safeId(persona.validationJobId);
839
892
  const stateBits = [
840
893
  provenance && `Source: ${provenance}`,
894
+ // Authorship answers a DIFFERENT question from `Source` (which channel the
895
+ // write came from) and from grounding (the real `persona_sources` count).
896
+ // Spell each value out: a bare `unknown` reads as a missing field rather
897
+ // than as the positive statement that authorship was never established.
898
+ authorship === 'manual'
899
+ ? 'Authorship: manual — a person wrote this profile'
900
+ : authorship === 'ai_generated'
901
+ ? 'Authorship: ai_generated — AI-created synthetic persona, not a real person'
902
+ : 'Authorship: unknown — authorship was never established; this is NOT a claim that it is either human-written or AI-generated',
841
903
  enhancementStatus && `Enhancement: ${enhancementStatus}`,
842
904
  persona.isLocked === true
843
905
  ? 'LOCKED — read-only (subscription limit); `update_persona` and `enrich_persona` will be refused'
@@ -849,10 +911,14 @@ export function renderPersonaProfile(persona, fallbackId) {
849
911
  if (stateBits.length > 0)
850
912
  lines.push(stateBits.join(' · '));
851
913
  // FUL-208 identity priors, rendered as their OWN line rather than folded into
852
- // the attributes above. They differ in KIND from `industry`/`location`: those
853
- // are plain profile fields, whereas these are agent-written and calibrated
854
- // against an aggregate people distribution. Mixing them in would flatten that
855
- // distinction exactly where the closing caveat has to speak about it precisely.
914
+ // the attributes above. ⚠️ NOT because they are better-sourced — FUL-540: since
915
+ // FUL-488 a value here may equally be one the user typed, and since FUL-545 one
916
+ // an agent wrote through `update_persona_identity_priors`. This comment used
917
+ // to call them "agent-written", which the closing caveat now contradicts in the
918
+ // same function. They keep their own line because a run-derived one is
919
+ // calibrated against an aggregate people distribution rather than observed, so
920
+ // the caveat has to qualify these two by name; folding them in beside
921
+ // `industry`/`location` would leave it nothing to point at.
856
922
  // Rendered here — not left to `_meta` — because `_meta` is the channel Claude
857
923
  // Code drops, which is the whole reason this renderer exists.
858
924
  const seniority = safeInline(persona.seniority, 80);
@@ -946,11 +1012,17 @@ export function renderPersonaProfile(persona, fallbackId) {
946
1012
  : 'Forum receipts (`sources[]`) and `identityProvenance` are NOT returned by this read — ' +
947
1013
  'their absence here means "not returned", never "this persona is ungrounded". They live ' +
948
1014
  'on `report_data.personas[]`; read them with `get_report`.';
949
- lines.push('\nTRUST: this is the persona ENTITY. Seniority and career path are the ONE piece of ' +
950
- 'grounding it carries, and they are aggregate-calibrated, never span-receipted — there is ' +
951
- 'no source to follow for them, so do not cite them as evidence; `get_report` nests them ' +
952
- `under \`identityPriors\`. ${receiptsClause} Treat every other field above as unverified ` +
953
- 'profile data until checked there; an absent field here means "not returned", not "empty".');
1015
+ lines.push('\nTRUST: this is the persona ENTITY, and no field above is evidence. Seniority and career ' +
1016
+ 'path are NOT an exception: a value there may have come from a research run, from the ' +
1017
+ 'user editing this persona in the web app, or from an agent calling ' +
1018
+ '`update_persona_identity_priors`, and this response does not record which — so ' +
1019
+ 'do not treat them as a research signal or cite them as evidence. Even the run-written ' +
1020
+ 'ones are aggregate-calibrated, never span-receipted, so there is no source to follow for ' +
1021
+ 'them either. To read what a run actually produced, use `get_report`: where a run produced ' +
1022
+ 'any, ' +
1023
+ `\`report_data.personas[].identityPriors\` holds them, written by the run and out of reach of editing. ${receiptsClause} ` +
1024
+ 'Treat every other field above as unverified profile data until checked there; an absent ' +
1025
+ 'field here means "not returned", not "empty".');
954
1026
  return lines.join('\n');
955
1027
  }
956
1028
  export async function listPersonas(input, deps) {
@@ -1061,8 +1133,18 @@ export async function getPersona(input, deps) {
1061
1133
  // Wraps the shipped `PATCH /api/personas/[personaId]` (explicit patch, bearer,
1062
1134
  // FREE/unmetered) — NOT `ai-enrich` (which is AI-filled + debits a credit). This
1063
1135
  // completes the read → correct → interview loop for a web-created persona without
1064
- // leaving for the web UI. Identity priors (seniority/careerPath) are M5c-managed
1065
- // and NOT patchable here.
1136
+ // leaving for the web UI. Identity priors (seniority/careerPath) are not among
1137
+ // this tool's fields: `UpdatePersonaInputSchema` below declares neither, and the
1138
+ // REST patch route it wraps (`app/api/personas/[personaId]/route.ts`) validates
1139
+ // against a seven-key schema with no `.passthrough()`, so a smuggled key is
1140
+ // dropped before it reaches SQL. (FUL-246's `?: never` brand is the APP-side
1141
+ // counterpart, on `DetailedPersonaInput` / `updatePersona` in
1142
+ // `app/lib/types/data-types.ts` and `app/lib/db/supabase-db.ts` — not on
1143
+ // anything in this package.)
1144
+ // ⚠️ All of that is about WHICH TOOL patches them, not about the values:
1145
+ // FUL-488 made both web-editable and FUL-545 gave this server
1146
+ // `update_persona_identity_priors`, so "not patchable here" must never be
1147
+ // relayed to an agent as "immutable" or "research-derived" (FUL-540).
1066
1148
  //
1067
1149
  // The "at least one field required" rule is enforced in the handler (not via a
1068
1150
  // Zod `.refine()`) so the schema stays a plain `ZodObject` — the registry type
@@ -1204,4 +1286,150 @@ export async function updatePersona(input, deps) {
1204
1286
  _meta: { persona, updated: updatedFields },
1205
1287
  };
1206
1288
  }
1289
+ // ---------------------------------------------------------------------------
1290
+ // update_persona_identity_priors (FUL-545) — the edit a human already had
1291
+ // ---------------------------------------------------------------------------
1292
+ //
1293
+ // FUL-488 made `seniority` / `careerPath` editable inline on the web persona
1294
+ // profile. `update_persona` could not write them, so an agent could not make a
1295
+ // change a person sitting in the browser could. This tool closes that.
1296
+ //
1297
+ // A SEPARATE TOOL, NOT TWO MORE KEYS ON `update_persona`. Those columns are
1298
+ // written only by NAMED writers on every path: the REST patch next door
1299
+ // validates against a seven-key schema with no `.passthrough()`, and the app
1300
+ // brands `seniority?: never` / `careerPath?: never` on its general-purpose write
1301
+ // types because `Omit` alone only catches excess properties on object LITERALS —
1302
+ // a widened write type would silently DISCARD these fields rather than refuse
1303
+ // them. Widening either to close this gap would retire the mechanism, so the
1304
+ // sanctioned shape is a narrow named writer, which is what the web path already
1305
+ // uses (`updatePersonaProfileScalars`).
1306
+ //
1307
+ // ⚠️ THIS TOOL IS ITSELF A NEW ORIGIN FOR THESE VALUES, and nothing records it.
1308
+ // Before FUL-545 a populated column was a research run's output or a person's
1309
+ // typing; now it can also be an agent's write, and the row cannot tell the three
1310
+ // apart (see `interface Persona` for why `personas.authorship` cannot stand in).
1311
+ // Every advert around these fields has to state that rather than imply a
1312
+ // provenance the response cannot supply.
1313
+ //
1314
+ // UNGATED, deliberately. `enrich_persona` writes priors only when both columns
1315
+ // are blank, so a weaker background INFERENCE cannot clobber a run-derived
1316
+ // value. A caller naming these fields here is making a deliberate edit, not
1317
+ // colliding — the same distinction the web profile writer records.
1318
+ //
1319
+ // "At least one field required" is enforced in the handler, not via a Zod
1320
+ // `.refine()`, so the schema stays a plain `ZodObject` (the registry type and
1321
+ // `schema-contract.test.ts` both read `.shape`).
1322
+ /**
1323
+ * The two fields this tool writes: snake_case PARAM name → the camelCase field
1324
+ * name the REST body and the persona entity both use.
1325
+ */
1326
+ const IDENTITY_PRIOR_FIELDS = {
1327
+ seniority: 'seniority',
1328
+ career_path: 'careerPath',
1329
+ };
1330
+ /** Param names as the caller supplies them — used in caller-facing messages. */
1331
+ const IDENTITY_PRIOR_PARAMS = Object.keys(IDENTITY_PRIOR_FIELDS);
1332
+ export const UpdatePersonaIdentityPriorsInputSchema = z.object({
1333
+ persona_id: z
1334
+ .string()
1335
+ .uuid()
1336
+ .describe('UUID of the persona whose identity priors to set. Get it from a `list_personas` ' +
1337
+ 'entry, or from the id printed by `create_persona` / `generate_persona`. Rejected ' +
1338
+ 'with a 404 if you do not own it.'),
1339
+ // No `.min(1)`: an empty string CLEARS the column, which is the same edit a
1340
+ // person makes by emptying the field on the web persona profile.
1341
+ seniority: z
1342
+ .string()
1343
+ .max(SENIORITY_MAX, `seniority too long (max ${SENIORITY_MAX} chars)`)
1344
+ .optional()
1345
+ .describe('New seniority RUNG — a level of responsibility ("senior IC", "team lead"), not a ' +
1346
+ 'job title. Pass an empty string to clear it. This field is user-editable in the ' +
1347
+ 'web app as well as writable here, and nothing records which origin a stored value ' +
1348
+ 'has, so writing it does not make it grounding.'),
1349
+ career_path: z
1350
+ .string()
1351
+ .max(CAREER_PATH_MAX, `career_path too long (max ${CAREER_PATH_MAX} chars)`)
1352
+ .optional()
1353
+ .describe('New career path / trajectory, e.g. "support → product ops → PM". Pass an empty ' +
1354
+ 'string to clear it. This field is user-editable in the web app as well as writable ' +
1355
+ 'here, and nothing records which origin a stored value has, so writing it does not ' +
1356
+ 'make it grounding.'),
1357
+ });
1358
+ export async function updatePersonaIdentityPriors(input, deps) {
1359
+ const parsed = UpdatePersonaIdentityPriorsInputSchema.safeParse(input);
1360
+ if (!parsed.success) {
1361
+ throw new PersonaToolError(`Invalid input — ${formatZodError(parsed.error)}`);
1362
+ }
1363
+ const { persona_id: personaId, ...rest } = parsed.data;
1364
+ const body = {};
1365
+ for (const param of IDENTITY_PRIOR_PARAMS) {
1366
+ const value = rest[param];
1367
+ if (value !== undefined)
1368
+ body[IDENTITY_PRIOR_FIELDS[param]] = value;
1369
+ }
1370
+ if (Object.keys(body).length === 0) {
1371
+ throw new PersonaToolError('Invalid input — provide at least one field to set ' +
1372
+ `(one of: ${IDENTITY_PRIOR_PARAMS.join(', ')}).`);
1373
+ }
1374
+ const ctx = makeCtx(deps);
1375
+ let response;
1376
+ try {
1377
+ response = await apiCall(ctx, 'PATCH', `/api/personas/${personaId}/identity-priors`, {
1378
+ body,
1379
+ timeoutMs: PERSONAS_FETCH_TIMEOUT_MS,
1380
+ });
1381
+ }
1382
+ catch (err) {
1383
+ const e = err;
1384
+ if (e.name === 'AbortError' || e.name === 'TimeoutError') {
1385
+ throw new PersonaToolError(`Setting the identity priors timed out after ${PERSONAS_FETCH_TIMEOUT_MS / 1000}s. ` +
1386
+ 'They may or may not have been applied — call get_persona to check before retrying.');
1387
+ }
1388
+ throw err;
1389
+ }
1390
+ if (!response.ok) {
1391
+ await throwForResponse(response, deps, 'update persona identity priors', {
1392
+ notFound: 'Could not set identity priors — persona not found, or you don\'t own it. ' +
1393
+ 'Confirm the persona_id (e.g. from list_personas).',
1394
+ });
1395
+ }
1396
+ const json = (await response.json().catch(() => null));
1397
+ const persona = json?.persona;
1398
+ if (!persona?.id) {
1399
+ throw new PersonaToolError('Identity-prior update returned no persona; the operation may not have succeeded.');
1400
+ }
1401
+ // FUL-263/279: `name` and `id` come from the PATCH response, not the caller,
1402
+ // so both carry the line-forgery surface. `id` degrades to this tool's own
1403
+ // validated-uuid input rather than failing — a retry re-applies the same
1404
+ // patch instead of minting a second row. `setFields` is built from this file's
1405
+ // own constants, so no endpoint text reaches it.
1406
+ const setFields = IDENTITY_PRIOR_PARAMS.filter((param) => rest[param] !== undefined);
1407
+ // Trim before deciding "cleared" — the SERVER trims (`setPersonaIdentityPriorsRecord`
1408
+ // does `.trim() || null`, mirroring the promote RPC's `NULLIF`), so `" "` stores
1409
+ // NULL exactly as `""` does. Testing the raw input instead would report a
1410
+ // whitespace-only patch under "Set ... - seniority" with no `Cleared:` clause:
1411
+ // the tool telling an agent it set a value the row does not have.
1412
+ const cleared = setFields.filter((param) => rest[param]?.trim() === '');
1413
+ const id = safeId(persona.id) ?? personaId;
1414
+ // The confirmation states the ORIGIN of what it just wrote. An agent that
1415
+ // reads these values back later cannot tell an agent write from a research
1416
+ // run's output or a person's typing — the row records no such thing — so the
1417
+ // one moment the distinction is knowable is here, when the write happens.
1418
+ const originNote = 'These two are user-editable in the web app and writable here, and nothing records which ' +
1419
+ 'origin a stored value has — so a later read of them is not a research signal. What a run ' +
1420
+ 'produced stays at `report_data.personas[].identityPriors` (via `get_report`), which this ' +
1421
+ 'write does not touch.';
1422
+ const clearedNote = cleared.length > 0 ? ` Cleared: ${cleared.join(', ')}.` : '';
1423
+ return {
1424
+ content: [
1425
+ {
1426
+ type: 'text',
1427
+ text: `Set identity priors on persona "${safeInline(persona.name, 100) ?? personaId}" ` +
1428
+ `(id: ${id}) — ${setFields.join(', ')}.${clearedNote} ` +
1429
+ `No credit charged (explicit edit). ${originNote}`,
1430
+ },
1431
+ ],
1432
+ _meta: { persona, updated: setFields },
1433
+ };
1434
+ }
1207
1435
  //# sourceMappingURL=personas.js.map