@rockhopper-co/mcp-server 0.7.0 → 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.
Files changed (52) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/README.md +31 -0
  3. package/dist/api-client.d.ts +83 -3
  4. package/dist/api-client.d.ts.map +1 -1
  5. package/dist/api-client.js +171 -10
  6. package/dist/api-client.js.map +1 -1
  7. package/dist/auth/device-grant-client.d.ts.map +1 -1
  8. package/dist/auth/device-grant-client.js +3 -1
  9. package/dist/auth/device-grant-client.js.map +1 -1
  10. package/dist/cli.js +39 -1
  11. package/dist/cli.js.map +1 -1
  12. package/dist/correlation.d.ts +9 -0
  13. package/dist/correlation.d.ts.map +1 -0
  14. package/dist/correlation.js +26 -0
  15. package/dist/correlation.js.map +1 -0
  16. package/dist/logger.d.ts +42 -0
  17. package/dist/logger.d.ts.map +1 -0
  18. package/dist/logger.js +159 -0
  19. package/dist/logger.js.map +1 -0
  20. package/dist/not-ready.d.ts +95 -0
  21. package/dist/not-ready.d.ts.map +1 -0
  22. package/dist/not-ready.js +151 -0
  23. package/dist/not-ready.js.map +1 -0
  24. package/dist/prompts/index.d.ts.map +1 -1
  25. package/dist/prompts/index.js +8 -0
  26. package/dist/prompts/index.js.map +1 -1
  27. package/dist/resources/changes.d.ts.map +1 -1
  28. package/dist/resources/changes.js +6 -0
  29. package/dist/resources/changes.js.map +1 -1
  30. package/dist/resources/orchestration-guide.md +23 -3
  31. package/dist/resources/teams.d.ts.map +1 -1
  32. package/dist/resources/teams.js +7 -1
  33. package/dist/resources/teams.js.map +1 -1
  34. package/dist/server.d.ts.map +1 -1
  35. package/dist/server.js +40 -1
  36. package/dist/server.js.map +1 -1
  37. package/dist/tools/get-cell-history.d.ts.map +1 -1
  38. package/dist/tools/get-cell-history.js +28 -4
  39. package/dist/tools/get-cell-history.js.map +1 -1
  40. package/dist/tools/search.d.ts.map +1 -1
  41. package/dist/tools/search.js +13 -1
  42. package/dist/tools/search.js.map +1 -1
  43. package/dist/tools/write-reviews.d.ts.map +1 -1
  44. package/dist/tools/write-reviews.js +58 -4
  45. package/dist/tools/write-reviews.js.map +1 -1
  46. package/dist/types.d.ts +58 -0
  47. package/dist/types.d.ts.map +1 -1
  48. package/dist/zod-schemas.d.ts +30 -54
  49. package/dist/zod-schemas.d.ts.map +1 -1
  50. package/dist/zod-schemas.js +24 -0
  51. package/dist/zod-schemas.js.map +1 -1
  52. package/package.json +22 -10
