@xano/developer-mcp 1.0.27 → 1.0.28

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.
Files changed (76) hide show
  1. package/README.md +1 -1
  2. package/dist/api_docs/format.d.ts +5 -0
  3. package/dist/api_docs/format.js +171 -0
  4. package/dist/api_docs/index.d.ts +52 -0
  5. package/dist/api_docs/index.js +111 -0
  6. package/dist/api_docs/topics/agent.d.ts +2 -0
  7. package/dist/api_docs/topics/agent.js +142 -0
  8. package/dist/api_docs/topics/api.d.ts +2 -0
  9. package/dist/api_docs/topics/api.js +176 -0
  10. package/dist/api_docs/topics/apigroup.d.ts +2 -0
  11. package/dist/api_docs/topics/apigroup.js +124 -0
  12. package/dist/api_docs/topics/authentication.d.ts +2 -0
  13. package/dist/api_docs/topics/authentication.js +61 -0
  14. package/dist/api_docs/topics/branch.d.ts +2 -0
  15. package/dist/api_docs/topics/branch.js +73 -0
  16. package/dist/api_docs/topics/file.d.ts +2 -0
  17. package/dist/api_docs/topics/file.js +70 -0
  18. package/dist/api_docs/topics/function.d.ts +2 -0
  19. package/dist/api_docs/topics/function.js +164 -0
  20. package/dist/api_docs/topics/history.d.ts +2 -0
  21. package/dist/api_docs/topics/history.js +149 -0
  22. package/dist/api_docs/topics/mcp_server.d.ts +2 -0
  23. package/dist/api_docs/topics/mcp_server.js +139 -0
  24. package/dist/api_docs/topics/middleware.d.ts +2 -0
  25. package/dist/api_docs/topics/middleware.js +156 -0
  26. package/dist/api_docs/topics/realtime.d.ts +2 -0
  27. package/dist/api_docs/topics/realtime.js +112 -0
  28. package/dist/api_docs/topics/start.d.ts +2 -0
  29. package/dist/api_docs/topics/start.js +107 -0
  30. package/dist/api_docs/topics/table.d.ts +2 -0
  31. package/dist/api_docs/topics/table.js +195 -0
  32. package/dist/api_docs/topics/task.d.ts +2 -0
  33. package/dist/api_docs/topics/task.js +165 -0
  34. package/dist/api_docs/topics/tool.d.ts +2 -0
  35. package/dist/api_docs/topics/tool.js +150 -0
  36. package/dist/api_docs/topics/workflows.d.ts +2 -0
  37. package/dist/api_docs/topics/workflows.js +131 -0
  38. package/dist/api_docs/topics/workspace.d.ts +2 -0
  39. package/dist/api_docs/topics/workspace.js +153 -0
  40. package/dist/api_docs/types.d.ts +79 -0
  41. package/dist/api_docs/types.js +4 -0
  42. package/dist/meta_api_docs/topics/workspace.js +45 -2
  43. package/dist/templates/init-workspace.d.ts +10 -0
  44. package/dist/templates/init-workspace.js +278 -0
  45. package/dist/templates/xanoscript-index.d.ts +11 -0
  46. package/dist/templates/xanoscript-index.js +72 -0
  47. package/dist/xanoscript_docs/README.md +3 -13
  48. package/dist/xanoscript_docs/ephemeral.md +330 -0
  49. package/dist/xanoscript_docs/functions.md +0 -21
  50. package/dist/xanoscript_docs/integrations.md +0 -10
  51. package/dist/xanoscript_docs/performance.md +1 -10
  52. package/dist/xanoscript_docs/realtime.md +1 -48
  53. package/dist/xanoscript_docs/security.md +2 -0
  54. package/dist/xanoscript_docs/tools.md +2 -21
  55. package/dist/xanoscript_docs/triggers.md +2 -27
  56. package/dist/xanoscript_docs_auto/README.md +119 -0
  57. package/dist/xanoscript_docs_auto/agents.md +446 -0
  58. package/dist/xanoscript_docs_auto/apis.md +517 -0
  59. package/dist/xanoscript_docs_auto/control-flow.md +543 -0
  60. package/dist/xanoscript_docs_auto/database.md +551 -0
  61. package/dist/xanoscript_docs_auto/debugging.md +527 -0
  62. package/dist/xanoscript_docs_auto/filters.md +464 -0
  63. package/dist/xanoscript_docs_auto/functions.md +431 -0
  64. package/dist/xanoscript_docs_auto/integrations.md +657 -0
  65. package/dist/xanoscript_docs_auto/mcp-servers.md +408 -0
  66. package/dist/xanoscript_docs_auto/operators.md +368 -0
  67. package/dist/xanoscript_docs_auto/syntax.md +287 -0
  68. package/dist/xanoscript_docs_auto/tables.md +447 -0
  69. package/dist/xanoscript_docs_auto/tasks.md +479 -0
  70. package/dist/xanoscript_docs_auto/testing.md +574 -0
  71. package/dist/xanoscript_docs_auto/tools.md +485 -0
  72. package/dist/xanoscript_docs_auto/triggers.md +595 -0
  73. package/dist/xanoscript_docs_auto/types.md +323 -0
  74. package/dist/xanoscript_docs_auto/variables.md +462 -0
  75. package/dist/xanoscript_docs_auto/version.json +5 -0
  76. package/package.json +1 -1
