@notis_ai/cli 0.2.0-beta.57.1 → 0.2.0-beta.76.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.
@@ -0,0 +1,50 @@
1
+ {
2
+ "javascript": [
3
+ {
4
+ "pattern": "window\\.__NOTIS_RUNTIME__",
5
+ "message": "window.__NOTIS_RUNTIME__ is forbidden; rely on the portal-injected NotisProvider runtime."
6
+ },
7
+ {
8
+ "pattern": "document\\.(?:body|head|documentElement)\\b",
9
+ "message": "document.body, document.head, and document.documentElement are forbidden; apps must stay inside the app surface."
10
+ },
11
+ {
12
+ "pattern": "document\\.(?:querySelector|querySelectorAll|getElementById|getElementsByClassName|getElementsByTagName)\\s*\\(\\s*(['\"`])[^\\n]*\\[data-notis-",
13
+ "message": "querying portal-owned [data-notis-*] hooks is forbidden."
14
+ },
15
+ {
16
+ "pattern": "createPortal\\s*\\(",
17
+ "message": "React portals are unsupported in Notis apps until a shadow-safe overlay contract exists."
18
+ },
19
+ {
20
+ "pattern": "@radix-ui/react-portal",
21
+ "message": "@radix-ui/react-portal is unsupported in Notis apps until a shadow-safe overlay contract exists."
22
+ },
23
+ {
24
+ "pattern": "PortalPrimitive",
25
+ "message": "Radix portal primitives are unsupported in Notis apps until a shadow-safe overlay contract exists."
26
+ }
27
+ ],
28
+ "css": [
29
+ {
30
+ "pattern": ":root\\b",
31
+ "message": ":root selectors are forbidden; styles must stay inside the app surface."
32
+ },
33
+ {
34
+ "pattern": "(^|[\\s,>+~])html(?=[\\s.#[:{>+~,]|$)",
35
+ "message": "html selectors are forbidden; styles must stay inside the app surface."
36
+ },
37
+ {
38
+ "pattern": "(^|[\\s,>+~])body(?=[\\s.#[:{>+~,]|$)",
39
+ "message": "body selectors are forbidden; styles must stay inside the app surface."
40
+ },
41
+ {
42
+ "pattern": "\\[data-notis-(?!app-root\\b)[^\\]]*\\]",
43
+ "message": "portal-owned [data-notis-*] selectors are forbidden. Use [data-notis-app-root] only for the app surface itself."
44
+ },
45
+ {
46
+ "pattern": "\\[data-sidebar(?:=[^\\]]+)?\\]",
47
+ "message": "portal sidebar selectors are forbidden."
48
+ }
49
+ ]
50
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notis_ai/cli",
3
- "version": "0.2.0-beta.57.1",
3
+ "version": "0.2.0-beta.76.1",
4
4
  "description": "Agent-first Notis CLI for apps and generic tool execution",
5
5
  "type": "module",
6
6
  "bin": {
@@ -8,6 +8,7 @@
8
8
  },
9
9
  "files": [
10
10
  "bin/",
11
+ "config/",
11
12
  "dist/",
12
13
  "src/",
13
14
  "skills/",
@@ -4,10 +4,30 @@ import { fileURLToPath } from 'node:url';
4
4
 
5
5
  import { usageError } from './errors.js';
6
6
 
7
- const RULES_PATH = resolve(
8
- dirname(fileURLToPath(import.meta.url)),
9
- '../../../../server/config/notis_app_boundary_rules.json',
10
- );
7
+ const moduleDir = dirname(fileURLToPath(import.meta.url));
8
+
9
+ // Candidate locations for the app boundary rules, in priority order:
10
+ // 1. The monorepo server source (always fresh during local development).
11
+ // 2. The copy bundled into the published package at build time (see
12
+ // scripts/copy-boundary-rules.js + package.json "files": config/). When the
13
+ // CLI is installed via npm, candidate 1 escapes the package and is absent,
14
+ // so the bundled copy is used. This is what was missing before: the package
15
+ // shipped only the escaping path and crashed with ENOENT on any command.
16
+ export const RULES_PATH_CANDIDATES = [
17
+ resolve(moduleDir, '../../../../server/config/notis_app_boundary_rules.json'),
18
+ resolve(moduleDir, '../../config/notis_app_boundary_rules.json'),
19
+ ];
20
+
21
+ export function resolveRulesPath() {
22
+ for (const candidate of RULES_PATH_CANDIDATES) {
23
+ if (existsSync(candidate)) {
24
+ return candidate;
25
+ }
26
+ }
27
+ // Fall back to the bundled-copy path so any error message points inside the
28
+ // package rather than at an escaping monorepo path.
29
+ return RULES_PATH_CANDIDATES[RULES_PATH_CANDIDATES.length - 1];
30
+ }
11
31
 
12
32
  const SOURCE_FILE_EXTENSIONS = new Set(['.js', '.jsx', '.ts', '.tsx', '.css', '.scss', '.sass', '.pcss']);
13
33
  const IGNORED_SOURCE_DIRS = new Set([
@@ -21,7 +41,7 @@ const IGNORED_SOURCE_DIRS = new Set([
21
41
  ]);
22
42
 
23
43
  function loadBoundaryRules() {
24
- return JSON.parse(readFileSync(RULES_PATH, 'utf-8'));
44
+ return JSON.parse(readFileSync(resolveRulesPath(), 'utf-8'));
25
45
  }
26
46
 
27
47
  function compileRules(entries) {