@tinycloud/operations 0.5.0-beta.1 → 0.5.0-beta.3

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.
Files changed (43) hide show
  1. package/coverage.json +10 -1
  2. package/dist/artifacts.d.cts +1 -1
  3. package/dist/artifacts.d.ts +1 -1
  4. package/dist/cli-runtime.cjs +728 -135
  5. package/dist/cli-runtime.cjs.map +1 -1
  6. package/dist/cli-runtime.d.cts +1 -1
  7. package/dist/cli-runtime.d.ts +1 -1
  8. package/dist/cli-runtime.js +726 -134
  9. package/dist/cli-runtime.js.map +1 -1
  10. package/dist/{contract-DfyrluLB.d.cts → contract-zRklonbR.d.cts} +6 -3
  11. package/dist/{contract-DfyrluLB.d.ts → contract-zRklonbR.d.ts} +6 -3
  12. package/dist/delegation-binding.cjs +7 -0
  13. package/dist/delegation-binding.cjs.map +1 -1
  14. package/dist/delegation-binding.d.cts +15 -3
  15. package/dist/delegation-binding.d.ts +15 -3
  16. package/dist/delegation-binding.js +6 -0
  17. package/dist/delegation-binding.js.map +1 -1
  18. package/dist/index.cjs +756 -136
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +1 -1
  21. package/dist/index.d.ts +1 -1
  22. package/dist/index.js +752 -133
  23. package/dist/index.js.map +1 -1
  24. package/dist/profile.cjs +5 -0
  25. package/dist/profile.cjs.map +1 -1
  26. package/dist/profile.d.cts +14 -2
  27. package/dist/profile.d.ts +14 -2
  28. package/dist/profile.js +4 -0
  29. package/dist/profile.js.map +1 -1
  30. package/dist/recovery.cjs +67 -0
  31. package/dist/recovery.cjs.map +1 -0
  32. package/dist/recovery.d.cts +38 -0
  33. package/dist/recovery.d.ts +38 -0
  34. package/dist/recovery.js +39 -0
  35. package/dist/recovery.js.map +1 -0
  36. package/dist/secret-request.cjs +271 -0
  37. package/dist/secret-request.cjs.map +1 -0
  38. package/dist/secret-request.d.cts +119 -0
  39. package/dist/secret-request.d.ts +119 -0
  40. package/dist/secret-request.js +222 -0
  41. package/dist/secret-request.js.map +1 -0
  42. package/generated/operations.json +1838 -89
  43. package/package.json +15 -5
@@ -1,7 +1,7 @@
1
1
  import { PermissionEntry, ValidatedRuntimeDelegation, RuntimeDelegationActivator, PortableDelegation } from '@tinycloud/node-sdk';
2
2
  import { O as OperationSpaceResolver } from './authority-ofwbEqmj.cjs';
3
- import { S as StoredGrantSkipReason, b as OperationWarning } from './contract-DfyrluLB.cjs';
4
- export { c as STORED_GRANT_SKIP_REASONS } from './contract-DfyrluLB.cjs';
3
+ import { S as StoredGrantSkipReason, b as OperationWarning } from './contract-zRklonbR.cjs';
4
+ export { c as STORED_GRANT_SKIP_REASONS } from './contract-zRklonbR.cjs';
5
5
  import '@tinycloud/sdk-core';
6
6
 
7
7
  /** Creates the one owner-aware resolver shared by operation matching paths. */
@@ -130,6 +130,18 @@ declare function replayProfileDelegations(profile: string, node: RuntimeDelegati
130
130
  installed: ValidatedRuntimeDelegation[];
131
131
  warnings: OperationWarning[];
132
132
  }>;
133
+ /**
134
+ * Replays the profile's stored records as they are, under the replay rule,
135
+ * without migrating: no lock, no store or marker write. Runtimes that must
136
+ * never write profile state (the `"restored"` runtime) call only this.
137
+ */
138
+ declare function replayStoredDelegationRecords(profile: string, node: RuntimeDelegationActivator, options: {
139
+ readonly host: string;
140
+ readonly resolveSpace: OperationSpaceResolver;
141
+ }): Promise<{
142
+ installed: ValidatedRuntimeDelegation[];
143
+ warnings: OperationWarning[];
144
+ }>;
133
145
  /** Return an audience only after the exact compact bytes, CID and signature verify. */
134
146
  declare function verifiedCompactAudience(node: RuntimeDelegationActivator, delegation: PortableDelegation): string | undefined;
135
147
  /** Only a verified signed audience and matching transport audience can identify a foreign grant. */
