@stacksjs/defaults 0.75.301 → 0.75.302

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/ai/AGENTS.md CHANGED
@@ -78,6 +78,10 @@ review the generated SQL and snapshot, then apply with `./buddy migrate`.
78
78
  and `stacks-router` for selection, authentication, ownership, and mount behavior.
79
79
  Use `stacks-auto-imports` to distinguish browser bindings from declarations
80
80
  and explicit module imports.
81
+ Before adding imports in app code, read the relevant section of
82
+ `storage/framework/auto-imports/RUNTIME.md` and use its listed names directly
83
+ in their stated context. `buddy generate`, `buddy generate:auto-imports` and
84
+ `buddy setup:ai` refresh this inventory from the runtime registries.
81
85
 
82
86
  **Subsystem reference**, one per area (`stacks-orm`, `stacks-router`,
83
87
  `stacks-queue`, ...), each documenting it authoritatively. Read the relevant
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: stacks-auto-imports
3
- description: Use when checking browser/server binding delivery, model globals, registry generation, or the difference between ambient declarations and runtime imports. Covers Stacks auto-imports, stx client delivery, server boot and generated registries (107 models).
3
+ description: Use before adding imports in Stacks app code, checking available runtime functions, browser/server delivery, model globals, or registry generation. Covers Stacks auto-imports, the generated runtime inventory, stx client delivery and server boot (107 models).
4
4
  license: MIT
5
5
  compatibility: Bun >= 1.3.0, TypeScript
6
6
  allowed-tools: Read Edit Write Bash Grep Glob
@@ -8,6 +8,21 @@ allowed-tools: Read Edit Write Bash Grep Glob
8
8
 
9
9
  # Auto-imports and runtime delivery
10
10
 
11
+ ## Available names in this project
12
+
13
+ Before adding imports, read the relevant section of
14
+ `storage/framework/auto-imports/RUNTIME.md` (relative to the project root).
15
+ Use its listed names directly in their stated execution context to avoid
16
+ redundant imports. This compact reference groups server globals by package
17
+ and barrel, and STX client helpers by runtime, macro and demand delivery.
18
+ It is generated from runtime registries, including app helpers and overrides.
19
+
20
+ `buddy generate`, `buddy generate:types`, `buddy generate:auto-imports` and
21
+ `buddy setup:ai` refresh it. If missing, run `buddy generate:auto-imports`.
22
+ The inventory stays in the project so copied skills read the current app's
23
+ names after subsequent generation. Keep package implementation files and
24
+ standalone scripts self-contained with explicit imports.
25
+
11
26
  A declaration, a delivered client binding, and an initialized server global are
12
27
  three different facts. Inspect the relevant runtime rather than inferring all
13
28
  three from an ambient type file.
@@ -48,9 +63,10 @@ utilities are imported types; UserRequest/UserRequestModel are not generated
48
63
  runtime model variants. Names colliding with built-ins, such as Error/Request,
49
64
  need explicit imports and safe local aliases.
50
65
 
51
- Import Action, route, response, schema, path, storage, logging and Auth from their
52
- packages. An ambient helper declaration alone does not establish its global
53
- runtime initialization. Follow the built-in action's import pattern.
66
+ The server's primitiveModules registry also injects framework helpers such as
67
+ Action, route, response, schema, path, storage, log and Auth. Use the generated
68
+ inventory to select bare names after Stacks boot. Package internals, standalone
69
+ tools and tests without boot still import their dependencies explicitly.
54
70
 
55
71
  ## Generation and project overrides
56
72
 
