dsh-draw 0.2.2 → 0.2.4
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 +16 -0
- package/README.es.md +4 -3
- package/README.hi.md +4 -3
- package/README.md +4 -3
- package/README.pt.md +4 -3
- package/README.zh.md +4 -3
- package/lib/client.js +1886 -919
- package/lib/client.js.map +1 -1
- package/lib/index.js +3 -3
- package/lib/typert.host.js +1 -1
- package/lib/types/session-events.d.ts +2 -2
- package/lib/types/session-events.d.ts.map +1 -1
- package/lib/types/session-events.js +7 -2
- package/lib/types/version.d.ts +1 -1
- package/lib/types/version.js +1 -1
- package/lib/{wire-Cc4JZ3jR.js → wire-DLW8WmDW.js} +1886 -919
- package/package.json +23 -23
- package/src/session-events.ts +7 -2
- package/src/tool.ts +1 -1
- package/src/version.ts +1 -1
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as statusToView, n as imageToWire, r as probeToWire, t as DRAW_INVOCATIONS } from "./wire-
|
|
1
|
+
import { i as statusToView, n as imageToWire, r as probeToWire, t as DRAW_INVOCATIONS } from "./wire-DLW8WmDW.js";
|
|
2
2
|
import { credentialRef } from "@deepseek-ai/dsh-credentials";
|
|
3
3
|
import z from "@deepseek-ai/schemastery";
|
|
4
4
|
import { Context } from "@deepseek-ai/cordis";
|
|
@@ -281,7 +281,7 @@ function fallbackDrawGeneratedEvents(session) {
|
|
|
281
281
|
* @returns the accounting events.
|
|
282
282
|
*/
|
|
283
283
|
function drawGeneratedEvents(session) {
|
|
284
|
-
return session.events.filter((event) => event.type === "draw/generated");
|
|
284
|
+
return (typeof session.snapshotEvents === "function" ? session.snapshotEvents() : session.events).filter((event) => event.type === "draw/generated");
|
|
285
285
|
}
|
|
286
286
|
//#endregion
|
|
287
287
|
//#region src/quota.ts
|
|
@@ -1359,7 +1359,7 @@ var EngineRouter = class {
|
|
|
1359
1359
|
* @module dsh-draw/version
|
|
1360
1360
|
*/
|
|
1361
1361
|
/** Plugin version; must equal the `version` field in `package.json`. */
|
|
1362
|
-
const PLUGIN_VERSION = "0.2.
|
|
1362
|
+
const PLUGIN_VERSION = "0.2.4";
|
|
1363
1363
|
//#endregion
|
|
1364
1364
|
//#region src/service.ts
|
|
1365
1365
|
/**
|
package/lib/typert.host.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* ledger (live-session quota keeps working; the durable trail resumes once
|
|
14
14
|
* the host gains a plugin event surface). `0.1.2-alpha.1` removed the
|
|
15
15
|
* envelope and fails closed on unknown event types at read, so the probe
|
|
16
|
-
* reports no support there and every commit degrades to the ledger.
|
|
16
|
+
* reports no support there and every commit degrades to the ledger. On 0.1.2-alpha.3 the envelope field is retained for stored-log read compatibility only - its Session.append still cannot stamp the marker, so the gate behavior is unchanged.
|
|
17
17
|
*
|
|
18
18
|
* @module dsh-draw/session-events
|
|
19
19
|
*/
|
|
@@ -62,7 +62,7 @@ export interface DrawGeneratedEvent {
|
|
|
62
62
|
*/
|
|
63
63
|
export declare function appendDrawGenerated(session: Session, event: DrawGeneratedEvent): {
|
|
64
64
|
type: "draw/generated";
|
|
65
|
-
seq:
|
|
65
|
+
seq: import("@deepseek-ai/dsh-session").SessionSeq;
|
|
66
66
|
time: number;
|
|
67
67
|
data: DrawGeneratedEvent;
|
|
68
68
|
ignorable?: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-events.d.ts","sourceRoot":"","sources":["../../src/session-events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEhD,OAAO,QAAQ,gCAAgC,CAAC;IAC9C,UAAU,eAAe;QACvB;;;WAGG;QACH,gBAAgB,EAAE,kBAAkB,CAAA;KACrC;CACF;AAED,qDAAqD;AACrD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C,OAAO,EAAE,OAAO,GAAG,SAAS,OAAO,0BAA0B,EAAE,YAAY,CAAC,gBAAgB,CAAC,EAAE,CAOlI"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* ledger (live-session quota keeps working; the durable trail resumes once
|
|
14
14
|
* the host gains a plugin event surface). `0.1.2-alpha.1` removed the
|
|
15
15
|
* envelope and fails closed on unknown event types at read, so the probe
|
|
16
|
-
* reports no support there and every commit degrades to the ledger.
|
|
16
|
+
* reports no support there and every commit degrades to the ledger. On 0.1.2-alpha.3 the envelope field is retained for stored-log read compatibility only - its Session.append still cannot stamp the marker, so the gate behavior is unchanged.
|
|
17
17
|
*
|
|
18
18
|
* @module dsh-draw/session-events
|
|
19
19
|
*/
|
|
@@ -87,5 +87,10 @@ export function fallbackDrawGeneratedEvents(session) {
|
|
|
87
87
|
* @returns the accounting events.
|
|
88
88
|
*/
|
|
89
89
|
export function drawGeneratedEvents(session) {
|
|
90
|
-
|
|
90
|
+
// alpha.5 renamed the Session.events getter to snapshotEvents(); the peer
|
|
91
|
+
// floor (>=0.1.0-rc.8) still exposes .events, so detect at runtime.
|
|
92
|
+
const snapshot = typeof session.snapshotEvents === 'function'
|
|
93
|
+
? session.snapshotEvents()
|
|
94
|
+
: session.events;
|
|
95
|
+
return snapshot.filter(event => event.type === 'draw/generated');
|
|
91
96
|
}
|
package/lib/types/version.d.ts
CHANGED
package/lib/types/version.js
CHANGED