@xpell/core 2.0.0-alpha.11 → 2.0.2

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/docs/AGENTS.md ADDED
@@ -0,0 +1,10 @@
1
+ # XPELL-CORE codex.md rules for ai agent for vibe coding with xpell-core
2
+ ## `packages/xpell-core/AGENTS.md`
3
+
4
+ # AGENTS.md — @xpell/core
5
+
6
+ Before making changes, apply:
7
+
8
+ - /docs/skills/xpell-contract
9
+ - /docs/skills/xpell-core
10
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xpell/core",
3
- "version": "2.0.0-alpha.11",
3
+ "version": "2.0.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -50,9 +50,9 @@
50
50
  "url": "https://github.com/xpell-ai/xpell-core.git"
51
51
  },
52
52
  "devDependencies": {
53
- "typedoc": "^0.27.0",
54
- "typescript": "^5.6.0",
55
- "vite": "^7.2.7"
53
+ "typedoc": "^0.27.9",
54
+ "typescript": "^5.9.3",
55
+ "vite": "^7.3.3"
56
56
  },
57
57
  "scripts": {
58
58
  "dev": "vite",
@@ -61,6 +61,6 @@
61
61
  "docs:api": "typedoc",
62
62
  "docs": "pnpm run docs:api",
63
63
  "test": "echo \"No tests yet\" && exit 0",
64
- "publish-alpha-next": "pnpm version prerelease --preid=alpha --no-git-tag-version && pnpm publish --tag alpha"
64
+ "publish-alpha-next": "pnpm version prerelease --preid=alpha && pnpm publish --tag alpha"
65
65
  }
66
66
  }
package/docs/Codex.md DELETED
@@ -1,138 +0,0 @@
1
- # XPELL-CORE codex.md rules for ai agent for vibe coding with xpell-core
2
-
3
- ## Purpose
4
- This document defines the strict contract for **xpell-core** — the runtime engine and interpreter that powers all Xpell systems.
5
-
6
- ---
7
-
8
- ## Core Responsibilities
9
- xpell-core provides:
10
- - Engine loop
11
- - Event system
12
- - Command system
13
- - Data layer (XData)
14
- - Object lifecycle (XObject)
15
- - Module loading (XModule)
16
-
17
- xpell-core does **NOT** provide UI rendering.
18
-
19
- ---
20
-
21
- ## Runtime Object Model
22
-
23
- - `XObject` is the foundational runtime object.
24
- - XObject is **UI-agnostic** and MUST NOT include or assume:
25
- - DOM access
26
- - visibility logic
27
- - UI methods (`show`, `hide`, etc.)
28
-
29
- UI behavior is added only by higher-level layers (e.g. `XUIObject`).
30
-
31
- ---
32
- ## XData Contract (XData2)
33
-
34
- - XData is shared runtime memory (process-wide), used for explicit state sharing and signaling.
35
- - XData is NOT persistence.
36
- - Keys must be explicit, stable, and documented at their point of use.
37
- - No module may mirror XData into hidden local mutable state as a “shadow source of truth”.
38
-
39
- ### Canonical API (required)
40
- All new code MUST use the XData2 API:
41
-
42
- - Read: `XData.get(key)` / `_xd.get(key)`
43
- - Write: `XData.set(key, value, { source })` / `_xd.set(...)`
44
- - Delete: `XData.delete(key, { source })` / `_xd.delete(...)`
45
- - Subscribe: `XData.on(key, cb)` / `_xd.on(...)`
46
- - Notify without changing value (optional): `XData.touch(key, { source })`
47
- - Mailbox semantics (optional): `XData.pick(key, { source })`
48
-
49
- ### Compatibility API (legacy)
50
- - Direct object access via `_o` is LEGACY compatibility only:
51
- - `XData._o[key] = value`
52
- - `_xd._o[key] = value`
53
- - `_o` access MAY exist only to support old code and migration.
54
- - New code MUST NOT write via `_o`.
55
- - Core may optionally:
56
- - warn in dev on legacy writes (`_warn_legacy_writes`)
57
- - route legacy writes through `.set()` (`_compat_writes`)
58
- - Whether `_o` triggers notifications is a configuration detail of XData2, not a contract.
59
-
60
- ### Required metadata
61
- - Every `.set()` and `.delete()` in core/runtime code MUST include a `source` string.
62
- - Example: `{ source: "xvm:navigate" }`
63
- - `source` must be stable and human-readable for debugging.
64
-
65
- ### Rules
66
- - Do not assume ordering of listeners.
67
- - Avoid high-frequency writes unless necessary (frame loop keys should be intentional).
68
- - Do not use XData as an event bus; use XEventManager (`_xem`) for events.
69
-
70
- ---
71
-
72
- ## Naming Convention — Runtime State
73
-
74
- - All runtime-managed object members MUST:
75
- - start with `_`
76
- - use `snake_case`
77
-
78
- - Method names MAY use `camelCase`.
79
-
80
- This defines the boundary between runtime state and implementation logic.
81
-
82
- ---
83
-
84
- ## Method Exposure & Command Mapping
85
-
86
- ### Method Visibility
87
- - Methods starting with `_` are **public to the Xpell engine**.
88
- - Such methods may be invoked via `run / execute`.
89
- - Methods without `_` are internal-only.
90
-
91
- This replaces legacy descriptor-based exposure.
92
-
93
- ### Command Name Mapping
94
- - Leading `_` is removed when invoked.
95
- - `_` and `-` are interchangeable.
96
- - No other transformations are allowed.
97
-
98
- Example:
99
- ```ts
100
- public _my_x_method(cmd) { ... }
101
- ```
102
-
103
- Callable as:
104
- ```txt
105
- my_x_method
106
- my-x-method
107
- ```
108
-
109
- ---
110
-
111
- ## Parser Responsibilities
112
-
113
- - `XParser.parse()` → module-level commands only.
114
- - Object / nano-command parsing is internal and separate.
115
- - Parsers must not infer or substitute for one another.
116
- - Parsing never executes commands or mutates state.
117
-
118
- ---
119
-
120
- ## Platform Rules
121
-
122
- - xpell-core is platform-agnostic by design.
123
- - Platform-specific logic must be isolated.
124
- - Core must not assume DOM, UI, or filesystem access.
125
-
126
- ---
127
-
128
- ## Forbidden Patterns ❌
129
- - UI logic in core
130
- - Implicit globals
131
- - Hidden mutable state
132
- - Framework-style lifecycles
133
- - API inference or auto-magic
134
-
135
- ---
136
-
137
- ## One-Line Anchor
138
- **xpell-core is a real-time interpreter engine that provides execution, data, and events for Xpell systems.**