primitive-admin 1.2.0-alpha.7 → 1.2.0-alpha.9

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 (93) hide show
  1. package/README.md +8 -2
  2. package/assets/skill/skills/primitive-platform/SKILL.md +22 -8
  3. package/dist/src/commands/apps-children.d.ts +1 -1
  4. package/dist/src/commands/apps-children.js +55 -145
  5. package/dist/src/commands/apps-children.js.map +1 -1
  6. package/dist/src/commands/auth.js +107 -33
  7. package/dist/src/commands/auth.js.map +1 -1
  8. package/dist/src/commands/database-types.js +13 -313
  9. package/dist/src/commands/database-types.js.map +1 -1
  10. package/dist/src/commands/databases.js +13 -1
  11. package/dist/src/commands/databases.js.map +1 -1
  12. package/dist/src/commands/documents.js +70 -11
  13. package/dist/src/commands/documents.js.map +1 -1
  14. package/dist/src/commands/llm.js +9 -6
  15. package/dist/src/commands/llm.js.map +1 -1
  16. package/dist/src/commands/settings.d.ts +12 -9
  17. package/dist/src/commands/settings.js +31 -79
  18. package/dist/src/commands/settings.js.map +1 -1
  19. package/dist/src/commands/sync-app-settings.d.ts +12 -2
  20. package/dist/src/commands/sync-app-settings.js +35 -10
  21. package/dist/src/commands/sync-app-settings.js.map +1 -1
  22. package/dist/src/commands/sync.d.ts +1 -8
  23. package/dist/src/commands/sync.js +47 -45
  24. package/dist/src/commands/sync.js.map +1 -1
  25. package/dist/src/lib/api-client.d.ts +46 -6
  26. package/dist/src/lib/api-client.js +156 -64
  27. package/dist/src/lib/api-client.js.map +1 -1
  28. package/dist/src/lib/app-settings-descriptor.d.ts +38 -0
  29. package/dist/src/lib/app-settings-descriptor.js +96 -4
  30. package/dist/src/lib/app-settings-descriptor.js.map +1 -1
  31. package/dist/src/lib/child-apps-local.d.ts +0 -46
  32. package/dist/src/lib/child-apps-local.js +2 -72
  33. package/dist/src/lib/child-apps-local.js.map +1 -1
  34. package/dist/src/lib/credentials-home.d.ts +51 -0
  35. package/dist/src/lib/credentials-home.js +169 -0
  36. package/dist/src/lib/credentials-home.js.map +1 -0
  37. package/dist/src/lib/credentials-lock.d.ts +80 -0
  38. package/dist/src/lib/credentials-lock.js +222 -0
  39. package/dist/src/lib/credentials-lock.js.map +1 -0
  40. package/dist/src/lib/credentials-store.d.ts +56 -4
  41. package/dist/src/lib/credentials-store.js +236 -78
  42. package/dist/src/lib/credentials-store.js.map +1 -1
  43. package/dist/src/lib/env-resolver-core.d.ts +1 -1
  44. package/dist/src/lib/env-resolver-core.js.map +1 -1
  45. package/dist/src/lib/function-bundle.d.ts +38 -18
  46. package/dist/src/lib/function-bundle.js +60 -35
  47. package/dist/src/lib/function-bundle.js.map +1 -1
  48. package/dist/src/lib/function-document-types.d.ts +5 -3
  49. package/dist/src/lib/function-document-types.js +10 -14
  50. package/dist/src/lib/function-document-types.js.map +1 -1
  51. package/dist/src/lib/function-source-roots.d.ts +67 -0
  52. package/dist/src/lib/function-source-roots.js +148 -0
  53. package/dist/src/lib/function-source-roots.js.map +1 -0
  54. package/dist/src/lib/function-sync.d.ts +27 -0
  55. package/dist/src/lib/function-sync.js +16 -3
  56. package/dist/src/lib/function-sync.js.map +1 -1
  57. package/dist/src/lib/function-triggers.d.ts +15 -3
  58. package/dist/src/lib/function-triggers.js +72 -10
  59. package/dist/src/lib/function-triggers.js.map +1 -1
  60. package/dist/src/lib/function-typecheck.d.ts +37 -2
  61. package/dist/src/lib/function-typecheck.js +210 -28
  62. package/dist/src/lib/function-typecheck.js.map +1 -1
  63. package/dist/src/lib/generated-config-surfaces.d.ts +48 -11
  64. package/dist/src/lib/generated-config-surfaces.js +178 -49
  65. package/dist/src/lib/generated-config-surfaces.js.map +1 -1
  66. package/dist/src/lib/generated-sdk-types.d.ts +1 -1
  67. package/dist/src/lib/generated-sdk-types.js +1 -1
  68. package/dist/src/lib/generated-sdk-types.js.map +1 -1
  69. package/dist/src/lib/generated-workflow-model-fields.d.ts +20 -0
  70. package/dist/src/lib/generated-workflow-model-fields.js +53 -0
  71. package/dist/src/lib/generated-workflow-model-fields.js.map +1 -0
  72. package/dist/src/lib/login-scope-lines.d.ts +1 -1
  73. package/dist/src/lib/login-scope-lines.js +1 -1
  74. package/dist/src/lib/login-scope-lines.js.map +1 -1
  75. package/dist/src/lib/project-config.d.ts +7 -0
  76. package/dist/src/lib/project-config.js +22 -1
  77. package/dist/src/lib/project-config.js.map +1 -1
  78. package/dist/src/lib/prompt-schema-codegen.d.ts +10 -3
  79. package/dist/src/lib/prompt-schema-codegen.js +52 -14
  80. package/dist/src/lib/prompt-schema-codegen.js.map +1 -1
  81. package/dist/src/lib/root-import-decision.d.ts +9 -4
  82. package/dist/src/lib/root-import-decision.js +24 -3
  83. package/dist/src/lib/root-import-decision.js.map +1 -1
  84. package/dist/src/lib/scope-request.d.ts +8 -5
  85. package/dist/src/lib/scope-request.js +17 -8
  86. package/dist/src/lib/scope-request.js.map +1 -1
  87. package/dist/src/lib/swift-codegen/agentGenerator.d.ts +6 -2
  88. package/dist/src/lib/swift-codegen/agentGenerator.js +56 -4
  89. package/dist/src/lib/swift-codegen/agentGenerator.js.map +1 -1
  90. package/dist/src/lib/workflow-field-descriptor.d.ts +91 -0
  91. package/dist/src/lib/workflow-field-descriptor.js +153 -0
  92. package/dist/src/lib/workflow-field-descriptor.js.map +1 -0
  93. package/package.json +2 -2
