spatial-views 0.0.0-stage → 0.2.0
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/LICENSE +21 -0
- package/README.md +245 -2
- package/dist/app/assets/abnfDiagram-S7VZAUFO-CFbb_Sz2.js +1 -0
- package/dist/app/assets/architecture-WOLXFQ4H-CsBD__5a.js +1 -0
- package/dist/app/assets/architectureDiagram-YGSQEFNW-C0ic4ib1.js +36 -0
- package/dist/app/assets/blockDiagram-APKKGZFW-BZDPbzAG.js +140 -0
- package/dist/app/assets/bpmnIcons-APHXDYXF-C0jbCElo.js +1 -0
- package/dist/app/assets/c4Diagram-KJ2TOQU5-BilBWuq5.js +38 -0
- package/dist/app/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
- package/dist/app/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
- package/dist/app/assets/chunk-6MUBBAK2-BBl-4tQr.js +2 -0
- package/dist/app/assets/chunk-AXFCVDMN-BhsttQ-k.js +62 -0
- package/dist/app/assets/chunk-BG4553SI-mWcPcFZr.js +127 -0
- package/dist/app/assets/chunk-DQASFODM-7FKe2gLt.js +10 -0
- package/dist/app/assets/chunk-DUW6YSOI-Dgx8z5s3.js +1 -0
- package/dist/app/assets/chunk-HFQBQIA3-nXrQ08BL.js +1 -0
- package/dist/app/assets/chunk-J5ZVWO5B-oDCd-gWO.js +1 -0
- package/dist/app/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
- package/dist/app/assets/chunk-KQLB2F66-swukhFmZ.js +2 -0
- package/dist/app/assets/chunk-KS47KZWR-DkDkwO82.js +1 -0
- package/dist/app/assets/chunk-LEVMRMFU-DXH6iXv3.js +1 -0
- package/dist/app/assets/chunk-M57EVK23-B-kEyOJF.js +1 -0
- package/dist/app/assets/chunk-NGNAAXSQ-DI_UYJZ4.js +136 -0
- package/dist/app/assets/chunk-OY52VR5R-DweG7qYw.js +88 -0
- package/dist/app/assets/chunk-QB3YPZ4I-DyozK3lV.js +213 -0
- package/dist/app/assets/chunk-R3KSYZAL-BEXCUN6J.js +1 -0
- package/dist/app/assets/chunk-STOXU5M4-BaTlty4O.js +72 -0
- package/dist/app/assets/chunk-TU62E6Q5-_rcUP1Fh.js +1 -0
- package/dist/app/assets/chunk-X3CZISLH-NOpCnvgE.js +1 -0
- package/dist/app/assets/chunk-X4PVCEUW-DGxTL3kB.js +1 -0
- package/dist/app/assets/chunk-XXDRQBXY-C02Gpej2.js +1 -0
- package/dist/app/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
- package/dist/app/assets/classDiagram-v2-L25IHNXF-DLEBwpvk.js +217 -0
- package/dist/app/assets/cose-bilkent-JH36ORCC-kNCXOm8k.js +1 -0
- package/dist/app/assets/cynefin-EF2NZ3EQ-6MWNLbuF.js +1 -0
- package/dist/app/assets/cynefinDiagram-L36ESFBY-CLFstukD.js +62 -0
- package/dist/app/assets/cytoscape.esm-nTrd5EVq.js +321 -0
- package/dist/app/assets/d3-scale-CaJQQYkF.js +1 -0
- package/dist/app/assets/dagre-SPEB5RXH-BaSAny1T.js +4 -0
- package/dist/app/assets/diagram-3B7GL73J-DJNlt5Sg.js +200 -0
- package/dist/app/assets/diagram-DNEMPZML-DEHeuILB.js +24 -0
- package/dist/app/assets/diagram-L3MUGCDN-ob5Ka2Xc.js +41 -0
- package/dist/app/assets/diagram-LA4NIPWU-DNESzFAc.js +24 -0
- package/dist/app/assets/diagram-MHCOC4E2-CVi9zKjG.js +3 -0
- package/dist/app/assets/diagram-XPFHEONP-DInT4C7e.js +30 -0
- package/dist/app/assets/dist-CjvHN74u.js +1 -0
- package/dist/app/assets/ebnfDiagram-UZSYDL2S-CRCZNsji.js +1 -0
- package/dist/app/assets/elk-XV6XMXQE-D4fsWI2l.js +2 -0
- package/dist/app/assets/erDiagram-EYBAPDEH-YQNM5StV.js +99 -0
- package/dist/app/assets/eventmodeling-K75KTNOO-Bev08J2F.js +1 -0
- package/dist/app/assets/flowDiagram-MALGAFMO-BhJ554DH.js +1 -0
- package/dist/app/assets/ganttDiagram-23REXITY-CkaBMYM4.js +292 -0
- package/dist/app/assets/gitGraph-VSP46ZUC-CtbZ0sIS.js +1 -0
- package/dist/app/assets/gitGraphDiagram-STJD7YCW-D15ZdQ-Z.js +106 -0
- package/dist/app/assets/graphlib-DS17s2tU.js +1 -0
- package/dist/app/assets/index-Bn6_wHEp.js +98 -0
- package/dist/app/assets/index-H-Z7MFhZ.css +1 -0
- package/dist/app/assets/info-OHQRW6UA-CfUW1XFR.js +1 -0
- package/dist/app/assets/infoDiagram-KBXO4MBG-DT7LbBRQ.js +2 -0
- package/dist/app/assets/ishikawaDiagram-M35NCXHK-CF51lhjB.js +70 -0
- package/dist/app/assets/journeyDiagram-OPLOXDXO-_36FonKk.js +139 -0
- package/dist/app/assets/kanban-definition-BZKZHSQY-tLk_OlQ-.js +89 -0
- package/dist/app/assets/katex-MEuSR36T.js +257 -0
- package/dist/app/assets/mermaid-parser.core-_3Vo8x6b.js +7 -0
- package/dist/app/assets/mermaid.core-y-x1CYxC.js +44 -0
- package/dist/app/assets/mindmap-definition-I2QAS2VK-BCI4HRX3.js +98 -0
- package/dist/app/assets/packet-JDAUHWVQ-Cco3UoaI.js +1 -0
- package/dist/app/assets/pegDiagram-FD4XPPHP-BOzSoNji.js +1 -0
- package/dist/app/assets/pie-XZMESJXO-reOB2GXn.js +1 -0
- package/dist/app/assets/pieDiagram-J4AKIIQI-PlHpwT_c.js +39 -0
- package/dist/app/assets/quadrantDiagram-XTYBLID2-CdxZ0ael.js +7 -0
- package/dist/app/assets/radar-ABXABTNO-DfCl8uV2.js +1 -0
- package/dist/app/assets/railroad-I3PHUGI6-4s14UyW1.js +1 -0
- package/dist/app/assets/railroad-abnf-LNEFI6M7-C49jJE4Y.js +1 -0
- package/dist/app/assets/railroad-ebnf-DWYD2UWJ-Bx-pcPc7.js +1 -0
- package/dist/app/assets/railroad-peg-JR7BVNR7-DjBPSCKV.js +1 -0
- package/dist/app/assets/railroadDiagram-MRQ6NCDL-wGcmIMqq.js +1 -0
- package/dist/app/assets/requirementDiagram-Y7LWUY3S-DprFI03z.js +84 -0
- package/dist/app/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- package/dist/app/assets/rough.esm-Dy-Kn_BL.js +1 -0
- package/dist/app/assets/sankeyDiagram-WGJFYUXA-DygYWLTR.js +40 -0
- package/dist/app/assets/sequenceDiagram-5NDRBG5M-BzIr2DBO.js +169 -0
- package/dist/app/assets/sizeCapture-INFHLROL-3uHXrFqA.js +1 -0
- package/dist/app/assets/stateDiagram-v2-FJ4FJNEA-MGCqKnm_.js +291 -0
- package/dist/app/assets/swimlanes-UMQ2AFYF-CIEH82Zt.js +1 -0
- package/dist/app/assets/swimlanesDiagram-OMPLPG4O-YWNJjl0g.js +8 -0
- package/dist/app/assets/timeline-definition-SEUHKTQE-BGYSqup2.js +120 -0
- package/dist/app/assets/treeView-D4JQ5SDB-B39o1sJo.js +1 -0
- package/dist/app/assets/treemap-SAJKECNS-BoGxrUH4.js +1 -0
- package/dist/app/assets/usecaseDiagram-AFA6YXN4-dy6oVOke.js +328 -0
- package/dist/app/assets/vennDiagram-NNMJR3RB-CUyuhcAk.js +34 -0
- package/dist/app/assets/wardley-7MLQ67FV-sYPAvQ06.js +1 -0
- package/dist/app/assets/wardleyDiagram-S7YFUSEH-DYtxYUHe.js +78 -0
- package/dist/app/assets/xychartDiagram-GGNKY7IX-ClR06AlB.js +7 -0
- package/dist/app/index.html +14 -0
- package/dist/cli/index.js +338 -0
- package/dist/core/api.js +420 -0
- package/dist/core/approvals.js +426 -0
- package/dist/core/context.js +259 -0
- package/dist/core/diff.js +156 -0
- package/dist/core/docs.js +140 -0
- package/dist/core/doctor.js +152 -0
- package/dist/core/doctypes.js +79 -0
- package/dist/core/edit.js +130 -0
- package/dist/core/errors.js +3 -0
- package/dist/core/flags.js +13 -0
- package/dist/core/gaps.js +119 -0
- package/dist/core/heading.js +4 -0
- package/dist/core/history.js +50 -0
- package/dist/core/home.js +345 -0
- package/dist/core/lanes.js +134 -0
- package/dist/core/launch.js +34 -0
- package/dist/core/layout.js +362 -0
- package/dist/core/links.js +68 -0
- package/dist/core/mermaid.js +175 -0
- package/dist/core/newdoc.js +66 -0
- package/dist/core/open-folder.js +30 -0
- package/dist/core/openspec.js +120 -0
- package/dist/core/paths.js +90 -0
- package/dist/core/project.js +392 -0
- package/dist/core/resolve.js +35 -0
- package/dist/core/route.js +420 -0
- package/dist/core/scan.js +514 -0
- package/dist/core/schema.js +270 -0
- package/dist/core/scope.js +126 -0
- package/dist/core/setup.js +134 -0
- package/dist/core/skills.js +181 -0
- package/dist/core/storage/config.js +74 -0
- package/dist/core/storage/events.js +54 -0
- package/dist/core/storage/folder-watch.js +147 -0
- package/dist/core/storage/folder.js +469 -0
- package/dist/core/storage/index.js +8 -0
- package/dist/core/storage/local.js +22 -0
- package/dist/core/storage/migrate.js +48 -0
- package/dist/core/storage/postgres.js +290 -0
- package/dist/core/storage/types.js +101 -0
- package/dist/core/storage.js +589 -0
- package/dist/core/suggest.js +283 -0
- package/dist/core/tree.js +254 -0
- package/dist/core/types.js +583 -0
- package/dist/core/version.js +1 -0
- package/dist/core/versions.js +245 -0
- package/dist/core/watch.js +2 -0
- package/dist/core/xml.js +68 -0
- package/dist/demo/args.js +58 -0
- package/dist/demo/browser.js +301 -0
- package/dist/demo/platform.js +147 -0
- package/dist/demo/run.js +198 -0
- package/dist/demo/steps.js +328 -0
- package/dist/mcp/project-tools.js +193 -0
- package/dist/mcp/server.js +785 -0
- package/examples/platform/README.md +33 -0
- package/examples/platform/api/package.json +8 -0
- package/examples/platform/api/src/auth-middleware.js +16 -0
- package/examples/platform/api/src/proxy.js +7 -0
- package/examples/platform/api/src/rate-limit.js +13 -0
- package/examples/platform/api/src/server.js +40 -0
- package/examples/platform/auth/package.json +9 -0
- package/examples/platform/auth/src/server.js +24 -0
- package/examples/platform/auth/src/tokens.js +19 -0
- package/examples/platform/auth/src/users.js +16 -0
- package/examples/platform/docs/api/PRD.md +10 -0
- package/examples/platform/docs/api/SDD.md +15 -0
- package/examples/platform/docs/auth/PRD.md +10 -0
- package/examples/platform/docs/auth/SDD.md +8 -0
- package/examples/platform/docs/frontend/PRD.md +18 -0
- package/examples/platform/docs/frontend/SDD.md +13 -0
- package/examples/platform/docs/pricing/PRD.md +9 -0
- package/examples/platform/docs/pricing/SDD.md +8 -0
- package/examples/platform/docs/products/PRD.md +9 -0
- package/examples/platform/docs/products/SDD.md +8 -0
- package/examples/platform/frontend/package.json +8 -0
- package/examples/platform/frontend/src/api-client.js +21 -0
- package/examples/platform/frontend/src/main.js +21 -0
- package/examples/platform/frontend/src/pages/products.js +12 -0
- package/examples/platform/frontend/src/pages/sign-in.js +14 -0
- package/examples/platform/frontend/src/session.js +11 -0
- package/examples/platform/pricing/package.json +9 -0
- package/examples/platform/pricing/src/cache.js +19 -0
- package/examples/platform/pricing/src/product-events.js +17 -0
- package/examples/platform/pricing/src/rules.js +19 -0
- package/examples/platform/pricing/src/server.js +32 -0
- package/examples/platform/products/package.json +9 -0
- package/examples/platform/products/src/catalog.js +20 -0
- package/examples/platform/products/src/events.js +11 -0
- package/examples/platform/products/src/search.js +9 -0
- package/examples/platform/products/src/server.js +31 -0
- package/migrations/postgres/001_init.sql +55 -0
- package/migrations/postgres/002_view_versions.sql +18 -0
- package/package.json +69 -4
- package/schema/approval.schema.json +173 -0
- package/schema/gap.schema.json +56 -0
- package/schema/pins.schema.json +122 -0
- package/schema/project.schema.json +93 -0
- package/schema/settings.schema.json +86 -0
- package/schema/toolbox.schema.json +206 -0
- package/schema/type.schema.json +121 -0
- package/schema/view.schema.json +240 -0
- package/skills/claude/build-gap/SKILL.md +28 -0
- package/skills/claude/check-ui/SKILL.md +40 -0
- package/skills/claude/draw-system/SKILL.md +38 -0
- package/skills/claude/gap-from-view/SKILL.md +29 -0
- package/skills/claude/post-audit/SKILL.md +58 -0
- package/skills/claude/pre-audit/SKILL.md +82 -0
- package/skills/claude/update-state/SKILL.md +56 -0
- package/skills/cursor/check-ui.mdc +40 -0
- package/skills/cursor/draw-system.mdc +38 -0
- package/skills/cursor/post-audit.mdc +44 -0
- package/skills/cursor/pre-audit.mdc +49 -0
- package/skills/cursor/update-state.mdc +45 -0
- package/skills/windsurf/spatial-views.md +212 -0
- package/toolboxes/aws.yaml +43 -0
- package/toolboxes/azure.yaml +41 -0
- package/toolboxes/cloud.yaml +95 -0
- package/toolboxes/docs.yaml +111 -0
- package/toolboxes/software.yaml +114 -0
- package/toolboxes/types/docs/gap.yaml +15 -0
- package/toolboxes/types/docs/mdd.yaml +19 -0
- package/toolboxes/types/docs/plain.yaml +7 -0
- package/toolboxes/types/docs/prd.yaml +17 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
-- Spatial Views: PostgresStore, first schema.
|
|
2
|
+
-- One row per object. `data` holds exactly what the folder file holds: the JSON
|
|
3
|
+
-- object, or the markdown text (as a JSON string) for docs and reports.
|
|
4
|
+
-- `version` counts writes, for optimistic concurrency (put with an expected version).
|
|
5
|
+
|
|
6
|
+
CREATE TABLE IF NOT EXISTS projects (
|
|
7
|
+
id text PRIMARY KEY,
|
|
8
|
+
project_id text NOT NULL,
|
|
9
|
+
data jsonb NOT NULL,
|
|
10
|
+
version integer NOT NULL DEFAULT 1,
|
|
11
|
+
updated_at timestamptz NOT NULL DEFAULT now(),
|
|
12
|
+
updated_by text,
|
|
13
|
+
CHECK (project_id = id)
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
DO $$
|
|
17
|
+
DECLARE t text;
|
|
18
|
+
BEGIN
|
|
19
|
+
FOREACH t IN ARRAY ARRAY['views', 'gaps', 'docs', 'doc_versions', 'approvals', 'pins', 'settings', 'toolboxes', 'reports'] LOOP
|
|
20
|
+
EXECUTE format(
|
|
21
|
+
'CREATE TABLE IF NOT EXISTS %I (
|
|
22
|
+
id text NOT NULL,
|
|
23
|
+
project_id text NOT NULL,
|
|
24
|
+
data jsonb NOT NULL,
|
|
25
|
+
version integer NOT NULL DEFAULT 1,
|
|
26
|
+
updated_at timestamptz NOT NULL DEFAULT now(),
|
|
27
|
+
updated_by text,
|
|
28
|
+
PRIMARY KEY (project_id, id)
|
|
29
|
+
)', t);
|
|
30
|
+
END LOOP;
|
|
31
|
+
END $$;
|
|
32
|
+
|
|
33
|
+
-- Live updates: every write is announced on the spatial_views channel, so every
|
|
34
|
+
-- canvas and MCP server on the same database sees it (LISTEN spatial_views).
|
|
35
|
+
CREATE OR REPLACE FUNCTION spatial_views_notify() RETURNS trigger AS $$
|
|
36
|
+
DECLARE r record;
|
|
37
|
+
BEGIN
|
|
38
|
+
IF TG_OP = 'DELETE' THEN r := OLD; ELSE r := NEW; END IF;
|
|
39
|
+
PERFORM pg_notify('spatial_views', json_build_object(
|
|
40
|
+
'table', TG_TABLE_NAME,
|
|
41
|
+
'project', r.project_id,
|
|
42
|
+
'id', r.id,
|
|
43
|
+
'removed', TG_OP = 'DELETE'
|
|
44
|
+
)::text);
|
|
45
|
+
RETURN NULL;
|
|
46
|
+
END $$ LANGUAGE plpgsql;
|
|
47
|
+
|
|
48
|
+
DO $$
|
|
49
|
+
DECLARE t text;
|
|
50
|
+
BEGIN
|
|
51
|
+
FOREACH t IN ARRAY ARRAY['projects', 'views', 'gaps', 'docs', 'doc_versions', 'approvals', 'pins', 'settings', 'toolboxes', 'reports'] LOOP
|
|
52
|
+
EXECUTE format('DROP TRIGGER IF EXISTS %I ON %I', t || '_notify', t);
|
|
53
|
+
EXECUTE format('CREATE TRIGGER %I AFTER INSERT OR UPDATE OR DELETE ON %I FOR EACH ROW EXECUTE FUNCTION spatial_views_notify()', t || '_notify', t);
|
|
54
|
+
END LOOP;
|
|
55
|
+
END $$;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
-- Spatial Views: every saved version of a View (Docs keep theirs in doc_versions).
|
|
2
|
+
-- One row per version: id is `<view id>@<n>`, data is {n, at, by, note?, name?, restored_from?, data}.
|
|
3
|
+
-- Versions are only added (and named); restore writes a new one, nothing is deleted
|
|
4
|
+
-- unless the project caps how many unnamed versions a View keeps.
|
|
5
|
+
|
|
6
|
+
CREATE TABLE IF NOT EXISTS view_versions (
|
|
7
|
+
id text NOT NULL,
|
|
8
|
+
project_id text NOT NULL,
|
|
9
|
+
data jsonb NOT NULL,
|
|
10
|
+
version integer NOT NULL DEFAULT 1,
|
|
11
|
+
updated_at timestamptz NOT NULL DEFAULT now(),
|
|
12
|
+
updated_by text,
|
|
13
|
+
PRIMARY KEY (project_id, id)
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
DROP TRIGGER IF EXISTS view_versions_notify ON view_versions;
|
|
17
|
+
CREATE TRIGGER view_versions_notify AFTER INSERT OR UPDATE OR DELETE ON view_versions
|
|
18
|
+
FOR EACH ROW EXECUTE FUNCTION spatial_views_notify();
|
package/package.json
CHANGED
|
@@ -1,6 +1,71 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spatial-views",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Spatial Views: the picture for spec-driven development. A React Flow canvas and an MCP server for Cursor and Claude Code.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "NODEMAX LIMITED",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/Hotchilli-Cloud/spatial-views.git"
|
|
11
|
+
},
|
|
12
|
+
"bin": {
|
|
13
|
+
"spatial-views": "dist/cli/index.js"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"schema",
|
|
18
|
+
"skills",
|
|
19
|
+
"toolboxes",
|
|
20
|
+
"migrations",
|
|
21
|
+
"examples/platform"
|
|
22
|
+
],
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=20"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"dev": "vite",
|
|
28
|
+
"build": "vite build && tsc -p tsconfig.node.json",
|
|
29
|
+
"start": "node dist/cli/index.js",
|
|
30
|
+
"mcp": "node dist/cli/index.js mcp",
|
|
31
|
+
"schema": "tsc -p tsconfig.node.json && node dist/cli/index.js schema --out schema",
|
|
32
|
+
"skills": "tsc -p tsconfig.node.json && node dist/cli/index.js skills",
|
|
33
|
+
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.node.json --noEmit",
|
|
34
|
+
"test": "vitest run",
|
|
35
|
+
"test:ui": "npm run build && playwright test",
|
|
36
|
+
"prepack": "npm run build"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
40
|
+
"@xyflow/react": "^13.0.2",
|
|
41
|
+
"dompurify": "^3.4.18",
|
|
42
|
+
"elkjs": "^0.12.1",
|
|
43
|
+
"lucide-react": "^1.77.0",
|
|
44
|
+
"marked": "^18.2.1",
|
|
45
|
+
"mermaid": "^12.3.0",
|
|
46
|
+
"pg": "^8.23.1",
|
|
47
|
+
"react": "^19.3.1",
|
|
48
|
+
"react-dom": "^19.3.1",
|
|
49
|
+
"yaml": "^2.9.1",
|
|
50
|
+
"zod": "^4.6.7"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"playwright": ">=1.40"
|
|
54
|
+
},
|
|
55
|
+
"peerDependenciesMeta": {
|
|
56
|
+
"playwright": {
|
|
57
|
+
"optional": true
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@playwright/test": "^1.61.1",
|
|
62
|
+
"@types/node": "^26.6.6",
|
|
63
|
+
"@types/pg": "^8.23.1",
|
|
64
|
+
"@types/react": "^19.3.0",
|
|
65
|
+
"@types/react-dom": "^19.3.0",
|
|
66
|
+
"@vitejs/plugin-react": "^6.3.0",
|
|
67
|
+
"typescript": "^7.0.2",
|
|
68
|
+
"vite": "^8.3.8",
|
|
69
|
+
"vitest": "^4.1.12"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/Hotchilli-Cloud/spatial-views/main/schema/approval.schema.json",
|
|
4
|
+
"title": "Spatial Views: an Approval: a pending AI draft of one View or Doc, with its revisions (<data>/approvals/<id>.json)",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"id": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"pattern": "^[A-Za-z0-9_-]+$"
|
|
10
|
+
},
|
|
11
|
+
"n": {
|
|
12
|
+
"type": "integer",
|
|
13
|
+
"exclusiveMinimum": 0,
|
|
14
|
+
"maximum": 9007199254740991
|
|
15
|
+
},
|
|
16
|
+
"title": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"minLength": 1
|
|
19
|
+
},
|
|
20
|
+
"author": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"minLength": 1
|
|
23
|
+
},
|
|
24
|
+
"created": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"status": {
|
|
28
|
+
"default": "pending",
|
|
29
|
+
"type": "string",
|
|
30
|
+
"enum": [
|
|
31
|
+
"pending",
|
|
32
|
+
"approved",
|
|
33
|
+
"denied"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"session": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"decided": {
|
|
40
|
+
"type": "string"
|
|
41
|
+
},
|
|
42
|
+
"note": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"base_version": {
|
|
46
|
+
"anyOf": [
|
|
47
|
+
{
|
|
48
|
+
"type": "integer",
|
|
49
|
+
"exclusiveMinimum": 0,
|
|
50
|
+
"maximum": 9007199254740991
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "null"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"revisions": {
|
|
58
|
+
"default": [],
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"properties": {
|
|
63
|
+
"n": {
|
|
64
|
+
"type": "integer",
|
|
65
|
+
"exclusiveMinimum": 0,
|
|
66
|
+
"maximum": 9007199254740991
|
|
67
|
+
},
|
|
68
|
+
"at": {
|
|
69
|
+
"type": "string"
|
|
70
|
+
},
|
|
71
|
+
"by": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"minLength": 1
|
|
74
|
+
},
|
|
75
|
+
"summary": {
|
|
76
|
+
"type": "string"
|
|
77
|
+
},
|
|
78
|
+
"tool": {
|
|
79
|
+
"type": "string"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"required": [
|
|
83
|
+
"n",
|
|
84
|
+
"at",
|
|
85
|
+
"by",
|
|
86
|
+
"summary"
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"changes": {
|
|
91
|
+
"default": [],
|
|
92
|
+
"type": "array",
|
|
93
|
+
"items": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"properties": {
|
|
96
|
+
"id": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"pattern": "^[A-Za-z0-9_-]+$"
|
|
99
|
+
},
|
|
100
|
+
"target": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"enum": [
|
|
103
|
+
"view",
|
|
104
|
+
"gap",
|
|
105
|
+
"pins",
|
|
106
|
+
"doc"
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"ref": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"minLength": 1
|
|
112
|
+
},
|
|
113
|
+
"op": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"enum": [
|
|
116
|
+
"create",
|
|
117
|
+
"update",
|
|
118
|
+
"delete"
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
"before": {
|
|
122
|
+
"anyOf": [
|
|
123
|
+
{},
|
|
124
|
+
{
|
|
125
|
+
"type": "null"
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"after": {
|
|
130
|
+
"anyOf": [
|
|
131
|
+
{},
|
|
132
|
+
{
|
|
133
|
+
"type": "null"
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
"tools": {
|
|
138
|
+
"default": [],
|
|
139
|
+
"type": "array",
|
|
140
|
+
"items": {
|
|
141
|
+
"type": "string"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"at": {
|
|
145
|
+
"type": "string"
|
|
146
|
+
},
|
|
147
|
+
"decision": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"enum": [
|
|
150
|
+
"approved",
|
|
151
|
+
"denied"
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"required": [
|
|
156
|
+
"id",
|
|
157
|
+
"target",
|
|
158
|
+
"ref",
|
|
159
|
+
"op",
|
|
160
|
+
"before",
|
|
161
|
+
"after",
|
|
162
|
+
"at"
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"required": [
|
|
168
|
+
"id",
|
|
169
|
+
"title",
|
|
170
|
+
"author",
|
|
171
|
+
"created"
|
|
172
|
+
]
|
|
173
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/Hotchilli-Cloud/spatial-views/main/schema/gap.schema.json",
|
|
4
|
+
"title": "Spatial Views: a Gap (.spatial/gaps/<id>.json)",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"id": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"pattern": "^[A-Za-z0-9_-]+$"
|
|
10
|
+
},
|
|
11
|
+
"title": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"minLength": 1
|
|
14
|
+
},
|
|
15
|
+
"intent": {
|
|
16
|
+
"default": "",
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"view_id": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"minLength": 1
|
|
22
|
+
},
|
|
23
|
+
"module_ids": {
|
|
24
|
+
"default": [],
|
|
25
|
+
"type": "array",
|
|
26
|
+
"items": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"state": {
|
|
32
|
+
"default": "open",
|
|
33
|
+
"type": "string",
|
|
34
|
+
"enum": [
|
|
35
|
+
"open",
|
|
36
|
+
"building",
|
|
37
|
+
"done",
|
|
38
|
+
"cancelled"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"openspec_change": {
|
|
42
|
+
"type": "string"
|
|
43
|
+
},
|
|
44
|
+
"milestone": {
|
|
45
|
+
"type": "string"
|
|
46
|
+
},
|
|
47
|
+
"draft": {
|
|
48
|
+
"type": "boolean"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"required": [
|
|
52
|
+
"id",
|
|
53
|
+
"title",
|
|
54
|
+
"view_id"
|
|
55
|
+
]
|
|
56
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/Hotchilli-Cloud/spatial-views/main/schema/pins.schema.json",
|
|
4
|
+
"title": "Spatial Views: the pin map (.spatial/pins.json)",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"sources": {
|
|
8
|
+
"default": [],
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"minLength": 1
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"pins": {
|
|
16
|
+
"default": [],
|
|
17
|
+
"type": "array",
|
|
18
|
+
"items": {
|
|
19
|
+
"oneOf": [
|
|
20
|
+
{
|
|
21
|
+
"type": "object",
|
|
22
|
+
"properties": {
|
|
23
|
+
"path": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 1
|
|
26
|
+
},
|
|
27
|
+
"kind": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"const": "view"
|
|
30
|
+
},
|
|
31
|
+
"view_id": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"minLength": 1
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"required": [
|
|
37
|
+
"path",
|
|
38
|
+
"kind",
|
|
39
|
+
"view_id"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"type": "object",
|
|
44
|
+
"properties": {
|
|
45
|
+
"path": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"minLength": 1
|
|
48
|
+
},
|
|
49
|
+
"kind": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"const": "module"
|
|
52
|
+
},
|
|
53
|
+
"view_id": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"minLength": 1
|
|
56
|
+
},
|
|
57
|
+
"module_id": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"minLength": 1
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"required": [
|
|
63
|
+
"path",
|
|
64
|
+
"kind",
|
|
65
|
+
"view_id",
|
|
66
|
+
"module_id"
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "object",
|
|
71
|
+
"properties": {
|
|
72
|
+
"path": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"minLength": 1
|
|
75
|
+
},
|
|
76
|
+
"kind": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"const": "feature"
|
|
79
|
+
},
|
|
80
|
+
"view_id": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"minLength": 1
|
|
83
|
+
},
|
|
84
|
+
"feature_id": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"minLength": 1
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"required": [
|
|
90
|
+
"path",
|
|
91
|
+
"kind",
|
|
92
|
+
"view_id",
|
|
93
|
+
"feature_id"
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"type": "object",
|
|
98
|
+
"properties": {
|
|
99
|
+
"path": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"minLength": 1
|
|
102
|
+
},
|
|
103
|
+
"kind": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"const": "gap"
|
|
106
|
+
},
|
|
107
|
+
"gap_id": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"minLength": 1
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"required": [
|
|
113
|
+
"path",
|
|
114
|
+
"kind",
|
|
115
|
+
"gap_id"
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/Hotchilli-Cloud/spatial-views/main/schema/project.schema.json",
|
|
4
|
+
"title": "Spatial Views: a project and its sources (~/SpatialViews/projects/<slug>/project.json)",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"name": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"minLength": 1
|
|
10
|
+
},
|
|
11
|
+
"slug": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"created": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"root_view_id": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"pattern": "^[A-Za-z0-9_-]+$"
|
|
20
|
+
},
|
|
21
|
+
"sources": {
|
|
22
|
+
"default": [],
|
|
23
|
+
"type": "array",
|
|
24
|
+
"items": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"properties": {
|
|
27
|
+
"id": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"pattern": "^[A-Za-z0-9_-]+$"
|
|
30
|
+
},
|
|
31
|
+
"name": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
},
|
|
34
|
+
"kind": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"enum": [
|
|
37
|
+
"repo",
|
|
38
|
+
"docs",
|
|
39
|
+
"diagrams"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"path": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"minLength": 1
|
|
45
|
+
},
|
|
46
|
+
"added": {
|
|
47
|
+
"type": "string"
|
|
48
|
+
},
|
|
49
|
+
"last_audit_sha": {
|
|
50
|
+
"type": "string"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"required": [
|
|
54
|
+
"id",
|
|
55
|
+
"kind",
|
|
56
|
+
"path",
|
|
57
|
+
"added"
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"audits": {
|
|
62
|
+
"default": [],
|
|
63
|
+
"type": "array",
|
|
64
|
+
"items": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"properties": {
|
|
67
|
+
"kind": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"enum": [
|
|
70
|
+
"pre-audit",
|
|
71
|
+
"update-state",
|
|
72
|
+
"post-audit"
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
"at": {
|
|
76
|
+
"type": "string"
|
|
77
|
+
},
|
|
78
|
+
"report": {
|
|
79
|
+
"type": "string"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"required": [
|
|
83
|
+
"kind",
|
|
84
|
+
"at"
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"required": [
|
|
90
|
+
"name",
|
|
91
|
+
"created"
|
|
92
|
+
]
|
|
93
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/Hotchilli-Cloud/spatial-views/main/schema/settings.schema.json",
|
|
4
|
+
"title": "Spatial Views: a project's settings (<data>/settings.json)",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"ai_changes": {
|
|
8
|
+
"default": "approval",
|
|
9
|
+
"type": "string",
|
|
10
|
+
"enum": [
|
|
11
|
+
"approval",
|
|
12
|
+
"direct"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"follow": {
|
|
16
|
+
"default": true,
|
|
17
|
+
"type": "boolean"
|
|
18
|
+
},
|
|
19
|
+
"disabled_toolboxes": {
|
|
20
|
+
"default": [],
|
|
21
|
+
"type": "array",
|
|
22
|
+
"items": {
|
|
23
|
+
"type": "string"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"keep_versions": {
|
|
27
|
+
"anyOf": [
|
|
28
|
+
{
|
|
29
|
+
"type": "integer",
|
|
30
|
+
"exclusiveMinimum": 0,
|
|
31
|
+
"maximum": 9007199254740991
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"type": "null"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"spec_format": {
|
|
39
|
+
"default": "spatial-views",
|
|
40
|
+
"type": "string",
|
|
41
|
+
"enum": [
|
|
42
|
+
"spatial-views",
|
|
43
|
+
"openspec"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"tree": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"properties": {
|
|
49
|
+
"folders": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"items": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"properties": {
|
|
54
|
+
"id": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"minLength": 1
|
|
57
|
+
},
|
|
58
|
+
"name": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"minLength": 1,
|
|
61
|
+
"maxLength": 60
|
|
62
|
+
},
|
|
63
|
+
"parent": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"minLength": 1
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"required": [
|
|
69
|
+
"id",
|
|
70
|
+
"name"
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"place": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"propertyNames": {
|
|
77
|
+
"type": "string"
|
|
78
|
+
},
|
|
79
|
+
"additionalProperties": {
|
|
80
|
+
"type": "string"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|