dsh-opendesign-corouter 0.1.4 → 0.1.6
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 +5 -5
- package/SECURITY.md +1 -1
- package/THIRD_PARTY_NOTICES.md +22 -1
- package/lib/browser-open.d.ts +104 -0
- package/lib/catalog.d.ts +9 -8
- package/lib/client.d.ts +8 -2
- package/lib/client.js +87 -12
- package/lib/device-auth.d.ts +5 -3
- package/lib/generated/typert.host.js +18 -4
- package/lib/generated/typert.remote-client.d.ts +2 -1
- package/lib/generated/typert.remote-client.js +18 -4
- package/lib/index.d.ts +5 -1
- package/lib/index.js +324 -16
- package/lib/index.js.map +3 -3
- package/lib/login.d.ts +10 -0
- package/lib/remote.d.ts +7 -0
- package/package.json +2 -2
package/lib/login.d.ts
CHANGED
|
@@ -31,6 +31,12 @@ export interface LoginOptions {
|
|
|
31
31
|
delay?: (ms: number, signal: AbortSignal) => Promise<void>;
|
|
32
32
|
/** May shorten, but cannot extend, the local five-minute maximum. */
|
|
33
33
|
timeoutMs?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Called once whenever an approval job leaves `waiting` — success, cancel, expiry or
|
|
36
|
+
* failure — including on a timer with nobody polling. Resource cleanup lives here
|
|
37
|
+
* instead of in a status getter, whose side effect depends on someone reading it.
|
|
38
|
+
*/
|
|
39
|
+
onSettled?: () => void;
|
|
34
40
|
}
|
|
35
41
|
export declare class LoginError extends Error {
|
|
36
42
|
readonly code: 'opendesign/login-state' | 'opendesign/login-disposed' | 'opendesign/login-capture';
|
|
@@ -47,6 +53,8 @@ export declare class ConsoleLogin {
|
|
|
47
53
|
constructor(callbacks: LoginCallbacks, options?: LoginOptions);
|
|
48
54
|
/** Explicit public allowlist. Codes are never available after waiting or expiry. */
|
|
49
55
|
status(): LoginStatus;
|
|
56
|
+
/** Host-only: the live approval link, so the Host can open it in a bounded window. */
|
|
57
|
+
activationLink(): string | undefined;
|
|
50
58
|
/** Synchronous/non-blocking and idempotent while capture/network/commit is pending. */
|
|
51
59
|
start(request: LoginStartRequest): LoginStatus;
|
|
52
60
|
cancel(request: LoginJobRequest): LoginStatus;
|
|
@@ -58,6 +66,8 @@ export declare class ConsoleLogin {
|
|
|
58
66
|
private expire;
|
|
59
67
|
private requestCancellation;
|
|
60
68
|
private finish;
|
|
69
|
+
/** Report one terminal transition per job, exactly once. */
|
|
70
|
+
private settle;
|
|
61
71
|
private run;
|
|
62
72
|
private commit;
|
|
63
73
|
}
|
package/lib/remote.d.ts
CHANGED
|
@@ -70,6 +70,11 @@ export interface SaveApiKeyRequest {
|
|
|
70
70
|
value: string;
|
|
71
71
|
expectedRevision: string;
|
|
72
72
|
}
|
|
73
|
+
/** Outcome of asking the Host to show the approval page in a temporary window. */
|
|
74
|
+
export interface ActivationOpenState {
|
|
75
|
+
code: 'opened' | 'no-link' | 'invalid-url' | 'unavailable' | 'failed';
|
|
76
|
+
opened: boolean;
|
|
77
|
+
}
|
|
73
78
|
/** Rebuild a `QuotaSnapshot` from an allowlist; unknown keys are dropped. */
|
|
74
79
|
export declare function parseQuotaSnapshot(value: unknown): QuotaSnapshot;
|
|
75
80
|
/** Rebuild a `LoginState` from an allowlist; the job's secret material never had a field here. */
|
|
@@ -89,3 +94,5 @@ export declare function parseCancelLoginRequest(value: unknown): CancelLoginRequ
|
|
|
89
94
|
* names a UTF-16 code point instead of the setting to fix.
|
|
90
95
|
*/
|
|
91
96
|
export declare function parseSaveApiKeyRequest(value: unknown): SaveApiKeyRequest;
|
|
97
|
+
/** The opener reports one public code; an unknown value is refused, never guessed. */
|
|
98
|
+
export declare function parseActivationOpenState(value: unknown): ActivationOpenState;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-opendesign-corouter",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "OpenDesign CoRouter:套餐赠送与付费模型双 Provider、桌面登录态额度及独立登录",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
},
|
|
95
95
|
"dependencies": {
|
|
96
96
|
"@deepseek-ai/schemastery": "~3.18.5",
|
|
97
|
+
"playwright-core": "1.63.0",
|
|
97
98
|
"zod": "4.6.6"
|
|
98
99
|
},
|
|
99
100
|
"overrides": {
|
|
@@ -115,7 +116,6 @@
|
|
|
115
116
|
"@types/react": "^18.3.1",
|
|
116
117
|
"@types/react-dom": "^18.3.0",
|
|
117
118
|
"esbuild": "^0.28.2",
|
|
118
|
-
"playwright-core": "1.63.0",
|
|
119
119
|
"react": "18.3.1",
|
|
120
120
|
"react-dom": "18.3.1",
|
|
121
121
|
"tsx": "^4.23.13",
|