@the-ai-company/cbio-node-runtime 1.5.0 → 1.6.0
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 +6 -10
- package/dist/runtime/bootstrap.d.ts +6 -5
- package/dist/runtime/bootstrap.js +7 -2
- package/dist/runtime/bootstrap.js.map +1 -1
- package/dist/runtime/identity.d.ts +5 -1
- package/dist/runtime/identity.js +3 -1
- package/dist/runtime/identity.js.map +1 -1
- package/dist/runtime/index.d.ts +2 -2
- package/dist/runtime/index.js +1 -1
- package/dist/runtime/index.js.map +1 -1
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/CUSTODY_MODEL.md +1 -1
- package/docs/IDENTITY_MODEL.md +2 -0
- package/docs/REFERENCE.md +13 -2
- package/docs/es/README.md +2 -2
- package/docs/fr/README.md +2 -2
- package/docs/ja/README.md +2 -2
- package/docs/ko/README.md +2 -2
- package/docs/pt/README.md +2 -2
- package/docs/zh/README.md +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
createVaultService,
|
|
43
43
|
createDefaultVaultCoreDependencies,
|
|
44
44
|
createIdentity,
|
|
45
|
-
|
|
45
|
+
createVault,
|
|
46
46
|
recoverVault,
|
|
47
47
|
createOwnerHttpFlowBoundary,
|
|
48
48
|
createStandardAcquireBoundary,
|
|
@@ -133,8 +133,8 @@ This package now exposes the production local vault runtime surface as the prima
|
|
|
133
133
|
## Example Shape
|
|
134
134
|
|
|
135
135
|
```ts
|
|
136
|
-
const ownerIdentity = createIdentity();
|
|
137
|
-
const agentIdentity = createIdentity();
|
|
136
|
+
const ownerIdentity = createIdentity({ nickname: 'owner-main' });
|
|
137
|
+
const agentIdentity = createIdentity({ nickname: 'agent-worker' });
|
|
138
138
|
const vault = createVaultService(createDefaultVaultCoreDependencies());
|
|
139
139
|
const owner = createOwnerClient({ ownerId: ownerIdentity.identityId }, vault, new LocalSigner(ownerIdentity), clock);
|
|
140
140
|
const transport = new LocalVaultTransport(vault, capability.capabilityId);
|
|
@@ -202,15 +202,11 @@ console.log(exported.plaintext);
|
|
|
202
202
|
Persistent custody bootstrap example:
|
|
203
203
|
|
|
204
204
|
```ts
|
|
205
|
-
const ownerIdentity = createIdentity();
|
|
205
|
+
const ownerIdentity = createIdentity({ nickname: 'owner-main' });
|
|
206
206
|
const storage = new FsStorageProvider('/tmp/cbio-vault');
|
|
207
|
-
const createdVault = await
|
|
207
|
+
const createdVault = await createVault(storage, {
|
|
208
208
|
vaultId: 'vault-persistent',
|
|
209
|
-
|
|
210
|
-
vaultId: { value: 'vault-persistent' },
|
|
211
|
-
ownerId: ownerIdentity.identityId,
|
|
212
|
-
publicKey: ownerIdentity.publicKey,
|
|
213
|
-
},
|
|
209
|
+
ownerIdentity,
|
|
214
210
|
});
|
|
215
211
|
|
|
216
212
|
// Show once to the owner and let them store it offline.
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { type CreatePersistentVaultCoreDependenciesOptions, type InitializedVaultCustody, type InitializeVaultCustodyOptions, type
|
|
1
|
+
import { type CreatePersistentVaultCoreDependenciesOptions, type InitializedVaultCustody, type InitializeVaultCustodyOptions, type VaultCore } from "../vault-core/index.js";
|
|
2
2
|
import { type VaultService, type VaultCustomFlowResolver } from "../vault-ingress/index.js";
|
|
3
3
|
import type { IStorageProvider } from "../storage/provider.js";
|
|
4
|
-
|
|
4
|
+
import type { CreatedIdentity } from "./identity.js";
|
|
5
|
+
export interface CreateVaultOptions extends Omit<CreatePersistentVaultCoreDependenciesOptions, "vaultWorkingKey"> {
|
|
5
6
|
custody?: InitializeVaultCustodyOptions;
|
|
6
|
-
|
|
7
|
+
ownerIdentity: CreatedIdentity;
|
|
7
8
|
vault?: {
|
|
8
9
|
customFlows?: VaultCustomFlowResolver;
|
|
9
10
|
fetchImpl?: typeof fetch;
|
|
10
11
|
};
|
|
11
12
|
}
|
|
12
|
-
export interface
|
|
13
|
+
export interface CreatedVault {
|
|
13
14
|
initializedCustody: InitializedVaultCustody;
|
|
14
15
|
core: VaultCore;
|
|
15
16
|
vault: VaultService;
|
|
@@ -27,5 +28,5 @@ export interface RecoveredVault {
|
|
|
27
28
|
core: VaultCore;
|
|
28
29
|
vault: VaultService;
|
|
29
30
|
}
|
|
30
|
-
export declare function
|
|
31
|
+
export declare function createVault(storage: IStorageProvider, options: CreateVaultOptions): Promise<CreatedVault>;
|
|
31
32
|
export declare function recoverVault(storage: IStorageProvider, options: RecoverVaultOptions): Promise<RecoveredVault>;
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { createVaultCore } from "../vault-core/core.js";
|
|
2
2
|
import { createPersistentVaultCoreDependencies, initializeVaultCustody, recoverVaultWorkingKey, } from "../vault-core/index.js";
|
|
3
3
|
import { wrapVaultCoreAsVaultService, } from "../vault-ingress/index.js";
|
|
4
|
-
export async function
|
|
4
|
+
export async function createVault(storage, options) {
|
|
5
5
|
const initializedCustody = await initializeVaultCustody(storage, options.custody);
|
|
6
6
|
const deps = createPersistentVaultCoreDependencies(storage, {
|
|
7
7
|
...options,
|
|
8
8
|
vaultWorkingKey: initializedCustody.vaultWorkingKey,
|
|
9
9
|
});
|
|
10
10
|
const core = createVaultCore(deps);
|
|
11
|
-
|
|
11
|
+
const bootstrapOwner = {
|
|
12
|
+
vaultId: core.vaultId,
|
|
13
|
+
ownerId: options.ownerIdentity.identityId,
|
|
14
|
+
publicKey: options.ownerIdentity.publicKey,
|
|
15
|
+
};
|
|
16
|
+
await core.bootstrapOwnerIdentity(bootstrapOwner);
|
|
12
17
|
return {
|
|
13
18
|
initializedCustody,
|
|
14
19
|
core,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../src/runtime/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,qCAAqC,EACrC,sBAAsB,EACtB,sBAAsB,GAMvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,2BAA2B,GAG5B,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../src/runtime/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,qCAAqC,EACrC,sBAAsB,EACtB,sBAAsB,GAMvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,2BAA2B,GAG5B,MAAM,2BAA2B,CAAC;AAkCnC,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,OAAyB,EACzB,OAA2B;IAE3B,MAAM,kBAAkB,GAAG,MAAM,sBAAsB,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAClF,MAAM,IAAI,GAAG,qCAAqC,CAAC,OAAO,EAAE;QAC1D,GAAG,OAAO;QACV,eAAe,EAAE,kBAAkB,CAAC,eAAe;KACpD,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IACnC,MAAM,cAAc,GAAwB;QAC1C,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,UAAU;QACzC,SAAS,EAAE,OAAO,CAAC,aAAa,CAAC,SAAS;KAC3C,CAAC;IACF,MAAM,IAAI,CAAC,sBAAsB,CAAC,cAAc,CAAC,CAAC;IAClD,OAAO;QACL,kBAAkB;QAClB,IAAI;QACJ,KAAK,EAAE,2BAA2B,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC;KACxD,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,OAAyB,EACzB,OAA4B;IAE5B,MAAM,eAAe,GAAG,MAAM,sBAAsB,CAClD,OAAO,EACP,OAAO,CAAC,gBAAgB,EACxB,OAAO,CAAC,iBAAiB,CAC1B,CAAC;IACF,MAAM,IAAI,GAAG,qCAAqC,CAAC,OAAO,EAAE;QAC1D,GAAG,OAAO;QACV,eAAe;KAChB,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IACnC,OAAO;QACL,eAAe;QACf,IAAI;QACJ,KAAK,EAAE,2BAA2B,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC;KACxD,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export interface CreatedIdentity {
|
|
2
2
|
identityId: string;
|
|
3
|
+
nickname?: string;
|
|
3
4
|
publicKey: string;
|
|
4
5
|
privateKey: string;
|
|
5
6
|
}
|
|
6
|
-
export
|
|
7
|
+
export interface CreateIdentityOptions {
|
|
8
|
+
nickname?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function createIdentity(options?: CreateIdentityOptions): CreatedIdentity;
|
package/dist/runtime/identity.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { generateIdentityKeys } from "../protocol/crypto.js";
|
|
2
2
|
import { deriveRootAgentId } from "../protocol/identity.js";
|
|
3
|
-
export function createIdentity() {
|
|
3
|
+
export function createIdentity(options = {}) {
|
|
4
4
|
const keyPair = generateIdentityKeys();
|
|
5
5
|
if (!keyPair.publicKey || !keyPair.privateKey) {
|
|
6
6
|
throw new Error("identity generation failed");
|
|
7
7
|
}
|
|
8
|
+
const nickname = options.nickname?.trim() ? options.nickname.trim() : undefined;
|
|
8
9
|
return {
|
|
9
10
|
identityId: deriveRootAgentId(keyPair.publicKey),
|
|
11
|
+
nickname,
|
|
10
12
|
publicKey: keyPair.publicKey,
|
|
11
13
|
privateKey: keyPair.privateKey,
|
|
12
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../src/runtime/identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../src/runtime/identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAa5D,MAAM,UAAU,cAAc,CAAC,UAAiC,EAAE;IAChE,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAC;IACvC,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAChD,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAChF,OAAO;QACL,UAAU,EAAE,iBAAiB,CAAC,OAAO,CAAC,SAAS,CAAC;QAChD,QAAQ;QACR,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,UAAU,EAAE,OAAO,CAAC,UAAU;KAC/B,CAAC;AACJ,CAAC"}
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ export { derivePublicKey, LocalSigner } from "../protocol/crypto.js";
|
|
|
7
7
|
export type { IStorageProvider } from "../storage/provider.js";
|
|
8
8
|
export { FsStorageProvider } from "../storage/fs.js";
|
|
9
9
|
export { MemoryStorageProvider } from "../storage/memory.js";
|
|
10
|
-
export { createIdentity, type CreatedIdentity, } from "./identity.js";
|
|
11
|
-
export {
|
|
10
|
+
export { createIdentity, type CreateIdentityOptions, type CreatedIdentity, } from "./identity.js";
|
|
11
|
+
export { createVault, recoverVault, type CreateVaultOptions, type CreatedVault, type RecoverVaultOptions, type RecoveredVault, } from "./bootstrap.js";
|
|
12
12
|
export { createVaultCore, DefaultVaultCore, VaultCoreError, createDefaultVaultCoreDependencies, type CreateDefaultVaultCoreDependenciesOptions, type DefaultPolicyEngineOptions, DefaultPolicyEngine, createPersistentVaultCoreDependencies, initializeVaultCustody, recoverVaultWorkingKey, DEFAULT_VAULT_KEY_CUSTODY_BLOB_KEY, type InitializeVaultCustodyOptions, type InitializedVaultCustody, type CreatePersistentVaultCoreDependenciesOptions, PersistentVaultAuditLog, PersistentVaultCapabilityRegistry, PersistentVaultCapabilityRevocationRegistry, PersistentVaultCustomHttpFlowRegistry, PersistentVaultRateLimitStore, PersistentVaultReplayGuard, PersistentVaultSecretCustody, PersistentVaultSecretRepository, HttpDispatchExecutor, InMemoryAgentIdentityRegistry, InMemoryCapabilityRegistry, InMemoryCapabilityRevocationRegistry, InMemoryCustomHttpFlowRegistry, InMemoryRateLimitStore, InMemoryReplayGuard, InMemoryAuditLog, InMemoryOwnerIdentityRegistry, InMemorySecretCustody, InMemorySecretRepository, RandomIdGenerator, SignatureOwnerProofVerifier, type SignatureAgentProofVerifierOptions, SignatureAgentProofVerifier, SystemClock, type AgentCapability, type AgentIdentityRecord, type AgentProof, type OwnerAuditRequest, type OwnerExportSecretRequest, type OwnerRegisterCapabilityCommand, type OwnerRegisterAgentIdentityCommand, type OwnerRegisterCustomHttpFlowCommand, type OwnerSecretExport, type OwnerIdentityRecord, type CustomHttpFlowDefinition, type OwnerProof, type AuditEntry, type AuditLog, type AuditQuery, type Clock, type DispatchAuthorization, type DispatchInstruction, type DispatchRequest, type DispatchResult, type IdGenerator, type OwnerIdentityRegistry, type OwnerProofVerifier, type PolicyEngine, type RateLimitStore, type ReplayGuard, type CustomHttpFlowRegistry, type SecretAlias, type SecretCustody, type SecretId, type SecretRecord, type SecretRepository, type SecretVersion, type TrustedExecutor, type VaultCore, type VaultCoreDependencies, type VaultPrincipal, type VaultPrincipalKind, type VaultTargetBinding, type VaultWriteSecretCommand, type VaultId, type AgentIdentityRegistry, type AgentProofVerifier, type CapabilityRevocationRegistry, type CapabilityRegistry, } from "../vault-core/index.js";
|
|
13
13
|
export { createOwnerClient, type OwnerClient, type OwnerIdentity, type OwnerSigner, type OwnerAuditQueryInput, type OwnerExportSecretInput, type OwnerRegisterCapabilityInput, type OwnerRegisterCustomHttpFlowInput, type OwnerRegisterAgentIdentityInput, type OwnerSecretTargetBinding, type OwnerWriteSecretInput, } from "../clients/owner/index.js";
|
|
14
14
|
export { createAgentClient, type AgentClient, type AgentIdentity, type AgentCapabilityEnvelope, type AgentDispatchIntent, type AgentDispatchTransport, type AgentSigner, } from "../clients/agent/index.js";
|
package/dist/runtime/index.js
CHANGED
|
@@ -7,7 +7,7 @@ export { derivePublicKey, LocalSigner } from "../protocol/crypto.js";
|
|
|
7
7
|
export { FsStorageProvider } from "../storage/fs.js";
|
|
8
8
|
export { MemoryStorageProvider } from "../storage/memory.js";
|
|
9
9
|
export { createIdentity, } from "./identity.js";
|
|
10
|
-
export {
|
|
10
|
+
export { createVault, recoverVault, } from "./bootstrap.js";
|
|
11
11
|
export { createVaultCore, DefaultVaultCore, VaultCoreError, createDefaultVaultCoreDependencies, DefaultPolicyEngine, createPersistentVaultCoreDependencies, initializeVaultCustody, recoverVaultWorkingKey, DEFAULT_VAULT_KEY_CUSTODY_BLOB_KEY, PersistentVaultAuditLog, PersistentVaultCapabilityRegistry, PersistentVaultCapabilityRevocationRegistry, PersistentVaultCustomHttpFlowRegistry, PersistentVaultRateLimitStore, PersistentVaultReplayGuard, PersistentVaultSecretCustody, PersistentVaultSecretRepository, HttpDispatchExecutor, InMemoryAgentIdentityRegistry, InMemoryCapabilityRegistry, InMemoryCapabilityRevocationRegistry, InMemoryCustomHttpFlowRegistry, InMemoryRateLimitStore, InMemoryReplayGuard, InMemoryAuditLog, InMemoryOwnerIdentityRegistry, InMemorySecretCustody, InMemorySecretRepository, RandomIdGenerator, SignatureOwnerProofVerifier, SignatureAgentProofVerifier, SystemClock, } from "../vault-core/index.js";
|
|
12
12
|
export { createOwnerClient, } from "../clients/owner/index.js";
|
|
13
13
|
export { createAgentClient, } from "../clients/agent/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EACL,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EACL,cAAc,GAGf,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,WAAW,EACX,YAAY,GAKb,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,kCAAkC,EAGlC,mBAAmB,EACnB,qCAAqC,EACrC,sBAAsB,EACtB,sBAAsB,EACtB,kCAAkC,EAIlC,uBAAuB,EACvB,iCAAiC,EACjC,2CAA2C,EAC3C,qCAAqC,EACrC,6BAA6B,EAC7B,0BAA0B,EAC1B,4BAA4B,EAC5B,+BAA+B,EAC/B,oBAAoB,EACpB,6BAA6B,EAC7B,0BAA0B,EAC1B,oCAAoC,EACpC,8BAA8B,EAC9B,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EAChB,6BAA6B,EAC7B,qBAAqB,EACrB,wBAAwB,EACxB,iBAAiB,EACjB,2BAA2B,EAE3B,2BAA2B,EAC3B,WAAW,GA8CZ,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,iBAAiB,GAWlB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,iBAAiB,GAOlB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,kBAAkB,EAClB,2BAA2B,EAC3B,2BAA2B,EAC3B,6BAA6B,EAC7B,8BAA8B,EAC9B,uBAAuB,GAWxB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,mBAAmB,GACpB,MAAM,8BAA8B,CAAC"}
|
package/docs/ARCHITECTURE.md
CHANGED
package/docs/CUSTODY_MODEL.md
CHANGED
|
@@ -144,7 +144,7 @@ Future hardening such as MFA/TOTP may be added on top of this model, but it does
|
|
|
144
144
|
|
|
145
145
|
The runtime now includes:
|
|
146
146
|
|
|
147
|
-
1. formal
|
|
147
|
+
1. formal vault creation through `createVault(...)`
|
|
148
148
|
2. formal recovery-key based re-entry through `recoverVault(...)`
|
|
149
149
|
3. explicit `vaultWorkingKey` terminology in the persistent dependency surface
|
|
150
150
|
4. continued support for explicit owner export through `exportSecret(...)`
|
package/docs/IDENTITY_MODEL.md
CHANGED
|
@@ -74,6 +74,8 @@ Examples:
|
|
|
74
74
|
|
|
75
75
|
These should be treated as labels, aliases, or local names rather than the deepest identity truth.
|
|
76
76
|
|
|
77
|
+
The runtime now exposes this concept directly as optional `nickname` on `createIdentity(...)`.
|
|
78
|
+
|
|
77
79
|
In other words:
|
|
78
80
|
|
|
79
81
|
- public key or a stable derived id answers "who is this cryptographically"
|
package/docs/REFERENCE.md
CHANGED
|
@@ -18,7 +18,7 @@ The main constructors are:
|
|
|
18
18
|
- `createVaultCore(...)`
|
|
19
19
|
- `createVaultService(...)`
|
|
20
20
|
- `createIdentity(...)`
|
|
21
|
-
- `
|
|
21
|
+
- `createVault(...)`
|
|
22
22
|
- `recoverVault(...)`
|
|
23
23
|
- `createOwnerClient(...)`
|
|
24
24
|
- `createAgentClient(...)`
|
|
@@ -30,7 +30,7 @@ Related design note:
|
|
|
30
30
|
|
|
31
31
|
Recommended persistent-vault entrypoints:
|
|
32
32
|
|
|
33
|
-
- `
|
|
33
|
+
- `createVault(...)`
|
|
34
34
|
- `recoverVault(...)`
|
|
35
35
|
|
|
36
36
|
Lower-level custody helpers:
|
|
@@ -54,6 +54,17 @@ Role rules:
|
|
|
54
54
|
- identities are independent; there is no built-in lineage or inheritance between identities
|
|
55
55
|
- the same identity may be `owner` in one vault and `agent` in another
|
|
56
56
|
|
|
57
|
+
## Identity Creation
|
|
58
|
+
|
|
59
|
+
`createIdentity(...)` returns:
|
|
60
|
+
|
|
61
|
+
- `identityId`
|
|
62
|
+
- `publicKey`
|
|
63
|
+
- `privateKey`
|
|
64
|
+
- optional `nickname`
|
|
65
|
+
|
|
66
|
+
`nickname` is human-readable only. It does not affect the derived `identityId`, cryptographic verification, or vault-local role binding.
|
|
67
|
+
|
|
57
68
|
## Secret-Flow Model
|
|
58
69
|
|
|
59
70
|
The current HTTP-facing API supports two explicit secret-flow classes:
|
package/docs/es/README.md
CHANGED
|
@@ -20,7 +20,7 @@ npm install @the-ai-company/cbio-node-runtime
|
|
|
20
20
|
import {
|
|
21
21
|
createVaultService,
|
|
22
22
|
createIdentity,
|
|
23
|
-
|
|
23
|
+
createVault,
|
|
24
24
|
recoverVault,
|
|
25
25
|
LocalVaultTransport,
|
|
26
26
|
createOwnerClient,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
|
|
39
39
|
Ruta principal recomendada para vault persistente:
|
|
40
40
|
|
|
41
|
-
- crear el vault persistente con `
|
|
41
|
+
- crear el vault persistente con `createVault(...)`
|
|
42
42
|
- recuperar el vault persistente con `recoverVault(...)` usando la recovery key
|
|
43
43
|
|
|
44
44
|
La API antigua centrada en `CbioIdentity` ya no es la superficie principal del producto.
|
package/docs/fr/README.md
CHANGED
|
@@ -20,7 +20,7 @@ npm install @the-ai-company/cbio-node-runtime
|
|
|
20
20
|
import {
|
|
21
21
|
createVaultService,
|
|
22
22
|
createIdentity,
|
|
23
|
-
|
|
23
|
+
createVault,
|
|
24
24
|
recoverVault,
|
|
25
25
|
LocalVaultTransport,
|
|
26
26
|
createOwnerClient,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
|
|
39
39
|
Chemin principal recommande pour un vault persistant :
|
|
40
40
|
|
|
41
|
-
- creer le vault persistant avec `
|
|
41
|
+
- creer le vault persistant avec `createVault(...)`
|
|
42
42
|
- restaurer le vault persistant avec `recoverVault(...)` via la recovery key
|
|
43
43
|
|
|
44
44
|
L'ancienne API centree sur `CbioIdentity` n'est plus la surface principale du produit.
|
package/docs/ja/README.md
CHANGED
|
@@ -20,7 +20,7 @@ npm install @the-ai-company/cbio-node-runtime
|
|
|
20
20
|
import {
|
|
21
21
|
createVaultService,
|
|
22
22
|
createIdentity,
|
|
23
|
-
|
|
23
|
+
createVault,
|
|
24
24
|
recoverVault,
|
|
25
25
|
LocalVaultTransport,
|
|
26
26
|
createOwnerClient,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
|
|
39
39
|
推奨される persistent-vault の主経路:
|
|
40
40
|
|
|
41
|
-
- `
|
|
41
|
+
- `createVault(...)` で persistent vault を作成する
|
|
42
42
|
- `recoverVault(...)` で recovery key を使って persistent vault を復旧する
|
|
43
43
|
|
|
44
44
|
旧 `CbioIdentity` 中心 API は、もはや主要な公開面ではありません。
|
package/docs/ko/README.md
CHANGED
|
@@ -20,7 +20,7 @@ npm install @the-ai-company/cbio-node-runtime
|
|
|
20
20
|
import {
|
|
21
21
|
createVaultService,
|
|
22
22
|
createIdentity,
|
|
23
|
-
|
|
23
|
+
createVault,
|
|
24
24
|
recoverVault,
|
|
25
25
|
LocalVaultTransport,
|
|
26
26
|
createOwnerClient,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
|
|
39
39
|
권장되는 persistent-vault 주 경로:
|
|
40
40
|
|
|
41
|
-
- `
|
|
41
|
+
- `createVault(...)` 로 persistent vault 를 생성합니다
|
|
42
42
|
- `recoverVault(...)` 로 recovery key 를 사용해 persistent vault 를 복구합니다
|
|
43
43
|
|
|
44
44
|
이전 `CbioIdentity` 중심 API 는 더 이상 주요 제품 표면이 아닙니다.
|
package/docs/pt/README.md
CHANGED
|
@@ -20,7 +20,7 @@ npm install @the-ai-company/cbio-node-runtime
|
|
|
20
20
|
import {
|
|
21
21
|
createVaultService,
|
|
22
22
|
createIdentity,
|
|
23
|
-
|
|
23
|
+
createVault,
|
|
24
24
|
recoverVault,
|
|
25
25
|
LocalVaultTransport,
|
|
26
26
|
createOwnerClient,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
|
|
39
39
|
Caminho principal recomendado para vault persistente:
|
|
40
40
|
|
|
41
|
-
- criar o vault persistente com `
|
|
41
|
+
- criar o vault persistente com `createVault(...)`
|
|
42
42
|
- recuperar o vault persistente com `recoverVault(...)` usando a recovery key
|
|
43
43
|
|
|
44
44
|
A antiga API centrada em `CbioIdentity` nao e mais a superficie principal do produto.
|
package/docs/zh/README.md
CHANGED
|
@@ -20,7 +20,7 @@ npm install @the-ai-company/cbio-node-runtime
|
|
|
20
20
|
import {
|
|
21
21
|
createVaultService,
|
|
22
22
|
createIdentity,
|
|
23
|
-
|
|
23
|
+
createVault,
|
|
24
24
|
recoverVault,
|
|
25
25
|
LocalVaultTransport,
|
|
26
26
|
createOwnerClient,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
|
|
39
39
|
推荐的持久化主路径:
|
|
40
40
|
|
|
41
|
-
- 通过 `
|
|
41
|
+
- 通过 `createVault(...)` 创建持久化 vault
|
|
42
42
|
- 通过 `recoverVault(...)` 用 recovery key 恢复持久化 vault
|
|
43
43
|
|
|
44
44
|
## 构建
|
package/package.json
CHANGED