dsh-codex-community 0.0.1 → 0.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-codex-community",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "DeepSeek Harness Codex 社区接入 / Community Codex integration for DeepSeek Harness",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -48,6 +48,8 @@
48
48
  "inject": [
49
49
  "@deepseek-ai/dsh-client-connection",
50
50
  "@deepseek-ai/dsh-client-runtime",
51
+ "@deepseek-ai/dsh-client-ui-conversation",
52
+ "@deepseek-ai/dsh-client-ui-model-selection",
51
53
  "@deepseek-ai/dsh-client-ui-settings",
52
54
  "@deepseek-ai/dsh-client-locale"
53
55
  ],
@@ -94,6 +96,8 @@
94
96
  "@deepseek-ai/dsh-client-connection": "0.1.1-rc.2",
95
97
  "@deepseek-ai/dsh-client-locale": "0.1.1-rc.2",
96
98
  "@deepseek-ai/dsh-client-runtime": "0.1.1-rc.2",
99
+ "@deepseek-ai/dsh-client-ui-conversation": "0.1.1-rc.2",
100
+ "@deepseek-ai/dsh-client-ui-model-selection": "0.1.1-rc.2",
97
101
  "@deepseek-ai/dsh-client-ui-settings": "0.1.1-rc.2",
98
102
  "@deepseek-ai/dsh-commands": "0.1.1-rc.2",
99
103
  "@deepseek-ai/dsh-credentials": "0.1.1-rc.2",
@@ -112,6 +116,12 @@
112
116
  "@deepseek-ai/dsh-client-runtime": {
113
117
  "optional": true
114
118
  },
119
+ "@deepseek-ai/dsh-client-ui-conversation": {
120
+ "optional": true
121
+ },
122
+ "@deepseek-ai/dsh-client-ui-model-selection": {
123
+ "optional": true
124
+ },
115
125
  "@deepseek-ai/dsh-client-ui-settings": {
116
126
  "optional": true
117
127
  },
package/types/client.d.ts CHANGED
@@ -47,6 +47,25 @@ export interface AuthorizationStatus {
47
47
  }
48
48
  }
49
49
 
50
+ export interface CodexUsageWindow {
51
+ usedPercent: number
52
+ windowDurationMins: number
53
+ resetsAt: number
54
+ }
55
+
56
+ export interface CodexUsageRateLimit {
57
+ limitId: string
58
+ limitName?: string
59
+ primary?: CodexUsageWindow
60
+ secondary?: CodexUsageWindow
61
+ }
62
+
63
+ export interface CodexAccountUsage {
64
+ observedAt: number
65
+ planType?: string
66
+ rateLimits: readonly CodexUsageRateLimit[]
67
+ }
68
+
50
69
  export interface AuthorizationClient {
51
70
  describe(signal?: AbortSignal): Promise<AuthorizationStatus>
52
71
  watch(attemptId: string, after: number, signal?: AbortSignal): Promise<{
@@ -63,11 +82,41 @@ export interface AuthorizationClient {
63
82
  reason?: "commit-in-progress"
64
83
  }>
65
84
  logout(): Promise<{ signedOut: boolean }>
85
+ usage(signal?: AbortSignal): Promise<CodexAccountUsage>
86
+ }
87
+
88
+ export interface CodexSessionPreference {
89
+ fast: boolean
90
+ }
91
+
92
+ export interface SessionPreferenceClient {
93
+ get(signal?: AbortSignal): Promise<CodexSessionPreference>
94
+ setFast(fast: boolean, signal?: AbortSignal): Promise<CodexSessionPreference>
66
95
  }
67
96
 
97
+ export interface SessionPreferenceClientFactory {
98
+ forSession(sessionId: string): SessionPreferenceClient
99
+ }
100
+
101
+ export interface CodexCurrentModel {
102
+ provider: string
103
+ model: string
104
+ reasoningEffort?: string
105
+ }
106
+
107
+ export interface CodexModelDirectoryState {
108
+ current?: CodexCurrentModel | null
109
+ }
110
+
111
+ export type UseCodexModelDirectory = <Selected>(
112
+ selector: (state: CodexModelDirectoryState) => Selected,
113
+ ) => Selected
114
+
68
115
  export interface CodexModelCatalogEntry {
69
116
  id: string
70
117
  name?: string
118
+ contextWindow?: number
119
+ maxTokens?: number
71
120
  }
72
121
 
73
122
  export interface CodexModelEnablementSnapshot {
@@ -131,6 +180,9 @@ export interface RpcConnection {
131
180
  }
132
181
 
133
182
  export declare function createAuthorizationClient(connection: RpcConnection): AuthorizationClient
183
+ export declare function createSessionPreferenceClient(
184
+ connection: RpcConnection,
185
+ ): SessionPreferenceClientFactory
134
186
  export declare function createModelEnablementClient(
135
187
  connection: unknown,
136
188
  settingsFace?: SettingsDescribeFace,
@@ -148,6 +200,13 @@ export declare function AuthorizationSettings(props: {
148
200
  client: AuthorizationClient
149
201
  t(key: string): string
150
202
  }): unknown
203
+ export declare function CodexFastToggle(props: {
204
+ session?: { removed?: boolean }
205
+ useModelDirectory: UseCodexModelDirectory
206
+ preferenceClient: SessionPreferenceClient
207
+ selectModel?(selection: CodexCurrentModel): Promise<void> | void
208
+ t(key: string): string
209
+ }): unknown
151
210
  export declare function ModelEnablementSettings(props: {
152
211
  client: ModelEnablementClient
153
212
  t(key: string): string