@huaweidevtools/aishell-dsh-client-credentials 0.0.7 → 0.0.9
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/LICENSE +1 -1
- package/lib/client.js +915 -259
- package/lib/index.js +1577 -109
- package/lib/types/auth-tool.d.ts +108 -0
- package/lib/types/client/AishellAccountHint.d.ts +1 -1
- package/lib/types/client/CredentialFormInteraction.d.ts +2 -19
- package/lib/types/client/CredentialRequestForm.d.ts +64 -41
- package/lib/types/client/card-state.d.ts +58 -0
- package/lib/types/client/credential-form-visibility.d.ts +25 -58
- package/lib/types/client/index.d.ts +1 -1
- package/lib/types/client/locales.d.ts +42 -12
- package/lib/types/client/login-flow.d.ts +134 -0
- package/lib/types/client/permission-mode.d.ts +3 -3
- package/lib/types/form-request.d.ts +118 -0
- package/lib/types/index.d.ts +28 -50
- package/lib/types/login-status.d.ts +62 -0
- package/lib/types/out-of-band/contract.d.ts +199 -0
- package/lib/types/out-of-band/flow.d.ts +101 -0
- package/lib/types/out-of-band/listener.d.ts +233 -0
- package/lib/types/out-of-band/login.d.ts +123 -0
- package/lib/types/out-of-band/routes.d.ts +136 -0
- package/lib/types/prefill.d.ts +78 -0
- package/lib/types/reconcile.d.ts +3 -11
- package/package.json +5 -3
package/lib/types/reconcile.d.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*
|
|
18
18
|
* @module @huaweidevtools/aishell-dsh-client-credentials/reconcile
|
|
19
19
|
*/
|
|
20
|
-
import type {
|
|
20
|
+
import type { SignCredentials } from '@huaweidevtools/aishell-dsh-credentials-store/signer';
|
|
21
21
|
import type { SettingsPathOp } from '@deepseek-ai/dsh-settings';
|
|
22
22
|
/** One path-addressed status edit, shaped as `ctx.settings.mutate` takes. */
|
|
23
23
|
export type StatusOp = SettingsPathOp;
|
|
@@ -29,16 +29,8 @@ export type VerifyCredentials = (ak: string, sk: string, token?: string) => Prom
|
|
|
29
29
|
export type ReadStored = () => boolean;
|
|
30
30
|
/** Reads the recorded account-name hint this plugin last wrote, or `null` when none. */
|
|
31
31
|
export type ReadHint = () => string | null;
|
|
32
|
-
/** Store account names for the Huawei Cloud credentials this reconciler reads. */
|
|
33
|
-
export interface ReconcileAccounts {
|
|
34
|
-
readonly accessKey: string;
|
|
35
|
-
readonly secretKey: string;
|
|
36
|
-
readonly securityToken: string;
|
|
37
|
-
}
|
|
38
32
|
/** Collaborators the reconciler runs against; injected so they are testable. */
|
|
39
33
|
export interface CredentialReconcilerDeps {
|
|
40
|
-
/** Durable credential store; only `get` is read here, so a `Pick` suffices. */
|
|
41
|
-
readonly store: Pick<CredentialsStore, 'get'>;
|
|
42
34
|
/** Verifies against IAM; resolves the account (domain) name. */
|
|
43
35
|
readonly verify: VerifyCredentials;
|
|
44
36
|
/** Records the non-secret status the browser half reads. */
|
|
@@ -47,8 +39,8 @@ export interface CredentialReconcilerDeps {
|
|
|
47
39
|
readonly readStored: ReadStored;
|
|
48
40
|
/** Read the recorded `accessKeyIdHint` mirror this plugin owns. */
|
|
49
41
|
readonly readHint: ReadHint;
|
|
50
|
-
/**
|
|
51
|
-
readonly
|
|
42
|
+
/** Reads the stored pair; the bundle entry is decoded inside it. */
|
|
43
|
+
readonly readPair: () => SignCredentials | undefined;
|
|
52
44
|
}
|
|
53
45
|
/** The reconcile state machine; driven by a timer and the GET-route hook. */
|
|
54
46
|
export interface CredentialReconciler {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@huaweidevtools/aishell-dsh-client-credentials",
|
|
3
3
|
"description": "AI Shell credentials — chip-opened web form for storing Huawei Cloud AK/SK in the credential store",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.9",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -41,12 +41,13 @@
|
|
|
41
41
|
},
|
|
42
42
|
"license": "Apache-2.0",
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@huaweidevtools/aishell-dsh-credentials-store": "0.0.
|
|
44
|
+
"@huaweidevtools/aishell-dsh-credentials-store": "0.0.9"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@deepseek-ai/cordis": "^4.0.4",
|
|
48
48
|
"@deepseek-ai/dsh-client-connection": "0.2.0-rc.1 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1",
|
|
49
|
-
"@deepseek-ai/dsh-settings": "0.2.0-rc.1 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1"
|
|
49
|
+
"@deepseek-ai/dsh-settings": "0.2.0-rc.1 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1",
|
|
50
|
+
"@deepseek-ai/dsh-tools": "0.2.0-rc.1 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
53
|
"@deepseek-ai/cordis": "^4.0.4",
|
|
@@ -61,6 +62,7 @@
|
|
|
61
62
|
"@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.1 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1",
|
|
62
63
|
"@deepseek-ai/dsh-session": "0.2.0-rc.1 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1",
|
|
63
64
|
"@deepseek-ai/dsh-settings": "0.2.0-rc.1 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1",
|
|
65
|
+
"@deepseek-ai/dsh-tools": "0.2.0-rc.1 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1",
|
|
64
66
|
"@deepseek-ai/schemastery": "3.18.4",
|
|
65
67
|
"@types/react": "~18.3.1",
|
|
66
68
|
"react": "^18.2.0",
|