@eddyskywalker/dsh-chatgpt-subscription 0.74.0 → 0.74.1
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 +11 -0
- package/lib/client.js.map +1 -1
- package/lib/index.js +262 -25
- package/lib/types/compat.d.ts +1 -1
- package/lib/types/host/antigravity-acp/adapter.d.ts +102 -10
- package/lib/types/host/antigravity-acp/adapter.d.ts.map +1 -1
- package/lib/types/host/antigravity-acp/catalog.d.ts +11 -2
- package/lib/types/host/antigravity-acp/catalog.d.ts.map +1 -1
- package/lib/types/host/antigravity-acp/history.d.ts +31 -2
- package/lib/types/host/antigravity-acp/history.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -11,9 +11,10 @@
|
|
|
11
11
|
* that history is the only transcript the model may rely on.
|
|
12
12
|
* - **An existing ACP session** is fed only the messages DSH added since the
|
|
13
13
|
* last prompt, because the agent already has the rest.
|
|
14
|
-
* - A mismatch (compaction, an edited turn, a
|
|
14
|
+
* - A mismatch (compaction, an edited turn, a rewritten prefix) means the ACP
|
|
15
15
|
* transcript can no longer be trusted as a prefix of DSH's: the session is
|
|
16
|
-
* abandoned and replayed in full.
|
|
16
|
+
* abandoned and replayed in full, behind a history boundary marker. A different
|
|
17
|
+
* model is not a mismatch - it is a config option of the same conversation.
|
|
17
18
|
*
|
|
18
19
|
* The fingerprint is an HMAC-style digest rather than a stored transcript: it
|
|
19
20
|
* costs one hash per message and never keeps a second copy of user content.
|
|
@@ -33,6 +34,21 @@ export type AcpPromptBlock = {
|
|
|
33
34
|
};
|
|
34
35
|
/** ACP's own image ceiling per content block. */
|
|
35
36
|
export declare const ACP_MAX_INLINE_IMAGE_BYTES: number;
|
|
37
|
+
/**
|
|
38
|
+
* The sentence every replayed transcript ends with.
|
|
39
|
+
*
|
|
40
|
+
* ACP has no notion of "this is the current task". A session created now and fed
|
|
41
|
+
* a hundred messages is one long prompt, and a transcript that reads like a stack
|
|
42
|
+
* of outstanding requests is exactly how a long session ends up redoing its first
|
|
43
|
+
* request: the user writes "go with A" and the agent, reading a wall of earlier
|
|
44
|
+
* instructions, starts over on the first one. The anchor marks where the history
|
|
45
|
+
* ends and which line the turn is about.
|
|
46
|
+
*
|
|
47
|
+
* It is appended to a *replay* only. A fresh session's first prompt already ends
|
|
48
|
+
* with the request it is answering, and a boundary sentence there would be noise
|
|
49
|
+
* on every cold start.
|
|
50
|
+
*/
|
|
51
|
+
export declare const REPLAY_ANCHOR_INSTRUCTION: string;
|
|
36
52
|
/** Content handed to `session/prompt` for one generation. */
|
|
37
53
|
export interface AcpPrompt {
|
|
38
54
|
blocks: AcpPromptBlock[];
|
|
@@ -64,6 +80,19 @@ export declare function buildPrompt(options: GenerateOptions, images: ResolvedRe
|
|
|
64
80
|
* @returns Hex digest.
|
|
65
81
|
*/
|
|
66
82
|
export declare function fingerprintMessages(messages: readonly Message[], from: number, to: number): string;
|
|
83
|
+
/**
|
|
84
|
+
* Digest over the tool catalogue an ACP session's bridge exposes.
|
|
85
|
+
*
|
|
86
|
+
* The catalogue is fixed when the session is created: the agent listed it once,
|
|
87
|
+
* and the bridge answers `listChanged: false`, so a session resumed after the
|
|
88
|
+
* harness's tool set changed would keep offering the old schemas to the agent. The
|
|
89
|
+
* digest is therefore part of "may this session be reused", and a changed
|
|
90
|
+
* catalogue forces a fresh session.
|
|
91
|
+
*
|
|
92
|
+
* @param tools - The tool schemas of one request.
|
|
93
|
+
* @returns Hex digest; one catalogue always produces one value.
|
|
94
|
+
*/
|
|
95
|
+
export declare function fingerprintTools(tools: GenerateOptions['tools']): string;
|
|
67
96
|
/**
|
|
68
97
|
* Whether `messages` still begins with everything a live ACP session has seen.
|
|
69
98
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity-acp/history.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"history.d.ts","sourceRoot":"","sources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