primitive-admin 1.0.53 → 1.0.55

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 (173) hide show
  1. package/README.md +38 -10
  2. package/dist/bin/primitive.js +8 -0
  3. package/dist/bin/primitive.js.map +1 -1
  4. package/dist/src/commands/apps.js +54 -2
  5. package/dist/src/commands/apps.js.map +1 -1
  6. package/dist/src/commands/auth.js +16 -6
  7. package/dist/src/commands/auth.js.map +1 -1
  8. package/dist/src/commands/blob-buckets.js +84 -7
  9. package/dist/src/commands/blob-buckets.js.map +1 -1
  10. package/dist/src/commands/catalog.js +3 -3
  11. package/dist/src/commands/catalog.js.map +1 -1
  12. package/dist/src/commands/collections.js +12 -9
  13. package/dist/src/commands/collections.js.map +1 -1
  14. package/dist/src/commands/databases.js +220 -82
  15. package/dist/src/commands/databases.js.map +1 -1
  16. package/dist/src/commands/documents.js +77 -0
  17. package/dist/src/commands/documents.js.map +1 -1
  18. package/dist/src/commands/group-type-configs.js +1 -9
  19. package/dist/src/commands/group-type-configs.js.map +1 -1
  20. package/dist/src/commands/groups.js +12 -6
  21. package/dist/src/commands/groups.js.map +1 -1
  22. package/dist/src/commands/guides.d.ts +161 -0
  23. package/dist/src/commands/guides.js +502 -84
  24. package/dist/src/commands/guides.js.map +1 -1
  25. package/dist/src/commands/integrations.js +2 -2
  26. package/dist/src/commands/integrations.js.map +1 -1
  27. package/dist/src/commands/metadata.d.ts +2 -0
  28. package/dist/src/commands/metadata.js +344 -0
  29. package/dist/src/commands/metadata.js.map +1 -0
  30. package/dist/src/commands/prompts.js +2 -2
  31. package/dist/src/commands/prompts.js.map +1 -1
  32. package/dist/src/commands/rule-sets.d.ts +1 -0
  33. package/dist/src/commands/rule-sets.js +25 -3
  34. package/dist/src/commands/rule-sets.js.map +1 -1
  35. package/dist/src/commands/scripts.d.ts +2 -0
  36. package/dist/src/commands/scripts.js +667 -0
  37. package/dist/src/commands/scripts.js.map +1 -0
  38. package/dist/src/commands/settings.d.ts +15 -0
  39. package/dist/src/commands/settings.js +102 -0
  40. package/dist/src/commands/settings.js.map +1 -0
  41. package/dist/src/commands/sync-app-settings.d.ts +105 -0
  42. package/dist/src/commands/sync-app-settings.js +339 -0
  43. package/dist/src/commands/sync-app-settings.js.map +1 -0
  44. package/dist/src/commands/sync.d.ts +204 -9
  45. package/dist/src/commands/sync.js +1706 -371
  46. package/dist/src/commands/sync.js.map +1 -1
  47. package/dist/src/commands/vars.d.ts +8 -0
  48. package/dist/src/commands/vars.js +110 -0
  49. package/dist/src/commands/vars.js.map +1 -0
  50. package/dist/src/commands/webhooks.js +17 -3
  51. package/dist/src/commands/webhooks.js.map +1 -1
  52. package/dist/src/commands/workflows.d.ts +30 -0
  53. package/dist/src/commands/workflows.js +667 -59
  54. package/dist/src/commands/workflows.js.map +1 -1
  55. package/dist/src/lib/api-client.d.ts +122 -18
  56. package/dist/src/lib/api-client.js +131 -2
  57. package/dist/src/lib/api-client.js.map +1 -1
  58. package/dist/src/lib/app-settings-descriptor.d.ts +108 -0
  59. package/dist/src/lib/app-settings-descriptor.js +250 -0
  60. package/dist/src/lib/app-settings-descriptor.js.map +1 -0
  61. package/dist/src/lib/batch.d.ts +26 -0
  62. package/dist/src/lib/batch.js +32 -0
  63. package/dist/src/lib/batch.js.map +1 -0
  64. package/dist/src/lib/block-layout.d.ts +160 -0
  65. package/dist/src/lib/block-layout.js +451 -0
  66. package/dist/src/lib/block-layout.js.map +1 -0
  67. package/dist/src/lib/codegen-shared/generatedFiles.d.ts +76 -0
  68. package/dist/src/lib/codegen-shared/generatedFiles.js +144 -0
  69. package/dist/src/lib/codegen-shared/generatedFiles.js.map +1 -0
  70. package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.d.ts +68 -0
  71. package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.js +168 -0
  72. package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.js.map +1 -0
  73. package/dist/src/lib/config-toml.d.ts +10 -0
  74. package/dist/src/lib/config-toml.js +42 -0
  75. package/dist/src/lib/config-toml.js.map +1 -0
  76. package/dist/src/lib/config.d.ts +16 -0
  77. package/dist/src/lib/config.js +41 -0
  78. package/dist/src/lib/config.js.map +1 -1
  79. package/dist/src/lib/constants.d.ts +9 -0
  80. package/dist/src/lib/constants.js +9 -0
  81. package/dist/src/lib/constants.js.map +1 -1
  82. package/dist/src/lib/csv.d.ts +1 -2
  83. package/dist/src/lib/csv.js +3 -8
  84. package/dist/src/lib/csv.js.map +1 -1
  85. package/dist/src/lib/db-codegen/dbGenerator.d.ts +21 -65
  86. package/dist/src/lib/db-codegen/dbGenerator.js +117 -321
  87. package/dist/src/lib/db-codegen/dbGenerator.js.map +1 -1
  88. package/dist/src/lib/db-codegen/dbNaming.d.ts +37 -0
  89. package/dist/src/lib/db-codegen/dbNaming.js +70 -0
  90. package/dist/src/lib/db-codegen/dbNaming.js.map +1 -1
  91. package/dist/src/lib/db-codegen/dbTemplates.d.ts +165 -5
  92. package/dist/src/lib/db-codegen/dbTemplates.js +292 -16
  93. package/dist/src/lib/db-codegen/dbTemplates.js.map +1 -1
  94. package/dist/src/lib/db-codegen/dbTsTypes.d.ts +7 -3
  95. package/dist/src/lib/db-codegen/dbTsTypes.js +23 -1
  96. package/dist/src/lib/db-codegen/dbTsTypes.js.map +1 -1
  97. package/dist/src/lib/db-codegen/dbTypeIR.d.ts +146 -0
  98. package/dist/src/lib/db-codegen/dbTypeIR.js +517 -0
  99. package/dist/src/lib/db-codegen/dbTypeIR.js.map +1 -0
  100. package/dist/src/lib/db-codegen/generated-operation-def-descriptor.d.ts +101 -0
  101. package/dist/src/lib/db-codegen/generated-operation-def-descriptor.js +200 -0
  102. package/dist/src/lib/db-codegen/generated-operation-def-descriptor.js.map +1 -0
  103. package/dist/src/lib/generated-allowlist.js +43 -0
  104. package/dist/src/lib/generated-allowlist.js.map +1 -1
  105. package/dist/src/lib/init-config.js +2 -2
  106. package/dist/src/lib/init-config.js.map +1 -1
  107. package/dist/src/lib/output.d.ts +25 -5
  108. package/dist/src/lib/output.js +32 -4
  109. package/dist/src/lib/output.js.map +1 -1
  110. package/dist/src/lib/query-operators.d.ts +43 -0
  111. package/dist/src/lib/query-operators.js +80 -0
  112. package/dist/src/lib/query-operators.js.map +1 -0
  113. package/dist/src/lib/swift-codegen/dbGenerator.d.ts +68 -0
  114. package/dist/src/lib/swift-codegen/dbGenerator.js +380 -0
  115. package/dist/src/lib/swift-codegen/dbGenerator.js.map +1 -0
  116. package/dist/src/lib/swift-codegen/dbSwiftTypes.d.ts +42 -0
  117. package/dist/src/lib/swift-codegen/dbSwiftTypes.js +100 -0
  118. package/dist/src/lib/swift-codegen/dbSwiftTypes.js.map +1 -0
  119. package/dist/src/lib/swift-codegen/generator.d.ts +84 -0
  120. package/dist/src/lib/swift-codegen/generator.js +178 -0
  121. package/dist/src/lib/swift-codegen/generator.js.map +1 -0
  122. package/dist/src/lib/swift-codegen/schemaToSwift.d.ts +72 -0
  123. package/dist/src/lib/swift-codegen/schemaToSwift.js +644 -0
  124. package/dist/src/lib/swift-codegen/schemaToSwift.js.map +1 -0
  125. package/dist/src/lib/swift-codegen/swiftNaming.d.ts +85 -0
  126. package/dist/src/lib/swift-codegen/swiftNaming.js +198 -0
  127. package/dist/src/lib/swift-codegen/swiftNaming.js.map +1 -0
  128. package/dist/src/lib/sync-resource-types.d.ts +225 -0
  129. package/dist/src/lib/sync-resource-types.js +394 -0
  130. package/dist/src/lib/sync-resource-types.js.map +1 -0
  131. package/dist/src/lib/toml-database-config.d.ts +10 -19
  132. package/dist/src/lib/toml-database-config.js +28 -59
  133. package/dist/src/lib/toml-database-config.js.map +1 -1
  134. package/dist/src/lib/toml-metadata-config.d.ts +147 -0
  135. package/dist/src/lib/toml-metadata-config.js +463 -0
  136. package/dist/src/lib/toml-metadata-config.js.map +1 -0
  137. package/dist/src/lib/toml-native-form.d.ts +46 -0
  138. package/dist/src/lib/toml-native-form.js +78 -0
  139. package/dist/src/lib/toml-native-form.js.map +1 -0
  140. package/dist/src/lib/toml-params-validator.d.ts +34 -0
  141. package/dist/src/lib/toml-params-validator.js +118 -3
  142. package/dist/src/lib/toml-params-validator.js.map +1 -1
  143. package/dist/src/lib/workflow-apply.d.ts +86 -0
  144. package/dist/src/lib/workflow-apply.js +127 -0
  145. package/dist/src/lib/workflow-apply.js.map +1 -0
  146. package/dist/src/lib/workflow-codegen/generated-schema-descriptor.d.ts +129 -0
  147. package/dist/src/lib/workflow-codegen/generated-schema-descriptor.js +269 -0
  148. package/dist/src/lib/workflow-codegen/generated-schema-descriptor.js.map +1 -0
  149. package/dist/src/lib/workflow-codegen/generator.d.ts +87 -0
  150. package/dist/src/lib/workflow-codegen/generator.js +290 -0
  151. package/dist/src/lib/workflow-codegen/generator.js.map +1 -0
  152. package/dist/src/lib/workflow-codegen/invokerIR.d.ts +85 -0
  153. package/dist/src/lib/workflow-codegen/invokerIR.js +71 -0
  154. package/dist/src/lib/workflow-codegen/invokerIR.js.map +1 -0
  155. package/dist/src/lib/workflow-codegen/naming.d.ts +33 -0
  156. package/dist/src/lib/workflow-codegen/naming.js +81 -0
  157. package/dist/src/lib/workflow-codegen/naming.js.map +1 -0
  158. package/dist/src/lib/workflow-codegen/schemaToTs.d.ts +64 -0
  159. package/dist/src/lib/workflow-codegen/schemaToTs.js +282 -0
  160. package/dist/src/lib/workflow-codegen/schemaToTs.js.map +1 -0
  161. package/dist/src/lib/workflow-fragments.js +3 -3
  162. package/dist/src/lib/workflow-fragments.js.map +1 -1
  163. package/dist/src/lib/workflow-payload.d.ts +68 -0
  164. package/dist/src/lib/workflow-payload.js +150 -0
  165. package/dist/src/lib/workflow-payload.js.map +1 -0
  166. package/dist/src/lib/workflow-toml-validator.d.ts +1 -1
  167. package/dist/src/lib/workflow-toml-validator.js +37 -1
  168. package/dist/src/lib/workflow-toml-validator.js.map +1 -1
  169. package/dist/src/types/index.d.ts +11 -0
  170. package/dist/src/validators.d.ts +4 -3
  171. package/dist/src/validators.js +6 -5
  172. package/dist/src/validators.js.map +1 -1
  173. package/package.json +7 -3
