create-caspian-app 0.2.0-beta.76 → 0.2.0-beta.78

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.
@@ -8,6 +8,7 @@
8
8
  - This file owns repo-wide always-on rules for the workspace.
9
9
  - `AGENTS.md` should focus on task routing, runtime cross-checking, and packaged-doc maintenance rather than repeating full rule blocks from this file.
10
10
  - When packaged docs need to point AI from a feature guide to the controlling runtime file, prefer `node_modules/caspian-utils/dist/docs/core-runtime-map.md` instead of duplicating the full module map in multiple pages.
11
+ - When packaged docs need to point AI from a PulsePoint feature or directive to the controlling browser behavior, prefer `node_modules/caspian-utils/dist/docs/pulsepoint-runtime-map.md` instead of duplicating the full browser feature map in multiple pages.
11
12
 
12
13
  ## Global Rules
13
14
 
@@ -18,6 +19,7 @@
18
19
  - If a feature is disabled and the user wants it, ask whether they want to enable it first, then update `caspian.config.json` and follow `npx casp update project` so framework-managed files align with the new feature set.
19
20
  - When `.github/instructions/**/*.instructions.md` files exist, treat them as workspace-local file instructions for specific libraries, component systems, icon sets, integrations, and implementation rules. Read the matching instruction before deciding how to implement work in that area, but do not let it override `caspian.config.json`, app code, or installed runtime behavior.
20
21
  - Treat `node_modules/caspian-utils/dist/docs/**` as packaged Caspian docs that teach AI how Caspian features work and where to look next. Their presence does not mean the feature is enabled in the current project.
22
+ - Use `node_modules/caspian-utils/dist/docs/pulsepoint-runtime-map.md` for fast PulsePoint feature lookup before editing browser-side behavior or generating advanced PulsePoint patterns.
21
23
  - For current repo behavior, trust `main.py`, `src/lib/**`, `public/js/**`, `prisma/**`, and `src/app/**` over generic Caspian docs.
22
24
  - For framework internals, trust `.venv/Lib/site-packages/casp/**` over generic or older upstream guidance.
23
25
  - When packaged docs conflict with project code or installed runtime, the project code, `caspian.config.json`, and installed runtime win. Keep the packaged docs feature-oriented and point AI back to the project files that decide actual enablement and behavior.
package/dist/AGENTS.md CHANGED
@@ -63,6 +63,7 @@ Use `.github/copilot-instructions.md` for the repo-wide implementation rules. Th
63
63
  - Local Caspian docs live under `node_modules/caspian-utils/dist/docs/`.
64
64
  - Workspace file instructions live under `.github/instructions/**/*.instructions.md` when the repo needs task- or library-specific AI guidance that should not be always-on.
65
65
  - Use `node_modules/caspian-utils/dist/docs/core-runtime-map.md` when a behavior is controlled by `main.py` or `.venv/Lib/site-packages/casp/**` and the owning file is not obvious yet.
66
+ - Use `node_modules/caspian-utils/dist/docs/pulsepoint-runtime-map.md` when a behavior is controlled by the shipped PulsePoint browser runtime and the task names state, effects, refs, context, portals, directives, `pp.rpc`, uploads, streaming, SPA navigation, or scroll restoration.
66
67
  - For grouped-subtree SPA navigation UX, the current browser runtime keeps unmarked shell scrollers stable and uses `pp-reset-scroll="true"` on the content pane that should reset. Check `pulsepoint.md`, `routing.md`, and `public/js/pp-reactive-v2.js` before changing that behavior.
67
68
  - Before updating docs, verify runtime-specific claims such as middleware order, route param injection, `layout()` sync behavior, and `StateManager` persistence against the current `main.py` and installed `casp` package rather than copying older notes.
68
69
  - When generating or reviewing `src/app/**/index.html`, `src/app/**/layout.html`, or component HTML templates, treat the single-root rule as a hard requirement: exactly one authored top-level parent element or one imported `x-*` root, with any owned `<script>` kept inside that same root. Do not allow sibling top-level tags, sibling scripts, or stray top-level text, because Caspian injects `pp-component` on that final root and errors if it cannot.
@@ -78,6 +79,7 @@ If the task generates or edits route, layout, or component HTML templates, check
78
79
  | Project layout and file placement | `node_modules/caspian-utils/dist/docs/index.md`, `node_modules/caspian-utils/dist/docs/project-structure.md` | current workspace tree |
