primitive-admin 1.1.0-alpha.73 → 1.1.0-alpha.75
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/README.md +18 -25
- package/assets/skill/skills/primitive-platform/SKILL.md +30 -14
- package/dist/bin/primitive.js +25 -21
- package/dist/bin/primitive.js.map +1 -1
- package/dist/src/commands/analytics.js +117 -2
- package/dist/src/commands/analytics.js.map +1 -1
- package/dist/src/commands/auth.js +13 -107
- package/dist/src/commands/auth.js.map +1 -1
- package/dist/src/commands/collection-type-configs.js +1 -1
- package/dist/src/commands/collection-type-configs.js.map +1 -1
- package/dist/src/commands/config.js +8 -4
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/database-type-configs.js +1 -1
- package/dist/src/commands/database-type-configs.js.map +1 -1
- package/dist/src/commands/databases.js +25 -31
- package/dist/src/commands/databases.js.map +1 -1
- package/dist/src/commands/documents.js +758 -53
- package/dist/src/commands/documents.js.map +1 -1
- package/dist/src/commands/env.d.ts +1 -1
- package/dist/src/commands/env.js +57 -16
- package/dist/src/commands/env.js.map +1 -1
- package/dist/src/commands/functions.d.ts +20 -0
- package/dist/src/commands/functions.js +463 -0
- package/dist/src/commands/functions.js.map +1 -0
- package/dist/src/commands/groups.js +1 -1
- package/dist/src/commands/groups.js.map +1 -1
- package/dist/src/commands/init.d.ts +12 -15
- package/dist/src/commands/init.js +38 -92
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/integrations.js +5 -3
- package/dist/src/commands/integrations.js.map +1 -1
- package/dist/src/commands/prompts.js +5 -7
- package/dist/src/commands/prompts.js.map +1 -1
- package/dist/src/commands/rule-sets.js +1 -1
- package/dist/src/commands/rule-sets.js.map +1 -1
- package/dist/src/commands/scripts.js +23 -11
- package/dist/src/commands/scripts.js.map +1 -1
- package/dist/src/commands/sync-app-settings.js +2 -4
- package/dist/src/commands/sync-app-settings.js.map +1 -1
- package/dist/src/commands/sync.d.ts +65 -2
- package/dist/src/commands/sync.js +867 -21
- package/dist/src/commands/sync.js.map +1 -1
- package/dist/src/commands/workflows.js +6 -8
- package/dist/src/commands/workflows.js.map +1 -1
- package/dist/src/lib/api-client.d.ts +163 -2
- package/dist/src/lib/api-client.js +227 -5
- package/dist/src/lib/api-client.js.map +1 -1
- package/dist/src/lib/app-match-guard.d.ts +44 -0
- package/dist/src/lib/app-match-guard.js +72 -0
- package/dist/src/lib/app-match-guard.js.map +1 -0
- package/dist/src/lib/app-settings-descriptor.js +4 -0
- package/dist/src/lib/app-settings-descriptor.js.map +1 -1
- package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.d.ts +11 -8
- package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.js +112 -60
- package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.js.map +1 -1
- package/dist/src/lib/config-object-descriptor.js +39 -0
- package/dist/src/lib/config-object-descriptor.js.map +1 -1
- package/dist/src/lib/config-surface.d.ts +10 -0
- package/dist/src/lib/config-surface.js +17 -0
- package/dist/src/lib/config-surface.js.map +1 -1
- package/dist/src/lib/config.d.ts +15 -4
- package/dist/src/lib/config.js +22 -39
- package/dist/src/lib/config.js.map +1 -1
- package/dist/src/lib/credentials-store.d.ts +7 -15
- package/dist/src/lib/credentials-store.js +52 -85
- package/dist/src/lib/credentials-store.js.map +1 -1
- package/dist/src/lib/document-export-permissions.d.ts +30 -0
- package/dist/src/lib/document-export-permissions.js +54 -0
- package/dist/src/lib/document-export-permissions.js.map +1 -0
- package/dist/src/lib/env-resolver-core.d.ts +64 -16
- package/dist/src/lib/env-resolver-core.js +128 -17
- package/dist/src/lib/env-resolver-core.js.map +1 -1
- package/dist/src/lib/env-resolver.d.ts +3 -3
- package/dist/src/lib/env-resolver.js +2 -2
- package/dist/src/lib/function-bundle.d.ts +141 -0
- package/dist/src/lib/function-bundle.js +333 -0
- package/dist/src/lib/function-bundle.js.map +1 -0
- package/dist/src/lib/function-collect.d.ts +101 -0
- package/dist/src/lib/function-collect.js +339 -0
- package/dist/src/lib/function-collect.js.map +1 -0
- package/dist/src/lib/function-db-types.d.ts +149 -0
- package/dist/src/lib/function-db-types.js +587 -0
- package/dist/src/lib/function-db-types.js.map +1 -0
- package/dist/src/lib/function-grants-preflight.d.ts +118 -0
- package/dist/src/lib/function-grants-preflight.js +213 -0
- package/dist/src/lib/function-grants-preflight.js.map +1 -0
- package/dist/src/lib/function-sync.d.ts +191 -0
- package/dist/src/lib/function-sync.js +474 -0
- package/dist/src/lib/function-sync.js.map +1 -0
- package/dist/src/lib/function-triggers.d.ts +54 -0
- package/dist/src/lib/function-triggers.js +223 -0
- package/dist/src/lib/function-triggers.js.map +1 -0
- package/dist/src/lib/generated-config-surfaces.d.ts +389 -0
- package/dist/src/lib/generated-config-surfaces.js +1030 -2
- package/dist/src/lib/generated-config-surfaces.js.map +1 -1
- package/dist/src/lib/generated-sdk-types.d.ts +12 -0
- package/dist/src/lib/generated-sdk-types.js +13 -0
- package/dist/src/lib/generated-sdk-types.js.map +1 -0
- package/dist/src/lib/init-adopt.js +2 -2
- package/dist/src/lib/init-adopt.js.map +1 -1
- package/dist/src/lib/init-assets.js +3 -3
- package/dist/src/lib/init-config.d.ts +1 -1
- package/dist/src/lib/init-ios-links.d.ts +6 -5
- package/dist/src/lib/init-ios-links.js +9 -8
- package/dist/src/lib/init-ios-links.js.map +1 -1
- package/dist/src/lib/init-plan.d.ts +1 -1
- package/dist/src/lib/init-plan.js +1 -1
- package/dist/src/lib/init-xcode.d.ts +6 -5
- package/dist/src/lib/init-xcode.js +34 -10
- package/dist/src/lib/init-xcode.js.map +1 -1
- package/dist/src/lib/ios-app-id.d.ts +34 -0
- package/dist/src/lib/ios-app-id.js +69 -0
- package/dist/src/lib/ios-app-id.js.map +1 -0
- package/dist/src/lib/local-state.d.ts +1 -1
- package/dist/src/lib/local-state.js +1 -1
- package/dist/src/lib/local-test-cases.d.ts +1 -1
- package/dist/src/lib/local-test-cases.js +2 -1
- package/dist/src/lib/local-test-cases.js.map +1 -1
- package/dist/src/lib/migration-nag.d.ts +2 -2
- package/dist/src/lib/migration-nag.js +4 -3
- package/dist/src/lib/migration-nag.js.map +1 -1
- package/dist/src/lib/project-config.d.ts +38 -21
- package/dist/src/lib/project-config.js +57 -47
- package/dist/src/lib/project-config.js.map +1 -1
- package/dist/src/lib/snapshots.d.ts +2 -2
- package/dist/src/lib/snapshots.js +2 -2
- package/dist/src/lib/swift-codegen/generator.d.ts +1 -1
- package/dist/src/lib/swift-codegen/generator.js +1 -1
- package/dist/src/lib/sync-dir-selector.d.ts +1 -1
- package/dist/src/lib/sync-dir-selector.js +1 -1
- package/dist/src/lib/sync-paths.d.ts +52 -16
- package/dist/src/lib/sync-paths.js +68 -22
- package/dist/src/lib/sync-paths.js.map +1 -1
- package/dist/src/lib/sync-resource-types.d.ts +23 -4
- package/dist/src/lib/sync-resource-types.js +106 -8
- package/dist/src/lib/sync-resource-types.js.map +1 -1
- package/dist/src/lib/template.d.ts +2 -2
- package/dist/src/lib/template.js +2 -2
- package/dist/src/lib/test-case-keys.d.ts +1 -1
- package/dist/src/lib/test-case-keys.js +1 -1
- package/dist/src/lib/test-case-variables.d.ts +14 -0
- package/dist/src/lib/test-case-variables.js +42 -0
- package/dist/src/lib/test-case-variables.js.map +1 -1
- package/dist/src/lib/workflow-codegen/generator.d.ts +1 -1
- package/dist/src/lib/workflow-codegen/generator.js +1 -1
- package/dist/src/lib/workflow-usage.d.ts +198 -0
- package/dist/src/lib/workflow-usage.js +312 -0
- package/dist/src/lib/workflow-usage.js.map +1 -0
- package/dist/src/types/index.d.ts +12 -2
- package/package.json +4 -3
|
@@ -662,6 +662,20 @@ export declare function serializeBlobBucket(bucket: any, logger?: (message: stri
|
|
|
662
662
|
* drift.
|
|
663
663
|
*/
|
|
664
664
|
export declare function buildBlobBucketUpdatePayload(bucket: any): any;
|
|
665
|
+
/**
|
|
666
|
+
* The status a freshly CREATED prompt config still owes the file, or null
|
|
667
|
+
* (#3201).
|
|
668
|
+
*
|
|
669
|
+
* `status` is update-only — `POST /prompts` and `POST /prompts/:id/configs`
|
|
670
|
+
* both assign `active` whatever the body says — so an authored
|
|
671
|
+
* `status = "archived"` was silently dropped on every create path: a pulled
|
|
672
|
+
* tree pushed from a clean clone into a fresh environment brought every
|
|
673
|
+
* retired config back into service. Read through the push payload builder, so
|
|
674
|
+
* a file that omits the key asks for the default and needs no request.
|
|
675
|
+
*/
|
|
676
|
+
export declare function createdConfigStatusPatch(tomlConfig: any): {
|
|
677
|
+
status: string;
|
|
678
|
+
} | null;
|
|
665
679
|
/**
|
|
666
680
|
* Which `[[configs]]` entry a prompt file marks as live (issue #2645).
|
|
667
681
|
*
|
|
@@ -767,6 +781,13 @@ export declare function buildPromptCreatePayload(key: string, tomlData: any): Re
|
|
|
767
781
|
* `seededConfigName` is what the server called it — read from the create
|
|
768
782
|
* response rather than assumed, so a handler that one day honors the name
|
|
769
783
|
* produces no needless PATCH.
|
|
784
|
+
*
|
|
785
|
+
* #3201 — the entry's `status` is deferred the OTHER way and is deliberately
|
|
786
|
+
* not here. The create points the prompt's `activeConfigId` at this seeded
|
|
787
|
+
* config, so retiring it in this early patch would archive the config the
|
|
788
|
+
* prompt is serving from and leave it there until the marked entry is created
|
|
789
|
+
* and activated — a window a failed create or activation freezes. It is
|
|
790
|
+
* applied after activation instead (`createdConfigStatusPatch`).
|
|
770
791
|
*/
|
|
771
792
|
export declare function seededOnlyPromptConfigFields(firstConfig: any, seededConfigName?: string): Record<string, any> | null;
|
|
772
793
|
/**
|
|
@@ -1700,7 +1721,7 @@ export declare function configSemanticHash(label: string, filePath: string, maps
|
|
|
1700
1721
|
/**
|
|
1701
1722
|
* The sync state `config push` writes into (#2731 B6, closing #2374).
|
|
1702
1723
|
*
|
|
1703
|
-
* `loadSyncState` answers `null` for an absent
|
|
1724
|
+
* `loadSyncState` answers `null` for an absent sync-state baseline, and
|
|
1704
1725
|
* every per-entity state write in the push loops is guarded by `if (syncState)`
|
|
1705
1726
|
* — so a first push created every resource and recorded none of them. The next
|
|
1706
1727
|
* push then re-entered the create path for everything and depended on 409
|
|
@@ -1881,6 +1902,48 @@ selects?: (name: string) => boolean): Promise<{
|
|
|
1881
1902
|
/** Names the server listed, empty when the listing failed. */
|
|
1882
1903
|
serverKeys: string[];
|
|
1883
1904
|
}>;
|
|
1905
|
+
/**
|
|
1906
|
+
* Pull server-side `ServerFunction` rows into `functions/` (#3179).
|
|
1907
|
+
*
|
|
1908
|
+
* Two things make this different from every other type's pull:
|
|
1909
|
+
*
|
|
1910
|
+
* 1. **A function is more than its file.** The active config VERSION holds an
|
|
1911
|
+
* envelope with the authored TOML bytes and every source file, so the pull
|
|
1912
|
+
* writes `functions/<key>.toml` plus the TypeScript beside it, and records
|
|
1913
|
+
* the source paths so prune can remove the code with the function.
|
|
1914
|
+
* 2. **Bytes, not a re-serialization.** The stored TOML is written verbatim,
|
|
1915
|
+
* so comments, key order and line endings survive the round trip (F-009).
|
|
1916
|
+
* A function that has never had code pushed has no stored bytes; that one
|
|
1917
|
+
* gets a canonical serialization of its header, which is still a pushable
|
|
1918
|
+
* file.
|
|
1919
|
+
*
|
|
1920
|
+
* A stored source path is never trusted: `planFunctionPull` refuses one that
|
|
1921
|
+
* normalizes outside the tree, and the refusals are reported rather than
|
|
1922
|
+
* swallowed.
|
|
1923
|
+
*/
|
|
1924
|
+
export declare function pullFunctions(client: ApiClient, appId: string, configDir: string, logger?: (msg: string) => void, selects?: (key: string) => boolean): Promise<{
|
|
1925
|
+
functionEntities: Record<string, {
|
|
1926
|
+
id: string;
|
|
1927
|
+
modifiedAt: string;
|
|
1928
|
+
contentHash?: string;
|
|
1929
|
+
semanticHash?: string;
|
|
1930
|
+
envelopeHash?: string;
|
|
1931
|
+
activeConfigId?: string;
|
|
1932
|
+
sources?: string[];
|
|
1933
|
+
}>;
|
|
1934
|
+
count: number;
|
|
1935
|
+
presence: PresenceOutcome;
|
|
1936
|
+
listOk: boolean;
|
|
1937
|
+
serverKeys: string[];
|
|
1938
|
+
/**
|
|
1939
|
+
* Everything the server listed, archived rows included. Pull exports no file
|
|
1940
|
+
* for a tombstone, so without the row here the archived function would be
|
|
1941
|
+
* stranded: no file to delete and no managed key to prune, and its key would
|
|
1942
|
+
* go on blocking the app's whole namespace with nothing able to reclaim it.
|
|
1943
|
+
* The caller folds these into the state through `archivedTombstoneEntries`.
|
|
1944
|
+
*/
|
|
1945
|
+
items: any[];
|
|
1946
|
+
}>;
|
|
1884
1947
|
/** The outcome of one block's test-case pull (#2769). */
|
|
1885
1948
|
export type TestCasePullOutcome =
|
|
1886
1949
|
/** The listing succeeded; `count` cases were written and stale files removed. */
|
|
@@ -2287,7 +2350,7 @@ export declare function applyTestCasePrune(params: {
|
|
|
2287
2350
|
* `registerConfigCommands` created rather than making one of its own.
|
|
2288
2351
|
*
|
|
2289
2352
|
* The module keeps its name and its ~50 exported helpers: `sync.ts`,
|
|
2290
|
-
* `resolveSyncDir`,
|
|
2353
|
+
* `resolveSyncDir`, the sync-state baseline and `primitive/<env>/`
|
|
2291
2354
|
* are internal identifiers, deliberately left alone (#2759 scope).
|
|
2292
2355
|
*/
|
|
2293
2356
|
export declare function registerConfigSyncCommands(sync: Command): void;
|