@eddyskywalker/dsh-chatgpt-subscription 0.8.1 → 0.8.3
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/CHANGELOG.md +45 -0
- package/README.md +66 -1
- package/lib/client.js +1580 -287
- package/lib/client.js.map +1 -1
- package/lib/index.js +5432 -1757
- package/lib/types/client/CodexSubscriptionSection.d.ts.map +1 -1
- package/lib/types/client/ProviderHubSection.d.ts.map +1 -1
- package/lib/types/client/antigravity/AntigravitySection.d.ts.map +1 -1
- package/lib/types/client/antigravity/locales.d.ts +2 -2
- package/lib/types/client/command-code/CommandCodeSection.d.ts.map +1 -1
- package/lib/types/client/command-code/locales.d.ts +2 -2
- package/lib/types/client/common/quota-follow-up.d.ts +30 -0
- package/lib/types/client/common/quota-follow-up.d.ts.map +1 -0
- package/lib/types/client/index.d.ts +1 -0
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/kimi-code/KimiCodeSection.d.ts.map +1 -1
- package/lib/types/client/kimi-code/locales.d.ts +2 -2
- package/lib/types/client/locales.d.ts +1 -1
- package/lib/types/client/workbuddy/WorkBuddySection.d.ts.map +1 -1
- package/lib/types/client/workbuddy/locales.d.ts +60 -0
- package/lib/types/client/workbuddy/locales.d.ts.map +1 -1
- package/lib/types/client/zhipu/ZhipuComposerQuota.d.ts +26 -0
- package/lib/types/client/zhipu/ZhipuComposerQuota.d.ts.map +1 -0
- package/lib/types/client/zhipu/ZhipuSection.d.ts +11 -0
- package/lib/types/client/zhipu/ZhipuSection.d.ts.map +1 -0
- package/lib/types/client/zhipu/locales.d.ts +275 -0
- package/lib/types/client/zhipu/locales.d.ts.map +1 -0
- package/lib/types/client/zhipu/styles.d.ts +12 -0
- package/lib/types/client/zhipu/styles.d.ts.map +1 -0
- package/lib/types/host/antigravity/oauth.d.ts +15 -1
- package/lib/types/host/antigravity/oauth.d.ts.map +1 -1
- package/lib/types/host/antigravity/port-constants.d.ts +20 -0
- package/lib/types/host/antigravity/port-constants.d.ts.map +1 -0
- package/lib/types/host/antigravity/routes.d.ts.map +1 -1
- package/lib/types/host/command-code/client.d.ts +9 -1
- package/lib/types/host/command-code/client.d.ts.map +1 -1
- package/lib/types/host/command-code/routes.d.ts.map +1 -1
- package/lib/types/host/common/catalog-snapshot.d.ts +61 -0
- package/lib/types/host/common/catalog-snapshot.d.ts.map +1 -0
- package/lib/types/host/common/credential-read-cache.d.ts +73 -0
- package/lib/types/host/common/credential-read-cache.d.ts.map +1 -0
- package/lib/types/host/common/quota-refresh.d.ts +35 -0
- package/lib/types/host/common/quota-refresh.d.ts.map +1 -0
- package/lib/types/host/common/same-origin.d.ts +30 -0
- package/lib/types/host/common/same-origin.d.ts.map +1 -0
- package/lib/types/host/credential-store-secret-service.d.ts +1 -0
- package/lib/types/host/credential-store-secret-service.d.ts.map +1 -1
- package/lib/types/host/kimi-code/client.d.ts.map +1 -1
- package/lib/types/host/kimi-code/routes.d.ts.map +1 -1
- package/lib/types/host/routes.d.ts.map +1 -1
- package/lib/types/host/token-store-macos.d.ts +9 -0
- package/lib/types/host/token-store-macos.d.ts.map +1 -1
- package/lib/types/host/token-store-windows.d.ts +8 -0
- package/lib/types/host/token-store-windows.d.ts.map +1 -1
- package/lib/types/host/usage-service.d.ts +19 -1
- package/lib/types/host/usage-service.d.ts.map +1 -1
- package/lib/types/host/workbuddy/checkin.d.ts +134 -0
- package/lib/types/host/workbuddy/checkin.d.ts.map +1 -0
- package/lib/types/host/workbuddy/client.d.ts +9 -1
- package/lib/types/host/workbuddy/client.d.ts.map +1 -1
- package/lib/types/host/workbuddy/routes.d.ts +3 -0
- package/lib/types/host/workbuddy/routes.d.ts.map +1 -1
- package/lib/types/host/workbuddy/token-store.d.ts +24 -1
- package/lib/types/host/workbuddy/token-store.d.ts.map +1 -1
- package/lib/types/host/zhipu/account-pool.d.ts +43 -0
- package/lib/types/host/zhipu/account-pool.d.ts.map +1 -0
- package/lib/types/host/zhipu/adapter.d.ts +93 -0
- package/lib/types/host/zhipu/adapter.d.ts.map +1 -0
- package/lib/types/host/zhipu/client.d.ts +153 -0
- package/lib/types/host/zhipu/client.d.ts.map +1 -0
- package/lib/types/host/zhipu/mapper.d.ts +111 -0
- package/lib/types/host/zhipu/mapper.d.ts.map +1 -0
- package/lib/types/host/zhipu/model-catalog.d.ts +73 -0
- package/lib/types/host/zhipu/model-catalog.d.ts.map +1 -0
- package/lib/types/host/zhipu/routes.d.ts +33 -0
- package/lib/types/host/zhipu/routes.d.ts.map +1 -0
- package/lib/types/host/zhipu/token-store.d.ts +112 -0
- package/lib/types/host/zhipu/token-store.d.ts.map +1 -0
- package/lib/types/host/zhipu/types.d.ts +125 -0
- package/lib/types/host/zhipu/types.d.ts.map +1 -0
- package/lib/types/index.d.ts +8 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/antigravity-contracts.d.ts +8 -0
- package/lib/types/shared/antigravity-contracts.d.ts.map +1 -1
- package/lib/types/shared/command-code-contracts.d.ts +8 -0
- package/lib/types/shared/command-code-contracts.d.ts.map +1 -1
- package/lib/types/shared/contracts.d.ts +8 -0
- package/lib/types/shared/contracts.d.ts.map +1 -1
- package/lib/types/shared/kimi-code-contracts.d.ts +8 -0
- package/lib/types/shared/kimi-code-contracts.d.ts.map +1 -1
- package/lib/types/shared/workbuddy-contracts.d.ts +48 -0
- package/lib/types/shared/workbuddy-contracts.d.ts.map +1 -1
- package/lib/types/shared/zhipu-contracts.d.ts +164 -0
- package/lib/types/shared/zhipu-contracts.d.ts.map +1 -0
- package/package.json +32 -33
- package/lib/types/host/compaction-patch.d.ts +0 -17
- package/lib/types/host/compaction-patch.d.ts.map +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { IncomingMessage } from 'node:http';
|
|
2
|
+
/**
|
|
3
|
+
* Whether one mutation request comes from this application's own document.
|
|
4
|
+
*
|
|
5
|
+
* Two shapes reach these routes:
|
|
6
|
+
*
|
|
7
|
+
* 1. A browser page served by this Host. The browser states its origin, and it
|
|
8
|
+
* must name the same authority the request was addressed to. A cross-site
|
|
9
|
+
* POST always states the foreign origin, so this comparison is what rejects
|
|
10
|
+
* it.
|
|
11
|
+
*
|
|
12
|
+
* 2. The DSH Desktop shell. Electron's `forwardWebRequest` admits only requests
|
|
13
|
+
* whose origin is the `dsh-app://app` document, then *removes* the `origin`
|
|
14
|
+
* header before forwarding to the Host — that application scheme is not an
|
|
15
|
+
* HTTP origin the Host could compare against. A forwarded request therefore
|
|
16
|
+
* arrives with no `origin` at all, addressed to the loopback Host.
|
|
17
|
+
*
|
|
18
|
+
* A missing `origin` is consequently accepted only when the request was
|
|
19
|
+
* addressed to a loopback authority, and a stated `origin` must still match
|
|
20
|
+
* exactly. This is not a CSRF opening: a browser cannot issue a cross-site POST
|
|
21
|
+
* without stating the foreign origin, so every cross-site request still fails
|
|
22
|
+
* the comparison — the loopback clause admits only the desktop shell's already
|
|
23
|
+
* validated forward, and a request that never reached loopback keeps the strict
|
|
24
|
+
* requirement.
|
|
25
|
+
*
|
|
26
|
+
* @param request - Incoming mutation request.
|
|
27
|
+
* @returns whether the request may be treated as same-origin.
|
|
28
|
+
*/
|
|
29
|
+
export declare function isSameOriginMutation(request: IncomingMessage): boolean;
|
|
30
|
+
//# sourceMappingURL=same-origin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"same-origin.d.ts","sourceRoot":"","sources":["../../../../src/host/common/same-origin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAYtE"}
|
|
@@ -4,6 +4,7 @@ export declare class SecretServiceCredentialStore<T> implements CredentialStore<
|
|
|
4
4
|
private readonly service;
|
|
5
5
|
private readonly account;
|
|
6
6
|
private readonly parse;
|
|
7
|
+
private readonly cache;
|
|
7
8
|
constructor(service: string, account: string, parse: (value: unknown) => T);
|
|
8
9
|
private attributes;
|
|
9
10
|
load(): Promise<T | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-store-secret-service.d.ts","sourceRoot":"","sources":["../../../src/host/credential-store-secret-service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"credential-store-secret-service.d.ts","sourceRoot":"","sources":["../../../src/host/credential-store-secret-service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAevD,0FAA0F;AAC1F,qBAAa,4BAA4B,CAAC,CAAC,CAAE,YAAW,eAAe,CAAC,CAAC,CAAC;IAMtE,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAPxB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAErB;gBAGkB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,CAAC;IAG/C,OAAO,CAAC,UAAU;IAIZ,IAAI,IAAI,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAazB,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAS7B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAK7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,aAAa,EAQd,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,mBAAmB,EAEnB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAA;AAGzB,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACn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E,OAAO,EACjB,OAAO,CAAC,EAAE,OAAO,GAChB,eAAe,CAwBjB;AAED;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAChC,KAAK,EAAE,mBAAmB,EAC1B,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAmBzB;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CACjC,KAAK,EAAE,mBAAmB,EAC1B,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAoBjC;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,KAAK,EAAE,mBAAmB,EAC1B,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC;IAAE,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAejE;AAED,OAAO,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAIlD,OAAO,EAEL,WAAW,EACX,aAAa,EAId,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EAEtB,KAAK,oBAAoB,EAGzB,KAAK,uBAAuB,EAC7B,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAcvD,OAAO,EAML,KAAK,iBAAiB,EACvB,MAAM,qCAAqC,CAAA;AAwD5C;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,E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":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../src/host/routes.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAGlD,OAAO,KAAK,EAIV,qBAAqB,EAEtB,MAAM,wBAAwB,CAAA;AAG/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAE/D,OAAO,EAAE,YAAY,EAAe,MAAM,oBAAoB,CAAA;AAC9D,OAAO,EAAmB,KAAK,2BAA2B,EAAE,MAAM,kBAAkB,CAAA;AACpF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AAC3E,OAAO,EAAE,YAAY,EAAqB,MAAM,oBAAoB,CAAA;AAIpE,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAA;AAEpF,wBAAgB,cAAc,CAC5B,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,YAAY,EACnB,WAAW,EAAE,2BAA2B,EACxC,YAAY,CAAC,EAAE,YAAY,EAC3B,cAAc,CAAC,EAAE,sBAAsB,EACvC,UAAU,CAAC,EAAE,gBAAgB,EAC7B,WAAW,CAAC,EAAE,gBAAgB,GAC7B,MAAM,IAAI,CAyOZ"}
|
|
@@ -12,6 +12,15 @@ export declare class MacKeychainCredentialStore<T> implements CredentialStore<T>
|
|
|
12
12
|
readonly kind: "macos-keychain";
|
|
13
13
|
readonly encrypted: true;
|
|
14
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* Snapshot of the last keychain read.
|
|
17
|
+
*
|
|
18
|
+
* A keychain lookup spawns `security`, and one settings request performs
|
|
19
|
+
* several of them. There is no file to compare against, so the snapshot is
|
|
20
|
+
* keyed on a short time bucket instead — see
|
|
21
|
+
* {@link keyringCredentialIdentity}.
|
|
22
|
+
*/
|
|
23
|
+
private readonly cache;
|
|
15
24
|
constructor(service: string, account: string, parse: (value: unknown) => T);
|
|
16
25
|
load(): Promise<T | null>;
|
|
17
26
|
save(value: T): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-store-macos.d.ts","sourceRoot":"","sources":["../../../src/host/token-store-macos.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"token-store-macos.d.ts","sourceRoot":"","sources":["../../../src/host/token-store-macos.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAe3F;;;;GAIG;AACH,qBAAa,0BAA0B,CAAC,CAAC,CAAE,YAAW,eAAe,CAAC,CAAC,CAAC;IAepE,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAhBxB,QAAQ,CAAC,OAAO;;;MAAuD;IACvE;;;;;;;OAOG;IACH,OAAO,CAAC,QAAQ,CAAC,KAAK,CAErB;gBAGkB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,CAAC;IAKzC,IAAI,IAAI,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAazB,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAM7B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAK7B;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAM5D;AAED,qBAAa,qBAAsB,SAAQ,0BAA0B,CAAC,sBAAsB,CAAE,YAAW,UAAU;gBACrG,OAAO,SAAkB,EAAE,OAAO,SAAkB;CAGjE"}
|
|
@@ -7,6 +7,14 @@ export declare class WindowsDpapiCredentialStore<T> implements CredentialStore<T
|
|
|
7
7
|
readonly kind: "windows-dpapi";
|
|
8
8
|
readonly encrypted: true;
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Decrypted snapshot, validated against the file's own mtime and size.
|
|
12
|
+
*
|
|
13
|
+
* Every uncached read is a spawned `powershell.exe` (~200 ms), and one
|
|
14
|
+
* settings request reads several credentials, so the snapshot is what keeps a
|
|
15
|
+
* tab switch from costing seconds.
|
|
16
|
+
*/
|
|
17
|
+
private readonly cache;
|
|
10
18
|
constructor(path: string, parse: (value: unknown) => T);
|
|
11
19
|
load(): Promise<T | null>;
|
|
12
20
|
save(value: T): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-store-windows.d.ts","sourceRoot":"","sources":["../../../src/host/token-store-windows.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"token-store-windows.d.ts","sourceRoot":"","sources":["../../../src/host/token-store-windows.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AA+C3F,wBAAgB,0BAA0B,IAAI,MAAM,CAGnD;AAED,qBAAa,2BAA2B,CAAC,CAAC,CAAE,YAAW,eAAe,CAAC,CAAC,CAAC;IAW3D,OAAO,CAAC,QAAQ,CAAC,IAAI;IAAU,OAAO,CAAC,QAAQ,CAAC,KAAK;IAVjE,QAAQ,CAAC,OAAO;;;MAAsD;IACtE;;;;;;OAMG;IACH,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAsE;gBAE/D,IAAI,EAAE,MAAM,EAAmB,KAAK,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,CAAC;IAKlF,IAAI,IAAI,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAazB,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ7B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAK7B;AAED,qBAAa,sBAAuB,SAAQ,2BAA2B,CAAC,sBAAsB,CAAE,YAAW,UAAU;gBACvG,IAAI,SAA+B;CAGhD"}
|
|
@@ -6,6 +6,15 @@ export interface UsageServiceOptions {
|
|
|
6
6
|
fetchFn?: FetchLike;
|
|
7
7
|
now?: () => number;
|
|
8
8
|
}
|
|
9
|
+
/** How one status read may treat a snapshot that has aged past its TTL. */
|
|
10
|
+
export interface UsageStatusOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Answer from an existing snapshot and refresh behind it, instead of waiting
|
|
13
|
+
* for the upstream request. A caller that must not show aged numbers — or has
|
|
14
|
+
* no snapshot to show — leaves this off.
|
|
15
|
+
*/
|
|
16
|
+
backgroundRefresh?: boolean;
|
|
17
|
+
}
|
|
9
18
|
export declare class UsageService {
|
|
10
19
|
private readonly oauth;
|
|
11
20
|
private readonly fetchFn;
|
|
@@ -26,7 +35,16 @@ export declare class UsageService {
|
|
|
26
35
|
private inFlight;
|
|
27
36
|
private resetConsumeInFlight;
|
|
28
37
|
constructor(oauth: OAuthService, options?: UsageServiceOptions);
|
|
29
|
-
status(authenticated: boolean, force?: boolean): Promise<QuotaStatusDto>;
|
|
38
|
+
status(authenticated: boolean, force?: boolean, options?: UsageStatusOptions): Promise<QuotaStatusDto>;
|
|
39
|
+
/** Whether a quota refresh is running, so a caller can ask again when it lands. */
|
|
40
|
+
get refreshing(): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Refresh behind an answer that has already been given.
|
|
43
|
+
*
|
|
44
|
+
* The rejection is absorbed here: this refresh has no caller to receive it,
|
|
45
|
+
* and {@link fromCache} keeps serving the snapshot it failed to replace.
|
|
46
|
+
*/
|
|
47
|
+
private startBackgroundRefresh;
|
|
30
48
|
invalidate(): void;
|
|
31
49
|
/**
|
|
32
50
|
* When one credential's Codex window reopens, from the last snapshot.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usage-service.d.ts","sourceRoot":"","sources":["../../../src/host/usage-service.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,aAAa,EACb,cAAc,EAEf,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAA;AAE9D,KAAK,SAAS,GAAG,OAAO,KAAK,CAAA;AA0B7B,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;CACnB;AAED,qBAAa,YAAY;IAqBX,OAAO,CAAC,QAAQ,CAAC,KAAK;IApBlC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAW;IACnC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAc;IAClC,OAAO,CAAC,KAAK,CAA0B;IAGvC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiE;IAC3F,OAAO,CAAC,cAAc,CAAI;IAC1B,OAAO,CAAC,YAAY,CAAI;IACxB,OAAO,CAAC,WAAW,CAAQ;IAC3B;;;;;;OAMG;IACH,OAAO,CAAC,qBAAqB,CAAsB;IACnD,OAAO,CAAC,QAAQ,CAAuC;IACvD,OAAO,CAAC,oBAAoB,CAAuC;gBAEtC,KAAK,EAAE,YAAY,EAAE,OAAO,GAAE,mBAAwB;IAK7E,MAAM,CAAC,aAAa,EAAE,OAAO,EAAE,KAAK,UAAQ,GAAG,OAAO,CAAC,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"usage-service.d.ts","sourceRoot":"","sources":["../../../src/host/usage-service.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,aAAa,EACb,cAAc,EAEf,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;A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,CAAC,WAAW,EAAE,sBAAsB,GAAG,IAAI;IAInD,kBAAkB,IAAI,OAAO,CAAC,cAAc,CAAC;YAQrC,0BAA0B;IA2DlC,cAAc,IAAI,OAAO,CAAC,iBAAiB,CAAC;YASpC,eAAe;IAgD7B,OAAO,CAAC,KAAK;IAMb,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,SAAS;IAiBjB,OAAO,CAAC,OAAO;CAGhB;AAED,qBAAa,iBAAkB,SAAQ,KAAK;IAC9B,QAAQ,CAAC,WAAW,EAAE,cAAc;gBAA3B,WAAW,EAAE,cAAc;CAGjD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,EAAE,CAE9D;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,CAwB7D;AAuED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG;IAAE,cAAc,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,kBAAkB,EAAE,MAAM,EAAE,CAAA;CAAE,CAmBpI"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Daily check-in scheduler for the CN-region billing activity.
|
|
3
|
+
*
|
|
4
|
+
* Ported from workbuddy2api's `daily_checkin.py` and adapted to this host:
|
|
5
|
+
* the cron job becomes an in-process timer (the plugin runs inside the DSH
|
|
6
|
+
* host, so a day the host never runs is a day nothing signs in — accepted and
|
|
7
|
+
* documented), and the per-file state JSON becomes one state document under
|
|
8
|
+
* the harness home. The semantics are kept exactly:
|
|
9
|
+
*
|
|
10
|
+
* - **CN only.** The international deployment exposes no check-in surface, so
|
|
11
|
+
* those accounts are skipped rather than failing daily.
|
|
12
|
+
* - **Idempotent.** The activity status is queried first; an account already
|
|
13
|
+
* signed in (by anyone) is only recorded. An account whose activity reports
|
|
14
|
+
* no entitlement is parked (see {@link CHECKIN_INACTIVE_RECHECK_MS}) rather
|
|
15
|
+
* than abandoned for the day: the host often starts before the activity's
|
|
16
|
+
* daily opening, and treating that first answer as final cost the account its
|
|
17
|
+
* only chance to sign in. Once everyone is settled, a tick sends no requests.
|
|
18
|
+
* - **Bounded.** A failing account is retried at most {@link CHECKIN_ATTEMPT_CAP}
|
|
19
|
+
* times a day, so a broken account cannot turn the ten-minute tick into a
|
|
20
|
+
* request loop. A manual run ignores the cap and the window, like the
|
|
21
|
+
* reference script's `--now`, and is queued behind an in-flight run rather
|
|
22
|
+
* than dropped into it (a click must actually mean "try again now").
|
|
23
|
+
*
|
|
24
|
+
* Tokens stay host-side: the only write beyond the state file is the existing
|
|
25
|
+
* credential store's refresh write-back, reused here unchanged.
|
|
26
|
+
*/
|
|
27
|
+
import { type FileCredentialStore } from './token-store.ts';
|
|
28
|
+
import type { WorkBuddyCheckinSettings, WorkBuddyCheckinSummary } from '../../shared/workbuddy-contracts.ts';
|
|
29
|
+
/** Activity status surface; answers whether today is signed in already. */
|
|
30
|
+
export declare const CHECKIN_STATUS_PATH = "/billing/meter/checkin-activity-status";
|
|
31
|
+
/** Check-in surface; credits are granted by posting here once a day. */
|
|
32
|
+
export declare const CHECKIN_PATH = "/billing/meter/daily-checkin";
|
|
33
|
+
/**
|
|
34
|
+
* Scheduler cadence. The first tick at host startup is the daily run; the
|
|
35
|
+
* interval keeps a long-lived process signing in on later days without a
|
|
36
|
+
* restart. Idle ticks cost no requests — the day state short-circuits them.
|
|
37
|
+
*/
|
|
38
|
+
export declare const CHECKIN_TICK_MS: number;
|
|
39
|
+
/** Daily retry ceiling for one account after a failed attempt. */
|
|
40
|
+
export declare const CHECKIN_ATTEMPT_CAP = 3;
|
|
41
|
+
export declare const CHECKIN_TIMEOUT_MS = 20000;
|
|
42
|
+
/**
|
|
43
|
+
* How long an unentitled account waits before the activity is polled again.
|
|
44
|
+
*
|
|
45
|
+
* The activity opens on its own schedule, so the first inactive answer of the
|
|
46
|
+
* day is frequently 'not open yet' rather than 'no entitlement today'. Hourly
|
|
47
|
+
* re-checks keep a host that booted early from missing the day, while still
|
|
48
|
+
* costing at most one status request per hour per account.
|
|
49
|
+
*/
|
|
50
|
+
export declare const CHECKIN_INACTIVE_RECHECK_MS: number;
|
|
51
|
+
/** State document the scheduler keeps beside the other plugin stores. */
|
|
52
|
+
export declare function checkinStatePath(): string;
|
|
53
|
+
/** Local calendar day an instant belongs to; state entries are keyed by it. */
|
|
54
|
+
export declare function localDateString(nowMs: number): string;
|
|
55
|
+
export interface WorkBuddyCheckinServiceOptions {
|
|
56
|
+
fetchFn?: typeof fetch;
|
|
57
|
+
/** State document path; tests redirect it, production uses {@link checkinStatePath}. */
|
|
58
|
+
statePath?: string;
|
|
59
|
+
/** Live preferences, re-read on every tick so the toggle applies at once. */
|
|
60
|
+
settings: () => WorkBuddyCheckinSettings;
|
|
61
|
+
/**
|
|
62
|
+
* Resolves once the preference store has read its stored document.
|
|
63
|
+
*
|
|
64
|
+
* Optional for callers whose settings are already in memory; the host passes
|
|
65
|
+
* the preference store's own warmup so the startup pass cannot act on a
|
|
66
|
+
* default that the stored document is about to overwrite.
|
|
67
|
+
*/
|
|
68
|
+
ready?: () => Promise<void>;
|
|
69
|
+
/** Clock injection for tests. */
|
|
70
|
+
now?: () => number;
|
|
71
|
+
logger?: {
|
|
72
|
+
info(message: string): void;
|
|
73
|
+
warn(message: string): void;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The check-in scheduler. One instance per plugin load; the host owns the
|
|
78
|
+
* interval and clears it from the same `ctx.effect` that created it.
|
|
79
|
+
*/
|
|
80
|
+
export declare class WorkBuddyCheckinService {
|
|
81
|
+
private readonly store;
|
|
82
|
+
private readonly options;
|
|
83
|
+
private readonly fetchFn;
|
|
84
|
+
private readonly statePath;
|
|
85
|
+
private readonly now;
|
|
86
|
+
private readonly logger;
|
|
87
|
+
private state;
|
|
88
|
+
private loaded;
|
|
89
|
+
/** Passes waiting to run, in order; `true` marks a manual pass. */
|
|
90
|
+
private readonly queue;
|
|
91
|
+
/** The drain loop currently working the queue, if any. */
|
|
92
|
+
private draining;
|
|
93
|
+
private lastRunAt;
|
|
94
|
+
/** Memoized preference warmup, so it is awaited once however many passes run. */
|
|
95
|
+
private readyWait;
|
|
96
|
+
constructor(store: FileCredentialStore, options: WorkBuddyCheckinServiceOptions);
|
|
97
|
+
/**
|
|
98
|
+
* One scheduler pass. Automatic passes honour the toggle and the retry cap;
|
|
99
|
+
* a manual pass (`manual: true`, the card's "check in now") ignores both
|
|
100
|
+
* but still respects an account already signed in today.
|
|
101
|
+
*
|
|
102
|
+
* A manual pass that lands while a run is already in flight is *queued*, not
|
|
103
|
+
* absorbed: joining the running pass would silently discard the one thing the
|
|
104
|
+
* button promises, that the retry cap and the toggle are bypassed now.
|
|
105
|
+
*/
|
|
106
|
+
tick(manual?: boolean): Promise<void>;
|
|
107
|
+
/** Run queued passes one after another until the queue empties. */
|
|
108
|
+
private drain;
|
|
109
|
+
private runQueue;
|
|
110
|
+
private run;
|
|
111
|
+
/** Wait for the preference store's warmup read, once. */
|
|
112
|
+
private ready;
|
|
113
|
+
/** Check one account in, recording the outcome in its today's entry. */
|
|
114
|
+
private checkinOne;
|
|
115
|
+
/** Record a confirmed sign-in, clearing the transient failure bookkeeping. */
|
|
116
|
+
private markSignedIn;
|
|
117
|
+
/**
|
|
118
|
+
* Refresh a token the server rejected, bypassing the store's expiry check.
|
|
119
|
+
*
|
|
120
|
+
* `ensureFresh` only acts on a locally expired token, so a session the server
|
|
121
|
+
* revoked early would otherwise fail every retry until the file's own clock
|
|
122
|
+
* caught up. The rotation is written back through the store either way.
|
|
123
|
+
*/
|
|
124
|
+
private forceRefresh;
|
|
125
|
+
/**
|
|
126
|
+
* The aggregate the settings card renders. Reads only local state and the
|
|
127
|
+
* account list; it never spends a network request.
|
|
128
|
+
*/
|
|
129
|
+
summary(): Promise<WorkBuddyCheckinSummary>;
|
|
130
|
+
private load;
|
|
131
|
+
private save;
|
|
132
|
+
private post;
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=checkin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkin.d.ts","sourceRoot":"","sources":["../../../../src/host/workbuddy/checkin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAOH,OAAO,EAEL,KAAK,mBAAmB,EAEzB,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EACV,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,qCAAqC,CAAA;AAE5C,2EAA2E;AAC3E,eAAO,MAAM,mBAAmB,2CAA2C,CAAA;AAC3E,wEAAwE;AACxE,eAAO,MAAM,YAAY,iCAAiC,CAAA;AAC1D;;;;GAIG;AACH,eAAO,MAAM,eAAe,QAAiB,CAAA;AAC7C,kEAAkE;AAClE,eAAO,MAAM,mBAAmB,IAAI,CAAA;AACpC,eAAO,MAAM,kBAAkB,QAAS,CAAA;AACxC;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,QAAiB,CAAA;AAEzD,yEAAyE;AACzE,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,+EAA+E;AAC/E,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKrD;AA2GD,MAAM,WAAW,8BAA8B;IAC7C,OAAO,CAAC,EAAE,OAAO,KAAK,CAAA;IACtB,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,wBAAwB,CAAA;IACxC;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3B,iCAAiC;IACjC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE;QACP,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;QAC3B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;KAC5B,CAAA;CACF;AAED;;;GAGG;AACH,qBAAa,uBAAuB;IAiBhC,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAjB1B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAc;IACtC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAQ;IAClC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAc;IAClC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0C;IACjE,OAAO,CAAC,KAAK,CAA0C;IACvD,OAAO,CAAC,MAAM,CAAQ;IACtB,mEAAmE;IACnE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,0DAA0D;IAC1D,OAAO,CAAC,QAAQ,CAA6B;IAE7C,OAAO,CAAC,SAAS,CAAsB;IACvC,iFAAiF;IACjF,OAAO,CAAC,SAAS,CAA6B;gBAG3B,KAAK,EAAE,mBAAmB,EAC1B,OAAO,EAAE,8BAA8B;IAQ1D;;;;;;;;OAQG;IACG,IAAI,CAAC,MAAM,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAWzC,mEAAmE;IACnE,OAAO,CAAC,KAAK;YAUC,QAAQ;YAoBR,GAAG;IAuCjB,yDAAyD;YAC3C,KAAK;IAOnB,wEAAwE;YAC1D,UAAU;IAkExB,8EAA8E;IAC9E,OAAO,CAAC,YAAY;IAWpB;;;;;;OAMG;YACW,YAAY;IAgB1B;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,uBAAuB,CAAC;YA+BnC,IAAI;YAuBJ,IAAI;YAaJ,IAAI;CAwBnB"}
|
|
@@ -61,7 +61,15 @@ export declare function clearCachedCatalog(): void;
|
|
|
61
61
|
* falls back, which keeps a first run usable before sign-in.
|
|
62
62
|
*/
|
|
63
63
|
export declare function fetchConfigCatalog(credentials: WorkBuddyCredentials, options?: WorkBuddyRequestOptions): Promise<WorkBuddyModelEntry[]>;
|
|
64
|
-
/** Cached catalog with a TTL; a failed refresh keeps the previous snapshot.
|
|
64
|
+
/** Cached catalog with a TTL; a failed refresh keeps the previous snapshot.
|
|
65
|
+
*
|
|
66
|
+
* On the first cache miss of a process the persisted snapshot is rehydrated
|
|
67
|
+
* first, so a restart serves the previous listing without waiting on the
|
|
68
|
+
* network. An expired snapshot still answers immediately (stale) while a
|
|
69
|
+
* refresh runs in the background — the catalog is not fast-moving data, and
|
|
70
|
+
* waiting on an unreachable gateway turned a restart into the full discovery
|
|
71
|
+
* timeout on every model resolution.
|
|
72
|
+
*/
|
|
65
73
|
export declare function loadConfigCatalog(credentials: WorkBuddyCredentials, options?: WorkBuddyRequestOptions & {
|
|
66
74
|
force?: boolean;
|
|
67
75
|
}): Promise<WorkBuddyModelEntry[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/host/workbuddy/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACf,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAiBL,WAAW,EACX,aAAa,EAKd,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,mBAAmB,EAAsB,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AACrG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/host/workbuddy/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACf,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAiBL,WAAW,EACX,aAAa,EAKd,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,mBAAmB,EAAsB,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AACrG,OAAO,KAA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{ getCachedQuota } from './client.ts';
|
|
5
5
|
import { type WorkBuddyModelEntry } from './model-catalog.ts';
|
|
6
6
|
import type { WorkBuddyModelOption, WorkBuddyWebStatus } from '../../shared/workbuddy-contracts.ts';
|
|
7
|
+
import type { WorkBuddyCheckinService } from './checkin.ts';
|
|
7
8
|
import type { WorkBuddyAccountPool } from './account-pool.ts';
|
|
8
9
|
/**
|
|
9
10
|
* The selection the card should show.
|
|
@@ -24,6 +25,8 @@ export interface WorkBuddyStatusOptions {
|
|
|
24
25
|
conflict?: string | null | (() => string | null);
|
|
25
26
|
/** Multi-account pool this line schedules through; absent keeps the single-account card. */
|
|
26
27
|
accountPool?: WorkBuddyAccountPool;
|
|
28
|
+
/** Daily check-in scheduler; absent leaves the card's check-in row empty. */
|
|
29
|
+
checkin?: Pick<WorkBuddyCheckinService, 'tick' | 'summary'>;
|
|
27
30
|
}
|
|
28
31
|
/** Everything the settings card renders: account, quota, and the model catalog. */
|
|
29
32
|
export declare function getWorkBuddyWebStatus(store: FileCredentialStore, modelSettings: FileModelSettingsStore, preferences?: WorkBuddyPreferenceStore, options?: WorkBuddyStatusOptions): Promise<WorkBuddyWebStatus>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/host/workbuddy/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/host/workbuddy/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAIlD,OAAO,EAGL,sBAAsB,EACtB,WAAW,EACX,aAAa,EAEd,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EAGtB,KAAK,wBAAwB,EAC9B,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAKL,cAAc,EAIf,MA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AC,kBAAkB,CAAC,CAwE7B;AAED,qEAAqE;AACrE,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,mBAAmB,EAC1B,aAAa,EAAE,sBAAsB,EACrC,WAAW,CAAC,EAAE,wBAAwB,EACtC,OAAO,GAAE,sBAA2B,GACnC,MAAM,IAAI,CAiXZ;AAED,OAAO,EACL,WAAW,EACX,aAAa,EACb,sBAAsB,EACtB,cAAc,EACd,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,GACxB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { WorkBuddyReasoningEffort, WorkBuddyRegion } from '../../shared/workbuddy-contracts.ts';
|
|
1
|
+
import type { WorkBuddyCheckinSettings, WorkBuddyReasoningEffort, WorkBuddyRegion } from '../../shared/workbuddy-contracts.ts';
|
|
2
2
|
import { type ContextWindowOverridePatch } from '../common/context-window-overrides.ts';
|
|
3
3
|
import type { CredentialStore } from '../token-store.ts';
|
|
4
4
|
import { isIntlDomain } from './types.ts';
|
|
@@ -46,8 +46,20 @@ export interface WorkBuddyModelSettings {
|
|
|
46
46
|
selectedAccountId: string | null;
|
|
47
47
|
/** Desktop accounts hidden from this plugin without deleting CodeBuddy files. */
|
|
48
48
|
hiddenAccountIds: string[];
|
|
49
|
+
/** Daily check-in scheduler preferences. */
|
|
50
|
+
checkin: WorkBuddyCheckinSettings;
|
|
49
51
|
}
|
|
50
52
|
export interface WorkBuddyPreferenceStore {
|
|
53
|
+
/**
|
|
54
|
+
* Resolve once the store has read whatever it was going to read.
|
|
55
|
+
*
|
|
56
|
+
* The file-backed store warms up asynchronously, so `status()` answers from
|
|
57
|
+
* shipped defaults until that read settles. A caller that acts on a
|
|
58
|
+
* preference at startup — the check-in scheduler signing in on boot — must
|
|
59
|
+
* await this first, or it acts on the default instead of the user's choice.
|
|
60
|
+
* A register-backed store reads synchronously and resolves immediately.
|
|
61
|
+
*/
|
|
62
|
+
ready(): Promise<void>;
|
|
51
63
|
status(): WorkBuddyModelSettings;
|
|
52
64
|
update(patch: {
|
|
53
65
|
enabled?: boolean;
|
|
@@ -57,8 +69,18 @@ export interface WorkBuddyPreferenceStore {
|
|
|
57
69
|
defaultReasoningEffort?: WorkBuddyReasoningEffort | null;
|
|
58
70
|
selectedAccountId?: string | null;
|
|
59
71
|
hiddenAccountIds?: string[];
|
|
72
|
+
checkin?: Partial<WorkBuddyCheckinSettings>;
|
|
60
73
|
}): Promise<WorkBuddyModelSettings>;
|
|
61
74
|
}
|
|
75
|
+
/** Shipped check-in default: on. */
|
|
76
|
+
export declare const DEFAULT_CHECKIN_SETTINGS: WorkBuddyCheckinSettings;
|
|
77
|
+
/**
|
|
78
|
+
* Narrow an unknown stored/patched value into valid check-in settings.
|
|
79
|
+
*
|
|
80
|
+
* Documents written while the window was still configurable may carry
|
|
81
|
+
* startHour/endHour; those keys are inert now and dropped on the next write.
|
|
82
|
+
*/
|
|
83
|
+
export declare function normalizeCheckinSettings(value: unknown): WorkBuddyCheckinSettings;
|
|
62
84
|
/**
|
|
63
85
|
* Bind the model selection to the DSH settings document when the harness still
|
|
64
86
|
* offers one, and to the JSON file beside it otherwise: a harness without the
|
|
@@ -238,6 +260,7 @@ export declare class FileModelSettingsStore {
|
|
|
238
260
|
defaultReasoningEffort?: WorkBuddyReasoningEffort | null;
|
|
239
261
|
selectedAccountId?: string | null;
|
|
240
262
|
hiddenAccountIds?: string[];
|
|
263
|
+
checkin?: Partial<WorkBuddyCheckinSettings>;
|
|
241
264
|
}): Promise<WorkBuddyModelSettings>;
|
|
242
265
|
}
|
|
243
266
|
export { isIntlDomain };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-store.d.ts","sourceRoot":"","sources":["../../../../src/host/workbuddy/token-store.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;
|
|
1
|
+
{"version":3,"file":"token-store.d.ts","source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,OAAO,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,oBAAoB,CAAC,GACxE,OAAO,CAAC,oBAAoB,CAAC;IAuBhC;;;;;;;OAOG;IACG,SAAS,CAAC,WAAW,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;CAmClE;AAED,+EAA+E;AAC/E,qBAAa,sBAAsB;IACrB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,SAAsB;IAE3D,IAAI,IAAI,MAAM;IAIR,IAAI,IAAI,OAAO,CAAC,sBAAsB,CAAC;IA8CvC,KAAK,CAAC,QAAQ,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAOtD,cAAc,CAAC,KAAK,EAAE;QAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;QAC1B,yEAAyE;QACzE,sBAAsB,CAAC,EAAE,0BAA0B,CAAA;QACnD,sBAAsB,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAAA;QACxD,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QACjC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;QAC3B,OAAO,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,CAAA;KAC5C,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAyBpC;AAED,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { AccountPoolCore, type PoolAccountShape, type PoolData } from '../common/account-pool.ts';
|
|
2
|
+
import type { CredentialStore } from '../token-store.ts';
|
|
3
|
+
import { FileCredentialStore, type ZhipuCredentials } from './token-store.ts';
|
|
4
|
+
import type { ZhipuAccountSummaryDto, ZhipuRegion } from '../../shared/zhipu-contracts.ts';
|
|
5
|
+
/** One pooled GLM Coding Plan key: the credential plus the facts the card renders. */
|
|
6
|
+
export interface ZhipuPoolAccount extends PoolAccountShape<ZhipuCredentials> {
|
|
7
|
+
region: ZhipuRegion;
|
|
8
|
+
keyHint?: string;
|
|
9
|
+
apiBase?: string;
|
|
10
|
+
planLabel?: string;
|
|
11
|
+
planLevel?: string;
|
|
12
|
+
}
|
|
13
|
+
export type { ZhipuAccountSummaryDto };
|
|
14
|
+
/** Encrypted pool file this line owns; the pre-pool credential file stays the mirror. */
|
|
15
|
+
export declare function zhipuPoolPath(): string;
|
|
16
|
+
/** Validate and normalize one whole pool document. */
|
|
17
|
+
export declare function parseZhipuPoolData(value: unknown): PoolData<ZhipuPoolAccount>;
|
|
18
|
+
export interface ZhipuAccountPoolOptions {
|
|
19
|
+
/** Pre-pool credential file the pool mirrors its primary account into. */
|
|
20
|
+
store?: FileCredentialStore;
|
|
21
|
+
/** Test seam; production builds the platform backend from the pool path. */
|
|
22
|
+
backend?: CredentialStore<PoolData<ZhipuPoolAccount>>;
|
|
23
|
+
/** Accounts this pool accepts; defaults to the core's limit. */
|
|
24
|
+
maxAccounts?: number;
|
|
25
|
+
/** Account the card pinned, or null for automatic selection. */
|
|
26
|
+
preferAccountId?: () => string | null;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The GLM Coding Plan account pool.
|
|
30
|
+
*
|
|
31
|
+
* A Coding Plan credential is a long-lived console key with nothing to refresh,
|
|
32
|
+
* so this wrapper only supplies identity, display facts, and the mirror of the
|
|
33
|
+
* single-credential file the plugin used before the pool existed. Rotation is
|
|
34
|
+
* meaningful here for the same reason it is on the other key-based lines: a
|
|
35
|
+
* spent plan window is per-account, so another account can serve the turn.
|
|
36
|
+
*/
|
|
37
|
+
export declare class ZhipuAccountPool extends AccountPoolCore<ZhipuCredentials, ZhipuPoolAccount, ZhipuAccountSummaryDto> {
|
|
38
|
+
private readonly store;
|
|
39
|
+
constructor(options?: ZhipuAccountPoolOptions);
|
|
40
|
+
/** The pre-pool credential file this pool mirrors its primary account into. */
|
|
41
|
+
mirrorStore(): FileCredentialStore;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=account-pool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-pool.d.ts","sourceRoot":"","sources":["../../../../src/host/zhipu/account-pool.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,EAGf,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACd,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EACL,mBAAmB,EAInB,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,KAAK,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAE1F,sFAAsF;AACtF,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB,CAAC,gBAAgB,CAAC;IAC1E,MAAM,EAAE,WAAW,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,YAAY,EAAE,sBAAsB,EAAE,CAAA;AAEtC,yFAAyF;AACzF,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AASD,sDAAsD;AACtD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CA+C7E;AAmBD,MAAM,WAAW,uBAAuB;IACtC,0EAA0E;IAC1E,KAAK,CAAC,EAAE,mBAAmB,CAAA;IAC3B,4EAA4E;IAC5E,OAAO,CAAC,EAAE,eAAe,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAA;IACrD,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gEAAgE;IAChE,eAAe,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,CAAA;CACtC;AAED;;;;;;;;GAQG;AACH,qBAAa,gBAAiB,SAAQ,eAAe,CACnD,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,CACvB;IACC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAqB;gBAE/B,OAAO,GAAE,uBAA4B;IA6EjD,+EAA+E;IAC/E,WAAW,IAAI,mBAAmB;CAGnC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { LlmAdapter, LlmError, ReasoningEffortId, type GenerateOptions, type LlmModelInfo, type LlmProviderInfo, type LlmResolvedModelInfo, type PreparedAdapterCall, type ResolvedRetryPolicy, type StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
2
|
+
import { PROVIDER_ID, PROVIDER_NAME } from './types.ts';
|
|
3
|
+
import { FileCredentialStore, FileModelSettingsStore, type ZhipuPreferenceStore } from './token-store.ts';
|
|
4
|
+
import { type ZhipuModelEntry } from './model-catalog.ts';
|
|
5
|
+
import { type AttachmentImageReader } from './mapper.ts';
|
|
6
|
+
import type { ZhipuCredentials } from './token-store.ts';
|
|
7
|
+
import type { ZhipuAccountPool } from './account-pool.ts';
|
|
8
|
+
/**
|
|
9
|
+
* Effort this route materializes when the caller names none.
|
|
10
|
+
*
|
|
11
|
+
* Preference order: the caller's explicit level when the model accepts it,
|
|
12
|
+
* otherwise the user's configured level when the model accepts it, otherwise
|
|
13
|
+
* nothing. Nothing is a real answer on this route: the provider's own default
|
|
14
|
+
* is `max` for a model that takes an effort field, so omitting the field is not
|
|
15
|
+
* "no thinking" — it is the provider's documented default.
|
|
16
|
+
*
|
|
17
|
+
* A candidate outside the model's ladder is converged onto the nearest rung
|
|
18
|
+
* rather than sent, because an unsupported level is an error (`code 1214`), and
|
|
19
|
+
* rather than dropped, because dropping the user's explicit choice silently
|
|
20
|
+
* changes how hard the model thinks.
|
|
21
|
+
*/
|
|
22
|
+
export declare function resolveDefaultReasoningEffort(efforts: readonly string[], configuredEffort?: string | null): ReasoningEffortId | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Cooldown a 429 imposes when the service names no reset instant.
|
|
25
|
+
*
|
|
26
|
+
* The plan's allowance windows are hours long, so a shorter cooldown would
|
|
27
|
+
* rediscover the same exhausted window immediately.
|
|
28
|
+
*/
|
|
29
|
+
export declare const POOL_COOLDOWN_MS: number;
|
|
30
|
+
export interface ZhipuAdapterOptions {
|
|
31
|
+
fetchFn?: typeof fetch;
|
|
32
|
+
attachments?: AttachmentImageReader;
|
|
33
|
+
/** Live catalog loader seam; defaults to the managed `/models` call. */
|
|
34
|
+
loadCatalog?: (credentials: ZhipuCredentials) => Promise<ZhipuModelEntry[]>;
|
|
35
|
+
/**
|
|
36
|
+
* Multi-account pool this adapter rotates through.
|
|
37
|
+
*
|
|
38
|
+
* Absent leaves the line on its single-credential path, which is what the
|
|
39
|
+
* headless tests and any caller that predates the pool use.
|
|
40
|
+
*/
|
|
41
|
+
accountPool?: ZhipuAccountPool;
|
|
42
|
+
}
|
|
43
|
+
export declare class ZhipuAdapter extends LlmAdapter {
|
|
44
|
+
private readonly store;
|
|
45
|
+
private readonly modelSettings;
|
|
46
|
+
private readonly preferences?;
|
|
47
|
+
private readonly options;
|
|
48
|
+
/** Null keeps the pre-pool single-credential path. */
|
|
49
|
+
private readonly accountPool;
|
|
50
|
+
constructor(store?: FileCredentialStore, modelSettings?: FileModelSettingsStore, preferences?: ZhipuPreferenceStore | undefined, options?: ZhipuAdapterOptions);
|
|
51
|
+
providerInfo(provider: string): LlmProviderInfo;
|
|
52
|
+
providerRetryPolicy(): ResolvedRetryPolicy;
|
|
53
|
+
imageRequestPricing(): undefined;
|
|
54
|
+
private settings;
|
|
55
|
+
/**
|
|
56
|
+
* Credential the picker and the single-credential path read.
|
|
57
|
+
*
|
|
58
|
+
* With a pool installed the store holds the mirrored primary account, so this
|
|
59
|
+
* stays the same read path either way; the pool is consulted only when a
|
|
60
|
+
* request is actually served, which is where per-account rotation matters.
|
|
61
|
+
*/
|
|
62
|
+
private credentials;
|
|
63
|
+
private catalog;
|
|
64
|
+
listModels(provider?: string): Promise<readonly LlmModelInfo[]>;
|
|
65
|
+
resolveModel(provider: string, modelId: string, signal?: AbortSignal): Promise<LlmResolvedModelInfo>;
|
|
66
|
+
prepareCall(provider: string, model: string, signal?: AbortSignal): Promise<PreparedAdapterCall>;
|
|
67
|
+
stream(options: GenerateOptions): AsyncIterable<StreamChunk>;
|
|
68
|
+
/**
|
|
69
|
+
* Effort this request should carry, or `undefined` to send none.
|
|
70
|
+
*
|
|
71
|
+
* Order: the caller's explicit choice, then the user's configured level. Both
|
|
72
|
+
* are converged onto the model's own ladder — the provider rejects a level
|
|
73
|
+
* outside it — and a model that declares no ladder gets none, because sending
|
|
74
|
+
* an effort to a model that takes no such field is exactly the 400 this
|
|
75
|
+
* convergence exists to avoid.
|
|
76
|
+
*/
|
|
77
|
+
private effortFor;
|
|
78
|
+
private requestStream;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Map one failed HTTP response onto a DSH failure.
|
|
82
|
+
*
|
|
83
|
+
* The platform reports its own condition inside a JSON `code` while the status
|
|
84
|
+
* line stays generic, so the body is read for the cases the status alone cannot
|
|
85
|
+
* express. Several distinct conditions share one status — 429 covers a spent
|
|
86
|
+
* window, a lapsed plan, and a per-model entitlement gap — and they need
|
|
87
|
+
* different actions, which is exactly why the code decides.
|
|
88
|
+
*/
|
|
89
|
+
export declare function classifyFailure(status: number, detail: string, headers?: Headers): LlmError;
|
|
90
|
+
/** Read the platform's own numeric error code out of a response body. */
|
|
91
|
+
export declare function readErrorCode(detail: string): number | null;
|
|
92
|
+
export { PROVIDER_ID, PROVIDER_NAME };
|
|
93
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/zhipu/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,iBAAiB,EAEjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAA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