package/CHANGELOG.md CHANGED
@@ -6,6 +6,74 @@ All notable changes to this project are documented here. Follows
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ### Added
10
+ - **User and team ids are accepted as uuids (ENG-2230).** `reviewerIds` on
11
+ `create_review_request` and `{teamId}` in `rockhopper://teams/{teamId}` now
12
+ take either the version-7 uuid or the legacy numeric internal id, mixed
13
+ freely. Rockhopper re-keyed `user`, `team` and `workspace` onto uuids
14
+ (ENG-1966); until this release the published tool schema validated
15
+ `reviewerIds` as `z.array(z.number().int().positive())`, so a uuid was
16
+ refused **on your machine** before any request was sent — every version from
17
+ 0.2.0 through 0.10.0 is affected, and no server-side change could fix it.
18
+ `UserSummary`, `Team` and `Workspace` gained the optional `id` (uuid) field
19
+ the API already returns, and `ApiClient.getTeam()` /
20
+ `ApiClient.createReviewRequest()` widened from `number` to `number | string`
21
+ (exported as the new `RockhopperId` type).
22
+
23
+ **Nothing that works today stops working.** The numeric form is accepted
24
+ until **2027-09-14** and removed after that date; migrate to the uuid before
25
+ then. Version, comment and review ids are unaffected and stay numeric.
26
+
27
+ - **Strict no-partial change history (`src/not-ready.ts`).** `get_cell_history`,
28
+ `search` and the `changes` resource refuse to answer while a file's change
29
+ history is still being built, instead of returning the fraction that happens
30
+ to be ready. Callers get an explicit not-ready answer they can retry.
31
+
32
+ ### Fixed
33
+ - **The server announced version `0.1.0` to every client, at every release
34
+ (ENG-1955).** `createServer` passed a string literal to `McpServer`, so the
35
+ version in the MCP `initialize` response was `0.1.0` — unchanged since the
36
+ initial commit, so every published version (0.2.0 through 0.8.0) announced
37
+ itself as 0.1.0, both for the locally installed server and for every web
38
+ client reaching the same tools through `mcp-gateway`. It now reports
39
+ `package.json`'s version, which is what makes two builds distinguishable
40
+ at all.
41
+
42
+ ### Added
43
+ - **Provenance-context emit on agent writes (ENG-1756 / decision 15).** Every
44
+ write call (`POST`/`PUT`/`PATCH`/`DELETE`) now carries
45
+ `X-Rockhopper-Surface` (`mcp`), a stable per-client-instance
46
+ `X-Rockhopper-Session-Id`, and — once the driving human is known —
47
+ `X-Driving-Human`. The CLI declares the PAT owner as the driving human from
48
+ its existing `/users/me` preflight. Reads are unchanged (no headers).
49
+ This satisfies the backend's decision-15 accountability invariant, which
50
+ rejects (403) an agent-surface write with no resolvable driving human, and
51
+ populates the `cell_change_provenance_context` sidecar for etymology reads.
52
+ New public API: `ApiClient` config `provenanceContext` +
53
+ `ApiClient.setDrivingHuman()` (used by `mcp-gateway` to declare the
54
+ `gateway` surface and its OAuth session id).
55
+
56
+ - **Local rotating diagnostic logfile (KI-225).** The server now writes a
57
+ local diagnostic log to `~/.rockhopper/mcp-server/` (rotated via
58
+ `pino-roll`, ~5 MB × 5 files). It captures request latency plus the
59
+ client-side failures the backend never sees — network-unreachable
60
+ (`api_unreachable`), local auth rejection (`auth_failed`), response schema
61
+ drift (`schema_validation_failed`), per-tool-call timing (`tool_call` /
62
+ `tool_call_failed`), and uncaught crashes (`uncaught_exception` /
63
+ `unhandled_rejection`). Every line auto-carries the Phase 1.1
64
+ `correlationId`.
65
+ - **File only — never stdout** (stdout is the MCP stdio transport). On any
66
+ failure to open the file, logging degrades to a no-op; the server never
67
+ crashes and never writes to stdout.
68
+ - **No remote transmission.** The file stays on the customer's machine and
69
+ can be handed to support.
70
+ - **Redacted.** Tokens, `Authorization` headers, request/response bodies,
71
+ tool arguments, and cell data are never logged — only event, method, URL
72
+ pathname (no query), status, durationMs, tool name, correlationId,
73
+ version, and error type/message.
74
+ - Configurable via `ROCKHOPPER_MCP_LOG_DIR` / `ROCKHOPPER_MCP_LOG_LEVEL`;
75
+ disable with `ROCKHOPPER_MCP_LOG_DISABLE`.
76
+
9
77
  ### Fixed
10
78
  - **`get_cell_history`, `resolve_comment`, and `rename_file` no longer
11
79
  render `undefined` for every field (KI-096).** Diagnosis revealed the
package/README.md CHANGED
@@ -98,6 +98,29 @@ Add to `.cursor/mcp.json` in your project:
98
98
  |----------|----------|---------|-------------|
99
99
  | `ROCKHOPPER_TOKEN` | No | — | Personal Access Token (starts with `rh_pat_`). When unset, OAuth device-grant flow runs on first launch. |
100
100
  | `ROCKHOPPER_API_URL` | No | `https://api.rockhopper.co` | Rockhopper API base URL |
101
+ | `ROCKHOPPER_MCP_LOG_DIR` | No | `~/.rockhopper/mcp-server/` | Directory for the local diagnostic logfile (see below). |
102
+ | `ROCKHOPPER_MCP_LOG_DISABLE` | No | — | Set truthy (`1` / `true`) to disable local diagnostic logging entirely. |
103
+ | `ROCKHOPPER_MCP_LOG_LEVEL` | No | `info` | Diagnostic log level (`fatal` / `error` / `warn` / `info` / `debug` / `trace` / `silent`). |
104
+
105
+ ## Diagnostic Logging
106
+
107
+ The server writes a **local diagnostic logfile** to `~/.rockhopper/mcp-server/`
108
+ (rotated, size-capped at ~5 MB × 5 files, named `mcp-server.<n>.log`). It
109
+ records request latency and the client-side failures the API never sees —
110
+ network-unreachable errors, local auth rejections, response schema drift, and
111
+ uncaught crashes — so you can hand the file to Rockhopper support when
112
+ something misbehaves.
113
+
114
+ - **Local only.** Nothing is transmitted anywhere — the file stays on your
115
+ machine. There is no remote telemetry.
116
+ - **Redacted.** Tokens, the `Authorization` header, request/response bodies,
117
+ tool arguments, and cell data are **never** written. Lines carry only
118
+ event name, HTTP method, URL pathname (no query string), status code,
119
+ duration, tool name, a correlation id, and error type/message.
120
+ - **Configurable.** Point it elsewhere with `ROCKHOPPER_MCP_LOG_DIR`, change
121
+ verbosity with `ROCKHOPPER_MCP_LOG_LEVEL`, or turn it off with
122
+ `ROCKHOPPER_MCP_LOG_DISABLE=1`. If the file can't be opened, logging
123
+ silently disables — it never interferes with the server.
101
124
 
