@agy-daddy/plugin-pet 0.0.0-stage → 1.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Agy-Daddy Contributors
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/README.md CHANGED
@@ -1,3 +1,11 @@
1
- # Temporary Holding Version
1
+ # `@agy-daddy/plugin-pet`
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ MIT clean-room desktop Always-on-Top & PC-Web synchronized companion pet plugin for **Agy-Daddy**.
4
+
5
+ ## Features
6
+
7
+ - **Native Always-on-Top Transparent Overlay**: Uses `host.overlay` (`ui:desktop-overlay`) on macOS (AppKit `NSPanel`), Windows (WPF Layered Topmost), and Linux (GTK3 RGBA) with click-through outside hit bounds and zero WebView overhead.
8
+ - **PC-Web Synchronized Floating Pet**: Shares the exact same `src/shared/*` vector rigs and `Path2D` Canvas stage inside `agy-daddy-plugin-web`.
9
+ - **12 Built-in MIT Original Tribute Themes**: `daddy-orb`, `abyssal-whale`, `sunny-sponge`, `nimble-mouse`, `aegis-visor`, `cyber-neko`, `arcade-chomp`, `astro-shiba`, `vapor-dolphin`, `cli-phantom`, `graffiti-cub`, and `arcane-cat`.
10
+ - **6-Layer Sandboxed Local Import**: Safely import `.agypet` / `.tar` / `.json` custom theme packs without executable code or `fs:user-files`.
11
+ - **4D Session Watch Filters & Live TPS Linkage**: Supports follow-current-session, exclude-current-session, project whitelist, and group whitelist while tracking live tokens/s and approval/reply alerts.
@@ -0,0 +1,57 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "agy-daddy.pet",
4
+ "publisher": "agy-daddy",
5
+ "version": "1.1.1",
6
+ "license": "MIT",
7
+ "displayName": {
8
+ "zh-CN": "桌面与网页伴侣宠",
9
+ "en": "Companion Pet"
10
+ },
11
+ "description": {
12
+ "zh-CN": "系统级透明置顶与 PC-Web 同步伴侣宠物:12 款 MIT 原创矢量主题、本地形象导入、Token 流速联动及多会话审阅提醒",
13
+ "en": "Always-on-top desktop & PC-Web companion pet with 12 MIT vector themes, custom pack import, live TPS motion, and approval/reply alerts"
14
+ },
15
+ "engines": {
16
+ "agyDaddy": "^1.2.0",
17
+ "antigravity": ">=2.32.0"
18
+ },
19
+ "main": "./src/node.js",
20
+ "renderer": "./src/renderer.js",
21
+ "world": "isolated",
22
+ "activationEvents": ["onStartup"],
23
+ "requires": {
24
+ "anchors": ["topbar.rightCluster"]
25
+ },
26
+ "provides": {
27
+ "services": {
28
+ "pet": { "version": "1.0.0", "realm": "node" }
29
+ },
30
+ "events": ["pet:focus-session@1", "pet:theme-changed@1"],
31
+ "states": ["state:pet.state@1", "state:session.active@1"]
32
+ },
33
+ "consumes": {
34
+ "context": { "version": "^1.0.0", "optional": true }
35
+ },
36
+ "permissions": [
37
+ "dom:read",
38
+ "dom:write",
39
+ "rpc:read",
40
+ "bridge:route",
41
+ "ui:desktop-overlay"
42
+ ],
43
+ "contributes": {
44
+ "topbar.units": [{ "id": "pet-chip", "order": 35 }],
45
+ "topbar.popovers": [{ "id": "pet-panel", "anchorId": "pet-chip" }],
46
+ "desktop.overlay": { "id": "pet-companion", "defaultWidth": 220, "defaultHeight": 200 },
47
+ "settings": { "schema": "./settings.schema.json" },
48
+ "commands": [
49
+ { "id": "pet.toggleDesktop", "title": { "zh-CN": "切换桌面置顶桌宠", "en": "Toggle Desktop Pet" } },
50
+ { "id": "pet.toggleWeb", "title": { "zh-CN": "切换 PC-Web 悬浮桌宠", "en": "Toggle PC-Web Pet" } },
51
+ { "id": "pet.listThemes", "title": { "zh-CN": "列出可用桌宠主题", "en": "List Pet Themes" } },
52
+ { "id": "pet.listProjectOptions", "title": { "zh-CN": "列出可监听项目", "en": "List Watchable Projects" } },
53
+ { "id": "pet.listGroupOptions", "title": { "zh-CN": "列出可监听分组", "en": "List Watchable Groups" } }
54
+ ],
55
+ "locales": "./locales"
56
+ }
57
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "panel.title": "Companion Pet Console",
3
+ "panel.desktopVisible": "Desktop Overlay",
4
+ "panel.webVisible": "PC-Web Overlay",
5
+ "panel.importPack": "Import Local Theme Pack",
6
+ "panel.status": "Status",
7
+ "panel.approvals": "Waiting for Review",
8
+ "panel.replies": "New Replies",
9
+ "panel.noAttention": "No pending approvals or unread replies"
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "panel.title": "伴侣宠物控制台",
3
+ "panel.desktopVisible": "桌面置顶",
4
+ "panel.webVisible": "PC-Web 页面",
5
+ "panel.importPack": "导入本地形象包",
6
+ "panel.status": "当前状态",
7
+ "panel.approvals": "待审核项",
8
+ "panel.replies": "新回复项",
9
+ "panel.noAttention": "暂无待处理审核或未读回复"
10
+ }
package/package.json CHANGED
@@ -1,6 +1,30 @@
1
1
  {
2
2
  "name": "@agy-daddy/plugin-pet",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.1.1",
4
+ "description": "MIT clean-room desktop and PC-Web companion pet plugin with 12 vector themes, custom pack sandbox, TPS speed linkage, and 4D session watch filtering",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/agy-daddy/agy-daddy.git",
9
+ "directory": "agy-daddy-plugin-pet"
10
+ },
11
+ "main": "./src/node.js",
12
+ "agyPlugin": "./agy-plugin.json",
13
+ "files": [
14
+ "agy-plugin.json",
15
+ "settings.schema.json",
16
+ "src/",
17
+ "locales/",
18
+ "README.md",
19
+ "LICENSE"
20
+ ],
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "scripts": {
25
+ "test": "node -e \"const cp=require('node:child_process'),fs=require('node:fs'),p=require('node:path');const files=fs.readdirSync('test').filter(f=>f.endsWith('.test.js')).sort().map(f=>p.join('test',f));process.exit(cp.spawnSync(process.execPath,['--test',...files],{stdio:'inherit',env:{...process.env,AGY_DADDY_TEST_MODE:'1'}}).status??1)\""
26
+ },
27
+ "engines": {
28
+ "node": ">=22.4.0"
29
+ }
30
+ }
@@ -0,0 +1,136 @@
1
+ {
2
+ "title": { "zh-CN": "桌面与网页伴侣宠", "en": "Companion Pet" },
3
+ "fields": [
4
+ {
5
+ "key": "enabled",
6
+ "type": "boolean",
7
+ "default": true,
8
+ "group": { "zh-CN": "显示与载体", "en": "Display & Surfaces" },
9
+ "label": { "zh-CN": "启用伴侣宠物", "en": "Enable companion pet" },
10
+ "description": { "zh-CN": "总开关:关闭后同时隐藏桌面透明置顶窗与 PC-Web 网页端宠物", "en": "Master switch for both native desktop overlay and PC-Web pet" }
11
+ },
12
+ {
13
+ "key": "desktopVisible",
14
+ "type": "boolean",
15
+ "default": true,
16
+ "group": { "zh-CN": "显示与载体", "en": "Display & Surfaces" },
17
+ "label": { "zh-CN": "在系统桌面置顶显示", "en": "Show Always-on-Top on desktop" },
18
+ "description": { "zh-CN": "开启后使用原生轻量透明窗口在桌面最上层悬浮游走;关闭时立即释放子进程", "en": "Render a native lightweight transparent topmost window on desktop; exits immediately when off" }
19
+ },
20
+ {
21
+ "key": "webVisible",
22
+ "type": "boolean",
23
+ "default": true,
24
+ "group": { "zh-CN": "显示与载体", "en": "Display & Surfaces" },
25
+ "label": { "zh-CN": "在 PC-Web 页面内显示", "en": "Show inside PC-Web" },
26
+ "description": { "zh-CN": "在 PC-Web 工作台页面内同步悬浮展示并响应审核/回复气泡", "en": "Display the shared Canvas companion pet inside the PC-Web workbench" }
27
+ },
28
+ {
29
+ "key": "themeId",
30
+ "type": "enum",
31
+ "default": "daddy-orb",
32
+ "optionsCommand": "pet.listThemes",
33
+ "options": [
34
+ { "value": "daddy-orb", "label": "紫晶脉冲灵 (Agy Pulse)" },
35
+ { "value": "abyssal-whale", "label": "深海算力鲸 (Abyssal Whale)" },
36
+ { "value": "sunny-sponge", "label": "阳光海绵块 (Sunny Sponge)" },
37
+ { "value": "nimble-mouse", "label": "机灵芝士鼠 (Nimble Mouse)" },
38
+ { "value": "aegis-visor", "label": "赤金机甲盔 (Aegis Visor)" },
39
+ { "value": "cyber-neko", "label": "霓虹义体猫 (Cyber Neko)" },
40
+ { "value": "arcade-chomp", "label": "街机像素豆 (Arcade Chomp)" },
41
+ { "value": "astro-shiba", "label": "星航柴犬 (Astro Shiba)" },
42
+ { "value": "vapor-dolphin", "label": "蒸汽波海豚 (Vapor Dolphin)" },
43
+ { "value": "cli-phantom", "label": "终端光标灵 (CLI Phantom)" },
44
+ { "value": "graffiti-cub", "label": "街头涂鸦熊 (Graffiti Cub)" },
45
+ { "value": "arcane-cat", "label": "奥术黑猫 (Arcane Cat)" }
46
+ ],
47
+ "group": { "zh-CN": "形象与动效", "en": "Theme & Motion" },
48
+ "label": { "zh-CN": "桌宠主题", "en": "Pet theme" },
49
+ "description": { "zh-CN": "12 款内置 MIT 原创矢量主题及已导入的本地自定义形象", "en": "12 built-in MIT vector themes plus any locally imported custom packs" }
50
+ },
51
+ {
52
+ "key": "petScale",
53
+ "type": "number",
54
+ "min": 0.6,
55
+ "max": 2.0,
56
+ "default": 1.0,
57
+ "group": { "zh-CN": "形象与动效", "en": "Theme & Motion" },
58
+ "label": { "zh-CN": "缩放倍率", "en": "Scale factor" },
59
+ "description": { "zh-CN": "调节桌宠与动画渲染的显示尺寸(0.6 – 2.0)", "en": "Adjust pet display size (0.6 – 2.0)" }
60
+ },
61
+ {
62
+ "key": "roamMode",
63
+ "type": "enum",
64
+ "default": "bottom-edge",
65
+ "options": [
66
+ { "value": "bottom-edge", "label": "屏幕底部巡视" },
67
+ { "value": "screen-edges", "label": "屏幕边缘游走" },
68
+ { "value": "free-workarea", "label": "工作区自由漫步" },
69
+ { "value": "none", "label": "原地待命(不位移)" }
70
+ ],
71
+ "group": { "zh-CN": "形象与动效", "en": "Theme & Motion" },
72
+ "label": { "zh-CN": "游走模式", "en": "Roaming mode" },
73
+ "description": { "zh-CN": "游走速率随实时 tokens/s 加快;悬停或出现待审批气泡时自动停稳防误点", "en": "Movement speed scales with live tokens/s; pauses on hover or pending approvals" }
74
+ },
75
+ {
76
+ "key": "followCurrentSession",
77
+ "type": "boolean",
78
+ "default": true,
79
+ "group": { "zh-CN": "会话监听与白名单", "en": "Session Watch & Whitelists" },
80
+ "label": { "zh-CN": "跟随当前会话", "en": "Follow current session" },
81
+ "description": { "zh-CN": "优先绑定当前活跃焦点会话的流式流速与状态;闲置时自动回退后台运行中会话", "en": "Prioritize the active focused session for TPS & state, falling back to running background sessions when idle" }
82
+ },
83
+ {
84
+ "key": "excludeCurrentSession",
85
+ "type": "boolean",
86
+ "default": false,
87
+ "group": { "zh-CN": "会话监听与白名单", "en": "Session Watch & Whitelists" },
88
+ "label": { "zh-CN": "排除当前会话", "en": "Exclude current session" },
89
+ "description": { "zh-CN": "最高优过滤:仅盯防后台与其它会话,屏蔽眼前正在浏览的当前会话动态", "en": "Highest priority exclusion: ignore the currently focused session and watch only background conversations" }
90
+ },
91
+ {
92
+ "key": "projectWhitelist",
93
+ "type": "list",
94
+ "default": [],
95
+ "itemEditor": {
96
+ "kind": "ordered-preset-list",
97
+ "presets": [],
98
+ "allowCustom": false,
99
+ "dynamicPresetsCommand": "pet.listProjectOptions",
100
+ "dynamicPoolTitle": { "zh-CN": "可选项目", "en": "Available projects" },
101
+ "dynamicEmptyHint": { "zh-CN": "暂无已识别项目,打开工作区后自动同步", "en": "No projects discovered yet" }
102
+ },
103
+ "group": { "zh-CN": "会话监听与白名单", "en": "Session Watch & Whitelists" },
104
+ "label": { "zh-CN": "指定项目白名单", "en": "Project whitelist" },
105
+ "description": { "zh-CN": "仅监听所选项目下的会话(与下方分组白名单取并集;均留空时监听全部非排除会话)", "en": "Watch sessions belonging to selected projects (unioned with group whitelist; empty watches all)" }
106
+ },
107
+ {
108
+ "key": "groupWhitelist",
109
+ "type": "list",
110
+ "default": [],
111
+ "itemEditor": {
112
+ "kind": "ordered-preset-list",
113
+ "presets": [],
114
+ "allowCustom": false,
115
+ "dynamicPresetsCommand": "pet.listGroupOptions",
116
+ "dynamicPoolTitle": { "zh-CN": "可选分组", "en": "Available groups" },
117
+ "dynamicEmptyHint": { "zh-CN": "暂无会话分组", "en": "No session groups found" }
118
+ },
119
+ "group": { "zh-CN": "会话监听与白名单", "en": "Session Watch & Whitelists" },
120
+ "label": { "zh-CN": "分组白名单", "en": "Group whitelist" },
121
+ "description": { "zh-CN": "仅监听所选分组下的会话(与项目白名单取并集)", "en": "Watch sessions belonging to selected groups (unioned with project whitelist)" }
122
+ }
123
+ ],
124
+ "actions": [
125
+ {
126
+ "id": "toggle-desktop",
127
+ "command": "pet.toggleDesktop",
128
+ "label": { "zh-CN": "切换桌面置顶显示", "en": "Toggle Desktop Overlay" }
129
+ },
130
+ {
131
+ "id": "toggle-web",
132
+ "command": "pet.toggleWeb",
133
+ "label": { "zh-CN": "切换 PC-Web 页面显示", "en": "Toggle PC-Web Pet" }
134
+ }
135
+ ]
136
+ }