primitive-admin 1.2.0-alpha.0 → 1.2.0-alpha.2

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 (137) hide show
  1. package/README.md +6 -4
  2. package/dist/bin/primitive.js +22 -24
  3. package/dist/bin/primitive.js.map +1 -1
  4. package/dist/src/commands/agent-sessions.d.ts +20 -0
  5. package/dist/src/commands/agent-sessions.js +275 -0
  6. package/dist/src/commands/agent-sessions.js.map +1 -0
  7. package/dist/src/commands/apps-children.d.ts +54 -0
  8. package/dist/src/commands/apps-children.js +578 -0
  9. package/dist/src/commands/apps-children.js.map +1 -0
  10. package/dist/src/commands/apps.js +88 -9
  11. package/dist/src/commands/apps.js.map +1 -1
  12. package/dist/src/commands/auth-sessions.d.ts +3 -3
  13. package/dist/src/commands/auth-sessions.js +117 -23
  14. package/dist/src/commands/auth-sessions.js.map +1 -1
  15. package/dist/src/commands/auth.js +248 -15
  16. package/dist/src/commands/auth.js.map +1 -1
  17. package/dist/src/commands/connections.js +1 -5
  18. package/dist/src/commands/connections.js.map +1 -1
  19. package/dist/src/commands/databases.js +7 -109
  20. package/dist/src/commands/databases.js.map +1 -1
  21. package/dist/src/commands/documents.d.ts +29 -0
  22. package/dist/src/commands/documents.js +676 -191
  23. package/dist/src/commands/documents.js.map +1 -1
  24. package/dist/src/commands/env.d.ts +9 -1
  25. package/dist/src/commands/env.js +158 -45
  26. package/dist/src/commands/env.js.map +1 -1
  27. package/dist/src/commands/functions.js +7 -1
  28. package/dist/src/commands/functions.js.map +1 -1
  29. package/dist/src/commands/init.js +2 -1
  30. package/dist/src/commands/init.js.map +1 -1
  31. package/dist/src/commands/integrations.js +14 -2
  32. package/dist/src/commands/integrations.js.map +1 -1
  33. package/dist/src/commands/prompts.js +4 -0
  34. package/dist/src/commands/prompts.js.map +1 -1
  35. package/dist/src/commands/scripts.js +1 -1
  36. package/dist/src/commands/scripts.js.map +1 -1
  37. package/dist/src/commands/sessions.js +3 -8
  38. package/dist/src/commands/sessions.js.map +1 -1
  39. package/dist/src/commands/sync-app-settings.d.ts +25 -7
  40. package/dist/src/commands/sync-app-settings.js +81 -20
  41. package/dist/src/commands/sync-app-settings.js.map +1 -1
  42. package/dist/src/commands/sync.d.ts +183 -12
  43. package/dist/src/commands/sync.js +974 -452
  44. package/dist/src/commands/sync.js.map +1 -1
  45. package/dist/src/commands/tokens.js +1 -6
  46. package/dist/src/commands/tokens.js.map +1 -1
  47. package/dist/src/commands/users.js +77 -2
  48. package/dist/src/commands/users.js.map +1 -1
  49. package/dist/src/lib/api-client.d.ts +161 -35
  50. package/dist/src/lib/api-client.js +210 -86
  51. package/dist/src/lib/api-client.js.map +1 -1
  52. package/dist/src/lib/app-settings-descriptor.d.ts +9 -1
  53. package/dist/src/lib/app-settings-descriptor.js +22 -10
  54. package/dist/src/lib/app-settings-descriptor.js.map +1 -1
  55. package/dist/src/lib/auth-flow.d.ts +41 -1
  56. package/dist/src/lib/auth-flow.js +45 -16
  57. package/dist/src/lib/auth-flow.js.map +1 -1
  58. package/dist/src/lib/child-apps-local.d.ts +184 -0
  59. package/dist/src/lib/child-apps-local.js +282 -0
  60. package/dist/src/lib/child-apps-local.js.map +1 -0
  61. package/dist/src/lib/ci-session-request.d.ts +22 -0
  62. package/dist/src/lib/ci-session-request.js +51 -0
  63. package/dist/src/lib/ci-session-request.js.map +1 -0
  64. package/dist/src/lib/codegen-shared/generatedFiles.d.ts +4 -1
  65. package/dist/src/lib/codegen-shared/generatedFiles.js +19 -13
  66. package/dist/src/lib/codegen-shared/generatedFiles.js.map +1 -1
  67. package/dist/src/lib/config-object-descriptor.js +5 -5
  68. package/dist/src/lib/config-object-descriptor.js.map +1 -1
  69. package/dist/src/lib/config-payload.js +2 -3
  70. package/dist/src/lib/config-payload.js.map +1 -1
  71. package/dist/src/lib/config-surface.d.ts +2 -1
  72. package/dist/src/lib/config-surface.js +7 -28
  73. package/dist/src/lib/config-surface.js.map +1 -1
  74. package/dist/src/lib/credentials-store.d.ts +17 -2
  75. package/dist/src/lib/credentials-store.js +72 -6
  76. package/dist/src/lib/credentials-store.js.map +1 -1
  77. package/dist/src/lib/document-export-lookups.d.ts +31 -0
  78. package/dist/src/lib/document-export-lookups.js +53 -0
  79. package/dist/src/lib/document-export-lookups.js.map +1 -0
  80. package/dist/src/lib/document-export-permissions.d.ts +7 -5
  81. package/dist/src/lib/document-export-permissions.js +7 -5
  82. package/dist/src/lib/document-export-permissions.js.map +1 -1
  83. package/dist/src/lib/env-resolver-core.d.ts +69 -1
  84. package/dist/src/lib/env-resolver-core.js +137 -20
  85. package/dist/src/lib/env-resolver-core.js.map +1 -1
  86. package/dist/src/lib/env-resolver.d.ts +14 -2
  87. package/dist/src/lib/env-resolver.js +32 -10
  88. package/dist/src/lib/env-resolver.js.map +1 -1
  89. package/dist/src/lib/function-run.d.ts +4 -1
  90. package/dist/src/lib/function-run.js +24 -4
  91. package/dist/src/lib/function-run.js.map +1 -1
  92. package/dist/src/lib/function-sync.d.ts +5 -2
  93. package/dist/src/lib/function-sync.js +7 -4
  94. package/dist/src/lib/function-sync.js.map +1 -1
  95. package/dist/src/lib/generated-config-surfaces.d.ts +49 -50
  96. package/dist/src/lib/generated-config-surfaces.js +283 -166
  97. package/dist/src/lib/generated-config-surfaces.js.map +1 -1
  98. package/dist/src/lib/generated-sdk-types.d.ts +1 -1
  99. package/dist/src/lib/generated-sdk-types.js +1 -1
  100. package/dist/src/lib/generated-sdk-types.js.map +1 -1
  101. package/dist/src/lib/init-adopt.js +12 -3
  102. package/dist/src/lib/init-adopt.js.map +1 -1
  103. package/dist/src/lib/local-state.d.ts +17 -1
  104. package/dist/src/lib/local-state.js +94 -15
  105. package/dist/src/lib/local-state.js.map +1 -1
  106. package/dist/src/lib/local-test-cases.d.ts +5 -2
  107. package/dist/src/lib/local-test-cases.js +7 -4
  108. package/dist/src/lib/local-test-cases.js.map +1 -1
  109. package/dist/src/lib/log-inspection.d.ts +25 -0
  110. package/dist/src/lib/log-inspection.js +24 -0
  111. package/dist/src/lib/log-inspection.js.map +1 -1
  112. package/dist/src/lib/logout-admin-session.d.ts +2 -1
  113. package/dist/src/lib/logout-admin-session.js +7 -1
  114. package/dist/src/lib/logout-admin-session.js.map +1 -1
  115. package/dist/src/lib/pull-write.d.ts +31 -0
  116. package/dist/src/lib/pull-write.js +49 -0
  117. package/dist/src/lib/pull-write.js.map +1 -0
  118. package/dist/src/lib/root-import-decision.d.ts +59 -0
  119. package/dist/src/lib/root-import-decision.js +95 -0
  120. package/dist/src/lib/root-import-decision.js.map +1 -0
  121. package/dist/src/lib/scope-request.d.ts +69 -0
  122. package/dist/src/lib/scope-request.js +188 -0
  123. package/dist/src/lib/scope-request.js.map +1 -0
  124. package/dist/src/lib/session-id.d.ts +9 -0
  125. package/dist/src/lib/session-id.js +28 -0
  126. package/dist/src/lib/session-id.js.map +1 -0
  127. package/dist/src/lib/snapshots.d.ts +17 -1
  128. package/dist/src/lib/snapshots.js +50 -2
  129. package/dist/src/lib/snapshots.js.map +1 -1
  130. package/dist/src/lib/sync-paths.d.ts +35 -0
  131. package/dist/src/lib/sync-paths.js +57 -5
  132. package/dist/src/lib/sync-paths.js.map +1 -1
  133. package/dist/src/lib/transient-retry.d.ts +34 -0
  134. package/dist/src/lib/transient-retry.js +57 -0
  135. package/dist/src/lib/transient-retry.js.map +1 -0
  136. package/dist/src/types/index.d.ts +21 -4
  137. package/package.json +4 -3
