primitive-admin 1.2.0-alpha.14 → 1.2.0-alpha.15
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 +102 -78
- package/assets/skill/skills/primitive-platform/SKILL.md +87 -23
- package/dist/bin/primitive.js +11 -82
- package/dist/bin/primitive.js.map +1 -1
- package/dist/src/commands/admins.js +79 -17
- package/dist/src/commands/admins.js.map +1 -1
- package/dist/src/commands/agent-sessions.js +2 -0
- package/dist/src/commands/agent-sessions.js.map +1 -1
- package/dist/src/commands/analytics.js +183 -12
- package/dist/src/commands/analytics.js.map +1 -1
- package/dist/src/commands/apps-children.js +2 -0
- package/dist/src/commands/apps-children.js.map +1 -1
- package/dist/src/commands/apps.js +19 -2
- package/dist/src/commands/apps.js.map +1 -1
- package/dist/src/commands/auth.js +11 -1
- package/dist/src/commands/auth.js.map +1 -1
- package/dist/src/commands/collections.js +13 -0
- package/dist/src/commands/collections.js.map +1 -1
- package/dist/src/commands/config.d.ts +1 -1
- package/dist/src/commands/config.js +40 -9
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/connections.js +2 -0
- package/dist/src/commands/connections.js.map +1 -1
- package/dist/src/commands/database-type-configs.js +5 -3
- package/dist/src/commands/database-type-configs.js.map +1 -1
- package/dist/src/commands/databases.js +6 -4
- package/dist/src/commands/databases.js.map +1 -1
- package/dist/src/commands/db3-types.js +2 -0
- package/dist/src/commands/db3-types.js.map +1 -1
- package/dist/src/commands/db3.d.ts +12 -0
- package/dist/src/commands/db3.js +343 -24
- package/dist/src/commands/db3.js.map +1 -1
- package/dist/src/commands/documents.d.ts +52 -12
- package/dist/src/commands/documents.js +120 -29
- package/dist/src/commands/documents.js.map +1 -1
- package/dist/src/commands/email-templates.js +72 -0
- package/dist/src/commands/email-templates.js.map +1 -1
- package/dist/src/commands/functions.js +47 -10
- package/dist/src/commands/functions.js.map +1 -1
- package/dist/src/commands/groups.js +18 -3
- package/dist/src/commands/groups.js.map +1 -1
- package/dist/src/commands/init.js +7 -1
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/integrations.js +80 -47
- package/dist/src/commands/integrations.js.map +1 -1
- package/dist/src/commands/metadata-category-configs.js +2 -0
- package/dist/src/commands/metadata-category-configs.js.map +1 -1
- package/dist/src/commands/metadata.js +41 -0
- package/dist/src/commands/metadata.js.map +1 -1
- package/dist/src/commands/prompts.js +73 -47
- package/dist/src/commands/prompts.js.map +1 -1
- package/dist/src/commands/rule-sets.js +2 -0
- package/dist/src/commands/rule-sets.js.map +1 -1
- package/dist/src/commands/schemas.d.ts +15 -0
- package/dist/src/commands/schemas.js +122 -0
- package/dist/src/commands/schemas.js.map +1 -0
- package/dist/src/commands/secrets.js +45 -3
- package/dist/src/commands/secrets.js.map +1 -1
- package/dist/src/commands/sessions.js +2 -0
- package/dist/src/commands/sessions.js.map +1 -1
- package/dist/src/commands/sync-schemas.d.ts +202 -0
- package/dist/src/commands/sync-schemas.js +629 -0
- package/dist/src/commands/sync-schemas.js.map +1 -0
- package/dist/src/commands/sync-user-properties.d.ts +118 -0
- package/dist/src/commands/sync-user-properties.js +276 -0
- package/dist/src/commands/sync-user-properties.js.map +1 -0
- package/dist/src/commands/sync.d.ts +243 -12
- package/dist/src/commands/sync.js +1474 -314
- package/dist/src/commands/sync.js.map +1 -1
- package/dist/src/commands/user-properties.d.ts +14 -0
- package/dist/src/commands/user-properties.js +79 -0
- package/dist/src/commands/user-properties.js.map +1 -0
- package/dist/src/commands/users.js +879 -16
- package/dist/src/commands/users.js.map +1 -1
- package/dist/src/commands/waitlist.js +39 -4
- package/dist/src/commands/waitlist.js.map +1 -1
- package/dist/src/lib/analytics-query.d.ts +58 -0
- package/dist/src/lib/analytics-query.js +134 -0
- package/dist/src/lib/analytics-query.js.map +1 -0
- package/dist/src/lib/api-client.d.ts +748 -95
- package/dist/src/lib/api-client.js +356 -158
- package/dist/src/lib/api-client.js.map +1 -1
- package/dist/src/lib/block-selector.d.ts +9 -15
- package/dist/src/lib/block-selector.js +9 -20
- package/dist/src/lib/block-selector.js.map +1 -1
- package/dist/src/lib/cli-manifest.d.ts +8 -0
- package/dist/src/lib/cli-manifest.js +10 -1
- package/dist/src/lib/cli-manifest.js.map +1 -1
- package/dist/src/lib/cli-version.d.ts +14 -0
- package/dist/src/lib/cli-version.js +38 -0
- package/dist/src/lib/cli-version.js.map +1 -0
- package/dist/src/lib/codegen-shared/prettierStable.d.ts +41 -0
- package/dist/src/lib/codegen-shared/prettierStable.js +146 -24
- package/dist/src/lib/codegen-shared/prettierStable.js.map +1 -1
- package/dist/src/lib/command-status.d.ts +110 -0
- package/dist/src/lib/command-status.js +184 -0
- package/dist/src/lib/command-status.js.map +1 -0
- package/dist/src/lib/config-object-descriptor.d.ts +6 -0
- package/dist/src/lib/config-object-descriptor.js +71 -0
- package/dist/src/lib/config-object-descriptor.js.map +1 -1
- package/dist/src/lib/config-toml.d.ts +11 -2
- package/dist/src/lib/config-toml.js +25 -2
- package/dist/src/lib/config-toml.js.map +1 -1
- package/dist/src/lib/data-input.d.ts +1 -1
- package/dist/src/lib/data-input.js +1 -1
- package/dist/src/lib/db-codegen/dbTsTypes.d.ts +1 -1
- package/dist/src/lib/db-codegen/dbTsTypes.js +3 -0
- package/dist/src/lib/db-codegen/dbTsTypes.js.map +1 -1
- package/dist/src/lib/db-codegen/dbTypeIR.d.ts +11 -1
- package/dist/src/lib/db-codegen/dbTypeIR.js +11 -5
- package/dist/src/lib/db-codegen/dbTypeIR.js.map +1 -1
- package/dist/src/lib/db-type-records.d.ts +95 -0
- package/dist/src/lib/db-type-records.js +219 -0
- package/dist/src/lib/db-type-records.js.map +1 -0
- package/dist/src/lib/db3-export.d.ts +51 -14
- package/dist/src/lib/db3-export.js +135 -27
- package/dist/src/lib/db3-export.js.map +1 -1
- package/dist/src/lib/db3-index-output.d.ts +68 -3
- package/dist/src/lib/db3-index-output.js +139 -3
- package/dist/src/lib/db3-index-output.js.map +1 -1
- package/dist/src/lib/db3-type-models.d.ts +39 -7
- package/dist/src/lib/db3-type-models.js +138 -27
- package/dist/src/lib/db3-type-models.js.map +1 -1
- package/dist/src/lib/deprecation.d.ts +2 -2
- package/dist/src/lib/deprecation.js +2 -2
- package/dist/src/lib/experimental-apis.d.ts +36 -0
- package/dist/src/lib/experimental-apis.js +46 -0
- package/dist/src/lib/experimental-apis.js.map +1 -0
- package/dist/src/lib/file-attachment.d.ts +24 -0
- package/dist/src/lib/file-attachment.js +31 -0
- package/dist/src/lib/file-attachment.js.map +1 -0
- package/dist/src/lib/function-authorize-check.d.ts +1 -1
- package/dist/src/lib/function-authorize-check.js +2 -1
- package/dist/src/lib/function-authorize-check.js.map +1 -1
- package/dist/src/lib/function-authorize-view.js +4 -0
- package/dist/src/lib/function-authorize-view.js.map +1 -1
- package/dist/src/lib/function-bundle.d.ts +27 -5
- package/dist/src/lib/function-bundle.js +106 -7
- package/dist/src/lib/function-bundle.js.map +1 -1
- package/dist/src/lib/function-collect.d.ts +2 -0
- package/dist/src/lib/function-collect.js +36 -7
- package/dist/src/lib/function-collect.js.map +1 -1
- package/dist/src/lib/function-db-types.d.ts +57 -40
- package/dist/src/lib/function-db-types.js +246 -285
- package/dist/src/lib/function-db-types.js.map +1 -1
- package/dist/src/lib/function-document-types.d.ts +19 -7
- package/dist/src/lib/function-document-types.js +24 -12
- package/dist/src/lib/function-document-types.js.map +1 -1
- package/dist/src/lib/function-run.d.ts +1 -1
- package/dist/src/lib/function-run.js +1 -1
- package/dist/src/lib/function-run.js.map +1 -1
- package/dist/src/lib/function-schema-codegen.d.ts +58 -18
- package/dist/src/lib/function-schema-codegen.js +85 -74
- package/dist/src/lib/function-schema-codegen.js.map +1 -1
- package/dist/src/lib/function-schema-refs.d.ts +98 -0
- package/dist/src/lib/function-schema-refs.js +177 -0
- package/dist/src/lib/function-schema-refs.js.map +1 -0
- package/dist/src/lib/function-sync.d.ts +38 -4
- package/dist/src/lib/function-sync.js +83 -14
- package/dist/src/lib/function-sync.js.map +1 -1
- package/dist/src/lib/function-typecheck.d.ts +52 -0
- package/dist/src/lib/function-typecheck.js +171 -54
- package/dist/src/lib/function-typecheck.js.map +1 -1
- package/dist/src/lib/generated-build-flags.d.ts +13 -0
- package/dist/src/lib/generated-build-flags.js +14 -0
- package/dist/src/lib/generated-build-flags.js.map +1 -0
- package/dist/src/lib/generated-config-surfaces.d.ts +211 -11
- package/dist/src/lib/generated-config-surfaces.js +579 -69
- 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/integration-test-request.d.ts +54 -0
- package/dist/src/lib/integration-test-request.js +207 -0
- package/dist/src/lib/integration-test-request.js.map +1 -0
- package/dist/src/lib/metadata-report.d.ts +85 -0
- package/dist/src/lib/metadata-report.js +81 -0
- package/dist/src/lib/metadata-report.js.map +1 -0
- package/dist/src/lib/output.d.ts +1 -1
- package/dist/src/lib/output.js +1 -1
- package/dist/src/lib/platform-owned.js +5 -0
- package/dist/src/lib/platform-owned.js.map +1 -1
- package/dist/src/lib/primitive-declaration-names.d.ts +21 -0
- package/dist/src/lib/primitive-declaration-names.js +22 -0
- package/dist/src/lib/primitive-declaration-names.js.map +1 -0
- package/dist/src/lib/primitive-declaration.d.ts +143 -0
- package/dist/src/lib/primitive-declaration.js +658 -0
- package/dist/src/lib/primitive-declaration.js.map +1 -0
- package/dist/src/lib/prompt-schema-codegen.d.ts +36 -12
- package/dist/src/lib/prompt-schema-codegen.js +82 -98
- package/dist/src/lib/prompt-schema-codegen.js.map +1 -1
- package/dist/src/lib/prompt-schema-document.d.ts +35 -0
- package/dist/src/lib/prompt-schema-document.js +92 -0
- package/dist/src/lib/prompt-schema-document.js.map +1 -0
- package/dist/src/lib/prompt-schema-refs.d.ts +164 -0
- package/dist/src/lib/prompt-schema-refs.js +452 -0
- package/dist/src/lib/prompt-schema-refs.js.map +1 -0
- package/dist/src/lib/records-verbs.d.ts +12 -2
- package/dist/src/lib/records-verbs.js +7 -2
- package/dist/src/lib/records-verbs.js.map +1 -1
- package/dist/src/lib/register-commands.d.ts +28 -0
- package/dist/src/lib/register-commands.js +101 -0
- package/dist/src/lib/register-commands.js.map +1 -0
- package/dist/src/lib/retired-imports.d.ts +53 -0
- package/dist/src/lib/retired-imports.js +120 -0
- package/dist/src/lib/retired-imports.js.map +1 -0
- package/dist/src/lib/schema-codegen/compiledSpace.d.ts +62 -0
- package/dist/src/lib/schema-codegen/compiledSpace.js +103 -0
- package/dist/src/lib/schema-codegen/compiledSpace.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-db3-bridge.d.ts +86 -0
- package/dist/src/lib/schema-codegen/generated-db3-bridge.js +221 -0
- package/dist/src/lib/schema-codegen/generated-db3-bridge.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.d.ts +85 -0
- package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js +86 -0
- package/dist/src/lib/schema-codegen/generated-db3-query-capabilities.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-field-grammar.d.ts +209 -0
- package/dist/src/lib/schema-codegen/generated-field-grammar.js +379 -0
- package/dist/src/lib/schema-codegen/generated-field-grammar.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-field-table.d.ts +80 -0
- package/dist/src/lib/schema-codegen/generated-field-table.js +542 -0
- package/dist/src/lib/schema-codegen/generated-field-table.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-prompt-schemas.d.ts +195 -0
- package/dist/src/lib/schema-codegen/generated-prompt-schemas.js +503 -0
- package/dist/src/lib/schema-codegen/generated-prompt-schemas.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-descriptor.d.ts +129 -0
- package/dist/src/lib/schema-codegen/generated-schema-descriptor.js +154 -1
- package/dist/src/lib/schema-codegen/generated-schema-descriptor.js.map +1 -1
- package/dist/src/lib/schema-codegen/generated-schema-file.d.ts +129 -0
- package/dist/src/lib/schema-codegen/generated-schema-file.js +475 -0
- package/dist/src/lib/schema-codegen/generated-schema-file.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-provenance.d.ts +115 -0
- package/dist/src/lib/schema-codegen/generated-schema-provenance.js +274 -0
- package/dist/src/lib/schema-codegen/generated-schema-provenance.js.map +1 -0
- package/dist/src/lib/schema-codegen/generated-schema-refs.d.ts +366 -0
- package/dist/src/lib/schema-codegen/generated-schema-refs.js +1789 -0
- package/dist/src/lib/schema-codegen/generated-schema-refs.js.map +1 -0
- package/dist/src/lib/schema-codegen/namedRefs.d.ts +56 -0
- package/dist/src/lib/schema-codegen/namedRefs.js +143 -0
- package/dist/src/lib/schema-codegen/namedRefs.js.map +1 -0
- package/dist/src/lib/schema-codegen/schemaChanges.d.ts +74 -0
- package/dist/src/lib/schema-codegen/schemaChanges.js +277 -0
- package/dist/src/lib/schema-codegen/schemaChanges.js.map +1 -0
- package/dist/src/lib/schema-codegen/schemaDocs.d.ts +69 -0
- package/dist/src/lib/schema-codegen/schemaDocs.js +219 -0
- package/dist/src/lib/schema-codegen/schemaDocs.js.map +1 -0
- package/dist/src/lib/schema-codegen/schemaIR.d.ts +158 -0
- package/dist/src/lib/schema-codegen/schemaIR.js +279 -0
- package/dist/src/lib/schema-codegen/schemaIR.js.map +1 -0
- package/dist/src/lib/schema-codegen/schemaToTs.d.ts +40 -13
- package/dist/src/lib/schema-codegen/schemaToTs.js +124 -160
- package/dist/src/lib/schema-codegen/schemaToTs.js.map +1 -1
- package/dist/src/lib/schema-codegen/valuesLists.d.ts +35 -0
- package/dist/src/lib/schema-codegen/valuesLists.js +128 -0
- package/dist/src/lib/schema-codegen/valuesLists.js.map +1 -0
- package/dist/src/lib/schema-family-index.d.ts +228 -0
- package/dist/src/lib/schema-family-index.js +813 -0
- package/dist/src/lib/schema-family-index.js.map +1 -0
- package/dist/src/lib/schema-pins.d.ts +82 -0
- package/dist/src/lib/schema-pins.js +198 -0
- package/dist/src/lib/schema-pins.js.map +1 -0
- package/dist/src/lib/schema-preview.d.ts +244 -0
- package/dist/src/lib/schema-preview.js +498 -0
- package/dist/src/lib/schema-preview.js.map +1 -0
- package/dist/src/lib/skill-installer.d.ts +2 -2
- package/dist/src/lib/skill-installer.js +2 -21
- package/dist/src/lib/skill-installer.js.map +1 -1
- package/dist/src/lib/step-run-table.d.ts +1 -2
- package/dist/src/lib/step-run-table.js +1 -2
- package/dist/src/lib/step-run-table.js.map +1 -1
- package/dist/src/lib/swift-codegen/agentGenerator.d.ts +2 -1
- package/dist/src/lib/swift-codegen/agentGenerator.js +24 -22
- package/dist/src/lib/swift-codegen/agentGenerator.js.map +1 -1
- package/dist/src/lib/swift-codegen/banners.d.ts +12 -0
- package/dist/src/lib/swift-codegen/banners.js +12 -0
- package/dist/src/lib/swift-codegen/banners.js.map +1 -1
- package/dist/src/lib/swift-codegen/functionGenerator.d.ts +36 -1
- package/dist/src/lib/swift-codegen/functionGenerator.js +167 -50
- package/dist/src/lib/swift-codegen/functionGenerator.js.map +1 -1
- package/dist/src/lib/swift-codegen/schemaToSwift.d.ts +31 -7
- package/dist/src/lib/swift-codegen/schemaToSwift.js +213 -177
- package/dist/src/lib/swift-codegen/schemaToSwift.js.map +1 -1
- package/dist/src/lib/swift-codegen/sharedGenerator.d.ts +45 -0
- package/dist/src/lib/swift-codegen/sharedGenerator.js +120 -0
- package/dist/src/lib/swift-codegen/sharedGenerator.js.map +1 -0
- package/dist/src/lib/swift-codegen/userPropertiesGenerator.d.ts +30 -0
- package/dist/src/lib/swift-codegen/userPropertiesGenerator.js +69 -0
- package/dist/src/lib/swift-codegen/userPropertiesGenerator.js.map +1 -0
- package/dist/src/lib/sync-resource-types.d.ts +37 -5
- package/dist/src/lib/sync-resource-types.js +53 -5
- package/dist/src/lib/sync-resource-types.js.map +1 -1
- package/dist/src/lib/sync-selectors.d.ts +7 -0
- package/dist/src/lib/sync-selectors.js +22 -2
- package/dist/src/lib/sync-selectors.js.map +1 -1
- package/dist/src/lib/test-runs.d.ts +45 -0
- package/dist/src/lib/test-runs.js +150 -0
- package/dist/src/lib/test-runs.js.map +1 -0
- package/dist/src/lib/toml-database-config.d.ts +2 -1
- package/dist/src/lib/toml-database-config.js +4 -3
- package/dist/src/lib/toml-database-config.js.map +1 -1
- package/dist/src/lib/toml-scalar-edit.js +6 -4
- package/dist/src/lib/toml-scalar-edit.js.map +1 -1
- package/dist/src/lib/user-index.d.ts +80 -0
- package/dist/src/lib/user-index.js +166 -0
- package/dist/src/lib/user-index.js.map +1 -0
- package/dist/src/lib/user-properties/generated-properties-schema.d.ts +159 -0
- package/dist/src/lib/user-properties/generated-properties-schema.js +471 -0
- package/dist/src/lib/user-properties/generated-properties-schema.js.map +1 -0
- package/dist/src/lib/user-properties/user-properties-codegen.d.ts +55 -0
- package/dist/src/lib/user-properties/user-properties-codegen.js +129 -0
- package/dist/src/lib/user-properties/user-properties-codegen.js.map +1 -0
- package/dist/src/lib/user-walk.d.ts +31 -0
- package/dist/src/lib/user-walk.js +102 -0
- package/dist/src/lib/user-walk.js.map +1 -0
- package/dist/src/lib/worker-perf-format.d.ts +22 -0
- package/dist/src/lib/worker-perf-format.js +27 -0
- package/dist/src/lib/worker-perf-format.js.map +1 -0
- package/dist/src/types/index.d.ts +13 -34
- package/package.json +5 -3
|
@@ -6,8 +6,9 @@ import { type ConfigObjectSurface, type ConfigTable } from "../lib/generated-con
|
|
|
6
6
|
import { type PromptKind } from "../lib/generated-config-surfaces.js";
|
|
7
7
|
import { type AgentFunctionFact, type AgentFunctionFacts } from "../lib/generated-config-surfaces.js";
|
|
8
8
|
import { type AgentSchemaConfigFact } from "../lib/generated-config-surfaces.js";
|
|
9
|
+
import { type PromptConfigSchemaPayload, type PromptPushDependencies, type PromptSchemaPayload } from "../lib/prompt-schema-refs.js";
|
|
9
10
|
import { type DocumentSchemaResolution } from "../lib/function-document-types.js";
|
|
10
|
-
import { type PresenceOutcome, type TestBlockType } from "../lib/sync-resource-types.js";
|
|
11
|
+
import { type PushPrunePlanItem, type PresenceOutcome, type TestBlockType } from "../lib/sync-resource-types.js";
|
|
11
12
|
export { resolveSlugCollisions, slugifyTestCaseName, testCaseFileBasenames, } from "../lib/test-case-file-names.js";
|
|
12
13
|
import type { SyncState } from "../types/index.js";
|
|
13
14
|
import { type SyncSelection } from "../lib/sync-selectors.js";
|
|
@@ -466,16 +467,83 @@ export declare function promptConfigPayload(tomlConfig: any, options?: {
|
|
|
466
467
|
* so (`writableOn: ["create"]`) — the retention tier is fixed at creation.
|
|
467
468
|
*/
|
|
468
469
|
export declare function buildBlobBucketCreatePayload(key: string, bucket: any): Record<string, any>;
|
|
469
|
-
export declare function serializePrompt(prompt: any, logger?: (message: string) => void
|
|
470
|
+
export declare function serializePrompt(prompt: any, logger?: (message: string) => void, options?: {
|
|
471
|
+
/**
|
|
472
|
+
* #5249 — the app's prompt ids by key, through which the stored
|
|
473
|
+
* `defaultEvaluatorPromptId` is written as `defaultEvaluatorPromptKey`.
|
|
474
|
+
*/
|
|
475
|
+
promptIdToKey?: ReadonlyMap<string, string>;
|
|
476
|
+
/**
|
|
477
|
+
* An id the map cannot name: left out of the file (`"omit"`, the default,
|
|
478
|
+
* reported through `onUnresolved`), or written as the id itself
|
|
479
|
+
* (`"raw-id"`), which is how the comparison keeps a dangling link a
|
|
480
|
+
* difference rather than hiding it.
|
|
481
|
+
*/
|
|
482
|
+
unresolvedSpelling?: "omit" | "raw-id";
|
|
483
|
+
onUnresolved?: (id: string) => void;
|
|
484
|
+
/**
|
|
485
|
+
* #5534 — write the authored schemas the detail's `source` (and each
|
|
486
|
+
* config's) keeps, rather than the compiled ones: what `config pull`
|
|
487
|
+
* writes. The comparison projects the compiled fields, as stored.
|
|
488
|
+
*/
|
|
489
|
+
source?: boolean;
|
|
490
|
+
}): string;
|
|
470
491
|
/**
|
|
471
492
|
* Build the `config push` body for one prompt TOML's `[prompt]` table.
|
|
472
493
|
*
|
|
473
494
|
* The prompt's own fields only — its `[[configs]]` entries are separate
|
|
474
495
|
* requests, built by `buildPromptConfigPayload`.
|
|
475
496
|
*/
|
|
476
|
-
export declare function buildPromptPushPayload(key: string, tomlData: any, { mode }?: {
|
|
497
|
+
export declare function buildPromptPushPayload(key: string, tomlData: any, { mode, schemas, }?: {
|
|
477
498
|
mode?: PushMode;
|
|
499
|
+
/**
|
|
500
|
+
* #5534 — the file's compile (`promptSchemaPayload`): attached as
|
|
501
|
+
* `compiled` and `provenance` for each schema field the body carries.
|
|
502
|
+
*/
|
|
503
|
+
schemas?: PromptSchemaPayload | null;
|
|
478
504
|
}): Record<string, any>;
|
|
505
|
+
/**
|
|
506
|
+
* The evaluator link a prompt file authors (#5249): the evaluator's prompt
|
|
507
|
+
* key, `""` to clear the stored link, or `undefined` when the file leaves the
|
|
508
|
+
* link alone. A non-string value is the declared-type refusal's, so it
|
|
509
|
+
* authors nothing here.
|
|
510
|
+
*/
|
|
511
|
+
export declare function promptEvaluatorLink(tomlData: any): string | undefined;
|
|
512
|
+
/** The `[prompt]` TOML key that names a prompt's default evaluator (#5249). */
|
|
513
|
+
export declare const PROMPT_EVALUATOR_KEY = "defaultEvaluatorPromptKey";
|
|
514
|
+
/** One prompt file's resolved evaluator link (#5249). */
|
|
515
|
+
export interface PromptEvaluatorLink {
|
|
516
|
+
/** The prompt file, as the preflight names it. */
|
|
517
|
+
filePath: string;
|
|
518
|
+
promptKey: string;
|
|
519
|
+
/** The evaluator's prompt key, or `""` to clear the link. */
|
|
520
|
+
evaluatorKey: string;
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* Resolve every selected prompt file's `defaultEvaluatorPromptKey` before
|
|
524
|
+
* anything is written (#5249).
|
|
525
|
+
*
|
|
526
|
+
* A key resolves when it names a prompt file this push selects (created or
|
|
527
|
+
* updated by it), or a prompt the app already has — archived included, since
|
|
528
|
+
* the server links to one — minus the prompts this push's `--prune` will
|
|
529
|
+
* hard-delete. A local file `--only` excludes is not pulled in: a prompt that
|
|
530
|
+
* exists only as that file is not a target. The live listing is read only when
|
|
531
|
+
* a key names no selected file.
|
|
532
|
+
*
|
|
533
|
+
* Returns the links push applies after its creates, and one refusal per file
|
|
534
|
+
* whose key resolves to nothing; the preflight aborts on those.
|
|
535
|
+
*/
|
|
536
|
+
export declare function resolvePromptEvaluatorLinks(input: {
|
|
537
|
+
configDir: string;
|
|
538
|
+
pushSelection: SyncSelection | null;
|
|
539
|
+
/** The app's prompt keys, every status. Throws when the listing fails. */
|
|
540
|
+
livePromptKeys: () => Promise<ReadonlySet<string>>;
|
|
541
|
+
/** The prompt keys whose `--prune` decision is `delete`. */
|
|
542
|
+
prunedPromptKeys: ReadonlySet<string>;
|
|
543
|
+
}): Promise<{
|
|
544
|
+
links: PromptEvaluatorLink[];
|
|
545
|
+
errors: string[];
|
|
546
|
+
}>;
|
|
479
547
|
/**
|
|
480
548
|
* Build the POST body for a prompt create.
|
|
481
549
|
*
|
|
@@ -497,7 +565,7 @@ export declare function buildPromptPushPayload(key: string, tomlData: any, { mod
|
|
|
497
565
|
* Every other config field rides along from the definition, so a new LLM
|
|
498
566
|
* setting reaches a brand-new prompt without an edit at this call site.
|
|
499
567
|
*/
|
|
500
|
-
export declare function buildPromptCreatePayload(key: string, tomlData: any): Record<string, any>;
|
|
568
|
+
export declare function buildPromptCreatePayload(key: string, tomlData: any, schemas?: PromptSchemaPayload | null): Record<string, any>;
|
|
501
569
|
/**
|
|
502
570
|
* The PATCH body reconciling the seeded config with the first `[[configs]]`
|
|
503
571
|
* entry, or `null` when the entry needs none of it.
|
|
@@ -520,7 +588,7 @@ export declare function buildPromptCreatePayload(key: string, tomlData: any): Re
|
|
|
520
588
|
* entry's `status` itself now, so there is no deferral either way and this patch
|
|
521
589
|
* is the two fields `POST /prompts` cannot express, nothing more.
|
|
522
590
|
*/
|
|
523
|
-
export declare function seededOnlyPromptConfigFields(firstConfig: any, seededConfigName?: string): Record<string, any> | null;
|
|
591
|
+
export declare function seededOnlyPromptConfigFields(firstConfig: any, seededConfigName?: string, schemas?: PromptConfigSchemaPayload | null): Record<string, any> | null;
|
|
524
592
|
/**
|
|
525
593
|
* Build the create/update body for ONE `[[configs]]` entry.
|
|
526
594
|
*
|
|
@@ -528,8 +596,10 @@ export declare function seededOnlyPromptConfigFields(firstConfig: any, seededCon
|
|
|
528
596
|
* update those defaults must NOT be applied, or editing an unrelated key would
|
|
529
597
|
* silently re-point a config at the default model.
|
|
530
598
|
*/
|
|
531
|
-
export declare function buildPromptConfigPayload(tomlConfig: any, { mode }?: {
|
|
599
|
+
export declare function buildPromptConfigPayload(tomlConfig: any, { mode, schemas, }?: {
|
|
532
600
|
mode?: PushMode;
|
|
601
|
+
/** #5534 — the entry's compile (`promptConfigSchemaPayload`), attached beside its `outputSchema`. */
|
|
602
|
+
schemas?: PromptConfigSchemaPayload | null;
|
|
533
603
|
}): Record<string, any>;
|
|
534
604
|
/**
|
|
535
605
|
* #2644 — `config push` rejects any key the vendored definition does not
|
|
@@ -575,8 +645,11 @@ export declare function configDocumentShapeErrors(filePath: string, tomlData: an
|
|
|
575
645
|
* message per file, but nothing checked a workflow file's top-level tables —
|
|
576
646
|
* so the surface is listed here for the document-level check and skipped for
|
|
577
647
|
* the per-table one.
|
|
648
|
+
*
|
|
649
|
+
* A production build (`experimental` false) leaves out the families it does
|
|
650
|
+
* not manage (`configFamilyServed`), so their files are never validated.
|
|
578
651
|
*/
|
|
579
|
-
export declare function unknownKeyPreflightTargets(): Array<{
|
|
652
|
+
export declare function unknownKeyPreflightTargets(experimental?: boolean): Array<{
|
|
580
653
|
dir: string;
|
|
581
654
|
surface: ConfigObjectSurface;
|
|
582
655
|
tables: ConfigTable[];
|
|
@@ -657,9 +730,20 @@ export declare function runConfigPushPreflight(input: {
|
|
|
657
730
|
* tree's, never this app's, so it is out of the validated body.
|
|
658
731
|
*/
|
|
659
732
|
localEnvironment?: boolean;
|
|
660
|
-
|
|
733
|
+
/** #5249 — `getPrompt` is the `--prune` plan's point read of a prompt. */
|
|
734
|
+
client: Pick<ApiClient, "listIntegrations" | "listFunctions" | "listPrompts" | "listPromptConfigs" | "getPrompt" | "listSchemaFiles" | "listDatabaseTypeConfigs">;
|
|
661
735
|
/** #4485 — the environment's vars override file, layered over vars.toml. */
|
|
662
736
|
varsOverridePath?: string | null;
|
|
737
|
+
/**
|
|
738
|
+
* #5249 — `--prune` is set: the prompts it will hard-delete are planned here
|
|
739
|
+
* (reads only), so an evaluator link cannot name one.
|
|
740
|
+
*/
|
|
741
|
+
prune?: boolean;
|
|
742
|
+
/**
|
|
743
|
+
* Whether the build manages the experimental families; a production build
|
|
744
|
+
* does not validate their files.
|
|
745
|
+
*/
|
|
746
|
+
experimental?: boolean;
|
|
663
747
|
}): Promise<{
|
|
664
748
|
parsedVars: Record<string, unknown> | null;
|
|
665
749
|
/** #4441 — agent files to apply before the functions leg. */
|
|
@@ -669,6 +753,14 @@ export declare function runConfigPushPreflight(input: {
|
|
|
669
753
|
overridingKeys: string[];
|
|
670
754
|
addedKeys: string[];
|
|
671
755
|
} | null;
|
|
756
|
+
/** #5249 — the evaluator links the link pass applies after the creates. */
|
|
757
|
+
promptEvaluatorLinks: PromptEvaluatorLink[];
|
|
758
|
+
/**
|
|
759
|
+
* #5249 — the prompt items of the `--prune` plan (empty without it). The
|
|
760
|
+
* apply pass acts on these rather than re-planning, so the deletes the
|
|
761
|
+
* links were resolved against are the deletes made.
|
|
762
|
+
*/
|
|
763
|
+
promptPruneItems: PushPrunePlanItem[];
|
|
672
764
|
}>;
|
|
673
765
|
export declare function promptKindFileErrors(filePath: string, tomlData: any): string[];
|
|
674
766
|
/**
|
|
@@ -802,7 +894,7 @@ export declare function promptAgentFunctionErrors(filePath: string, tomlData: an
|
|
|
802
894
|
* the leg reports it where it always has. #4441 — the agent files in
|
|
803
895
|
* `agentFilesFirst` (`functionChangePreflight`) go before the leg instead.
|
|
804
896
|
*/
|
|
805
|
-
export declare function partitionPromptFilesForPush(promptsDir: string, files: readonly string[], agentFilesFirst?: readonly string[]): {
|
|
897
|
+
export declare function partitionPromptFilesForPush(promptsDir: string, files: readonly string[], agentFilesFirst?: readonly string[], dependencies?: PromptPushDependencies): {
|
|
806
898
|
beforeFunctions: string[];
|
|
807
899
|
afterFunctions: string[];
|
|
808
900
|
};
|
|
@@ -814,7 +906,7 @@ export declare function partitionPromptFilesForPush(promptsDir: string, files: r
|
|
|
814
906
|
* the cause; the function's own failure row says why. A file that does not
|
|
815
907
|
* parse is left for the prompt leg to report.
|
|
816
908
|
*/
|
|
817
|
-
export declare function holdAgentPromptFilesForUnappliedFunctions(promptsDir: string, files: readonly string[], unappliedFunctionKeys: ReadonlySet<string
|
|
909
|
+
export declare function holdAgentPromptFilesForUnappliedFunctions(promptsDir: string, files: readonly string[], unappliedFunctionKeys: ReadonlySet<string>, dependencies?: PromptPushDependencies): {
|
|
818
910
|
apply: string[];
|
|
819
911
|
held: Array<{
|
|
820
912
|
key: string;
|
|
@@ -875,7 +967,7 @@ export declare function configFileValidationMessages(filePath: string, tomlData:
|
|
|
875
967
|
* remove the line.
|
|
876
968
|
*/
|
|
877
969
|
export declare function pullMustRewrite(label: string, tomlData: any): boolean;
|
|
878
|
-
export declare function collectConfigFileValidationErrors(configDir: string): ConfigFileValidationError[];
|
|
970
|
+
export declare function collectConfigFileValidationErrors(configDir: string, experimental?: boolean): ConfigFileValidationError[];
|
|
879
971
|
/**
|
|
880
972
|
* The deprecated-key warnings for every file `collectConfigFileValidationErrors`
|
|
881
973
|
* reads (#4872), one line per file and key. Advisory: the keys are accepted and
|
|
@@ -1437,6 +1529,119 @@ export declare function ruleFreePushBaselineEntry<E extends {
|
|
|
1437
1529
|
localParsed: any;
|
|
1438
1530
|
liveRecord: any;
|
|
1439
1531
|
}): E | null | undefined;
|
|
1532
|
+
/** The baseline hashes a prompt manifest entry records (#4872, #5249). */
|
|
1533
|
+
export interface PromptBaselineHashes {
|
|
1534
|
+
semanticHash?: string;
|
|
1535
|
+
ruleFreeSemanticHash?: string;
|
|
1536
|
+
/**
|
|
1537
|
+
* The same projection without `defaultEvaluatorPromptKey` (#5249): what a
|
|
1538
|
+
* file that leaves the link unmanaged is classified against, so a link
|
|
1539
|
+
* changed in the web admin never decides which side such a file moved.
|
|
1540
|
+
*/
|
|
1541
|
+
evaluatorFreeSemanticHash?: string;
|
|
1542
|
+
}
|
|
1543
|
+
/**
|
|
1544
|
+
* The baseline a prompt entry records for a server record (#5249): its
|
|
1545
|
+
* comparison projection, with the link named through `extra`'s id→key
|
|
1546
|
+
* lookup, hashed whole and without the link. Empty when the record cannot be
|
|
1547
|
+
* projected, so the entry is left with no baseline rather than a wrong one.
|
|
1548
|
+
*/
|
|
1549
|
+
export declare function promptBaselineHashes(record: any, maps: ConfigDiffMaps, extra?: any): PromptBaselineHashes;
|
|
1550
|
+
/**
|
|
1551
|
+
* `config push`'s gate for one prompt file (#2869, #4872, #5249):
|
|
1552
|
+
* `decidePushForConfig` over the prompt spec, with the link compared by name
|
|
1553
|
+
* and the direction classified around it.
|
|
1554
|
+
*
|
|
1555
|
+
* A file that leaves `defaultEvaluatorPromptKey` unmanaged is classified
|
|
1556
|
+
* without it, against `evaluatorFreeSemanticHash`. An entry written before the
|
|
1557
|
+
* key joined the projection has only `semanticHash`, which never carried it,
|
|
1558
|
+
* so it is classified key-free whatever the file says; a file that manages
|
|
1559
|
+
* the key against an entry that records both is classified whole.
|
|
1560
|
+
*/
|
|
1561
|
+
export declare function decidePromptPushForConfig(input: {
|
|
1562
|
+
localParsed: any;
|
|
1563
|
+
live?: {
|
|
1564
|
+
record: any;
|
|
1565
|
+
modifiedAt?: string;
|
|
1566
|
+
} | null;
|
|
1567
|
+
entry?: (PushBaselineEntry & PromptBaselineHashes & {
|
|
1568
|
+
ruleFreeSemanticHash?: string;
|
|
1569
|
+
}) | null;
|
|
1570
|
+
maps: ConfigDiffMaps;
|
|
1571
|
+
/** The app's prompt ids by key, this push's creates included. */
|
|
1572
|
+
promptIdToKey: ReadonlyMap<string, string>;
|
|
1573
|
+
localFileHash?: string;
|
|
1574
|
+
force?: boolean;
|
|
1575
|
+
}): PushGateOutcome;
|
|
1576
|
+
/** A prompt this push created or updated, as the link pass needs it (#5249). */
|
|
1577
|
+
export interface AppliedPromptForLink {
|
|
1578
|
+
/** Absent for a create under `--dry-run`, which made nothing. */
|
|
1579
|
+
promptId?: string;
|
|
1580
|
+
/** The link the server held when push read it; `undefined` when unread. */
|
|
1581
|
+
currentLinkId?: string | null;
|
|
1582
|
+
}
|
|
1583
|
+
/**
|
|
1584
|
+
* Apply the evaluator links push resolved, after every prompt it creates or
|
|
1585
|
+
* updates (#5249), so a prompt can name an evaluator created in the same push
|
|
1586
|
+
* — either way round.
|
|
1587
|
+
*
|
|
1588
|
+
* Only the prompts this push applied are visited. A link that already holds
|
|
1589
|
+
* sends nothing; a different one is sent through the update route as the id
|
|
1590
|
+
* the key resolves to (`null` for `""`), with the concurrency token push holds
|
|
1591
|
+
* for the prompt, and the prompt's baseline is re-stamped from a refetch so
|
|
1592
|
+
* the next push reads the file as unchanged. An evaluator that was declined
|
|
1593
|
+
* this run, or that no prompt answers to, is an apply failure naming both
|
|
1594
|
+
* keys — never a silent skip.
|
|
1595
|
+
*/
|
|
1596
|
+
export declare function linkPromptEvaluators(input: {
|
|
1597
|
+
client: Pick<ApiClient, "updatePrompt" | "getPrompt">;
|
|
1598
|
+
appId: string;
|
|
1599
|
+
links: readonly PromptEvaluatorLink[];
|
|
1600
|
+
applied: ReadonlyMap<string, AppliedPromptForLink>;
|
|
1601
|
+
/** Every prompt id by key once the creates have run: live plus created. */
|
|
1602
|
+
promptKeyToId: ReadonlyMap<string, string>;
|
|
1603
|
+
/** The prompts this run declined or failed to apply. */
|
|
1604
|
+
declinedKeys: ReadonlySet<string>;
|
|
1605
|
+
syncState: SyncState | null;
|
|
1606
|
+
maps: ConfigDiffMaps;
|
|
1607
|
+
dryRun: boolean;
|
|
1608
|
+
force: boolean;
|
|
1609
|
+
changes: Array<{
|
|
1610
|
+
type: string;
|
|
1611
|
+
action: string;
|
|
1612
|
+
key: string;
|
|
1613
|
+
}>;
|
|
1614
|
+
failures: Array<{
|
|
1615
|
+
type: string;
|
|
1616
|
+
key: string;
|
|
1617
|
+
message: string;
|
|
1618
|
+
}>;
|
|
1619
|
+
info: (message: string) => void;
|
|
1620
|
+
}): Promise<void>;
|
|
1621
|
+
/**
|
|
1622
|
+
* What `config pull` writes and records for one prompt (#5249).
|
|
1623
|
+
*
|
|
1624
|
+
* `content` names the evaluator by key, or leaves out a link the listing
|
|
1625
|
+
* cannot name — the file is still written, so the link stays unmanaged, and
|
|
1626
|
+
* `warn` is told once. `keep` is the keep-or-write check: a file that says
|
|
1627
|
+
* what the server says is kept, unless the server's file names a link the
|
|
1628
|
+
* kept file would leave out, which is how a link made in the web admin
|
|
1629
|
+
* reaches an existing tree. `baseline` is the server's comparison projection,
|
|
1630
|
+
* with a dangling link spelled as its id, whatever the file says — so
|
|
1631
|
+
* clearing that link with `""` afterwards reads as the local edit it is.
|
|
1632
|
+
*/
|
|
1633
|
+
export declare function promptPullPlan(prompt: any, options: {
|
|
1634
|
+
promptIdToKey: ReadonlyMap<string, string>;
|
|
1635
|
+
filePath: string;
|
|
1636
|
+
maps: ConfigDiffMaps;
|
|
1637
|
+
logger?: (message: string) => void;
|
|
1638
|
+
warn?: (message: string) => void;
|
|
1639
|
+
}): {
|
|
1640
|
+
content: string;
|
|
1641
|
+
keep: (localContent: string) => boolean;
|
|
1642
|
+
baseline: PromptBaselineHashes;
|
|
1643
|
+
unresolvedEvaluatorId?: string;
|
|
1644
|
+
};
|
|
1440
1645
|
export declare function hashRemoteConfigForDiff(spec: ConfigDiffSpec, record: any, maps: ConfigDiffMaps, extra?: any): string;
|
|
1441
1646
|
/** One field's disagreement between the local file and the live server entity. */
|
|
1442
1647
|
export interface PushFieldDiff {
|
|
@@ -1628,6 +1833,23 @@ export declare function decidePushForConfig(input: {
|
|
|
1628
1833
|
* strand — is one an update cannot repair.
|
|
1629
1834
|
*/
|
|
1630
1835
|
adoptsUntrackedByKey?: boolean;
|
|
1836
|
+
/**
|
|
1837
|
+
* Classify WHICH side moved with these projected keys left out, against
|
|
1838
|
+
* `baselineHash` (#5249).
|
|
1839
|
+
*
|
|
1840
|
+
* For a present-only key the file leaves unmanaged, the local side inherits
|
|
1841
|
+
* the server's value, so a change made to it out of band moves both hashes
|
|
1842
|
+
* away from a baseline that recorded it — and an ordinary local edit to
|
|
1843
|
+
* another field would read as `both-changed`. A key the file does not manage
|
|
1844
|
+
* never says which side moved. The fields reported, and the
|
|
1845
|
+
* unchanged-versus-different answer, still come from the full projections:
|
|
1846
|
+
* a direction of `unchanged` with the full projections still differing
|
|
1847
|
+
* (only these keys differ) is the local file's change.
|
|
1848
|
+
*/
|
|
1849
|
+
directionWithoutKeys?: {
|
|
1850
|
+
keys: readonly string[];
|
|
1851
|
+
baselineHash?: string;
|
|
1852
|
+
};
|
|
1631
1853
|
}): PushGateOutcome;
|
|
1632
1854
|
/**
|
|
1633
1855
|
* The identity a file may leave to its name, written back into the parsed
|
|
@@ -1834,6 +2056,13 @@ export declare function sameTomlAs(serverContent: string): (localContent: string
|
|
|
1834
2056
|
* end-of-push and catch-path saves persist what the push actually did.
|
|
1835
2057
|
*/
|
|
1836
2058
|
export declare function ensurePushSyncState(existing: SyncState | null, appId: string, serverUrl: string): SyncState;
|
|
2059
|
+
/**
|
|
2060
|
+
* `parseTomlFile`, or null for a file whose field table does not compile
|
|
2061
|
+
* (#5541): the validation collector reports that file, with every problem, so
|
|
2062
|
+
* a reader that compares the tree skips it rather than stopping. Any other
|
|
2063
|
+
* parse error is thrown as before.
|
|
2064
|
+
*/
|
|
2065
|
+
export declare function parseTomlFileUnlessFieldTableError(filePath: string): any;
|
|
1837
2066
|
export declare function parseTomlFile(filePath: string): any;
|
|
1838
2067
|
/**
|
|
1839
2068
|
* Paginate through a list endpoint, collecting all items.
|
|
@@ -2515,4 +2744,6 @@ export declare function applyTestCasePrune(params: {
|
|
|
2515
2744
|
* `resolveSyncDir`, the sync-state baseline and `primitive/<env>/`
|
|
2516
2745
|
* are internal identifiers, deliberately left alone (#2759 scope).
|
|
2517
2746
|
*/
|
|
2518
|
-
export declare function registerConfigSyncCommands(sync: Command
|
|
2747
|
+
export declare function registerConfigSyncCommands(sync: Command, options?: {
|
|
2748
|
+
experimental?: boolean;
|
|
2749
|
+
}): void;
|