@combos-fun/plugin-development-tool 0.0.6 → 0.0.7

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.md ADDED
@@ -0,0 +1,27 @@
1
+ # @combos-fun/plugin-development-tool
2
+
3
+ Scene / tagged object tap development tool: outline overlay and parent postMessage
4
+
5
+ Keywords: `devtool`, `inspector`, `selection`, `outline`, `editor`, `debug`.
6
+
7
+ ## Documentation
8
+
9
+ - Per-package agent / developer notes: [`agent-skill.md`](./agent-skill.md)
10
+ - Machine-readable manifest: [`combos-plugin.json`](./combos-plugin.json)
11
+ (validated against `schemas/combos-plugin.schema.json` in the repo
12
+ root)
13
+ - Entry skill (single source of truth for AI agents working with this
14
+ monorepo): `skills/combos-engine-development/SKILL.md`
15
+
16
+ When consumed from npm, the manifest and agent notes are exposed as
17
+ stable subpaths:
18
+
19
+ ```ts
20
+ import manifest from '@combos-fun/plugin-development-tool/plugin-manifest';
21
+ // or fetch the markdown directly:
22
+ // require.resolve('@combos-fun/plugin-development-tool/agent-skill')
23
+ ```
24
+
25
+ ## License
26
+
27
+ Internal workspace package, part of the Combos Fun engine monorepo.
package/agent-skill.md ADDED
@@ -0,0 +1,62 @@
1
+ # `@combos-fun/plugin-development-tool` — Agent notes
2
+
3
+ In-canvas debugging / inspection plugin. Adds a `CombosDevelopmentToolTarget`
4
+ Component that, when tapped, draws an outline overlay around the
5
+ GameObject and posts a parent-frame message identifying the selected node.
6
+ Used by the Combos Fun editor / inspector to wire up two-way selection
7
+ between the editor tree and the running game.
8
+
9
+ ## When to read
10
+
11
+ Read whenever building tooling, integrating with the Combos editor, or
12
+ debugging which GameObject is being tapped at runtime.
13
+
14
+ ## Public API
15
+
16
+ ```ts
17
+ import {
18
+ CombosDevelopmentToolSystem,
19
+ CombosDevelopmentToolTarget,
20
+ COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED,
21
+ COMBOS_DEVELOPMENT_TOOL_REFRESH,
22
+ COMBOS_DEVELOPMENT_TOOL_SET,
23
+ type CombosDevelopmentToolTargetParams,
24
+ type CombosDevelopmentToolSystemParams,
25
+ type CombosDevelopmentToolSelectScope,
26
+ } from '@combos-fun/plugin-development-tool';
27
+ ```
28
+
29
+ - `CombosDevelopmentToolTarget` — Component to attach to any GameObject
30
+ that should be selectable in editor mode.
31
+ - `CombosDevelopmentToolSystem` — System that listens to taps, draws the
32
+ outline, and posts `COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED`
33
+ messages to the parent window.
34
+
35
+ ## Required setup
36
+
37
+ This plugin depends on `@combos-fun/plugin-renderer-event` (for taps)
38
+ and `@combos-fun/plugin-renderer-graphics` (for the outline). Register
39
+ all of them after `RendererSystem`:
40
+
41
+ ```ts
42
+ new Game({
43
+ systems: [
44
+ new RendererSystem({ canvas, width, height }),
45
+ new EventSystem(),
46
+ new GraphicsSystem(),
47
+ new CombosDevelopmentToolSystem({ /* options */ }),
48
+ ],
49
+ });
50
+ ```
51
+
52
+ ## Common pitfalls
53
+
54
+ | Symptom | Fix |
55
+ |---------|-----|
56
+ | Selection box never appears | Ensure both `EventSystem` and `GraphicsSystem` are registered |
57
+ | Parent frame never receives messages | The page must be in an iframe / embedded context; `window.parent !== window` |
58
+ | Selection stuck on stale node | Listen for `COMBOS_DEVELOPMENT_TOOL_REFRESH` to clear |
59
+
60
+ ## Verification
61
+
62
+ `pnpm --filter @combos-fun/plugin-development-tool run build`.
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "@combos-fun/plugin-development-tool",
3
+ "pluginId": "development-tool",
4
+ "category": "devtool",
5
+ "dimension": "2d",
6
+ "isCore": false,
7
+ "keywords": ["devtool", "inspector", "selection", "outline", "editor", "debug"],
8
+ "agentSkill": "./agent-skill.md",
9
+ "requires": [
10
+ "@combos-fun/engine",
11
+ "@combos-fun/plugin-renderer-event",
12
+ "@combos-fun/plugin-renderer-graphics"
13
+ ],
14
+ "exports": [
15
+ "CombosDevelopmentToolSystem",
16
+ "CombosDevelopmentToolTarget",
17
+ "COMBOS_DEVELOPMENT_TOOL_GAMEOBJECT_SELECTED",
18
+ "COMBOS_DEVELOPMENT_TOOL_REFRESH",
19
+ "COMBOS_DEVELOPMENT_TOOL_SET"
20
+ ]
21
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@combos-fun/plugin-development-tool",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Scene / tagged object tap development tool: outline overlay and parent postMessage",
5
5
  "main": "index.js",
6
6
  "module": "dist/plugin-development-tool.esm.js",
@@ -8,8 +8,22 @@
8
8
  "unpkg": "dist/CombosFun.plugin.developmentTool.min.js",
9
9
  "files": [
10
10
  "index.js",
11
- "dist"
11
+ "dist",
12
+ "agent-skill.md",
13
+ "combos-plugin.json"
12
14
  ],
15
+ "exports": {
16
+ ".": {
17
+ "import": "./dist/plugin-development-tool.esm.js",
18
+ "require": "./index.js",
19
+ "types": "./dist/plugin-development-tool.d.ts"
20
+ },
21
+ "./plugin-manifest": "./combos-plugin.json",
22
+ "./agent-skill": "./agent-skill.md"
23
+ },
24
+ "combos": {
25
+ "pluginManifest": "./combos-plugin.json"
26
+ },
13
27
  "types": "dist/plugin-development-tool.d.ts",
14
28
  "keywords": [
15
29
  "combos-fun",
@@ -18,9 +32,9 @@
18
32
  ],
19
33
  "author": "sun668 <q947692259@gmail.com>",
20
34
  "dependencies": {
21
- "@combos-fun/engine": "0.0.6",
22
- "@combos-fun/plugin-renderer-event": "0.0.6",
23
- "@combos-fun/plugin-renderer-graphics": "0.0.6"
35
+ "@combos-fun/engine": "0.0.7",
36
+ "@combos-fun/plugin-renderer-event": "0.0.7",
37
+ "@combos-fun/plugin-renderer-graphics": "0.0.7"
24
38
  },
25
39
  "scripts": {
26
40
  "build": "node ../../scripts/build-package.mjs"