@consciousclouds/admin-sdk 0.1.0 → 0.1.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/dist/index.d.ts +49 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* - `enforcement` on every Operative Type. The governed record declares more than the runtime consumes, so a
|
|
18
18
|
* type that merged its fields would let a renderer show validated-but-unconsumed configuration as governance
|
|
19
19
|
* in force. `enforced` and `declared` are separate lists, and `serving_envelope_source` names which authority
|
|
20
|
-
* actually supplies the envelope that bounds a run — the record declares one and the enrollment declaration
|
|
20
|
+
* actually supplies the execution envelope that bounds a run — the record declares one and the enrollment declaration
|
|
21
21
|
* is the one resolved at dispatch. Two truths, both reported.
|
|
22
22
|
* - `operation_breadth` as {declared, effective, enforced}. An undeclared ceiling is stored as 0 and fails
|
|
23
23
|
* closed to 1, so a single number would read as "no Operatives permitted" — the opposite of the truth.
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* an Operation's authority; the re-proven initiating actor and the immutable Operation bounds are elsewhere.
|
|
26
26
|
* A type called "the authority envelope" with seven flat arrays would describe an authority no commission
|
|
27
27
|
* actually uses.
|
|
28
|
-
* - `evaluated_at` + `evaluation: 'live_uncached_at_read'`. The envelope is a snapshot of a computation, never
|
|
28
|
+
* - `evaluated_at` + `evaluation: 'live_uncached_at_read'`. The authority envelope is a snapshot of a computation, never
|
|
29
29
|
* stored state, and the type says so rather than trusting a renderer to remember.
|
|
30
30
|
*/
|
|
31
31
|
export interface AdminClientOptions {
|
|
@@ -168,7 +168,7 @@ export interface AuthorityEnvelope {
|
|
|
168
168
|
scope: 'personality_consent_half';
|
|
169
169
|
excluded_terms: string[];
|
|
170
170
|
mode: string;
|
|
171
|
-
/** Empty when the envelope resolved; otherwise the reason it refuses, which is an answer, not an error. */
|
|
171
|
+
/** Empty when the authority envelope resolved; otherwise the reason it refuses, which is an answer, not an error. */
|
|
172
172
|
refusal: string;
|
|
173
173
|
dimensions: {
|
|
174
174
|
capabilities: string[];
|
|
@@ -193,7 +193,7 @@ export interface OperativeTypeEnforcement {
|
|
|
193
193
|
enforced: string[];
|
|
194
194
|
/** Fields validated at the write boundary, carried in the content digest, and consumed by nothing. */
|
|
195
195
|
declared: string[];
|
|
196
|
-
/** Which authority supplies the envelope that actually bounds a run. */
|
|
196
|
+
/** Which authority supplies the execution envelope that actually bounds a run. */
|
|
197
197
|
serving_envelope_source: string;
|
|
198
198
|
}
|
|
199
199
|
export interface OperativeTypeRecordState {
|
|
@@ -217,11 +217,35 @@ export interface OperativeTypeGoverned {
|
|
|
217
217
|
escalation?: string;
|
|
218
218
|
execution_provider?: string;
|
|
219
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* The AUTHORED VALUES of the fields the runtime does not consume.
|
|
222
|
+
*
|
|
223
|
+
* Naming the fields without their content was half a contract: it told a consumer that
|
|
224
|
+
* `default_model_policy_ref` exists, never what it says — and the whole point of the declared/enforced split
|
|
225
|
+
* is to show what is configured next to what binds.
|
|
226
|
+
*
|
|
227
|
+
* `preferences` is opaque, product-authored JSON. It is present on this TARGET-BOUND read, where only an
|
|
228
|
+
* operator already authorized at the owning product can see it, and deliberately absent from the
|
|
229
|
+
* platform-scoped enrollment detail. Different breadth, different answer.
|
|
230
|
+
*/
|
|
231
|
+
export interface OperativeTypeDeclared {
|
|
232
|
+
present: boolean;
|
|
233
|
+
display_name?: string;
|
|
234
|
+
description?: string;
|
|
235
|
+
default_model_policy_ref: string;
|
|
236
|
+
max_wall_clock_ms: number;
|
|
237
|
+
max_iterations: number;
|
|
238
|
+
artifact_contract: string[];
|
|
239
|
+
/** The record's OWN declared envelope — not the one resolved at dispatch. See `serving_envelope_source`. */
|
|
240
|
+
execution_envelope: unknown | null;
|
|
241
|
+
preferences: unknown | null;
|
|
242
|
+
}
|
|
220
243
|
export interface OperativeTypeView {
|
|
221
244
|
product_id: string;
|
|
222
245
|
operative_id: string;
|
|
223
246
|
record: OperativeTypeRecordState;
|
|
224
247
|
governed: OperativeTypeGoverned;
|
|
248
|
+
declared: OperativeTypeDeclared;
|
|
225
249
|
enforcement: OperativeTypeEnforcement;
|
|
226
250
|
}
|
|
227
251
|
export interface OperativeTypeVersion {
|
|
@@ -276,6 +300,27 @@ export declare class AdminClient {
|
|
|
276
300
|
* an Operation's authority only — the returned object names both facts about itself.
|
|
277
301
|
*/
|
|
278
302
|
getAuthorityEnvelope(productId: string, personalityId: string): Promise<AuthorityEnvelope>;
|
|
303
|
+
/**
|
|
304
|
+
* The Model Policies inside the operator's read scope — the hop between a Personality and the vendor it may
|
|
305
|
+
* reach. A Personality never names a vendor or a model; it names a policy, and the policy's allowed-provider
|
|
306
|
+
* fence is the only place that chain touches one.
|
|
307
|
+
*/
|
|
308
|
+
listModelPolicies<T = unknown>(productId?: string): Promise<T>;
|
|
309
|
+
/** One Model Policy and its version history. Both halves of the identity, because a policy is product-owned. */
|
|
310
|
+
getModelPolicy<T = unknown>(productId: string, policyId: string): Promise<T>;
|
|
311
|
+
/**
|
|
312
|
+
* How one Personality's model authority RESOLVES right now: policy → lane → provider/model, with the
|
|
313
|
+
* admission mode that decided it.
|
|
314
|
+
*
|
|
315
|
+
* THE ADMISSION MODE IS THE POINT. A resolution admitted under pre-cutover compiled equivalence is
|
|
316
|
+
* COMPATIBILITY, not governance — the Provider Record has not cut over, so nothing it declares is in force.
|
|
317
|
+
* A consumer that renders this as "governed" states the opposite of the truth.
|
|
318
|
+
*/
|
|
319
|
+
getPersonalityModelPolicy<T = unknown>(personalityId: string): Promise<T>;
|
|
320
|
+
/** The Provider Records the platform declares. Platform-scoped: a provider is platform configuration. */
|
|
321
|
+
listProviders<T = unknown>(): Promise<T>;
|
|
322
|
+
/** One Provider Record with its authored and derived halves. */
|
|
323
|
+
getProvider<T = unknown>(providerId: string): Promise<T>;
|
|
279
324
|
/**
|
|
280
325
|
* A product's Operative Type roster.
|
|
281
326
|
*
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAKH,MAAM,WAAW,kBAAkB;IACjC,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC;IAChB,4FAA4F;IAC5F,OAAO,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACzE,8DAA8D;IAC9D,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,qBAAa,UAAW,SAAQ,KAAK;IACnC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBACV,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAOzD;AAID,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAA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CAAC,GAAG,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAO5E;;;;;;;OAOG;IACH,yBAAyB,CAAC,CAAC,GAAG,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAIzE,yGAAyG;IACzG,aAAa,CAAC,CAAC,GAAG,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC;IAIxC,gEAAgE;IAChE,WAAW,CAAC,CAAC,GAAG,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAIxD;;;;;;OAMG;IACH,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAOjE,wDAAwD;IACxD,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAMvF;AAED,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,WAAW,CAE1E"}
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* - `enforcement` on every Operative Type. The governed record declares more than the runtime consumes, so a
|
|
18
18
|
* type that merged its fields would let a renderer show validated-but-unconsumed configuration as governance
|
|
19
19
|
* in force. `enforced` and `declared` are separate lists, and `serving_envelope_source` names which authority
|
|
20
|
-
* actually supplies the envelope that bounds a run — the record declares one and the enrollment declaration
|
|
20
|
+
* actually supplies the execution envelope that bounds a run — the record declares one and the enrollment declaration
|
|
21
21
|
* is the one resolved at dispatch. Two truths, both reported.
|
|
22
22
|
* - `operation_breadth` as {declared, effective, enforced}. An undeclared ceiling is stored as 0 and fails
|
|
23
23
|
* closed to 1, so a single number would read as "no Operatives permitted" — the opposite of the truth.
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* an Operation's authority; the re-proven initiating actor and the immutable Operation bounds are elsewhere.
|
|
26
26
|
* A type called "the authority envelope" with seven flat arrays would describe an authority no commission
|
|
27
27
|
* actually uses.
|
|
28
|
-
* - `evaluated_at` + `evaluation: 'live_uncached_at_read'`. The envelope is a snapshot of a computation, never
|
|
28
|
+
* - `evaluated_at` + `evaluation: 'live_uncached_at_read'`. The authority envelope is a snapshot of a computation, never
|
|
29
29
|
* stored state, and the type says so rather than trusting a renderer to remember.
|
|
30
30
|
*/
|
|
31
31
|
/** Base path of the Operator Gateway's admin surface. The gateway is the only thing this SDK talks to. */
|
|
@@ -64,7 +64,12 @@ export class AdminClient {
|
|
|
64
64
|
}
|
|
65
65
|
async request(method, path) {
|
|
66
66
|
const headers = { 'Content-Type': 'application/json', ...(await this.headersFn()) };
|
|
67
|
-
|
|
67
|
+
// NO-STORE IS PART OF THE CONTRACT, not a performance preference. These are governance reads: the
|
|
68
|
+
// authority envelope advertises itself as evaluated-at-read and uncached, and an Operative Type's
|
|
69
|
+
// lifecycle verdict is exactly the fact an operator checks after changing it. Leaving freshness to each
|
|
70
|
+
// consumer's caching environment would let a framework serve a stale authority as a live one — the
|
|
71
|
+
// envelope's own promise, broken by the transport rather than by the computation.
|
|
72
|
+
const resp = await this.fetchImpl(`${this.baseUrl}${path}`, { method, headers, cache: 'no-store' });
|
|
68
73
|
if (!resp.ok) {
|
|
69
74
|
// The body is deliberately not read: see AdminError.
|
|
70
75
|
throw new AdminError(method, path, resp.status);
|
|
@@ -105,6 +110,38 @@ export class AdminClient {
|
|
|
105
110
|
getAuthorityEnvelope(productId, personalityId) {
|
|
106
111
|
return this.request('GET', `${BASE}/personality-envelope/${encodeURIComponent(productId)}/${encodeURIComponent(personalityId)}`);
|
|
107
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* The Model Policies inside the operator's read scope — the hop between a Personality and the vendor it may
|
|
115
|
+
* reach. A Personality never names a vendor or a model; it names a policy, and the policy's allowed-provider
|
|
116
|
+
* fence is the only place that chain touches one.
|
|
117
|
+
*/
|
|
118
|
+
listModelPolicies(productId) {
|
|
119
|
+
const q = productId ? `?product_id=${encodeURIComponent(productId)}` : '';
|
|
120
|
+
return this.request('GET', `${BASE}/model-policies${q}`);
|
|
121
|
+
}
|
|
122
|
+
/** One Model Policy and its version history. Both halves of the identity, because a policy is product-owned. */
|
|
123
|
+
getModelPolicy(productId, policyId) {
|
|
124
|
+
return this.request('GET', `${BASE}/model-policy/${encodeURIComponent(productId)}/${encodeURIComponent(policyId)}`);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* How one Personality's model authority RESOLVES right now: policy → lane → provider/model, with the
|
|
128
|
+
* admission mode that decided it.
|
|
129
|
+
*
|
|
130
|
+
* THE ADMISSION MODE IS THE POINT. A resolution admitted under pre-cutover compiled equivalence is
|
|
131
|
+
* COMPATIBILITY, not governance — the Provider Record has not cut over, so nothing it declares is in force.
|
|
132
|
+
* A consumer that renders this as "governed" states the opposite of the truth.
|
|
133
|
+
*/
|
|
134
|
+
getPersonalityModelPolicy(personalityId) {
|
|
135
|
+
return this.request('GET', `${BASE}/personality-model-policy/${encodeURIComponent(personalityId)}`);
|
|
136
|
+
}
|
|
137
|
+
/** The Provider Records the platform declares. Platform-scoped: a provider is platform configuration. */
|
|
138
|
+
listProviders() {
|
|
139
|
+
return this.request('GET', `${BASE}/providers`);
|
|
140
|
+
}
|
|
141
|
+
/** One Provider Record with its authored and derived halves. */
|
|
142
|
+
getProvider(providerId) {
|
|
143
|
+
return this.request('GET', `${BASE}/providers/${encodeURIComponent(providerId)}`);
|
|
144
|
+
}
|
|
108
145
|
/**
|
|
109
146
|
* A product's Operative Type roster.
|
|
110
147
|
*
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,0GAA0G;AAC1G,MAAM,IAAI,GAAG,wBAAwB,CAAC;AAWt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AC,EAAE,CAAC,CAAC;IACzG,CAAC;IAED,yGAAyG;IACzG,aAAa;QACX,OAAO,IAAI,CAAC,OAAO,CAAI,KAAK,EAAE,GAAG,IAAI,YAAY,CAAC,CAAC;IACrD,CAAC;IAED,gEAAgE;IAChE,WAAW,CAAc,UAAkB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAI,KAAK,EAAE,GAAG,IAAI,cAAc,kBAAkB,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;OAMG;IACH,kBAAkB,CAAC,SAAiB;QAClC,OAAO,IAAI,CAAC,OAAO,CACjB,KAAK,EACL,GAAG,IAAI,+BAA+B,kBAAkB,CAAC,SAAS,CAAC,EAAE,CACtE,CAAC;IACJ,CAAC;IAED,wDAAwD;IACxD,gBAAgB,CAAC,SAAiB,EAAE,WAAmB;QACrD,OAAO,IAAI,CAAC,OAAO,CACjB,KAAK,EACL,GAAG,IAAI,mBAAmB,kBAAkB,CAAC,SAAS,CAAC,IAAI,kBAAkB,CAAC,WAAW,CAAC,EAAE,CAC7F,CAAC;IACJ,CAAC;CACF;AAED,4EAA4E;AAC5E,MAAM,UAAU,iBAAiB,CAAC,OAA2B;IAC3D,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC;AAClC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@consciousclouds/admin-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "ConsciousClouds Universal Admin SDK \u2014 the thin, policy-free client for the Operator Gateway's governance reads: Projects/enrollment, Personalities and their governed records, effective authority envelopes, and Operative Type rosters. Types + HTTP wrappers only; every authorization decision belongs to the Operator Gateway and the Control Plane.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|