@@ -48,14 +48,52 @@
48
48
  * A file the tsconfig does not sweep in is added as a root rather than skipped:
49
49
  * a narrowed `include` must not silently turn the check off for the code the
50
50
  * push is about to ship.
51
+ *
52
+ * ── Shared sources (#4502) ───────────────────────────────────────────────
53
+ *
54
+ * A project may declare directories outside the tree (`functionSources`); the
55
+ * bundler inlines their files and this check has to agree with it on two
56
+ * things, or code would bundle that never typechecked:
57
+ *
58
+ * - WHICH files. The graph follows a file whose REAL path is inside the tree
59
+ * or a declared directory, as the bundler classifies, and the check is also
60
+ * seeded with the shared files the bundle actually read — a package whose
61
+ * `types` export names a declaration is bundled from its `import` export,
62
+ * which the type graph alone never reaches. The graph keeps TypeScript's
63
+ * own spelling of each file (that is what the program answers to), while
64
+ * its visited set is keyed by real path, so a file reached through a
65
+ * symlink and directly is checked and reported once per function.
66
+ * - HOW imports resolve. esbuild resolves from a file's real location and
67
+ * honours that file's nearest `tsconfig.json` `paths`. So a shared file's
68
+ * imports resolve from its real path, with the functions tsconfig's options
69
+ * but that tsconfig's `paths`/`baseUrl` in place of the functions ones.
70
+ * The same rule feeds the graph walk and the program's own resolution.
71
+ * Every other option stays the functions tsconfig's: shared code runs in
72
+ * the same Worker. `primitive-functions` imported from a shared file is
73
+ * always the generated declaration, whatever its tsconfig maps.
51
74
  */
52
75
  import { createRequire } from "module";
53
- import { existsSync } from "fs";
54
- import { join, resolve, sep } from "path";
55
- import { FUNCTIONS_TSCONFIG_FILE, SDK_MODULE_SPECIFIER, planFunctionTypeArtifacts, renderFunctionsTsconfig, } from "./function-db-types.js";
76
+ import { existsSync, realpathSync } from "fs";
77
+ import { dirname, join, relative, resolve, sep } from "path";
78
+ import { FUNCTIONS_TSCONFIG_FILE, SDK_MODULE_SPECIFIER, SDK_TYPES_FILE, planFunctionTypeArtifacts, renderFunctionsTsconfig, } from "./function-db-types.js";
56
79
  import { FunctionSchemaCodegenError } from "./function-schema-codegen.js";
80
+ import { isInsideDirectory, resolveFunctionSourceRoots, } from "./function-source-roots.js";
57
81
  /** The flag that skips the check, named wherever the refusal is read. */
58
82
  export const TYPECHECK_SKIP_FLAG = "--no-typecheck";
83
+ /** The real path, or the spelling itself when it cannot be resolved. */
84
+ function realOrSelf(path) {
85
+ try {
86
+ return realpathSync(path);
87
+ }
88
+ catch {
89
+ return path;
90
+ }
91
+ }
92
+ /**
93
+ * "No inputs were found" and "The 'files' list is empty": a shared file's
94
+ * tsconfig is read for its `paths` only, so what it would compile is moot.
95
+ */
96
+ const SHARED_TSCONFIG_IGNORED_CODES = new Set([18002, 18003]);
59
97
  /**
60
98
  * "Could not find a declaration file for module 'x'" (7016) and "Cannot find
61
99
  * module 'x' or its corresponding type declarations" (2307).
@@ -206,6 +244,7 @@ export function createFunctionTypechecker(configDir, options = {}) {
206
244
  getCurrentDirectory: () => functionsDir,
207
245
  getNewLine: () => "\n",
208
246
  };
247
+ const warn = options.onWarning ?? ((message) => warnings.push(message));
209
248
  // Module resolution over the same overlay the program reads, so an import of
210
249
  // `primitive-functions` lands on the planned declaration rather than on
211
250
  // whatever is (or is not) on disk.
@@ -218,12 +257,136 @@ export function createFunctionTypechecker(configDir, options = {}) {
218
257
  getDirectories: ts.sys.getDirectories,
219
258
  directoryExists: ts.sys.directoryExists,
220
259
  };
221
- const resolveModule = (specifier, containingFile, options) => ts.resolveModuleName(specifier, containingFile, options, resolutionHost)
222
- .resolvedModule;
260
+ /**
261
+ * Is this an in-tree file of the author's, or a file under a declared
262
+ * directory, as opposed to a dependency?
263
+ *
264
+ * Decided on the REAL path, as the bundler decides (#4502), with the
265
+ * spelling as the fallback for a file that cannot be resolved — a seed
266
+ * deleted since the build, whose missing-file diagnostic should surface. A
267
+ * package's own declarations are not this check's business (see
268
+ * {@link isThirdPartyModuleDiagnostic}), and neither are the generated ones
269
+ * — an error in those is a push bug, not something the author's push can
270
+ * act on.
271
+ */
272
+ const treeRoot = resolve(configDir);
273
+ const realTreeRoot = realOrSelf(treeRoot);
274
+ const declaredRoots = (options.sourceRoots ??
275
+ resolveFunctionSourceRoots(configDir).roots.map((root) => root.absolute)).map((root) => realOrSelf(resolve(root)));
276
+ const realPaths = new Map();
277
+ const realOf = (path) => {
278
+ let real = realPaths.get(path);
279
+ if (real === undefined) {
280
+ real = realOrSelf(path);
281
+ realPaths.set(path, real);
282
+ }
283
+ return real;
284
+ };
285
+ const realOverlay = new Set([...overlay.keys()].map((path) => join(realTreeRoot, relative(treeRoot, path))));
286
+ // The spelling counts only when it could not be resolved: an in-tree
287
+ // symlink into a declared directory is a shared file, as the bundler says.
288
+ const isTreeFile = (path) => {
289
+ const real = realOf(path);
290
+ return (isInsideDirectory(realTreeRoot, real) ||
291
+ (real === path && isInsideDirectory(treeRoot, path)));
292
+ };
293
+ const isSharedFile = (path) => !isTreeFile(path) &&
294
+ declaredRoots.some((root) => isInsideDirectory(root, realOf(path)));
295
+ const isCheckedSource = (path) => (isTreeFile(path) || isSharedFile(path)) &&
296
+ !path.split(sep).includes("node_modules") &&
297
+ !realOf(path).split(sep).includes("node_modules") &&
298
+ !overlay.has(path) &&
299
+ !realOverlay.has(realOf(path));
300
+ /**
301
+ * The options a file's imports resolve with: the functions tsconfig's for a
302
+ * tree file; for a shared file, the same with `paths`, `baseUrl` and
303
+ * `pathsBasePath` taken from the nearest `tsconfig.json` above its REAL
304
+ * path — the file esbuild reads for it. A tsconfig that does not parse is
305
+ * one warning, and its file resolves with the functions options.
306
+ */
307
+ const sharedResolution = new Map();
308
+ const quietParseHost = {
309
+ useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames,
310
+ // Read for its `paths`; what it would compile is never asked.
311
+ readDirectory: () => [],
312
+ fileExists: ts.sys.fileExists,
313
+ readFile: ts.sys.readFile,
314
+ };
315
+ const sharedTsconfigOptions = (configPath) => {
316
+ const cached = sharedResolution.get(configPath);
317
+ if (cached !== undefined)
318
+ return cached;
319
+ let resolved = parsed.options;
320
+ const read = ts.readConfigFile(configPath, ts.sys.readFile);
321
+ if (read.error) {
322
+ warn(`${configPath}: not readable as a tsconfig, so the shared files below it ` +
323
+ `resolve imports with functions/${FUNCTIONS_TSCONFIG_FILE}'s options (` +
324
+ ts.flattenDiagnosticMessageText(read.error.messageText, " ") +
325
+ ").");
326
+ }
327
+ else {
328
+ const own = ts.parseJsonConfigFileContent(read.config, quietParseHost, dirname(configPath), undefined, configPath);
329
+ const errors = (own.errors ?? []).filter((diagnostic) => !SHARED_TSCONFIG_IGNORED_CODES.has(diagnostic.code));
330
+ const aliased = own.options.paths !== undefined || own.options.baseUrl !== undefined;
331
+ if (errors.length > 0) {
332
+ warn(`${configPath}: ` +
333
+ errors
334
+ .map((diagnostic) => ts.flattenDiagnosticMessageText(diagnostic.messageText, " "))
335
+ .join("; ") +
336
+ (aliased
337
+ ? " — its own paths are still used for the shared files below it."
338
+ : ` — the shared files below it resolve imports with functions/${FUNCTIONS_TSCONFIG_FILE}'s options.`));
339
+ }
340
+ if (errors.length === 0 || aliased) {
341
+ resolved = {
342
+ ...parsed.options,
343
+ paths: own.options.paths,
344
+ baseUrl: own.options.baseUrl,
345
+ pathsBasePath: own.options.pathsBasePath,
346
+ };
347
+ }
348
+ }
349
+ sharedResolution.set(configPath, resolved);
350
+ return resolved;
351
+ };
352
+ /** A shared file with no tsconfig above it has no aliases. */
353
+ const unaliasedOptions = {
354
+ ...parsed.options,
355
+ paths: undefined,
356
+ baseUrl: undefined,
357
+ pathsBasePath: undefined,
358
+ };
359
+ const resolutionOptionsFor = (containingFile) => {
360
+ if (!isSharedFile(containingFile))
361
+ return parsed.options;
362
+ const configPath = ts.findConfigFile(dirname(realOf(containingFile)), ts.sys.fileExists, "tsconfig.json");
363
+ return configPath ? sharedTsconfigOptions(resolve(configPath)) : unaliasedOptions;
364
+ };
365
+ /** The generated SDK declaration every shared file's import lands on. */
366
+ const sdkDeclaration = join(functionsDir, SDK_TYPES_FILE);
367
+ /**
368
+ * The resolution mode a file's imports take when the literal itself is not
369
+ * at hand (the graph walk, the installed-package lookup): the file's own
370
+ * module format, which is what the compiler gives a static import. Under
371
+ * `Bundler` it is undefined and the compiler picks the `import` conditions.
372
+ */
373
+ const impliedMode = (containingFile, options) => ts.getImpliedNodeFormatForFile(resolve(containingFile), undefined, resolutionHost, options);
374
+ const resolveModule = (specifier, containingFile, options, mode = impliedMode(containingFile, options)) => {
375
+ if (specifier === SDK_MODULE_SPECIFIER && isSharedFile(containingFile)) {
376
+ return {
377
+ resolvedFileName: resolve(sdkDeclaration),
378
+ extension: ".d.ts",
379
+ isExternalLibraryImport: false,
380
+ };
381
+ }
382
+ // From the file's real location, as esbuild resolves: a shared file
383
+ // reached through a symlink climbs and finds packages where it lives.
384
+ return ts.resolveModuleName(specifier, realOf(containingFile), options, resolutionHost, undefined, undefined, mode).resolvedModule;
385
+ };
223
386
  /** Does this bare specifier name a package that is actually installed? */
224
387
  const installedPackages = new Map();
225
388
  const isInstalledPackage = (specifier, containingFile) => {
226
- const key = `${specifier}${containingFile}`;
389
+ const key = `${specifier} ${containingFile}`;
227
390
  const cached = installedPackages.get(key);
228
391
  if (cached !== undefined)
229
392
  return cached;
@@ -231,7 +394,7 @@ export function createFunctionTypechecker(configDir, options = {}) {
231
394
  // is for — resolves, and `noImplicitAny: false` so the lookup answers
232
395
  // "found" rather than re-raising the diagnostic being classified.
233
396
  const resolved = resolveModule(specifier, containingFile, {
234
- ...parsed.options,
397
+ ...resolutionOptionsFor(containingFile),
235
398
  allowJs: true,
236
399
  checkJs: false,
237
400
  noImplicitAny: false,
@@ -241,19 +404,7 @@ export function createFunctionTypechecker(configDir, options = {}) {
241
404
  return installed;
242
405
  };
243
406
  /**
244
- * Is this an in-tree file of the author's, as opposed to a dependency?
245
- *
246
- * A package's own declarations are not this check's business (see
247
- * {@link isThirdPartyModuleDiagnostic}), and neither are the generated ones —
248
- * an error in those is a push bug, not something the author's push can act
249
- * on.
250
- */
251
- const treeRoot = resolve(configDir);
252
- const isTreeSource = (path) => path.startsWith(treeRoot.endsWith(sep) ? treeRoot : treeRoot + sep) &&
253
- !path.split(sep).includes("node_modules") &&
254
- !overlay.has(path);
255
- /**
256
- * The in-tree files one source pulls in — INCLUDING the type-only imports
407
+ * The checked files one source pulls in — INCLUDING the type-only imports
257
408
  * esbuild erases, which is why this walks the graph itself instead of
258
409
  * trusting the bundle's input list (SO3331-002).
259
410
  */
@@ -265,29 +416,34 @@ export function createFunctionTypechecker(configDir, options = {}) {
265
416
  const found = [];
266
417
  const text = readFile(path);
267
418
  if (text !== undefined) {
419
+ const options = resolutionOptionsFor(path);
268
420
  for (const imported of ts.preProcessFile(text, true, true).importedFiles) {
269
- const target = resolveModule(imported.fileName, path, parsed.options)
421
+ const target = resolveModule(imported.fileName, path, options)
270
422
  ?.resolvedFileName;
271
423
  if (target === undefined)
272
424
  continue;
273
425
  const resolved = resolve(target);
274
- if (isTreeSource(resolved))
426
+ if (isCheckedSource(resolved))
275
427
  found.push(resolved);
276
428
  }
277
429
  }
278
430
  importsOf.set(path, found);
279
431
  return found;
280
432
  };
281
- /** A function's sources and everything their types reach, in tree order. */
433
+ /**
434
+ * A function's sources and everything their types reach, in tree order —
435
+ * one spelling per real file, the first one met.
436
+ */
282
437
  const typeGraph = (entries) => {
283
438
  const seen = new Set();
284
439
  const files = [];
285
440
  const queue = [...entries];
286
441
  while (queue.length > 0) {
287
442
  const path = queue.shift();
288
- if (seen.has(path))
443
+ const real = realOf(path);
444
+ if (seen.has(real))
289
445
  continue;
290
- seen.add(path);
446
+ seen.add(real);
291
447
  files.push(path);
292
448
  queue.push(...localImports(path));
293
449
  }
@@ -313,6 +469,16 @@ export function createFunctionTypechecker(configDir, options = {}) {
313
469
  }
314
470
  return getSourceFile(fileName, languageVersion, onError, shouldCreate);
315
471
  };
472
+ // The program resolves by the same per-file rule as the graph walk, so
473
+ // the two cannot disagree about which file an import names. Each literal
474
+ // keeps the mode the compiler's own resolver would give it (an ESM file
475
+ // under NodeNext takes the `import` conditions).
476
+ host.resolveModuleNameLiterals = (literals, containingFile, _redirectedReference, _options, containingSourceFile) => {
477
+ const options = resolutionOptionsFor(containingFile);
478
+ return literals.map((literal) => ({
479
+ resolvedModule: resolveModule(literal.text, containingFile, options, ts.getModeForUsageLocation(containingSourceFile, literal, options)),
480
+ }));
481
+ };
316
482
  return ts.createProgram({
317
483
  rootNames: [...roots],
318
484
  options: parsed.options,
@@ -320,8 +486,17 @@ export function createFunctionTypechecker(configDir, options = {}) {
320
486
  });
321
487
  };
322
488
  const checker = {
323
- check(functionKey, sources) {
324
- const paths = typeGraph(sources.map((source) => resolve(configDir, source)));
489
+ check(functionKey, sources, sharedSources = []) {
490
+ const paths = typeGraph([
491
+ ...sources.map((source) => resolve(configDir, source)),
492
+ // What the bundle shipped from declared directories, seeded by its
493
+ // real path: the graph alone misses an implementation behind a
494
+ // package's declaration export. A package file a shared file reached
495
+ // by a relative import is still a dependency, never checked.
496
+ ...sharedSources
497
+ .map((source) => resolve(realTreeRoot, source))
498
+ .filter(isCheckedSource),
499
+ ]);
325
500
  // A source the tsconfig's `include` misses is added rather than skipped:
326
501
  // this is code the push is about to ship.
327
502
  let added = false;
@@ -336,8 +511,15 @@ export function createFunctionTypechecker(configDir, options = {}) {
336
511
  const diagnostics = [];
337
512
  for (const path of paths) {
338
513
  const sourceFile = program.getSourceFile(path);
339
- if (!sourceFile)
514
+ if (!sourceFile) {
515
+ // A file gone since the build: the compiler's own "not found".
516
+ for (const diagnostic of program.getOptionsDiagnostics()) {
517
+ const text = ts.flattenDiagnosticMessageText(diagnostic.messageText, " ");
518
+ if (!diagnostic.file && text.includes(path))
519
+ diagnostics.push(diagnostic);
520
+ }
340
521
  continue;
522
+ }
341
523
  for (const diagnostic of [
342
524
  ...program.getSyntacticDiagnostics(sourceFile),
343
525
  ...program.getSemanticDiagnostics(sourceFile),
@@ -1 +1 @@
1
- {"version":3,"file":"function-typecheck.js","sourceRoot":"","sources":["../../../src/lib/function-typecheck.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,yEAAyE;AACzE,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAkCpD;;;GA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AM,EAAE,EAAE,CAAC,CAAC;YACvB,OAAO;gBACL,WAAW,EAAE,SAAS;gBACtB,OAAO,EACL,aAAa,WAAW,mCAAmC;oBAC3D,yCAAyC;oBACzC,SAAS;yBACN,KAAK,CAAC,IAAI,CAAC;yBACX,GAAG,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,IAAI,EAAE,CAAC;yBACpC,IAAI,CAAC,IAAI,CAAC;oBACb,kEAAkE;oBAClE,aAAa,mBAAmB,wBAAwB;aAC3D,CAAC;QACJ,CAAC;KACF,CAAC;IAEF,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAC/B,CAAC"}
@@ -2538,7 +2538,7 @@ export declare function resolvePromptStrictOutput(input: PromptStrictOutputInput
2538
2538
  * Pure and dependency-free, like every module under `src/config-surface/`.
2539
2539
  */
2540
2540
  /** The stable codes every agent agentRefusal this project adds carries. */
2541
- export declare const AGENT_ERROR_CODES: readonly ["AGENT_DECLARATION_INVALID", "AGENT_TOOL_FUNCTION_MISSING", "AGENT_TOOL_FUNCTION_SCHEMA_MISSING", "AGENT_OUTPUT_SCHEMA_NOT_ALLOWED", "AGENT_CONFIG_KEY_NOT_ALLOWED", "AGENT_NOT_RUNNABLE", "AGENT_TEST_CASE_NOT_SUPPORTED", "AGENT_SCHEMA_NOT_TRANSLATABLE", "AGENT_MODEL_UNKNOWN", "AGENT_MODEL_CAPABILITY_MISSING", "AGENT_MODEL_CAPABILITIES_UNAVAILABLE", "AGENT_ROUND_NOT_AGENT", "AGENT_ROUND_INPUT_INVALID", "AGENT_TOOL_UNKNOWN", "AGENT_TOOL_ARGUMENTS_INVALID", "AGENT_ROUND_TRUNCATED", "AGENT_ROUND_EMPTY", "AGENT_TEST_CASE_INVALID"];
2541
+ export declare const AGENT_ERROR_CODES: readonly ["AGENT_DECLARATION_INVALID", "AGENT_TOOL_FUNCTION_MISSING", "AGENT_TOOL_FUNCTION_SCHEMA_MISSING", "AGENT_OUTPUT_SCHEMA_NOT_ALLOWED", "AGENT_CONFIG_KEY_NOT_ALLOWED", "AGENT_NOT_RUNNABLE", "AGENT_TEST_CASE_NOT_SUPPORTED", "AGENT_SCHEMA_NOT_TRANSLATABLE", "AGENT_MODEL_UNKNOWN", "AGENT_MODEL_CAPABILITY_MISSING", "AGENT_MODEL_CAPABILITIES_UNAVAILABLE", "AGENT_ROUND_NOT_AGENT", "AGENT_ROUND_INPUT_INVALID", "AGENT_TOOL_UNKNOWN", "AGENT_TOOL_ARGUMENTS_INVALID", "AGENT_ROUND_TRUNCATED", "AGENT_ROUND_EMPTY", "AGENT_TEST_CASE_INVALID", "AGENT_PRESENTATION_REFERENCE_INVALID"];
2542
2542
  export type AgentErrorCode = (typeof AGENT_ERROR_CODES)[number];
2543
2543
  /** One agentRefusal: the code a client branches on, and the sentence a person reads. */
2544
2544
  export interface AgentRefusal {
@@ -2568,9 +2568,16 @@ export declare const AGENT_NAME: RegExp;
2568
2568
  export declare const AGENT_ANSWERED_BY: readonly ["initiator", "participants"];
2569
2569
  export declare const AGENT_TOOL_INVOKE: readonly ["request", "task"];
2570
2570
  export declare const AGENT_TOOL_HISTORY_SCOPES: readonly ["session", "turn"];
2571
+ /**
2572
+ * Where a tool without a `function` runs: `client` is answered by a member's
2573
+ * client; `presentation` is data the model hands the client with its final
2574
+ * answer, which no client executes (#4549).
2575
+ */
2576
+ export declare const AGENT_TOOL_RUNS: readonly ["client", "presentation"];
2571
2577
  export type AgentAnsweredBy = (typeof AGENT_ANSWERED_BY)[number];
2572
2578
  export type AgentToolInvoke = (typeof AGENT_TOOL_INVOKE)[number];
2573
2579
  export type AgentToolHistoryScope = (typeof AGENT_TOOL_HISTORY_SCOPES)[number];
2580
+ export type AgentToolRuns = (typeof AGENT_TOOL_RUNS)[number];
2574
2581
  /** A JSON Schema object, as the declaration holds one. */
2575
2582
  export type AgentSchema = Record<string, unknown>;
2576
2583
  /** One `[[prompt.agent.tools]]` entry, as authored. */
@@ -2580,17 +2587,26 @@ export interface AgentToolDeclaration {
2580
2587
  /** A server tool: the function whose schemas are the tool's. */
2581
2588
  function?: string;
2582
2589
  invoke?: AgentToolInvoke;
2583
- /** A client tool: answered by a member's client, schemas in the TOML. */
2584
- runs?: "client";
2590
+ /**
2591
+ * `client`: answered by a member's client, schemas in the TOML.
2592
+ * `presentation`: data the model hands the client with its final answer;
2593
+ * its call ends the turn and is never answered.
2594
+ */
2595
+ runs?: AgentToolRuns;
2596
+ /**
2597
+ * A presentation's input properties whose integers name earlier calls of
2598
+ * the turn by the number the platform gave them (`callNumber`).
2599
+ */
2600
+ references?: string[];
2585
2601
  inputSchema?: AgentSchema;
2586
2602
  outputSchema?: AgentSchema;
2587
2603
  approval?: boolean;
2588
2604
  statusText?: string;
2589
2605
  historyScope?: AgentToolHistoryScope;
2590
2606
  /**
2591
- * A call to this tool ends the turn: once every call of its response is
2592
- * final, the turn settles with no further model round. A client tool with
2593
- * it is never answered — the platform records its result.
2607
+ * A call to this server tool ends the turn: once every call of its response
2608
+ * is final, the turn settles with no further model round. A presentation
2609
+ * always does.
2594
2610
  */
2595
2611
  endsTurn?: boolean;
2596
2612
  }
@@ -2623,14 +2639,14 @@ export type NormalizedAgentTool = AgentToolDeclaration & {
2623
2639
  endsTurn: boolean;
2624
2640
  };
2625
2641
  /**
2626
- * The result the platform records for a call to a client tool with
2627
- * `endsTurn = true`: the call is final when its response is committed, and
2628
- * later rounds read this as its tool result.
2642
+ * The result the platform records for a presentation call: the call is final
2643
+ * when its response is committed, and later rounds read this as its tool
2644
+ * result.
2629
2645
  */
2630
2646
  export declare const AGENT_TERMINAL_CALL_OUTPUT: {
2631
2647
  delivered: true;
2632
2648
  };
2633
- /** The schema of `AGENT_TERMINAL_CALL_OUTPUT`: a terminal client tool's output type. */
2649
+ /** The schema of `AGENT_TERMINAL_CALL_OUTPUT`, the result a presentation call is recorded with. */
2634
2650
  export declare const AGENT_TERMINAL_CALL_OUTPUT_SCHEMA: AgentSchema;
2635
2651
  /** The declaration with every default applied — what readers consume. */
2636
2652
  export interface NormalizedAgentDeclaration {
@@ -2786,10 +2802,31 @@ export declare function agentRoundNotAgentRefusal(promptKey: string): AgentRefus
2786
2802
  * `evaluator` is the one role left.
2787
2803
  */
2788
2804
  export declare function agentTestCaseRefusal(promptKey: string, _role?: "evaluator"): AgentRefusal;
2805
+ /** An earlier call of the turn, as a presentation's references are checked against it. */
2806
+ export interface AgentReferencedCall {
2807
+ /** The number the platform gave the call in its turn (1 for the turn's first). */
2808
+ callNumber: number;
2809
+ toolName: string;
2810
+ /** The call's row state; only `output-available` may be referenced. */
2811
+ state: string;
2812
+ }
2813
+ /**
2814
+ * The refusal of a presentation call whose `references` name a number that
2815
+ * is not an earlier call of the turn with a result — a refused call, a number
2816
+ * the turn never gave, or a call of the same response — or `null`. `earlier`
2817
+ * is the turn's calls committed before this call's response. The message
2818
+ * lists the offending values by property and the numbers that may be
2819
+ * referenced, with their tools, so the model can correct itself next round.
2820
+ */
2821
+ export declare function presentationReferenceRefusal(tool: {
2822
+ name: string;
2823
+ references?: readonly string[];
2824
+ }, args: unknown, earlier: readonly AgentReferencedCall[]): AgentRefusal | null;
2789
2825
  /**
2790
2826
  * The declaration with every default applied: `answeredBy = "initiator"`, the
2791
2827
  * platform maximums for the limits, and per tool `invoke = "request"` (server
2792
- * tools), `approval = false`, `historyScope = "session"` and `endsTurn = false`.
2828
+ * tools), `approval = false`, `historyScope = "session"` and `endsTurn = false`
2829
+ * — `endsTurn = true` for a presentation, whose call always ends the turn.
2793
2830
  *
2794
2831
  * The ONLY accessor for defaults — the stored value never carries them
2795
2832
  * (DSO-3798-001). Takes a value `resolveAgentDeclaration` accepted (or `null`)