@modelprofile.com/authswitch 7.0.0 → 8.1.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/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/authority-contract.d.ts +1 -3
- package/dist_ts/authority-contract.js +1 -1
- package/dist_ts/authority-import-contract.d.ts +207 -0
- package/dist_ts/authority-import-contract.js +18 -0
- package/dist_ts/classes.authoritybroker.js +1 -5
- package/dist_ts/classes.authoritycli.d.ts +4 -0
- package/dist_ts/classes.authoritycli.js +149 -12
- package/dist_ts/classes.authorityclient.d.ts +7 -0
- package/dist_ts/classes.authorityclient.js +13 -1
- package/dist_ts/classes.authoritydaemon.d.ts +4 -0
- package/dist_ts/classes.authoritydaemon.js +75 -9
- package/dist_ts/classes.authoritydatabase.d.ts +10 -26
- package/dist_ts/classes.authoritydatabase.js +68 -133
- package/dist_ts/classes.authorityimport.d.ts +161 -0
- package/dist_ts/classes.authorityimport.js +638 -0
- package/dist_ts/classes.authoritymodels.d.ts +39 -43
- package/dist_ts/classes.authoritymodels.js +209 -243
- package/dist_ts/classes.authoritypreuse.js +1 -2
- package/dist_ts/classes.authorityregistry.d.ts +2 -17
- package/dist_ts/classes.authorityregistry.js +18 -74
- package/dist_ts/classes.authoritysecrets.d.ts +1 -1
- package/dist_ts/classes.authoritysecrets.js +2 -2
- package/dist_ts/classes.authorityusage.d.ts +3 -3
- package/dist_ts/classes.claudeauthority.js +3 -7
- package/dist_ts/classes.claudenative.d.ts +1 -8
- package/dist_ts/classes.claudenative.js +2 -25
- package/dist_ts/classes.codexmanaged.d.ts +1 -1
- package/dist_ts/index.d.ts +1 -0
- package/dist_ts/index.js +6 -3
- package/dist_ts/plugins.d.ts +7 -7
- package/dist_ts/plugins.js +8 -8
- package/dist_ts/ts_migration/0001_authority_meta.d.ts +13 -3
- package/dist_ts/ts_migration/0001_authority_meta.js +29 -17
- package/dist_ts/ts_migration/0002_remove_backup_records.d.ts +17 -0
- package/dist_ts/ts_migration/0002_remove_backup_records.js +48 -0
- package/dist_ts/ts_migration/index.d.ts +6 -3
- package/dist_ts/ts_migration/index.js +10 -4
- package/dist_ts/ts_migration/legacysources/authswitchstores.d.ts +2 -0
- package/dist_ts/ts_migration/legacysources/authswitchstores.js +244 -0
- package/dist_ts/ts_migration/legacysources/index.d.ts +18 -0
- package/dist_ts/ts_migration/legacysources/index.js +24 -0
- package/dist_ts/ts_migration/legacysources/material.d.ts +37 -0
- package/dist_ts/ts_migration/legacysources/material.js +120 -0
- package/dist_ts/ts_migration/legacysources/nativestores.d.ts +2 -0
- package/dist_ts/ts_migration/legacysources/nativestores.js +207 -0
- package/dist_ts/ts_migration/legacysources/shared.d.ts +124 -0
- package/dist_ts/ts_migration/legacysources/shared.js +142 -0
- package/package.json +6 -5
- package/readme.md +68 -26
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/authority-contract.ts +1 -3
- package/ts/authority-import-contract.ts +216 -0
- package/ts/classes.authoritybroker.ts +0 -4
- package/ts/classes.authoritycli.ts +165 -11
- package/ts/classes.authorityclient.ts +22 -0
- package/ts/classes.authoritydaemon.ts +75 -8
- package/ts/classes.authoritydatabase.ts +70 -145
- package/ts/classes.authorityimport.ts +718 -0
- package/ts/classes.authoritymodels.ts +253 -269
- package/ts/classes.authoritypreuse.ts +0 -1
- package/ts/classes.authorityregistry.ts +20 -91
- package/ts/classes.authoritysecrets.ts +1 -1
- package/ts/classes.authorityusage.ts +3 -3
- package/ts/classes.claudeauthority.ts +2 -6
- package/ts/classes.claudenative.ts +1 -32
- package/ts/classes.codexmanaged.ts +1 -1
- package/ts/index.ts +5 -2
- package/ts/plugins.ts +7 -7
- package/ts/ts_migration/0001_authority_meta.ts +29 -17
- package/ts/ts_migration/0002_remove_backup_records.ts +49 -0
- package/ts/ts_migration/index.ts +10 -5
- package/ts/ts_migration/legacysources/authswitchstores.ts +211 -0
- package/ts/ts_migration/legacysources/index.ts +35 -0
- package/ts/ts_migration/legacysources/material.ts +134 -0
- package/ts/ts_migration/legacysources/nativestores.ts +204 -0
- package/ts/ts_migration/legacysources/shared.ts +220 -0
- package/dist_ts/authorityrehearsal.child.d.ts +0 -1
- package/dist_ts/authorityrehearsal.child.js +0 -395
- package/dist_ts/classes.authoritybackup.d.ts +0 -134
- package/dist_ts/classes.authoritybackup.js +0 -769
- package/dist_ts/classes.authorityrehearsal.d.ts +0 -127
- package/dist_ts/classes.authorityrehearsal.js +0 -632
- package/ts/authorityrehearsal.child.ts +0 -330
- package/ts/classes.authoritybackup.ts +0 -780
- package/ts/classes.authorityrehearsal.ts +0 -625
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import * as plugins from './plugins.js';
|
|
2
|
-
import type { IAuthorityBackupRehearsal, IAuthorityBackupRehearsalReadback, IAuthorityRestoredRecord, IAuthorityRestoredSource, TAuthorityRestoredEntry } from './classes.authoritybackup.js';
|
|
3
|
-
export declare const authorityRehearsalProtocolVersion: 1;
|
|
4
|
-
export declare const authorityRehearsalMaximumFrameBytes: number;
|
|
5
|
-
export declare const authorityRehearsalMaximumRecordBytes: number;
|
|
6
|
-
export declare const authorityRehearsalMaximumSourceBytes: number;
|
|
7
|
-
export interface IAuthorityRehearsalWireSource {
|
|
8
|
-
kind: 'source';
|
|
9
|
-
sourceKind: string;
|
|
10
|
-
sourceId: string;
|
|
11
|
-
sourceDigest: string;
|
|
12
|
-
linkedModel: string;
|
|
13
|
-
linkedId: string;
|
|
14
|
-
linkedDigestField: IAuthorityRestoredSource['linkedDigestField'];
|
|
15
|
-
bytesBase64url: string;
|
|
16
|
-
}
|
|
17
|
-
export type TAuthorityRehearsalWireEntry = IAuthorityRestoredRecord | IAuthorityRehearsalWireSource;
|
|
18
|
-
export type TAuthorityRehearsalParentMessage = {
|
|
19
|
-
version: 1;
|
|
20
|
-
type: 'stage';
|
|
21
|
-
sequence: number;
|
|
22
|
-
entry: TAuthorityRehearsalWireEntry;
|
|
23
|
-
} | {
|
|
24
|
-
version: 1;
|
|
25
|
-
type: 'finish';
|
|
26
|
-
sequence: number;
|
|
27
|
-
} | {
|
|
28
|
-
version: 1;
|
|
29
|
-
type: 'restore.next';
|
|
30
|
-
} | {
|
|
31
|
-
version: 1;
|
|
32
|
-
type: 'record.next';
|
|
33
|
-
} | {
|
|
34
|
-
version: 1;
|
|
35
|
-
type: 'source.next';
|
|
36
|
-
} | {
|
|
37
|
-
version: 1;
|
|
38
|
-
type: 'close';
|
|
39
|
-
};
|
|
40
|
-
export type TAuthorityRehearsalChildMessage = {
|
|
41
|
-
version: 1;
|
|
42
|
-
type: 'ready';
|
|
43
|
-
} | {
|
|
44
|
-
version: 1;
|
|
45
|
-
type: 'staged';
|
|
46
|
-
sequence: number;
|
|
47
|
-
} | {
|
|
48
|
-
version: 1;
|
|
49
|
-
type: 'input.complete';
|
|
50
|
-
} | {
|
|
51
|
-
version: 1;
|
|
52
|
-
type: 'restore.progress';
|
|
53
|
-
done: boolean;
|
|
54
|
-
} | {
|
|
55
|
-
version: 1;
|
|
56
|
-
type: 'record';
|
|
57
|
-
record: IAuthorityRestoredRecord | null;
|
|
58
|
-
} | {
|
|
59
|
-
version: 1;
|
|
60
|
-
type: 'source';
|
|
61
|
-
source: IAuthorityRehearsalWireSource | null;
|
|
62
|
-
} | {
|
|
63
|
-
version: 1;
|
|
64
|
-
type: 'closed';
|
|
65
|
-
} | {
|
|
66
|
-
version: 1;
|
|
67
|
-
type: 'failed';
|
|
68
|
-
phase: 'protocol' | 'staging' | 'restore' | 'readback' | 'cleanup';
|
|
69
|
-
};
|
|
70
|
-
export declare const parseAuthorityRehearsalWireEntry: (value: unknown) => TAuthorityRehearsalWireEntry;
|
|
71
|
-
export declare const restoredEntryToWire: (entry: TAuthorityRestoredEntry) => TAuthorityRehearsalWireEntry;
|
|
72
|
-
export declare const wireSourceToRestored: (source: IAuthorityRehearsalWireSource) => IAuthorityRestoredSource;
|
|
73
|
-
export declare const parseAuthorityRehearsalParentMessage: (value: unknown) => TAuthorityRehearsalParentMessage;
|
|
74
|
-
export declare const parseAuthorityRehearsalChildMessage: (value: unknown) => TAuthorityRehearsalChildMessage;
|
|
75
|
-
/** Single-reader/single-writer bounded transport for the isolated rehearsal child. */
|
|
76
|
-
export declare class AuthorityRehearsalFramedTransport<TIncoming, TOutgoing> {
|
|
77
|
-
private readonly options;
|
|
78
|
-
private readonly header;
|
|
79
|
-
private headerOffset;
|
|
80
|
-
private body?;
|
|
81
|
-
private bodyOffset;
|
|
82
|
-
private queued?;
|
|
83
|
-
private waiting?;
|
|
84
|
-
private failure?;
|
|
85
|
-
private closed;
|
|
86
|
-
private sending;
|
|
87
|
-
constructor(options: {
|
|
88
|
-
readable: plugins.stream.Readable;
|
|
89
|
-
writable: plugins.stream.Writable;
|
|
90
|
-
parseIncoming: (value: unknown) => TIncoming;
|
|
91
|
-
validateOutgoing: (value: unknown) => TOutgoing;
|
|
92
|
-
});
|
|
93
|
-
send(message: TOutgoing, timeoutMs: number, signal?: AbortSignal): Promise<void>;
|
|
94
|
-
receive(timeoutMs: number, signal?: AbortSignal): Promise<TIncoming>;
|
|
95
|
-
finishWritable(): Promise<void>;
|
|
96
|
-
destroy(): void;
|
|
97
|
-
private readonly onData;
|
|
98
|
-
private finishBody;
|
|
99
|
-
private readonly onReadError;
|
|
100
|
-
private readonly onWriteError;
|
|
101
|
-
private readonly onReadableClose;
|
|
102
|
-
private fail;
|
|
103
|
-
private detach;
|
|
104
|
-
}
|
|
105
|
-
export interface IAuthorityRehearsalChildLaunch {
|
|
106
|
-
entryPath: string;
|
|
107
|
-
args: string[];
|
|
108
|
-
options: plugins.childProcess.SpawnOptions;
|
|
109
|
-
}
|
|
110
|
-
export type TAuthorityRehearsalChildFactory = (launch: IAuthorityRehearsalChildLaunch) => plugins.childProcess.ChildProcess;
|
|
111
|
-
export interface IAuthSwitchAuthorityRehearsalOptions {
|
|
112
|
-
signal?: AbortSignal;
|
|
113
|
-
requestTimeoutMs?: number;
|
|
114
|
-
/** Test-only source runner seam. Never populate this from CLI, RPC or management input. */
|
|
115
|
-
childFactory?: TAuthorityRehearsalChildFactory;
|
|
116
|
-
}
|
|
117
|
-
export declare const resolveAuthorityRehearsalChildEntryPath: () => string;
|
|
118
|
-
export declare class AuthSwitchAuthorityRehearsal implements IAuthorityBackupRehearsal {
|
|
119
|
-
private readonly options;
|
|
120
|
-
private readonly requestTimeoutMs;
|
|
121
|
-
constructor(options?: IAuthSwitchAuthorityRehearsalOptions);
|
|
122
|
-
restoreClosed(entries: AsyncIterable<TAuthorityRestoredEntry>): Promise<IAuthorityBackupRehearsalReadback>;
|
|
123
|
-
private exchange;
|
|
124
|
-
private expect;
|
|
125
|
-
private closeReadback;
|
|
126
|
-
private abortChild;
|
|
127
|
-
}
|