@linxin666/dsh-pet 0.4.4 → 0.4.6
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 +46 -6
- package/README.zh.md +46 -6
- package/lib/client.js +244 -47
- package/lib/client.js.map +1 -1
- package/lib/index.js +287 -28
- package/lib/types/announce.d.ts +16 -0
- package/lib/types/announce.d.ts.map +1 -1
- package/lib/types/announce.js +16 -0
- package/lib/types/client/PetDockEntry.d.ts +6 -0
- package/lib/types/client/PetDockEntry.d.ts.map +1 -1
- package/lib/types/client/PetDockEntry.js +1 -1
- package/lib/types/client/PetSettingsCard.d.ts +4 -0
- package/lib/types/client/PetSettingsCard.d.ts.map +1 -1
- package/lib/types/client/PetSettingsCard.js +16 -1
- package/lib/types/client/PetSprite.d.ts +7 -0
- package/lib/types/client/PetSprite.d.ts.map +1 -1
- package/lib/types/client/PetSprite.js +23 -13
- package/lib/types/client/index.d.ts +2 -0
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/index.js +224 -28
- package/lib/types/client/locales.d.ts +4 -0
- package/lib/types/client/locales.d.ts.map +1 -1
- package/lib/types/client/locales.js +4 -0
- package/lib/types/index.d.ts +14 -3
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +32 -3
- package/lib/types/panel-actions.d.ts +96 -0
- package/lib/types/panel-actions.d.ts.map +1 -0
- package/lib/types/panel-actions.js +134 -0
- package/lib/types/routes.d.ts.map +1 -1
- package/lib/types/routes.js +10 -0
- package/lib/types/service.d.ts +137 -9
- package/lib/types/service.d.ts.map +1 -1
- package/lib/types/service.js +163 -21
- package/package.json +1 -1
- package/src/announce.ts +17 -0
- package/src/client/PetDockEntry.test.tsx +1 -0
- package/src/client/PetDockEntry.tsx +7 -0
- package/src/client/PetSettingsCard.test.tsx +88 -0
- package/src/client/PetSettingsCard.tsx +31 -0
- package/src/client/PetSprite.test.tsx +197 -0
- package/src/client/PetSprite.tsx +56 -12
- package/src/client/index.test.tsx +152 -4
- package/src/client/index.ts +228 -29
- package/src/client/locales.ts +4 -0
- package/src/index.test.ts +22 -0
- package/src/index.ts +45 -3
- package/src/panel-actions.test.ts +130 -0
- package/src/panel-actions.ts +182 -0
- package/src/registry.test.ts +11 -1
- package/src/routes.ts +9 -0
- package/src/service.test.ts +128 -0
- package/src/service.ts +218 -24
package/lib/types/index.js
CHANGED
|
@@ -11,12 +11,13 @@
|
|
|
11
11
|
* @module @linxin666/dsh-pet
|
|
12
12
|
*/
|
|
13
13
|
import z from '@deepseek-ai/schemastery';
|
|
14
|
-
import { PET_SETTINGS_NAMESPACE, PetService } from "./service.js";
|
|
14
|
+
import { DEFAULT_STATUS_BUBBLE_MODE, PET_SETTINGS_NAMESPACE, PetService, STATUS_BUBBLE_MODES, statusBubbleMode } from "./service.js";
|
|
15
15
|
import { makePetRoutes } from "./routes.js";
|
|
16
16
|
import { loadPetRegistry, petPackageRoot } from "./registry.js";
|
|
17
17
|
import { BUBBLE_SCALE_MAX, BUBBLE_SCALE_MIN, DEFAULT_PET_ID, DISPLAY_INSET_MAX, DISPLAY_SIZE_MAX, DISPLAY_SIZE_MIN } from "./persist.js";
|
|
18
18
|
import { mountOnce } from "./mount-once.js";
|
|
19
|
-
export { PetService, MAX_SESSION_BUBBLES } from "./service.js";
|
|
19
|
+
export { PetService, MAX_SESSION_BUBBLES, DEFAULT_STATUS_BUBBLE_MODE, STATUS_BUBBLE_MODES, statusBubbleMode } from "./service.js";
|
|
20
|
+
export { MAX_PANEL_ACTIONS, PanelActionRegistry, normalizePanelAction } from "./panel-actions.js";
|
|
20
21
|
export { AFFINITY_MAX, AFFINITY_RANKS, applyInteraction, applyTurnReward, emptyAffinity, rankOf, } from "./affinity.js";
|
|
21
22
|
export { animationForPhase, PetStateMachine, rowOf, } from "./state.js";
|
|
22
23
|
export { consumeTreat, defaultTreatConfig, emptyTreatLedger, settleTreatGrants, } from "./treats.js";
|
|
@@ -42,6 +43,7 @@ export const PET_FORM_DEFAULTS = {
|
|
|
42
43
|
petId: DEFAULT_PET_ID,
|
|
43
44
|
enabled: true,
|
|
44
45
|
decorationEnabled: true,
|
|
46
|
+
statusBubbles: DEFAULT_STATUS_BUBBLE_MODE,
|
|
45
47
|
};
|
|
46
48
|
/**
|
|
47
49
|
* Plugin configuration. Under the 0.1.7 settings model a plugin's own Cordis
|
|
@@ -69,6 +71,11 @@ export const Config = z.object({
|
|
|
69
71
|
petId: z.string().volatile(),
|
|
70
72
|
enabled: z.boolean().default(PET_FORM_DEFAULTS.enabled).volatile(),
|
|
71
73
|
decorationEnabled: z.boolean().default(PET_FORM_DEFAULTS.decorationEnabled).volatile(),
|
|
74
|
+
// The pet's own session/status bubbles (issue #6). 'auto' is the shipped
|
|
75
|
+
// behavior; 'off' is the opt-in a user (or a plugin that drives its own
|
|
76
|
+
// bubble surface) needs, and it hides ONLY those bubbles — the sprite, the
|
|
77
|
+
// interaction feedback and a sibling plugin's announcement bubble stay.
|
|
78
|
+
statusBubbles: z.union([...STATUS_BUBBLE_MODES]).default(PET_FORM_DEFAULTS.statusBubbles).volatile(),
|
|
72
79
|
});
|
|
73
80
|
/**
|
|
74
81
|
* Read one live config field.
|
|
@@ -128,6 +135,22 @@ function displayField(key, live, persisted, committed) {
|
|
|
128
135
|
* @returns the resolved settings section.
|
|
129
136
|
*/
|
|
130
137
|
export function petSettingsSection(config, fallbackPetId, persisted = {}, committed = {}) {
|
|
138
|
+
// `visible` and `enabled` answer two DIFFERENT questions and are kept
|
|
139
|
+
// apart on purpose (#1762):
|
|
140
|
+
//
|
|
141
|
+
// - `visible` is the pet's own hide/show intent, persisted in its pet.json
|
|
142
|
+
// and written by the sprite's hide/summon control and by the aggregate
|
|
143
|
+
// shell's fallback switch.
|
|
144
|
+
// - `enabled` is the plugin master switch, which hides the pet whatever that
|
|
145
|
+
// own intent says.
|
|
146
|
+
//
|
|
147
|
+
// The effective "is it on screen" state is the conjunction, and it belongs at
|
|
148
|
+
// the single point that PRODUCES the view (see PetService.state), never here
|
|
149
|
+
// and never written back to pet.json. Folding it into this field is what made
|
|
150
|
+
// the master switch one-way: switching it off stored the derived `false` as
|
|
151
|
+
// the user's own intent, so switching it on again (or restarting) read that
|
|
152
|
+
// stored `false` back and the pet never returned.
|
|
153
|
+
const enabled = readLive(config.enabled, PET_FORM_DEFAULTS.enabled);
|
|
131
154
|
return {
|
|
132
155
|
visible: displayField('visible', config.visible, persisted, committed),
|
|
133
156
|
size: displayField('size', config.size, persisted, committed),
|
|
@@ -135,8 +158,13 @@ export function petSettingsSection(config, fallbackPetId, persisted = {}, commit
|
|
|
135
158
|
bottom: displayField('bottom', config.bottom, persisted, committed),
|
|
136
159
|
bubbleScale: displayField('bubbleScale', config.bubbleScale, persisted, committed),
|
|
137
160
|
petId: readLive(config.petId, fallbackPetId),
|
|
138
|
-
enabled
|
|
161
|
+
enabled,
|
|
139
162
|
decorationEnabled: readLive(config.decorationEnabled, PET_FORM_DEFAULTS.decorationEnabled),
|
|
163
|
+
// Not a display field: the bubble switch has no persisted pet.json twin
|
|
164
|
+
// (it is a plugin-level rendering preference, like `decorationEnabled`),
|
|
165
|
+
// so it reads the live value directly and normalizes anything unknown to
|
|
166
|
+
// the shipped default instead of trusting the document.
|
|
167
|
+
statusBubbles: statusBubbleMode(readLive(config.statusBubbles, undefined)),
|
|
140
168
|
};
|
|
141
169
|
}
|
|
142
170
|
/** The settings row ids a pet install is served under, most specific first. */
|
|
@@ -181,6 +209,7 @@ function applyImpl(ctx, config = {}) {
|
|
|
181
209
|
...config,
|
|
182
210
|
enabled: readLive(config.enabled, PET_FORM_DEFAULTS.enabled),
|
|
183
211
|
decorationEnabled: readLive(config.decorationEnabled, PET_FORM_DEFAULTS.decorationEnabled),
|
|
212
|
+
statusBubbles: statusBubbleMode(readLive(config.statusBubbles, undefined)),
|
|
184
213
|
registry,
|
|
185
214
|
});
|
|
186
215
|
// The mirror back into the settings document (see syncSettingsFromPet) has to
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hover-panel action contract — the extension point a sibling plugin uses to
|
|
3
|
+
* add its own button to the pet's floating hover panel (issue #6).
|
|
4
|
+
*
|
|
5
|
+
* A plugin registers one action in process through the pet service
|
|
6
|
+
* (`ctx.pet.registerPanelAction({ id, label, onSelect })`); the host validates
|
|
7
|
+
* it into a bounded view, serves the registered actions in the state snapshot
|
|
8
|
+
* (`PetStateView.panelActions`), and the browser half renders one button per
|
|
9
|
+
* entry at the end of the panel's action row. A click travels back through
|
|
10
|
+
* `POST /api/pet/panel-action`, which dispatches to the registering plugin's
|
|
11
|
+
* own callback — the pet owns the row, the plugin owns what the button does.
|
|
12
|
+
*
|
|
13
|
+
* The validation and the registry live in this pure module so the contract has
|
|
14
|
+
* exactly one home and stays testable without the cordis service.
|
|
15
|
+
* @module @linxin666/dsh-pet/panel-actions
|
|
16
|
+
*/
|
|
17
|
+
/** How many plugin actions one hover panel can carry at most. */
|
|
18
|
+
export declare const MAX_PANEL_ACTIONS = 8;
|
|
19
|
+
/** One registered action as the browser half renders it. */
|
|
20
|
+
export interface PetPanelActionView {
|
|
21
|
+
/** Registration id; the click dispatches back on it. */
|
|
22
|
+
id: string;
|
|
23
|
+
/** Button label. */
|
|
24
|
+
label: string;
|
|
25
|
+
/** Optional tooltip (the label's longer explanation). */
|
|
26
|
+
title?: string;
|
|
27
|
+
/** Sort key within the registered block; ties break on id. */
|
|
28
|
+
order: number;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* What a panel action click knows about the pet at the moment it arrives. The
|
|
32
|
+
* registering plugin may read more off the service (`selectedPetId()`), so this
|
|
33
|
+
* stays a read-only snapshot rather than a live handle.
|
|
34
|
+
*/
|
|
35
|
+
export interface PetPanelActionContext {
|
|
36
|
+
/** The selected pet id when the click arrived. */
|
|
37
|
+
petId: string;
|
|
38
|
+
}
|
|
39
|
+
/** The callback a registration carries; a click invokes it in the host. */
|
|
40
|
+
export type PetPanelActionHandler = (context: PetPanelActionContext) => void | Promise<void>;
|
|
41
|
+
/** One action a sibling plugin registers into the panel's action row. */
|
|
42
|
+
export interface PetPanelActionRegistration {
|
|
43
|
+
/** Unique, stable id (kebab-case); re-registering the same id replaces it. */
|
|
44
|
+
id: string;
|
|
45
|
+
/** Button label (bounded). */
|
|
46
|
+
label: string;
|
|
47
|
+
/** Optional tooltip rendered as the button's `title`. */
|
|
48
|
+
title?: string;
|
|
49
|
+
/** Sort key within the registered block (default 0; ascending, ties on id). */
|
|
50
|
+
order?: number;
|
|
51
|
+
/** Invoked in the host when the browser half dispatches this action. */
|
|
52
|
+
onSelect: PetPanelActionHandler;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Validate one registration. Returns undefined — never throws — when the shape
|
|
56
|
+
* is unusable: the id must match the id grammar and the label must survive
|
|
57
|
+
* truncation, so a click can always be dispatched back to a known row.
|
|
58
|
+
* @param input - the registration a sibling plugin passed to the service.
|
|
59
|
+
* @returns the wire view, or undefined when the registration is malformed.
|
|
60
|
+
*/
|
|
61
|
+
export declare function normalizePanelAction(input: unknown): PetPanelActionView | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* The panel's action registry: one bounded, ordered table of plugin actions.
|
|
64
|
+
*
|
|
65
|
+
* Registration is id-wins (a later registration of the same id replaces the
|
|
66
|
+
* earlier one, and the superseded disposer stops touching the table so a
|
|
67
|
+
* disposing plugin can never remove the action that replaced it). The table is
|
|
68
|
+
* in-memory only — it dies with the pet service fiber — and every entry is
|
|
69
|
+
* reclaimed by the disposer the registering plugin runs with its own fiber.
|
|
70
|
+
*/
|
|
71
|
+
export declare class PanelActionRegistry {
|
|
72
|
+
private readonly actions;
|
|
73
|
+
/**
|
|
74
|
+
* Register one action.
|
|
75
|
+
* @param input - the registration a sibling plugin passed to the service.
|
|
76
|
+
* @returns a disposer removing this registration.
|
|
77
|
+
* @throws when the registration is malformed. Unlike `announce` — a hot path
|
|
78
|
+
* whose payload a caller may build from untrusted data — a registration is
|
|
79
|
+
* built once at the registering plugin's own apply, so a bad id or label is a
|
|
80
|
+
* wiring mistake that should fail where it was written.
|
|
81
|
+
*/
|
|
82
|
+
register(input: unknown): () => void;
|
|
83
|
+
/** The registered actions as the state view serves them, in render order. */
|
|
84
|
+
views(): PetPanelActionView[];
|
|
85
|
+
/**
|
|
86
|
+
* Dispatch a click to the plugin that registered this id.
|
|
87
|
+
* @param id - the id the browser half reported.
|
|
88
|
+
* @param context - what the pet looked like when the click arrived.
|
|
89
|
+
* @returns whether the id was registered. A handler that throws rejects:
|
|
90
|
+
* the caller decides how a sibling plugin's failure is reported.
|
|
91
|
+
*/
|
|
92
|
+
select(id: string, context: PetPanelActionContext): Promise<boolean>;
|
|
93
|
+
/** Drop every registration (service teardown; tests). */
|
|
94
|
+
clear(): void;
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=panel-actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-actions.d.ts","sourceRoot":"","sources":["../../src/panel-actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,iEAAiE;AACjE,eAAO,MAAM,iBAAiB,IAAI,CAAA;AAoBlC,4DAA4D;AAC5D,MAAM,WAAW,kBAAkB;IACjC,wDAAwD;IACxD,EAAE,EAAE,MAAM,CAAA;IACV,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAA;CACd;AAED,2EAA2E;AAC3E,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,qBAAqB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAE5F,yEAAyE;AACzE,MAAM,WAAW,0BAA0B;IACzC,8EAA8E;IAC9E,EAAE,EAAE,MAAM,CAAA;IACV,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,wEAAwE;IACxE,QAAQ,EAAE,qBAAqB,CAAA;CAChC;AAeD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,GAAG,SAAS,CAkBnF;AAED;;;;;;;;GAQG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsC;IAE9D;;;;;;;;OAQG;IACH,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,IAAI;IAkBpC,6EAA6E;IAC7E,KAAK,IAAI,kBAAkB,EAAE;IAM7B;;;;;;OAMG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,CAAC;IAO1E,yDAAyD;IACzD,KAAK,IAAI,IAAI;CAGd"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hover-panel action contract — the extension point a sibling plugin uses to
|
|
3
|
+
* add its own button to the pet's floating hover panel (issue #6).
|
|
4
|
+
*
|
|
5
|
+
* A plugin registers one action in process through the pet service
|
|
6
|
+
* (`ctx.pet.registerPanelAction({ id, label, onSelect })`); the host validates
|
|
7
|
+
* it into a bounded view, serves the registered actions in the state snapshot
|
|
8
|
+
* (`PetStateView.panelActions`), and the browser half renders one button per
|
|
9
|
+
* entry at the end of the panel's action row. A click travels back through
|
|
10
|
+
* `POST /api/pet/panel-action`, which dispatches to the registering plugin's
|
|
11
|
+
* own callback — the pet owns the row, the plugin owns what the button does.
|
|
12
|
+
*
|
|
13
|
+
* The validation and the registry live in this pure module so the contract has
|
|
14
|
+
* exactly one home and stays testable without the cordis service.
|
|
15
|
+
* @module @linxin666/dsh-pet/panel-actions
|
|
16
|
+
*/
|
|
17
|
+
/** How many plugin actions one hover panel can carry at most. */
|
|
18
|
+
export const MAX_PANEL_ACTIONS = 8;
|
|
19
|
+
/**
|
|
20
|
+
* Action id grammar: a lowercase id in the shape pet and decoration ids use
|
|
21
|
+
* (`^` + kebab/dot segments). The id is what a click travels back on, so it
|
|
22
|
+
* has to be stable, addressable and free of separators the wire would treat as
|
|
23
|
+
* structure.
|
|
24
|
+
*/
|
|
25
|
+
const ID_PATTERN = /^[a-z0-9][a-z0-9._-]{0,63}$/;
|
|
26
|
+
/**
|
|
27
|
+
* Label bound. The action row is compact and wraps beyond a few characters per
|
|
28
|
+
* button, so a plugin names its action (换装, Quota) rather than a sentence;
|
|
29
|
+
* the optional title carries the longer explanation as a tooltip.
|
|
30
|
+
*/
|
|
31
|
+
const LABEL_MAX = 24;
|
|
32
|
+
/** Title (tooltip) bound; the same reason voice-pack labels are bounded. */
|
|
33
|
+
const TITLE_MAX = 80;
|
|
34
|
+
function boundedString(value, max) {
|
|
35
|
+
if (typeof value !== 'string')
|
|
36
|
+
return undefined;
|
|
37
|
+
const trimmed = value.trim();
|
|
38
|
+
if (trimmed === '')
|
|
39
|
+
return undefined;
|
|
40
|
+
return trimmed.length <= max ? trimmed : trimmed.slice(0, max);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Validate one registration. Returns undefined — never throws — when the shape
|
|
44
|
+
* is unusable: the id must match the id grammar and the label must survive
|
|
45
|
+
* truncation, so a click can always be dispatched back to a known row.
|
|
46
|
+
* @param input - the registration a sibling plugin passed to the service.
|
|
47
|
+
* @returns the wire view, or undefined when the registration is malformed.
|
|
48
|
+
*/
|
|
49
|
+
export function normalizePanelAction(input) {
|
|
50
|
+
if (typeof input !== 'object' || input === null)
|
|
51
|
+
return undefined;
|
|
52
|
+
const data = input;
|
|
53
|
+
// The id is an identity, not copy: an over-long one is refused rather than
|
|
54
|
+
// truncated, because truncating it could silently collapse two plugins'
|
|
55
|
+
// registrations onto one row.
|
|
56
|
+
const id = typeof data.id === 'string' ? data.id.trim() : undefined;
|
|
57
|
+
if (id === undefined || !ID_PATTERN.test(id))
|
|
58
|
+
return undefined;
|
|
59
|
+
const label = boundedString(data.label, LABEL_MAX);
|
|
60
|
+
if (label === undefined)
|
|
61
|
+
return undefined;
|
|
62
|
+
const title = boundedString(data.title, TITLE_MAX);
|
|
63
|
+
const order = typeof data.order === 'number' && Number.isFinite(data.order) ? data.order : 0;
|
|
64
|
+
return {
|
|
65
|
+
id,
|
|
66
|
+
label,
|
|
67
|
+
...(title === undefined ? {} : { title }),
|
|
68
|
+
order,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The panel's action registry: one bounded, ordered table of plugin actions.
|
|
73
|
+
*
|
|
74
|
+
* Registration is id-wins (a later registration of the same id replaces the
|
|
75
|
+
* earlier one, and the superseded disposer stops touching the table so a
|
|
76
|
+
* disposing plugin can never remove the action that replaced it). The table is
|
|
77
|
+
* in-memory only — it dies with the pet service fiber — and every entry is
|
|
78
|
+
* reclaimed by the disposer the registering plugin runs with its own fiber.
|
|
79
|
+
*/
|
|
80
|
+
export class PanelActionRegistry {
|
|
81
|
+
actions = new Map();
|
|
82
|
+
/**
|
|
83
|
+
* Register one action.
|
|
84
|
+
* @param input - the registration a sibling plugin passed to the service.
|
|
85
|
+
* @returns a disposer removing this registration.
|
|
86
|
+
* @throws when the registration is malformed. Unlike `announce` — a hot path
|
|
87
|
+
* whose payload a caller may build from untrusted data — a registration is
|
|
88
|
+
* built once at the registering plugin's own apply, so a bad id or label is a
|
|
89
|
+
* wiring mistake that should fail where it was written.
|
|
90
|
+
*/
|
|
91
|
+
register(input) {
|
|
92
|
+
const registration = (typeof input === 'object' && input !== null ? input : {});
|
|
93
|
+
const view = normalizePanelAction(registration);
|
|
94
|
+
if (view === undefined)
|
|
95
|
+
throw new Error('[dsh-pet] invalid panel action: id and label are required');
|
|
96
|
+
if (typeof registration.onSelect !== 'function') {
|
|
97
|
+
throw new Error('[dsh-pet] invalid panel action: onSelect must be a function');
|
|
98
|
+
}
|
|
99
|
+
if (!this.actions.has(view.id) && this.actions.size >= MAX_PANEL_ACTIONS) {
|
|
100
|
+
throw new Error('[dsh-pet] panel action limit reached: ' + MAX_PANEL_ACTIONS);
|
|
101
|
+
}
|
|
102
|
+
const entry = { view, onSelect: registration.onSelect };
|
|
103
|
+
this.actions.set(view.id, entry);
|
|
104
|
+
return () => {
|
|
105
|
+
// Only the registration that still owns the id may clear it.
|
|
106
|
+
if (this.actions.get(view.id) === entry)
|
|
107
|
+
this.actions.delete(view.id);
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/** The registered actions as the state view serves them, in render order. */
|
|
111
|
+
views() {
|
|
112
|
+
return [...this.actions.values()]
|
|
113
|
+
.map(entry => entry.view)
|
|
114
|
+
.sort((a, b) => a.order - b.order || a.id.localeCompare(b.id));
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Dispatch a click to the plugin that registered this id.
|
|
118
|
+
* @param id - the id the browser half reported.
|
|
119
|
+
* @param context - what the pet looked like when the click arrived.
|
|
120
|
+
* @returns whether the id was registered. A handler that throws rejects:
|
|
121
|
+
* the caller decides how a sibling plugin's failure is reported.
|
|
122
|
+
*/
|
|
123
|
+
async select(id, context) {
|
|
124
|
+
const entry = this.actions.get(id);
|
|
125
|
+
if (entry === undefined)
|
|
126
|
+
return false;
|
|
127
|
+
await entry.onSelect(context);
|
|
128
|
+
return true;
|
|
129
|
+
}
|
|
130
|
+
/** Drop every registration (service teardown; tests). */
|
|
131
|
+
clear() {
|
|
132
|
+
this.actions.clear();
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,OAAO,KAAK,EAA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,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAO9C,+CAA+C;AAC/C,eAAO,MAAM,cAAc,aAAa,CAAA;AAExC,0EAA0E;AAC1E,eAAO,MAAM,gBAAgB,SAAS,CAAA;AAMtC;;;;GAIG;AACH,eAAO,MAAM,cAAc;IACzB,yBAAyB;;IAEzB,iDAAiD;;IAEjD,8EAA8E;;CAEtE,CAAA;AAEV,6DAA6D;AAC7D,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd;AAsBD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAcrF;AAqPD,4EAA4E;AAC5E,eAAO,MAAM,kBAAkB,QAA8B,CAAA;AAe7D,4EAA4E;AAC5E,eAAO,MAAM,eAAe,QAAmB,CAAA;AAE/C,6EAA6E;AAC7E,MAAM,WAAW,eAAe;IAC9B,+EAA+E;IAC/E,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA4MD,4EAA4E;AAC5E,wBAAgB,aAAa,CAAC,IAAI,EAAE;IAAE,OAAO,EAAE,UAAU,CAAC;IAAC,GAAG,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,YAAY,CAAA;CAAE,GAAG,eAAe,GAAG,QAAQ,EAAE,CAgGjI;AAGD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA"}
|
package/lib/types/routes.js
CHANGED
|
@@ -598,6 +598,16 @@ export function makePetRoutes(deps) {
|
|
|
598
598
|
return Promise.reject(new Error('invalid-pet'));
|
|
599
599
|
return service.setPetId(petId);
|
|
600
600
|
}),
|
|
601
|
+
// Hover-panel action click (issue #6): the browser half owns no plugin
|
|
602
|
+
// callbacks, so a click on a registered action travels back here and the
|
|
603
|
+
// service dispatches it to the plugin that registered it. Same loopback /
|
|
604
|
+
// paired-device guard as every other endpoint in this family.
|
|
605
|
+
postRoute(ctx, PET_API_PREFIX + '/panel-action', (body) => {
|
|
606
|
+
const id = body.id;
|
|
607
|
+
if (typeof id !== 'string')
|
|
608
|
+
return Promise.reject(new Error('invalid-panel-action'));
|
|
609
|
+
return service.selectPanelAction(id);
|
|
610
|
+
}),
|
|
601
611
|
// Gameplay verbs (miku-pet generalization): touch rolls a named zone's
|
|
602
612
|
// branch; the omitted-zone form is the plain-click boost during a touch
|
|
603
613
|
// animation. Mode/tick/buy drive the work, sleep and shop loops.
|
package/lib/types/service.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ import type { AffinityConfig, PetAffinityView, PetInteraction } from './affinity
|
|
|
16
16
|
import { type PetAnnouncement } from './announce.ts';
|
|
17
17
|
import type { TreatConfig } from './treats.ts';
|
|
18
18
|
import { type LedgerInteractionResult } from './ledger.ts';
|
|
19
|
+
import { type PetPanelActionRegistration, type PetPanelActionView } from './panel-actions.ts';
|
|
19
20
|
import { type PetDisplayConfig } from './persist.ts';
|
|
20
21
|
import { type PetDefinition, type PetManifest, type PetRegistry, type PetRegistryDiagnostic } from './registry.ts';
|
|
21
22
|
import type { DecorationView } from './contracts/status-decoration.ts';
|
|
@@ -34,6 +35,8 @@ export interface PetConfig {
|
|
|
34
35
|
enabled?: boolean;
|
|
35
36
|
/** Status-decoration master switch (pet-center M5, #567); defaults to on. */
|
|
36
37
|
decorationEnabled?: boolean;
|
|
38
|
+
/** Whether the pet's own session/status bubbles render (issue #6); defaults to 'auto'. */
|
|
39
|
+
statusBubbles?: PetStatusBubbleMode;
|
|
37
40
|
/** Prebuilt registry (tests); defaults to scanning the package + user dirs. */
|
|
38
41
|
registry?: PetRegistry;
|
|
39
42
|
/** Extra manifest entries composed by the embedding application. */
|
|
@@ -66,7 +69,31 @@ export interface PetSettingsSection {
|
|
|
66
69
|
* the settings surface mirrors this field and can turn it off.
|
|
67
70
|
*/
|
|
68
71
|
decorationEnabled?: boolean;
|
|
72
|
+
/** Whether the pet's own session/status bubbles render (issue #6). */
|
|
73
|
+
statusBubbles?: PetStatusBubbleMode;
|
|
69
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Whether the pet renders its own session/status bubbles (issue #6).
|
|
77
|
+
*
|
|
78
|
+
* `auto` is the shipped behavior: every active session keeps a bubble, and a
|
|
79
|
+
* sibling plugin's announcement bubble rides the same stack above them. `off`
|
|
80
|
+
* hides ONLY the pet's own bubbles — the announcement bubble, the interaction
|
|
81
|
+
* feedback bubble and the sprite itself are untouched — which is what a plugin
|
|
82
|
+
* that drives its own bubble surface needs. Anything unknown resolves to
|
|
83
|
+
* `auto`, so an older profile or a hand-edited settings document keeps the
|
|
84
|
+
* status bubbles rather than losing them silently.
|
|
85
|
+
*/
|
|
86
|
+
export type PetStatusBubbleMode = 'auto' | 'off';
|
|
87
|
+
/** Every accepted {@link PetStatusBubbleMode}, in settings-card order. */
|
|
88
|
+
export declare const STATUS_BUBBLE_MODES: readonly PetStatusBubbleMode[];
|
|
89
|
+
/** The shipped default; the switch changes nothing until a user turns it off. */
|
|
90
|
+
export declare const DEFAULT_STATUS_BUBBLE_MODE: PetStatusBubbleMode;
|
|
91
|
+
/**
|
|
92
|
+
* Normalize a stored, live or hand-edited bubble mode.
|
|
93
|
+
* @param value - the value the settings document carries, when any.
|
|
94
|
+
* @returns the effective mode; anything but 'off' renders the bubbles.
|
|
95
|
+
*/
|
|
96
|
+
export declare function statusBubbleMode(value: unknown): PetStatusBubbleMode;
|
|
70
97
|
/** Settings namespace of the pet capability. Spelled here rather than imported: the browser half spells the same value. */
|
|
71
98
|
export declare const PET_SETTINGS_NAMESPACE = "pet";
|
|
72
99
|
/**
|
|
@@ -145,11 +172,36 @@ export interface PetStateView {
|
|
|
145
172
|
*/
|
|
146
173
|
gameplay?: PetGameplayStateView;
|
|
147
174
|
/**
|
|
148
|
-
* The freshest plugin-authored announcement
|
|
149
|
-
*
|
|
150
|
-
*
|
|
175
|
+
* The freshest plugin-authored announcement, within its TTL; absent when none
|
|
176
|
+
* is fresh. Rendered as a dedicated styled bubble above the session stack.
|
|
177
|
+
*
|
|
178
|
+
* Kept alongside `announcements` with exactly the meaning it had when the
|
|
179
|
+
* contract had a single slot, so a browser half predating the per-source
|
|
180
|
+
* upgrade keeps rendering one bubble instead of none (issue #1812). New
|
|
181
|
+
* readers should use `announcements`.
|
|
151
182
|
*/
|
|
152
183
|
announcement?: PetAnnouncement;
|
|
184
|
+
/**
|
|
185
|
+
* Every fresh plugin-authored announcement, one per publishing plugin, in
|
|
186
|
+
* render order (issue #1812). Absent when nothing is fresh, so a host with no
|
|
187
|
+
* publisher serves exactly what it served before the upgrade.
|
|
188
|
+
*/
|
|
189
|
+
announcements?: PetAnnouncement[];
|
|
190
|
+
/**
|
|
191
|
+
* Whether the pet's own session/status bubbles render (issue #6). Absent
|
|
192
|
+
* on a host that predates the switch, which the browser half reads as
|
|
193
|
+
* `'auto'` — the behavior that shipped before it existed. Turning it to
|
|
194
|
+
* `'off'` hides those bubbles only; `announcement` and `bubble` (the
|
|
195
|
+
* legacy single status bubble) are still served, so the wire contract does
|
|
196
|
+
* not change with the display preference.
|
|
197
|
+
*/
|
|
198
|
+
statusBubbles?: PetStatusBubbleMode;
|
|
199
|
+
/**
|
|
200
|
+
* Actions a sibling plugin registered into the hover panel's action row
|
|
201
|
+
* (issue #6), in render order. Absent when none is registered, so the
|
|
202
|
+
* panel row is exactly what it was before the extension point existed.
|
|
203
|
+
*/
|
|
204
|
+
panelActions?: PetPanelActionView[];
|
|
153
205
|
}
|
|
154
206
|
/** Result of `pet.interact`. */
|
|
155
207
|
export type PetInteractResult = LedgerInteractionResult;
|
|
@@ -199,8 +251,17 @@ export declare class PetService extends Service {
|
|
|
199
251
|
private enabled;
|
|
200
252
|
/** Status-decoration master switch (M5, #567); mirrored from settings. */
|
|
201
253
|
private decorationEnabled;
|
|
202
|
-
/**
|
|
203
|
-
private
|
|
254
|
+
/** Whether the pet renders its own session/status bubbles (issue #6). */
|
|
255
|
+
private statusBubbles;
|
|
256
|
+
/**
|
|
257
|
+
* Plugin-authored announcements, one slot per `source` (issue #1812). The
|
|
258
|
+
* contract started as a single slot, where a second announcing plugin
|
|
259
|
+
* displaced the first; the map is the upgrade the design note predicted for
|
|
260
|
+
* exactly this moment. Insertion order is the render order and re-announcing
|
|
261
|
+
* a source updates its entry in place, so two publishers on different
|
|
262
|
+
* cadences never swap positions.
|
|
263
|
+
*/
|
|
264
|
+
private readonly announcements;
|
|
204
265
|
private disposeActivity;
|
|
205
266
|
/** Session whose most recent meaningful event currently drives the global pet. */
|
|
206
267
|
private displaySession;
|
|
@@ -216,6 +277,13 @@ export declare class PetService extends Service {
|
|
|
216
277
|
* disposed sessions are removed by the 'session/disposed' listener.
|
|
217
278
|
*/
|
|
218
279
|
private readonly sessionActivity;
|
|
280
|
+
/**
|
|
281
|
+
* Hover-panel actions registered by sibling plugins (issue #6). The pet owns
|
|
282
|
+
* the panel row and serves the registrations; each plugin owns the callback a
|
|
283
|
+
* click dispatches to. Bounded, in-memory, reclaimed with the registering
|
|
284
|
+
* plugin's disposer.
|
|
285
|
+
*/
|
|
286
|
+
private readonly panelActions;
|
|
219
287
|
/**
|
|
220
288
|
* Sessions whose reward source is the official event stream. This metadata
|
|
221
289
|
* outlives transient visual resets so a derived legacy `done` cannot reward
|
|
@@ -240,17 +308,77 @@ export declare class PetService extends Service {
|
|
|
240
308
|
private voicePools;
|
|
241
309
|
/** Whether the pet service consumes session activity while enabled. */
|
|
242
310
|
isEnabled(): boolean;
|
|
311
|
+
/**
|
|
312
|
+
* The remark layers one pet contributes to the ledger: its manifest pools
|
|
313
|
+
* first, then the voice packs (a pet directory's voice.json over the global
|
|
314
|
+
* `$DSH_HOME/pets/.voice.json`). Every path that seats the ledger's remark
|
|
315
|
+
* pools resolves them here, so no call site can apply the manifest pools and
|
|
316
|
+
* silently drop the voice layer: doing that reverted a pet whose lines a voice
|
|
317
|
+
* pack had translated back to the built-in pools the moment the settings
|
|
318
|
+
* surface applied.
|
|
319
|
+
* @param entry - the pet whose remark pools apply.
|
|
320
|
+
* @returns the layers `PetLedger.setRemarks` takes.
|
|
321
|
+
*/
|
|
322
|
+
private remarkLayers;
|
|
323
|
+
/** Re-seat the ledger's remark pools from one pet's layers. */
|
|
324
|
+
private applyRemarks;
|
|
243
325
|
/** RPC: current pet state snapshot. */
|
|
244
326
|
state(currentSessionId?: string): Promise<PetStateView>;
|
|
245
327
|
/**
|
|
246
|
-
* RPC: one plugin-authored announcement bubble
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
328
|
+
* RPC: one plugin-authored announcement bubble, held in the publisher's own
|
|
329
|
+
* slot keyed by `source` (issue #1812). The payload is validated into a
|
|
330
|
+
* bounded PetAnnouncement; a malformed one is dropped silently — a sibling
|
|
331
|
+
* plugin's bug must never surface as pet breakage. Re-announcing replaces
|
|
332
|
+
* only the caller's own slot, so publishers coexist instead of displacing
|
|
333
|
+
* each other. Announcements are in-memory only.
|
|
334
|
+
*
|
|
335
|
+
* The slot table is bounded by {@link MAX_ANNOUNCEMENTS}. Expired entries are
|
|
336
|
+
* pruned first, so a silent publisher never holds a slot; when the table is
|
|
337
|
+
* genuinely full, the entry that has been silent longest gives up its slot
|
|
338
|
+
* to the arriving one — a publisher that keeps refreshing is never evicted.
|
|
250
339
|
*/
|
|
251
340
|
announce(input: unknown): {
|
|
252
341
|
ok: boolean;
|
|
253
342
|
};
|
|
343
|
+
/**
|
|
344
|
+
* The announcement slots still fresh, in render order. An expired entry
|
|
345
|
+
* simply stops appearing (the client's 2 s poll drops it); no timer owns its
|
|
346
|
+
* removal.
|
|
347
|
+
*/
|
|
348
|
+
private freshAnnouncements;
|
|
349
|
+
/**
|
|
350
|
+
* Register one action into the hover panel's action row (issue #6). The pet
|
|
351
|
+
* renders the button and dispatches the click back to `onSelect`; the plugin
|
|
352
|
+
* decides what the button does. Registering is a wiring step, so a malformed
|
|
353
|
+
* registration throws at the caller's own apply instead of being dropped.
|
|
354
|
+
*
|
|
355
|
+
* The registration is reclaimed by the disposer, so the idiomatic call binds
|
|
356
|
+
* it to the registering plugin's fiber:
|
|
357
|
+
* ```ts
|
|
358
|
+
* ctx.effect(() => ctx.pet.registerPanelAction({
|
|
359
|
+
* id: 'pet-quota-swap',
|
|
360
|
+
* label: '换装',
|
|
361
|
+
* onSelect: async () => { await cycleToNextPet(ctx.pet) },
|
|
362
|
+
* }))
|
|
363
|
+
* ```
|
|
364
|
+
* @param action - the registration to serve in the panel row.
|
|
365
|
+
* @returns a disposer that removes this registration.
|
|
366
|
+
* @throws when the id, label or callback is unusable, or the row is full.
|
|
367
|
+
*/
|
|
368
|
+
registerPanelAction(action: PetPanelActionRegistration): () => void;
|
|
369
|
+
/**
|
|
370
|
+
* RPC: dispatch one hover-panel action click back to the plugin that
|
|
371
|
+
* registered it. A rejected id is a stale click (the plugin disposed its
|
|
372
|
+
* registration between render and click), and a throwing callback is that
|
|
373
|
+
* plugin's own failure — neither may surface as pet breakage, so both answer
|
|
374
|
+
* `{ ok: false }` instead of throwing out of the route.
|
|
375
|
+
* @param id - the action id the browser half reported.
|
|
376
|
+
* @returns whether the click reached a registered action.
|
|
377
|
+
*/
|
|
378
|
+
selectPanelAction(id: string): Promise<{
|
|
379
|
+
ok: boolean;
|
|
380
|
+
error?: string;
|
|
381
|
+
}>;
|
|
254
382
|
/** Current persisted display config (read-only view). */
|
|
255
383
|
display(): PetDisplayConfig;
|
|
256
384
|
/** RPC: the registry entries the browser half renders and selects from. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBA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