@femtomc/mu-control-plane 26.2.28
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 +29 -0
- package/dist/adapter_audit.d.ts +27 -0
- package/dist/adapter_audit.d.ts.map +1 -0
- package/dist/adapter_audit.js +57 -0
- package/dist/channel_adapters.d.ts +53 -0
- package/dist/channel_adapters.d.ts.map +1 -0
- package/dist/channel_adapters.js +734 -0
- package/dist/command_context.d.ts +31 -0
- package/dist/command_context.d.ts.map +1 -0
- package/dist/command_context.js +221 -0
- package/dist/command_journal.d.ts +308 -0
- package/dist/command_journal.d.ts.map +1 -0
- package/dist/command_journal.js +197 -0
- package/dist/command_parser.d.ts +31 -0
- package/dist/command_parser.d.ts.map +1 -0
- package/dist/command_parser.js +130 -0
- package/dist/command_pipeline.d.ts +100 -0
- package/dist/command_pipeline.d.ts.map +1 -0
- package/dist/command_pipeline.js +637 -0
- package/dist/command_record.d.ts +89 -0
- package/dist/command_record.d.ts.map +1 -0
- package/dist/command_record.js +138 -0
- package/dist/command_state.d.ts +29 -0
- package/dist/command_state.d.ts.map +1 -0
- package/dist/command_state.js +64 -0
- package/dist/confirmation_manager.d.ts +54 -0
- package/dist/confirmation_manager.d.ts.map +1 -0
- package/dist/confirmation_manager.js +99 -0
- package/dist/idempotency_ledger.d.ts +84 -0
- package/dist/idempotency_ledger.d.ts.map +1 -0
- package/dist/idempotency_ledger.js +174 -0
- package/dist/identity_store.d.ts +219 -0
- package/dist/identity_store.d.ts.map +1 -0
- package/dist/identity_store.js +323 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/meta_agent.d.ts +127 -0
- package/dist/meta_agent.d.ts.map +1 -0
- package/dist/meta_agent.js +415 -0
- package/dist/models.d.ts +132 -0
- package/dist/models.d.ts.map +1 -0
- package/dist/models.js +62 -0
- package/dist/mu_cli_runner.d.ts +76 -0
- package/dist/mu_cli_runner.d.ts.map +1 -0
- package/dist/mu_cli_runner.js +364 -0
- package/dist/operator_tooling.d.ts +19 -0
- package/dist/operator_tooling.d.ts.map +1 -0
- package/dist/operator_tooling.js +126 -0
- package/dist/outbox.d.ts +253 -0
- package/dist/outbox.d.ts.map +1 -0
- package/dist/outbox.js +313 -0
- package/dist/paths.d.ts +13 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +15 -0
- package/dist/policy.d.ts +182 -0
- package/dist/policy.d.ts.map +1 -0
- package/dist/policy.js +434 -0
- package/dist/runtime.d.ts +79 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +260 -0
- package/dist/serialized_mutation_executor.d.ts +5 -0
- package/dist/serialized_mutation_executor.d.ts.map +1 -0
- package/dist/serialized_mutation_executor.js +8 -0
- package/dist/writer_lock.d.ts +28 -0
- package/dist/writer_lock.d.ts.map +1 -0
- package/dist/writer_lock.js +97 -0
- package/package.json +18 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { appendJsonl, readJsonl } from "@femtomc/mu-core/node";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export const IdempotencyClaimRecordSchema = z.object({
|
|
4
|
+
key: z.string().min(1),
|
|
5
|
+
fingerprint: z.string().min(1),
|
|
6
|
+
command_id: z.string().min(1),
|
|
7
|
+
ttl_ms: z.number().int().positive(),
|
|
8
|
+
first_seen_ms: z.number().int(),
|
|
9
|
+
last_seen_ms: z.number().int(),
|
|
10
|
+
expires_at_ms: z.number().int(),
|
|
11
|
+
});
|
|
12
|
+
const ClaimEntrySchema = z.object({
|
|
13
|
+
kind: z.literal("claim"),
|
|
14
|
+
ts_ms: z.number().int(),
|
|
15
|
+
record: IdempotencyClaimRecordSchema,
|
|
16
|
+
});
|
|
17
|
+
const DuplicateEntrySchema = z.object({
|
|
18
|
+
kind: z.literal("duplicate"),
|
|
19
|
+
ts_ms: z.number().int(),
|
|
20
|
+
key: z.string().min(1),
|
|
21
|
+
fingerprint: z.string().min(1),
|
|
22
|
+
record: IdempotencyClaimRecordSchema,
|
|
23
|
+
});
|
|
24
|
+
const ConflictEntrySchema = z.object({
|
|
25
|
+
kind: z.literal("conflict"),
|
|
26
|
+
ts_ms: z.number().int(),
|
|
27
|
+
key: z.string().min(1),
|
|
28
|
+
incoming_fingerprint: z.string().min(1),
|
|
29
|
+
record: IdempotencyClaimRecordSchema,
|
|
30
|
+
});
|
|
31
|
+
export const IdempotencyLedgerEntrySchema = z.discriminatedUnion("kind", [
|
|
32
|
+
ClaimEntrySchema,
|
|
33
|
+
DuplicateEntrySchema,
|
|
34
|
+
ConflictEntrySchema,
|
|
35
|
+
]);
|
|
36
|
+
function cloneRecord(record) {
|
|
37
|
+
return {
|
|
38
|
+
...record,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export class IdempotencyLedger {
|
|
42
|
+
#path;
|
|
43
|
+
#loaded = false;
|
|
44
|
+
#byKey = new Map();
|
|
45
|
+
constructor(path) {
|
|
46
|
+
this.#path = path;
|
|
47
|
+
}
|
|
48
|
+
get path() {
|
|
49
|
+
return this.#path;
|
|
50
|
+
}
|
|
51
|
+
async load() {
|
|
52
|
+
const rows = await readJsonl(this.#path);
|
|
53
|
+
this.#byKey.clear();
|
|
54
|
+
for (let idx = 0; idx < rows.length; idx++) {
|
|
55
|
+
const parsed = IdempotencyLedgerEntrySchema.safeParse(rows[idx]);
|
|
56
|
+
if (!parsed.success) {
|
|
57
|
+
throw new Error(`invalid idempotency row ${idx}: ${parsed.error.message}`);
|
|
58
|
+
}
|
|
59
|
+
const entry = parsed.data;
|
|
60
|
+
switch (entry.kind) {
|
|
61
|
+
case "claim":
|
|
62
|
+
this.#byKey.set(entry.record.key, cloneRecord(entry.record));
|
|
63
|
+
break;
|
|
64
|
+
case "duplicate": {
|
|
65
|
+
const existing = this.#byKey.get(entry.key);
|
|
66
|
+
if (existing) {
|
|
67
|
+
this.#byKey.set(entry.key, {
|
|
68
|
+
...existing,
|
|
69
|
+
last_seen_ms: Math.max(existing.last_seen_ms, entry.ts_ms),
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
this.#byKey.set(entry.key, cloneRecord(entry.record));
|
|
74
|
+
}
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
case "conflict": {
|
|
78
|
+
if (!this.#byKey.has(entry.key)) {
|
|
79
|
+
this.#byKey.set(entry.key, cloneRecord(entry.record));
|
|
80
|
+
}
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
this.#loaded = true;
|
|
86
|
+
}
|
|
87
|
+
async #ensureLoaded() {
|
|
88
|
+
if (!this.#loaded) {
|
|
89
|
+
await this.load();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
async lookup(key, opts = {}) {
|
|
93
|
+
await this.#ensureLoaded();
|
|
94
|
+
const nowMs = Math.trunc(opts.nowMs ?? Date.now());
|
|
95
|
+
const existing = this.#byKey.get(key);
|
|
96
|
+
if (!existing) {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
if (existing.expires_at_ms <= nowMs) {
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
return cloneRecord(existing);
|
|
103
|
+
}
|
|
104
|
+
async claim(opts) {
|
|
105
|
+
await this.#ensureLoaded();
|
|
106
|
+
const nowMs = Math.trunc(opts.nowMs ?? Date.now());
|
|
107
|
+
const ttlMs = Math.trunc(opts.ttlMs);
|
|
108
|
+
if (!Number.isInteger(ttlMs) || ttlMs <= 0) {
|
|
109
|
+
throw new Error(`ttlMs must be a positive integer, got ${opts.ttlMs}`);
|
|
110
|
+
}
|
|
111
|
+
const existing = this.#byKey.get(opts.key);
|
|
112
|
+
if (existing && existing.expires_at_ms > nowMs) {
|
|
113
|
+
if (existing.fingerprint === opts.fingerprint) {
|
|
114
|
+
const updated = IdempotencyClaimRecordSchema.parse({
|
|
115
|
+
...existing,
|
|
116
|
+
last_seen_ms: nowMs,
|
|
117
|
+
});
|
|
118
|
+
await appendJsonl(this.#path, {
|
|
119
|
+
kind: "duplicate",
|
|
120
|
+
ts_ms: nowMs,
|
|
121
|
+
key: opts.key,
|
|
122
|
+
fingerprint: opts.fingerprint,
|
|
123
|
+
record: updated,
|
|
124
|
+
});
|
|
125
|
+
this.#byKey.set(opts.key, updated);
|
|
126
|
+
return { kind: "duplicate", record: cloneRecord(updated) };
|
|
127
|
+
}
|
|
128
|
+
await appendJsonl(this.#path, {
|
|
129
|
+
kind: "conflict",
|
|
130
|
+
ts_ms: nowMs,
|
|
131
|
+
key: opts.key,
|
|
132
|
+
incoming_fingerprint: opts.fingerprint,
|
|
133
|
+
record: existing,
|
|
134
|
+
});
|
|
135
|
+
return {
|
|
136
|
+
kind: "conflict",
|
|
137
|
+
record: cloneRecord(existing),
|
|
138
|
+
incomingFingerprint: opts.fingerprint,
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
const created = IdempotencyClaimRecordSchema.parse({
|
|
142
|
+
key: opts.key,
|
|
143
|
+
fingerprint: opts.fingerprint,
|
|
144
|
+
command_id: opts.commandId,
|
|
145
|
+
ttl_ms: ttlMs,
|
|
146
|
+
first_seen_ms: nowMs,
|
|
147
|
+
last_seen_ms: nowMs,
|
|
148
|
+
expires_at_ms: nowMs + ttlMs,
|
|
149
|
+
});
|
|
150
|
+
await appendJsonl(this.#path, {
|
|
151
|
+
kind: "claim",
|
|
152
|
+
ts_ms: nowMs,
|
|
153
|
+
record: created,
|
|
154
|
+
});
|
|
155
|
+
this.#byKey.set(opts.key, created);
|
|
156
|
+
return { kind: "created", record: cloneRecord(created) };
|
|
157
|
+
}
|
|
158
|
+
snapshot(opts = {}) {
|
|
159
|
+
const nowMs = Math.trunc(opts.nowMs ?? Date.now());
|
|
160
|
+
const out = [];
|
|
161
|
+
for (const record of this.#byKey.values()) {
|
|
162
|
+
if (record.expires_at_ms > nowMs) {
|
|
163
|
+
out.push(cloneRecord(record));
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
out.sort((a, b) => {
|
|
167
|
+
if (a.first_seen_ms !== b.first_seen_ms) {
|
|
168
|
+
return a.first_seen_ms - b.first_seen_ms;
|
|
169
|
+
}
|
|
170
|
+
return a.key.localeCompare(b.key);
|
|
171
|
+
});
|
|
172
|
+
return out;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type AssuranceTier } from "./models.js";
|
|
3
|
+
export declare const ChannelSchema: z.ZodEnum<{
|
|
4
|
+
slack: "slack";
|
|
5
|
+
discord: "discord";
|
|
6
|
+
telegram: "telegram";
|
|
7
|
+
}>;
|
|
8
|
+
export type Channel = z.infer<typeof ChannelSchema>;
|
|
9
|
+
export declare const DeprecatedChannelSchema: z.ZodEnum<{
|
|
10
|
+
imessage: "imessage";
|
|
11
|
+
}>;
|
|
12
|
+
export type DeprecatedChannel = z.infer<typeof DeprecatedChannelSchema>;
|
|
13
|
+
export declare const CHANNEL_ASSURANCE_TIERS: {
|
|
14
|
+
readonly slack: "tier_a";
|
|
15
|
+
readonly discord: "tier_a";
|
|
16
|
+
readonly telegram: "tier_b";
|
|
17
|
+
};
|
|
18
|
+
export declare function assuranceTierForChannel(channel: Channel): AssuranceTier;
|
|
19
|
+
export declare const IdentityBindingStatusSchema: z.ZodEnum<{
|
|
20
|
+
active: "active";
|
|
21
|
+
unlinked: "unlinked";
|
|
22
|
+
revoked: "revoked";
|
|
23
|
+
}>;
|
|
24
|
+
export type IdentityBindingStatus = z.infer<typeof IdentityBindingStatusSchema>;
|
|
25
|
+
export declare const IdentityBindingSchema: z.ZodObject<{
|
|
26
|
+
binding_id: z.ZodString;
|
|
27
|
+
operator_id: z.ZodString;
|
|
28
|
+
channel: z.ZodEnum<{
|
|
29
|
+
slack: "slack";
|
|
30
|
+
discord: "discord";
|
|
31
|
+
telegram: "telegram";
|
|
32
|
+
}>;
|
|
33
|
+
channel_tenant_id: z.ZodString;
|
|
34
|
+
channel_actor_id: z.ZodString;
|
|
35
|
+
assurance_tier: z.ZodEnum<{
|
|
36
|
+
tier_a: "tier_a";
|
|
37
|
+
tier_b: "tier_b";
|
|
38
|
+
tier_c: "tier_c";
|
|
39
|
+
}>;
|
|
40
|
+
scopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
41
|
+
status: z.ZodEnum<{
|
|
42
|
+
active: "active";
|
|
43
|
+
unlinked: "unlinked";
|
|
44
|
+
revoked: "revoked";
|
|
45
|
+
}>;
|
|
46
|
+
linked_at_ms: z.ZodNumber;
|
|
47
|
+
updated_at_ms: z.ZodNumber;
|
|
48
|
+
unlinked_at_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
49
|
+
revoked_at_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
50
|
+
revoked_by_binding_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
51
|
+
revoke_reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
export type IdentityBinding = z.infer<typeof IdentityBindingSchema>;
|
|
54
|
+
export declare const IdentityLinkEntrySchema: z.ZodObject<{
|
|
55
|
+
kind: z.ZodLiteral<"link">;
|
|
56
|
+
ts_ms: z.ZodNumber;
|
|
57
|
+
binding: z.ZodObject<{
|
|
58
|
+
binding_id: z.ZodString;
|
|
59
|
+
operator_id: z.ZodString;
|
|
60
|
+
channel: z.ZodEnum<{
|
|
61
|
+
slack: "slack";
|
|
62
|
+
discord: "discord";
|
|
63
|
+
telegram: "telegram";
|
|
64
|
+
}>;
|
|
65
|
+
channel_tenant_id: z.ZodString;
|
|
66
|
+
channel_actor_id: z.ZodString;
|
|
67
|
+
assurance_tier: z.ZodEnum<{
|
|
68
|
+
tier_a: "tier_a";
|
|
69
|
+
tier_b: "tier_b";
|
|
70
|
+
tier_c: "tier_c";
|
|
71
|
+
}>;
|
|
72
|
+
scopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
73
|
+
status: z.ZodEnum<{
|
|
74
|
+
active: "active";
|
|
75
|
+
unlinked: "unlinked";
|
|
76
|
+
revoked: "revoked";
|
|
77
|
+
}>;
|
|
78
|
+
linked_at_ms: z.ZodNumber;
|
|
79
|
+
updated_at_ms: z.ZodNumber;
|
|
80
|
+
unlinked_at_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
81
|
+
revoked_at_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
82
|
+
revoked_by_binding_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
83
|
+
revoke_reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
export declare const IdentityUnlinkEntrySchema: z.ZodObject<{
|
|
87
|
+
kind: z.ZodLiteral<"unlink">;
|
|
88
|
+
ts_ms: z.ZodNumber;
|
|
89
|
+
binding_id: z.ZodString;
|
|
90
|
+
actor_binding_id: z.ZodString;
|
|
91
|
+
reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
export declare const IdentityRevokeEntrySchema: z.ZodObject<{
|
|
94
|
+
kind: z.ZodLiteral<"revoke">;
|
|
95
|
+
ts_ms: z.ZodNumber;
|
|
96
|
+
binding_id: z.ZodString;
|
|
97
|
+
actor_binding_id: z.ZodString;
|
|
98
|
+
reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
export declare const IdentityStoreEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
101
|
+
kind: z.ZodLiteral<"link">;
|
|
102
|
+
ts_ms: z.ZodNumber;
|
|
103
|
+
binding: z.ZodObject<{
|
|
104
|
+
binding_id: z.ZodString;
|
|
105
|
+
operator_id: z.ZodString;
|
|
106
|
+
channel: z.ZodEnum<{
|
|
107
|
+
slack: "slack";
|
|
108
|
+
discord: "discord";
|
|
109
|
+
telegram: "telegram";
|
|
110
|
+
}>;
|
|
111
|
+
channel_tenant_id: z.ZodString;
|
|
112
|
+
channel_actor_id: z.ZodString;
|
|
113
|
+
assurance_tier: z.ZodEnum<{
|
|
114
|
+
tier_a: "tier_a";
|
|
115
|
+
tier_b: "tier_b";
|
|
116
|
+
tier_c: "tier_c";
|
|
117
|
+
}>;
|
|
118
|
+
scopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
119
|
+
status: z.ZodEnum<{
|
|
120
|
+
active: "active";
|
|
121
|
+
unlinked: "unlinked";
|
|
122
|
+
revoked: "revoked";
|
|
123
|
+
}>;
|
|
124
|
+
linked_at_ms: z.ZodNumber;
|
|
125
|
+
updated_at_ms: z.ZodNumber;
|
|
126
|
+
unlinked_at_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
127
|
+
revoked_at_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
128
|
+
revoked_by_binding_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
129
|
+
revoke_reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
130
|
+
}, z.core.$strip>;
|
|
131
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
132
|
+
kind: z.ZodLiteral<"unlink">;
|
|
133
|
+
ts_ms: z.ZodNumber;
|
|
134
|
+
binding_id: z.ZodString;
|
|
135
|
+
actor_binding_id: z.ZodString;
|
|
136
|
+
reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
137
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
138
|
+
kind: z.ZodLiteral<"revoke">;
|
|
139
|
+
ts_ms: z.ZodNumber;
|
|
140
|
+
binding_id: z.ZodString;
|
|
141
|
+
actor_binding_id: z.ZodString;
|
|
142
|
+
reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
143
|
+
}, z.core.$strip>], "kind">;
|
|
144
|
+
export type IdentityStoreEntry = z.infer<typeof IdentityStoreEntrySchema>;
|
|
145
|
+
export type IdentityChannelDeprecation = {
|
|
146
|
+
reason: "channel_deprecated";
|
|
147
|
+
bindingId: string;
|
|
148
|
+
channel: DeprecatedChannel;
|
|
149
|
+
tsMs: number;
|
|
150
|
+
};
|
|
151
|
+
export type LinkIdentityOpts = {
|
|
152
|
+
bindingId: string;
|
|
153
|
+
operatorId: string;
|
|
154
|
+
channel: Channel;
|
|
155
|
+
channelTenantId: string;
|
|
156
|
+
channelActorId: string;
|
|
157
|
+
scopes?: readonly string[];
|
|
158
|
+
nowMs?: number;
|
|
159
|
+
};
|
|
160
|
+
export type LinkIdentityDecision = {
|
|
161
|
+
kind: "linked";
|
|
162
|
+
binding: IdentityBinding;
|
|
163
|
+
} | {
|
|
164
|
+
kind: "binding_exists";
|
|
165
|
+
binding: IdentityBinding;
|
|
166
|
+
} | {
|
|
167
|
+
kind: "principal_already_linked";
|
|
168
|
+
binding: IdentityBinding;
|
|
169
|
+
};
|
|
170
|
+
export type UnlinkIdentityDecision = {
|
|
171
|
+
kind: "unlinked";
|
|
172
|
+
binding: IdentityBinding;
|
|
173
|
+
} | {
|
|
174
|
+
kind: "not_found";
|
|
175
|
+
} | {
|
|
176
|
+
kind: "invalid_actor";
|
|
177
|
+
} | {
|
|
178
|
+
kind: "already_inactive";
|
|
179
|
+
binding: IdentityBinding;
|
|
180
|
+
};
|
|
181
|
+
export type RevokeIdentityDecision = {
|
|
182
|
+
kind: "revoked";
|
|
183
|
+
binding: IdentityBinding;
|
|
184
|
+
} | {
|
|
185
|
+
kind: "not_found";
|
|
186
|
+
} | {
|
|
187
|
+
kind: "already_inactive";
|
|
188
|
+
binding: IdentityBinding;
|
|
189
|
+
};
|
|
190
|
+
export declare class IdentityStore {
|
|
191
|
+
#private;
|
|
192
|
+
constructor(path: string);
|
|
193
|
+
get path(): string;
|
|
194
|
+
listDeprecations(): IdentityChannelDeprecation[];
|
|
195
|
+
load(): Promise<void>;
|
|
196
|
+
get(bindingId: string): IdentityBinding | null;
|
|
197
|
+
resolveActive(opts: {
|
|
198
|
+
channel: Channel;
|
|
199
|
+
channelTenantId: string;
|
|
200
|
+
channelActorId: string;
|
|
201
|
+
}): IdentityBinding | null;
|
|
202
|
+
listBindings(opts?: {
|
|
203
|
+
includeInactive?: boolean;
|
|
204
|
+
}): IdentityBinding[];
|
|
205
|
+
link(opts: LinkIdentityOpts): Promise<LinkIdentityDecision>;
|
|
206
|
+
unlinkSelf(opts: {
|
|
207
|
+
bindingId: string;
|
|
208
|
+
actorBindingId: string;
|
|
209
|
+
nowMs?: number;
|
|
210
|
+
reason?: string | null;
|
|
211
|
+
}): Promise<UnlinkIdentityDecision>;
|
|
212
|
+
revoke(opts: {
|
|
213
|
+
bindingId: string;
|
|
214
|
+
actorBindingId: string;
|
|
215
|
+
nowMs?: number;
|
|
216
|
+
reason?: string | null;
|
|
217
|
+
}): Promise<RevokeIdentityDecision>;
|
|
218
|
+
}
|
|
219
|
+
//# sourceMappingURL=identity_store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity_store.d.ts","sourceRoot":"","sources":["../src/identity_store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,aAAa,EAAuB,MAAM,aAAa,CAAC;AAEtE,eAAO,MAAM,aAAa;;;;EAA2C,CAAC;AACtE,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,eAAO,MAAM,uBAAuB;;EAAuB,CAAC;AAC5D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,uBAAuB;;;;CAIe,CAAC;AAEpD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,aAAa,CAEvE;AAED,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