@@ -24,13 +24,15 @@
24
24
  * diffs and shows like any other setting. The secrets' values live only in the
25
25
  * app secret store (`primitive secrets set`).
26
26
  */
27
- import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
27
+ import { existsSync, readFileSync, mkdirSync } from "fs";
28
28
  import { join } from "path";
29
29
  import { createHash } from "crypto";
30
30
  import { parseConfigToml, stringifyConfigToml } from "../lib/config-toml.js";
31
31
  import { APP_SETTINGS_DESCRIPTOR, APP_SETTINGS_SECTIONS, buildAppSettingsPayload, projectAppSettingsForComparison, serializeAppSettingsToToml, } from "../lib/app-settings-descriptor.js";
32
32
  import { canonicalJsonStringify } from "../lib/canonical-json.js";
33
- import { syncStateReadPath } from "../lib/sync-paths.js";
33
+ import { writePulledFile } from "../lib/pull-write.js";
34
+ import { resolveSyncStateReadPath } from "../lib/sync-paths.js";
35
+ import { requireCurrentEnvironment } from "../lib/env-resolver.js";
34
36
  import { success, error, info, json, result as printResult, divider, } from "../lib/output.js";
35
37
  /** The app-settings file name inside a sync directory. */
36
38
  export const APP_TOML_FILENAME = "app.toml";
