@jaimevalasek/aioson 1.30.0 → 1.30.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.
Files changed (93) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/docs/design-previews/cognitive-core-ui-auth.html +95 -0
  3. package/docs/design-previews/cognitive-core-ui-kanban.html +231 -0
  4. package/docs/design-previews/cognitive-core-ui-list-detail.html +174 -0
  5. package/docs/design-previews/cognitive-core-ui-preview.css +1315 -0
  6. package/docs/design-previews/cognitive-core-ui-settings.html +142 -0
  7. package/docs/design-previews/cognitive-core-ui-website.html +190 -1009
  8. package/docs/design-previews/cognitive-core-ui.html +281 -463
  9. package/docs/design-previews/index.html +83 -31
  10. package/package.json +1 -1
  11. package/src/constants.js +578 -514
  12. package/template/.aioson/docs/integrations/dashboard-app-form-publish-mapping.md +183 -0
  13. package/template/.aioson/docs/play/README.md +74 -0
  14. package/template/.aioson/docs/play/agent-usage-guide.md +112 -0
  15. package/template/.aioson/docs/play/app-compatibility-guide.md +117 -0
  16. package/template/.aioson/docs/play/auth-services-and-testing.md +235 -0
  17. package/template/.aioson/docs/play/llm-data-and-bindings.md +238 -0
  18. package/template/.aioson/docs/play/manifest-and-runtime.md +267 -0
  19. package/template/.aioson/docs/play/source-map.md +104 -0
  20. package/template/.aioson/skills/design/aurora-command-ui/SKILL.md +266 -243
  21. package/template/.aioson/skills/design/aurora-command-ui/references/art-direction.md +293 -293
  22. package/template/.aioson/skills/design/aurora-command-ui/references/components.md +827 -827
  23. package/template/.aioson/skills/design/aurora-command-ui/references/dashboards.md +250 -250
  24. package/template/.aioson/skills/design/aurora-command-ui/references/design-tokens.md +585 -585
  25. package/template/.aioson/skills/design/aurora-command-ui/references/motion.md +365 -365
  26. package/template/.aioson/skills/design/aurora-command-ui/references/patterns.md +485 -482
  27. package/template/.aioson/skills/design/aurora-command-ui/references/websites.md +386 -387
  28. package/template/.aioson/skills/design/bold-editorial-ui/SKILL.md +228 -205
  29. package/template/.aioson/skills/design/bold-editorial-ui/references/art-direction.md +338 -338
  30. package/template/.aioson/skills/design/bold-editorial-ui/references/components.md +977 -977
  31. package/template/.aioson/skills/design/bold-editorial-ui/references/dashboards.md +218 -218
  32. package/template/.aioson/skills/design/bold-editorial-ui/references/design-tokens.md +326 -326
  33. package/template/.aioson/skills/design/bold-editorial-ui/references/motion.md +461 -461
  34. package/template/.aioson/skills/design/bold-editorial-ui/references/patterns.md +293 -293
  35. package/template/.aioson/skills/design/bold-editorial-ui/references/websites.md +352 -352
  36. package/template/.aioson/skills/design/clean-saas-ui/SKILL.md +233 -210
  37. package/template/.aioson/skills/design/clean-saas-ui/references/art-direction.md +319 -319
  38. package/template/.aioson/skills/design/clean-saas-ui/references/components.md +365 -365
  39. package/template/.aioson/skills/design/clean-saas-ui/references/dashboards.md +196 -196
  40. package/template/.aioson/skills/design/clean-saas-ui/references/design-tokens.md +244 -244
  41. package/template/.aioson/skills/design/clean-saas-ui/references/motion.md +235 -235
  42. package/template/.aioson/skills/design/clean-saas-ui/references/patterns.md +215 -215
  43. package/template/.aioson/skills/design/clean-saas-ui/references/websites.md +295 -295
  44. package/template/.aioson/skills/design/cognitive-core-ui/SKILL.md +239 -203
  45. package/template/.aioson/skills/design/cognitive-core-ui/references/art-direction.md +339 -339
  46. package/template/.aioson/skills/design/cognitive-core-ui/references/components.md +417 -407
  47. package/template/.aioson/skills/design/cognitive-core-ui/references/dashboards.md +289 -272
  48. package/template/.aioson/skills/design/cognitive-core-ui/references/design-tokens.md +525 -524
  49. package/template/.aioson/skills/design/cognitive-core-ui/references/motion.md +279 -279
  50. package/template/.aioson/skills/design/cognitive-core-ui/references/patterns.md +355 -289
  51. package/template/.aioson/skills/design/cognitive-core-ui/references/websites.md +443 -437
  52. package/template/.aioson/skills/design/glassmorphism-ui/SKILL.md +245 -222
  53. package/template/.aioson/skills/design/glassmorphism-ui/references/art-direction.md +159 -159
  54. package/template/.aioson/skills/design/glassmorphism-ui/references/components.md +498 -498
  55. package/template/.aioson/skills/design/glassmorphism-ui/references/dashboards.md +236 -236
  56. package/template/.aioson/skills/design/glassmorphism-ui/references/design-tokens.md +274 -274
  57. package/template/.aioson/skills/design/glassmorphism-ui/references/motion.md +355 -355
  58. package/template/.aioson/skills/design/glassmorphism-ui/references/patterns.md +198 -198
  59. package/template/.aioson/skills/design/glassmorphism-ui/references/websites.md +307 -307
  60. package/template/.aioson/skills/design/interface-design/SKILL.md +68 -47
  61. package/template/.aioson/skills/design/interface-design/references/components-and-states.md +105 -105
  62. package/template/.aioson/skills/design/interface-design/references/design-directions.md +101 -101
  63. package/template/.aioson/skills/design/interface-design/references/handoff-and-quality.md +92 -71
  64. package/template/.aioson/skills/design/interface-design/references/intent-and-domain.md +74 -74
  65. package/template/.aioson/skills/design/interface-design/references/tokens-and-depth.md +173 -173
  66. package/template/.aioson/skills/design/neo-brutalist-ui/SKILL.md +236 -213
  67. package/template/.aioson/skills/design/neo-brutalist-ui/references/art-direction.md +228 -228
  68. package/template/.aioson/skills/design/neo-brutalist-ui/references/components.md +855 -855
  69. package/template/.aioson/skills/design/neo-brutalist-ui/references/dashboards.md +334 -334
  70. package/template/.aioson/skills/design/neo-brutalist-ui/references/design-tokens.md +342 -342
  71. package/template/.aioson/skills/design/neo-brutalist-ui/references/motion.md +286 -286
  72. package/template/.aioson/skills/design/neo-brutalist-ui/references/patterns.md +458 -458
  73. package/template/.aioson/skills/design/neo-brutalist-ui/references/websites.md +723 -723
  74. package/template/.aioson/skills/design/premium-command-center-ui/SKILL.md +83 -62
  75. package/template/.aioson/skills/design/premium-command-center-ui/references/operations.md +74 -74
  76. package/template/.aioson/skills/design/premium-command-center-ui/references/patterns.md +116 -116
  77. package/template/.aioson/skills/design/premium-command-center-ui/references/validation.md +47 -47
  78. package/template/.aioson/skills/design/premium-command-center-ui/references/visual-system.md +215 -215
  79. package/template/.aioson/skills/design/pt.squarespace.com/.skill-meta.json +31 -31
  80. package/template/.aioson/skills/design/pt.squarespace.com/SKILL.md +94 -66
  81. package/template/.aioson/skills/design/pt.squarespace.com/references/components.md +366 -366
  82. package/template/.aioson/skills/design/pt.squarespace.com/references/design-tokens.md +150 -150
  83. package/template/.aioson/skills/design/pt.squarespace.com/references/motion.md +270 -270
  84. package/template/.aioson/skills/design/pt.squarespace.com/references/patterns.md +189 -189
  85. package/template/.aioson/skills/design/pt.squarespace.com/references/websites.md +161 -161
  86. package/template/.aioson/skills/design/warm-craft-ui/SKILL.md +232 -209
  87. package/template/.aioson/skills/design/warm-craft-ui/references/art-direction.md +324 -324
  88. package/template/.aioson/skills/design/warm-craft-ui/references/components.md +508 -508
  89. package/template/.aioson/skills/design/warm-craft-ui/references/dashboards.md +223 -223
  90. package/template/.aioson/skills/design/warm-craft-ui/references/design-tokens.md +374 -374
  91. package/template/.aioson/skills/design/warm-craft-ui/references/motion.md +356 -356
  92. package/template/.aioson/skills/design/warm-craft-ui/references/patterns.md +288 -288
  93. package/template/.aioson/skills/design/warm-craft-ui/references/websites.md +289 -289