@@ -0,0 +1,447 @@
1
+ ---
2
+ applyTo: "tables/*.xs"
3
+ ---
4
+
5
+ # Tables
6
+
7
+ Database schema definitions with columns, types, indexes, and relationships.
8
+
9
+ ## Quick Reference
10
+
11
+ ```xs
12
+ table "<name>" {
13
+ schema {
14
+ int id primary=true
15
+ text name
16
+ timestamp created_at default=now
17
+ }
18
+ index idx_name { columns = [name] }
19
+ }
20
+ ```
21
+
22
+ ---
23
+
24
+ ## Table Definition
25
+
26
+ ### Basic Table
27
+
28
+ ```xs
29
+ table "user" {
30
+ schema {
31
+ int id primary=true
32
+ text name
33
+ text email
34
+ timestamp created_at default=now
35
+ timestamp? updated_at
36
+ }
37
+ }
38
+ ```
39
+
40
+ ### With All Options
41
+
42
+ ```xs
43
+ table "product" {
44
+ schema {
45
+ int id primary=true
46
+ text name
47
+ text? description
48
+ decimal price
49
+ int stock default=0
50
+ bool active default=true
51
+ json metadata
52
+ timestamp created_at default=now
53
+ timestamp? updated_at
54
+ timestamp? deleted_at
55
+ }
56
+
57
+ index idx_active { columns = [active] }
58
+ index idx_created { columns = [created_at] }
59
+ index idx_price { columns = [price] }
60
+
61
+ history {
62
+ enabled = true
63
+ retention = 30
64
+ }
65
+ }
66
+ ```
67
+
68
+ ---
69
+
70
+ ## Column Types
71
+
72
+ | Type | Description | Example |
73
+ |------|-------------|---------|
74
+ | `int` | Integer | `int id` |
75
+ | `decimal` | Floating-point | `decimal price` |
76
+ | `text` | String | `text name` |
77
+ | `email` | Email format | `email user_email` |
78
+ | `password` | Hashed password | `password pwd` |
79
+ | `bool` | Boolean | `bool active` |
80
+ | `date` | Date only | `date birth_date` |
81
+ | `time` | Time only | `time start_time` |
82
+ | `timestamp` | Date and time | `timestamp created_at` |
83
+ | `json` | JSON object/array | `json metadata` |
84
+ | `uuid` | UUID identifier | `uuid guid` |
85
+ | `file` | File reference | `file avatar` |
86
+ | `array` | Array type | `array<text> tags` |
87
+
88
+ ---
89
+
90
+ ## Column Modifiers
91
+
92
+ ### Primary Key
93
+
94
+ ```xs
95
+ int id primary=true
96
+ ```
97
+
98
+ ### Optional (Nullable)
99
+
100
+ ```xs
101
+ text? middle_name // Can be null
102
+ timestamp? deleted_at // Can be null
103
+ ```
104
+
105
+ ### Default Values
106
+
107
+ ```xs
108
+ int count default=0
109
+ bool active default=true
110
+ text status default="pending"
111
+ timestamp created_at default=now
112
+ ```
113
+
114
+ ### Unique Constraint
115
+
116
+ ```xs
117
+ text email unique=true
118
+ text username unique=true
119
+ ```
120
+
121
+ ### Description
122
+
123
+ ```xs
124
+ text internal_code description="For internal use only"
125
+ ```
126
+
127
+ ---
128
+
129
+ ## Indexes
130
+
131
+ ### Single Column Index
132
+
133
+ ```xs
134
+ index idx_email { columns = [email] }
135
+ ```
136
+
137
+ ### Unique Index
138
+
139
+ ```xs
140
+ index idx_email { columns = [email] unique=true }
141
+ ```
142
+
143
+ ### Composite Index
144
+
145
+ ```xs
146
+ index idx_user_status {
147
+ columns = [user_id, status]
148
+ }
149
+ ```
150
+
151
+ ### Partial Index (with condition)
152
+
153
+ ```xs
154
+ index idx_active_users {
155
+ columns = [email]
156
+ where = "active = true"
157
+ }
158
+ ```
159
+
160
+ ---
161
+
162
+ ## Foreign Keys (Table Links)
163
+
164
+ Reference another table:
165
+
166
+ ```xs
167
+ table "order" {
168
+ schema {
169
+ int id primary=true
170
+ tablelink user_id table=user // References user.id
171
+ decimal total
172
+ text status
173
+ timestamp created_at default=now
174
+ }
175
+ }
176
+ ```
177
+
178
+ ### Table Link Options
179
+
180
+ ```xs
181
+ // Basic reference
182
+ tablelink user_id table=user
183
+
184
+ // With custom display
185
+ tablelink user_id table=user display=name
186
+
187
+ // Nullable reference
188
+ tablelink? category_id table=category
189
+ ```
190
+
191
+ ---
192
+
193
+ ## History Tracking
194
+
195
+ Track changes to records:
196
+
197
+ ```xs
198
+ table "document" {
199
+ schema {
200
+ int id primary=true
201
+ text title
202
+ text content
203
+ int version default=1
204
+ timestamp created_at default=now
205
+ }
206
+
207
+ history {
208
+ enabled = true
209
+ retention = 90 // Days to keep history
210
+ }
211
+ }
212
+ ```
213
+
214
+ ---
215
+
216
+ ## Common Table Patterns
217
+
218
+ ### User Table
219
+
220
+ ```xs
221
+ table "user" {
222
+ schema {
223
+ int id primary=true
224
+ text name
225
+ text email unique=true
226
+ password password_hash
227
+ text? avatar
228
+ text role default="user"
229
+ bool active default=true
230
+ bool verified default=false
231
+ timestamp? last_login
232
+ timestamp created_at default=now
233
+ timestamp? updated_at
234
+ }
235
+
236
+ index idx_email { columns = [email] unique=true }
237
+ index idx_role { columns = [role] }
238
+ index idx_active { columns = [active] }
239
+ }
240
+ ```
241
+
242
+ ### Product Table
243
+
244
+ ```xs
245
+ table "product" {
246
+ schema {
247
+ int id primary=true
248
+ text name
249
+ text? description
250
+ text sku unique=true
251
+ decimal price
252
+ decimal? sale_price
253
+ int stock default=0
254
+ tablelink category_id table=category
255
+ array<text> tags
256
+ json attributes
257
+ bool active default=true
258
+ bool featured default=false
259
+ timestamp created_at default=now
260
+ timestamp? updated_at
261
+ }
262
+
263
+ index idx_sku { columns = [sku] unique=true }
264
+ index idx_category { columns = [category_id] }
265
+ index idx_active { columns = [active] }
266
+ index idx_featured { columns = [featured] where = "featured = true" }
267
+ }
268
+ ```
269
+
270
+ ### Order Table
271
+
272
+ ```xs
273
+ table "order" {
274
+ schema {
275
+ int id primary=true
276
+ text order_number unique=true
277
+ tablelink user_id table=user
278
+ decimal subtotal
279
+ decimal? discount
280
+ decimal tax
281
+ decimal total
282
+ text status default="pending"
283
+ json shipping_address
284
+ json? billing_address
285
+ text? notes
286
+ timestamp? paid_at
287
+ timestamp? shipped_at
288
+ timestamp? delivered_at
289
+ timestamp created_at default=now
290
+ timestamp? updated_at
291
+ }
292
+
293
+ index idx_user { columns = [user_id] }
294
+ index idx_status { columns = [status] }
295
+ index idx_created { columns = [created_at] }
296
+ }
297
+ ```
298
+
299
+ ### Order Items (Join Table)
300
+
301
+ ```xs
302
+ table "order_item" {
303
+ schema {
304
+ int id primary=true
305
+ tablelink order_id table=order
306
+ tablelink product_id table=product
307
+ int quantity
308
+ decimal unit_price
309
+ decimal total
310
+ timestamp created_at default=now
311
+ }
312
+
313
+ index idx_order { columns = [order_id] }
314
+ index idx_product { columns = [product_id] }
315
+ }
316
+ ```
317
+
318
+ ### Session Table
319
+
320
+ ```xs
321
+ table "session" {
322
+ schema {
323
+ int id primary=true
324
+ text token unique=true
325
+ tablelink user_id table=user
326
+ json data
327
+ text ip_address
328
+ text user_agent
329
+ timestamp expires_at
330
+ timestamp created_at default=now
331
+ }
332
+
333
+ index idx_token { columns = [token] unique=true }
334
+ index idx_user { columns = [user_id] }
335
+ index idx_expires { columns = [expires_at] }
336
+ }
337
+ ```
338
+
339
+ ### Audit Log Table
340
+
341
+ ```xs
342
+ table "audit_log" {
343
+ schema {
344
+ int id primary=true
345
+ tablelink? user_id table=user
346
+ text action
347
+ text entity_type
348
+ int entity_id
349
+ json old_data
350
+ json new_data
351
+ text ip_address
352
+ timestamp created_at default=now
353
+ }
354
+
355
+ index idx_user { columns = [user_id] }
356
+ index idx_entity { columns = [entity_type, entity_id] }
357
+ index idx_created { columns = [created_at] }
358
+ }
359
+ ```
360
+
361
+ ---
362
+
363
+ ## Vector Column (AI/ML)
364
+
365
+ For AI embeddings:
366
+
367
+ ```xs
368
+ table "document" {
369
+ schema {
370
+ int id primary=true
371
+ text title
372
+ text content
373
+ vector embedding dimensions=1536 // OpenAI embeddings
374
+ timestamp created_at default=now
375
+ }
376
+
377
+ index idx_embedding {
378
+ columns = [embedding]
379
+ type = "ivfflat"
380
+ options = {lists: 100}
381
+ }
382
+ }
383
+ ```
384
+
385
+ ---
386
+
387
+ ## Geo Column
388
+
389
+ For location data:
390
+
391
+ ```xs
392
+ table "store" {
393
+ schema {
394
+ int id primary=true
395
+ text name
396
+ text address
397
+ geo location
398
+ timestamp created_at default=now
399
+ }
400
+
401
+ index idx_location {
402
+ columns = [location]
403
+ type = "gist"
404
+ }
405
+ }
406
+ ```
407
+
408
+ ---
409
+
410
+ ## Best Practices
411
+
412
+ ### Naming Conventions
413
+
414
+ - Use singular table names: `user`, `product`, `order`
415
+ - Use snake_case for column names
416
+ - Prefix indexes with `idx_`
417
+ - Use descriptive index names
418
+
419
+ ### Always Include
420
+
421
+ - `id` as primary key
422
+ - `created_at` timestamp
423
+ - `updated_at` for mutable data
424
+
425
+ ### Soft Deletes
426
+
427
+ ```xs
428
+ table "resource" {
429
+ schema {
430
+ // ... other columns
431
+ timestamp? deleted_at // NULL = active, timestamp = deleted
432
+ }
433
+
434
+ index idx_active {
435
+ columns = [deleted_at]
436
+ where = "deleted_at IS NULL"
437
+ }
438
+ }
439
+ ```
440
+
441
+ ### Timestamps
442
+
443
+ ```xs
444
+ timestamp created_at default=now
445
+ timestamp? updated_at // Set on updates
446
+ timestamp? deleted_at // For soft deletes
447
+ ```