@@ -1,5 +1,6 @@
1
1
  import { Command } from "commander";
2
2
  import { ApiClient } from "../lib/api-client.js";
3
+ import { type PresenceOutcome } from "../lib/sync-resource-types.js";
3
4
  /**
4
5
  * Wrap a server-side error so the printed message identifies which entity
5
6
  * was in flight. Used by every entity create/update/delete call site in the
@@ -37,9 +38,9 @@ export declare function computeExpandedContentHash(parsed: any): string;
37
38
  */
38
39
  export declare function shouldPushExpandedFile(parsed: any, storedHash: string | undefined): boolean;
39
40
  /**
40
- * Normalize a parsed workflow TOML object so that any of the five
41
- * serializer-emitted fields the *local* file omits are filled in with the
42
- * model default. Used by `diff` so a hand-authored workflow that omits e.g.
41
+ * Normalize a parsed workflow TOML object so that any of the
42
+ * serializer-emitted default fields the *local* file omits are filled in with
43
+ * the model default. Used by `diff` so a hand-authored workflow that omits e.g.
43
44
  * `perUserMaxRunning` compares equal to a server that defaulted it to 4
44
45
  * (the #1175 false-positive guard) — while a server value that was
45
46
  * *explicitly set* to a non-default (e.g. 8) still shows as Modified.
@@ -62,10 +63,190 @@ export declare function hashWorkflowTomlForDiff(parsed: any): string;
62
63
  * `getWorkflow` + active `getWorkflowConfig`), mirroring exactly what a fresh
63
64
  * `sync pull` would write to disk. Serializes via `serializeWorkflow`, parses
64
65
  * the resulting TOML (remote serialized TOML never carries `include`s, so a
65
- * plain `TOML.parse` is sufficient — no fragment path needed), then hashes
66
+ * plain `parseConfigToml` is sufficient — no fragment path needed), then hashes
66
67
  * through `hashWorkflowTomlForDiff` so it lines up with the local-file hash.
67
68
  */
