tokensafe 4.11.0 → 4.12.1

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.11.0",
2
+ "version": "4.12.1",
3
3
  "name": "tokensafe",
4
4
  "description": "Your AI agent is smart enough to code all day. Now it actually can. Local runtime firewall & zero-loss context optimizer for AI coding agents.",
5
5
  "author": {
package/README.md CHANGED
@@ -215,7 +215,7 @@ Deeper mechanics (language matrix, AST syntax trees, cache tiers, governor) live
215
215
 
216
216
  You install TokenSafe, open a project in your agent, and the first turn does the wiring:
217
217
 
218
- 1. **Detect** the stack (React/Vue + Vite, FastAPI, Go/Gin|Chi, Node/Express|Fastify, Next.js, Elysia on Bun, ASP.NET Core, or nothing supported).
218
+ 1. **Detect** the stack (React/Vue/Solid/Angular + Vite, FastAPI, Flask, Django, Go/Gin|Chi, Node/Express|Fastify, Next.js, Elysia on Bun, ASP.NET Core, Spring, Laravel/Symfony, or nothing supported).
219
219
  2. **Activate** the adapters:
220
220
  * frontend — `tokensafe dev` serves OUMV from an inline Vite config; **no file in the
221
221
  repository changes**;
@@ -618,8 +618,8 @@ TokenSafe integrates with the [OUMV Protocol](https://github.com/tokensafe-dev/o
618
618
  - **Out-of-the-Box Stack Detection**: TokenSafe automatically detects your application stack (`package.json`, `go.mod`, `pyproject.toml`, Vite, Next.js, FastAPI, Gin) and configures agent tooling dynamically.
619
619
  - **Level 1 Static AST Fallback**: When live dev-servers are offline, `oumv_observe` and `oumv_understand` gracefully fall back to zero-config static AST component trees and route maps with evidence tracking.
620
620
  - **Consolidated Adapters**:
621
- - **Frontend**: `tokensafe-ui/react`, `tokensafe-ui/vue`, and the zero-footprint Vite bridge (`tokensafe-ui/vite`) with a session token stored in the per-workspace descriptor (`~/.tokensafe/runtimes/<hash>.json`, mode 0600).
622
- - **Backend**: Go (`gin`, `chi`, `stdhttp`) and Python (`fastapi`, `sqlalchemy`) in [`tokensafe-backend`](https://github.com/tokensafe-dev/tokensafe-backend).
621
+ - **Frontend**: `tokensafe-ui/react`, `tokensafe-ui/vue`, and the zero-footprint Vite bridge (`tokensafe-ui/vite`) that also serves Solid (`--framework solid`) and Angular (`--framework angular`, Vite/Analog dev server), with a session token stored in the per-workspace descriptor (`~/.tokensafe/runtimes/<hash>.json`, mode 0600).
622
+ - **Backend**: Go (`gin`, `chi`, `stdhttp`), Node (`express`, `fastify`, `next`, `elysia`), Python (`fastapi`, `starlette`, `flask`, `django`), ASP.NET Core and the JDK/PHP sidecars in [`tokensafe-backend`](https://github.com/tokensafe-dev/tokensafe-backend) — eighteen manifests in the [OUMV adapter matrix](https://github.com/tokensafe-dev/oumv/blob/main/docs/ADAPTERS.md), every claim backed by a committed certificate.
623
623
  - **Guarded Mutations, Enabled by Default**: `oumv_mutate` works out of the box on Solo and above and guards every write — mandatory OCC `expectedVersion`, workspace path jail, syntax pre-flight, backup of previous bytes. Opt out with `permissions.mutate: false` in `.tokensafe/oumv.json`.
624
624
  - **Automatic Wiring CLI**: `tokensafe inject` activates adapters with zero repository footprint (Vite wrapper, Python autoload, one marker-delimited Go line), `tokensafe inject --revert` restores it, and `tokensafe oumv doctor` reports readiness with blocking reasons.
625
625
  - **Greenfield Recipes**: `tokensafe create <name> --template react-fastapi|react-go|vue-gin|fastapi|gin` generates a normal project in your stack with OUMV already wired.
package/kimi.plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tokensafe",
3
- "version": "4.11.0",
3
+ "version": "4.12.1",
4
4
  "description": "Your AI agent is smart enough to code all day. Now it actually can. Local runtime firewall & zero-loss context optimizer for AI coding agents.",
5
5
  "homepage": "https://tokensafe.dev",
6
6
  "license": "Apache-2.0",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tokensafe",
3
3
  "mcpName": "dev.tokensafe/tokensafe",
4
- "version": "4.11.0",
4
+ "version": "4.12.1",
5
5
  "description": "Your AI agent is smart enough to code all day. Now it actually can. Local runtime firewall & zero-loss context optimizer for AI coding agents.",
6
6
  "main": "bin/tokensafe.js",
7
7
  "bin": {
package/plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tokensafe",
3
3
  "displayName": "TokenSafe",
4
- "version": "4.11.0",
4
+ "version": "4.12.1",
5
5
  "license": "Apache-2.0",
6
6
  "description": "Your AI agent is smart enough to code all day. Now it actually can. Local runtime firewall & zero-loss context optimizer for AI coding agents.",
7
7
  "logo": "assets/logo.png",
package/rules/AGENTS.md CHANGED
@@ -45,7 +45,7 @@ Execute the specified action directly based on these extracted parameters.
45
45
  - `"diff"` (`diff`): slice unified git diffs
46
46
  - `"image"` (`image_path`, `max_edge=1024`): downscale screenshots (-50-75% vision tokens)
47
47
  - `"compress"` (`prompt`): TOCP S-expression compression
48
- 7. **Universal OUMV Protocol (`oumv` — Mandatory When Supported)**: When a project uses an OUMV-supported stack (`frontend/react` Vite, `frontend/vue`, `frontend/solid`, `backend/go`, `backend/fastapi`), ALWAYS prefer `tokensafe:oumv(action="status"|"observe"|"understand"|"verify"|"mutate"|"graph", ...)` BEFORE full file crawls, raw `curl`, or headless browsers — even for read/edit tasks (static AST OUMV works offline without running dev/build). For Vite+React, use `tokensafe dev` to start live OUMV with zero repository footprint. In mixed monorepos (e.g. React + Node.js), inspect `oumv(action="status")` / `[TokenSafe OUMV Workspace Matrix]`: use `oumv` on supported profiles and fall back to `repo_map` + `smart_read_file` + `scoped_search` for unsupported stacks (`backend/node`). **Multi-root sessions**: the routing brief is classified per workspace root — a verdict for one repo NEVER applies to another. Before editing a repo outside the roots listed in the brief, call `tokensafe:oumv(action="status", workspace_dir="<that repo>")`; never conclude "OUMV is unavailable" from a single-root brief.
48
+ 7. **Universal OUMV Protocol (`oumv` — Mandatory When Supported)**: When a project uses an OUMV-supported stack (`frontend/react` Vite, `frontend/vue`, `frontend/solid`, `frontend/angular`, `backend/go`, `backend/fastapi`), ALWAYS prefer `tokensafe:oumv(action="status"|"observe"|"understand"|"verify"|"mutate"|"graph", ...)` BEFORE full file crawls, raw `curl`, or headless browsers — even for read/edit tasks (static AST OUMV works offline without running dev/build). For Vite frontends, use `tokensafe dev` to start live OUMV with zero repository footprint. In mixed monorepos (e.g. React + Node.js), inspect `oumv(action="status")` / `[TokenSafe OUMV Workspace Matrix]`: use `oumv` on supported profiles and fall back to `repo_map` + `smart_read_file` + `scoped_search` for unsupported stacks (`backend/node`). **Multi-root sessions**: the routing brief is classified per workspace root — a verdict for one repo NEVER applies to another. Before editing a repo outside the roots listed in the brief, call `tokensafe:oumv(action="status", workspace_dir="<that repo>")`; never conclude "OUMV is unavailable" from a single-root brief.
49
49
  8. **Bounded Reads & Styles**: Never call raw `read_file` without `StartLine`/`EndLine` on files > 100 lines. `smart_read_file` preserves CSS/SCSS/Tailwind design tokens (`:root`, `@theme`) in full.
50
50
 
51
51
  ### 4. Turn Token Savings Footer (Proof-of-Savings — always in English)
package/server.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "dev.tokensafe/tokensafe",
4
4
  "title": "TokenSafe",
5
5
  "description": "Your AI agent is smart enough to code all day. Local firewall & zero-loss runtime.",
6
- "version": "4.11.0",
6
+ "version": "4.12.1",
7
7
  "websiteUrl": "https://tokensafe.dev",
8
8
  "repository": {
9
9
  "url": "https://github.com/tokensafe-dev/tokensafe",
@@ -23,7 +23,7 @@
23
23
  "registryType": "npm",
24
24
  "registryBaseUrl": "https://registry.npmjs.org",
25
25
  "identifier": "tokensafe",
26
- "version": "4.11.0",
26
+ "version": "4.12.1",
27
27
  "runtimeHint": "npx",
28
28
  "transport": {
29
29
  "type": "stdio"
@@ -39,7 +39,7 @@
39
39
  "registryType": "pypi",
40
40
  "registryBaseUrl": "https://pypi.org",
41
41
  "identifier": "tokensafe",
42
- "version": "4.11.0",
42
+ "version": "4.12.1",
43
43
  "runtimeHint": "uvx",
44
44
  "transport": {
45
45
  "type": "stdio"
@@ -113,7 +113,7 @@ TokenSafe actively maximizes provider KV-cache hit rates alongside token compres
113
113
  TokenSafe integrates the **Universal Agent-Runtime Protocol (UARP / OUMV)** to inspect, reason about, edit, and verify Frontend (`tokensafe-ui`, React 18/19 + Vite, Vue 3) and Backend (`Go` Gin/Chi/net-http, `FastAPI`) services without heavy headless browsers or unconstrained shell curls.
114
114
 
115
115
  ### OUMV-First Policy, Zero-Footprint & Mixed Monorepos
116
- - **Mandatory When Supported (Even Without Dev/Build Running)**: If the workspace contains a supported profile (`frontend/react`, `frontend/vue`, `frontend/solid`, `backend/go`, `backend/fastapi`, `backend/node` (Express/Fastify/Next.js), `backend/elysia`, `backend/aspnetcore`), prefer `tokensafe:oumv` (`status` -> `observe` L0/L1/L2 -> `understand` impact -> `mutate` -> `verify`) BEFORE brute-force reading components or running `curl`/browsers. Static OUMV works offline even when the agent only reads and edits files.
116
+ - **Mandatory When Supported (Even Without Dev/Build Running)**: If the workspace contains a supported profile (`frontend/react`, `frontend/vue`, `frontend/solid`, `frontend/angular`, `backend/go`, `backend/fastapi`, `backend/node` (Express/Fastify/Next.js), `backend/elysia`, `backend/aspnetcore`), prefer `tokensafe:oumv` (`status` -> `observe` L0/L1/L2 -> `understand` impact -> `mutate` -> `verify`) BEFORE brute-force reading components or running `curl`/browsers. Static OUMV works offline even when the agent only reads and edits files.
117
117
  - **Zero-Footprint Vite+React (`tokensafe dev`)**: Running `tokensafe dev` (or `vite` / `npm run dev` rewritten automatically by `CommandSanitizer`) starts the project's Vite+React DevServer with `tokensafeReact()` injected in memory and runtime state stored under `~/.tokensafe/runtimes/<hash>.json` (sidecar L2 contracts in `~/.tokensafe/contracts/<hash>.json`) — leaving **0 modified/untracked files** in the repository.
118
118
  - **Monorepo Capability Boundaries**: In mixed monorepos (e.g., `apps/web` in React + `apps/api` in Node.js/Express), check `oumv(action="status")` or `[TokenSafe OUMV Workspace Matrix]`. Use `tokensafe:oumv(runtime="frontend")` for React, and use `repo_map` + `smart_read_file` + `scoped_search` + normal tests for packages `oumv status` marks unsupported (Nest/Hono/Koa, a Bun worker with no HTTP server).
119
119
 
@@ -45,7 +45,7 @@ TOKENSAFE_DIRECTIVES = (
45
45
  "• When context budget reports warning/critical or Grade C/F: call 'tokensafe:session_context(action=\"compact\", transcript_path=...)' to fold history before continuing.\n"
46
46
  "• Prohibited File Edits: NEVER use 'sed -i', 'perl -i', or stream editors to modify source files; ALWAYS use 'edit_file' with exact string targets. NEVER suppress errors with '2>/dev/null'.\n"
47
47
  "• Prefer 'edit_file' over 'write_file' for existing files.\n"
48
- "• Universal OUMV Protocol (Mandatory When Supported): If the workspace reports an OUMV-supported stack (React+Vite, Vue, Solid, Go, FastAPI, Express/Fastify, Next.js, Elysia on Bun, ASP.NET Core), ALWAYS prefer the 'oumv' MCP tool (status/observe/understand/verify) before full file crawls, raw curl, or browser checks — even when only reading/editing files (static AST OUMV works offline; use 'tokensafe dev' for zero-footprint live Vite+React). Check capability boundaries in mixed monorepos (for unsupported stacks like backend/node Express/Fastify/Nest, use repo_map/smart_read_file/scoped_search).\n"
48
+ "• Universal OUMV Protocol (Mandatory When Supported): If the workspace reports an OUMV-supported stack (React+Vite, Vue, Solid, Angular, Go, FastAPI, Express/Fastify, Next.js, Elysia on Bun, ASP.NET Core), ALWAYS prefer the 'oumv' MCP tool (status/observe/understand/verify) before full file crawls, raw curl, or browser checks — even when only reading/editing files (static AST OUMV works offline; use 'tokensafe dev' for zero-footprint live Vite RPC). Check capability boundaries in mixed monorepos (for unsupported stacks like backend/node Express/Fastify/Nest, use repo_map/smart_read_file/scoped_search).\n"
49
49
  "• Multi-Root Sessions: the OUMV routing brief is classified PER workspace root (hosts that report several folders get every root listed). A single-root verdict never describes another repo — before editing a repo outside the listed roots, call 'oumv' with workspace_dir='<that repo>'; never conclude 'OUMV is unavailable' from one root's line."
50
50
  )
51
51
 
@@ -529,7 +529,7 @@ def get_oumv_read_edit_advisory(workspace_dir: str, file_path: str, session_id:
529
529
  f"[TokenSafe OUMV]: Live {pkg.get('provider')}/{pkg.get('framework')} OUMV runtime is active (port {live_ports[0]}). "
530
530
  f"Prefer tokensafe:oumv(action='observe'|'understand'|'verify') for live DOM/state/causality instead of manual file crawling."
531
531
  )
532
- vite_tip = "; run 'tokensafe dev' for zero-footprint live Vite+React RPC" if pkg.get("vite") else ""
532
+ vite_tip = "; run 'tokensafe dev' for zero-footprint live Vite RPC" if pkg.get("vite") else ""
533
533
  return (
534
534
  f"[TokenSafe OUMV]: '{os.path.basename(file_path)}' belongs to an OUMV-supported {pkg.get('provider')}/{pkg.get('framework')} stack. "
535
535
  f"Use tokensafe:oumv(action='observe', level='L1') or oumv(action='understand', query='impact') first (works statically offline{vite_tip})."
@@ -1508,14 +1508,20 @@ def plan(workspace: str) -> Dict[str, Any]:
1508
1508
  frontend = stack.get("frontend")
1509
1509
  is_next = bool(frontend and frontend.get("framework") == "nextjs")
1510
1510
  if frontend and not is_next:
1511
+ provider = str(frontend.get("provider") or "")
1512
+ framework = str(frontend.get("framework") or provider)
1513
+ # The install hint belongs to the detected adapter, not to React: Vue,
1514
+ # Solid and Angular each have their own catalog entry.
1515
+ frontend_entry = catalog.get(f"frontend/{provider}") or {}
1516
+ run = "tokensafe dev" if framework == "react" else f"tokensafe dev --framework {framework}"
1511
1517
  actions.append({
1512
1518
  "kind": "frontend_zero_footprint",
1513
1519
  "profile": "frontend",
1514
- "framework": f"{frontend.get('provider')}/{frontend.get('framework')}",
1520
+ "framework": f"{provider}/{framework}",
1515
1521
  "writes_repo": False,
1516
1522
  "description": "served by `tokensafe dev` (inline Vite config, descriptor in ~/.tokensafe/runtimes)",
1517
- "run": "tokensafe dev",
1518
- "install": catalog.get("frontend/react", {}).get("technology", {}).get("package", {}).get("install"),
1523
+ "run": run,
1524
+ "install": frontend_entry.get("technology", {}).get("package", {}).get("install"),
1519
1525
  })
1520
1526
  if is_next:
1521
1527
  next_state = next_patch_state(workspace)
package/src/cli.py CHANGED
@@ -876,7 +876,16 @@ def main(argv: Optional[List[str]] = None):
876
876
  print(f" Workspace: {status.get('workspace')}\n")
877
877
 
878
878
  elif command == "dev":
879
- from src.retrofit import resolve_zero_footprint_vite_command
879
+ from src.retrofit import detect_project_stack, resolve_zero_footprint_vite_command
880
+
881
+ if "--help" in args or "-h" in args:
882
+ print(
883
+ "\n tokensafe dev [path] [--port N] [--host H] [--open]\n"
884
+ "\n Starts the app's own Vite dev server with the tokensafe-ui OUMV bridge and\n"
885
+ " leaves the repository untouched. Needs a Vite frontend: React, Vue, Solid,\n"
886
+ " or Angular through @analogjs/vite-plugin-angular. Run it in the app directory.\n"
887
+ )
888
+ return
880
889
  target_dir = os.getcwd()
881
890
  port_val: Optional[int] = None
882
891
  host_val: Optional[str] = None
@@ -917,6 +926,35 @@ def main(argv: Optional[List[str]] = None):
917
926
  i += 1
918
927
  if unknown_flags:
919
928
  print(f"⚠ Ignoring unsupported 'tokensafe dev' flag(s): {' '.join(unknown_flags)}")
929
+ # `tokensafe dev` cannot invent a frontend: without a Vite app the server
930
+ # would serve an empty directory. Refuse with the reason and the nearest
931
+ # frontend path instead of failing inside Vite.
932
+ stack = detect_project_stack(target_dir)
933
+ frontend = stack.get("frontend") or {}
934
+ if not frontend:
935
+ nested = [
936
+ pkg.get("path")
937
+ for pkg in (stack.get("packages") or [])
938
+ if pkg.get("vite") and pkg.get("path") not in (None, ".")
939
+ ]
940
+ hint = f"\n A Vite frontend lives in {nested[0]} — run `tokensafe dev` there." if nested else ""
941
+ print(
942
+ f"✗ No Vite frontend in {target_dir}. `tokensafe dev` starts the app's own Vite\n"
943
+ f" dev server (React, Vue, Solid, or Angular with @analogjs/vite-plugin-angular).{hint}"
944
+ )
945
+ sys.exit(1)
946
+ if frontend.get("vite") and not frontend.get("oumv_supported", True):
947
+ note = frontend.get("note") or f"status: {frontend.get('status')}"
948
+ print(f"✗ {frontend.get('framework')} detected, but the OUMV dev bridge is not available: {note}")
949
+ sys.exit(1)
950
+ # In a monorepo the frontend is a nested package: run the server there,
951
+ # not at the root that has no index.html.
952
+ frontend_root = frontend.get("root")
953
+ if frontend_root and frontend_root != ".":
954
+ nested_dir = os.path.abspath(os.path.join(target_dir, frontend_root))
955
+ if os.path.isdir(nested_dir):
956
+ print(f"⚡ Using the {frontend.get('framework')} Vite frontend at {frontend_root}")
957
+ target_dir = nested_dir
920
958
  cmd, source = resolve_zero_footprint_vite_command(
921
959
  target_dir, port=port_val, host=host_val, open_browser=open_browser
922
960
  )
package/src/installer.py CHANGED
@@ -60,9 +60,9 @@ UNIFIED_TOKENSAFE_RULE = (
60
60
  "`🛡️ **TokenSafe Security Guard**: Prevented secret / private key leak into git (<target_file>: <details>)`\n"
61
61
  "11. **Proof-of-Savings Turn Footer (strictly English)**: Append on tool-using turns:\n"
62
62
  "`⚡ **TokenSafe Turn Savings**: +<tokens> tokens saved on this turn (<breakdown in English>) | Cumulative Total: <total> tokens (≈$<usd> approx)`\n"
63
- "12. **Universal OUMV Protocol (`oumv`)**: When a workspace profile is OUMV-supported (React+Vite, Vue, Solid, Go, FastAPI, Express/Fastify, Next.js, Elysia on Bun, ASP.NET Core), "
63
+ "12. **Universal OUMV Protocol (`oumv`)**: When a workspace profile is OUMV-supported (React+Vite, Vue, Solid, Angular, Go, FastAPI, Express/Fastify, Next.js, Elysia on Bun, ASP.NET Core), "
64
64
  "ALWAYS prefer `tokensafe:oumv(action='status'|'observe'|'understand'|'verify'|'mutate'|'graph', ...)` BEFORE full file crawls, raw curls, or browser checks — "
65
- "static OUMV works offline on read/edit tasks too, and `tokensafe dev` starts zero-footprint live Vite+React RPC without touching repo files. "
65
+ "static OUMV works offline on read/edit tasks too, and `tokensafe dev` starts zero-footprint live Vite RPC without touching repo files. "
66
66
  "In mixed monorepos (e.g. React + Node.js), use `oumv` on supported profiles and `repo_map`/`smart_read_file`/`scoped_search` on unsupported stacks (e.g. `backend/node`).\n"
67
67
  )
68
68
 
package/src/mcp_server.py CHANGED
@@ -45,7 +45,7 @@ from src.session_context import current_root, current_session_id
45
45
 
46
46
  SERVER_INFO = {
47
47
  "name": "tokensafe-mcp",
48
- "version": "4.11.0"
48
+ "version": "4.12.1"
49
49
  }
50
50
 
51
51
  # MCP client attribution: the initialize handshake carries clientInfo, which
@@ -535,7 +535,7 @@ class OUMVGateway:
535
535
  "frontend": fe or {
536
536
  "status": "DISCONNECTED",
537
537
  "framework": (stack_info.get("frontend") or {}).get("framework", "None"),
538
- "tip": "Static AST analysis active. Run 'tokensafe dev' (zero repo footprint) for live Vite+React OUMV.",
538
+ "tip": "Static AST analysis active. Run 'tokensafe dev' (zero repo footprint) for live Vite OUMV.",
539
539
  },
540
540
  "backend": be or ({
541
541
  "status": "UNSUPPORTED",
package/src/retrofit.py CHANGED
@@ -83,6 +83,21 @@ def _detect_package_json_entry(pkg_json_path: str, rel_dir: str = ".") -> Tuple[
83
83
  })
84
84
  elif "svelte" in deps:
85
85
  fe_info.update({"framework": "svelte", "provider": "svelte", "adapter": "tokensafe-ui/core", "version": deps.get("svelte"), "oumv_supported": False, "status": "planned"})
86
+ elif "@angular/core" in deps:
87
+ # Angular has no JSX and no __file marker: components are decorated
88
+ # classes, discovery reads the dev build's window.ng, and the app must
89
+ # be served by a Vite dev server that also runs the Angular compiler.
90
+ # The Angular CLI dev server exposes no third-party Vite plugin hook.
91
+ has_analog = "@analogjs/vite-plugin-angular" in deps
92
+ fe_info.update({
93
+ "framework": "angular",
94
+ "provider": "angular",
95
+ "adapter": "tokensafe-ui/vite",
96
+ "version": deps.get("@angular/core"),
97
+ "oumv_supported": has_vite and has_analog,
98
+ "status": "ready" if has_vite and has_analog else "needs-vite",
99
+ "note": "requires the Vite dev server with @analogjs/vite-plugin-angular 3.x (Angular 20+); discovery reads the Angular dev build's window.ng, and the Angular CLI dev server (ng serve / @angular/build) is out of scope",
100
+ })
86
101
 
87
102
  if "framework" in fe_info:
88
103
  fe_out = fe_info
@@ -592,7 +607,7 @@ def get_adapters_catalog() -> List[Dict[str, Any]]:
592
607
  "repo": "tokensafe-ui",
593
608
  "mode": "hybrid",
594
609
  "status": "ready",
595
- "description": "Solid has no DOM-attached component registry, so the bridge reads the dev build's owner tree (DEV.hooks.afterCreateOwner) and strips vite-plugin-solid's [solid-refresh] prefix; the in-page bridge is generated by the shared bridge-core module (React, Vue and Next use the same generator). Browser-certified 47/47 Level 3 on fixtures v17, including the three browserCases.",
610
+ "description": "Solid has no DOM-attached component registry, so the bridge reads the dev build's owner tree (DEV.hooks.afterCreateOwner) and strips vite-plugin-solid's [solid-refresh] prefix; the in-page bridge is generated by the shared bridge-core module. Browser-certified 50/50 Level 3 on fixtures v19, including the three browserCases (agent-dom/certification/solid-vite-browser.json).",
596
611
  "technology": {
597
612
  "language": "typescript",
598
613
  "framework": "solidjs",
@@ -607,6 +622,29 @@ def get_adapters_catalog() -> List[Dict[str, Any]]:
607
622
  {"name": "verify.runtime_behavior", "constraints": {"readOnly": True, "developmentOnly": True}},
608
623
  ],
609
624
  },
625
+ {
626
+ "id": "frontend/angular",
627
+ "name": "Angular + Vite Adapter (window.ng discovery, @Component scanner)",
628
+ "profile": "frontend",
629
+ "profiles": ["frontend"],
630
+ "repo": "tokensafe-ui",
631
+ "mode": "hybrid",
632
+ "status": "ready",
633
+ "description": "Angular components are decorated classes: the bridge walks the DOM and asks the dev build's window.ng for the owning component (getComponent/getOwningComponent, inputs from getDirectiveMetadata), and a static @Component scanner supplies file and class ranges. Served by the Vite dev server with @analogjs/vite-plugin-angular 3.x; the Angular CLI dev server is out of scope. Browser-certified 50/50 Level 3 on fixtures v19, read-only 27/27 (agent-dom/certification/angular-vite-browser.json).",
634
+ "technology": {
635
+ "language": "typescript",
636
+ "framework": "angular",
637
+ "package": {"manager": "npm", "name": "tokensafe-ui", "install": "npm install -D tokensafe-ui"},
638
+ },
639
+ "capabilities": [
640
+ {"name": "observe.resources", "constraints": {"readOnly": True, "developmentOnly": True}},
641
+ {"name": "understand.causality", "constraints": {"readOnly": True, "developmentOnly": True}},
642
+ {"name": "mutate.source", "constraints": {"readOnly": False, "developmentOnly": True, "requiresPermission": "permissions.mutate != false"}},
643
+ {"name": "mutate.multiFile", "constraints": {"readOnly": False, "developmentOnly": True, "requiresPermission": "permissions.mutate != false"}},
644
+ {"name": "mutate.preview", "constraints": {"readOnly": False, "developmentOnly": True, "requiresPermission": "permissions.mutate != false"}},
645
+ {"name": "verify.runtime_behavior", "constraints": {"readOnly": True, "developmentOnly": True}},
646
+ ],
647
+ },
610
648
  {
611
649
  "id": "frontend/vue",
612
650
  "name": "Vue 3 Adapter (Composition API, Pinia)",
@@ -1182,12 +1220,12 @@ def resolve_zero_footprint_vite_command(
1182
1220
  cli_flags.append(f"--host={host}")
1183
1221
  if open_browser:
1184
1222
  cli_flags.append("--open")
1185
- # `dev` defaults to React; a Vue project must say so explicitly or it gets the
1186
- # React controller and bridge.
1223
+ # `dev` defaults to React; any other framework must say so explicitly or it
1224
+ # gets the React controller and bridge.
1187
1225
  stack = detect_project_stack(ws)
1188
1226
  frontend = stack.get("frontend") or {}
1189
1227
  framework = frontend.get("framework") if isinstance(frontend, dict) else None
1190
- if framework in ("react", "vue"):
1228
+ if framework in ("react", "vue", "solid", "angular"):
1191
1229
  cli_flags.append(f"--framework={framework}")
1192
1230
 
1193
1231
  resolved = resolve_tokensafe_ui_cli(ws)
@@ -1305,6 +1343,10 @@ def is_path_in_supported_oumv_scope(workspace_dir: str, file_path: str, use_cach
1305
1343
  if role == "frontend":
1306
1344
  if ext in (".tsx", ".jsx", ".vue"):
1307
1345
  return pkg
1346
+ # Angular components are .ts and their templates are .html; both
1347
+ # belong to the frontend that owns them.
1348
+ if ext == ".html" and pkg.get("provider") == "angular":
1349
+ return pkg
1308
1350
  if ext in (".ts", ".js"):
1309
1351
  # A repository-root frontend also owns scripts/, configs and
1310
1352
  # tooling in .ts/.js; only nudge files under source-like dirs.
@@ -31,6 +31,12 @@ _FRONTEND_LINES = {
31
31
  "(zero repo footprint, L0-L4, OCC edits; certified L3 in a browser). Call "
32
32
  "tokensafe:oumv(action='observe', level='L1') before reading files."
33
33
  ),
34
+ "angular": (
35
+ "frontend angular/{framework}: OUMV live via `tokensafe dev --framework angular` "
36
+ "on the Vite/Analog dev server (window.ng discovery, L0-L4, OCC edits; certified "
37
+ "L3 in a browser). Call tokensafe:oumv(action='observe', level='L1') before "
38
+ "reading files; `ng serve` is out of scope."
39
+ ),
34
40
  "vue": (
35
41
  "frontend {provider}/{framework}: OUMV live via `tokensafe dev --framework vue` "
36
42
  "(zero repo footprint, L0-L4, OCC edits; certified L3 in a browser). Call "
@@ -311,7 +311,7 @@ class TelemetrySync:
311
311
  current_last_id = last_id
312
312
  headers = {
313
313
  "Content-Type": "application/json",
314
- "User-Agent": "TokenSafe-Sync/4.11.0"
314
+ "User-Agent": "TokenSafe-Sync/4.12.1"
315
315
  }
316
316
  if active_key:
317
317
  headers["Authorization"] = f"Bearer {active_key}"
@@ -17,7 +17,7 @@ import urllib.request
17
17
  import urllib.error
18
18
  from typing import Dict, Any, Optional, Tuple
19
19
 
20
- CURRENT_VERSION = "4.11.0"
20
+ CURRENT_VERSION = "4.12.1"
21
21
  CACHE_TTL = 86400 # 24 hours
22
22
  # When the cloud is unreachable we must NOT cache the synthesized "up to date"
23
23
  # answer for a full day — otherwise an update released right after an outage