@@ -53,16 +55,6 @@ function ensureDir(dirPath) {
53
55
  if (!existsSync(dirPath))
54
56
  mkdirSync(dirPath, { recursive: true });
55
57
  }
56
- /**
57
- * Write `app.toml` from server settings and return its content hash. Shared by
58
- * `config pull` (whole-tree and `--only app`), so the file and the hash have one
59
- * producer.
60
- */
61
- export function writeAppSettingsToml(configDir, settings) {
62
- const path = appTomlPath(configDir);
63
- writeFileSync(path, serializeAppSettings(settings));
64
- return contentHashOfFile(path);
65
- }
66
58
  /**
67
59
  * Validate a parsed `app.toml` for push and return the fatal errors (a type
68
60
  * mismatch, an unrecognized or retired key, a missing required key). An empty
@@ -81,8 +73,8 @@ export function collectAppSettingsPushErrors(tomlData, options = {}) {
81
73
  // `sync` maintains, touching only `entities.app` and preserving every other
82
74
  // entity. Kept as small local load/save helpers (rather than importing
83
75
  // `sync.ts`) to avoid an import cycle — `sync.ts` imports the serializer above.
84
- function loadSyncState(configDir) {
85
- const p = syncStateReadPath(configDir);
76
+ function loadSyncState() {
77
+ const p = resolveSyncStateReadPath();
86
78
  if (!existsSync(p))
87
79
  return null;
88
80
  try {
@@ -153,12 +145,76 @@ export function renderAppSettings(settings) {
153
145
  * nothing, so there is no longer a class of value the pull has to warn about
154
146
  * being absent (#2307's warning went with the withholding layer). `config pull`
155
147
  * calls this for `app.toml`, whether the pull is whole-tree or `--only app`.
148
+ *
149
+ * A file that already states the same settings is left as it is (#4160): the
150
+ * comparison is the payload `config diff` and `config push` build from the
151
+ * file, so its comments, key order and explicit defaults survive the pull.
152
+ * `written` says which happened.
156
153
  */