102
125
  ## Postman
103
126
 
@@ -160,6 +183,14 @@ npm run generate:postman
160
183
  | `cancel_review` | Cancel a pending review request (requester only) |
161
184
  | `update_file_description` | Update the display name of an enrolled file |
162
185
 
186
+ ## Identifiers
187
+
188
+ Users and teams are named by a **uuid** (`id`) — for example `0198f3a1-2b4c-7d8e-9f01-23456789abcd`. This is the identifier to send as a `reviewerIds` entry on `create_review_request`, and as `{teamId}` in `rockhopper://teams/{teamId}`. Read it from the team resource, where every record carries both an `id` (uuid) and an `internalId` (number).
189
+
190
+ The legacy numeric `internalId` is **also accepted** for users and teams, and the two spellings can be mixed in one `reviewerIds` array — nothing you have written today stops working. It is accepted until **2027-09-14** and removed after, so migrate to the uuid before then.
191
+
192
+ Everything else keeps its existing type: `fileMsId` is a string, and version and comment ids stay numeric.
193
+
163
194
  ## Development
164
195
 
165
196
  ```bash
@@ -1,12 +1,64 @@
1
- import type { CellHistoryEntry, EnrolledFile, FileChat, FileVersion, PaginatedUnattributedResponse, ReviewActivity, ReviewRequest, Team, UnattributedChange, UserSummary } from './types.js';
1
+ import type { CellHistoryEntry, EnrolledFile, FileChat, FileVersion, FoldStatus, PaginatedUnattributedResponse, ReviewActivity, ReviewRequest, RockhopperId, Team, UnattributedChange, UserSummary } from './types.js';
2
2
  export interface ApiClientConfig {
3
3
  baseUrl: string;
4
4
  token: string;
5
+ /**
6
+ * Phase 1.1 / KI-226 — optional fixed correlation id stamped on every
7
+ * outbound request's `X-Correlation-Id` header. The mcp-gateway sets this
8
+ * to forward its own per-request id onto tool-call traffic (it constructs a
9
+ * fresh `ApiClient` per request). Precedence for the header value:
10
+ * an explicit per-call `init.headers['X-Correlation-Id']` >
11
+ * this config value > the per-tool-call ALS id (`getCorrelationId()`) >
12
+ * a freshly minted UUID v4.
13
+ */
14
+ correlationId?: string;
15
+ /**
16
+ * ENG-1756 (plan §9 decision 15) — provenance-context EMIT config. Every
17
+ * WRITE call carries `X-Rockhopper-Surface` + `X-Rockhopper-Session-Id`
18
+ * (and `X-Driving-Human` once known) so the backend's decision-15
19
+ * admission never 403s a well-behaved agent client and the capture
20
+ * sidecar (`cell_change_provenance_context`) gets its surface/session.
21
+ * Defaults: surface `'mcp'`, a per-client-instance UUID session id, no
22
+ * driving human until {@link ApiClient.setDrivingHuman} is called (the
23
+ * backend then falls back to the PAT owner — the same human).
24
+ */
25
+ provenanceContext?: {
26
+ /** `'mcp'` (local server, default) | `'gateway'` (remote gateway). */
27
+ surface?: string;
28
+ /** Session correlation id for the sidecar; default: per-instance UUID. */
29
+ sessionId?: string;
30
+ /** Platform id (msId/googleId) of the human driving this agent. */
31
+ drivingHumanPlatformId?: string;
32
+ };
33
+ }
34
+ /**
35
+ * A non-OK HTTP answer, carrying its status so callers can tell a DEFINITIVE
36
+ * rejection (404 the file is not there, 403 no access) from an ambiguous one
37
+ * (5xx, transport). The strict no-partial gate needs that distinction: failing
38
+ * closed on an ambiguous probe is right, but reporting "retry later" for a file
39
+ * that does not exist would be a fabricated capacity signal. Message text is
40
+ * unchanged from the previous plain `Error` — callers render it verbatim.
41
+ */
42
+ export declare class RockhopperApiError extends Error {
43
+ readonly status: number;
44
+ constructor(status: number, message: string);
5
45
  }
6
46
  export declare class ApiClient {
7
47
  private readonly baseUrl;
8
48
  private readonly token;
49
+ private readonly correlationId?;
50
+ private readonly surface;
51
+ private readonly sessionId;
52
+ private drivingHumanPlatformId;
9
53
  constructor(config: ApiClientConfig);
54
+ /**
55
+ * ENG-1756: declare (or clear) the human driving this agent. The CLI sets
56
+ * it from the `/users/me` preflight (`msId`/`googleId` — the PAT owner);
57
+ * subsequent writes then carry `X-Driving-Human`. While unset, the backend
58
+ * resolves the driving human as the PAT owner server-side, so writes keep
59
+ * working — this header is the explicit, forward-compatible form.
60
+ */
61
+ setDrivingHuman(platformId: string | null): void;
10
62
  /**
11
63
  * KI-096: optional `responseSchema` validates the response shape with
12
64
  * zod. When supplied, drift between backend's actual response and the
@@ -17,7 +69,13 @@ export declare class ApiClient {
17
69
  */
18
70
  private request;
19
71
  getMe(): Promise<UserSummary>;
20
- getTeam(teamId: number): Promise<Team>;
72
+ /**
73
+ * ENG-2230 — `teamId` is either spelling: the version-7 uuid or the legacy
74
+ * numeric internal id. Both are interpolated into the path unchanged and
75
+ * both name the same row (backend #1717). Widened from `number`, so no
76
+ * existing caller changes.
77
+ */
78
+ getTeam(teamId: RockhopperId): Promise<Team>;
21
79
  listEnrolledFiles(params?: {
22
80
  search?: string;
23
81
  matchIn?: 'name' | 'comments' | 'versions' | 'all';
@@ -25,6 +83,13 @@ export declare class ApiClient {
25
83
  getEnrolledFile(fileMsId: string): Promise<EnrolledFile>;
26
84
  getFileVersions(fileMsId: string): Promise<FileVersion[]>;
27
85
  getFileVersion(versionInternalId: number): Promise<FileVersion>;
86
+ /**
87
+ * Plan 02 ruling 5 — the completeness probe for every change-history
88
+ * surface. `foldPending: true` means a commit-diff fold is queued, retrying
89
+ * or running, i.e. the change-log window is mid-rewrite: incomplete.
90
+ * Consumed by `assertChangeHistoryComplete`, never rendered to the user.
91
+ */
92
+ getFoldStatus(fileMsId: string): Promise<FoldStatus>;
28
93
  /**
29
94
  * KI-096: passes `?format=mcp` to opt into the backend's normalized
30
95
  * projection `{versionId, value, changedBy, changedAt}` (added by
@@ -32,6 +97,14 @@ export declare class ApiClient {
32
97
  * row shape the frontend cell-history popover consumes — we never
33
98
  * call that path. Zod-parses the response so future drift between
34
99
  * backend and mcp-server contracts fails loudly.
100
+ *
101
+ * ENG-1638 (P3-2) remainder: the backend now routes this read through the
102
+ * SAME ledger read-decision choke point as the webapp/add-in popovers
103
+ * (cross-surface parity). An eligible file serves the WIDENED entries
104
+ * (+ formula, provenance, actorKind, drivingHuman, formatted — including
105
+ * live events with versionId 'uncommitted'); a not-eligible file, a Google
106
+ * file, or an older backend serves the four-field legacy projection. The
107
+ * schema accepts both.
35
108
  */
36
109
  getCellHistory(fileMsId: string, sheetName: string, cellAddress: string): Promise<CellHistoryEntry[]>;
37
110
  getFileComments(fileMsId: string): Promise<FileChat[]>;
@@ -59,11 +132,18 @@ export declare class ApiClient {
59
132
  getReviewsForLatestVersion(fileMsId: string): Promise<ReviewRequest[]>;
60
133
  getReview(reviewId: number): Promise<ReviewRequest>;
61
134
  getReviewActivities(reviewId: number): Promise<ReviewActivity[]>;
135
+ /**
136
+ * ENG-2230 — `reviewerIds` accepts either spelling of a user id (uuid or
137
+ * legacy numeric internal id), mixed freely. Values are serialised
138
+ * verbatim; the backend resolves both (`@AcceptsResourceId({ reviewerIds:
139
+ * 'user' })` on `POST|PUT /reviews/requests`). `versionId` is a FILE
140
+ * VERSION id and is NOT re-keyed — it stays numeric.
141
+ */
62
142
  createReviewRequest(body: {
63
143
  versionId: number;
64
144
  subject: string;
65
145
  description?: string;
66
- reviewerIds: number[];
146
+ reviewerIds: RockhopperId[];
67
147
  }): Promise<ReviewRequest>;
68
148
  approveReview(reviewId: number, body: {
69
149
  notes?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,6BAA6B,EAC7B,cAAc,EACd,aAAa,EACb,IAAI,EACJ,kBAAkB,EAClB,WAAW,EACZ,MAAM,YAAY,CAAC;AAOpB,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;gBAEnB,MAAM,EAAE,eAAe;IAKnC;;;;;;;OAOG;YACW,OAAO;IA2Cf,KAAK,IAAI,OAAO,CAAC,WAAW,CAAC;IAM7B,OAAO,CAAC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,YAAY,EAAE,MAAM,CAAC;YACrB,YAAY,EAAE,MAAM,CAAC;YACrB,YAAY,EAAE,MAAM,CAAC;YACrB,WAAW,EAAE,MAAM,CAAC;SACrB,CAAC;KACH,GAAG,OAAO,CAAC,WAAW,CAAC;IAOlB,cAAc,CAClB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,GAC5B,OAAO,CAAC,WAAW,CAAC;IAYjB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAS5D;;;;;;;OAOG;IACG,kBAAkB,CACtB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GACtB,OAAO,CAAC,YAAY,CAAC;CAUzB"}
@@ -1,10 +1,67 @@
1
- import { CellHistoryEntryArraySchema, EnrolledFileSchema, FileChatSchema, } from './zod-schemas.js';
1
+ import { randomUUID } from 'node:crypto';
2
+ import { getCorrelationId } from './correlation.js';
3
+ import { log } from './logger.js';
4
+ import { CellHistoryEntryArraySchema, EnrolledFileSchema, FileChatSchema, FoldStatusSchema, } from './zod-schemas.js';
5
+ import { ChangeHistoryNotReadyError, DEFAULT_RETRY_AFTER_SECONDS, } from './not-ready.js';
6
+ /**
7
+ * Plan 02 ruling 5 — the poll hint comes from the SERVER's `Retry-After`
8
+ * (the produce ETA), never from a local guess. A missing/garbage header falls
9
+ * back to the shared default rather than inventing a shorter interval: a hint
10
+ * that is too short turns one waiting client into the herd the parser lease
11
+ * exists to prevent (SP02 adversarial S6).
12
+ */
13
+ function parseRetryAfterSeconds(response) {
14
+ const raw = response.headers?.get('Retry-After');
15
+ if (!raw)
16
+ return DEFAULT_RETRY_AFTER_SECONDS;
17
+ const seconds = Number.parseInt(raw, 10);
18
+ return Number.isFinite(seconds) && seconds > 0
19
+ ? seconds
20
+ : DEFAULT_RETRY_AFTER_SECONDS;
21
+ }
22
+ /**
23
+ * A non-OK HTTP answer, carrying its status so callers can tell a DEFINITIVE
24
+ * rejection (404 the file is not there, 403 no access) from an ambiguous one
25
+ * (5xx, transport). The strict no-partial gate needs that distinction: failing
26
+ * closed on an ambiguous probe is right, but reporting "retry later" for a file
27
+ * that does not exist would be a fabricated capacity signal. Message text is
28
+ * unchanged from the previous plain `Error` — callers render it verbatim.
29
+ */
30
+ export class RockhopperApiError extends Error {
31
+ status;
32
+ constructor(status, message) {
33
+ super(message);
34
+ this.name = 'RockhopperApiError';
35
+ this.status = status;
36
+ }
37
+ }
38
+ /** HTTP methods the decision-15 admission treats as agent writes. */
39
+ const WRITE_METHODS = new Set(['POST', 'PUT', 'PATCH', 'DELETE']);
2
40
  export class ApiClient {
3
41
  baseUrl;
4
42
  token;
43
+ correlationId;
44
+ surface;
45
+ sessionId;
46
+ drivingHumanPlatformId;
5
47
  constructor(config) {
6
48
  this.baseUrl = config.baseUrl.replace(/\/+$/, '');
7
49
  this.token = config.token;
50
+ this.correlationId = config.correlationId;
51
+ this.surface = config.provenanceContext?.surface ?? 'mcp';
52
+ this.sessionId = config.provenanceContext?.sessionId ?? randomUUID();
53
+ this.drivingHumanPlatformId =
54
+ config.provenanceContext?.drivingHumanPlatformId ?? null;
55
+ }
56
+ /**
57
+ * ENG-1756: declare (or clear) the human driving this agent. The CLI sets
58
+ * it from the `/users/me` preflight (`msId`/`googleId` — the PAT owner);
59
+ * subsequent writes then carry `X-Driving-Human`. While unset, the backend
60
+ * resolves the driving human as the PAT owner server-side, so writes keep
61
+ * working — this header is the explicit, forward-compatible form.
62
+ */
63
+ setDrivingHuman(platformId) {
64
+ this.drivingHumanPlatformId = platformId;
8
65
  }
9
66
  /**
10
67
  * KI-096: optional `responseSchema` validates the response shape with
@@ -16,18 +73,83 @@ export class ApiClient {
16
73
  */
17
74
  async request(path, init, responseSchema) {
18
75
  const url = `${this.baseUrl}${path}`;
19
- const response = await fetch(url, {
20
- ...init,
21
- headers: {
22
- Authorization: `Bearer ${this.token}`,
23
- 'Content-Type': 'application/json',
24
- ...init?.headers,
25
- },
26
- });
76
+ // KI-225: log only the URL pathname (drop the query string) — query may
77
+ // carry search terms / cell refs; it never carries the token (header
78
+ // only), but it's not a safe field to persist.
79
+ const pathname = path.split('?')[0];
80
+ const method = (init?.method ?? 'GET').toUpperCase();
81
+ const start = Date.now();
82
+ let response;
83
+ try {
84
+ response = await fetch(url, {
85
+ ...init,
86
+ headers: {
87
+ Authorization: `Bearer ${this.token}`,
88
+ 'Content-Type': 'application/json',
89
+ // KI-226: trace this request in backend logs. Placed BEFORE the
90
+ // `...init?.headers` spread so a per-call header still wins but the
91
+ // id can't be dropped. Precedence: per-call > config > ALS > mint.
92
+ // Non-sensitive UUID — never co-logged with the bearer token above.
93
+ 'X-Correlation-Id': this.correlationId ?? getCorrelationId() ?? randomUUID(),
94
+ // ENG-1756 (decision 15): agent writes carry the provenance
95
+ // context so the backend's anonymous-agent-write admission never
96
+ // fires for this well-behaved client and the capture sidecar gets
97
+ // its surface/session. Reads carry none (no admission on reads).
98
+ // Placed before the spread so a per-call header still wins.
99
+ ...(WRITE_METHODS.has(method)
100
+ ? {
101
+ 'X-Rockhopper-Surface': this.surface,
102
+ 'X-Rockhopper-Session-Id': this.sessionId,
103
+ ...(this.drivingHumanPlatformId
104
+ ? { 'X-Driving-Human': this.drivingHumanPlatformId }
105
+ : {}),
106
+ }
107
+ : {}),
108
+ ...init?.headers,
109
+ },
110
+ });
111
+ }
112
+ catch (err) {
113
+ // KI-225: the can't-reach-the-API case — a thrown fetch is a network
114
+ // failure, the class of error that NEVER reaches the backend log.
115
+ log.error({ event: 'api_unreachable', method, path: pathname, durationMs: Date.now() - start, err }, 'api_unreachable');
116
+ throw err;
117
+ }
118
+ const durationMs = Date.now() - start;
27
119
  if (!response.ok) {
120
+ // KI-225: classify auth rejections (401/403) so they're greppable
121
+ // separately from generic HTTP errors.
122
+ // Plan 02 ruling 5: 429/503 on a read lane is the backend's "outputs
123
+ // still producing" answer (SP02 maps the typed not-ready to 429 +
124
+ // Retry-After). It must NOT reach a formatter as a generic error string —
125
+ // an assistant reading `Rockhopper API 429: …` has no reliable way to
126
+ // tell a capacity signal from a real failure, and either way it is not
127
+ // data. Classified here, at the one place every call passes through.
128
+ const notReady = response.status === 429 || response.status === 503;
129
+ const classification = response.status === 401 || response.status === 403
130
+ ? 'auth_failed'
131
+ : notReady
132
+ ? 'not_ready'
133
+ : 'http_error';
134
+ log.warn({
135
+ event: 'api_request_failed',
136
+ method,
137
+ path: pathname,
138
+ status: response.status,
139
+ durationMs,
140
+ classification,
141
+ }, 'api_request_failed');
28
142
  const body = await response.text().catch(() => '');
29
- throw new Error(`Rockhopper API ${response.status}: ${response.statusText} — ${body}`);
143
+ if (notReady) {
144
+ throw new ChangeHistoryNotReadyError({
145
+ reason: 'still_producing',
146
+ retryAfterSeconds: parseRetryAfterSeconds(response),
147
+ detail: `${response.status} ${response.statusText} at ${pathname}`,
148
+ });
149
+ }
150
+ throw new RockhopperApiError(response.status, `Rockhopper API ${response.status}: ${response.statusText} — ${body}`);
30
151
  }
152
+ log.info({ event: 'api_request', method, path: pathname, status: response.status, durationMs }, 'api_request');
31
153
  const json = await response.json();
32
154
  if (responseSchema) {
33
155
  const parsed = responseSchema.safeParse(json);
@@ -36,6 +158,15 @@ export class ApiClient {
36
158
  // `undefined`, hiding the contract break. Include the path of the
37
159
  // first issue so the cause is obvious from the error message.
38
160
  const first = parsed.error.issues[0];
161
+ // KI-225: schema drift is a client-side detection the backend can't
162
+ // see. Log the issue path + message ONLY — never the raw payload
163
+ // (`json`), which may contain file/cell data.
164
+ log.warn({
165
+ event: 'schema_validation_failed',
166
+ endpoint: pathname,
167
+ issue: first?.path.join('.') || '<root>',
168
+ err: first?.message,
169
+ }, 'schema_validation_failed');
39
170
  throw new Error(`Rockhopper API response failed schema check at ${path}: ` +
40
171
  `${first?.path.join('.') || '<root>'} — ${first?.message} ` +
41
172
  `(${parsed.error.issues.length} issue(s) total)`);
@@ -49,6 +180,12 @@ export class ApiClient {
49
180
  return this.request('/users/me');
50
181
  }
51
182
  // --- Teams ---
183
+ /**
184
+ * ENG-2230 — `teamId` is either spelling: the version-7 uuid or the legacy
185
+ * numeric internal id. Both are interpolated into the path unchanged and
186
+ * both name the same row (backend #1717). Widened from `number`, so no
187
+ * existing caller changes.
188
+ */
52
189
  async getTeam(teamId) {
53
190
  return this.request(`/teams/${teamId}`);
54
191
  }
@@ -72,6 +209,15 @@ export class ApiClient {
72
209
  async getFileVersion(versionInternalId) {
73
210
  return this.request(`/file-versions/file/version/${versionInternalId}`);
74
211
  }
212
+ /**
213
+ * Plan 02 ruling 5 — the completeness probe for every change-history
214
+ * surface. `foldPending: true` means a commit-diff fold is queued, retrying
215
+ * or running, i.e. the change-log window is mid-rewrite: incomplete.
216
+ * Consumed by `assertChangeHistoryComplete`, never rendered to the user.
217
+ */
218
+ async getFoldStatus(fileMsId) {
219
+ return this.request(`/file-versions/file/${fileMsId}/fold-status`, undefined, FoldStatusSchema);
220
+ }
75
221
  /**
76
222
  * KI-096: passes `?format=mcp` to opt into the backend's normalized
77
223
  * projection `{versionId, value, changedBy, changedAt}` (added by
@@ -79,6 +225,14 @@ export class ApiClient {
79
225
  * row shape the frontend cell-history popover consumes — we never
80
226
  * call that path. Zod-parses the response so future drift between
81
227
  * backend and mcp-server contracts fails loudly.
228
+ *
229
+ * ENG-1638 (P3-2) remainder: the backend now routes this read through the
230
+ * SAME ledger read-decision choke point as the webapp/add-in popovers
231
+ * (cross-surface parity). An eligible file serves the WIDENED entries
232
+ * (+ formula, provenance, actorKind, drivingHuman, formatted — including
233
+ * live events with versionId 'uncommitted'); a not-eligible file, a Google
234
+ * file, or an older backend serves the four-field legacy projection. The
235
+ * schema accepts both.
82
236
  */
83
237
  async getCellHistory(fileMsId, sheetName, cellAddress) {
84
238
  const query = new URLSearchParams({
@@ -134,6 +288,13 @@ export class ApiClient {
134
288
  async getReviewActivities(reviewId) {
135
289
  return this.request(`/reviews/requests/${reviewId}/activities`);
136
290
  }
291
+ /**
292
+ * ENG-2230 — `reviewerIds` accepts either spelling of a user id (uuid or
293
+ * legacy numeric internal id), mixed freely. Values are serialised
294
+ * verbatim; the backend resolves both (`@AcceptsResourceId({ reviewerIds:
295
+ * 'user' })` on `POST|PUT /reviews/requests`). `versionId` is a FILE
296
+ * VERSION id and is NOT re-keyed — it stays numeric.
297
+ */
137
298
  async createReviewRequest(body) {
138
299
  return this.request('/reviews/requests', {
139
300
  method: 'POST',
@@ -1 +1 @@
1
- {"version":3,"file":"api-client.js","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,cAAc,GACf,MAAM,kBAAkB,CAAC;AAO1B,MAAM,OAAO,SAAS;IACH,OAAO,CAAS;IAChB,KAAK,CAAS;IAE/B,YAAY,MAAuB;QACjC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAClD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;IAC5B,CAAC;IAED;;;;;;;OAOG;IACK,KAAK,CAAC,OAAO,CACnB,IAAY,EACZ,IAAkB,EAClB,cAA2B;QAE3B,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,EAAE,CAAC;QACrC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;YAChC,GAAG,IAAI;YACP,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,IAAI,CAAC,KAAK,EAAE;gBACrC,cAAc,EAAE,kBAAkB;gBAClC,GAAG,IAAI,EAAE,OAAO;aACjB;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC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AC,CAAC;IACL,CAAC;IAED,+BAA+B;IAE/B;;;;;;;OAOG;IACH,KAAK,CAAC,kBAAkB,CACtB,QAAgB,EAChB,IAAuB;QAEvB,OAAO,IAAI,CAAC,OAAO,CACjB,mBAAmB,QAAQ,EAAE,EAC7B;YACE,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;SAC3B,EACD,kBAAsD,CACvD,CAAC;IACJ,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"device-grant-client.d.ts","sourceRoot":"","sources":["../../src/auth/device-grant-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,uBAAuB,EAAE,MAAM,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,QAAQ,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,6EAA6E;IAC7E,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,eAAe,EAAE,MAAM,CAAC;QACxB,uBAAuB,EAAE,MAAM,CAAC;KACjC,KAAK,IAAI,CAAC;CACZ;AAED,qBAAa,gBAAiB,SAAQ,KAAK;aAEvB,IAAI,EAChB,eAAe,GACf,eAAe,GACf,eAAe,GACf,SAAS;gBAJG,IAAI,EAChB,eAAe,GACf,eAAe,GACf,eAAe,GACf,SAAS,EACb,OAAO,EAAE,MAAM;CAKlB;AAkBD;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,IAAI,CAAC,sBAAsB,EAAE,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC,GACvE,OAAO,CAAC,kBAAkB,CAAC,CAuB7B;AAED;;;GAGG;AACH,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,IAAI,CAAC,sBAAsB,EAAE,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC,EACxE,UAAU,EAAE,MAAM,GACjB,OAAO,CACN;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,kBAAkB,CAAA;CAAE,GAC/C;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,CACxB,CAsDA;AAED;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,sBAAsB,GAC3B,OAAO,CAAC,kBAAkB,CAAC,CAgC7B"}
1
+ {"version":3,"file":"device-grant-client.d.ts","sourceRoot":"","sources":["../../src/auth/device-grant-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,uBAAuB,EAAE,MAAM,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,QAAQ,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,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@@ -84,7 +84,9 @@ export async function pollOnce(opts, deviceCode) {
84
84
  // memory `project_backend_badrequest_unwraps_payload`).
85
85
  let body = {};
86
86
  try {
87
- body = await res.json();
87
+ // TS 6.0 types `Response.json()` as `Promise<unknown>`; the body shape is
88
+ // validated structurally by the `switch (body.error)` below.
89
+ body = (await res.json());
88
90
  }
89
91
  catch {
90
92
  // Non-JSON error body — fall through to 'unknown'.
@@ -1 +1 @@
1
- {"version":3,"file":"device-grant-client.js","sourceRoot":"","sources":["../../src/auth/device-grant-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAiCH,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IAEvB;IADlB,YACkB,IAIH,EACb,OAAe;QAEf,KAAK,CAAC,OAAO,CAAC,CAAC;QAPC,SAAI,GAAJ,IAAI,CAIP;QAIb,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AAED,gGAAgG;AAChG,MAAM,aAAa,GAAG,CAAC,EAAU,EAAE,EAAE,CACnC,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAE1D,MAAM,oBAAoB,GAAG,CAAC,IAI7B,EAAE,EAAE;IACH,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,wDAAwD;QACtD,SAAS,IAAI,CAAC,uBAAuB,IAAI;QACzC,aAAa,IAAI,CAAC,eAAe,oBAAoB,IAAI,CAAC,QAAQ,OAAO,CAC5E,CAAC;AACJ,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,IAAwE;IAExE,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC;IAC1C,IAAI,GAAa,CAAC;IAClB,IAAI,CAAC;QACH,GAAG,GAAG,MAAM,SAAS,CAAC,GAAG,IAAI,CAAC,OAAO,mBAAmB,EAAE;Y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