@@ -171,4 +183,4 @@ declare function inspectStoredDelegation(entry: unknown, options?: {
171
183
  /** An unreadable marker counts as migrated: a damaged marker never reopens migration. */
172
184
  declare function bindingMigrationRecorded(profile: string): Promise<boolean>;
173
185
 
174
- export { BINDING_NOTES, type BindingSource, OperationWarning, type StoredDelegationInspection, type StoredDelegationReplay, type StoredDelegationSource, StoredGrantSkipReason, activateUnboundImport, bindCliGrant, bindingMigrationPath, bindingMigrationRecorded, inspectStoredDelegation, mergeDelegationsWithoutRequest, operationSpaceResolver, prepareStoredDelegationReplay, replayLimit, replayProfileDelegations, replayStoredDelegation, storedDelegationForAnotherKey, storedDelegationKind, storedDelegationSource, verifiedCompactAudience, verifiedStoredCid, withoutBearer };
186
+ export { BINDING_NOTES, type BindingSource, OperationWarning, type StoredDelegationInspection, type StoredDelegationReplay, type StoredDelegationSource, StoredGrantSkipReason, activateUnboundImport, bindCliGrant, bindingMigrationPath, bindingMigrationRecorded, inspectStoredDelegation, mergeDelegationsWithoutRequest, operationSpaceResolver, prepareStoredDelegationReplay, replayLimit, replayProfileDelegations, replayStoredDelegation, replayStoredDelegationRecords, storedDelegationForAnotherKey, storedDelegationKind, storedDelegationSource, verifiedCompactAudience, verifiedStoredCid, withoutBearer };
@@ -1,7 +1,7 @@
1
1
  import { PermissionEntry, ValidatedRuntimeDelegation, RuntimeDelegationActivator, PortableDelegation } from '@tinycloud/node-sdk';
2
2
  import { O as OperationSpaceResolver } from './authority-ofwbEqmj.js';
3
- import { S as StoredGrantSkipReason, b as OperationWarning } from './contract-DfyrluLB.js';
4
- export { c as STORED_GRANT_SKIP_REASONS } from './contract-DfyrluLB.js';
3
+ import { S as StoredGrantSkipReason, b as OperationWarning } from './contract-zRklonbR.js';
4
+ export { c as STORED_GRANT_SKIP_REASONS } from './contract-zRklonbR.js';
5
5
  import '@tinycloud/sdk-core';
6
6
 
7
7
  /** Creates the one owner-aware resolver shared by operation matching paths. */
@@ -130,6 +130,18 @@ declare function replayProfileDelegations(profile: string, node: RuntimeDelegati
130
130
  installed: ValidatedRuntimeDelegation[];
131
131
  warnings: OperationWarning[];
132
132
  }>;
133
+ /**
134
+ * Replays the profile's stored records as they are, under the replay rule,
135
+ * without migrating: no lock, no store or marker write. Runtimes that must
136
+ * never write profile state (the `"restored"` runtime) call only this.
137
+ */
138
+ declare function replayStoredDelegationRecords(profile: string, node: RuntimeDelegationActivator, options: {
139
+ readonly host: string;
140
+ readonly resolveSpace: OperationSpaceResolver;
141
+ }): Promise<{
142
+ installed: ValidatedRuntimeDelegation[];
143
+ warnings: OperationWarning[];
144
+ }>;
133
145
  /** Return an audience only after the exact compact bytes, CID and signature verify. */
134
146
  declare function verifiedCompactAudience(node: RuntimeDelegationActivator, delegation: PortableDelegation): string | undefined;
135
147
  /** Only a verified signed audience and matching transport audience can identify a foreign grant. */
@@ -171,4 +183,4 @@ declare function inspectStoredDelegation(entry: unknown, options?: {
171
183
  /** An unreadable marker counts as migrated: a damaged marker never reopens migration. */
172
184
  declare function bindingMigrationRecorded(profile: string): Promise<boolean>;
173
185
 
174
- export { BINDING_NOTES, type BindingSource, OperationWarning, type StoredDelegationInspection, type StoredDelegationReplay, type StoredDelegationSource, StoredGrantSkipReason, activateUnboundImport, bindCliGrant, bindingMigrationPath, bindingMigrationRecorded, inspectStoredDelegation, mergeDelegationsWithoutRequest, operationSpaceResolver, prepareStoredDelegationReplay, replayLimit, replayProfileDelegations, replayStoredDelegation, storedDelegationForAnotherKey, storedDelegationKind, storedDelegationSource, verifiedCompactAudience, verifiedStoredCid, withoutBearer };
186
+ export { BINDING_NOTES, type BindingSource, OperationWarning, type StoredDelegationInspection, type StoredDelegationReplay, type StoredDelegationSource, StoredGrantSkipReason, activateUnboundImport, bindCliGrant, bindingMigrationPath, bindingMigrationRecorded, inspectStoredDelegation, mergeDelegationsWithoutRequest, operationSpaceResolver, prepareStoredDelegationReplay, replayLimit, replayProfileDelegations, replayStoredDelegation, replayStoredDelegationRecords, storedDelegationForAnotherKey, storedDelegationKind, storedDelegationSource, verifiedCompactAudience, verifiedStoredCid, withoutBearer };
@@ -4493,6 +4493,8 @@ var STORED_GRANT_SKIP_REASONS = [
4493
4493
  "resources_mismatch",
4494
4494
  "unsupported",
4495
4495
  "activation_rejected",
4496
+ "activation_unavailable",
4497
+ "activation_unauthenticated",
4496
4498
  "invalid"
4497
4499
  ];
4498
4500
  var DELEGATION_CID_PATTERN = "^bafkr4i[a-z2-7]{52}$";
@@ -4726,6 +4728,9 @@ function skipped(reason) {
4726
4728
  }
4727
4729
  async function replayProfileDelegations(profile, node, options) {
4728
4730
  await prepareStoredDelegationReplay(profile, node, { host: options.host, migrate: options.migrate });
4731
+ return replayStoredDelegationRecords(profile, node, options);
4732
+ }
4733
+ async function replayStoredDelegationRecords(profile, node, options) {
4729
4734
  const installed = [];
4730
4735
  const warnings = [];
4731
4736
  const seen = /* @__PURE__ */ new Set();
@@ -4916,6 +4921,7 @@ export {
4916
4921
  replayLimit,
4917
4922
  replayProfileDelegations,
4918
4923
  replayStoredDelegation,
4924
+ replayStoredDelegationRecords,
4919
4925
  storedDelegationForAnotherKey,
4920
4926
  storedDelegationKind,
4921
4927
  storedDelegationSource,