@tinycloud/operations 0.3.4-beta.5 → 0.4.0-beta.10
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/artifacts.cjs +499 -6678
- package/dist/artifacts.cjs.map +1 -1
- package/dist/artifacts.d.cts +86 -29
- package/dist/artifacts.d.ts +86 -29
- package/dist/artifacts.js +482 -6660
- package/dist/artifacts.js.map +1 -1
- package/dist/authority-ofwbEqmj.d.cts +30 -0
- package/dist/authority-ofwbEqmj.d.ts +30 -0
- package/dist/cli-runtime.cjs +1019 -7029
- package/dist/cli-runtime.cjs.map +1 -1
- package/dist/cli-runtime.d.cts +1 -1
- package/dist/cli-runtime.d.ts +1 -1
- package/dist/cli-runtime.js +1008 -7021
- package/dist/cli-runtime.js.map +1 -1
- package/dist/{contract-xMIIMtpF.d.cts → contract-CjuEjE-M.d.cts} +1 -1
- package/dist/{contract-xMIIMtpF.d.ts → contract-CjuEjE-M.d.ts} +1 -1
- package/dist/delegation-binding.cjs +1411 -0
- package/dist/delegation-binding.cjs.map +1 -0
- package/dist/delegation-binding.d.cts +130 -0
- package/dist/delegation-binding.d.ts +130 -0
- package/dist/delegation-binding.js +1403 -0
- package/dist/delegation-binding.js.map +1 -0
- package/dist/index.cjs +1016 -7026
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1008 -7021
- package/dist/index.js.map +1 -1
- package/dist/profile.cjs +9 -2
- package/dist/profile.cjs.map +1 -1
- package/dist/profile.d.cts +1 -1
- package/dist/profile.d.ts +1 -1
- package/dist/profile.js +11 -2
- package/dist/profile.js.map +1 -1
- package/dist/state.cjs +426 -50
- package/dist/state.cjs.map +1 -1
- package/dist/state.d.cts +38 -5
- package/dist/state.d.ts +38 -5
- package/dist/state.js +424 -50
- package/dist/state.js.map +1 -1
- package/generated/operations.json +74 -4
- package/package.json +10 -4
package/dist/artifacts.d.cts
CHANGED
|
@@ -1,33 +1,8 @@
|
|
|
1
1
|
import { PermissionEntry } from '@tinycloud/sdk-core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* A capability in the canonical form persisted in a v1 request artifact.
|
|
7
|
-
*
|
|
8
|
-
* The SDK remains the semantic authority for containment. This module only
|
|
9
|
-
* establishes deterministic exact identity for persistence and display.
|
|
10
|
-
*/
|
|
11
|
-
type CanonicalPermissionEntry = Readonly<PermissionEntry>;
|
|
12
|
-
interface AuthorityEvaluation {
|
|
13
|
-
readonly satisfied: boolean;
|
|
14
|
-
readonly missing: readonly CanonicalPermissionEntry[];
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Operation-owned space resolution. The SDK's general capability evaluator
|
|
18
|
-
* intentionally preserves its historical short/full-space compatibility; the
|
|
19
|
-
* operation kernel supplies this narrower resolver when a space identifies a
|
|
20
|
-
* remote owner's resource.
|
|
21
|
-
*/
|
|
22
|
-
type OperationSpaceResolver = (space: string) => string;
|
|
23
|
-
/**
|
|
24
|
-
* Evaluates required authority with the SDK's public subset primitive.
|
|
25
|
-
*
|
|
26
|
-
* In particular, this intentionally does not implement matching rules or
|
|
27
|
-
* manufacture wildcards. A wildcard can cover a requirement only when it was
|
|
28
|
-
* already present in the supplied granted authority and the SDK says so.
|
|
29
|
-
*/
|
|
30
|
-
declare function evaluateAuthority(granted: readonly PermissionEntry[], required: readonly PermissionEntry[]): AuthorityEvaluation;
|
|
3
|
+
import { O as OperationSpaceResolver } from './authority-ofwbEqmj.cjs';
|
|
4
|
+
export { e as evaluateAuthority } from './authority-ofwbEqmj.cjs';
|
|
5
|
+
import { T as TinyCloudPosture, O as OperationOperatorType } from './contract-CjuEjE-M.cjs';
|
|
31
6
|
|
|
32
7
|
/** The shared wire schema for SDK PermissionEntry values, including signed ReCap caveats. */
|
|
33
8
|
declare const PermissionEntrySchema: z.ZodObject<{
|
|
@@ -306,6 +281,88 @@ declare const DelegationImportArtifactSchema: z.ZodObject<{
|
|
|
306
281
|
}[] | undefined;
|
|
307
282
|
prompted?: boolean | undefined;
|
|
308
283
|
}>;
|
|
284
|
+
/**
|
|
285
|
+
* The stored request an imported delegation was checked against, persisted
|
|
286
|
+
* with the delegation. Its fields are exactly the request artifact's, so
|
|
287
|
+
* replay accepts every binding import can write.
|
|
288
|
+
*/
|
|
289
|
+
declare const DelegationRequestBindingSchema: z.ZodObject<Pick<{
|
|
290
|
+
kind: z.ZodLiteral<"tinycloud.auth.request">;
|
|
291
|
+
version: z.ZodLiteral<1>;
|
|
292
|
+
requestId: z.ZodString;
|
|
293
|
+
createdAt: z.ZodString;
|
|
294
|
+
profile: z.ZodString;
|
|
295
|
+
posture: z.ZodEnum<["owner-openkey", "delegate-session", "local-owner-key", "unauthenticated"]>;
|
|
296
|
+
operatorType: z.ZodEnum<["human", "agent"]>;
|
|
297
|
+
host: z.ZodString;
|
|
298
|
+
sessionDid: z.ZodString;
|
|
299
|
+
ownerDid: z.ZodOptional<z.ZodString>;
|
|
300
|
+
spaceId: z.ZodOptional<z.ZodString>;
|
|
301
|
+
requestedExpiry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
302
|
+
requested: z.ZodArray<z.ZodObject<{
|
|
303
|
+
service: z.ZodString;
|
|
304
|
+
space: z.ZodOptional<z.ZodString>;
|
|
305
|
+
path: z.ZodString;
|
|
306
|
+
actions: z.ZodArray<z.ZodString, "many">;
|
|
307
|
+
caveats: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
308
|
+
skipPrefix: z.ZodOptional<z.ZodBoolean>;
|
|
309
|
+
expiry: z.ZodOptional<z.ZodString>;
|
|
310
|
+
description: z.ZodOptional<z.ZodString>;
|
|
311
|
+
}, "strict", z.ZodTypeAny, {
|
|
312
|
+
service: string;
|
|
313
|
+
path: string;
|
|
314
|
+
actions: string[];
|
|
315
|
+
space?: string | undefined;
|
|
316
|
+
caveats?: Record<string, unknown>[] | undefined;
|
|
317
|
+
skipPrefix?: boolean | undefined;
|
|
318
|
+
expiry?: string | undefined;
|
|
319
|
+
description?: string | undefined;
|
|
320
|
+
}, {
|
|
321
|
+
service: string;
|
|
322
|
+
path: string;
|
|
323
|
+
actions: string[];
|
|
324
|
+
space?: string | undefined;
|
|
325
|
+
caveats?: Record<string, unknown>[] | undefined;
|
|
326
|
+
skipPrefix?: boolean | undefined;
|
|
327
|
+
expiry?: string | undefined;
|
|
328
|
+
description?: string | undefined;
|
|
329
|
+
}>, "many">;
|
|
330
|
+
command: z.ZodOptional<z.ZodObject<{
|
|
331
|
+
argv: z.ZodArray<z.ZodString, "many">;
|
|
332
|
+
cwd: z.ZodString;
|
|
333
|
+
}, "strict", z.ZodTypeAny, {
|
|
334
|
+
argv: string[];
|
|
335
|
+
cwd: string;
|
|
336
|
+
}, {
|
|
337
|
+
argv: string[];
|
|
338
|
+
cwd: string;
|
|
339
|
+
}>>;
|
|
340
|
+
}, "requestId" | "requested">, "strict", z.ZodTypeAny, {
|
|
341
|
+
requestId: string;
|
|
342
|
+
requested: {
|
|
343
|
+
service: string;
|
|
344
|
+
path: string;
|
|
345
|
+
actions: string[];
|
|
346
|
+
space?: string | undefined;
|
|
347
|
+
caveats?: Record<string, unknown>[] | undefined;
|
|
348
|
+
skipPrefix?: boolean | undefined;
|
|
349
|
+
expiry?: string | undefined;
|
|
350
|
+
description?: string | undefined;
|
|
351
|
+
}[];
|
|
352
|
+
}, {
|
|
353
|
+
requestId: string;
|
|
354
|
+
requested: {
|
|
355
|
+
service: string;
|
|
356
|
+
path: string;
|
|
357
|
+
actions: string[];
|
|
358
|
+
space?: string | undefined;
|
|
359
|
+
caveats?: Record<string, unknown>[] | undefined;
|
|
360
|
+
skipPrefix?: boolean | undefined;
|
|
361
|
+
expiry?: string | undefined;
|
|
362
|
+
description?: string | undefined;
|
|
363
|
+
}[];
|
|
364
|
+
}>;
|
|
365
|
+
type DelegationRequestBinding = z.infer<typeof DelegationRequestBindingSchema>;
|
|
309
366
|
type PermissionRequestArtifact = z.infer<typeof PermissionRequestArtifactSchema>;
|
|
310
367
|
type DelegationImportArtifact = z.infer<typeof DelegationImportArtifactSchema>;
|
|
311
368
|
/** The minimal public node-sdk request shape accepted by the legacy reader. */
|
|
@@ -388,4 +445,4 @@ interface PrunePermissionRequestsInput {
|
|
|
388
445
|
/** Pure retention policy used by the locked persistence operation. */
|
|
389
446
|
declare function prunePermissionRequests(records: readonly PermissionRequestArtifact[], input: PrunePermissionRequestsInput): PermissionRequestArtifact[];
|
|
390
447
|
|
|
391
|
-
export { type ArtifactClock, type BuildPermissionRequestArtifactInput, type CreateOrReusePermissionRequestInput, type DelegationImportArtifact, DelegationImportArtifactSchema, type LegacyPermissionRequestArtifact, type LegacyRequestContext, PermissionEntrySchema, type PermissionRequestArtifact, PermissionRequestArtifactSchema, type PermissionRequestIdentityInput, type PermissionRequestResolution, type PrunePermissionRequestsInput, type RequestIdSource, buildPermissionRequestArtifact, createOrReusePermissionRequest, createPermissionRequestIdentity,
|
|
448
|
+
export { type ArtifactClock, type BuildPermissionRequestArtifactInput, type CreateOrReusePermissionRequestInput, type DelegationImportArtifact, DelegationImportArtifactSchema, type DelegationRequestBinding, DelegationRequestBindingSchema, type LegacyPermissionRequestArtifact, type LegacyRequestContext, PermissionEntrySchema, type PermissionRequestArtifact, PermissionRequestArtifactSchema, type PermissionRequestIdentityInput, type PermissionRequestResolution, type PrunePermissionRequestsInput, type RequestIdSource, buildPermissionRequestArtifact, createOrReusePermissionRequest, createPermissionRequestIdentity, findPermissionRequest, isDelegationImportArtifact, isPermissionRequestArtifact, listPermissionRequests, prunePermissionRequests, validateDelegationImportArtifact, validatePermissionRequestArtifact };
|
package/dist/artifacts.d.ts
CHANGED
|
@@ -1,33 +1,8 @@
|
|
|
1
1
|
import { PermissionEntry } from '@tinycloud/sdk-core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* A capability in the canonical form persisted in a v1 request artifact.
|
|
7
|
-
*
|
|
8
|
-
* The SDK remains the semantic authority for containment. This module only
|
|
9
|
-
* establishes deterministic exact identity for persistence and display.
|
|
10
|
-
*/
|
|
11
|
-
type CanonicalPermissionEntry = Readonly<PermissionEntry>;
|
|
12
|
-
interface AuthorityEvaluation {
|
|
13
|
-
readonly satisfied: boolean;
|
|
14
|
-
readonly missing: readonly CanonicalPermissionEntry[];
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Operation-owned space resolution. The SDK's general capability evaluator
|
|
18
|
-
* intentionally preserves its historical short/full-space compatibility; the
|
|
19
|
-
* operation kernel supplies this narrower resolver when a space identifies a
|
|
20
|
-
* remote owner's resource.
|
|
21
|
-
*/
|
|
22
|
-
type OperationSpaceResolver = (space: string) => string;
|
|
23
|
-
/**
|
|
24
|
-
* Evaluates required authority with the SDK's public subset primitive.
|
|
25
|
-
*
|
|
26
|
-
* In particular, this intentionally does not implement matching rules or
|
|
27
|
-
* manufacture wildcards. A wildcard can cover a requirement only when it was
|
|
28
|
-
* already present in the supplied granted authority and the SDK says so.
|
|
29
|
-
*/
|
|
30
|
-
declare function evaluateAuthority(granted: readonly PermissionEntry[], required: readonly PermissionEntry[]): AuthorityEvaluation;
|
|
3
|
+
import { O as OperationSpaceResolver } from './authority-ofwbEqmj.js';
|
|
4
|
+
export { e as evaluateAuthority } from './authority-ofwbEqmj.js';
|
|
5
|
+
import { T as TinyCloudPosture, O as OperationOperatorType } from './contract-CjuEjE-M.js';
|
|
31
6
|
|
|
32
7
|
/** The shared wire schema for SDK PermissionEntry values, including signed ReCap caveats. */
|
|
33
8
|
declare const PermissionEntrySchema: z.ZodObject<{
|
|
@@ -306,6 +281,88 @@ declare const DelegationImportArtifactSchema: z.ZodObject<{
|
|
|
306
281
|
}[] | undefined;
|
|
307
282
|
prompted?: boolean | undefined;
|
|
308
283
|
}>;
|
|
284
|
+
/**
|
|
285
|
+
* The stored request an imported delegation was checked against, persisted
|
|
286
|
+
* with the delegation. Its fields are exactly the request artifact's, so
|
|
287
|
+
* replay accepts every binding import can write.
|
|
288
|
+
*/
|
|
289
|
+
declare const DelegationRequestBindingSchema: z.ZodObject<Pick<{
|
|
290
|
+
kind: z.ZodLiteral<"tinycloud.auth.request">;
|
|
291
|
+
version: z.ZodLiteral<1>;
|
|
292
|
+
requestId: z.ZodString;
|
|
293
|
+
createdAt: z.ZodString;
|
|
294
|
+
profile: z.ZodString;
|
|
295
|
+
posture: z.ZodEnum<["owner-openkey", "delegate-session", "local-owner-key", "unauthenticated"]>;
|
|
296
|
+
operatorType: z.ZodEnum<["human", "agent"]>;
|
|
297
|
+
host: z.ZodString;
|
|
298
|
+
sessionDid: z.ZodString;
|
|
299
|
+
ownerDid: z.ZodOptional<z.ZodString>;
|
|
300
|
+
spaceId: z.ZodOptional<z.ZodString>;
|
|
301
|
+
requestedExpiry: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
302
|
+
requested: z.ZodArray<z.ZodObject<{
|
|
303
|
+
service: z.ZodString;
|
|
304
|
+
space: z.ZodOptional<z.ZodString>;
|
|
305
|
+
path: z.ZodString;
|
|
306
|
+
actions: z.ZodArray<z.ZodString, "many">;
|
|
307
|
+
caveats: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
308
|
+
skipPrefix: z.ZodOptional<z.ZodBoolean>;
|
|
309
|
+
expiry: z.ZodOptional<z.ZodString>;
|
|
310
|
+
description: z.ZodOptional<z.ZodString>;
|
|
311
|
+
}, "strict", z.ZodTypeAny, {
|
|
312
|
+
service: string;
|
|
313
|
+
path: string;
|
|
314
|
+
actions: string[];
|
|
315
|
+
space?: string | undefined;
|
|
316
|
+
caveats?: Record<string, unknown>[] | undefined;
|
|
317
|
+
skipPrefix?: boolean | undefined;
|
|
318
|
+
expiry?: string | undefined;
|
|
319
|
+
description?: string | undefined;
|
|
320
|
+
}, {
|
|
321
|
+
service: string;
|
|
322
|
+
path: string;
|
|
323
|
+
actions: string[];
|
|
324
|
+
space?: string | undefined;
|
|
325
|
+
caveats?: Record<string, unknown>[] | undefined;
|
|
326
|
+
skipPrefix?: boolean | undefined;
|
|
327
|
+
expiry?: string | undefined;
|
|
328
|
+
description?: string | undefined;
|
|
329
|
+
}>, "many">;
|
|
330
|
+
command: z.ZodOptional<z.ZodObject<{
|
|
331
|
+
argv: z.ZodArray<z.ZodString, "many">;
|
|
332
|
+
cwd: z.ZodString;
|
|
333
|
+
}, "strict", z.ZodTypeAny, {
|
|
334
|
+
argv: string[];
|
|
335
|
+
cwd: string;
|
|
336
|
+
}, {
|
|
337
|
+
argv: string[];
|
|
338
|
+
cwd: string;
|
|
339
|
+
}>>;
|
|
340
|
+
}, "requestId" | "requested">, "strict", z.ZodTypeAny, {
|
|
341
|
+
requestId: string;
|
|
342
|
+
requested: {
|
|
343
|
+
service: string;
|
|
344
|
+
path: string;
|
|
345
|
+
actions: string[];
|
|
346
|
+
space?: string | undefined;
|
|
347
|
+
caveats?: Record<string, unknown>[] | undefined;
|
|
348
|
+
skipPrefix?: boolean | undefined;
|
|
349
|
+
expiry?: string | undefined;
|
|
350
|
+
description?: string | undefined;
|
|
351
|
+
}[];
|
|
352
|
+
}, {
|
|
353
|
+
requestId: string;
|
|
354
|
+
requested: {
|
|
355
|
+
service: string;
|
|
356
|
+
path: string;
|
|
357
|
+
actions: string[];
|
|
358
|
+
space?: string | undefined;
|
|
359
|
+
caveats?: Record<string, unknown>[] | undefined;
|
|
360
|
+
skipPrefix?: boolean | undefined;
|
|
361
|
+
expiry?: string | undefined;
|
|
362
|
+
description?: string | undefined;
|
|
363
|
+
}[];
|
|
364
|
+
}>;
|
|
365
|
+
type DelegationRequestBinding = z.infer<typeof DelegationRequestBindingSchema>;
|
|
309
366
|
type PermissionRequestArtifact = z.infer<typeof PermissionRequestArtifactSchema>;
|
|
310
367
|
type DelegationImportArtifact = z.infer<typeof DelegationImportArtifactSchema>;
|
|
311
368
|
/** The minimal public node-sdk request shape accepted by the legacy reader. */
|
|
@@ -388,4 +445,4 @@ interface PrunePermissionRequestsInput {
|
|
|
388
445
|
/** Pure retention policy used by the locked persistence operation. */
|
|
389
446
|
declare function prunePermissionRequests(records: readonly PermissionRequestArtifact[], input: PrunePermissionRequestsInput): PermissionRequestArtifact[];
|
|
390
447
|
|
|
391
|
-
export { type ArtifactClock, type BuildPermissionRequestArtifactInput, type CreateOrReusePermissionRequestInput, type DelegationImportArtifact, DelegationImportArtifactSchema, type LegacyPermissionRequestArtifact, type LegacyRequestContext, PermissionEntrySchema, type PermissionRequestArtifact, PermissionRequestArtifactSchema, type PermissionRequestIdentityInput, type PermissionRequestResolution, type PrunePermissionRequestsInput, type RequestIdSource, buildPermissionRequestArtifact, createOrReusePermissionRequest, createPermissionRequestIdentity,
|
|
448
|
+
export { type ArtifactClock, type BuildPermissionRequestArtifactInput, type CreateOrReusePermissionRequestInput, type DelegationImportArtifact, DelegationImportArtifactSchema, type DelegationRequestBinding, DelegationRequestBindingSchema, type LegacyPermissionRequestArtifact, type LegacyRequestContext, PermissionEntrySchema, type PermissionRequestArtifact, PermissionRequestArtifactSchema, type PermissionRequestIdentityInput, type PermissionRequestResolution, type PrunePermissionRequestsInput, type RequestIdSource, buildPermissionRequestArtifact, createOrReusePermissionRequest, createPermissionRequestIdentity, findPermissionRequest, isDelegationImportArtifact, isPermissionRequestArtifact, listPermissionRequests, prunePermissionRequests, validateDelegationImportArtifact, validatePermissionRequestArtifact };
|