primitive-admin 1.2.0-alpha.3 → 1.2.0-alpha.5
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/assets/skill/skills/primitive-platform/SKILL.md +17 -0
- package/dist/src/commands/agent-sessions.js +4 -0
- package/dist/src/commands/agent-sessions.js.map +1 -1
- package/dist/src/commands/auth.js +7 -4
- package/dist/src/commands/auth.js.map +1 -1
- package/dist/src/commands/connections.js +11 -12
- package/dist/src/commands/connections.js.map +1 -1
- package/dist/src/commands/database-type-configs.js +2 -76
- package/dist/src/commands/database-type-configs.js.map +1 -1
- package/dist/src/commands/database-types.js +313 -13
- package/dist/src/commands/database-types.js.map +1 -1
- package/dist/src/commands/databases.d.ts +9 -0
- package/dist/src/commands/databases.js +78 -403
- package/dist/src/commands/databases.js.map +1 -1
- package/dist/src/commands/documents.d.ts +32 -2
- package/dist/src/commands/documents.js +344 -711
- package/dist/src/commands/documents.js.map +1 -1
- package/dist/src/commands/functions.js +2 -2
- package/dist/src/commands/functions.js.map +1 -1
- package/dist/src/commands/llm.js +6 -9
- package/dist/src/commands/llm.js.map +1 -1
- package/dist/src/commands/prompts.d.ts +7 -0
- package/dist/src/commands/prompts.js +44 -0
- package/dist/src/commands/prompts.js.map +1 -1
- package/dist/src/commands/settings.d.ts +9 -12
- package/dist/src/commands/settings.js +79 -31
- package/dist/src/commands/settings.js.map +1 -1
- package/dist/src/commands/sync.d.ts +43 -110
- package/dist/src/commands/sync.js +356 -1251
- package/dist/src/commands/sync.js.map +1 -1
- package/dist/src/lib/aggregate-output.d.ts +25 -0
- package/dist/src/lib/aggregate-output.js +53 -0
- package/dist/src/lib/aggregate-output.js.map +1 -0
- package/dist/src/lib/api-client.d.ts +48 -204
- package/dist/src/lib/api-client.js +57 -321
- package/dist/src/lib/api-client.js.map +1 -1
- package/dist/src/lib/codegen-shared/generatedFiles.d.ts +6 -7
- package/dist/src/lib/codegen-shared/generatedFiles.js +2 -2
- package/dist/src/lib/codegen-shared/generatedFiles.js.map +1 -1
- package/dist/src/lib/codegen-shared/prettierStable.d.ts +1 -1
- package/dist/src/lib/codegen-shared/prettierStable.js +1 -1
- package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.d.ts +2 -2
- package/dist/src/lib/codegen-shared/resolveCodegenSourceDir.js +2 -2
- package/dist/src/lib/config-object-descriptor.js +15 -10
- package/dist/src/lib/config-object-descriptor.js.map +1 -1
- package/dist/src/lib/config-surface.d.ts +2 -1
- package/dist/src/lib/config-surface.js +4 -1
- package/dist/src/lib/config-surface.js.map +1 -1
- package/dist/src/lib/connections-list.d.ts +10 -0
- package/dist/src/lib/connections-list.js +18 -0
- package/dist/src/lib/connections-list.js.map +1 -0
- package/dist/src/lib/csv.d.ts +8 -9
- package/dist/src/lib/csv.js +3 -4
- package/dist/src/lib/csv.js.map +1 -1
- package/dist/src/lib/db-codegen/dbGenerator.js +5 -16
- package/dist/src/lib/db-codegen/dbGenerator.js.map +1 -1
- package/dist/src/lib/db-codegen/dbNaming.d.ts +5 -13
- package/dist/src/lib/db-codegen/dbNaming.js +5 -17
- package/dist/src/lib/db-codegen/dbNaming.js.map +1 -1
- package/dist/src/lib/db-codegen/dbTemplates.d.ts +7 -56
- package/dist/src/lib/db-codegen/dbTemplates.js +25 -125
- package/dist/src/lib/db-codegen/dbTemplates.js.map +1 -1
- package/dist/src/lib/db-codegen/dbTsTypes.d.ts +2 -2
- package/dist/src/lib/db-codegen/dbTsTypes.js +2 -2
- package/dist/src/lib/db-codegen/dbTypeIR.d.ts +60 -2
- package/dist/src/lib/db-codegen/dbTypeIR.js +12 -1
- package/dist/src/lib/db-codegen/dbTypeIR.js.map +1 -1
- package/dist/src/lib/document-export-record-log.d.ts +57 -0
- package/dist/src/lib/document-export-record-log.js +215 -0
- package/dist/src/lib/document-export-record-log.js.map +1 -0
- package/dist/src/lib/document-ingest-artifact.d.ts +13 -2
- package/dist/src/lib/document-ingest-artifact.js +7 -3
- package/dist/src/lib/document-ingest-artifact.js.map +1 -1
- package/dist/src/lib/document-ingest-rows.d.ts +16 -0
- package/dist/src/lib/document-ingest-rows.js +17 -0
- package/dist/src/lib/document-ingest-rows.js.map +1 -1
- package/dist/src/lib/document-ingest.d.ts +22 -0
- package/dist/src/lib/document-ingest.js +33 -0
- package/dist/src/lib/document-ingest.js.map +1 -1
- package/dist/src/lib/function-sync.d.ts +3 -16
- package/dist/src/lib/function-sync.js +14 -18
- package/dist/src/lib/function-sync.js.map +1 -1
- package/dist/src/lib/function-triggers.d.ts +3 -15
- package/dist/src/lib/function-triggers.js +10 -72
- package/dist/src/lib/function-triggers.js.map +1 -1
- package/dist/src/lib/generated-allowlist.js +0 -20
- package/dist/src/lib/generated-allowlist.js.map +1 -1
- package/dist/src/lib/generated-config-surfaces.d.ts +212 -49
- package/dist/src/lib/generated-config-surfaces.js +759 -184
- package/dist/src/lib/generated-config-surfaces.js.map +1 -1
- package/dist/src/lib/generated-sdk-types.d.ts +1 -1
- package/dist/src/lib/generated-sdk-types.js +1 -1
- package/dist/src/lib/generated-sdk-types.js.map +1 -1
- package/dist/src/lib/login-scope-lines.d.ts +15 -0
- package/dist/src/lib/login-scope-lines.js +22 -0
- package/dist/src/lib/login-scope-lines.js.map +1 -0
- package/dist/src/lib/paginate.d.ts +0 -5
- package/dist/src/lib/paginate.js +0 -5
- package/dist/src/lib/paginate.js.map +1 -1
- package/dist/src/lib/prompt-schema-codegen.js +5 -2
- package/dist/src/lib/prompt-schema-codegen.js.map +1 -1
- package/dist/src/lib/refresh-admin-credentials.d.ts +7 -0
- package/dist/src/lib/refresh-admin-credentials.js +16 -4
- package/dist/src/lib/refresh-admin-credentials.js.map +1 -1
- package/dist/src/lib/root-import-decision.d.ts +15 -14
- package/dist/src/lib/root-import-decision.js +44 -51
- package/dist/src/lib/root-import-decision.js.map +1 -1
- package/dist/src/lib/snapshot-build-rows.d.ts +21 -0
- package/dist/src/lib/snapshot-build-rows.js +22 -0
- package/dist/src/lib/snapshot-build-rows.js.map +1 -1
- package/dist/src/lib/snapshot-build.js +8 -3
- package/dist/src/lib/snapshot-build.js.map +1 -1
- package/dist/src/lib/swift-codegen/banners.d.ts +34 -7
- package/dist/src/lib/swift-codegen/banners.js +37 -7
- package/dist/src/lib/swift-codegen/banners.js.map +1 -1
- package/dist/src/lib/swift-codegen/dbGenerator.d.ts +4 -3
- package/dist/src/lib/swift-codegen/dbGenerator.js +14 -117
- package/dist/src/lib/swift-codegen/dbGenerator.js.map +1 -1
- package/dist/src/lib/swift-codegen/functionGenerator.d.ts +3 -3
- package/dist/src/lib/swift-codegen/functionGenerator.js +22 -17
- package/dist/src/lib/swift-codegen/functionGenerator.js.map +1 -1
- package/dist/src/lib/swift-codegen/generator.d.ts +5 -5
- package/dist/src/lib/swift-codegen/generator.js +35 -40
- package/dist/src/lib/swift-codegen/generator.js.map +1 -1
- package/dist/src/lib/toml-database-config.d.ts +14 -75
- package/dist/src/lib/toml-database-config.js +14 -305
- package/dist/src/lib/toml-database-config.js.map +1 -1
- package/dist/src/lib/workflow-codegen/generator.d.ts +7 -7
- package/dist/src/lib/workflow-codegen/generator.js +16 -23
- package/dist/src/lib/workflow-codegen/generator.js.map +1 -1
- package/dist/src/lib/workflow-codegen/invokerIR.d.ts +6 -12
- package/dist/src/lib/workflow-codegen/invokerIR.js +4 -5
- package/dist/src/lib/workflow-codegen/invokerIR.js.map +1 -1
- package/dist/src/lib/workflow-toml-validator.d.ts +2 -0
- package/dist/src/lib/workflow-toml-validator.js +28 -1
- package/dist/src/lib/workflow-toml-validator.js.map +1 -1
- package/package.json +3 -5
- package/dist/src/lib/generated-workflow-model-fields.d.ts +0 -20
- package/dist/src/lib/generated-workflow-model-fields.js +0 -53
- package/dist/src/lib/generated-workflow-model-fields.js.map +0 -1
- package/dist/src/lib/workflow-field-descriptor.d.ts +0 -91
- package/dist/src/lib/workflow-field-descriptor.js +0 -153
- package/dist/src/lib/workflow-field-descriptor.js.map +0 -1
|
@@ -1,54 +1,102 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `primitive settings` — the app-settings
|
|
3
|
-
* narrowed to a reader by #2645).
|
|
2
|
+
* `primitive settings` — the app-settings sync surface (issue #1033, Phase 2).
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
4
|
+
* A focused command for the app-settings TOML round-trip that `sync` handles as
|
|
5
|
+
* part of the whole-config export/import. `settings pull` / `push` / `diff`
|
|
6
|
+
* operate on the SAME `app.toml` and the SAME single `entities.app.contentHash`
|
|
7
|
+
* as `sync`, so the two are interchangeable and idempotent together. `settings
|
|
8
|
+
* show` renders the current server-effective settings (with `googleClientSecret`
|
|
9
|
+
* redacted).
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* were a second pathway to one piece of state; `sync pull|diff|push --only app`
|
|
14
|
-
* is the single one. The remaining command logic lives in
|
|
15
|
-
* `sync-app-settings.ts`, shared with `sync`.
|
|
11
|
+
* The command logic lives in `sync-app-settings.ts` so `sync` and `settings`
|
|
12
|
+
* share one implementation; this file only wires up the commander surface.
|
|
16
13
|
*/
|
|
17
14
|
import { ApiClient } from "../lib/api-client.js";
|
|
18
15
|
import { resolveAppId } from "../lib/config.js";
|
|
19
|
-
import {
|
|
16
|
+
import { resolveSyncDir, isAutoResolvedSyncDir, checkLegacySyncMigration, } from "../lib/sync-paths.js";
|
|
17
|
+
import { info, warn } from "../lib/output.js";
|
|
18
|
+
import { showAppSettings, pullAppSettings, pushAppSettings, diffAppSettings, } from "./sync-app-settings.js";
|
|
19
|
+
/**
|
|
20
|
+
* Resolve the sync directory and print the per-environment hint the way `sync`
|
|
21
|
+
* does (suppressed under `--json` so stdout stays pure JSON).
|
|
22
|
+
*/
|
|
23
|
+
function resolveConfigDir(appId, options) {
|
|
24
|
+
const configDir = resolveSyncDir({ appId, userDir: options.dir });
|
|
25
|
+
if (isAutoResolvedSyncDir(options.dir) && !options.json) {
|
|
26
|
+
info(`Using per-environment sync directory: ${configDir}`);
|
|
27
|
+
const legacyHint = checkLegacySyncMigration(configDir);
|
|
28
|
+
if (legacyHint)
|
|
29
|
+
warn(legacyHint);
|
|
30
|
+
}
|
|
31
|
+
return configDir;
|
|
32
|
+
}
|
|
20
33
|
export function registerSettingsCommands(program) {
|
|
21
34
|
const settings = program
|
|
22
35
|
.command("settings")
|
|
23
|
-
.description("View
|
|
36
|
+
.description("View and sync app settings through app.toml")
|
|
24
37
|
.addHelpText("after", `
|
|
25
38
|
Examples:
|
|
26
|
-
$ primitive settings
|
|
27
|
-
$ primitive settings
|
|
28
|
-
$ primitive
|
|
29
|
-
$ primitive
|
|
30
|
-
$ primitive
|
|
31
|
-
$ primitive sync push --only app # Apply app.toml edits to the server
|
|
39
|
+
$ primitive settings show # Render current server settings
|
|
40
|
+
$ primitive settings show --json # Machine-readable (secret redacted)
|
|
41
|
+
$ primitive settings pull # Write server settings to app.toml
|
|
42
|
+
$ primitive settings diff # Show local app.toml vs server
|
|
43
|
+
$ primitive settings push # Apply app.toml edits to the server
|
|
32
44
|
|
|
33
|
-
app.toml is the
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
client secret is an ordinary [auth] key holding a reference into the app's
|
|
37
|
-
secret store, never the secret itself: store the value with
|
|
38
|
-
'primitive secrets set GOOGLE_CLIENT_SECRET --value <secret>', then set
|
|
39
|
-
googleClientSecret = "{{secrets.GOOGLE_CLIENT_SECRET}}" in app.toml. A literal
|
|
40
|
-
secret there is rejected by the server.
|
|
45
|
+
app.toml is the primary way to manage app configuration. The Google OAuth
|
|
46
|
+
client secret is intentionally excluded from app.toml; set it with
|
|
47
|
+
'primitive apps update <app-id> --google-client-secret <secret>'.
|
|
41
48
|
`);
|
|
42
|
-
// settings
|
|
49
|
+
// settings show
|
|
43
50
|
settings
|
|
44
|
-
.command("
|
|
51
|
+
.command("show")
|
|
45
52
|
.description("Show the current server-effective app settings")
|
|
46
53
|
.argument("[app-id]", "App ID (uses current app if not specified)")
|
|
47
54
|
.option("--app <app-id>", "App ID")
|
|
48
|
-
.option("--json", "Output as JSON")
|
|
55
|
+
.option("--json", "Output as JSON (googleClientSecret redacted)")
|
|
49
56
|
.action(async (appId, options) => {
|
|
50
57
|
const resolvedAppId = resolveAppId(appId, options);
|
|
51
58
|
await showAppSettings(new ApiClient(), resolvedAppId, options);
|
|
52
59
|
});
|
|
60
|
+
// settings pull
|
|
61
|
+
settings
|
|
62
|
+
.command("pull")
|
|
63
|
+
.description("Write the current server settings to app.toml")
|
|
64
|
+
.argument("[app-id]", "App ID (uses current app if not specified)")
|
|
65
|
+
.option("--app <app-id>", "App ID")
|
|
66
|
+
.option("--dir <path>", "Config directory (overrides the auto-resolved per-env path)")
|
|
67
|
+
.option("--json", "Output as JSON")
|
|
68
|
+
.action(async (appId, options) => {
|
|
69
|
+
const resolvedAppId = resolveAppId(appId, options);
|
|
70
|
+
const configDir = resolveConfigDir(resolvedAppId, options);
|
|
71
|
+
await pullAppSettings(new ApiClient(), resolvedAppId, configDir, options);
|
|
72
|
+
});
|
|
73
|
+
// settings diff
|
|
74
|
+
settings
|
|
75
|
+
.command("diff")
|
|
76
|
+
.description("Show per-field differences between app.toml and the server")
|
|
77
|
+
.argument("[app-id]", "App ID (uses current app if not specified)")
|
|
78
|
+
.option("--app <app-id>", "App ID")
|
|
79
|
+
.option("--dir <path>", "Config directory (overrides the auto-resolved per-env path)")
|
|
80
|
+
.option("--json", "Output as JSON")
|
|
81
|
+
.action(async (appId, options) => {
|
|
82
|
+
const resolvedAppId = resolveAppId(appId, options);
|
|
83
|
+
const configDir = resolveConfigDir(resolvedAppId, options);
|
|
84
|
+
await diffAppSettings(new ApiClient(), resolvedAppId, configDir, options);
|
|
85
|
+
});
|
|
86
|
+
// settings push
|
|
87
|
+
settings
|
|
88
|
+
.command("push")
|
|
89
|
+
.description("Apply app.toml settings to the server")
|
|
90
|
+
.argument("[app-id]", "App ID (uses current app if not specified)")
|
|
91
|
+
.option("--app <app-id>", "App ID")
|
|
92
|
+
.option("--dir <path>", "Config directory (overrides the auto-resolved per-env path)")
|
|
93
|
+
.option("--force", "Push even if app.toml is unchanged since the last sync")
|
|
94
|
+
.option("--dry-run", "Show what would be changed without applying")
|
|
95
|
+
.option("--json", "Output as JSON")
|
|
96
|
+
.action(async (appId, options) => {
|
|
97
|
+
const resolvedAppId = resolveAppId(appId, options);
|
|
98
|
+
const configDir = resolveConfigDir(resolvedAppId, options);
|
|
99
|
+
await pushAppSettings(new ApiClient(), resolvedAppId, configDir, options);
|
|
100
|
+
});
|
|
53
101
|
}
|
|
54
102
|
//# sourceMappingURL=settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/commands/settings.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/commands/settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EACL,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,GAChB,MAAM,wBAAwB,CAAC;AAEhC;;;GAGG;AACH,SAAS,gBAAgB,CACvB,KAAa,EACb,OAAyC;IAEzC,MAAM,SAAS,GAAG,cAAc,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAClE,IAAI,qBAAqB,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACxD,IAAI,CAAC,yCAAyC,SAAS,EAAE,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,CAAC;QACnD,MAAM,SAAS,GAAG,gBAAgB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QAC3D,MAAM,eAAe,CAAC,IAAI,SAAS,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { ApiClient } from "../lib/api-client.js";
|
|
3
|
-
import { type OperationFormHints } from "../lib/toml-database-config.js";
|
|
4
|
-
import { type FieldForm } from "../lib/toml-native-form.js";
|
|
5
3
|
import { type PullWriteTally } from "../lib/pull-write.js";
|
|
6
4
|
import { type PushMode } from "../lib/config-payload.js";
|
|
7
5
|
import { type ConfigObjectSurface, type ConfigTable } from "../lib/generated-config-surfaces.js";
|
|
@@ -688,21 +686,14 @@ export declare function serializeBlobBucket(bucket: any, ruleSetIdToName?: Map<s
|
|
|
688
686
|
* `config push` builds its bodies from and `config diff` compares.
|
|
689
687
|
*
|
|
690
688
|
* Read in CREATE mode, so the immutable `ttlTier` stays nameable. The rule set
|
|
691
|
-
* is left as `_ruleSetName` for `resolveRuleSetReference
|
|
692
|
-
* `ruleSetId`
|
|
693
|
-
*
|
|
689
|
+
* is left as `_ruleSetName` for `resolveRuleSetReference`. The id spelling
|
|
690
|
+
* `ruleSetId` is a retired key (#4283): the preflight refuses a file carrying
|
|
691
|
+
* it, and this parse never reads it.
|
|
694
692
|
*
|
|
695
693
|
* An omitted `name` stays omitted: the update leaves the server's name alone,
|
|
696
694
|
* and only the create body falls back to the key.
|
|
697
695
|
*/
|
|
698
696
|
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[];
|
|
706
697
|
/**
|
|
707
698
|
* Build the PATCH payload for a blob-bucket update from local TOML.
|
|
708
699
|
*
|
|
@@ -767,23 +758,26 @@ export declare function promptConfigPayload(tomlConfig: any, options?: {
|
|
|
767
758
|
export declare function buildBlobBucketCreatePayload(key: string, bucket: any): Record<string, any>;
|
|
768
759
|
export declare function serializePrompt(prompt: any, logger?: (message: string) => void): string;
|
|
769
760
|
/**
|
|
770
|
-
* The `config push` warning for a
|
|
761
|
+
* The `config push` warning for a caller workflow pushed with no `accessRule`
|
|
762
|
+
* (#2652).
|
|
771
763
|
*
|
|
772
764
|
* Returns `null` when a rule is declared — and for a `runAs = "system"`
|
|
773
765
|
* workflow, which rejects any rule and cannot be started by a member at all.
|
|
774
|
-
* Otherwise it names the
|
|
775
|
-
* because after the #2652 flip a ruleless
|
|
776
|
-
*
|
|
766
|
+
* Otherwise it names the workflow, the consequence, and the one-line restore,
|
|
767
|
+
* because after the #2652 flip a ruleless caller workflow denies every
|
|
768
|
+
* non-admin caller from the deploy onward.
|
|
769
|
+
*
|
|
770
|
+
* A prompt gets no warning (#4368): a server function runs it on its
|
|
771
|
+
* `prompt:<key>` grant, which never consults the rule, so a ruleless prompt is
|
|
772
|
+
* the ordinary case, not a lockout.
|
|
777
773
|
*
|
|
778
|
-
*
|
|
779
|
-
*
|
|
780
|
-
*
|
|
781
|
-
*
|
|
782
|
-
*
|
|
783
|
-
* caveat needs to see it retracted.
|
|
774
|
+
* The workflow pushes `accessRule` as value-or-`null` since #2743's
|
|
775
|
+
* always-send conversion, so an omitted key really does leave it ruleless on
|
|
776
|
+
* the server. The wording says so explicitly, because it used to say the
|
|
777
|
+
* opposite (the update path preserved a stored rule) and an operator who
|
|
778
|
+
* learned that caveat needs to see it retracted.
|
|
784
779
|
*/
|
|
785
780
|
export declare function missingAccessRuleWarning(opts: {
|
|
786
|
-
kind: "prompt" | "workflow";
|
|
787
781
|
key: string;
|
|
788
782
|
accessRule: unknown;
|
|
789
783
|
runAs?: unknown;
|
|
@@ -1020,10 +1014,28 @@ export declare function partitionPromptFilesForPush(promptsDir: string, files: r
|
|
|
1020
1014
|
afterFunctions: string[];
|
|
1021
1015
|
};
|
|
1022
1016
|
/**
|
|
1023
|
-
*
|
|
1024
|
-
*
|
|
1025
|
-
*
|
|
1026
|
-
*
|
|
1017
|
+
* The deferred agent files `config push` can still apply — #4437. An agent
|
|
1018
|
+
* that names a function this push failed to apply, and that the server does
|
|
1019
|
+
* not already hold, would only be refused as naming a function the app does
|
|
1020
|
+
* not have. It is held back instead, with a failure that names the function as
|
|
1021
|
+
* the cause; the function's own failure row says why. A file that does not
|
|
1022
|
+
* parse is left for the prompt leg to report.
|
|
1023
|
+
*/
|
|
1024
|
+
export declare function holdAgentPromptFilesForUnappliedFunctions(promptsDir: string, files: readonly string[], unappliedFunctionKeys: ReadonlySet<string>): {
|
|
1025
|
+
apply: string[];
|
|
1026
|
+
held: Array<{
|
|
1027
|
+
key: string;
|
|
1028
|
+
message: string;
|
|
1029
|
+
}>;
|
|
1030
|
+
};
|
|
1031
|
+
/**
|
|
1032
|
+
* Every `prompts/<key>.tests/*.toml` sidecar the agent test case's rule
|
|
1033
|
+
* refuses — #4262 (#3798 refused every sidecar on an agent). An agent's case
|
|
1034
|
+
* is checked by the vendored shape rule (`resolveAgentTestCase`), which the
|
|
1035
|
+
* admin routes run too; a `[test.agent]` block on a chat or decisions
|
|
1036
|
+
* prompt's case is refused by name. One line per file, naming it. What needs
|
|
1037
|
+
* the app (the input, context and event schemas, the declared names) is the
|
|
1038
|
+
* routes' to decide at apply.
|
|
1027
1039
|
*/
|
|
1028
1040
|
export declare function promptAgentSidecarErrors(configDir: string): string[];
|
|
1029
1041
|
/**
|
|
@@ -1062,10 +1074,8 @@ export declare function promptKindImmutableOutcome(storedKind: PromptKind | unde
|
|
|
1062
1074
|
export declare function configFileValidationMessages(filePath: string, tomlData: any, surface: ConfigObjectSurface, tables: readonly ConfigTable[]): string[];
|
|
1063
1075
|
/**
|
|
1064
1076
|
* Whether `config pull` must rewrite a local file whatever it says (#4160):
|
|
1065
|
-
* `config push` would refuse it
|
|
1066
|
-
*
|
|
1067
|
-
* file because its VALUES match would leave the tree unpushable, or the
|
|
1068
|
-
* deprecation unresolved, after a pull that reported success.
|
|
1077
|
+
* `config push` would refuse it. Keeping such a file because its VALUES match
|
|
1078
|
+
* would leave the tree unpushable after a pull that reported success.
|
|
1069
1079
|
*/
|
|
1070
1080
|
export declare function pullMustRewrite(label: string, tomlData: any): boolean;
|
|
1071
1081
|
export declare function collectConfigFileValidationErrors(configDir: string): ConfigFileValidationError[];
|
|
@@ -1086,17 +1096,6 @@ export declare function collectConfigFileValidationErrors(configDir: string): Co
|
|
|
1086
1096
|
* the parse error itself, and reporting it twice helps nobody.
|
|
1087
1097
|
*/
|
|
1088
1098
|
export declare function collectFunctionTomlValidationErrors(configDir: string): ConfigFileValidationError[];
|
|
1089
|
-
/**
|
|
1090
|
-
* The retired runtime keys every `functions/*.toml` in the tree still carries
|
|
1091
|
-
* — #3482, the warning half of the collector above.
|
|
1092
|
-
*
|
|
1093
|
-
* Separate from the errors because it IS separate: a file carrying one of
|
|
1094
|
-
* these pushes, with every other key applied, so it is not a row `config diff`
|
|
1095
|
-
* calls invalid. It is a line an author reads on stderr from both commands, so
|
|
1096
|
-
* the two keep reading identically (the #2880 symmetry the errors collector
|
|
1097
|
-
* exists for, applied to advice rather than refusals).
|
|
1098
|
-
*/
|
|
1099
|
-
export declare function collectFunctionTomlIgnoredKeyWarnings(configDir: string): string[];
|
|
1100
1099
|
/**
|
|
1101
1100
|
* The collectors' rows, one per diff row (#2880 symmetry, #3320).
|
|
1102
1101
|
*
|
|
@@ -1193,15 +1192,9 @@ export declare function workflowPushSendsUpdate(configDir: string, key: string,
|
|
|
1193
1192
|
export declare function documentSchemaPreflightError(resolution: DocumentSchemaResolution): string | null;
|
|
1194
1193
|
export declare function workflowUpdateNameError(filePath: string, workflow: any): string | null;
|
|
1195
1194
|
export declare function serializeWorkflow(workflow: any, draft: any, configs: any[], logger?: (message: string) => void): string;
|
|
1196
|
-
export declare function serializeDatabaseType(typeConfig: any,
|
|
1197
|
-
/**
|
|
1198
|
-
hints?: OperationFormHints;
|
|
1199
|
-
/** Default form for ops with no hint. New files → "native". */
|
|
1200
|
-
defaultForm?: FieldForm;
|
|
1201
|
-
/** Sink for human-readable fallback messages (logged via `info`). */
|
|
1195
|
+
export declare function serializeDatabaseType(typeConfig: any, ruleSetIdToName: Map<string, string>, options?: {
|
|
1196
|
+
/** Sink for human-readable messages (logged via `info`). */
|
|
1202
1197
|
logger?: (message: string) => void;
|
|
1203
|
-
/** Server subscription rows to emit as `[[subscriptions]]` (issue #803). */
|
|
1204
|
-
subscriptions?: any[];
|
|
1205
1198
|
}): string;
|
|
1206
1199
|
/**
|
|
1207
1200
|
* Flatten an email-template detail response onto its field surface.
|
|
@@ -1308,46 +1301,8 @@ export declare function buildOwnedScalarUpdate(typeConfig: any): Record<string,
|
|
|
1308
1301
|
* GET; without it (fresh type or a failed fetch) nothing is reported cleared.
|
|
1309
1302
|
*/
|
|
1310
1303
|
export declare function ownedScalarsBeingCleared(updateData: Record<string, any>, serverConfig: any): string[];
|
|
1311
|
-
/** The look-ahead a type-config PATCH carries about this push's operations. */
|
|
1312
|
-
export interface PendingOpClaims {
|
|
1313
|
-
pendingOpDeletes: string[];
|
|
1314
|
-
finalOpNames: string[];
|
|
1315
|
-
pendingOpUpdates: Array<{
|
|
1316
|
-
name: string;
|
|
1317
|
-
access: string | null;
|
|
1318
|
-
params: any;
|
|
1319
|
-
}>;
|
|
1320
|
-
pendingOpUpserts: Array<Record<string, any>>;
|
|
1321
|
-
}
|
|
1322
|
-
/**
|
|
1323
|
-
* What this push's operation set will BE, stated to the server (issues #813,
|
|
1324
|
-
* #1336, #2732).
|
|
1325
|
-
*
|
|
1326
|
-
* The type-config PATCH runs its gates BEFORE the same push's operation calls,
|
|
1327
|
-
* so without a look-ahead every gate judges the pre-push operations: a push
|
|
1328
|
-
* that removes a model is blocked by the very references it is deleting. The
|
|
1329
|
-
* file IS the target state (config-as-code), so the claims are derived from it:
|
|
1330
|
-
*
|
|
1331
|
-
* - `finalOpNames` — the names the type ends with. Both other claims are
|
|
1332
|
-
* verified against it server-side, which is what keeps them from being a
|
|
1333
|
-
* gate bypass for a direct-API caller.
|
|
1334
|
-
* - `pendingOpDeletes` — its complement among the ops last sync recorded, so
|
|
1335
|
-
* an op this push deletes is excluded from the schema / OPS_EXIST gates.
|
|
1336
|
-
* - `pendingOpUpserts` — the post-push BODY of every declared op, so the
|
|
1337
|
-
* schema-edit gate lints a rewritten op as rewritten and a model removal
|
|
1338
|
-
* plus its operation rewrites lands in one push (#2732).
|
|
1339
|
-
* - `pendingOpUpdates` — the rule-only form (`access`/`params`) the manifest
|
|
1340
|
-
* re-lint reads (#1336).
|
|
1341
|
-
*
|
|
1342
|
-
* All four are built here and sent together, on the dry-run and on the real
|
|
1343
|
-
* PATCH alike. They are never conditioned on the push having a deletion: a push
|
|
1344
|
-
* that only REWRITES operations is exactly the case #2732 exists for.
|
|
1345
|
-
*/
|
|
1346
|
-
export declare function buildPendingOpClaims(operations: any[], existingOpNames: string[]): PendingOpClaims;
|
|
1347
1304
|
export declare function parseDatabaseTypeToml(tomlData: any): {
|
|
1348
1305
|
typeConfig: any;
|
|
1349
|
-
operations: any[];
|
|
1350
|
-
subscriptions: any[];
|
|
1351
1306
|
};
|
|
1352
1307
|
/**
|
|
1353
1308
|
* The parsed shape of a rule-set TOML: the definition's fields plus the
|
|
@@ -1843,28 +1798,6 @@ export declare function resolveExistingId(input: {
|
|
|
1843
1798
|
liveId?: string;
|
|
1844
1799
|
manifestId?: string;
|
|
1845
1800
|
}): string | undefined;
|
|
1846
|
-
/**
|
|
1847
|
-
* Which CHILD rows a database type's push reconciles against (#2731 B3).
|
|
1848
|
-
*
|
|
1849
|
-
* `resolveExistingId` answers this for a whole entity; a database type's
|
|
1850
|
-
* operations and subscriptions are rows with the same question and the same
|
|
1851
|
-
* two possible answers. The manifest can name an operation the server no
|
|
1852
|
-
* longer has (the update PUTs a row that is gone) and be silent about one it
|
|
1853
|
-
* does have (the create POSTs a duplicate key) — both abort the push with a
|
|
1854
|
-
* server error, which is exactly the recovery `--force` is supposed to
|
|
1855
|
-
* perform.
|
|
1856
|
-
*
|
|
1857
|
-
* When the reconcile read the rows, they ARE the baseline: existence, the
|
|
1858
|
-
* timestamp each update guards with, and — as the complement of the file's own
|
|
1859
|
-
* list — which rows this push deletes. `undefined` means the read did not
|
|
1860
|
-
* happen (the degraded path, or a type live state says is absent), and the
|
|
1861
|
-
* manifest stays what it has always been.
|
|
1862
|
-
*/
|
|
1863
|
-
export declare function liveChildBaseline(live: Map<string, any> | undefined, manifestChildren?: Record<string, {
|
|
1864
|
-
modifiedAt: string;
|
|
1865
|
-
}>): Record<string, {
|
|
1866
|
-
modifiedAt: string;
|
|
1867
|
-
}> | undefined;
|
|
1868
1801
|
/**
|
|
1869
1802
|
* The app's live rule sets, indexed the three ways push reads them (#2731 B3).
|
|
1870
1803
|
*
|