157
154
  export function writePulledAppSettings(configDir, settings, options = {}) {
158
155
  ensureDir(configDir);
159
- const contentHash = writeAppSettingsToml(configDir, settings);
160
- options.log?.(`Wrote ${appTomlPath(configDir)}`);
161
- return { path: appTomlPath(configDir), contentHash };
156
+ const path = appTomlPath(configDir);
157
+ const statedName = options.keepStatedName ? readStatedAppName(path) : undefined;
158
+ let content;
159
+ if (!options.keepStatedName) {
160
+ content = serializeAppSettings(settings);
161
+ }
162
+ else {
163
+ const data = serializeAppSettingsToToml(settings);
164
+ if (data.app) {
165
+ if (statedName !== undefined)
166
+ data.app.name = statedName;
167
+ else
168
+ delete data.app.name;
169
+ }
170
+ content = stringifyConfigToml(data);
171
+ }
172
+ const written = writePulledFile(path, content, options.tally, sameAppSettingsAs(content, { nameOptional: options.keepStatedName }));
173
+ if (written)
174
+ options.log?.(`Wrote ${path}`);
175
+ return {
176
+ path,
177
+ contentHash: contentHashOfFile(path),
178
+ written,
179
+ ...(options.keepStatedName && statedName === undefined
180
+ ? {
181
+ note: `${APP_TOML_FILENAME} carries no [app].name: a pull on a machine-local environment never ` +
182
+ `writes the child's name; add the parent's name before merging back.`,
183
+ }
184
+ : {}),
185
+ };
186
+ }
187
+ /**
188
+ * Whether an `app.toml`'s text states the same settings as `serverContent`
189
+ * (#4160) — the payload push builds from each, hashed the way `config diff`
190
+ * compares it. A file push would refuse never matches, so pull rewrites it.
191
+ */
192
+ function sameAppSettingsAs(serverContent, options) {
193
+ const payloadOf = (content) => buildAppSettingsPayload(parseConfigToml(content), {
194
+ nameOptional: options.nameOptional,
195
+ });
196
+ return (localContent) => {
197
+ const local = payloadOf(localContent);
198
+ const server = payloadOf(serverContent);
199
+ if (local.errors.length > 0 || server.errors.length > 0)
200
+ return false;
201
+ return (hashAppSettingsForDiff(local.settings) === hashAppSettingsForDiff(server.settings));
202
+ };
203
+ }
204
+ /**
205
+ * The `[app].name` an `app.toml` states, as TOML stated it, or undefined when
206
+ * the file is absent, unparseable or names nothing.
207
+ */
208
+ function readStatedAppName(path) {
209
+ if (!existsSync(path))
210
+ return undefined;
211
+ try {
212
+ const parsed = parseConfigToml(readFileSync(path, "utf-8"));
213
+ return parsed?.app?.name;
214
+ }
215
+ catch {
216
+ return undefined;
217
+ }
162
218
  }
163
219
  /**
164
220
  * Whether `[app].name` is out of BOTH the comparison and the payload right now
@@ -180,6 +236,8 @@ export function writePulledAppSettings(configDir, settings, options = {}) {
180
236
  * `name` re-enters, so every post-cross-app rename would report `both-changed`.
181
237
  */