@@ -703,7 +703,9 @@ export async function runScenarioStep(cdp: Pick<Cdp, 'send'>, step: ScenarioStep
703
703
  const key = step.key || ''
704
704
  // CDP's key name alone does not perform native navigation or scrolling.
705
705
  // Supply the matching virtual key on both events, as a real keyboard does.
706
- const keyCode = key.length === 1 ? key.charCodeAt(0) : ({
706
+ const letter = /^[a-z]$/i.test(key), digit = /^[0-9]$/.test(key)
707
+ const code = letter ? `Key${key.toUpperCase()}` : digit ? `Digit${key}` : key === ' ' ? 'Space' : key
708
+ const keyCode = key.length === 1 ? (letter ? key.toUpperCase() : key).charCodeAt(0) : ({
707
709
  Backspace: 8, Tab: 9, Enter: 13, Escape: 27,
708
710
  PageUp: 33, PageDown: 34, End: 35, Home: 36,
709
711
  ArrowLeft: 37, ArrowUp: 38, ArrowRight: 39, ArrowDown: 40,
@@ -712,8 +714,8 @@ export async function runScenarioStep(cdp: Pick<Cdp, 'send'>, step: ScenarioStep
712
714
  if (!keyCode) throw new Error(`Unsupported scenario key: ${JSON.stringify(key)}`)
713
715
  // Enter's text generates the keypress that activates native buttons/forms.
714
716
  const text = key === 'Enter' ? '\r' : undefined
715
- await cdp.send('Input.dispatchKeyEvent', { type: 'keyDown', key, code: key, windowsVirtualKeyCode: keyCode, text, unmodifiedText: text })
716
- await cdp.send('Input.dispatchKeyEvent', { type: 'keyUp', key, code: key, windowsVirtualKeyCode: keyCode })
717
+ await cdp.send('Input.dispatchKeyEvent', { type: 'keyDown', key, code, windowsVirtualKeyCode: keyCode, text, unmodifiedText: text })
718
+ await cdp.send('Input.dispatchKeyEvent', { type: 'keyUp', key, code, windowsVirtualKeyCode: keyCode })
717
719
  return { action: step.action, key, ok: true }
718
720
  }
719
721
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: stacks-buddy
3
- description: Use when working with the Stacks CLI (buddy/bud/stacks/stx) - understanding every command with its flags and options, adding custom commands, the make:* scaffolding commands, development server commands, build commands, deployment commands, email/mail commands, environment management, or domain/DNS commands. Covers @stacksjs/buddy and all CLI command files.
3
+ description: Use when working with the Stacks CLI (buddy/bud/stacks) - understanding every command with its flags and options, adding custom commands, the make:* scaffolding commands, development server commands, build commands, deployment commands, email/mail commands, environment management, or domain/DNS commands. Covers @stacksjs/buddy and all CLI command files.
4
4
  license: MIT
5
5
  compatibility: Bun >= 1.3.0, TypeScript
6
6
  allowed-tools: Read Edit Write Bash Grep Glob
@@ -22,7 +22,8 @@ The complete CLI runtime for the Stacks framework, lazy-loaded for fast cold sta
22
22
  - Make templates: `storage/framework/defaults/`
23
23
 
24
24
  ## CLI Aliases
25
- All invoke the same CLI: `./buddy`, `bud`, `stacks`, `stx`
25
+ `./buddy`, `bud`, and `stacks` invoke the Stacks CLI. The `stx` binary belongs
26
+ to the STX template engine; use it for template and native screen compilation.
26
27
 
27
28
  ## Architecture
28
29
 
@@ -12,6 +12,10 @@ Choose the execution surface before copying a composable signature. An STX
12
12
  client script, an explicitly imported `@stacksjs/composables` module, and a
13
13
  server script can expose similarly named functions with different contracts.
14
14
  Read [BROWSER.md](BROWSER.md) for template delivery, forms and motion examples.
15
+ For the complete installed client surface, read the STX section of
16
+ `storage/framework/auto-imports/RUNTIME.md` at the project root. Use those
17
+ helpers directly in client scripts; generation refreshes runtime, macro and
18
+ demand names from the installed STX registries.
15
19
 
16
20
  ## Eager window aliases
17
21
 
@@ -21,7 +21,7 @@ Browser runtime bindings are documented separately in `stacks-auto-imports`.
21
21
  | `@stacksjs/auth` | [`stacks-auth`](../stacks-auth/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/auth/src/index.ts) | 120 |
22
22
  | `@stacksjs/browser` | [`stacks-browser`](../stacks-browser/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/browser/src/index.ts) | 8 |
23
23
  | `@stacksjs/browser-extension` | [`stacks-browser-extension`](../stacks-browser-extension/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/browser-extension/src/index.ts) | 7 |
24
- | `@stacksjs/buddy` | [`stacks-buddy`](../stacks-buddy/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/buddy/src/index.ts) | 165 |
24
+ | `@stacksjs/buddy` | [`stacks-buddy`](../stacks-buddy/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/buddy/src/index.ts) | 166 |
25
25
  | `@stacksjs/build` | [`stacks-build`](../stacks-build/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/build/src/index.ts) | 3 |
26
26
  | `@stacksjs/cache` | [`stacks-cache`](../stacks-cache/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/cache/src/index.ts) | 14 |
27
27
  | `@stacksjs/calendar-api` | [`stacks-calendar`](../stacks-calendar/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/calendar-api/src/index.ts) | 2 |
@@ -79,7 +79,7 @@ Browser runtime bindings are documented separately in `stacks-auto-imports`.
79
79
  | `@stacksjs/scheduler` | [`stacks-scheduler`](../stacks-scheduler/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/scheduler/src/index.ts) | 14 |
80
80
  | `@stacksjs/search-engine` | [`stacks-search-engine`](../stacks-search-engine/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/search-engine/src/index.ts) | 11 |
81
81
  | `@stacksjs/security` | [`stacks-security`](../stacks-security/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/security/src/index.ts) | 11 |
82
- | `@stacksjs/server` | [`stacks-server`](../stacks-server/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/index.ts) | 27 |
82
+ | `@stacksjs/server` | [`stacks-server`](../stacks-server/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/index.ts) | 28 |
83
83
  | `@stacksjs/shell` | [`stacks-shell`](../stacks-shell/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/shell/src/index.ts) | 1 |
84
84
  | `@stacksjs/sites` | [`stacks-sites`](../stacks-sites/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/sites/src/index.ts) | 3 |
85
85
  | `@stacksjs/skills` | [`stacks-skills`](../stacks-skills/SKILL.md) | [entrypoint](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/skills/src/index.ts) | 1 |
@@ -217,7 +217,7 @@ Read the entrypoint and package export map for re-exported or type-only surfaces
217
217
 
218
218
  Local source modules: [src/commands/index.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/buddy/src/commands/index.ts).
219
219
 
220
- Evidence directory: [165 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/buddy/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
220
+ Evidence directory: [166 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/buddy/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
221
221
 
222
222
  ### @stacksjs/build
223
223
 
@@ -765,7 +765,7 @@ Declared runtime exports: `server`.
765
765
 
766
766
  Local source modules: [src/config.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/config.ts), [src/controllers/base.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/controllers/base.ts), [src/imports.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/imports.ts), [src/maintenance.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/maintenance.ts), [src/proxy.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/proxy.ts), [src/redirects.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/redirects.ts), [src/response-headers.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/response-headers.ts), [src/rewrites.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/rewrites.ts), [src/security-headers.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/security-headers.ts), [src/shadowed-defaults.ts](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/src/shadowed-defaults.ts).
767
767
 
768
- Evidence directory: [27 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
768
+ Evidence directory: [28 retained tests](https://github.com/stacksjs/stacks/blob/main/storage/framework/core/server/tests). These files are evidence pointers, not a claim that all tests were run for this catalog.
769
769
 
770
770
  ### @stacksjs/shell
771
771
 
@@ -48,6 +48,10 @@ the cases that require an action, job, policy, or explicit route.
48
48
 
49
49
  ## Important boundaries
50
50
 
51
+ - Before adding imports in app code, consult the context-specific names in
52
+ `storage/framework/auto-imports/RUNTIME.md` at the project root. Use listed
53
+ runtime helpers directly; read `stacks-auto-imports` for initialization and
54
+ module boundaries. Generation refreshes the inventory for this app.
51
55
  - `app/` overrides framework defaults. Use `extendModel` for additive model
52
56
  changes; an ordinary override replaces the definition.
53
57
  - Generated CRUD defaults to authenticated routes. Ownership and policies
@@ -2,7 +2,7 @@
2
2
  "publisher": "Stacks",
3
3
  "name": "vscode-stacks",
4
4
  "displayName": "Stacks",
5
- "version": "0.75.301",
5
+ "version": "0.75.302",
6
6
  "description": "Stacks, built into VS Code: stx templates, pickier linting and formatting, encrypted env files, the dev server preview and every buddy command. No other extensions required.",
7
7
  "license": "MIT",
8
8
  "funding": "https://github.com/sponsors/chrisbbreuer",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/defaults",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.301",
5
+ "version": "0.75.302",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/stacksjs/stacks.git",
@@ -45,7 +45,7 @@
45
45
  "dependencies": {
46
46
  "@iconify-json/f7": "^1.2.2",
47
47
  "@iconify-json/hugeicons": "^1.2.35",
48
- "@stacksjs/mobile": "0.75.301",
48
+ "@stacksjs/mobile": "0.75.302",
49
49
  "@stacksjs/sanitizer": "0.2.687",
50
50
  "@stacksjs/stx": "0.2.687",
51
51
  "@xterm/addon-fit": "^0.11.0",