carrick 0.3.110 → 0.3.111

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/render.d.ts CHANGED
@@ -18,8 +18,6 @@ export declare function boundaryLines(boundary: Boundary | undefined, service: s
18
18
  * same count. Nothing here reformats or re-orders it.
19
19
  */
20
20
  export declare function boundaryFor(result: CheckResult): string[];
21
- /** True when the lines came from the CLI rather than from the port above. */
22
- export declare function boundaryIsPreRendered(result: CheckResult): boolean;
23
21
  /**
24
22
  * The verdict state in words. It is the type layer's word and only that: it
25
23
  * says nothing about freshness, which `stale` and `changed_since_index` carry.
@@ -54,12 +52,21 @@ export declare function itemLine(item: CheckItem, file: string | undefined): str
54
52
  /** Problems first, then everything that names another service, both by line. */
55
53
  export declare function reportableItems(result: CheckResult): CheckItem[];
56
54
  /**
57
- * The PostToolUse context, or `null` when the index has nothing to say at all.
55
+ * Lines in the checked file that the local index holds as unclassified: calls
56
+ * with no expected type, calls to a path nothing resolved, and literal
57
+ * candidates no row came out of. Each source lists `file:line` sites for the
58
+ * whole service, so this keeps the ones in `result.file` and nothing else.
59
+ */
60
+ export declare function unclassifiedLines(result: CheckResult): number[];
61
+ /**
62
+ * The PostToolUse context, or `null` for an error payload.
58
63
  *
59
- * A file with no indexed route or call still gets the boundary, because that is
60
- * the difference between "nothing crosses a service here" and "nothing here was
61
- * classified". Only an error payload and a payload with neither items nor a
62
- * boundary are silent.
64
+ * The header is printed on every checked file, even one with nothing to report:
65
+ * it is the only sign the hook ran, and silence reads the same as a hook that is
66
+ * not installed. The service-wide boundary is not here: it is the same text on
67
+ * every edit, which is what an agent learns to skip, so `renderSessionStart`
68
+ * prints it once. An edit adds one line, only when this file holds call sites
69
+ * the local index did not classify.
63
70
  */
64
71
  export declare function renderPostToolUse(result: CheckResult, displayFile?: string): string | null;
65
72
  /**
package/dist/render.js CHANGED
@@ -92,10 +92,6 @@ export function boundaryFor(result) {
92
92
  return [result.boundary_note, ...counts];
93
93
  return counts;
94
94
  }
95
- /** True when the lines came from the CLI rather than from the port above. */
96
- export function boundaryIsPreRendered(result) {
97
- return Boolean(result.boundary_lines?.length);
98
- }
99
95
  function counterpartText(counterparts) {
100
96
  const shown = counterparts.slice(0, MAX_COUNTERPARTS);
101
97
  const rendered = shown
@@ -265,25 +261,6 @@ function deletedLine(result) {
265
261
  const consumers = (result.items ?? []).reduce((total, item) => total + (item.counterparts ?? []).length, 0);
266
262
  return `This file is gone from disk and the index still holds ${(result.items ?? []).length} row(s) for it, with ${consumers} counterpart(s) still on the other side.`;
267
263
  }
268
- /**
269
- * Append the boundary to a rendered message.
270
- *
271
- * The port's first line is labelled, because on its own it reads as a bare
272
- * count. The CLI's own lines are appended untouched: a label glued to the front
273
- * of them would no longer be the bytes the CLI printed.
274
- */
275
- function pushBoundary(lines, result, boundary) {
276
- if (!boundary.length)
277
- return;
278
- if (boundaryIsPreRendered(result)) {
279
- for (const line of boundary)
280
- lines.push(line);
281
- return;
282
- }
283
- lines.push(`Boundary: ${boundary[0]}`);
284
- for (const line of boundary.slice(1))
285
- lines.push(line);
286
- }
287
264
  function staleLine(result) {
288
265
  if (!result.stale)
289
266
  return null;
@@ -303,25 +280,60 @@ function staleLine(result) {
303
280
  : "";
304
281
  return `This file has changed since the index, so these verdicts describe the indexed version.${suffix}${budget}`;
305
282
  }
283
+ /** Lines of the edited file the unclassified sentence names before it counts the rest. */
284
+ const MAX_UNCLASSIFIED_LINES = 5;
285
+ /**
286
+ * Lines in the checked file that the local index holds as unclassified: calls
287
+ * with no expected type, calls to a path nothing resolved, and literal
288
+ * candidates no row came out of. Each source lists `file:line` sites for the
289
+ * whole service, so this keeps the ones in `result.file` and nothing else.
290
+ */
291
+ export function unclassifiedLines(result) {
292
+ const file = result.file;
293
+ const boundary = result.boundary;
294
+ if (!file || !boundary)
295
+ return [];
296
+ const sites = [
297
+ ...(boundary.unemitted_literal_sites ?? []),
298
+ ...(boundary.calls_without_expected_type?.reasons ?? []),
299
+ ...(boundary.unknown_call_paths?.reasons ?? []),
300
+ ];
301
+ const lines = new Set();
302
+ for (const site of sites) {
303
+ const colon = site.lastIndexOf(":");
304
+ if (colon < 0 || site.slice(0, colon) !== file)
305
+ continue;
306
+ const line = Number(site.slice(colon + 1));
307
+ if (Number.isInteger(line) && line > 0)
308
+ lines.add(line);
309
+ }
310
+ return [...lines].sort((a, b) => a - b);
311
+ }
312
+ function unclassifiedLine(result) {
313
+ const lines = unclassifiedLines(result);
314
+ if (!lines.length)
315
+ return null;
316
+ const rest = lines.length - MAX_UNCLASSIFIED_LINES;
317
+ const shown = lines.slice(0, MAX_UNCLASSIFIED_LINES).join(", ");
318
+ const named = rest > 0 ? `${shown}, +${rest} more` : shown;
319
+ const noun = lines.length === 1 ? "call site" : "call sites";
320
+ return `${lines.length} ${noun} in this file not classified locally (line ${named}): ${lines.length === 1 ? "its route or type is" : "their routes or types are"} unchecked here.`;
321
+ }
306
322
  /**
307
- * The PostToolUse context, or `null` when the index has nothing to say at all.
323
+ * The PostToolUse context, or `null` for an error payload.
308
324
  *
309
- * A file with no indexed route or call still gets the boundary, because that is
310
- * the difference between "nothing crosses a service here" and "nothing here was
311
- * classified". Only an error payload and a payload with neither items nor a
312
- * boundary are silent.
325
+ * The header is printed on every checked file, even one with nothing to report:
326
+ * it is the only sign the hook ran, and silence reads the same as a hook that is
327
+ * not installed. The service-wide boundary is not here: it is the same text on
328
+ * every edit, which is what an agent learns to skip, so `renderSessionStart`
329
+ * prints it once. An edit adds one line, only when this file holds call sites
330
+ * the local index did not classify.
313
331
  */
314
332
  export function renderPostToolUse(result, displayFile) {
315
333
  if (result.error)
316
334
  return null;
317
335
  const items = reportableItems(result);
318
- const boundary = boundaryFor(result);
319
- // The boundary is never dropped: the local index holds no bare-receiver route
320
- // and no `fetch` call, because both need a model, so an empty answer without
321
- // the boundary beside it reads as "there is nothing here" when it means
322
- // "nothing here was classified".
323
- if (items.length === 0 && boundary.length === 0)
324
- return null;
336
+ const unclassified = unclassifiedLine(result);
325
337
  // `result.file` is relative to the repo that owns it, so the caller's own
326
338
  // workspace-relative path is the one a reader can open; it wins when given.
327
339
  const where = displayFile ?? result.file;
@@ -341,7 +353,8 @@ export function renderPostToolUse(result, displayFile) {
341
353
  const stale = staleLine(result);
342
354
  if (stale)
343
355
  lines.push(stale);
344
- pushBoundary(lines, result, boundary);
356
+ if (unclassified)
357
+ lines.push(unclassified);
345
358
  return lines.join("\n");
346
359
  }
347
360
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"render.js","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,EAAE;AACF,4EAA4E;AAC5E,sEAAsE;AACtE,8EAA8E;AAC9E,wDAAwD;AAExD,OAAO,EACL,cAAc,EACd,YAAY,GAUb,MAAM,eAAe,CAAC;AAEvB,qFAAqF;AACrF,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC;AACjC,sEAAsE;AACtE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAElC,MAAM,UAAU,SAAS,CAAC,MAA0B;IAClD,IAAI,CAAC,MAAM;QAAE,OAAO,mBAAmB,CAAC;IACxC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5B,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IACjC,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IACtB,OAAO,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,KAAK,GAAG,CAAC,CAAC,CAAC,KAAK,KAAK,GAAG,CAAC;AAC9D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,QAA8B,EAAE,OAA2B;IACvF,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAC;IACzB,MAAM,GAAG,GAAG,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U,CAAC;AACnF,CAAC;AAED,kFAAkF;AAClF,SAAS,MAAM,CAAC,MAAoB;IAClC,MAAM,GAAG,GAAG,CAAC,IAAwC,EAAU,EAAE,CAC/D,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;IACvE,OAAO,KAAK,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC;AACtG,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carrick",
3
- "version": "0.3.110",
3
+ "version": "0.3.111",
4
4
  "description": "Maps your entire TypeScript codebase across services and repositories, giving AI agents full context on existing types, routes, and function behaviours over MCP before they write duplicate or breaking code.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -58,11 +58,11 @@
58
58
  "zod": "^3.23.0"
59
59
  },
60
60
  "optionalDependencies": {
61
- "@carrick-tools/cli-darwin-arm64": "0.3.110",
62
- "@carrick-tools/cli-darwin-x64": "0.3.110",
63
- "@carrick-tools/cli-linux-arm64": "0.3.110",
64
- "@carrick-tools/cli-linux-x64": "0.3.110",
65
- "@carrick-tools/cli-win32-x64": "0.3.110"
61
+ "@carrick-tools/cli-darwin-arm64": "0.3.111",
62
+ "@carrick-tools/cli-darwin-x64": "0.3.111",
63
+ "@carrick-tools/cli-linux-arm64": "0.3.111",
64
+ "@carrick-tools/cli-linux-x64": "0.3.111",
65
+ "@carrick-tools/cli-win32-x64": "0.3.111"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@types/node": "^24.13.3"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "carrick",
3
3
  "description": "Claude Code plugin for Carrick, which indexes TypeScript codebases across service and repository boundaries. After each edit it adds the file's routes, calls, and cross-service type mismatches to the session, and it registers Carrick's language server. It pairs with the Carrick MCP server, which lets agents search functions by intent rather than name.",
4
- "version": "0.3.110",
4
+ "version": "0.3.111",
5
5
  "author": {
6
6
  "name": "Carrick",
7
7
  "email": "hello@carrick.tools"
@@ -304,14 +304,11 @@ export class TypeBundler {
304
304
  extractTypeDefinition(symbol) {
305
305
  const tableBody = symbol.consumer_response ? this.statusTableBodyText(symbol) : undefined;
306
306
  if (tableBody !== undefined) {
307
+ // The success row IS the body, list or not. A depth on this request was
308
+ // read off the body (carrick#1967) and is already in the row, so it is
309
+ // not applied again; the capture's symbol anchor reads the same rule.
307
310
  const alias = symbol.alias || symbol.symbol_name;
308
- const depth = symbol.array_depth ?? 0;
309
- if (depth > MAX_ARRAY_DEPTH)
310
- return null;
311
- const typeString = depth > 0 && tableBody !== 'unknown'
312
- ? `(${tableBody})${'[]'.repeat(depth)}`
313
- : tableBody;
314
- return { definition: `export type ${alias} = ${typeString};`, typeString };
311
+ return { definition: `export type ${alias} = ${tableBody};`, typeString: tableBody };
315
312
  }
316
313
  const base = this.extractTypeDefinitionBase(symbol);
317
314
  if (!base)
@@ -178,10 +178,13 @@ export function resolveAnchor(program, request, args) {
178
178
  ? `import('${spec}').${request.symbol_name}[${key}]`
179
179
  : `import('${spec}').${request.symbol_name}[${JSON.stringify(key)}]`);
180
180
  const body = rows.join(' | ');
181
- const unresolvedBody = unresolvedAtAnchor(program, sourceFile, declared, resolvedExport.declarations?.[0] ?? sourceFile, '<0>'.repeat(arrayDepth));
181
+ // The success row IS the body, list or not. A depth on this request
182
+ // was read off the body (carrick#1967) and is already in the row, so
183
+ // it is not applied again.
184
+ const unresolvedBody = unresolvedAtAnchor(program, sourceFile, declared, resolvedExport.declarations?.[0] ?? sourceFile, '');
182
185
  return {
183
186
  request,
184
- aliasText: arraySuffix && rows.length > 1 ? `(${body})${arraySuffix}` : `${body}${arraySuffix}`,
187
+ aliasText: body,
185
188
  serialization: 'emitted',
186
189
  ...(unresolvedBody ? { unresolved: unresolvedBody } : {}),
187
190
  };
@@ -273,6 +273,24 @@ export declare class TypeInferrer {
273
273
  * returns the repo's own type (`toInstance(View, plain)`) is the payload.
274
274
  */
275
275
  private callResultIsPayload;
276
+ /**
277
+ * True when a located call evaluates to plain data, so it is the payload
278
+ * whatever its arguments and wherever its type is declared (carrick#2055).
279
+ *
280
+ * `rows.map(toDto)`, `rows.filter(cb)` and `listItems(ownerId)` produce the
281
+ * list a route sends. Read as a send, the first produced the mapper's
282
+ * function type, the second a callback's return, and the third `string`.
283
+ * What a send or a registration hands back is never plain data: a reply
284
+ * builder or a router carries methods, a bare send returns `void`, and a
285
+ * serialiser returns a primitive. So the result alone tells them apart.
286
+ *
287
+ * Plain data, once promise levels are taken off: an object with at least
288
+ * one member, no call or construct signature, and no member that is itself
289
+ * callable; an array of one; or a union whose members other than `null` and
290
+ * `undefined` all are. Tuples and empty objects are left to the callers'
291
+ * own reading.
292
+ */
293
+ private callResultIsPlainData;
276
294
  /**
277
295
  * The wire representation a request's printed type takes. A route response
278
296
  * is serialised as JSON by every sender this layer reads a payload out of,
@@ -297,7 +315,8 @@ export declare class TypeInferrer {
297
315
  *
298
316
  * Returns `undefined` when this does not apply, which leaves the caller's
299
317
  * own reading of the located expression untouched:
300
- * - the row's line is not a route registration;
318
+ * - the row's line is neither a route registration nor a line inside the
319
+ * handler the located send sits in;
301
320
  * - the located expression is neither a send nor the argument of one;
302
321
  * - that send is not one the handler returns;
303
322
  * - it is a success send and the only one that survives, so the join would
@@ -1067,6 +1086,16 @@ export declare class TypeInferrer {
1067
1086
  * No method or framework name is consulted anywhere.
1068
1087
  */
1069
1088
  private responseSiteStatus;
1089
+ /**
1090
+ * The status an earlier call of a send's own chain states: the receiver
1091
+ * calls `call` is invoked on (`a.status(401).json(body)` has `a.status(401)`),
1092
+ * innermost last. Each receiver call's first argument is read by the rule
1093
+ * an argument past a body is, so a numeric literal or a literal-typed value
1094
+ * counts and a plain `number` is `variable`. `undefined` when no receiver
1095
+ * call states a status. No method name is consulted: a receiver call that
1096
+ * is handed no status-shaped value says nothing.
1097
+ */
1098
+ private chainStatus;
1070
1099
  /**
1071
1100
  * The HTTP status codes an argument states, `'variable'` when it is a
1072
1101
  * status-shaped value the source does not fix, or `undefined` when it says
@@ -1544,6 +1573,27 @@ export declare class TypeInferrer {
1544
1573
  * whose type does not resolve the member, or an opaque config, abstains.
1545
1574
  */
1546
1575
  private requestBodyInCall;
1576
+ /** A string, a string literal, a template literal, or a union of strings. */
1577
+ private isStringLikeType;
1578
+ /**
1579
+ * carrick#1841, request half: a request call that states its URL on its one
1580
+ * object argument (`client.post({ url: '/items', ...options })`, the way a
1581
+ * generated client issues every operation). The method's own parameter
1582
+ * types the body `unknown`, so the object is the only statement of it: its
1583
+ * `body` member, the member `RequestInit` defines, written on the object or
1584
+ * carried in by a spread whose type says what it is.
1585
+ *
1586
+ * - A `body` written after the object's last spread is the body.
1587
+ * - Otherwise the object's own type has the answer. No `body` member, or
1588
+ * one typed `undefined` or `never`, means the call sends no body.
1589
+ * - A member typed `any`, `unknown` or a type parameter, or one only the
1590
+ * compiler's default library declares (a spread `RequestInit` carries the
1591
+ * serialised `BodyInit`, not a payload), states no payload: abstain. So
1592
+ * does an object that carries another body-named member and no `body`.
1593
+ *
1594
+ * An object with no string-typed `url` member is not a request object.
1595
+ */
1596
+ private requestObjectBody;
1547
1597
  /**
1548
1598
  * The body a config-slot argument supplies through `member`: an object
1549
1599
  * literal's own member, or a variable's member read off its type.
@@ -1048,7 +1048,11 @@ export class TypeInferrer {
1048
1048
  // argument is the route path, not a payload. The span locator falls
1049
1049
  // back to exactly this shape when no payload expression was reported,
1050
1050
  // so drilling here would put the path literal's type in the manifest.
1051
- const registersCallback = args.some((arg) => Node.isArrowFunction(arg) || Node.isFunctionExpression(arg));
1051
+ // A call handed a function whose result is plain data is not a
1052
+ // registration but the payload: `rows.map((r) => ({ ... }))` sends the
1053
+ // list, not the callback's return (carrick#2055).
1054
+ const registersCallback = args.some((arg) => Node.isArrowFunction(arg) || Node.isFunctionExpression(arg)) &&
1055
+ !this.callResultIsPlainData(node);
1052
1056
  if (registersCallback) {
1053
1057
  // A registration that DECLARES its response contract in a schema needs
1054
1058
  // no indirection: the declaration is the contract the framework
@@ -1099,7 +1103,9 @@ export class TypeInferrer {
1099
1103
  // `typeText` keeps the bare name `Payment`, which dangles in the
1100
1104
  // source-less cross-repo bundle → `any` → unverifiable. Expand the
1101
1105
  // resolved object structurally so the real members land in the bundle.
1102
- typeString = this.expandResolvedTypeStructural(resolved, typeString, this.wireFormatFor(request));
1106
+ // The name it falls back to is the awaited one: a located call under
1107
+ // `await` sends what it resolves to, never the promise (carrick#2055).
1108
+ typeString = this.expandResolvedTypeStructural(resolved, typeText(resolved, payloadNode), this.wireFormatFor(request));
1103
1109
  }
1104
1110
  const anchor = this.unwrapArrayLevels(this.unwrapPromiseType(payloadType));
1105
1111
  return this.createInferredType(request, typeString, false, this.getNodeLocation(payloadNode), unwrapResult.wasUnwrapped ? unwrapResult.typeString : undefined, this.primaryTypeSymbol(anchor.element), anchor.depth, this.primaryTypeSymbolSource(anchor.element));
@@ -1257,6 +1263,8 @@ export class TypeInferrer {
1257
1263
  * returns the repo's own type (`toInstance(View, plain)`) is the payload.
1258
1264
  */
1259
1265
  callResultIsPayload(call) {
1266
+ if (this.callResultIsPlainData(call))
1267
+ return true;
1260
1268
  const { element } = this.unwrapArrayLevels(this.unwrapPromiseType(call.getType()));
1261
1269
  if (this.symbolIsLibOrExternalOrigin(element.getSymbol() ?? element.getAliasSymbol())) {
1262
1270
  return false;
@@ -1266,6 +1274,58 @@ export class TypeInferrer {
1266
1274
  // the call that built it would publish what it was built from.
1267
1275
  return this.nodeCarriesPayloadContract(call, false, false);
1268
1276
  }
1277
+ /**
1278
+ * True when a located call evaluates to plain data, so it is the payload
1279
+ * whatever its arguments and wherever its type is declared (carrick#2055).
1280
+ *
1281
+ * `rows.map(toDto)`, `rows.filter(cb)` and `listItems(ownerId)` produce the
1282
+ * list a route sends. Read as a send, the first produced the mapper's
1283
+ * function type, the second a callback's return, and the third `string`.
1284
+ * What a send or a registration hands back is never plain data: a reply
1285
+ * builder or a router carries methods, a bare send returns `void`, and a
1286
+ * serialiser returns a primitive. So the result alone tells them apart.
1287
+ *
1288
+ * Plain data, once promise levels are taken off: an object with at least
1289
+ * one member, no call or construct signature, and no member that is itself
1290
+ * callable; an array of one; or a union whose members other than `null` and
1291
+ * `undefined` all are. Tuples and empty objects are left to the callers'
1292
+ * own reading.
1293
+ */
1294
+ callResultIsPlainData(call) {
1295
+ const isPlainData = (type, depth) => {
1296
+ if (depth > 3)
1297
+ return false;
1298
+ if (type.isAny() || type.isUnknown() || type.isNever())
1299
+ return false;
1300
+ if (type.isUnion()) {
1301
+ const members = type
1302
+ .getUnionTypes()
1303
+ .filter((member) => !member.isNull() && !member.isUndefined());
1304
+ return members.length > 0 && members.every((member) => isPlainData(member, depth + 1));
1305
+ }
1306
+ if (type.isIntersection()) {
1307
+ return type.getIntersectionTypes().every((member) => isPlainData(member, depth + 1));
1308
+ }
1309
+ const element = type.getArrayElementType();
1310
+ if (element)
1311
+ return isPlainData(element, depth + 1);
1312
+ if (!type.isObject() || type.isTuple() || this.isCallableType(type))
1313
+ return false;
1314
+ if (this.typeIsOrContainsResponseMachinery(type))
1315
+ return false;
1316
+ const members = type.getProperties();
1317
+ const indexed = type.getStringIndexType() ?? type.getNumberIndexType();
1318
+ if (members.length === 0 && !indexed)
1319
+ return false;
1320
+ const callable = (held) => held.isUnion()
1321
+ ? held.getUnionTypes().some((member) => this.isCallableType(member))
1322
+ : this.isCallableType(held);
1323
+ if (indexed && callable(indexed))
1324
+ return false;
1325
+ return members.every((member) => !callable(member.getTypeAtLocation(call)));
1326
+ };
1327
+ return isPlainData(this.unwrapPromiseType(call.getType()), 0);
1328
+ }
1269
1329
  /**
1270
1330
  * The wire representation a request's printed type takes. A route response
1271
1331
  * is serialised as JSON by every sender this layer reads a payload out of,
@@ -1320,7 +1380,8 @@ export class TypeInferrer {
1320
1380
  *
1321
1381
  * Returns `undefined` when this does not apply, which leaves the caller's
1322
1382
  * own reading of the located expression untouched:
1323
- * - the row's line is not a route registration;
1383
+ * - the row's line is neither a route registration nor a line inside the
1384
+ * handler the located send sits in;
1324
1385
  * - the located expression is neither a send nor the argument of one;
1325
1386
  * - that send is not one the handler returns;
1326
1387
  * - it is a success send and the only one that survives, so the join would
@@ -1333,11 +1394,18 @@ export class TypeInferrer {
1333
1394
  * or the redirect location back in.
1334
1395
  */
1335
1396
  inferFromResponseSites(sourceFile, request, located, extractionConfig) {
1336
- if (!this.registrationAtLine(sourceFile, request.line_number))
1337
- return undefined;
1338
1397
  const func = this.findContainingFunctionForNode(located);
1339
1398
  if (!func)
1340
1399
  return undefined;
1400
+ // The row's line is a registration, or a line inside the handler the
1401
+ // located send sits in (carrick#2005: a file-based route's row names the
1402
+ // send's own line, and a send's line is no registration). A row whose
1403
+ // line is outside that function says nothing about it.
1404
+ if (!this.registrationAtLine(sourceFile, request.line_number) &&
1405
+ !(func.getStartLineNumber() <= request.line_number &&
1406
+ request.line_number <= func.getEndLineNumber())) {
1407
+ return undefined;
1408
+ }
1341
1409
  const branches = this.responseReturnedExpressions(func).flatMap((expression) => this.expandResponseBranches(expression, 0));
1342
1410
  if (branches.length === 0)
1343
1411
  return undefined;
@@ -1352,10 +1420,10 @@ export class TypeInferrer {
1352
1420
  if (!locatedBranch)
1353
1421
  return undefined;
1354
1422
  const dropped = (status) => status === 'error' || status === 'redirect';
1355
- const siteStatus = this.responseSiteStatus(site);
1423
+ const siteStatus = this.responseSiteStatus(site, true);
1356
1424
  const survivors = [];
1357
1425
  for (const branch of branches) {
1358
- const status = branch === locatedBranch ? siteStatus : this.responseSiteStatus(branch);
1426
+ const status = branch === locatedBranch ? siteStatus : this.responseSiteStatus(branch, true);
1359
1427
  if (status === 'variable') {
1360
1428
  this.log(`Response status at ${request.file_path}:${this.getNodeLocation(branch).start_line} ` +
1361
1429
  'is not a literal; keeping that send in the route contract');
@@ -2147,8 +2215,8 @@ export class TypeInferrer {
2147
2215
  path: '',
2148
2216
  kind: 'unknown',
2149
2217
  reason: 'no_request_body',
2150
- detail: `the located argument is the call's request config, and it sets no '${inCall.member}' ` +
2151
- 'member, which is where the call takes its body, so the call sends no request body',
2218
+ detail: `the call's request config sets no '${inCall.member}' member, which is where the call ` +
2219
+ 'takes its body, so the call sends no request body',
2152
2220
  },
2153
2221
  ];
2154
2222
  return abstain;
@@ -4436,7 +4504,7 @@ export class TypeInferrer {
4436
4504
  * A status in the FIRST argument is a field of the body and is never read.
4437
4505
  * No method or framework name is consulted anywhere.
4438
4506
  */
4439
- responseSiteStatus(expression) {
4507
+ responseSiteStatus(expression, readChain = false) {
4440
4508
  const call = this.peelTransparentExpression(expression);
4441
4509
  if (!Node.isCallExpression(call) && !Node.isNewExpression(call)) {
4442
4510
  return 'undecided';
@@ -4459,6 +4527,14 @@ export class TypeInferrer {
4459
4527
  }
4460
4528
  if (variable)
4461
4529
  return 'variable';
4530
+ // carrick#2005: a status an earlier call of the same chain states
4531
+ // (`reply.status(401).json(body)`). Read only where the caller asks for
4532
+ // it; the return walk does not read it yet (carrick#1962).
4533
+ if (readChain) {
4534
+ const chained = this.chainStatus(call);
4535
+ if (chained)
4536
+ return chained;
4537
+ }
4462
4538
  const typed = this.sendResultStatusCodes(call);
4463
4539
  if (typed) {
4464
4540
  const kind = classifyStatusCodes(typed);
@@ -4467,6 +4543,37 @@ export class TypeInferrer {
4467
4543
  }
4468
4544
  return 'undecided';
4469
4545
  }
4546
+ /**
4547
+ * The status an earlier call of a send's own chain states: the receiver
4548
+ * calls `call` is invoked on (`a.status(401).json(body)` has `a.status(401)`),
4549
+ * innermost last. Each receiver call's first argument is read by the rule
4550
+ * an argument past a body is, so a numeric literal or a literal-typed value
4551
+ * counts and a plain `number` is `variable`. `undefined` when no receiver
4552
+ * call states a status. No method name is consulted: a receiver call that
4553
+ * is handed no status-shaped value says nothing.
4554
+ */
4555
+ chainStatus(call) {
4556
+ if (!Node.isCallExpression(call))
4557
+ return undefined;
4558
+ let callee = call.getExpression();
4559
+ while (Node.isPropertyAccessExpression(callee)) {
4560
+ const receiver = this.peelTransparentExpression(callee.getExpression());
4561
+ if (!Node.isCallExpression(receiver))
4562
+ return undefined;
4563
+ const first = receiver.getArguments()[0];
4564
+ if (first) {
4565
+ const read = this.statedStatusCodes(this.peelTransparentExpression(first));
4566
+ if (read === 'variable')
4567
+ return 'variable';
4568
+ if (read) {
4569
+ const kind = classifyStatusCodes(read);
4570
+ return kind === 'mixed' ? 'variable' : kind;
4571
+ }
4572
+ }
4573
+ callee = receiver.getExpression();
4574
+ }
4575
+ return undefined;
4576
+ }
4470
4577
  /**
4471
4578
  * The HTTP status codes an argument states, `'variable'` when it is a
4472
4579
  * status-shaped value the source does not fix, or `undefined` when it says
@@ -5565,14 +5672,11 @@ export class TypeInferrer {
5565
5672
  requestBodyInCall(node) {
5566
5673
  if (Node.isCallExpression(node)) {
5567
5674
  const args = node.getArguments();
5675
+ if (args.length === 1)
5676
+ return this.requestObjectBody(args[0]);
5568
5677
  if (args.length < 2)
5569
5678
  return { kind: 'none' };
5570
- const first = args[0].getType();
5571
- const stringLike = first.isString() ||
5572
- first.isStringLiteral() ||
5573
- first.isTemplateLiteral() ||
5574
- (first.isUnion() && first.getUnionTypes().every((t) => t.isString() || t.isStringLiteral()));
5575
- if (!stringLike)
5679
+ if (!this.isStringLikeType(args[0].getType()))
5576
5680
  return { kind: 'none' };
5577
5681
  const slots = this.requestBodySlots(node);
5578
5682
  for (let i = 1; i < args.length; i++) {
@@ -5608,6 +5712,80 @@ export class TypeInferrer {
5608
5712
  }
5609
5713
  return { kind: 'none' };
5610
5714
  }
5715
+ /** A string, a string literal, a template literal, or a union of strings. */
5716
+ isStringLikeType(type) {
5717
+ return (type.isString() ||
5718
+ type.isStringLiteral() ||
5719
+ type.isTemplateLiteral() ||
5720
+ (type.isUnion() && type.getUnionTypes().every((t) => t.isString() || t.isStringLiteral())));
5721
+ }
5722
+ /**
5723
+ * carrick#1841, request half: a request call that states its URL on its one
5724
+ * object argument (`client.post({ url: '/items', ...options })`, the way a
5725
+ * generated client issues every operation). The method's own parameter
5726
+ * types the body `unknown`, so the object is the only statement of it: its
5727
+ * `body` member, the member `RequestInit` defines, written on the object or
5728
+ * carried in by a spread whose type says what it is.
5729
+ *
5730
+ * - A `body` written after the object's last spread is the body.
5731
+ * - Otherwise the object's own type has the answer. No `body` member, or
5732
+ * one typed `undefined` or `never`, means the call sends no body.
5733
+ * - A member typed `any`, `unknown` or a type parameter, or one only the
5734
+ * compiler's default library declares (a spread `RequestInit` carries the
5735
+ * serialised `BodyInit`, not a payload), states no payload: abstain. So
5736
+ * does an object that carries another body-named member and no `body`.
5737
+ *
5738
+ * An object with no string-typed `url` member is not a request object.
5739
+ */
5740
+ requestObjectBody(arg) {
5741
+ const literal = this.unwrapExpressionNode(arg);
5742
+ if (!Node.isObjectLiteralExpression(literal))
5743
+ return { kind: 'none' };
5744
+ const objectType = literal.getType();
5745
+ const url = objectType.getProperty('url');
5746
+ if (!url || !this.isStringLikeType(url.getTypeAtLocation(literal).getNonNullableType())) {
5747
+ return { kind: 'none' };
5748
+ }
5749
+ const from = "the request call's request object";
5750
+ const member = 'body';
5751
+ const properties = literal.getProperties();
5752
+ const written = properties.findIndex((p) => (Node.isPropertyAssignment(p) || Node.isShorthandPropertyAssignment(p)) &&
5753
+ p.getName() === member);
5754
+ const spreadAfter = properties.some((p, i) => i > written && Node.isSpreadAssignment(p));
5755
+ if (written >= 0 && !spreadAfter) {
5756
+ const value = this.objectLiteralMemberValue(literal, member);
5757
+ if (value)
5758
+ return { kind: 'body', node: value, from };
5759
+ }
5760
+ const property = objectType.getProperty(member);
5761
+ if (!property) {
5762
+ const otherBodyMember = [...BODY_MEMBER_NAMES].some((name) => name !== member && objectType.getProperty(name));
5763
+ return otherBodyMember
5764
+ ? { kind: 'abstain', why: `the request object carries no '${member}' member but another body-named one` }
5765
+ : { kind: 'no_body', member };
5766
+ }
5767
+ const type = property.getTypeAtLocation(literal);
5768
+ if (type.isAny() || type.isUnknown() || type.isTypeParameter()) {
5769
+ return { kind: 'abstain', why: `the request object's '${member}' member is not typed` };
5770
+ }
5771
+ const bare = type.getNonNullableType();
5772
+ if (bare.isNever() || bare.isUndefined() || bare.isVoid()) {
5773
+ return { kind: 'no_body', member };
5774
+ }
5775
+ if (bare.isAny() || bare.isUnknown() || bare.isTypeParameter()) {
5776
+ return { kind: 'abstain', why: `the request object's '${member}' member is not typed` };
5777
+ }
5778
+ const program = this.project.getProgram().compilerObject;
5779
+ const declarations = property.getDeclarations();
5780
+ if (declarations.length > 0 &&
5781
+ declarations.every((d) => program.isSourceFileDefaultLibrary(d.getSourceFile().compilerNode))) {
5782
+ return {
5783
+ kind: 'abstain',
5784
+ why: `the request object's '${member}' member is the platform's serialised body, not a payload`,
5785
+ };
5786
+ }
5787
+ return { kind: 'body_type', type: bare, at: literal, from };
5788
+ }
5611
5789
  /**
5612
5790
  * The body a config-slot argument supplies through `member`: an object
5613
5791
  * literal's own member, or a variable's member read off its type.
@@ -6877,11 +7055,11 @@ export class TypeInferrer {
6877
7055
  infer_kind: request.infer_kind,
6878
7056
  payload_type_string: payloadTypeString,
6879
7057
  primary_type_symbol: primaryTypeSymbol,
6880
- // Only meaningful relative to the anchor symbol: without an element
6881
- // symbol there is nothing for the explicit-bundle correction to match.
6882
- array_depth: primaryTypeSymbol !== undefined && arrayDepth !== undefined && arrayDepth > 0
6883
- ? arrayDepth
6884
- : undefined,
7058
+ // Reported whether or not the element has a symbol (carrick#1967): an
7059
+ // array whose element prints structurally is still a list. The Rust
7060
+ // depth join copies it onto the model's symbol when the symbols agree,
7061
+ // or, at a handler's send, when the element has no symbol to disagree.
7062
+ array_depth: arrayDepth !== undefined && arrayDepth > 0 ? arrayDepth : undefined,
6885
7063
  // Same gate: a declaration source without an anchor symbol is useless.
6886
7064
  primary_type_symbol_source: primaryTypeSymbol !== undefined ? primaryTypeSymbolSource : undefined,
6887
7065
  };
@@ -885,7 +885,10 @@ export interface InferredType {
885
885
  * `array_depth: 1`. Lets `resolve_all_types` copy the use-site's array-ness
886
886
  * onto an explicit `SymbolRequest` for the same alias, which would otherwise
887
887
  * bundle the bare element and erase the array (array-vs-scalar scored
888
- * compatible, #306). Omitted when 0 or when there is no anchor symbol.
888
+ * compatible, #306). Omitted when 0. Reported without an anchor symbol
889
+ * too (carrick#1967): a list whose element prints structurally is still a
890
+ * list, and at a handler's send the join copies its depth onto the model's
891
+ * symbol.
889
892
  */
890
893
  array_depth?: number;
891
894
  /**