@@ -0,0 +1,267 @@
1
+ ---
2
+ description: "AIOSON Play app manifest, runtime, package manager, scripts, ports, endpoint declaration, split-stack, and compatibility contract."
3
+ scope: "global"
4
+ agents: [dev, deyvin, architect, qa, tester]
5
+ task_types: [aioson-play-app, runtime, manifest]
6
+ triggers: [manifest.json, Play runtime, PORT, pnpm, ProductBridge, /api/aioson-play, requires_services]
7
+ ---
8
+
9
+ # Manifest And Runtime
10
+
11
+ ## Manifest basics
12
+
13
+ `manifest.json` is the app identity and runtime contract for Play.
14
+
15
+ Minimum shape:
16
+
17
+ ```json
18
+ {
19
+ "slug": "meu-app",
20
+ "name": "Meu App",
21
+ "version": "0.1.0",
22
+ "runtime": "vite",
23
+ "has_api": true
24
+ }
25
+ ```
26
+
27
+ Use stable lowercase slugs. The same slug is reused by Play registry, `VITE_AIOSON_APP_SLUG`, auth binding, cloud app status, package/update metadata, and data bindings.
28
+
29
+ ## Runtime detection
30
+
31
+ Play can detect common Node stacks from `package.json`, but explicit manifest fields are allowed when autodetect is not enough.
32
+
33
+ Supported Node runtime families in current docs:
34
+
35
+ | Stack | Signal |
36
+ |---|---|
37
+ | Next.js | `next` dependency |
38
+ | Vite | `vite` dependency or devDependency |
39
+ | Generic Node | `scripts.dev` |
40
+
41
+ For Play drafts and AIOSON-authored app work, use `pnpm`:
42
+
43
+ - `pnpm install`
44
+ - `pnpm add <pkg>`
45
+ - `pnpm add -D <pkg>`
46
+ - canonical lockfile: `pnpm-lock.yaml`
47
+
48
+ Do not create or preserve `package-lock.json` or `yarn.lock` in Play draft work unless an existing non-Play app explicitly requires it.
49
+
50
+ ## Scripts
51
+
52
+ `package.json` should provide a single Play entrypoint:
53
+
54
+ ```json
55
+ {
56
+ "scripts": {
57
+ "dev": "node src/server.js",
58
+ "start": "node dist/server.js"
59
+ }
60
+ }
61
+ ```
62
+
63
+ Rules:
64
+
65
+ - `dev` must work when Play injects `PORT`.
66
+ - `start` should work for published/build output when source is absent.
67
+ - Do not put fixed app ports in scripts.
68
+ - Do not run production build as the dev command.
69
+ - In Play drafts, do not fight the Play-injected cache env vars for Next/Vite/SWC.
70
+
71
+ ## Ports
72
+
73
+ Reserved ranges:
74
+
75
+ | Range | Purpose |
76
+ |---|---|
77
+ | `3001-3099` | Play Services, fixed in `service.json` |
78
+ | `3100-3299` | Internal Play systems, do not use |
79
+ | `3300-3499` | Marketplace-installed apps |
80
+ | `3500-3999` | Draft/dev-link apps |
81
+ | `4000-4099` | External curated apps, compatibility range |
82
+ | `5173` | Vite dev default, not a Play app contract |
83
+ | `5180` | ProductBridge HTTP server |
84
+
85
+ Rule: the app reads its own port from env; it discovers other ports through ProductBridge or service env vars.
86
+
87
+ Generic Node server:
88
+
89
+ ```js
90
+ const port = Number(process.env.PORT) || 3000;
91
+ app.listen(port, "0.0.0.0");
92
+ ```
93
+
94
+ Split-stack backend:
95
+
96
+ ```js
97
+ const port = Number(process.env.BACKEND_PORT) || 3301;
98
+ server.listen(port, "0.0.0.0");
99
+ ```
100
+
101
+ ## Split-stack apps
102
+
103
+ Use split-stack when the app has separate frontend and backend processes.
104
+
105
+ Manifest pattern:
106
+
107
+ ```json
108
+ {
109
+ "slug": "meu-app",
110
+ "name": "Meu App",
111
+ "version": "0.1.0",
112
+ "stack": "split",
113
+ "processes": {
114
+ "frontend": { "port_env": "PORT", "framework": "vite" },
115
+ "backend": { "port_env": "BACKEND_PORT", "framework": "node" }
116
+ },
117
+ "webview_target": "frontend"
118
+ }
119
+ ```
120
+
121
+ Rules:
122
+
123
+ - `webview_target` must match a key under `processes`.
124
+ - The frontend port is for the Play webview.
125
+ - Browser code should call `/api` same-origin and let Vite/Next proxy to the backend.
126
+ - The backend should use `BACKEND_PORT`.
127
+ - Do not hardcode `BACKEND_PORT` in scripts.
128
+
129
+ ## Next.js and Vite notes
130
+
131
+ For Next.js in Play drafts, include `allowedDevOrigins` with explicit loopback hosts. Next 16+ does not accept a wildcard for this case.
132
+
133
+ ```ts
134
+ const nextConfig = {
135
+ allowedDevOrigins: ["127.0.0.1", "localhost", "::1", "0.0.0.0"]
136
+ };
137
+
138
+ export default nextConfig;
139
+ ```
140
+
141
+ For Vite in Play drafts, prefer the current AIOSON Play draft convention: let Play pass the port through its spawn command and avoid declaring a fixed `server.port` unless the existing app contract explicitly uses env-driven split-stack config.
142
+
143
+ ## ProductBridge
144
+
145
+ ProductBridge is fixed at:
146
+
147
+ ```text
148
+ http://localhost:5180
149
+ ```
150
+
151
+ In browser/frontend code:
152
+
153
+ ```ts
154
+ const PLAY_URL = import.meta.env.VITE_AIOSON_PLAY_URL || "http://localhost:5180";
155
+ ```
156
+
157
+ Useful endpoints:
158
+
159
+ | Endpoint | Purpose |
160
+ |---|---|
161
+ | `GET /api/registry` | Discover running apps and Play Services |
162
+ | `GET /api/connectors` | List Global Connectors |
163
+ | `GET /api/bindings/:app_slug` | List app bindings |
164
+ | `POST /api/bindings/:app_slug` | Bind connector to app slot |
165
+ | `POST /api/mcp/execute` | Execute connector by alias |
166
+
167
+ ## Capability endpoint
168
+
169
+ If `has_api: true`, expose:
170
+
171
+ ```text
172
+ GET /api/aioson-play
173
+ ```
174
+
175
+ It declares identity, API base URL, endpoints, auth metadata, and events for Play, Bridge Apps, and LLM orchestration.
176
+
177
+ Minimum response shape:
178
+
179
+ ```json
180
+ {
181
+ "name": "Meu App",
182
+ "slug": "meu-app",
183
+ "version": "0.1.0",
184
+ "api_base_url": "http://localhost:3399",
185
+ "endpoints": [
186
+ {
187
+ "path": "/api/items",
188
+ "method": "GET",
189
+ "description": "Lista itens visiveis ao usuario",
190
+ "params": [],
191
+ "auth": false
192
+ }
193
+ ],
194
+ "events": []
195
+ }
196
+ ```
197
+
198
+ Only list endpoints that exist. The orchestrator may try to call what this endpoint advertises.
199
+
200
+ ## Services dependency
201
+
202
+ When an app requires a Play Service:
203
+
204
+ ```json
205
+ {
206
+ "requires_services": ["aioson-auth"]
207
+ }
208
+ ```
209
+
210
+ Play uses this to show onboarding requirements, check service install/runtime state, and block or degrade app launch when the required service is missing.
211
+
212
+ For apps that use `aioson-auth`, declare the RBAC catalog in the same manifest:
213
+
214
+ ```json
215
+ {
216
+ "requires_services": ["aioson-auth"],
217
+ "auth": {
218
+ "version": 1,
219
+ "permissions": [
220
+ "orders:read",
221
+ { "name": "orders:create", "label": "Criar pedidos" }
222
+ ],
223
+ "policies": [
224
+ { "id": "page:orders", "kind": "route", "path": "/orders", "requires": ["orders:read"] }
225
+ ]
226
+ }
227
+ }
228
+ ```
229
+
230
+ `auth.permissions[]` is the source of truth for the permission catalog shown by
231
+ `aioson-auth`. The app still implements the actual route/API gates with the SDK;
232
+ the Auth dashboard assigns the declared permissions to global roles. Play/Auth do
233
+ not scan app source code to infer permissions.
234
+
235
+ ## Publish compatibility
236
+
237
+ Publishable apps should declare compatibility:
238
+
239
+ ```json
240
+ {
241
+ "compatibility": {
242
+ "min_play_version": "0.2.0",
243
+ "min_runtime_version": "1.0.0",
244
+ "max_runtime_version": "1.x",
245
+ "sidecar_contract": "ndjson-v1",
246
+ "schema_version": 1,
247
+ "requires_migration": false
248
+ }
249
+ }
250
+ ```
251
+
252
+ If local data schema changes:
253
+
254
+ - Increment `schema_version`.
255
+ - Provide idempotent migrations where possible.
256
+ - Never delete user data as the default migration strategy.
257
+ - Use backup before destructive or risky migration.
258
+
259
+ ## Source docs
260
+
261
+ Canonical sources:
262
+
263
+ - `ai-app-integration.md`
264
+ - `aioson-endpoint-protocol.md`
265
+ - `port-management.md`
266
+ - `software-update-compatibility.md`
267
+ - `.aioson/rules/aioson-play-conventions.md` in this repo
@@ -0,0 +1,104 @@
1
+ ---
2
+ description: "Map from AIOSON Play app compatibility topics to canonical source docs in the aioson-play repository."
3
+ scope: "global"
4
+ agents: [dev, deyvin, architect, analyst, qa, tester, product, sheldon, pentester]
5
+ task_types: [aioson-play-app, source-map, integration]
6
+ triggers: [AIOSON Play source docs, canonical Play docs, integration docs, ProductBridge, data bindings]
7
+ ---
8
+
9
+ # Source Map
10
+
11
+ Canonical source directory:
12
+
13
+ ```text
14
+ C:\dev\aioson-play\.aioson\docs\integrations\
15
+ ```
16
+
17
+ This AIOSON folder is a curated operational layer. When exact Play runtime behavior matters and the source repo is present, read the canonical file below.
18
+
19
+ ## Entry points
20
+
21
+ | Need | Canonical doc |
22
+ |---|---|
23
+ | Build or modify a Play-compatible app | `ai-app-integration.md` |
24
+ | Cross-cutting Play/platform fix | `platform-architecture.md` |
25
+ | Auth roadmap/gaps and delivered slices | `auth-integration-gaps.md` |
26
+
27
+ ## Topic map
28
+
29
+ | Topic | Canonical doc |
30
+ |---|---|
31
+ | App developer overview | `aioson-app-developer-guide.md` |
32
+ | `/api/aioson-play` capability endpoint | `aioson-endpoint-protocol.md` |
33
+ | ProductBridge and port registry | `port-management.md` |
34
+ | Play Services and `service.json` | `play-service-protocol.md` |
35
+ | Cloud owner/trial auth | `app-cloud-auth.md` |
36
+ | Data Bindings and Global Connectors | `app-data-bindings.md` |
37
+ | App operational database choice | `app-database-choice.md` |
38
+ | External systems, MCPI/API/MCP connector manual | `integration-manual.md` |
39
+ | Dev-link install | `dev-link-install.md` |
40
+ | Local symlink testing | `local-dev-testing.md` |
41
+ | App update and compatibility fields | `software-update-compatibility.md` |
42
+ | Atendimento reference integration | `atendimento-squad-integration.md` |
43
+ | Farmacia implementation review | `farmacia-implementation-review.md` |
44
+
45
+ ## Current source docs observed
46
+
47
+ As of 2026-06-23, the Play integration source directory contains:
48
+
49
+ ```text
50
+ ai-app-integration.md
51
+ aioson-app-developer-guide.md
52
+ aioson-endpoint-protocol.md
53
+ app-cloud-auth.md
54
+ app-data-bindings.md
55
+ app-database-choice.md
56
+ atendimento-squad-integration.md
57
+ auth-integration-gaps.md
58
+ dev-link-install.md
59
+ farmacia-implementation-review.md
60
+ integration-manual.md
61
+ local-dev-testing.md
62
+ platform-architecture.md
63
+ play-service-protocol.md
64
+ port-management.md
65
+ README.md
66
+ software-update-compatibility.md
67
+ ```
68
+
69
+ ## Embedded contract stamped into apps
70
+
71
+ Play stamps a canonical contract directly into each app, between
72
+ `AIOSON-PLAY-CONTRACT:START` / `AIOSON-PLAY-CONTRACT:END` markers. Source:
73
+
74
+ ```text
75
+ C:\dev\aioson-play\src-tauri\src\resources\play_app_contract.md
76
+ ```
77
+
78
+ This is the most authoritative single-file contract for an installed app. It carries:
79
+
80
+ - The closed whitelist of env vars Play injects at spawn, including `AIOSON_APP_DIR` (absolute app dir) and the auth vars in `VITE_`-only form.
81
+ - `.aioson/preview.json` — written by Play at runtime with `{ running, url, port }`; read it on demand to learn the live preview URL/port instead of guessing.
82
+ - The "ready-for-Play" gate the app must pass before being declared done.
83
+
84
+ When an app project already contains this stamped block, treat it as primary and do not contradict it. The docs in this folder are the AIOSON-side fallback when the stamped contract or the `aioson-play` repo is not available.
85
+
86
+ ## Known priority notes
87
+
88
+ - `.aioson/rules/aioson-play-conventions.md` in this AIOSON repo overrides older examples when working inside Play drafts, especially package manager and draft runtime behavior.
89
+ - Older Play docs may show `npm` examples. In AIOSON-authored Play draft work, use `pnpm`.
90
+ - Some canonical docs describe planned behavior. Check wording before implementing: "planejado", "futuro", "pendente", or "nao implementado" means do not rely on it as shipped runtime behavior.
91
+ - If a canonical doc and local Play source code disagree, inspect code and update the canonical Play doc before relying on the changed behavior.
92
+
93
+ ## Suggested human-facing Play Guide page
94
+
95
+ If AIOSON Play exposes a "Guia" tab for human users, it should not dump these agent docs. It should present a short human path:
96
+
97
+ 1. Create an app folder with `manifest.json`.
98
+ 2. Use `pnpm`.
99
+ 3. Make the app read `PORT`.
100
+ 4. Add `app-config.yaml` only when using database config or data sources.
101
+ 5. Link the folder through "Instalar App -> Linkar pasta (dev)".
102
+ 6. Test inside the Play webview.
103
+
104
+ The detailed implementation contract should remain here for AIOSON agents and in the canonical `aioson-play` integration docs.