@eddyskywalker/dsh-chatgpt-subscription 0.81.2 → 0.82.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 +14 -0
- package/lib/client.js +735 -377
- package/lib/client.js.map +1 -1
- package/lib/index.js +720 -54
- package/lib/types/client/CodexComposerQuota.d.ts.map +1 -1
- package/lib/types/client/common/ComposerQuotaBadge.d.ts +25 -4
- package/lib/types/client/common/ComposerQuotaBadge.d.ts.map +1 -1
- package/lib/types/client/compact-after-turn/CompactAfterTurnToggle.d.ts +24 -0
- package/lib/types/client/compact-after-turn/CompactAfterTurnToggle.d.ts.map +1 -0
- package/lib/types/client/compact-after-turn/locales.d.ts +34 -0
- package/lib/types/client/compact-after-turn/locales.d.ts.map +1 -0
- package/lib/types/client/compact-after-turn/styles.d.ts +2 -0
- package/lib/types/client/compact-after-turn/styles.d.ts.map +1 -0
- package/lib/types/client/index.d.ts +2 -0
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/kimi-code/styles.d.ts.map +1 -1
- package/lib/types/client/locales-ru/compact-after-turn.d.ts +3 -0
- package/lib/types/client/locales-ru/compact-after-turn.d.ts.map +1 -0
- package/lib/types/client/locales-ru/index.d.ts.map +1 -1
- package/lib/types/client/opendesign/styles.d.ts.map +1 -1
- package/lib/types/client/styles.d.ts.map +1 -1
- package/lib/types/compat.d.ts +1 -1
- package/lib/types/host/aws-quick/adapter.d.ts +5 -0
- package/lib/types/host/aws-quick/adapter.d.ts.map +1 -1
- package/lib/types/host/aws-quick/client.d.ts +9 -0
- package/lib/types/host/aws-quick/client.d.ts.map +1 -1
- package/lib/types/host/aws-quick/markup.d.ts +42 -0
- package/lib/types/host/aws-quick/markup.d.ts.map +1 -0
- package/lib/types/host/aws-quick/protocol.d.ts +20 -1
- package/lib/types/host/aws-quick/protocol.d.ts.map +1 -1
- package/lib/types/host/compact-after-turn/index.d.ts +126 -0
- package/lib/types/host/compact-after-turn/index.d.ts.map +1 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/compact-after-turn.d.ts +45 -0
- package/lib/types/shared/compact-after-turn.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wire contract of the one-shot "compact when this turn ends" switch.
|
|
3
|
+
*
|
|
4
|
+
* The browser half is a row in the composer's model menu; the Host half watches
|
|
5
|
+
* the session's agent and runs one manual compaction once the turn that was
|
|
6
|
+
* running (or the next one) ends. The two halves only share this file.
|
|
7
|
+
*
|
|
8
|
+
* @module dsh-chatgpt-subscription/shared/compact-after-turn
|
|
9
|
+
*/
|
|
10
|
+
/** Route of the state read (GET `?session=<id>`) and the switch write (POST). */
|
|
11
|
+
export declare const COMPACT_AFTER_TURN_PATH = "/api/dsh-compact-after-turn/state";
|
|
12
|
+
/**
|
|
13
|
+
* Where one session stands.
|
|
14
|
+
*
|
|
15
|
+
* - `off`: nothing will happen when the turn ends.
|
|
16
|
+
* - `armed`: the next turn end that leaves the agent idle compacts once, then
|
|
17
|
+
* the switch turns itself off.
|
|
18
|
+
* - `compacting`: that compaction is running; the switch cannot be changed.
|
|
19
|
+
*/
|
|
20
|
+
export type CompactAfterTurnPhase = 'off' | 'armed' | 'compacting';
|
|
21
|
+
/** How the last one-shot compaction of a session ended. */
|
|
22
|
+
export interface CompactAfterTurnOutcomeDto {
|
|
23
|
+
/** `nothing`: the engine found no safe range worth compacting. */
|
|
24
|
+
readonly kind: 'compacted' | 'nothing' | 'failed';
|
|
25
|
+
/** Engine diagnostic of a failed attempt; never shown as the headline. */
|
|
26
|
+
readonly detail?: string;
|
|
27
|
+
/** Epoch milliseconds the attempt settled. */
|
|
28
|
+
readonly at: number;
|
|
29
|
+
}
|
|
30
|
+
/** The state the Host reports for one session. */
|
|
31
|
+
export interface CompactAfterTurnStateDto {
|
|
32
|
+
readonly sessionId: string;
|
|
33
|
+
readonly phase: CompactAfterTurnPhase;
|
|
34
|
+
/** Whether this Host has a compaction engine at all. */
|
|
35
|
+
readonly available: boolean;
|
|
36
|
+
readonly last: CompactAfterTurnOutcomeDto | null;
|
|
37
|
+
}
|
|
38
|
+
/** Body of the switch write. */
|
|
39
|
+
export interface CompactAfterTurnUpdateDto {
|
|
40
|
+
readonly sessionId: string;
|
|
41
|
+
readonly armed: boolean;
|
|
42
|
+
}
|
|
43
|
+
/** Machine-readable refusal codes; the browser localizes them. */
|
|
44
|
+
export type CompactAfterTurnErrorCode = 'busy' | 'unavailable' | 'bad-request' | 'forbidden';
|
|
45
|
+
//# sourceMappingURL=compact-after-turn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compact-after-turn.d.ts","sourceRoot":"","sources":["../../../src/shared/compact-after-turn.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,iFAAiF;AACjF,eAAO,MAAM,uBAAuB,sCAAsC,CAAA;AAE1E;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG,KAAK,GAAG,OAAO,GAAG,YAAY,CAAA;AAElE,2DAA2D;AAC3D,MAAM,WAAW,0BAA0B;IACzC,kEAAkE;IAClE,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAA;IACjD,0EAA0E;IAC1E,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CACpB;AAED,kDAAkD;AAClD,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,KAAK,EAAE,qBAAqB,CAAA;IACrC,wDAAwD;IACxD,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,IAAI,EAAE,0BAA0B,GAAG,IAAI,CAAA;CACjD;AAED,gCAAgC;AAChC,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CACxB;AAED,kEAAkE;AAClE,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG,aAAa,GAAG,aAAa,GAAG,WAAW,CAAA"}
|