@linxin666/dsh-pet 0.3.23 → 0.3.24
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/README.i18n.yaml +2 -2
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/lib/client.js +1 -1
- package/lib/client.js.map +1 -1
- package/lib/index.js +4 -4
- package/lib/types/announce.d.ts +6 -6
- package/lib/types/announce.d.ts.map +1 -1
- package/lib/types/announce.js +5 -5
- package/package.json +1 -1
- package/src/announce.ts +6 -6
package/lib/index.js
CHANGED
|
@@ -11,10 +11,10 @@ import { readFile } from "node:fs/promises";
|
|
|
11
11
|
/** Default freshness window. */
|
|
12
12
|
const ANNOUNCE_DEFAULT_TTL_MS = 1e4;
|
|
13
13
|
/**
|
|
14
|
-
* Hard TTL ceiling. A repeating announcer
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* Hard TTL ceiling. A repeating announcer declares its poll cadence as
|
|
15
|
+
* the TTL, so an always-on bubble stays continuous across polls; the
|
|
16
|
+
* ceiling means a source that dies unmounts its bubble within at most one
|
|
17
|
+
* missed refresh cycle rather than lingering forever.
|
|
18
18
|
*/
|
|
19
19
|
const ANNOUNCE_MAX_TTL_MS = 72e5;
|
|
20
20
|
/** Hard bounds: lengths and the TTL range (1 s .. 60 s). */
|
package/lib/types/announce.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The pet announcement-bubble contract
|
|
2
|
+
* The pet announcement-bubble contract: a sibling plugin
|
|
3
3
|
* pushes one structured announcement through `pet.announce(...)`, the host
|
|
4
4
|
* validates it into a bounded payload, and the browser half renders it as a
|
|
5
5
|
* dedicated, specially styled bubble above the session bubble stack.
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
/** One plugin-authored announcement bubble. */
|
|
12
12
|
export interface PetAnnouncement {
|
|
13
|
-
/** Authoring plugin's source tag (
|
|
13
|
+
/** Authoring plugin's source tag (its own package short name). */
|
|
14
14
|
source: string;
|
|
15
15
|
/** Bubble content kind: a spend estimate, an account balance, or a plan-quota status. */
|
|
16
16
|
kind: 'balance' | 'cost' | 'plan';
|
|
@@ -34,10 +34,10 @@ export interface PetAnnouncement {
|
|
|
34
34
|
/** Default freshness window. */
|
|
35
35
|
export declare const ANNOUNCE_DEFAULT_TTL_MS = 10000;
|
|
36
36
|
/**
|
|
37
|
-
* Hard TTL ceiling. A repeating announcer
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
37
|
+
* Hard TTL ceiling. A repeating announcer declares its poll cadence as
|
|
38
|
+
* the TTL, so an always-on bubble stays continuous across polls; the
|
|
39
|
+
* ceiling means a source that dies unmounts its bubble within at most one
|
|
40
|
+
* missed refresh cycle rather than lingering forever.
|
|
41
41
|
*/
|
|
42
42
|
export declare const ANNOUNCE_MAX_TTL_MS = 7200000;
|
|
43
43
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"announce.d.ts","sourceRoot":"","sources":["../../src/announce.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,+CAA+C;AAC/C,MAAM,WAAW,eAAe;IAC9B,
|
|
1
|
+
{"version":3,"file":"announce.d.ts","sourceRoot":"","sources":["../../src/announce.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,+CAA+C;AAC/C,MAAM,WAAW,eAAe;IAC9B,kEAAkE;IAClE,MAAM,EAAE,MAAM,CAAA;IACd,yFAAyF;IACzF,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAAA;IACjC,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAA;IACb,yFAAyF;IACzF,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,oFAAoF;IACpF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,qDAAqD;IACrD,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,KAAK,CAAA;IAC3B,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAA;IACb,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAA;CACX;AAED,gCAAgC;AAChC,eAAO,MAAM,uBAAuB,QAAS,CAAA;AAE7C;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,UAAY,CAAA;AAc5C;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAgC1F;AAED,uDAAuD;AACvD,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAErF"}
|
package/lib/types/announce.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The pet announcement-bubble contract
|
|
2
|
+
* The pet announcement-bubble contract: a sibling plugin
|
|
3
3
|
* pushes one structured announcement through `pet.announce(...)`, the host
|
|
4
4
|
* validates it into a bounded payload, and the browser half renders it as a
|
|
5
5
|
* dedicated, specially styled bubble above the session bubble stack.
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
/** Default freshness window. */
|
|
12
12
|
export const ANNOUNCE_DEFAULT_TTL_MS = 10_000;
|
|
13
13
|
/**
|
|
14
|
-
* Hard TTL ceiling. A repeating announcer
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* Hard TTL ceiling. A repeating announcer declares its poll cadence as
|
|
15
|
+
* the TTL, so an always-on bubble stays continuous across polls; the
|
|
16
|
+
* ceiling means a source that dies unmounts its bubble within at most one
|
|
17
|
+
* missed refresh cycle rather than lingering forever.
|
|
18
18
|
*/
|
|
19
19
|
export const ANNOUNCE_MAX_TTL_MS = 7_200_000;
|
|
20
20
|
/** Hard bounds: lengths and the TTL range (1 s .. 60 s). */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linxin666/dsh-pet",
|
|
3
3
|
"description": "Multi-pet companion plugin for the dsh web GUI: a registry-driven floating pet that reacts to model activity, with per-pet naming, petting/feeding interactions and an affinity score",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.24",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": "^22.19.0 || >=24.0.0"
|
package/src/announce.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The pet announcement-bubble contract
|
|
2
|
+
* The pet announcement-bubble contract: a sibling plugin
|
|
3
3
|
* pushes one structured announcement through `pet.announce(...)`, the host
|
|
4
4
|
* validates it into a bounded payload, and the browser half renders it as a
|
|
5
5
|
* dedicated, specially styled bubble above the session bubble stack.
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
/** One plugin-authored announcement bubble. */
|
|
13
13
|
export interface PetAnnouncement {
|
|
14
|
-
/** Authoring plugin's source tag (
|
|
14
|
+
/** Authoring plugin's source tag (its own package short name). */
|
|
15
15
|
source: string
|
|
16
16
|
/** Bubble content kind: a spend estimate, an account balance, or a plan-quota status. */
|
|
17
17
|
kind: 'balance' | 'cost' | 'plan'
|
|
@@ -37,10 +37,10 @@ export interface PetAnnouncement {
|
|
|
37
37
|
export const ANNOUNCE_DEFAULT_TTL_MS = 10_000
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
* Hard TTL ceiling. A repeating announcer
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
40
|
+
* Hard TTL ceiling. A repeating announcer declares its poll cadence as
|
|
41
|
+
* the TTL, so an always-on bubble stays continuous across polls; the
|
|
42
|
+
* ceiling means a source that dies unmounts its bubble within at most one
|
|
43
|
+
* missed refresh cycle rather than lingering forever.
|
|
44
44
|
*/
|
|
45
45
|
export const ANNOUNCE_MAX_TTL_MS = 7_200_000
|
|
46
46
|
|