@symbo.ls/mcp 1.0.0 → 1.0.5

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,217 @@
1
+ # Project Setup — LLM Instructions
2
+
3
+ These are step-by-step instructions for LLMs to follow when helping a user create, configure, and manage a Symbols project using the CLI.
4
+
5
+ ---
6
+
7
+ ## Step 1: Check CLI Installation
8
+
9
+ Before anything else, verify the CLI is installed:
10
+
11
+ ```bash
12
+ smbls --help
13
+ ```
14
+
15
+ If the command is not found, install it globally:
16
+
17
+ ```bash
18
+ npm i -g @symbo.ls/cli
19
+ ```
20
+
21
+ ---
22
+
23
+ ## Step 2: Check Authentication
24
+
25
+ Run the following to check if the user is signed in:
26
+
27
+ ```bash
28
+ smbls login --check
29
+ ```
30
+
31
+ If the user is **not signed in**, prompt them:
32
+
33
+ > You're not signed in to Symbols. Would you like to sign in now? Signing in unlocks collaboration, platform syncing, remote preview, and project management.
34
+
35
+ If they agree, run:
36
+
37
+ ```bash
38
+ smbls login
39
+ ```
40
+
41
+ If they have multiple environments/servers configured, they can list or switch:
42
+
43
+ ```bash
44
+ smbls servers
45
+ smbls servers --select
46
+ ```
47
+
48
+ ---
49
+
50
+ ## Step 3: Create a New Project
51
+
52
+ Ask the user for a project name. Then decide between local-only or platform-linked creation.
53
+
54
+ ### Option A: Local-only project (fastest)
55
+
56
+ ```bash
57
+ smbls create <project-name>
58
+ cd <project-name>
59
+ npm start
60
+ ```
61
+
62
+ This scaffolds a DOMQL starter project with dependencies installed.
63
+
64
+ ### Option B: Platform-linked project (unlocks collaboration + remote preview)
65
+
66
+ Requires authentication (Step 2). Creates both a local project and a linked platform project:
67
+
68
+ ```bash
69
+ smbls project create <project-name> --create-new
70
+ cd <project-name>
71
+ npm start
72
+ ```
73
+
74
+ This writes:
75
+ - `symbols.json` — project key and config
76
+ - `.symbols/config.json` — platform link (`projectKey`, `projectId`, `apiBaseUrl`, `branch`)
77
+
78
+ ### CLI Options
79
+
80
+ **Package manager:**
81
+
82
+ ```bash
83
+ smbls project create <project-name> --package-manager npm
84
+ smbls project create <project-name> --package-manager yarn
85
+ ```
86
+
87
+ **Skip dependency install:**
88
+
89
+ ```bash
90
+ smbls project create <project-name> --no-dependencies
91
+ cd <project-name>
92
+ npm i
93
+ ```
94
+
95
+ ---
96
+
97
+ ## Step 4: Link an Existing Platform Project (optional)
98
+
99
+ If the user already has a platform project and wants to link it to a local folder:
100
+
101
+ ```bash
102
+ # Interactive picker
103
+ smbls project link .
104
+
105
+ # Non-interactive
106
+ smbls project link . --key <project-key>.symbo.ls
107
+ smbls project link . --id <projectId>
108
+ ```
109
+
110
+ ---
111
+
112
+ ## Step 5: Inform About Sync & Collaboration
113
+
114
+ After the project is created, explain the core sync commands:
115
+
116
+ > Your project supports syncing with the Symbols platform. Here's what's available:
117
+ >
118
+ > - **`smbls push`** — Upload local changes to the platform
119
+ > - **`smbls fetch --update`** — Download the latest platform snapshot into local files
120
+ > - **`smbls sync`** — Two-way sync with interactive conflict handling
121
+ > - **`smbls collab`** — Watch mode for live collaboration (run in a separate terminal)
122
+
123
+ ### File asset management:
124
+
125
+ ```bash
126
+ smbls files list # List project files
127
+ smbls files upload # Upload files
128
+ smbls files download # Download files
129
+ smbls files rm # Remove files
130
+ ```
131
+
132
+ ---
133
+
134
+ ## Step 6: Ask About Pushing First Changes
135
+
136
+ After making initial edits or scaffolding, ask the user:
137
+
138
+ > Would you like to push your initial changes to the Symbols platform now?
139
+
140
+ If **yes**, run:
141
+
142
+ ```bash
143
+ smbls push
144
+ ```
145
+
146
+ Then ask:
147
+
148
+ > Would you like me to automatically push changes to the platform after each edit I make?
149
+
150
+ If they agree, run `smbls push` after every file edit session. If they decline, only push when explicitly asked.
151
+
152
+ ---
153
+
154
+ ## Step 7: Show Remote Preview Links
155
+
156
+ After a successful push (or if the project is already linked to the platform), provide the user with their project links using the following patterns:
157
+
158
+ ### Canvas / Editor Link
159
+
160
+ ```
161
+ https://<app>.<user>.preview.symbo.ls/
162
+ ```
163
+
164
+ ### With environment (dev, stage, etc.)
165
+
166
+ ```
167
+ https://<env>.<app>.<user>.preview.symbo.ls/
168
+ ```
169
+
170
+ ### With subpath
171
+
172
+ ```
173
+ https://<app>.<user>.preview.symbo.ls/<subpath>
174
+ ```
175
+
176
+ Where:
177
+ - `<user>` — the namespace owner identifier (their Symbols username or org)
178
+ - `<app>` — the application/project identifier
179
+ - `<env>` — optional deployment environment (`dev`, `stage`, etc.)
180
+ - `<subpath>` — optional path forwarded to the app
181
+
182
+ **Example:** For user `nikoloza` with project `my-app`:
183
+
184
+ ```
185
+ Preview: https://my-app.nikoloza.preview.symbo.ls/
186
+ Dev env: https://dev.my-app.nikoloza.preview.symbo.ls/
187
+ ```
188
+
189
+ Tell the user:
190
+
191
+ > Your project is live! Here are your links:
192
+ > - **Preview:** https://<app>.<user>.preview.symbo.ls/
193
+ > - **Canvas:** Available on the Symbols platform at your project page
194
+ >
195
+ > These update automatically when you push changes.
196
+
197
+ ---
198
+
199
+ ## Troubleshooting
200
+
201
+ - **Auth required / access denied** — run `smbls login` again
202
+ - **Missing project key** — ensure `symbols.json` has a `key` or link via `smbls project link .`
203
+ - **More detail needed** — add `--verbose` to commands that support it
204
+ - **Shell auto-completion** — run `smbls completion zsh --install` or `smbls completion bash --install`
205
+
206
+ ---
207
+
208
+ ## Summary of LLM Behavior
209
+
210
+ 1. Ensure CLI is installed
211
+ 2. Check sign-in status; prompt login if needed
212
+ 3. Create the project (local-only or platform-linked based on user preference)
213
+ 4. Start the dev server with `npm start`
214
+ 5. Explain push, fetch, sync, and collab capabilities
215
+ 6. Ask if the user wants to push initial changes
216
+ 7. Ask if the user wants auto-push after each edit
217
+ 8. Display preview and canvas links using the host pattern
@@ -0,0 +1,144 @@
1
+ # Redirect Pattern --- Quick Documentation
2
+
3
+ ## Purpose
4
+
5
+ Edge redirect rule mapping path-based preview routes into host-based
6
+ preview domains.
7
+
8
+ Transforms:
9
+
10
+ /:user/:app/(optional subpath)?env=ENV
11
+
12
+ into:
13
+
14
+ https://{env.}app.user.preview.symbo.ls/(optional subpath)
15
+
16
+ ---
17
+
18
+ ## Route Contract
19
+
20
+ ### Input Path Structure
21
+
22
+ /:user/:app/:subpath*
23
+
24
+ Segment Required Description
25
+
26
+ ---
27
+
28
+ `user` yes Namespace owner identifier
29
+ `app` yes Application identifier
30
+ `subpath` no Forwarded unchanged
31
+
32
+ Requests with fewer than two segments are passed through without
33
+ modification.
34
+
35
+ ---
36
+
37
+ ### Query Parameters
38
+
39
+ Param Behavior
40
+
41
+ ---
42
+
43
+ `env` Optional deployment environment selector
44
+ others Forwarded unchanged
45
+
46
+ `env` is removed from query before redirect.
47
+
48
+ ---
49
+
50
+ ## Host Resolution
51
+
52
+ ### Without Environment
53
+
54
+ {app}.{user}.preview.symbo.ls
55
+
56
+ ### With Environment
57
+
58
+ {env}.{app}.{user}.preview.symbo.ls
59
+
60
+ ---
61
+
62
+ ## Redirect Construction
63
+
64
+ Final URL:
65
+
66
+ https://TARGET_HOST/
67
+ + subpath
68
+ + remaining query string
69
+
70
+ Status code:
71
+
72
+ 302 Temporary Redirect
73
+
74
+ ---
75
+
76
+ ## Processing Flow
77
+
78
+ 1. Parse URL.
79
+ 2. Split pathname segments.
80
+ 3. Validate segment count ≥ 2.
81
+ 4. Extract:
82
+ - user
83
+ - app
84
+ - subpath
85
+ 5. Read `env`.
86
+ 6. Remove `env` from query.
87
+ 7. Construct target host.
88
+ 8. Assemble redirect URL.
89
+ 9. Issue redirect response.
90
+
91
+ ---
92
+
93
+ ## Examples
94
+
95
+ ### Basic
96
+
97
+ Input:
98
+ https://domain/x/alfa
99
+
100
+ Output:
101
+ https://alfa.x.preview.symbo.ls/
102
+
103
+ ### With Subpath
104
+
105
+ Input:
106
+ https://domain/x/alfa/api/v1
107
+
108
+ Output:
109
+ https://alfa.x.preview.symbo.ls/api/v1
110
+
111
+ ### With Environment
112
+
113
+ Input:
114
+ https://domain/x/alfa/editor?env=dev
115
+
116
+ Output:
117
+ https://dev.alfa.x.preview.symbo.ls/editor
118
+
119
+ ### With Additional Query
120
+
121
+ Input:
122
+ https://domain/x/alfa/view?id=4&env=stage
123
+
124
+ Output:
125
+ https://stage.alfa.x.preview.symbo.ls/view?id=4
126
+
127
+ ---
128
+
129
+ ## Edge Considerations
130
+
131
+ - No validation of segment encoding
132
+ - No sanitization of host fragments
133
+ - Relies on client redirect follow
134
+ - Temporary status avoids cache locking
135
+ - Does not normalize trailing slash
136
+ - Does not preserve fragments (`#hash`)
137
+ - Assumes HTTPS termination upstream
138
+
139
+ ---
140
+
141
+ ## Intended Use
142
+
143
+ Preview routing layer for multi-tenant namespace virtualization
144
+ resolving path entrypoints into isolated host environments.
@@ -0,0 +1,110 @@
1
+ # SEO Metadata
2
+
3
+ DOMQL provides comprehensive SEO metadata support through a declarative `metadata` object. All SEO, social, structured data, and platform-specific properties are configured in a single, unified, type-safe structure.
4
+
5
+ The system automatically:
6
+
7
+ - Generates correct `<title>`, `<meta>`, and `<link>` elements
8
+ - Expands array values into multiple tags
9
+ - Handles namespace prefixes (`og:`, `twitter:`, `article:`, `product:`, `DC:`, `itemprop:`, `http-equiv:`)
10
+ - Outputs valid HTML head markup
11
+
12
+ ---
13
+
14
+ # Complete Unified Example
15
+
16
+ ```js
17
+ export default {
18
+ metadata: {
19
+ // Basic metadata
20
+ title: "My Awesome Website",
21
+ description: "This is an awesome website with great content",
22
+ keywords: "awesome, website, content",
23
+ author: "John Doe",
24
+ robots: "index, follow",
25
+ canonical: "https://example.com/page",
26
+
27
+ // Open Graph
28
+ "og:title": "My Awesome Website",
29
+ "og:description": "This is an awesome website with great content",
30
+ "og:type": "website",
31
+ "og:url": "https://example.com",
32
+ "og:image": [
33
+ "https://example.com/image1.jpg",
34
+ "https://example.com/image2.jpg",
35
+ ],
36
+ "og:site_name": "Example Site",
37
+ "og:locale": "en_US",
38
+
39
+ // Twitter Cards
40
+ "twitter:card": "summary_large_image",
41
+ "twitter:site": "@example",
42
+ "twitter:creator": "@johndoe",
43
+ "twitter:title": "My Awesome Website",
44
+ "twitter:description": "This is an awesome website with great content",
45
+ "twitter:image": "https://example.com/twitter-image.jpg",
46
+
47
+ // Article metadata
48
+ "article:published_time": "2023-01-01T00:00:00Z",
49
+ "article:modified_time": "2023-01-02T00:00:00Z",
50
+ "article:author": ["John Doe", "Jane Smith"],
51
+ "article:section": "Technology",
52
+ "article:tag": ["web", "development", "javascript"],
53
+
54
+ // Product metadata
55
+ "product:price:amount": "29.99",
56
+ "product:price:currency": "USD",
57
+ "product:availability": "in stock",
58
+ "product:condition": "new",
59
+ "product:brand": "Example Brand",
60
+ "product:category": "Electronics",
61
+
62
+ // Dublin Core
63
+ "DC:title": "My Awesome Website",
64
+ "DC:creator": ["John Doe", "Jane Smith"],
65
+ "DC:subject": ["web development", "javascript"],
66
+ "DC:description": "This is an awesome website with great content",
67
+ "DC:publisher": "Example Publisher",
68
+ "DC:date": "2023-01-01",
69
+ "DC:type": "Text",
70
+ "DC:language": "en",
71
+
72
+ // Mobile app metadata
73
+ "apple:mobile-web-app-capable": "yes",
74
+ "apple:mobile-web-app-status-bar-style": "black-translucent",
75
+ "apple:mobile-web-app-title": "My App",
76
+ "msapplication:TileColor": "#ffffff",
77
+ "msapplication:TileImage": "/mstile-144x144.png",
78
+ "msapplication:task": [
79
+ "name=Task 1;action-uri=/task1;icon-uri=/task1.ico",
80
+ "name=Task 2;action-uri=/task2;icon-uri=/task2.ico",
81
+ ],
82
+
83
+ // HTTP-Equiv directives
84
+ "http-equiv:cache-control": "no-cache",
85
+ "http-equiv:expires": "Tue, 01 Jan 1980 1:00:00 GMT",
86
+
87
+ // Structured data & verification
88
+ "itemprop:name": "My Awesome Website",
89
+ "itemprop:description": "This is an awesome website with great content",
90
+ "google-site-verification": "abc123def456",
91
+ "fb:app_id": "123456789",
92
+ "geo.region": "US-NY",
93
+ "geo.placename": "New York City",
94
+ "geo.position": "40.7128;-74.0060",
95
+
96
+ // Alternate language links
97
+ alternate: [
98
+ { hreflang: "es", href: "https://example.com/es/" },
99
+ { hreflang: "fr", href: "https://example.com/fr/" },
100
+ ],
101
+
102
+ // Custom metadata
103
+ customMeta: {
104
+ name: "custom-property",
105
+ content: "custom-value",
106
+ "data-custom": "additional-data",
107
+ },
108
+ },
109
+ };
110
+ ```