primitive-admin 1.2.0-alpha.0 → 1.2.0-alpha.1
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 +3 -2
- package/dist/src/commands/connections.js +1 -5
- package/dist/src/commands/connections.js.map +1 -1
- package/dist/src/commands/databases.js +7 -109
- package/dist/src/commands/databases.js.map +1 -1
- package/dist/src/commands/sessions.js +3 -8
- package/dist/src/commands/sessions.js.map +1 -1
- package/dist/src/commands/sync.d.ts +76 -3
- package/dist/src/commands/sync.js +326 -153
- package/dist/src/commands/sync.js.map +1 -1
- package/dist/src/commands/tokens.js +1 -6
- package/dist/src/commands/tokens.js.map +1 -1
- package/dist/src/lib/api-client.d.ts +0 -30
- package/dist/src/lib/api-client.js +0 -37
- package/dist/src/lib/api-client.js.map +1 -1
- package/dist/src/lib/config-object-descriptor.js +2 -3
- package/dist/src/lib/config-object-descriptor.js.map +1 -1
- package/dist/src/lib/generated-config-surfaces.d.ts +4 -2
- package/dist/src/lib/generated-config-surfaces.js +82 -36
- 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/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessions.js","sourceRoot":"","sources":["../../../src/commands/sessions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sessions.js","sourceRoot":"","sources":["../../../src/commands/sessions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACL,KAAK,EACL,IAAI,EACJ,WAAW,EACX,UAAU,EACV,IAAI,GACL,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB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,CAAC;YAEnC,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;gBACjB,IAAI,CAAC,IAAI,CAAC,CAAC;gBACX,OAAO;YACT,CAAC;YAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACvB,IAAI,CAAC,oBAAoB,CAAC,CAAC;gBAC3B,OAAO;YACT,CAAC;YAED,OAAO,CAAC,GAAG,CACT,WAAW,CAAC,KAA8B,EAAE;gBAC1C,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE;gBACvC,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE;gBACjC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE;gBACnC,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE;gBAC3D,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,EAAE,UAAU,EAAE;gBACpE,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE;aAC5D,CAAC,CACH,CAAC;YAEF,IAAI,UAAU,EAAE,CAAC;gBACf,IAAI,CAAC,gDAAgD,UAAU,EAAE,CAAC,CAAC;YACrE,CAAC;QACH,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -676,8 +676,8 @@ export declare function serializeBlobBucket(bucket: any, logger?: (message: stri
|
|
|
676
676
|
*
|
|
677
677
|
* EXACT extraction of the inline builder shared by the existing-update and
|
|
678
678
|
* 409-adopt branches — do NOT "clean up" the truthiness checks on the access
|
|
679
|
-
* model. The server treats `preset` and `
|
|
680
|
-
* only clears `ruleSetId` when a preset
|
|
679
|
+
* model. The server treats `preset` and `ruleSetId` as mutually exclusive,
|
|
680
|
+
* only clears `ruleSetId` when a preset is also present, and
|
|
681
681
|
* refuses to leave a bucket with no access model or a blank name — so those
|
|
682
682
|
* fields are not clearable. `bucketKey` and `ttlTier` are immutable and never
|
|
683
683
|
* sent. Both call sites must go through this helper so their field sets never
|
|
@@ -2101,11 +2101,40 @@ export interface TestCaseLookupMaps {
|
|
|
2101
2101
|
configIdToName: Map<string, string>;
|
|
2102
2102
|
promptIdToKey: Map<string, string>;
|
|
2103
2103
|
}
|
|
2104
|
+
/**
|
|
2105
|
+
* A test-case reference the id→name lookups could not name (#3998): the TOML
|
|
2106
|
+
* key it is authored under, the wire field it is stored in, and the raw id.
|
|
2107
|
+
*/
|
|
2108
|
+
export interface TestCaseUnresolvedReference {
|
|
2109
|
+
tomlKey: "configName" | "evaluatorPromptKey" | "evaluatorConfigName";
|
|
2110
|
+
field: "configId" | "evaluatorPromptId" | "evaluatorConfigId";
|
|
2111
|
+
id: string;
|
|
2112
|
+
}
|
|
2113
|
+
/**
|
|
2114
|
+
* The sidecar `config pull` writes for one server record. It never emits an id
|
|
2115
|
+
* key (#3998): a reference the lookups cannot name is written as an empty name
|
|
2116
|
+
* and reported through `onUnresolved`, and `pullTestCasesForBlock` declines to
|
|
2117
|
+
* write such a case rather than unpin it on disk.
|
|
2118
|
+
*/
|
|
2104
2119
|
export declare function serializeTestCase(testCase: any, lookupMaps?: TestCaseLookupMaps, options?: {
|
|
2105
2120
|
/** The sidecar path the warning names, e.g. `prompts/greet.tests/a.toml`. */
|
|
2106
2121
|
file?: string;
|
|
2107
2122
|
logger?: (message: string) => void;
|
|
2123
|
+
/** Called with the references the lookups could not name, when any. */
|
|
2124
|
+
onUnresolved?: (references: TestCaseUnresolvedReference[]) => void;
|
|
2108
2125
|
}): string;
|
|
2126
|
+
/**
|
|
2127
|
+
* The rendering of a server record that the comparison parses (#3998) — never
|
|
2128
|
+
* written to disk.
|
|
2129
|
+
*
|
|
2130
|
+
* It differs from the file pull writes in one place: a reference the lookups
|
|
2131
|
+
* cannot name carries its raw id in the NAME slot. A live case pinned to a
|
|
2132
|
+
* deleted or unlistable configuration must stay a difference against an
|
|
2133
|
+
* unpinned file; projecting it as "no reference" would read the pair as Synced,
|
|
2134
|
+
* and the next content edit would push `configId: null` and clear the pin in
|
|
2135
|
+
* silence.
|
|
2136
|
+
*/
|
|
2137
|
+
export declare function serializeTestCaseForComparison(testCase: any, lookupMaps?: TestCaseLookupMaps): string;
|
|
2109
2138
|
export declare function parseTestCaseToml(tomlData: any): any;
|
|
2110
2139
|
/**
|
|
2111
2140
|
* Pull server-side `Script` rows into `transforms/*.rhai` and record
|
|
@@ -2255,12 +2284,55 @@ export declare function pullFunctions(client: ApiClient, appId: string, configDi
|
|
|
2255
2284
|
*/
|
|
2256
2285
|
items: any[];
|
|
2257
2286
|
}>;
|
|
2287
|
+
/**
|
|
2288
|
+
* A listed test case `config pull` did NOT write, because a reference could not
|
|
2289
|
+
* be named (#3998). Its existing sidecar files (`preservedSlugs`, those still
|
|
2290
|
+
* on disk) and its prior sync-state records were kept as they were.
|
|
2291
|
+
*/
|
|
2292
|
+
export interface TestCaseUnwritten {
|
|
2293
|
+
blockType: TestBlockType;
|
|
2294
|
+
blockKey: string;
|
|
2295
|
+
/** The file name the case would be written to now. */
|
|
2296
|
+
slug: string;
|
|
2297
|
+
name: string;
|
|
2298
|
+
testCaseId: string;
|
|
2299
|
+
references: TestCaseUnresolvedReference[];
|
|
2300
|
+
preservedSlugs: string[];
|
|
2301
|
+
}
|
|
2302
|
+
/**
|
|
2303
|
+
* The id→name lookups `config pull` writes test-case references through
|
|
2304
|
+
* (#3998).
|
|
2305
|
+
*
|
|
2306
|
+
* The prompt half is built from EVERY prompt's detail — the pull fetches them
|
|
2307
|
+
* all before `--only` filters the list — so a judge prompt outside the
|
|
2308
|
+
* selection still names. Configurations come from the pulled blocks (a case
|
|
2309
|
+
* pins one of its own block's) and from every prompt (a judge's config is the
|
|
2310
|
+
* judge prompt's). An entry without both an id and a name is skipped.
|
|
2311
|
+
*/
|
|
2312
|
+
export declare function testCaseLookupMapsForPull(input: {
|
|
2313
|
+
prompts: ReadonlyArray<{
|
|
2314
|
+
promptId?: string;
|
|
2315
|
+
promptKey?: string;
|
|
2316
|
+
configs?: ReadonlyArray<{
|
|
2317
|
+
configId?: string;
|
|
2318
|
+
configName?: string;
|
|
2319
|
+
}> | null;
|
|
2320
|
+
}>;
|
|
2321
|
+
configs: ReadonlyArray<{
|
|
2322
|
+
configId?: string;
|
|
2323
|
+
configName?: string;
|
|
2324
|
+
}>;
|
|
2325
|
+
}): TestCaseLookupMaps;
|
|
2258
2326
|
/** The outcome of one block's test-case pull (#2769). */
|
|
2259
2327
|
export type TestCasePullOutcome =
|
|
2260
|
-
/**
|
|
2328
|
+
/**
|
|
2329
|
+
* The listing succeeded; `count` cases were written and stale files removed.
|
|
2330
|
+
* `unwritten` are the listed cases skipped for an unresolvable reference.
|
|
2331
|
+
*/
|
|
2261
2332
|
{
|
|
2262
2333
|
ok: true;
|
|
2263
2334
|
count: number;
|
|
2335
|
+
unwritten: TestCaseUnwritten[];
|
|
2264
2336
|
}
|
|
2265
2337
|
/** The listing failed: nothing was written, and the caller preserves state. */
|
|
2266
2338
|
| {
|
|
@@ -2336,6 +2408,7 @@ export declare function pullTestCasesForBlocks(params: {
|
|
|
2336
2408
|
}): Promise<{
|
|
2337
2409
|
count: number;
|
|
2338
2410
|
skippedBlocks: string[];
|
|
2411
|
+
unwritten: TestCaseUnwritten[];
|
|
2339
2412
|
}>;
|
|
2340
2413
|
interface PushResolutionMaps {
|
|
2341
2414
|
promptKeyToId: Map<string, string>;
|