68
69
  export declare function hashRemoteWorkflowForDiff(workflow: any, draft: any, configs: any[]): string;
70
+ export interface ParsedAuthSettings {
71
+ settings: Record<string, any>;
72
+ warnings: string[];
73
+ }
74
+ /**
75
+ * Build the [auth] block of app.toml from server settings (pull direction).
76
+ *
77
+ * Thin wrapper over the shared field descriptor
78
+ * (`cli/src/lib/app-settings-descriptor.ts`), which now owns the [auth] field
79
+ * set that `AUTH_BOOLEAN_KEYS`/`RECOGNIZED_AUTH_KEYS` used to hard-code. The
80
+ * descriptor drives all four sections in one place, so pull, push, and the
81
+ * unrecognized-key warning can never drift apart. `googleClientSecret` is a
82
+ * secret descriptor entry and is never written.
83
+ */
84
+ export declare function serializeAuthBlock(settings: any): Record<string, any>;
85
+ /**
86
+ * Translate the [auth] block of app.toml into app-settings fields (push
87
+ * direction). Kept as a focused helper over the shared descriptor; the full
88
+ * push path uses `parseTomlToAppSettings` for every section. Only keys present
89
+ * in the TOML are forwarded, so an omitted key never overwrites server state.
90
+ * Descriptor errors (a secret key, a type mismatch) are surfaced alongside the
91
+ * unrecognized-key warnings.
92
+ */
93
+ export declare function parseAppAuthSettings(auth: Record<string, any>): ParsedAuthSettings;
94
+ type VarEntity = {
95
+ modifiedAt: string;
96
+ contentHash?: string;
97
+ };
98
+ /**
99
+ * Decide whether `sync pull` should (over)write `vars.toml`, given the outcome
100
+ * of fetching the app's config vars.
101
+ *
102
+ * The distinction that matters (issue #1423 review): a SUCCESSFUL fetch that
103
+ * returns zero vars is safe to write — the comment-only file is the intended
104
+ * empty state. A FAILED fetch (transient 401/500/network) must NOT write,
105
+ * because `serializeVars([])` would clobber a good local `vars.toml` with a
106
+ * comment-only file while the pull otherwise reports success. On failure we
107
+ * keep the prior manifest entries so the untouched file and the sync state stay
108
+ * consistent.
109
+ *
110
+ * Pure and side-effect-free (the caller owns the actual `writeFileSync`) so the
111
+ * clobber guard is unit-testable without a live server.
112
+ */
113
+ export declare function planVarsPull(outcome: {
114
+ ok: true;
115
+ vars: any[];
116
+ } | {
117
+ ok: false;
118
+ }, priorVars?: Record<string, VarEntity>): {
119
+ write: boolean;
120
+ content: string | null;
121
+ varEntities: Record<string, VarEntity>;
122
+ };
123
+ /**
124
+ * Validate a parsed `vars.toml` table against the same key/value constraints
125
+ * the server enforces (key format, string type, non-empty, size cap) plus the
126
+ * aggregate per-app var-count cap. Returns a list of human-readable errors
127
+ * (empty when valid).
128
+ *
129
+ * Run in `sync push`'s up-front preflight pass (issue #1423 review) so an
130
+ * invalid entry — or a file that would exceed the server's `MAX_VARS_PER_APP`
131
+ * cap — aborts BEFORE any mutation is applied. Validating only individual
132
+ * entries let a 101-entry file create/update many vars before the server
133
+ * rejected a later create at the cap, leaving a partial push (issue #1423
134
+ * review pass 3). Pure and side-effect-free so it's unit-testable without a
135
+ * live server.
136
+ */
137
+ export declare function validateVarsFile(parsedVars: Record<string, unknown>): string[];
138
+ /**
139
+ * Plan the config-var writes a `sync push` should make, detecting concurrent
140
+ * remote edits before overwriting them (issue #1423 review).
141
+ *
142
+ * This is the client-side half of a two-layer concurrency guard. The vars
143
+ * PUT/DELETE endpoints now honor an `expectedModifiedAt` precondition (issue
144
+ * #1423 review r-2 P1) and raise a `ConflictError` when the server row changed
145
+ * since the caller's snapshot — the atomic, server-side check every other
146
+ * synced entity relies on. This function is the fast fail-before-mutate layer:
147
+ * it compares the recorded baseline against the current remote snapshot and, for
148
+ * a var whose remote value has drifted from what we last synced, reports a
149
+ * conflict (fed into the same `conflicts[]` accumulator the other entities use)
150
+ * before any write is attempted. A var tracked at the baseline but absent from
151
+ * the remote snapshot (deleted remotely while edited locally) is remote drift
152
+ * too, and also reported as a conflict rather than silently recreated.
153
+ * Conversely, a var removed locally that is already absent remotely is NOT
154
+ * planned for deletion — its desired (absent) state is already met, so a DELETE
155
+ * would 404 and fail the push. The same drift check guards deletions: a var
156
+ * removed locally whose remote value no longer matches the baseline was edited
157
+ * remotely since the last sync, and deleting it would silently discard that
158
+ * edit — reported as a conflict instead. `force` skips the conflict guard,
159
+ * matching `sync push --force` for every other entity.
160
+ *
161
+ * Pure and side-effect-free (the caller owns the API calls and sync-state
162
+ * updates) so the guard is unit-testable without a live server. Assumes
163
+ * `parsedVars` has already passed `validateVarsFile` (values are strings). The
164
+ * caller normally fails the push closed when the remote snapshot can't be
165
+ * fetched, but under `--force` it falls back to an empty snapshot and sets
166
+ * `snapshotUnavailable` — which keeps removed-key deletions in the plan (they'd
167
+ * otherwise be mistaken for already-deleted and dropped) and leans on the apply
168
+ * loop's idempotent 404 handling (issue #1423 review r-2 P2).
169
+ */
170
+ export declare function planVarsPush(parsedVars: Record<string, string>, baseline: Record<string, VarEntity> | undefined, remoteVars: Array<{
171
+ key: string;
172
+ value?: string;
173
+ updatedAt?: string;
174
+ }>, options?: {
175
+ force?: boolean;
176
+ snapshotUnavailable?: boolean;
177
+ }): {
178
+ upserts: Array<{
179
+ action: "create" | "update";
180
+ key: string;
181
+ value: string;
182
+ valueHash: string;
183
+ }>;
184
+ deletions: string[];
185
+ conflicts: Array<{
186
+ key: string;
187
+ serverModifiedAt: string;
188
+ localModifiedAt: string;
189
+ }>;
190
+ skippedCount: number;
191
+ };
192
+ /**
193
+ * Compute the number of config vars the server would hold after a push plan
194
+ * is applied (issue #1423 review pass 5). Validating only the local file's
195
+ * entry count misses remote-only vars: 95 local entries plus 10 vars that
196
+ * exist only on the server passes a local-count check, and the creates then
197
+ * exceed the server's cap mid-push, after earlier writes were already
198
+ * applied. Counted from the fetched remote snapshot: planned deletions remove
199
+ * keys that exist remotely (the plan already omits deletes for absent keys),
200
+ * and only upserts whose key is NOT already on the server add to the total.
201
+ * Conflicted keys are not mutated, so they contribute nothing beyond their
202
+ * current remote presence. Pure and side-effect-free so it's unit-testable
203
+ * without a live server.
204
+ */
205
+ export declare function countVarsAfterPush(remoteVars: Array<{
206
+ key: string;
207
+ }>, plan: {
208
+ upserts: Array<{
209
+ key: string;
210
+ }>;
211
+ deletions: string[];
212
+ }): number;
213
+ /**
214
+ * Compute the `sync diff` rows for config vars (issue #1423 review). Before
215
+ * this, `sync diff` ignored vars entirely, so an add/remove/value-drift between
216
+ * the local `vars.toml` and the server read as no difference. Value-aware: a
217
+ * var present on both sides whose value differs is reported as `modified`
218
+ * (framed like the other content-aware entities — `sync pull` would rewrite the
219
+ * local value). Pure and side-effect-free so it's unit-testable without a live
220
+ * server.
221
+ */
222
+ export declare function diffVars(localVars: Map<string, string>, remoteVars: Map<string, string>): Array<{
223
+ type: "var";
224
+ key: string;
225
+ status: string;
226
+ hint?: string;
227
+ }>;
228
+ export declare function serializeWebhook(webhook: any): string;
229
+ /**
230
+ * Rewrite a workflow TOML file's string-form `inputSchema` / `outputSchema` to
231
+ * native object form for `sync migrate-toml` (issue #1446).
232
+ *
233
+ * Purely local, no server fetch. Parses the raw source WITHOUT expanding
234
+ * fragment `include`s (so those directives survive the rewrite), swaps a
235
+ * JSON-string schema for its parsed object when it round-trips faithfully
236
+ * (`canEmitNative === null`), and re-serializes via `stringifyConfigToml`.
237
+ *
238
+ * Only rewrites when a field is actually converted: a file whose schemas are
239
+ * already native, absent, or un-representable (a `null` default) is returned
240
+ * with `changed: false` and its original bytes untouched — so migrate is
241
+ * idempotent and never reports a spurious migration or reformats a file it
242
+ * didn't need to touch.
243
+ */
244
+ export declare function rewriteWorkflowSchemasToNative(rawToml: string, workflowKey?: string, log?: (message: string) => void): {
245
+ content: string;
246
+ changed: boolean;
247
+ };
248
+ export declare function serializeWorkflow(workflow: any, draft: any, configs: any[], logger?: (message: string) => void): string;
249
+ export declare function serializeGroupTypeConfig(config: any, ruleSetIdToName: Map<string, string>): string;
69
250
  export declare function parseDatabaseTypeToml(tomlData: any): {
70
251
  typeConfig: any;
71
252
  operations: any[];
@@ -83,11 +264,6 @@ export declare function fetchAll<T>(listFn: (params: {
83
264
  items: T[];
84
265
  nextCursor?: string | null;
85
266
  }>, pageSize?: number, maxPages?: number): Promise<T[]>;
86
- /**
87
- * Safely parse a JSON field that may be a string or already an object.
88
- * TOML can parse inline tables as objects, so we need to handle both.
89
- */
90
- export declare function safeJsonParse(value: any): any;
91
267
  /**
92
268
  * Resolve a key-based rule set name reference to an ID.
93
269
  * Throws if the name cannot be resolved and throwOnMissing is true.
@@ -141,5 +317,24 @@ export declare function pullScripts(client: ApiClient, appId: string, configDir:
141
317
  contentHash?: string;
142
318
  }>;
143
319
  count: number;
320
+ /**
321
+ * Which scripts the server listed, for the #1659 prune pass. `ok: false` when
322
+ * the listing failed (an older server without the route, or a transient
323
+ * error) or when any per-script fetch failed — in either case this pull's
324
+ * picture of the type is incomplete and must not drive deletions. Scripts
325
+ * skipped for having no active config are still *present*, so their keys stay
326
+ * in the set and their local `.rhai` survives.
327
+ */
328
+ presence: PresenceOutcome;
329
+ /**
330
+ * Whether the script LISTING succeeded. Distinct from `presence`: a failed
331
+ * per-script fetch blocks pruning but still leaves the other scripts written,
332
+ * so their fresh state entries must be kept. Only a failed listing means
333
+ * nothing was written and the prior state slot should be preserved whole.
334
+ */
335
+ listOk: boolean;
336
+ /** Names the server listed, empty when the listing failed. */
337
+ serverKeys: string[];
144
338
  }>;
145
339
  export declare function registerSyncCommands(program: Command): void;
340
+ export {};