79
80
  | Feature availability and tooling switches | `caspian.config.json` | current workspace tree, `main.py`, `prisma/**`, `public/js/**` |
80
81
  | Framework internals and core-file lookup | `node_modules/caspian-utils/dist/docs/core-runtime-map.md` | `main.py`, `.venv/Lib/site-packages/casp/**`, matching feature docs |
82
+ | PulsePoint browser runtime lookup | `node_modules/caspian-utils/dist/docs/pulsepoint-runtime-map.md`, `node_modules/caspian-utils/dist/docs/pulsepoint.md` | `public/js/pp-reactive-v2.js`, `main.py`, `.venv/Lib/site-packages/casp/scripts_type.py`, `.venv/Lib/site-packages/casp/components_compiler.py` |
81
83
  | Library-specific and task-specific rules | matching `.github/instructions/**/*.instructions.md` files | `caspian.config.json`, current workspace tree, owning app and lib files |
82
84
  | MCP server layout and launch flow | `node_modules/caspian-utils/dist/docs/mcp.md` | `settings/restart-mcp.ts`, `package.json`, `src/lib/mcp/**` |
83
85
  | Routing, layouts, metadata | `node_modules/caspian-utils/dist/docs/routing.md` | `main.py`, `.venv/Lib/site-packages/casp/layout.py` |
@@ -100,6 +102,7 @@ If the task generates or edits route, layout, or component HTML templates, check
100
102
  - Gate optional docs with `caspian.config.json`. Use phrasing such as `when caspian.config.json enables MCP` instead of `this workspace has mcp: false`.
101
103
  - Use the packaged docs to make AI aware of what Caspian can do, when a doc applies, and which project files should be inspected next.
102
104
  - Use `core-runtime-map.md` to map packaged docs back to `main.py` and installed `casp` modules instead of restating the full runtime file list in every page.
105
+ - Use `pulsepoint-runtime-map.md` to map PulsePoint feature names and directives back to the shipped browser runtime instead of restating browser behavior in every page.
103
106
  - When `caspian.config.json` has `tailwindcss: true`, document Tailwind class handling as the current contract: Python `merge_classes(...)` emits frontend `{twMerge(...)}` expressions and browser `twMerge(...)` resolves conflicts.
104
107
  - Keep repo-specific clarifications in this file or `.github/copilot-instructions.md` rather than embedding them in the packaged docs unless the behavior is truly framework-wide.
105
108
  - Keep `index.md` and cross-links aligned so AI can discover the right task doc quickly.
package/dist/main.py CHANGED
@@ -387,6 +387,8 @@ def register_single_route(url_pattern: str, file_path: str):
387
387
  req_should_cache = None
388
388
  req_cache_ttl = 0
389
389
 
390
+ page_content_source = file_path
391
+
390
392
  if file_path.endswith('.py'):
391
393
  module = load_route_module(file_path)
392
394
  if not hasattr(module, 'page'):
@@ -429,11 +431,14 @@ def register_single_route(url_pattern: str, file_path: str):
429
431
  req_cache_ttl = cache_settings.ttl
430
432
 
431
433
  if isinstance(result, tuple):
432
- content = str(result[0])
434
+ page_content = result[0]
435
+ content = str(page_content)
436
+ page_content_source = getattr(page_content, 'source_path', file_path)
433
437
  if len(result) >= 2 and isinstance(result[1], dict):
434
438
  page_layout_props = result[1]
435
439
  else:
436
440
  content = str(result)
441
+ page_content_source = getattr(result, 'source_path', file_path)
437
442
 
438
443
  dynamic_meta = _runtime_metadata.get()
439
444
  static_meta = getattr(module, 'metadata', None)
@@ -464,7 +469,7 @@ def register_single_route(url_pattern: str, file_path: str):
464
469
  page_metadata=page_metadata,
465
470
  page_layout_props=page_layout_props,
466
471
  context_data=full_context,
467
- page_component_source=file_path,
472
+ page_component_source=page_content_source,
468
473
  control_mode=True,
469
474
  component_compiler=transform_components
470
475
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-caspian-app",
3
- "version": "0.2.0-beta.76",
3
+ "version": "0.2.0-beta.78",
4
4
  "description": "Scaffold a new Caspian project (FastAPI-powered reactive Python framework).",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",