182
238
  export function appSettingsNameExcluded(input) {
239
+ if (input.localEnvironment)
240
+ return true;
183
241
  if (input.isCrossAppPush)
184
242
  return true;
185
243
  if (input.recordedExcludedName === undefined)
@@ -210,8 +268,9 @@ function sameStatedName(fileName, recorded) {
210
268
  return false;
211
269
  }
212
270
  /** `appSettingsNameExcluded` for a caller holding the loaded state (diff). */
213
- export function appSettingsNameExcludedForState(state, appId, tomlData) {
271
+ export function appSettingsNameExcludedForState(state, appId, tomlData, localEnvironment = false) {
214
272
  return appSettingsNameExcluded({
273
+ localEnvironment,
215
274
  isCrossAppPush: !!(state && state.appId !== appId),
216
275
  recordedExcludedName: state?.entities?.app?.excludedName,
217
276
  fileName: tomlData?.app?.name,
@@ -285,12 +344,14 @@ export async function diffAppSettings(client, appId, configDir, options = {}) {
285
344
  // out too — otherwise a malformed local `name` would abort diff on a file
286
345
  // push would accept and ignore, and the target's own name would report as a
287
346
  // difference push has no intention of applying.
288
- const state = loadSyncState(configDir);
289
- const excludeName = appSettingsNameExcludedForState(state, appId, tomlData);
347
+ const state = loadSyncState();
348
+ const localEnvironment = requireCurrentEnvironment().local;
349
+ const excludeName = appSettingsNameExcludedForState(state, appId, tomlData, localEnvironment);
290
350
  // ONE validator with push (#2880 criterion 1): whole-truth payload, so a
291
351
  // missing required key is an error here exactly as it is there.
292
352
  const { settings: local, errors } = buildAppSettingsPayload(tomlData, {
293
353
  excludeName,
354
+ nameOptional: localEnvironment,
294
355
  });
295
356
  // A file with validation errors is unpushable, so diff must not present its
296
357
  // surviving values as clean (or as a partial diff) — that would advertise
@@ -1 +1 @@
1
- {"version":3,"file":"sync-app-settings.js","sourceRoot":"","sources":["../../../src/commands/sync-app-settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,+BAA+B,EAC/B,0BAA0B,GAE3B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EACL,OAAO,EACP,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,MAAM,IAAI,WAAW,EACrB,OAAO,GACR,MAAM,kBAAkB,CAAC;AAE1B,0DAA0D;AAC1D,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC;AAE5C,2DAA2D;AAC3D,MAAM,UAAU,WAAW,CAAC,SAAiB;IAC3C,OAAO,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;AAC5C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAC,QAAa;IAChD,OAAO,mBAAmB,CAAC,0BAA0B,CAAC,QAAQ,CAAC,CAAC,CAAC;AACnE,CAAC;AAED,mFAAmF;AACnF,SAAS,iBAAiB,CAAC,QAAgB;IACzC,OAAO,UAAU,CAAC,QAAQ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GAAG,CAAC,OAAO,CAAC,CAAC;QACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
@@ -2,6 +2,7 @@ import { Command } from "commander";
2
2
  import { ApiClient } from "../lib/api-client.js";
3
3
  import { type OperationFormHints } from "../lib/toml-database-config.js";
4
4
  import { type FieldForm } from "../lib/toml-native-form.js";
5
+ import { type PullWriteTally } from "../lib/pull-write.js";
5
6
  import { type PushMode } from "../lib/config-payload.js";
6
7
  import { type ConfigObjectSurface, type ConfigTable } from "../lib/generated-config-surfaces.js";
7
8
  import { type PromptKind } from "../lib/generated-config-surfaces.js";
@@ -177,6 +178,17 @@ export declare function hashWorkflowTomlForDiff(parsed: any, resolvedKey?: strin
177
178
  export declare function hashRemoteWorkflowForDiff(workflow: any, draft: any, configs: any[], logger?: (message: string) => void, options?: {
178
179
  compareActivation?: boolean;
179
180
  }): string;
181
+ /**
182
+ * Whether a workflow file already describes the workflow `remoteToml`
183
+ * serializes (#4160), by `config diff`'s comparison: the normalized hash, with
184
+ * activation compared only when the file names a configuration.
185
+ *
186
+ * Three shapes never match, because pull has work to do on them: a file with
187
+ * `[[include]]` fragments (`reconcileWorkflowIncludes` owns those), one still
188
+ * carrying the retired inline `[[configs]]` list, and any other file push
189
+ * refuses (`pullMustRewrite`).
190
+ */
191
+ export declare function sameWorkflowAs(workflowKey: string, remoteToml: string): (localContent: string) => boolean;
180
192
  export interface ParsedAuthSettings {
181
193
  settings: Record<string, any>;
182
194
  warnings: string[];
@@ -670,14 +682,34 @@ export declare function serializeCronTrigger(trigger: any, logger?: (message: st
670
682
  export declare function buildCronTriggerPushPayload(key: string, tomlData: any, { mode }?: {
671
683
  mode?: PushMode;
672
684
  }): Record<string, any>;
673
- export declare function serializeBlobBucket(bucket: any, logger?: (message: string) => void): string;
685
+ export declare function serializeBlobBucket(bucket: any, ruleSetIdToName?: Map<string, string>, logger?: (message: string) => void): string;
686
+ /**
687
+ * The entity a `blob-buckets/<key>.toml` describes (#4116) — the parse
688
+ * `config push` builds its bodies from and `config diff` compares.
689
+ *
690
+ * Read in CREATE mode, so the immutable `ttlTier` stays nameable. The rule set
691
+ * is left as `_ruleSetName` for `resolveRuleSetReference`; the deprecated
692
+ * `ruleSetId` spelling is forwarded as the id it already is. A file carrying
693
+ * both is refused by the preflight (`blobBucketFileErrors`) before this runs.
694
+ *
695
+ * An omitted `name` stays omitted: the update leaves the server's name alone,
696
+ * and only the create body falls back to the key.
697
+ */
698
+ export declare function parseBlobBucketToml(doc: any): any;
699
+ /**
700
+ * The advisory `config push` prints for a bucket file still naming its rule set
701
+ * by id (#4116). The key is deprecated, not retired: the file pushes.
702
+ */
703
+ export declare function blobBucketDeprecatedKeyWarning(filePath: string, tomlData: any): string | null;
704
+ /** A bucket file's own refusals, decided from the file alone (#4116). */
705
+ export declare function blobBucketFileErrors(filePath: string, tomlData: any): string[];
674
706
  /**
675
707
  * Build the PATCH payload for a blob-bucket update from local TOML.
676
708
  *
677
709
  * EXACT extraction of the inline builder shared by the existing-update and
678
710
  * 409-adopt branches — do NOT "clean up" the truthiness checks on the access
679
- * model. The server treats `preset` and `accessPolicy` as mutually exclusive,
680
- * only clears `ruleSetId` when a preset/accessPolicy is also present, and
711
+ * model. The server treats `preset` and `ruleSetId` as mutually exclusive,
712
+ * only clears `ruleSetId` when a preset is also present, and
681
713
  * refuses to leave a bucket with no access model or a blank name — so those
682
714
  * fields are not clearable. `bucketKey` and `ttlTier` are immutable and never
683
715
  * sent. Both call sites must go through this helper so their field sets never
@@ -726,7 +758,8 @@ export declare function promptConfigPayload(tomlConfig: any, options?: {
726
758
  create?: boolean;
727
759
  }): Record<string, any>;
728
760
  /**
729
- * Build the POST body for a blob-bucket create from local TOML.
761
+ * Build the POST body for a blob-bucket create from the parsed entity
762
+ * (`parseBlobBucketToml`, its rule set resolved).
730
763
  *
731
764
  * `ttlTier` is here and absent from the update body because the definition says
732
765
  * so (`writableOn: ["create"]`) — the retention tier is fixed at creation.
@@ -926,6 +959,11 @@ export declare function runConfigPushPreflight(input: {
926
959
  syncState: SyncState | null;
927
960
  force: boolean;
928
961
  isCrossAppPush: boolean;
962
+ /**
963
+ * The environment is machine-local (#4117): `[app].name` is the shared
964
+ * tree's, never this app's, so it is out of the validated body.
965
+ */
966
+ localEnvironment?: boolean;
929
967
  client: Pick<ApiClient, "listIntegrations" | "listFunctions">;
930
968
  }): Promise<{
931
969
  parsedVars: Record<string, unknown> | null;
@@ -1013,13 +1051,23 @@ export declare function promptKindImmutableOutcome(storedKind: PromptKind | unde
1013
1051
  action: "immutable";
1014
1052
  }> | null;
1015
1053
  /**
1016
- * The one deprecation notice a prompt file using the FLAT chat spelling earns
1017
- * — #3626 §4, beside the `celContextAccess` notice's precedent.
1054
+ * The file-decidable refusals `config push` gives one config file — the
1055
+ * per-file body of `collectConfigFileValidationErrors`, shared with `config
1056
+ * pull` (#4160), which never keeps a local file push would refuse.
1018
1057
  *
1019
- * Advisory: the push continues and the keys are applied. `null` when the file
1020
- * is already written in the grouped spelling, so a migrated tree is silent.
1058
+ * `tables` are the tables whose unrecognized keys are checked here (none for a
1059
+ * workflow, whose own validator owns that message); declared types run over
1060
+ * every table of the surface.
1061
+ */
1062
+ export declare function configFileValidationMessages(filePath: string, tomlData: any, surface: ConfigObjectSurface, tables: readonly ConfigTable[]): string[];
1063
+ /**
1064
+ * Whether `config pull` must rewrite a local file whatever it says (#4160):
1065
+ * `config push` would refuse it, or it spells something in a deprecated form
1066
+ * pull exists to migrate (a bucket naming its rule set by id). Keeping such a
1067
+ * file because its VALUES match would leave the tree unpushable, or the
1068
+ * deprecation unresolved, after a pull that reported success.
1021
1069
  */
1022
- export declare function promptFlatChatKeyWarning(filePath: string, tomlData: any): string | null;
1070
+ export declare function pullMustRewrite(label: string, tomlData: any): boolean;
1023
1071
  export declare function collectConfigFileValidationErrors(configDir: string): ConfigFileValidationError[];
1024
1072
  /**
1025
1073
  * Every `functions/<key>.toml` whose file-decidable errors `config push` would
@@ -1524,6 +1572,21 @@ export declare function projectConfigPair(spec: ConfigDiffSpec, localParsed: any
1524
1572
  local: Record<string, any>;
1525
1573
  remote: Record<string, any>;
1526
1574
  };
1575
+ /**
1576
+ * One `config diff` row's verdict once both sides exist (#4116, DSO-4116-003).
1577
+ *
1578
+ * A type whose files name a rule set cannot be compared without the app's
1579
+ * rule-set listing: an unresolvable reference would read as a difference that
1580
+ * is not there. So when the listing failed the row says so rather than
1581
+ * comparing; otherwise `compare` decides.
1582
+ */
1583
+ export declare function configDiffRowVerdict(parsed: any, remote: any, compare: (parsed: any, remote: any) => {
1584
+ status: string;
1585
+ hint?: string;
1586
+ }, contentComparable: boolean): {
1587
+ status: string;
1588
+ hint?: string;
1589
+ };
1527
1590
  /**
1528
1591
  * One `config diff` row's content verdict for a registered type (#2880).
1529
1592
  *
@@ -1986,6 +2049,33 @@ export declare function countAppliedChanges(input: {
1986
2049
  * than taking the command down.
1987
2050
  */
1988
2051
  export declare function configSemanticHash(label: string, filePath: string, maps: ConfigDiffMaps): string | undefined;
2052
+ /**
2053
+ * Whether a local config file says what the file `config pull` would write
2054
+ * says (#4160) — the definition-projected field set `config diff` compares, so
2055
+ * a file diff calls Synced keeps its comments, key order and explicit defaults
2056
+ * through a pull.
2057
+ *
2058
+ * Both sides go through the same projection with the same context, so
2059
+ * `extra` is the context a reference is read through (a test case's lookups),
2060
+ * never server-only rows. As in diff, the file is paired by the identity it
2061
+ * states (or `filePath`'s name), and the fields it leaves unmanaged take the
2062
+ * server's values — so a kept file's baseline is the server's projection
2063
+ * (`pulledSemanticHash`), never the file's own.
2064
+ */
2065
+ export declare function sameConfigAs(label: string, serverContent: string, filePath: string, maps: ConfigDiffMaps, extra?: any): (localContent: string) => boolean;
2066
+ /**
2067
+ * The semantic baseline `config pull` stamps for a config file (#4160): the
2068
+ * projection of what the server serializes, whether the file was written or
2069
+ * kept. A kept file can leave unmanaged fields or its identity to the server,
2070
+ * so hashing it would record a baseline the server never had.
2071
+ */
2072
+ export declare function pulledSemanticHash(label: string, serverContent: string, maps: ConfigDiffMaps): string | undefined;
2073
+ /**
2074
+ * Whether a local TOML file parses to the same document as `serverContent`
2075
+ * (#4160): the comparison for `vars.toml`, which has no field definition
2076
+ * behind it, so only comments, key order and spelling are free.
2077
+ */
2078
+ export declare function sameTomlAs(serverContent: string): (localContent: string) => boolean;
1989
2079
  /**
1990
2080
  * The sync state `config push` writes into (#2731 B6, closing #2374).
1991
2081
  *
@@ -2101,11 +2191,40 @@ export interface TestCaseLookupMaps {
2101
2191
  configIdToName: Map<string, string>;
2102
2192
  promptIdToKey: Map<string, string>;
2103
2193
  }
2194
+ /**
2195
+ * A test-case reference the id→name lookups could not name (#3998): the TOML
2196
+ * key it is authored under, the wire field it is stored in, and the raw id.
2197
+ */
2198
+ export interface TestCaseUnresolvedReference {
2199
+ tomlKey: "configName" | "evaluatorPromptKey" | "evaluatorConfigName";
2200
+ field: "configId" | "evaluatorPromptId" | "evaluatorConfigId";
2201
+ id: string;
2202
+ }
2203
+ /**
2204
+ * The sidecar `config pull` writes for one server record. It never emits an id
2205
+ * key (#3998): a reference the lookups cannot name is written as an empty name
2206
+ * and reported through `onUnresolved`, and `pullTestCasesForBlock` declines to
2207
+ * write such a case rather than unpin it on disk.
2208
+ */
2104
2209
  export declare function serializeTestCase(testCase: any, lookupMaps?: TestCaseLookupMaps, options?: {
2105
2210
  /** The sidecar path the warning names, e.g. `prompts/greet.tests/a.toml`. */
2106
2211
  file?: string;
2107
2212
  logger?: (message: string) => void;
2213
+ /** Called with the references the lookups could not name, when any. */
2214
+ onUnresolved?: (references: TestCaseUnresolvedReference[]) => void;
2108
2215
  }): string;
2216
+ /**
2217
+ * The rendering of a server record that the comparison parses (#3998) — never
2218
+ * written to disk.
2219
+ *
2220
+ * It differs from the file pull writes in one place: a reference the lookups
2221
+ * cannot name carries its raw id in the NAME slot. A live case pinned to a
2222
+ * deleted or unlistable configuration must stay a difference against an
2223
+ * unpinned file; projecting it as "no reference" would read the pair as Synced,
2224
+ * and the next content edit would push `configId: null` and clear the pin in
2225
+ * silence.
2226
+ */
2227
+ export declare function serializeTestCaseForComparison(testCase: any, lookupMaps?: TestCaseLookupMaps): string;
2109
2228
  export declare function parseTestCaseToml(tomlData: any): any;
2110
2229
  /**
2111
2230
  * Pull server-side `Script` rows into `transforms/*.rhai` and record
@@ -2143,7 +2262,9 @@ export declare function pullScripts(client: ApiClient, appId: string, configDir:
2143
2262
  * `config pull --only` (issue #2645): which transform names this pull may
2144
2263
  * write. Defaults to every one the server lists.
2145
2264
  */
2146
- selects?: (name: string) => boolean): Promise<{
2265
+ selects?: (name: string) => boolean,
2266
+ /** Counts each transform as written or left unchanged (#4160). */
2267
+ writes?: PullWriteTally): Promise<{
2147
2268
  scriptEntities: Record<string, {
2148
2269
  id: string;
2149
2270
  modifiedAt: string;
@@ -2232,7 +2353,9 @@ export declare function pushedFunctionBaseline(input: {
2232
2353
  * normalizes outside the tree, and the refusals are reported rather than
2233
2354
  * swallowed.
2234
2355
  */
2235
- export declare function pullFunctions(client: ApiClient, appId: string, configDir: string, logger?: (msg: string) => void, selects?: (key: string) => boolean): Promise<{
2356
+ export declare function pullFunctions(client: ApiClient, appId: string, configDir: string, logger?: (msg: string) => void, selects?: (key: string) => boolean,
2357
+ /** Counts each function file as written or left unchanged (#4160). */
2358
+ writes?: PullWriteTally): Promise<{
2236
2359
  functionEntities: Record<string, {
2237
2360
  id: string;
2238
2361
  modifiedAt: string;
@@ -2255,12 +2378,55 @@ export declare function pullFunctions(client: ApiClient, appId: string, configDi
2255
2378
  */
2256
2379
  items: any[];
2257
2380
  }>;
2381
+ /**
2382
+ * A listed test case `config pull` did NOT write, because a reference could not
2383
+ * be named (#3998). Its existing sidecar files (`preservedSlugs`, those still
2384
+ * on disk) and its prior sync-state records were kept as they were.
2385
+ */
2386
+ export interface TestCaseUnwritten {
2387
+ blockType: TestBlockType;
2388
+ blockKey: string;
2389
+ /** The file name the case would be written to now. */
2390
+ slug: string;
2391
+ name: string;
2392
+ testCaseId: string;
2393
+ references: TestCaseUnresolvedReference[];
2394
+ preservedSlugs: string[];
2395
+ }
2396
+ /**
2397
+ * The id→name lookups `config pull` writes test-case references through
2398
+ * (#3998).
2399
+ *
2400
+ * The prompt half is built from EVERY prompt's detail — the pull fetches them
2401
+ * all before `--only` filters the list — so a judge prompt outside the
2402
+ * selection still names. Configurations come from the pulled blocks (a case
2403
+ * pins one of its own block's) and from every prompt (a judge's config is the
2404
+ * judge prompt's). An entry without both an id and a name is skipped.
2405
+ */
2406
+ export declare function testCaseLookupMapsForPull(input: {
2407
+ prompts: ReadonlyArray<{
2408
+ promptId?: string;
2409
+ promptKey?: string;
2410
+ configs?: ReadonlyArray<{
2411
+ configId?: string;
2412
+ configName?: string;
2413
+ }> | null;
2414
+ }>;
2415
+ configs: ReadonlyArray<{
2416
+ configId?: string;
2417
+ configName?: string;
2418
+ }>;
2419
+ }): TestCaseLookupMaps;
2258
2420
  /** The outcome of one block's test-case pull (#2769). */
2259
2421
  export type TestCasePullOutcome =
2260
- /** The listing succeeded; `count` cases were written and stale files removed. */
2422
+ /**
2423
+ * The listing succeeded; `count` cases were written and stale files removed.
2424
+ * `unwritten` are the listed cases skipped for an unresolvable reference.
2425
+ */
2261
2426
  {
2262
2427
  ok: true;
2263
2428
  count: number;
2429
+ unwritten: TestCaseUnwritten[];
2264
2430
  }
2265
2431
  /** The listing failed: nothing was written, and the caller preserves state. */
2266
2432
  | {
@@ -2311,6 +2477,8 @@ export declare function pullTestCasesForBlock(params: {
2311
2477
  priorTestCaseEntities?: Record<string, any>;
2312
2478
  lookupMaps?: TestCaseLookupMaps;
2313
2479
  logger?: (message: string) => void;
2480
+ /** Counts each case file as written or left unchanged (#4160). */
2481
+ writes?: PullWriteTally;
2314
2482
  }): Promise<TestCasePullOutcome>;
2315
2483
  /**
2316
2484
  * One pull leg: every block of a type the pull selected (#2769).
@@ -2333,9 +2501,12 @@ export declare function pullTestCasesForBlocks(params: {
2333
2501
  priorTestCaseEntities?: Record<string, any>;
2334
2502
  lookupMaps?: TestCaseLookupMaps;
2335
2503
  logger?: (message: string) => void;
2504
+ /** Counts each case file as written or left unchanged (#4160). */
2505
+ writes?: PullWriteTally;
2336
2506
  }): Promise<{
2337
2507
  count: number;
2338
2508
  skippedBlocks: string[];
2509
+ unwritten: TestCaseUnwritten[];
2339
2510
  }>;
2340
2511
  interface PushResolutionMaps {
2341
2512
  promptKeyToId: Map<string, string>;