@nocville/node 0.2.1 → 0.2.3
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/LICENSE +21 -0
- package/dist/cjs/index.js +2 -0
- package/dist/index.d.ts +12 -2
- package/dist/index.js +2 -0
- package/package.json +2 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jeff Marshall
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/cjs/index.js
CHANGED
|
@@ -76,6 +76,8 @@ class NocvilleClient {
|
|
|
76
76
|
payload.name = update.name;
|
|
77
77
|
if (update.archetype !== undefined)
|
|
78
78
|
payload.archetype = update.archetype;
|
|
79
|
+
if (update.kind !== undefined)
|
|
80
|
+
payload.kind = update.kind;
|
|
79
81
|
if (update.subStatus !== undefined)
|
|
80
82
|
payload.subStatus = update.subStatus;
|
|
81
83
|
if (update.screenData !== undefined)
|
package/dist/index.d.ts
CHANGED
|
@@ -55,7 +55,9 @@ export interface AlertConfig {
|
|
|
55
55
|
heartbeatInterval?: number;
|
|
56
56
|
}
|
|
57
57
|
/** Companion pixel-screen types the server knows how to render. */
|
|
58
|
-
export type CompanionScreenType = 'log-terminal' | 'ticker-tape' | 'crt-monitor' | 'dashboard-wall' | 'status-light' | 'gauge-panel' | 'web-view' | 'desk-sign' | 'commit-board' | 'welcome-sign'
|
|
58
|
+
export type CompanionScreenType = 'log-terminal' | 'ticker-tape' | 'crt-monitor' | 'dashboard-wall' | 'status-light' | 'gauge-panel' | 'web-view' | 'desk-sign' | 'commit-board' | 'welcome-sign'
|
|
59
|
+
/** Your own pixel art (pixel-image screenData, transparency + animation frames). */
|
|
60
|
+
| 'pixel-device';
|
|
59
61
|
export type BehaviorActivity = 'busy' | 'idle' | 'waiting' | 'critical';
|
|
60
62
|
export type BehaviorIdle = 'seek-lounge' | 'seek-desk' | 'wander' | 'stay';
|
|
61
63
|
export type BehaviorPose = 'sit' | 'sleep' | 'stand';
|
|
@@ -83,7 +85,10 @@ export interface BehaviorHints {
|
|
|
83
85
|
activity?: BehaviorActivity;
|
|
84
86
|
/** Where to go when idle */
|
|
85
87
|
idle?: BehaviorIdle;
|
|
86
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* Where to go when busy: 'seek-desk' | 'wander' | 'stay' | 'seek-companion' (work at this
|
|
90
|
+
* NPC's own companion object) | 'seek-object:<category|catalogId>'
|
|
91
|
+
*/
|
|
87
92
|
busy?: string;
|
|
88
93
|
/** Pose to strike when idle */
|
|
89
94
|
idlePose?: BehaviorPose;
|
|
@@ -149,6 +154,11 @@ export interface StatusUpdate {
|
|
|
149
154
|
metrics?: Record<string, number | string>;
|
|
150
155
|
/** NPC archetype identifier */
|
|
151
156
|
archetype?: string;
|
|
157
|
+
/**
|
|
158
|
+
* NPC type slug (lowercase letters, digits and dashes, e.g. `backup-bot`). Groups NPCs so
|
|
159
|
+
* a team can send every NPC of a type to the same room. Defaults to the archetype.
|
|
160
|
+
*/
|
|
161
|
+
kind?: string;
|
|
152
162
|
/** Sub-status for more granular state */
|
|
153
163
|
subStatus?: string;
|
|
154
164
|
/** Screen data for NPC display */
|
package/dist/index.js
CHANGED
|
@@ -73,6 +73,8 @@ export class NocvilleClient {
|
|
|
73
73
|
payload.name = update.name;
|
|
74
74
|
if (update.archetype !== undefined)
|
|
75
75
|
payload.archetype = update.archetype;
|
|
76
|
+
if (update.kind !== undefined)
|
|
77
|
+
payload.kind = update.kind;
|
|
76
78
|
if (update.subStatus !== undefined)
|
|
77
79
|
payload.subStatus = update.subStatus;
|
|
78
80
|
if (update.screenData !== undefined)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocville/node",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Nocville Status Pusher SDK for Node.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -30,17 +30,13 @@
|
|
|
30
30
|
"status"
|
|
31
31
|
],
|
|
32
32
|
"license": "MIT",
|
|
33
|
-
"repository": {
|
|
34
|
-
"type": "git",
|
|
35
|
-
"url": "git+https://github.com/marshmansf/nocville.git",
|
|
36
|
-
"directory": "libs/nocville-node"
|
|
37
|
-
},
|
|
38
33
|
"publishConfig": {
|
|
39
34
|
"access": "public"
|
|
40
35
|
},
|
|
41
36
|
"engines": {
|
|
42
37
|
"node": ">=20.12.0"
|
|
43
38
|
},
|
|
39
|
+
"homepage": "https://nocville.com",
|
|
44
40
|
"scripts": {
|
|
45
41
|
"build": "tsc && tsc -p tsconfig.cjs.json && node -e \"require('fs').writeFileSync('dist/cjs/package.json', JSON.stringify({ type: 'commonjs' }))\"",
|
|
46
42
|
"clean": "rm -rf dist",
|