@eddyskywalker/dsh-chatgpt-subscription 0.6.8 → 0.8.0-alpha.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/CHANGELOG.md +48 -0
- package/README.md +20 -7
- package/lib/client.js +43 -11
- package/lib/client.js.map +1 -1
- package/lib/index.js +4092 -2751
- package/lib/types/client/antigravity/locales.d.ts +2 -2
- package/lib/types/client/command-code/locales.d.ts +2 -2
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/kimi-code/locales.d.ts +2 -2
- package/lib/types/client/locales.d.ts +5 -5
- package/lib/types/host/agent-preset.d.ts +113 -0
- package/lib/types/host/agent-preset.d.ts.map +1 -0
- package/lib/types/host/antigravity/adapter.d.ts.map +1 -1
- package/lib/types/host/antigravity/mapper.d.ts +2 -2
- package/lib/types/host/antigravity/mapper.d.ts.map +1 -1
- package/lib/types/host/antigravity/token-store.d.ts +1 -2
- package/lib/types/host/antigravity/token-store.d.ts.map +1 -1
- package/lib/types/host/codex-images.d.ts.map +1 -1
- package/lib/types/host/codex-search.d.ts.map +1 -1
- package/lib/types/host/command-code/adapter.d.ts.map +1 -1
- package/lib/types/host/command-code/mapper.d.ts +2 -2
- package/lib/types/host/command-code/mapper.d.ts.map +1 -1
- package/lib/types/host/command-code/token-store.d.ts +4 -5
- package/lib/types/host/command-code/token-store.d.ts.map +1 -1
- package/lib/types/host/common/account-pool.d.ts +66 -0
- package/lib/types/host/common/account-pool.d.ts.map +1 -1
- package/lib/types/host/common/file-preferences.d.ts +49 -0
- package/lib/types/host/common/file-preferences.d.ts.map +1 -0
- package/lib/types/host/common/legacy-preferences.d.ts +29 -0
- package/lib/types/host/common/legacy-preferences.d.ts.map +1 -0
- package/lib/types/host/common/llm-compat.d.ts +92 -0
- package/lib/types/host/common/llm-compat.d.ts.map +1 -0
- package/lib/types/host/common/settings-compat.d.ts +55 -0
- package/lib/types/host/common/settings-compat.d.ts.map +1 -0
- package/lib/types/host/compaction-patch.d.ts +17 -0
- package/lib/types/host/compaction-patch.d.ts.map +1 -0
- package/lib/types/host/kimi-code/adapter.d.ts.map +1 -1
- package/lib/types/host/kimi-code/client.d.ts +9 -0
- package/lib/types/host/kimi-code/client.d.ts.map +1 -1
- package/lib/types/host/kimi-code/mapper.d.ts +2 -2
- package/lib/types/host/kimi-code/mapper.d.ts.map +1 -1
- package/lib/types/host/kimi-code/token-store.d.ts +4 -5
- package/lib/types/host/kimi-code/token-store.d.ts.map +1 -1
- package/lib/types/host/kimi-code/video-tool.d.ts.map +1 -1
- package/lib/types/host/oauth-service.d.ts +53 -1
- package/lib/types/host/oauth-service.d.ts.map +1 -1
- package/lib/types/host/preferences.d.ts +16 -2
- package/lib/types/host/preferences.d.ts.map +1 -1
- package/lib/types/host/preset-sync.d.ts +29 -1
- package/lib/types/host/preset-sync.d.ts.map +1 -1
- package/lib/types/host/responses-client.d.ts +1 -1
- package/lib/types/host/responses-client.d.ts.map +1 -1
- package/lib/types/host/responses-mapper.d.ts +1 -1
- package/lib/types/host/responses-mapper.d.ts.map +1 -1
- package/lib/types/host/search-provider-switcher.d.ts.map +1 -1
- package/lib/types/host/subagent-model-authorization.d.ts +5 -4
- package/lib/types/host/subagent-model-authorization.d.ts.map +1 -1
- package/lib/types/host/token-store-macos.d.ts +7 -0
- package/lib/types/host/token-store-macos.d.ts.map +1 -1
- package/lib/types/host/usage-service.d.ts +8 -0
- package/lib/types/host/usage-service.d.ts.map +1 -1
- package/lib/types/host/workbuddy/account-pool.d.ts +30 -0
- package/lib/types/host/workbuddy/account-pool.d.ts.map +1 -1
- package/lib/types/host/workbuddy/adapter.d.ts.map +1 -1
- package/lib/types/host/workbuddy/client.d.ts +17 -0
- package/lib/types/host/workbuddy/client.d.ts.map +1 -1
- package/lib/types/host/workbuddy/identity.d.ts +71 -0
- package/lib/types/host/workbuddy/identity.d.ts.map +1 -0
- package/lib/types/host/workbuddy/mapper.d.ts +2 -2
- package/lib/types/host/workbuddy/mapper.d.ts.map +1 -1
- package/lib/types/host/workbuddy/oauth.d.ts +9 -0
- package/lib/types/host/workbuddy/oauth.d.ts.map +1 -1
- package/lib/types/host/workbuddy/routes.d.ts.map +1 -1
- package/lib/types/host/workbuddy/token-store.d.ts +30 -5
- package/lib/types/host/workbuddy/token-store.d.ts.map +1 -1
- package/lib/types/host/workbuddy/types.d.ts +9 -0
- package/lib/types/host/workbuddy/types.d.ts.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/contracts.d.ts +2 -0
- package/lib/types/shared/contracts.d.ts.map +1 -1
- package/lib/types/shared/model-catalog.d.ts +43 -7
- package/lib/types/shared/model-catalog.d.ts.map +1 -1
- package/lib/types/shared/preferences.d.ts.map +1 -1
- package/package.json +32 -30
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin-owned JSON storage for the preferences the settings document cannot hold.
|
|
3
|
+
*
|
|
4
|
+
* Harness 0.1.7 removed the register-based settings API, so the in-memory
|
|
5
|
+
* fallback this plugin used without a settings service would forget every
|
|
6
|
+
* selection at exit. The replacement keeps the same synchronous `get()`/`update()`/
|
|
7
|
+
* `watch()` contract the settings scope offers, hydrates once from a JSON file
|
|
8
|
+
* under the harness home, and writes atomically so a crash cannot leave a
|
|
9
|
+
* half-written document behind.
|
|
10
|
+
* @module dsh-chatgpt-subscription/file-preferences
|
|
11
|
+
*/
|
|
12
|
+
import type z from '@deepseek-ai/schemastery';
|
|
13
|
+
import type { SettingsScope, SettingsWatch } from './settings-compat.ts';
|
|
14
|
+
/** Where the plugin keeps the preferences that have no settings namespace to live in. */
|
|
15
|
+
export declare function preferencesPath(): string;
|
|
16
|
+
/** One JSON document, validated and shaped by a schemastery schema. */
|
|
17
|
+
export declare class FilePreferencesStore<T extends object> implements SettingsScope<T> {
|
|
18
|
+
private readonly schema;
|
|
19
|
+
private readonly filePath;
|
|
20
|
+
private readonly legacy?;
|
|
21
|
+
private value;
|
|
22
|
+
private loaded;
|
|
23
|
+
private writing;
|
|
24
|
+
private readonly listeners;
|
|
25
|
+
/**
|
|
26
|
+
* @param schema - Schema the document is validated and defaulted with.
|
|
27
|
+
* @param filePath - Document location; defaults to {@link preferencesPath}.
|
|
28
|
+
* @param legacy - One-shot source seeded into an absent or default-only
|
|
29
|
+
* document, so preferences a generation kept in the harness's own settings
|
|
30
|
+
* document are not lost when that document stops being written.
|
|
31
|
+
*/
|
|
32
|
+
constructor(schema: z<T>, filePath?: string, legacy?: (() => Promise<object | undefined>) | undefined);
|
|
33
|
+
/** Current snapshot; the shipped defaults until {@link hydrate} lands. */
|
|
34
|
+
get(): T;
|
|
35
|
+
/** Load and validate the file once; a missing or corrupt document keeps the defaults. */
|
|
36
|
+
hydrate(): Promise<void>;
|
|
37
|
+
update(patch: Partial<T>): Promise<T>;
|
|
38
|
+
watch(callback: SettingsWatch<T>): () => void;
|
|
39
|
+
/** Validate one candidate document, throwing the schema's error when it is invalid. */
|
|
40
|
+
private normalize;
|
|
41
|
+
private read;
|
|
42
|
+
/** The validated document, or `undefined` when the file is absent or rejected. */
|
|
43
|
+
private readDocument;
|
|
44
|
+
/** Publish one document, telling listeners only when it differs from the snapshot. */
|
|
45
|
+
private adopt;
|
|
46
|
+
private notify;
|
|
47
|
+
private write;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=file-preferences.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-preferences.d.ts","sourceRoot":"","sources":["../../../../src/host/common/file-preferences.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,CAAC,MAAM,0BAA0B,CAAA;AAE7C,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAExE,yFAAyF;AACzF,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAKD,uEAAuE;AACvE,qBAAa,oBAAoB,CAAC,CAAC,SAAS,MAAM,CAAE,YAAW,aAAa,CAAC,CAAC,CAAC;IAc3E,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;IAf1B,OAAO,CAAC,KAAK,CAAG;IAChB,OAAO,CAAC,MAAM,CAA2B;IACzC,OAAO,CAAC,OAAO,CAAsC;IACrD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA8B;IAExD;;;;;;OAMG;gBAEgB,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,EACZ,QAAQ,SAAoB,EAC5B,MAAM,CAAC,GAAE,MAAM,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,aAAA;IAK7D,0EAA0E;IAC1E,GAAG,IAAI,CAAC;IAIR,yFAAyF;IACzF,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAKlB,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAgB3C,KAAK,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI;IAO7C,uFAAuF;IACvF,OAAO,CAAC,SAAS;YAIH,IAAI;IAuBlB,kFAAkF;YACpE,YAAY;IAe1B,sFAAsF;IACtF,OAAO,CAAC,KAAK;IAOb,OAAO,CAAC,MAAM;YAIA,KAAK;CAapB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One-time import of the preferences earlier releases kept in the harness's own
|
|
3
|
+
* settings document.
|
|
4
|
+
*
|
|
5
|
+
* Before harness 0.1.7 the plugin registered the `dsh-chatgpt-subscription`
|
|
6
|
+
* namespace, so the harness persisted these preferences into
|
|
7
|
+
* `$DSH_HOME/settings.yaml`. That document no longer exists from 0.1.7 on — the
|
|
8
|
+
* plugin owns its storage there — so a generation without the register seam reads
|
|
9
|
+
* the old section once and seeds the plugin document from it. A harness that
|
|
10
|
+
* moved the document itself renames it to `settings.yaml.imported`, which is why
|
|
11
|
+
* both names are read.
|
|
12
|
+
*
|
|
13
|
+
* The section is read from text rather than through a YAML dependency: this
|
|
14
|
+
* package ships no YAML parser, and only its own four shapes ever appear under
|
|
15
|
+
* that key — scalars, one nested map (`contextWindowOverrides`), block sequences
|
|
16
|
+
* (`visibleModelIds`), and inline flow arrays. Anything the reader cannot make
|
|
17
|
+
* sense of is left out, and the schema that validates the document decides what
|
|
18
|
+
* the values mean.
|
|
19
|
+
* @module dsh-chatgpt-subscription/legacy-preferences
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Read the plugin's preferences out of the settings documents of earlier releases.
|
|
23
|
+
*
|
|
24
|
+
* @param homeDir - Harness home holding the documents; defaults to the live one.
|
|
25
|
+
* @returns The stored preference values, or `undefined` when no document carries
|
|
26
|
+
* a non-empty section for this plugin.
|
|
27
|
+
*/
|
|
28
|
+
export declare function readLegacyPreferences(homeDir?: string): Promise<Record<string, unknown> | undefined>;
|
|
29
|
+
//# sourceMappingURL=legacy-preferences.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy-preferences.d.ts","sourceRoot":"","sources":["../../../../src/host/common/legacy-preferences.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAUH;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,SAAe,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC,CAQhH"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Version bridge for the harness conversation model.
|
|
3
|
+
*
|
|
4
|
+
* Harness 0.1.7 flattened tool results: `tool-result` stopped being a content
|
|
5
|
+
* block inside a user-role message and became a first-class `role: 'tool'`
|
|
6
|
+
* message carrying `toolCallId`/`isError` directly, while
|
|
7
|
+
* `GenerateOptions.messages` widened from `Message[]` to `RequestMessage[]` and
|
|
8
|
+
* `MessageSourceMap` lost its catch-all `plugin` kind.
|
|
9
|
+
*
|
|
10
|
+
* Every mapper in this package reads the pre-0.1.7 vocabulary, so the request
|
|
11
|
+
* path normalizes once at the adapter boundary ({@link normalizeGenerateOptions})
|
|
12
|
+
* and the mappers keep one vocabulary on every supported harness generation.
|
|
13
|
+
* The types below are that vocabulary: real harness block types for everything
|
|
14
|
+
* the two generations share, plus this package's own `tool-result` block.
|
|
15
|
+
*
|
|
16
|
+
* @module dsh-chatgpt-subscription/llm-compat
|
|
17
|
+
*/
|
|
18
|
+
import type { ContentBlock as HarnessContentBlock, GenerateOptions as HarnessGenerateOptions } from '@deepseek-ai/dsh-llm';
|
|
19
|
+
import type { ContextFormed } from '@deepseek-ai/dsh-llm/message';
|
|
20
|
+
export { LlmError, type FinishReason, type StreamChunk, type TokenUsage, } from '@deepseek-ai/dsh-llm';
|
|
21
|
+
declare module '@deepseek-ai/dsh-llm' {
|
|
22
|
+
interface MessageSourceMap {
|
|
23
|
+
/** Content this package injects into a request no user turn produced. */
|
|
24
|
+
'dsh-chatgpt-subscription': {
|
|
25
|
+
kind: 'dsh-chatgpt-subscription';
|
|
26
|
+
} & ContextFormed;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/** This package's kind in the harness message-source map. */
|
|
30
|
+
export declare const PLUGIN_MESSAGE_SOURCE_KIND: "dsh-chatgpt-subscription";
|
|
31
|
+
/** The result of a tool invocation as every harness generation before 0.1.7 carried it. */
|
|
32
|
+
export interface ToolResultBlock {
|
|
33
|
+
type: 'tool-result';
|
|
34
|
+
toolCallId: string;
|
|
35
|
+
content: ContentBlock[];
|
|
36
|
+
isError?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Every content block the mappers read.
|
|
40
|
+
*
|
|
41
|
+
* Harness blocks the two generations share stay harness-typed — 0.1.7 dropped
|
|
42
|
+
* the harness's own `tool-result` arm, and `Exclude` removes it where an older
|
|
43
|
+
* harness still declares one — and {@link ToolResultBlock} supplies the single
|
|
44
|
+
* spelling the mappers pattern-match on.
|
|
45
|
+
*/
|
|
46
|
+
export type ContentBlock = Exclude<HarnessContentBlock, {
|
|
47
|
+
type: 'tool-result';
|
|
48
|
+
}> | ToolResultBlock;
|
|
49
|
+
/**
|
|
50
|
+
* Blocks this package hands back to the harness.
|
|
51
|
+
*
|
|
52
|
+
* Emission sites build text, reasoning, tool-call, and image blocks only; the
|
|
53
|
+
* harness has no `tool-result` block to accept one, so outbound values are the
|
|
54
|
+
* shared harness blocks without it.
|
|
55
|
+
*/
|
|
56
|
+
export type OutboundContentBlock = Exclude<ContentBlock, ToolResultBlock>;
|
|
57
|
+
/** Producer-declared provenance, read for `kind` and the model replay envelope. */
|
|
58
|
+
export interface MessageSource {
|
|
59
|
+
readonly kind: string;
|
|
60
|
+
readonly callId?: unknown;
|
|
61
|
+
readonly provider?: unknown;
|
|
62
|
+
readonly replayState?: unknown;
|
|
63
|
+
}
|
|
64
|
+
/** One conversation message in the vocabulary the mappers read. */
|
|
65
|
+
export interface Message {
|
|
66
|
+
readonly id?: unknown;
|
|
67
|
+
readonly role: 'system' | 'developer' | 'user' | 'assistant';
|
|
68
|
+
readonly content: ContentBlock[];
|
|
69
|
+
readonly source?: MessageSource;
|
|
70
|
+
}
|
|
71
|
+
/** Request options carrying the normalized conversation. */
|
|
72
|
+
export type GenerateOptions = Omit<HarnessGenerateOptions, 'messages'> & {
|
|
73
|
+
messages: Message[];
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Normalize one harness message list into {@link Message}.
|
|
77
|
+
*
|
|
78
|
+
* A 0.1.7 `role: 'tool'` message is re-wrapped as the user-role message holding
|
|
79
|
+
* one {@link ToolResultBlock} that the mappers expect, keeping the tool
|
|
80
|
+
* provenance (`kind: 'tool'`) they use to tell a real tool result from a user
|
|
81
|
+
* turn. Everything a newer harness adds beside that keeps its own shape.
|
|
82
|
+
* @param messages - Messages straight off the request options, in either generation's shape.
|
|
83
|
+
* @returns The same conversation in the pre-0.1.7 vocabulary.
|
|
84
|
+
*/
|
|
85
|
+
export declare function normalizeMessages(messages: readonly unknown[] | undefined): Message[];
|
|
86
|
+
/**
|
|
87
|
+
* Normalize request options for the mappers.
|
|
88
|
+
* @param options - Request options the harness handed the adapter.
|
|
89
|
+
* @returns The same options with {@link Message} history.
|
|
90
|
+
*/
|
|
91
|
+
export declare function normalizeGenerateOptions(options: HarnessGenerateOptions): GenerateOptions;
|
|
92
|
+
//# sourceMappingURL=llm-compat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm-compat.d.ts","sourceRoot":"","sources":["../../../../src/host/common/llm-compat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EACV,YAAY,IAAI,mBAAmB,EACnC,eAAe,IAAI,sBAAsB,EAC1C,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAEjE,OAAO,EACL,QAAQ,EACR,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,UAAU,GAChB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,gBAAgB;QACxB,yEAAyE;QACzE,0BAA0B,EAAE;YAAE,IAAI,EAAE,0BAA0B,CAAA;SAAE,GAAG,aAAa,CAAA;KACjF;CACF;AAED,6DAA6D;AAC7D,eAAO,MAAM,0BAA0B,EAAG,0BAAmC,CAAA;AAE7E,2FAA2F;AAC3F,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,aAAa,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,mBAAmB,EAAE;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,CAAC,GAAG,eAAe,CAAA;AAElG;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,YAAY,EAAE,eAAe,CAAC,CAAA;AAEzE,mFAAmF;AACnF,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAC/B;AAED,mEAAmE;AACnE,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,EAAE,CAAC,EAAE,OAAO,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,WAAW,GAAG,MAAM,GAAG,WAAW,CAAA;IAC5D,QAAQ,CAAC,OAAO,EAAE,YAAY,EAAE,CAAA;IAChC,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAA;CAChC;AAED,4DAA4D;AAC5D,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,GAAG;IAAE,QAAQ,EAAE,OAAO,EAAE,CAAA;CAAE,CAAA;AAYhG;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,SAAS,GAAG,OAAO,EAAE,CA6BrF;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,sBAAsB,GAAG,eAAe,CAEzF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local structural stand-ins for the harness settings seam.
|
|
3
|
+
*
|
|
4
|
+
* Harness 0.1.7 replaced the register-based settings API with `SettingsForms`
|
|
5
|
+
* (plugin `Config` fields plus the profile patch), so `@deepseek-ai/dsh-settings`
|
|
6
|
+
* no longer exports `SettingsProvider`, `SettingsScope`, `SettingsRegisterOptions`
|
|
7
|
+
* or `settingsNamespace`, and `ctx.settings.register` is gone. This plugin still
|
|
8
|
+
* supports 0.1.2-alpha.5 … 0.1.6-alpha.2, where the register seam is the only
|
|
9
|
+
* storage, so the small shape it actually uses is declared here instead of being
|
|
10
|
+
* imported from the harness, and the seam is probed at runtime.
|
|
11
|
+
*
|
|
12
|
+
* Nothing else in `src/host/**` may import those removed names.
|
|
13
|
+
* @module dsh-chatgpt-subscription/settings-compat
|
|
14
|
+
*/
|
|
15
|
+
/** Change listener a settings scope calls with the next and previous value. */
|
|
16
|
+
export type SettingsWatch<T> = (next: T, prev: T) => void | Promise<void>;
|
|
17
|
+
/** One registered settings namespace, as this plugin reads and writes it. */
|
|
18
|
+
export interface SettingsScope<T> {
|
|
19
|
+
/** Current value of the namespace; the scope owns the defaults. */
|
|
20
|
+
get(): T;
|
|
21
|
+
/**
|
|
22
|
+
* Merge a partial patch into the namespace and persist it.
|
|
23
|
+
*
|
|
24
|
+
* Typed `object` because that is what the 0.1.5/0.1.6 harness accepted and
|
|
25
|
+
* what this plugin hands over: a deep partial of the namespace value.
|
|
26
|
+
*/
|
|
27
|
+
update(patch: object): Promise<unknown>;
|
|
28
|
+
/** Observe later changes; the returned function unsubscribes. */
|
|
29
|
+
watch(callback: SettingsWatch<T>): () => void;
|
|
30
|
+
}
|
|
31
|
+
/** The `settings` service on a harness generation that still registers namespaces. */
|
|
32
|
+
export interface SettingsService {
|
|
33
|
+
/** Register (or look up) one namespace scope. */
|
|
34
|
+
register(namespace: unknown, schema: unknown): SettingsScope<unknown>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Whether a live settings service still exposes the register-based seam.
|
|
38
|
+
*
|
|
39
|
+
* `false` for harness 0.1.7's `SettingsForms`, for a reduced test context, and
|
|
40
|
+
* for a composition that injects no settings service at all.
|
|
41
|
+
* @param settings - Candidate service from `ctx.settings` or a caller.
|
|
42
|
+
* @returns Whether {@link SettingsService.register} may be called.
|
|
43
|
+
*/
|
|
44
|
+
export declare function hasRegister(settings: unknown): settings is SettingsService;
|
|
45
|
+
/**
|
|
46
|
+
* Resolve the handle one namespace is registered under.
|
|
47
|
+
*
|
|
48
|
+
* Harness builds up to 0.1.6 brand a namespace string through an exported
|
|
49
|
+
* `settingsNamespace` factory; a build that dropped that export — and every
|
|
50
|
+
* register-capable test double — takes the plain string.
|
|
51
|
+
* @param namespace - Plain namespace id, e.g. `dsh-chatgpt-subscription`.
|
|
52
|
+
* @returns The namespace handle the settings service expects.
|
|
53
|
+
*/
|
|
54
|
+
export declare function resolveSettingsNamespace(namespace: string): unknown;
|
|
55
|
+
//# sourceMappingURL=settings-compat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-compat.d.ts","sourceRoot":"","sources":["../../../../src/host/common/settings-compat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,+EAA+E;AAC/E,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAEzE,6EAA6E;AAC7E,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,mEAAmE;IACnE,GAAG,IAAI,CAAC,CAAA;IACR;;;;;OAKG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IACvC,iEAAiE;IACjE,KAAK,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,CAAA;CAC9C;AAED,sFAAsF;AACtF,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,QAAQ,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,CAAA;CACtE;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,eAAe,CAG1E;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAInE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
+
/**
|
|
3
|
+
* Patch DSH's BasicCompactionEngine to restore proactive compaction semantics:
|
|
4
|
+
*
|
|
5
|
+
* 0.1.7-alpha.1 introduced upfront output-reservation and 64K headroom deductions
|
|
6
|
+
* (thresholdTokens = min(contextWindow * thresholdRatio, contextWindow - maxTokens - headroomTokens)).
|
|
7
|
+
* On models with large advertised maxTokens (e.g. 128K~384K), this caused proactive compaction
|
|
8
|
+
* to trigger prematurely at ~11% context occupancy rather than the expected ~80%.
|
|
9
|
+
*
|
|
10
|
+
* This patch intercepts `compactIfNeeded` for step-boundary 'pressure' checks:
|
|
11
|
+
* - If current token pressure has not reached the genuine capacity threshold (contextWindow * thresholdRatio),
|
|
12
|
+
* it suppresses premature compaction by returning null.
|
|
13
|
+
* - Emergency 'context-overflow' recovery (on actual context exceeded errors) is fully preserved.
|
|
14
|
+
*/
|
|
15
|
+
export declare function installCompactionPatch(ctx: Context): void;
|
|
16
|
+
export declare function patchCompactionEnginePrototype(proto: Record<string, any>, ctx?: Context): void;
|
|
17
|
+
//# sourceMappingURL=compaction-patch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compaction-patch.d.ts","sourceRoot":"","sources":["../../../src/host/compaction-patch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAgBzD;AAED,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,OAAO,GAAG,IAAI,CAmC9F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEV,iBAAiB,EAEjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAGL,WAAW,EAOX,mBAAmB,EACpB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EAEtB,KAAK,oBAAoB,EAEzB,KAAK,uBAAuB,EAC7B,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAOnB,MAAM,aAAa,CAAA;AACpB,OAAO,EAcL,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAE3B,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEV,iBAAiB,EAEjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAGL,WAAW,EAOX,mBAAmB,EACpB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EAEtB,KAAK,oBAAoB,EAEzB,KAAK,uBAAuB,EAC7B,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAOnB,MAAM,aAAa,CAAA;AACpB,OAAO,EAcL,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAE3B,MAAM,aAAa,CAAA;A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AC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC;IAC7B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAb1B;;;;;;OAMG;IACH,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA4B;gBAGrC,KAAK,sBAA4B,EACjC,aAAa,yBAA+B,EAC5C,WAAW,CAAC,EAAE,uBAAuB,YAAA,EACrC,OAAO,GAAE,sBAA2B,EACrD,WAAW,CAAC,EAAE,mBAAmB;IAMnC,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe;IAI/C,mBAAmB,IAAI,mBAAmB;IAI1C,mBAAmB,IAAI,SAAS;IAIhC,OAAO,CAAC,QAAQ;IAIhB;;;OAGG;YACW,OAAO;IAerB,OAAO,CAAC,gBAAgB;IAUlB,UAAU,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,YAAY,EAAE,CAAC;IAmB/D,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAkCpG,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAO/F,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,aAAa,CAAC,WAAW,CAAC;YAgBpD,aAAa;CAmL7B;AAQD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -39,6 +39,15 @@ export declare function getCachedCatalog(): KimiCodeCatalogModel[];
|
|
|
39
39
|
* The live listing is authoritative — it is what tells the plugin which models
|
|
40
40
|
* the account's tier actually unlocks — so it is cached for half an hour and
|
|
41
41
|
* re-read on demand from the settings card.
|
|
42
|
+
*
|
|
43
|
+
* The cache is consulted BEFORE a token is acquired whenever the caller does not
|
|
44
|
+
* already hold one. That order is load-bearing: acquiring a token reads the
|
|
45
|
+
* credential store, and on Windows that is a DPAPI unprotect through a spawned
|
|
46
|
+
* `powershell.exe` (~200 ms). The harness resolves every model of every
|
|
47
|
+
* provider when it builds the picker's catalog, and each resolution calls in
|
|
48
|
+
* here, so acquiring first turned one catalog into one process launch per
|
|
49
|
+
* model. A caller that passes `accessToken` still keys the cache on the token,
|
|
50
|
+
* because a different account can see a different listing.
|
|
42
51
|
*/
|
|
43
52
|
export declare function loadProviderModels(options?: {
|
|
44
53
|
fetchFn?: typeof fetch;
|
|
@@ -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,EACnB,cAAc,EACd,mBAAmB,EACnB,YAAY,EACb,MAAM,qCAAqC,CAAA;AAE5C,gDAAgD;AAChD,eAAO,MAAM,WAAW,YAAY,CAAA;AACpC,eAAO,MAAM,WAAW,YAAY,CAAA;AACpC,eAAO,MAAM,OAAO,QAAQ,CAAA;AAiD5B,sFAAsF;AACtF,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAW5D;AAeD;;;;;;;GAOG;AACH,wBAAsB,eAAe,CACnC,WAAW,EAAE,MAAM,EACnB,IAAI,GAAE,YAAuB,EAC7B,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GACjC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAWjC;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,mBAAmB,CAAC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BAAsB,GAC9B,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAmEtC;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,mBAAmB,EAChC,OAAO,CAAC,EAAE,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"}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
*
|
|
27
27
|
* See https://www.kimi.com/code/docs/en/kimi-code/error-reference.html
|
|
28
28
|
*/
|
|
29
|
-
import { type
|
|
29
|
+
import { type OutboundContentBlock, type GenerateOptions, type Message, type StreamChunk } from '../common/llm-compat.ts';
|
|
30
30
|
import type { AttachmentStore } from '@deepseek-ai/dsh-attachment';
|
|
31
31
|
import { type VideoAttachmentRef } from './modalities.ts';
|
|
32
32
|
import type { KimiCodeReasoningEffort, KimiCodeWire } from '../../shared/kimi-code-contracts.ts';
|
|
@@ -316,7 +316,7 @@ interface PendingToolCall {
|
|
|
316
316
|
}
|
|
317
317
|
export interface KimiCodeStreamState {
|
|
318
318
|
wire: KimiCodeWire;
|
|
319
|
-
blocks:
|
|
319
|
+
blocks: OutboundContentBlock[];
|
|
320
320
|
current: {
|
|
321
321
|
index: number;
|
|
322
322
|
type: 'text' | 'reasoning';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAGL,KAAK,oBAAoB,EAEzB,KAAK,eAAe,EACpB,KAAK,OAAO,EACZ,KAAK,WAAW,EAEjB,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,eAAe,EAAsB,MAAM,6BAA6B,CAAA;AAGtF,OAAO,EAML,KAAK,kBAAkB,EACxB,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAA;AAsChG;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAElD;AAMD;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,IAAI,CAAA;AACnC,eAAO,MAAM,uBAAuB,KAAK,CAAA;AAEzC;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAIrF;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,CAS3E;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,uBAAuB,GAAG,SAAS,CA0BzG;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,C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GAAG,IAAI,CAAA;CAAE,CAGhF;AAED,yDAAyD;AACzD,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAmBD,uEAAuE;AACvE,wBAAgB,WAAW,CAAC,KAAK,EAAE,mBAAmB,GAAG,WAAW,EAAE,CAWrE;AAED,kEAAkE;AAClE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI,CAIrE"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { SettingsProvider } from '@deepseek-ai/dsh-settings';
|
|
2
1
|
import type { KimiCodeReasoningEffort, KimiCodeRegion } from '../../shared/kimi-code-contracts.ts';
|
|
3
2
|
import type { CredentialStore } from '../token-store.ts';
|
|
4
3
|
import { DEFAULT_OAUTH_HOST } from './types.ts';
|
|
@@ -77,11 +76,11 @@ export interface KimiCodePreferenceStore {
|
|
|
77
76
|
}): Promise<KimiCodeModelSettings>;
|
|
78
77
|
}
|
|
79
78
|
/**
|
|
80
|
-
* Bind the model selection to the DSH settings document
|
|
81
|
-
*
|
|
82
|
-
*
|
|
79
|
+
* Bind the model selection to the DSH settings document when the harness still
|
|
80
|
+
* offers one, and to the JSON file beside it otherwise: a harness without the
|
|
81
|
+
* register seam (0.1.7, and a headless test) reads that file back on boot.
|
|
83
82
|
*/
|
|
84
|
-
export declare function registerKimiCodePreferenceStore(settings?:
|
|
83
|
+
export declare function registerKimiCodePreferenceStore(settings?: unknown, fallbackStore?: FileModelSettingsStore): KimiCodePreferenceStore;
|
|
85
84
|
export declare function credentialPath(): string;
|
|
86
85
|
export declare function modelSettingsPath(): string;
|
|
87
86
|
/** File the install channel uses to pin a region before the first login. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-store.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/token-store.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"token-store.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/token-store.ts"],"names":[],"mappings":"AAKA,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c,GAAG,OAAO,CAAC,IAAI,CAAC,CAQzE;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video-tool.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/video-tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"video-tool.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/video-tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAQlD,eAAO,MAAM,oBAAoB,sBAAsB,CAAA;AAEvD,KAAK,SAAS,GAAG,OAAO,KAAK,CAAA;AAE7B,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,SAAS,CAAA;CACpB;AAwID,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,GAAE,oBAAyB,mDAuGnF"}
|
|
@@ -26,6 +26,23 @@ export declare class OAuthServiceError extends Error {
|
|
|
26
26
|
/** Token-endpoint status when the failure came from a response. */
|
|
27
27
|
status?: number | undefined);
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* How the credential will be used, which decides who may serve it.
|
|
31
|
+
*
|
|
32
|
+
* `'request'` (default) is a metered model request: rotation, cooldowns and the
|
|
33
|
+
* pool's cached-quota verdict all apply.
|
|
34
|
+
*
|
|
35
|
+
* `'tool'` is a ChatGPT call that is *not* metered against the Codex
|
|
36
|
+
* rate-limit window — web search, web fetch, image generation. It reads the
|
|
37
|
+
* account already serving the conversation and ignores cooldowns, because a
|
|
38
|
+
* spent Codex window must not take those tools offline; they keep working with
|
|
39
|
+
* the very same access token.
|
|
40
|
+
*/
|
|
41
|
+
export type CredentialPurpose = 'request' | 'tool';
|
|
42
|
+
export interface CredentialAccess {
|
|
43
|
+
/** Defaults to `'request'`. */
|
|
44
|
+
purpose?: CredentialPurpose;
|
|
45
|
+
}
|
|
29
46
|
export interface OAuthServiceOptions {
|
|
30
47
|
fetchFn?: FetchLike;
|
|
31
48
|
now?: () => number;
|
|
@@ -56,6 +73,14 @@ export declare class OAuthService {
|
|
|
56
73
|
private lastLoginError;
|
|
57
74
|
private disposed;
|
|
58
75
|
private readonly pool;
|
|
76
|
+
/**
|
|
77
|
+
* Bumped whenever this process writes credentials.
|
|
78
|
+
*
|
|
79
|
+
* Combined with the pool's own revision by {@link currentIdentityRevision} so
|
|
80
|
+
* a caller can tell whether the account behind the credentials may have moved
|
|
81
|
+
* without paying for a credential read to find out.
|
|
82
|
+
*/
|
|
83
|
+
private credentialRevision;
|
|
59
84
|
private readonly refreshInFlight;
|
|
60
85
|
constructor(store: TokenStore, options?: OAuthServiceOptions);
|
|
61
86
|
status(): Promise<OAuthStatusDto>;
|
|
@@ -78,7 +103,34 @@ export declare class OAuthService {
|
|
|
78
103
|
* is what a single "sign out" button means to a pool user.
|
|
79
104
|
*/
|
|
80
105
|
logout(accountId?: string): Promise<void>;
|
|
81
|
-
|
|
106
|
+
/**
|
|
107
|
+
* A cheap, in-memory verdict on whether the serving account may have changed.
|
|
108
|
+
*
|
|
109
|
+
* Reading a credential is expensive — on Windows it is a DPAPI unprotect
|
|
110
|
+
* through a spawned `powershell.exe` (~200 ms) — so a per-account cache must
|
|
111
|
+
* not have to read one just to learn that it is still the same account.
|
|
112
|
+
* Comparing this value against a previously observed one costs nothing, and
|
|
113
|
+
* any path that can move which account serves a request bumps it: a pool
|
|
114
|
+
* write (sign-in, delete, pin, rotation) or a credential write in this
|
|
115
|
+
* process (sign-in, logout, token refresh).
|
|
116
|
+
*
|
|
117
|
+
* It is deliberately conservative: a spurious change costs one credential
|
|
118
|
+
* read, while a missed change would report one account's data under another
|
|
119
|
+
* account's name.
|
|
120
|
+
*/
|
|
121
|
+
currentIdentityRevision(): number;
|
|
122
|
+
/**
|
|
123
|
+
* The credential to use next.
|
|
124
|
+
*
|
|
125
|
+
* @param forceRefresh - refresh even a token that is not close to expiry,
|
|
126
|
+
* which is how a 401 discovered mid-request recovers.
|
|
127
|
+
* @param access - who is asking. A `'tool'` caller (web search, fetch, image
|
|
128
|
+
* generation) bypasses the pool's rotation state: an account cooling down
|
|
129
|
+
* after a Codex 429 still holds a working token for those endpoints, and
|
|
130
|
+
* refusing it there turned "your Codex window is spent" into a bogus
|
|
131
|
+
* "credentials are required" on every web search.
|
|
132
|
+
*/
|
|
133
|
+
credentials(forceRefresh?: boolean, access?: CredentialAccess): Promise<StoredOAuthCredentials>;
|
|
82
134
|
dispose(): void;
|
|
83
135
|
private exchangeCode;
|
|
84
136
|
private refreshCredentials;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth-service.d.ts","sourceRoot":"","sources":["../../../src/host/oauth-service.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACf,MAAM,wBAAwB,CAAA;AAG/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE1E,KAAK,SAAS,GAAG,OAAO,KAAK,CAAA;AAC7B,KAAK,aAAa,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;AASnD,UAAU,WAAW;IACnB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,aAAa,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;IACvC,6BAA6B,CAAC,EAAE;QAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAA;QAC5B,iBAAiB,CA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C;IA0BvG,OAAO,IAAI,IAAI;YAUD,YAAY;IAoC1B,OAAO,CAAC,kBAAkB;IAQ1B;;;;;;;;OAQG;IACG,cAAc,CAClB,WAAW,EAAE,sBAAsB,EACnC,OAAO,GAAE,SAAwB,GAChC,OAAO,CAAC,sBAAsB,CAAC;YAYpB,cAAc;YA4Cd,iBAAiB;IAQ/B,OAAO,CAAC,qBAAqB;IA2C7B,OAAO,CAAC,aAAa;IASrB,OAAO,CAAC,SAAS;IAUjB,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,OAAO;IAKf,OAAO,CAAC,eAAe;CAGxB;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAe7E;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAUjF;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,GAAE,cAAc,CAAC,MAAM,CAAc,GAAG,cAAc,CAGzG"}
|
|
@@ -1,11 +1,25 @@
|
|
|
1
|
-
import { type SettingsProvider } from '@deepseek-ai/dsh-settings';
|
|
2
1
|
import type { SubscriptionPreferencesDto, SubscriptionPreferencesUpdateDto } from '../shared/contracts.ts';
|
|
3
2
|
export interface SubscriptionPreferenceStore {
|
|
4
3
|
status(): SubscriptionPreferencesDto;
|
|
5
4
|
update(patch: SubscriptionPreferencesUpdateDto): Promise<SubscriptionPreferencesDto>;
|
|
6
5
|
watch(callback: (next: SubscriptionPreferencesDto, prev: SubscriptionPreferencesDto) => void | Promise<void>): () => void;
|
|
7
6
|
}
|
|
8
|
-
|
|
7
|
+
/**
|
|
8
|
+
* {@link SubscriptionPreferenceStore} plus the one-shot load of the
|
|
9
|
+
* plugin-owned fallback file. A store bound to a settings namespace has nothing
|
|
10
|
+
* to load, so its `hydrate` resolves immediately.
|
|
11
|
+
*/
|
|
12
|
+
export interface PreferenceStoreHandle extends SubscriptionPreferenceStore {
|
|
13
|
+
/** Read the fallback document once; later reads are no-ops. */
|
|
14
|
+
hydrate(): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Bind the preferences to the settings namespace when the harness still offers
|
|
18
|
+
* the register seam, and to the plugin-owned JSON document when it does not
|
|
19
|
+
* (harness 0.1.7 replaced the seam with Config-field forms).
|
|
20
|
+
* @param settings - Live `ctx.settings` service of either harness generation.
|
|
21
|
+
*/
|
|
22
|
+
export declare function registerPreferenceStore(settings?: unknown): PreferenceStoreHandle;
|
|
9
23
|
export declare class PreferenceError extends Error {
|
|
10
24
|
constructor(message: string);
|
|
11
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../../../src/host/preferences.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../../../src/host/preferences.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,0BAA0B,EAC1B,gCAAgC,EACjC,MAAM,wBAAwB,CAAA;AAE/B,MAAM,WAAW,2BAA2B;IAC1C,MAAM,IAAI,0BAA0B,CAAA;IACpC,MAAM,CAAC,KAAK,EAAE,gCAAgC,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAA;IACpF,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,0BAA0B,EAAE,IAAI,EAAE,0BAA0B,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,IAAI,CAAA;CAC1H;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAsB,SAAQ,2BAA2B;IACxE,+DAA+D;IAC/D,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACzB;AAID;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,qBAAqB,CAqCjF;AAwED,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM;CAG5B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Get this plugin's bundled agent presets in front of the running harness:
|
|
3
|
+
* either declared at runtime, or copied into the harness-home preset root.
|
|
3
4
|
*
|
|
4
5
|
* DSH discovers agent presets only from configured roots, the shipped
|
|
5
6
|
* `agent-presets` package's own `presets/` directory, and
|
|
@@ -23,10 +24,24 @@
|
|
|
23
24
|
* does not ship makes the whole preset unresolvable. Text naming a package the
|
|
24
25
|
* harness renamed is therefore reconciled with the installation before it is
|
|
25
26
|
* compared or written.
|
|
27
|
+
*
|
|
28
|
+
* Harness 0.1.7 stopped reading that root and takes presets from a plugin row
|
|
29
|
+
* instead, which this package declares at runtime
|
|
30
|
+
* (`src/host/agent-preset.ts`, because shipping the row itself would break the
|
|
31
|
+
* generations that do not have it). {@link installBundledPresets} is the one
|
|
32
|
+
* entry point for both mechanisms: it copies the tree only when that runtime
|
|
33
|
+
* declaration was unavailable, so a harness that reads no discovery root is
|
|
34
|
+
* never written to.
|
|
26
35
|
* @module dsh-chatgpt-subscription/preset-sync
|
|
27
36
|
*/
|
|
37
|
+
import type { PresetHost, PresetInstall } from './agent-preset.ts';
|
|
28
38
|
/** The preset directory this package ships. */
|
|
29
39
|
export declare const BUNDLED_PRESET_IDS: readonly string[];
|
|
40
|
+
/**
|
|
41
|
+
* Candidate directories where the running harness or profile packages reside.
|
|
42
|
+
* @param entryScript - harness CLI entry script, defaults to this process's.
|
|
43
|
+
*/
|
|
44
|
+
export declare function candidatePackageRoots(entryScript?: string | undefined): string[];
|
|
30
45
|
/**
|
|
31
46
|
* Whether a package is installed in any candidate node_modules tree.
|
|
32
47
|
* Matches DSH agent-presets' own discovery check.
|
|
@@ -115,4 +130,17 @@ export declare function syncOnePreset(sourceDir: string, targetDir: string, rewr
|
|
|
115
130
|
* @returns the grouped outcome of the run.
|
|
116
131
|
*/
|
|
117
132
|
export declare function syncPresetTrees(sourceRoot: string, targetRoot: string, retire?: readonly string[], rewrite?: PresetFileRewrite): PresetSyncResult;
|
|
133
|
+
/**
|
|
134
|
+
* Make this package's bundled agent presets available on the running harness.
|
|
135
|
+
*
|
|
136
|
+
* The harness-home copy is the mechanism for every generation before 0.1.7,
|
|
137
|
+
* and the fallback for one whose runtime declaration is missing or unusable.
|
|
138
|
+
* It is skipped entirely when the declaration already took the presets: a
|
|
139
|
+
* harness that registers presets from a plugin row reads no discovery root, so
|
|
140
|
+
* the copy would write files nothing reads.
|
|
141
|
+
* @param host - plugin context: the effect seam and the logger.
|
|
142
|
+
* @param install - what the runtime declaration attempt reported.
|
|
143
|
+
* @returns the effect body's disposer, for `ctx.effect`.
|
|
144
|
+
*/
|
|
145
|
+
export declare function installBundledPresets(host: PresetHost, install: PresetInstall): () => void;
|
|
118
146
|
//# sourceMappingURL=preset-sync.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset-sync.d.ts","sourceRoot":"","sources":["../../../src/host/preset-sync.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"preset-sync.d.ts","sourceRoot":"","sources":["../../../src/host/preset-sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAMH,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAElE,+CAA+C;AAC/C,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAAiB,CAAA;AAsEjE;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,GAAE,MAAM,GAAG,SAA2B,GAAG,MAAM,EAAE,CAyBjG;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,EACjB,KAAK,GAAE,SAAS,MAAM,EAA4B,GACjD,OAAO,CAYT;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM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U,EAAE,MAAM,EAClB,MAAM,GAAE,SAAS,MAAM,EAAO,EAC9B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,gBAAgB,CAiClB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,GAAG,MAAM,IAAI,CAiB1F"}
|
|
@@ -26,7 +26,7 @@ export declare class ResponsesClient {
|
|
|
26
26
|
private readonly accountPool;
|
|
27
27
|
constructor(oauth: OAuthService, attachments: Pick<AttachmentStore, 'readImage'> & Partial<Pick<AttachmentStore, 'imageLimits'>>, options?: ResponsesClientOptions);
|
|
28
28
|
private readonly localRawImages;
|
|
29
|
-
stream(
|
|
29
|
+
stream(rawOptions: GenerateOptions): AsyncIterable<StreamChunk>;
|
|
30
30
|
private send;
|
|
31
31
|
/**
|
|
32
32
|
* Send one payload with account rotation.
|