@docyrus/docyrus 0.0.19 → 0.0.21
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/agent-loader.js +37 -3
- package/agent-loader.js.map +2 -2
- package/main.js +498 -93
- package/main.js.map +4 -4
- package/package.json +14 -4
- package/resources/chrome-tools/browser-content.js +103 -0
- package/resources/chrome-tools/browser-cookies.js +35 -0
- package/resources/chrome-tools/browser-eval.js +53 -0
- package/resources/chrome-tools/browser-hn-scraper.js +108 -0
- package/resources/chrome-tools/browser-nav.js +44 -0
- package/resources/chrome-tools/browser-pick.js +162 -0
- package/resources/chrome-tools/browser-screenshot.js +34 -0
- package/resources/chrome-tools/browser-start.js +86 -0
- package/resources/pi-agent/extensions/answer.ts +532 -0
- package/resources/pi-agent/extensions/context.ts +578 -0
- package/resources/pi-agent/extensions/control.ts +1779 -0
- package/resources/pi-agent/extensions/diff.ts +218 -0
- package/resources/pi-agent/extensions/files.ts +199 -0
- package/resources/pi-agent/extensions/loop.ts +446 -0
- package/resources/pi-agent/extensions/multi-edit.ts +835 -0
- package/resources/pi-agent/extensions/notify.ts +88 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/CHANGELOG.md +192 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/LICENSE +21 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/README.md +296 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/app-bridge.bundle.js +67 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/cli.js +108 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/commands.ts +211 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/config.ts +227 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/consent-manager.ts +64 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/direct-tools.ts +301 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/errors.ts +219 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/glimpse-ui.ts +80 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/host-html-template.ts +427 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/index.ts +232 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/init.ts +319 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/lifecycle.ts +93 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/logger.ts +169 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/mcp-panel.ts +713 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/metadata-cache.ts +191 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/npx-resolver.ts +419 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/oauth-handler.ts +56 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/package.json +85 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/paths.ts +29 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/proxy-modes.ts +635 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/resource-tools.ts +17 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/server-manager.ts +330 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/state.ts +41 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/tool-metadata.ts +144 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/tool-registrar.ts +46 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/types.ts +367 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/ui-resource-handler.ts +145 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/ui-server.ts +623 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/ui-session.ts +384 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/ui-stream-types.ts +89 -0
- package/resources/pi-agent/extensions/pi-mcp-adapter/utils.ts +75 -0
- package/resources/pi-agent/extensions/prompt-editor.ts +1315 -0
- package/resources/pi-agent/extensions/prompt-url-widget.ts +158 -0
- package/resources/pi-agent/extensions/redraws.ts +24 -0
- package/resources/pi-agent/extensions/review.ts +2160 -0
- package/resources/pi-agent/extensions/todos.ts +2076 -0
- package/resources/pi-agent/extensions/tps.ts +47 -0
- package/resources/pi-agent/extensions/whimsical.ts +474 -0
- package/resources/pi-agent/prompts/coder-system.md +106 -0
- package/resources/pi-agent/skills/changelog-generator/SKILL.md +425 -0
- package/resources/pi-agent/skills/docyrus-chrome-devtools-cli/SKILL.md +80 -0
- package/resources/pi-agent/skills/docyrus-platform/SKILL.md +71 -0
- package/resources/pi-agent/skills/docyrus-platform/references/ai-capabilities.md +43 -0
- package/resources/pi-agent/skills/docyrus-platform/references/auth-and-multi-tenancy.md +35 -0
- package/resources/pi-agent/skills/docyrus-platform/references/automation-and-workflows.md +30 -0
- package/resources/pi-agent/skills/docyrus-platform/references/core-building-blocks.md +53 -0
- package/resources/pi-agent/skills/{docyrus-api-dev → docyrus-platform}/references/data-source-query-guide.md +32 -28
- package/resources/pi-agent/skills/docyrus-platform/references/developer-tools.md +28 -0
- package/resources/pi-agent/skills/docyrus-platform/references/docyrus-cli-usage.md +554 -0
- package/resources/pi-agent/skills/{docyrus-api-dev → docyrus-platform}/references/formula-design-guide-llm.md +15 -23
- package/resources/pi-agent/skills/docyrus-platform/references/integrations-and-events.md +60 -0
- package/resources/pi-agent/skills/docyrus-platform/references/platform-services.md +58 -0
- package/resources/pi-agent/skills/docyrus-platform/references/querying-and-data-operations.md +27 -0
- package/resources/pi-agent/prompts/coder-append-system.md +0 -19
- package/resources/pi-agent/skills/docyrus-ai/SKILL.md +0 -28
- package/resources/pi-agent/skills/docyrus-api-dev/SKILL.md +0 -161
- package/resources/pi-agent/skills/docyrus-api-dev/references/api-client.md +0 -349
- package/resources/pi-agent/skills/docyrus-api-dev/references/authentication.md +0 -238
- package/resources/pi-agent/skills/docyrus-api-dev/references/query-and-formulas.md +0 -592
- package/resources/pi-agent/skills/docyrus-api-doctor/SKILL.md +0 -70
- package/resources/pi-agent/skills/docyrus-api-doctor/references/checklist-details.md +0 -588
- package/resources/pi-agent/skills/docyrus-app-dev/SKILL.md +0 -159
- package/resources/pi-agent/skills/docyrus-app-dev/references/api-client-and-auth.md +0 -275
- package/resources/pi-agent/skills/docyrus-app-dev/references/collections-and-patterns.md +0 -352
- package/resources/pi-agent/skills/docyrus-app-dev/references/data-source-query-guide.md +0 -2059
- package/resources/pi-agent/skills/docyrus-app-dev/references/formula-design-guide-llm.md +0 -320
- package/resources/pi-agent/skills/docyrus-app-dev/references/query-guide.md +0 -525
- package/resources/pi-agent/skills/docyrus-app-ui-design/SKILL.md +0 -466
- package/resources/pi-agent/skills/docyrus-app-ui-design/references/component-selection-guide.md +0 -602
- package/resources/pi-agent/skills/docyrus-app-ui-design/references/icon-usage-guide.md +0 -463
- package/resources/pi-agent/skills/docyrus-app-ui-design/references/preferred-components-catalog.md +0 -242
- package/resources/pi-agent/skills/docyrus-apps/SKILL.md +0 -54
- package/resources/pi-agent/skills/docyrus-architect/SKILL.md +0 -174
- package/resources/pi-agent/skills/docyrus-architect/references/custom-query-guide.md +0 -410
- package/resources/pi-agent/skills/docyrus-architect/references/data-source-query-guide.md +0 -2059
- package/resources/pi-agent/skills/docyrus-architect/references/formula-design-guide-llm.md +0 -320
- package/resources/pi-agent/skills/docyrus-architect/references/formula-reference.md +0 -145
- package/resources/pi-agent/skills/docyrus-auth/SKILL.md +0 -100
- package/resources/pi-agent/skills/docyrus-cli-app/SKILL.md +0 -279
- package/resources/pi-agent/skills/docyrus-cli-app/references/cli-manifest.md +0 -532
- package/resources/pi-agent/skills/docyrus-cli-app/references/list-query-examples.md +0 -248
- package/resources/pi-agent/skills/docyrus-curl/SKILL.md +0 -32
- package/resources/pi-agent/skills/docyrus-discover/SKILL.md +0 -63
- package/resources/pi-agent/skills/docyrus-ds/SKILL.md +0 -95
- package/resources/pi-agent/skills/docyrus-env/SKILL.md +0 -21
- package/resources/pi-agent/skills/docyrus-studio/SKILL.md +0 -369
- package/resources/pi-agent/skills/docyrus-tui/SKILL.md +0 -15
|
@@ -0,0 +1,554 @@
|
|
|
1
|
+
# Docyrus CLI Usage
|
|
2
|
+
|
|
3
|
+
Complete command reference for the Docyrus CLI (`@docyrus/docyrus`).
|
|
4
|
+
|
|
5
|
+
## Global Flags
|
|
6
|
+
|
|
7
|
+
- `-g, --global` — Use global `~/.docyrus` settings instead of local project settings
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## auth — Authentication
|
|
12
|
+
|
|
13
|
+
### `docyrus auth login`
|
|
14
|
+
|
|
15
|
+
Authorize CLI using OAuth2 device flow or manual token entry.
|
|
16
|
+
|
|
17
|
+
| Option | Type | Default | Description |
|
|
18
|
+
|---|---|---|---|
|
|
19
|
+
| `--clientId` | string | auto-resolved | OAuth2 client id |
|
|
20
|
+
| `--scope` | string | default scopes | OAuth2 scopes |
|
|
21
|
+
| `--accessToken` | string | — | Manual access token; skips device flow |
|
|
22
|
+
| `--refreshToken` | string | — | Manual refresh token (requires `--accessToken`) |
|
|
23
|
+
|
|
24
|
+
**Client ID resolution order:** explicit `--clientId` > `DOCYRUS_API_CLIENT_ID` env var > local config > global config > `manual-token` fallback.
|
|
25
|
+
|
|
26
|
+
**Default scopes:** `openid email profile offline_access ReadWrite.All User.ReadWrite Users.ReadWrite.All Tenant.Read Teams.Read.All DS.ReadWrite.All Docs.ReadWrite.All Architect.ReadWrite.All AI.ReadWrite.All`
|
|
27
|
+
|
|
28
|
+
### `docyrus auth set-tokens`
|
|
29
|
+
|
|
30
|
+
Set custom access and refresh tokens for the active environment.
|
|
31
|
+
|
|
32
|
+
| Option | Type | Required | Description |
|
|
33
|
+
|---|---|---|---|
|
|
34
|
+
| `--clientId` | string | no | OAuth2 client id |
|
|
35
|
+
| `--scope` | string | no | OAuth2 scopes |
|
|
36
|
+
| `--accessToken` | string | yes | Custom access token |
|
|
37
|
+
| `--refreshToken` | string | no | Custom refresh token |
|
|
38
|
+
|
|
39
|
+
### `docyrus auth accounts list`
|
|
40
|
+
|
|
41
|
+
List saved user accounts for the current API base URL.
|
|
42
|
+
|
|
43
|
+
### `docyrus auth accounts use`
|
|
44
|
+
|
|
45
|
+
Switch active account by user ID.
|
|
46
|
+
|
|
47
|
+
| Option | Type | Required | Description |
|
|
48
|
+
|---|---|---|---|
|
|
49
|
+
| `--userId` | string | yes | User ID to activate |
|
|
50
|
+
|
|
51
|
+
### `docyrus auth tenants list`
|
|
52
|
+
|
|
53
|
+
List available tenants for an account.
|
|
54
|
+
|
|
55
|
+
| Option | Type | Required | Description |
|
|
56
|
+
|---|---|---|---|
|
|
57
|
+
| `--userId` | string | no | User ID; defaults to active account |
|
|
58
|
+
|
|
59
|
+
### `docyrus auth tenants use <tenantSelector>`
|
|
60
|
+
|
|
61
|
+
Switch active tenant for an account.
|
|
62
|
+
|
|
63
|
+
| Argument | Type | Required | Description |
|
|
64
|
+
|---|---|---|---|
|
|
65
|
+
| `tenantSelector` | string | yes | Tenant number (numeric) or tenant UUID |
|
|
66
|
+
|
|
67
|
+
| Option | Type | Required | Description |
|
|
68
|
+
|---|---|---|---|
|
|
69
|
+
| `--userId` | string | no | User ID; defaults to active account |
|
|
70
|
+
| `--scope` | string | no | Scope for tenant bootstrap login if required |
|
|
71
|
+
|
|
72
|
+
**Note:** Numeric selector = tenant number, non-numeric = UUID.
|
|
73
|
+
|
|
74
|
+
### `docyrus auth logout`
|
|
75
|
+
|
|
76
|
+
Revoke and clear all tenant sessions for the active account.
|
|
77
|
+
|
|
78
|
+
| Option | Type | Required | Description |
|
|
79
|
+
|---|---|---|---|
|
|
80
|
+
| `--clientId` | string | no | OAuth2 client id override |
|
|
81
|
+
|
|
82
|
+
### `docyrus auth who`
|
|
83
|
+
|
|
84
|
+
Return current authenticated user (`/v1/users/me`).
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## ai — AI Agent Chat
|
|
89
|
+
|
|
90
|
+
### `docyrus ai "<prompt>"`
|
|
91
|
+
|
|
92
|
+
Send a prompt to a Docyrus AI agent.
|
|
93
|
+
|
|
94
|
+
| Argument | Type | Required | Description |
|
|
95
|
+
|---|---|---|---|
|
|
96
|
+
| `prompt` | string | yes | Prompt string (quote when it contains spaces) |
|
|
97
|
+
|
|
98
|
+
| Option | Type | Default | Description |
|
|
99
|
+
|---|---|---|---|
|
|
100
|
+
| `--agentId` | string | default agent | Agent ID to use |
|
|
101
|
+
| `--deploymentId` | string | — | Agent deployment ID |
|
|
102
|
+
|
|
103
|
+
**Output behavior:**
|
|
104
|
+
- TTY mode: renders markdown for human readability
|
|
105
|
+
- `--json`, `--verbose`, or `--format`: preserves structured output
|
|
106
|
+
|
|
107
|
+
**Response fields:** `agentId`, `deploymentId`, `prompt`, `text`, `reasoning` (optional), `data` (optional).
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## chrome — Chrome DevTools Browser Automation
|
|
112
|
+
|
|
113
|
+
Docyrus ships Chrome DevTools helper commands for visible browser automation against Chrome running with remote debugging on `:9222`.
|
|
114
|
+
|
|
115
|
+
### `docyrus chrome start`
|
|
116
|
+
|
|
117
|
+
Launch Chrome with remote debugging enabled.
|
|
118
|
+
|
|
119
|
+
| Option | Type | Description |
|
|
120
|
+
|---|---|---|
|
|
121
|
+
| `--profile` | boolean | Copy the default Chrome profile so existing cookies and logins are available |
|
|
122
|
+
|
|
123
|
+
### `docyrus chrome nav <url>`
|
|
124
|
+
|
|
125
|
+
Navigate the active tab or open the URL in a new tab.
|
|
126
|
+
|
|
127
|
+
| Option | Type | Description |
|
|
128
|
+
|---|---|---|
|
|
129
|
+
| `--new` | boolean | Open the URL in a new tab |
|
|
130
|
+
| `--reload` | boolean | Force a reload after navigation |
|
|
131
|
+
|
|
132
|
+
### `docyrus chrome eval <code>`
|
|
133
|
+
|
|
134
|
+
Execute JavaScript in the active tab and print the result.
|
|
135
|
+
|
|
136
|
+
### `docyrus chrome screenshot`
|
|
137
|
+
|
|
138
|
+
Capture the current viewport and return the temporary screenshot file path.
|
|
139
|
+
|
|
140
|
+
### `docyrus chrome pick <message>`
|
|
141
|
+
|
|
142
|
+
Open an interactive element picker in the active tab and return information about the selected element or elements.
|
|
143
|
+
|
|
144
|
+
### `docyrus chrome cookies`
|
|
145
|
+
|
|
146
|
+
Print cookies for the active tab, including domain, path, `httpOnly`, and `secure` flags.
|
|
147
|
+
|
|
148
|
+
### `docyrus chrome content <url>`
|
|
149
|
+
|
|
150
|
+
Navigate to a URL and extract readable content as markdown.
|
|
151
|
+
|
|
152
|
+
### `docyrus chrome hn-scraper`
|
|
153
|
+
|
|
154
|
+
Scrape Hacker News front page submissions as JSON.
|
|
155
|
+
|
|
156
|
+
| Option | Type | Description |
|
|
157
|
+
|---|---|---|
|
|
158
|
+
| `--limit` | number | Maximum number of submissions to return |
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## ds — Data Source Item Operations
|
|
163
|
+
|
|
164
|
+
### `docyrus ds get <appSlug> <dataSourceSlug>`
|
|
165
|
+
|
|
166
|
+
Get data source metadata, including its `fields`.
|
|
167
|
+
|
|
168
|
+
| Argument | Type | Required | Description |
|
|
169
|
+
|---|---|---|---|
|
|
170
|
+
| `appSlug` | string | yes | App slug |
|
|
171
|
+
| `dataSourceSlug` | string | yes | Data source slug |
|
|
172
|
+
|
|
173
|
+
### `docyrus ds list <appSlug> <dataSourceSlug>`
|
|
174
|
+
|
|
175
|
+
List data source items with the supported query parameters.
|
|
176
|
+
|
|
177
|
+
| Argument | Type | Required | Description |
|
|
178
|
+
|---|---|---|---|
|
|
179
|
+
| `appSlug` | string | yes | App slug |
|
|
180
|
+
| `dataSourceSlug` | string | yes | Data source slug |
|
|
181
|
+
|
|
182
|
+
Most frequently used options:
|
|
183
|
+
|
|
184
|
+
| Option | Type | Description |
|
|
185
|
+
|---|---|---|
|
|
186
|
+
| `--columns` | string | Column selection |
|
|
187
|
+
| `--filters` | string | JSON filter object |
|
|
188
|
+
| `--filterKeyword` | string | Keyword filter |
|
|
189
|
+
| `--orderBy` | string | Sort order |
|
|
190
|
+
| `--limit` | number | Result limit |
|
|
191
|
+
| `--offset` | number | Result offset |
|
|
192
|
+
|
|
193
|
+
Advanced options:
|
|
194
|
+
|
|
195
|
+
| Option | Type | Description |
|
|
196
|
+
|---|---|---|
|
|
197
|
+
| `--collapseRows` | boolean | Collapse rows into a single aggregated array |
|
|
198
|
+
| `--distinctColumns` | string | Distinct columns; comma-separated or JSON array |
|
|
199
|
+
| `--formulas` | string | JSON formulas object |
|
|
200
|
+
| `--calculations` | string | JSON calculations array |
|
|
201
|
+
| `--groupSummaries` | boolean | Return per-group summaries when calculations are used |
|
|
202
|
+
| `--fullCount` | boolean | Include total count |
|
|
203
|
+
| `--expand` | string | Expand columns; comma-separated or JSON array |
|
|
204
|
+
| `--pivot` | string | JSON pivot configuration |
|
|
205
|
+
| `--childQueries` | string | JSON child query array |
|
|
206
|
+
|
|
207
|
+
### `docyrus ds create <appSlug> <dataSourceSlug>`
|
|
208
|
+
|
|
209
|
+
Create data source item(s).
|
|
210
|
+
|
|
211
|
+
| Argument | Type | Required | Description |
|
|
212
|
+
|---|---|---|---|
|
|
213
|
+
| `appSlug` | string | yes | App slug |
|
|
214
|
+
| `dataSourceSlug` | string | yes | Data source slug |
|
|
215
|
+
|
|
216
|
+
| Option | Type | Description |
|
|
217
|
+
|---|---|---|
|
|
218
|
+
| `--data` | string | JSON payload for record fields |
|
|
219
|
+
| `--fromFile` | string | Path to JSON or CSV file |
|
|
220
|
+
|
|
221
|
+
**Notes:**
|
|
222
|
+
- Array payloads trigger bulk create (max 50 items per batch)
|
|
223
|
+
- Supports JSON and CSV input files
|
|
224
|
+
|
|
225
|
+
### `docyrus ds update <appSlug> <dataSourceSlug> [recordId]`
|
|
226
|
+
|
|
227
|
+
Update data source item(s).
|
|
228
|
+
|
|
229
|
+
| Argument | Type | Required | Description |
|
|
230
|
+
|---|---|---|---|
|
|
231
|
+
| `appSlug` | string | yes | App slug |
|
|
232
|
+
| `dataSourceSlug` | string | yes | Data source slug |
|
|
233
|
+
| `recordId` | string | for single updates | Record ID |
|
|
234
|
+
|
|
235
|
+
| Option | Type | Description |
|
|
236
|
+
|---|---|---|
|
|
237
|
+
| `--data` | string | JSON payload for record fields |
|
|
238
|
+
| `--fromFile` | string | Path to JSON or CSV file |
|
|
239
|
+
|
|
240
|
+
**Notes:**
|
|
241
|
+
- Batch update requires `id` in every item
|
|
242
|
+
- Cannot provide both `recordId` and batch payload
|
|
243
|
+
|
|
244
|
+
### `docyrus ds delete <appSlug> <dataSourceSlug> <recordId>`
|
|
245
|
+
|
|
246
|
+
Delete a data source item.
|
|
247
|
+
|
|
248
|
+
| Argument | Type | Required | Description |
|
|
249
|
+
|---|---|---|---|
|
|
250
|
+
| `appSlug` | string | yes | App slug |
|
|
251
|
+
| `dataSourceSlug` | string | yes | Data source slug |
|
|
252
|
+
| `recordId` | string | yes | Record ID |
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## discover — OpenAPI Discovery
|
|
257
|
+
|
|
258
|
+
### `docyrus discover api`
|
|
259
|
+
|
|
260
|
+
Download tenant OpenAPI spec for the active tenant. Caches locally for subsequent use.
|
|
261
|
+
|
|
262
|
+
### `docyrus discover namespaces`
|
|
263
|
+
|
|
264
|
+
List API namespaces from the active tenant's OpenAPI spec.
|
|
265
|
+
|
|
266
|
+
### `docyrus discover path <prefix>`
|
|
267
|
+
|
|
268
|
+
List endpoints matching a path prefix.
|
|
269
|
+
|
|
270
|
+
| Argument | Type | Required | Description |
|
|
271
|
+
|---|---|---|---|
|
|
272
|
+
| `prefix` | string | yes | Path prefix (e.g., `/v1/users`) |
|
|
273
|
+
|
|
274
|
+
**Note:** Auto-normalizes paths with or without `/v1` prefix.
|
|
275
|
+
|
|
276
|
+
### `docyrus discover endpoint <selector>`
|
|
277
|
+
|
|
278
|
+
Return full endpoint details for a path and HTTP method.
|
|
279
|
+
|
|
280
|
+
| Argument | Type | Required | Description |
|
|
281
|
+
|---|---|---|---|
|
|
282
|
+
| `selector` | string | yes | Path (defaults to GET) or `[METHOD]/path` |
|
|
283
|
+
|
|
284
|
+
**Examples:**
|
|
285
|
+
- `/v1/users/me` — defaults to GET
|
|
286
|
+
- `[PUT]/v1/users/me/photo` — explicit PUT method
|
|
287
|
+
|
|
288
|
+
### `docyrus discover entity <name>`
|
|
289
|
+
|
|
290
|
+
Return full entity schema by name.
|
|
291
|
+
|
|
292
|
+
| Argument | Type | Required | Description |
|
|
293
|
+
|---|---|---|---|
|
|
294
|
+
| `name` | string | yes | Entity name (e.g., `UserEntity`) |
|
|
295
|
+
|
|
296
|
+
### `docyrus discover search <query>`
|
|
297
|
+
|
|
298
|
+
Search endpoint paths and entity names.
|
|
299
|
+
|
|
300
|
+
| Argument | Type | Required | Description |
|
|
301
|
+
|---|---|---|---|
|
|
302
|
+
| `query` | string | yes | Comma-separated search terms |
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## apps — App Management
|
|
307
|
+
|
|
308
|
+
### `docyrus apps list`
|
|
309
|
+
|
|
310
|
+
List apps.
|
|
311
|
+
|
|
312
|
+
| Option | Type | Description |
|
|
313
|
+
|---|---|---|
|
|
314
|
+
| `--appType` | string | Filter by app type |
|
|
315
|
+
|
|
316
|
+
### `docyrus apps delete`
|
|
317
|
+
|
|
318
|
+
Archive an app (soft delete).
|
|
319
|
+
|
|
320
|
+
| Option | Type | Description |
|
|
321
|
+
|---|---|---|
|
|
322
|
+
| `--appId` | string | App ID |
|
|
323
|
+
| `--appSlug` | string | App slug |
|
|
324
|
+
|
|
325
|
+
**Note:** Exactly one of `--appId` or `--appSlug` required.
|
|
326
|
+
|
|
327
|
+
### `docyrus apps restore`
|
|
328
|
+
|
|
329
|
+
Restore an archived app.
|
|
330
|
+
|
|
331
|
+
| Option | Type | Description |
|
|
332
|
+
|---|---|---|
|
|
333
|
+
| `--appId` | string | App ID |
|
|
334
|
+
| `--appSlug` | string | App slug |
|
|
335
|
+
|
|
336
|
+
### `docyrus apps permanent-delete`
|
|
337
|
+
|
|
338
|
+
Permanently delete an app.
|
|
339
|
+
|
|
340
|
+
| Option | Type | Description |
|
|
341
|
+
|---|---|---|
|
|
342
|
+
| `--appId` | string | App ID |
|
|
343
|
+
| `--appSlug` | string | App slug |
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## studio — Schema Management
|
|
348
|
+
|
|
349
|
+
Manage data source schemas, fields, and enumerations via the development API.
|
|
350
|
+
|
|
351
|
+
**Common selector rules:**
|
|
352
|
+
- App: exactly one of `--appId` or `--appSlug`
|
|
353
|
+
- Data source: exactly one of `--dataSourceId` or `--dataSourceSlug` (where supported)
|
|
354
|
+
- Field: exactly one of `--fieldId` or `--fieldSlug` (where supported)
|
|
355
|
+
|
|
356
|
+
### Data Source Commands
|
|
357
|
+
|
|
358
|
+
#### `docyrus studio list-data-sources`
|
|
359
|
+
|
|
360
|
+
| Option | Type | Description |
|
|
361
|
+
|---|---|---|
|
|
362
|
+
| `--appId / --appSlug` | string | App selector |
|
|
363
|
+
| `--expand` | string | Comma-separated expansions (e.g., `fields`) |
|
|
364
|
+
|
|
365
|
+
#### `docyrus studio get-data-source`
|
|
366
|
+
|
|
367
|
+
| Option | Type | Description |
|
|
368
|
+
|---|---|---|
|
|
369
|
+
| `--dataSourceId` | string | Data source ID |
|
|
370
|
+
|
|
371
|
+
Returns the data source metadata together with its `fields`.
|
|
372
|
+
|
|
373
|
+
#### `docyrus studio create-data-source`
|
|
374
|
+
|
|
375
|
+
| Option | Type | Description |
|
|
376
|
+
|---|---|---|
|
|
377
|
+
| `--appId / --appSlug` | string | App selector |
|
|
378
|
+
| `--data` | string | JSON payload |
|
|
379
|
+
| `--fromFile` | string | Path to JSON file |
|
|
380
|
+
| `--title` | string | Data source title |
|
|
381
|
+
| `--name` | string | Data source name |
|
|
382
|
+
| `--slug` | string | Data source slug |
|
|
383
|
+
| `--type` | string | Data source type |
|
|
384
|
+
| `--icon` | string | Icon |
|
|
385
|
+
| `--dataSharing` | string | Data sharing mode |
|
|
386
|
+
| `--meta` | string | JSON meta payload |
|
|
387
|
+
|
|
388
|
+
#### `docyrus studio update-data-source`
|
|
389
|
+
|
|
390
|
+
Same options as `create-data-source` plus data source selector (`--dataSourceId / --dataSourceSlug`).
|
|
391
|
+
|
|
392
|
+
#### `docyrus studio delete-data-source`
|
|
393
|
+
|
|
394
|
+
Archive a data source.
|
|
395
|
+
|
|
396
|
+
| Option | Type | Description |
|
|
397
|
+
|---|---|---|
|
|
398
|
+
| `--appId / --appSlug` | string | App selector |
|
|
399
|
+
| `--dataSourceId / --dataSourceSlug` | string | Data source selector |
|
|
400
|
+
|
|
401
|
+
#### `docyrus studio restore-data-source`
|
|
402
|
+
|
|
403
|
+
Restore an archived data source. Requires `--dataSourceId` (slug resolution not available for archived data sources).
|
|
404
|
+
|
|
405
|
+
#### `docyrus studio permanent-delete-data-source`
|
|
406
|
+
|
|
407
|
+
Permanently delete a data source. Requires `--dataSourceId`.
|
|
408
|
+
|
|
409
|
+
#### `docyrus studio bulk-create-data-sources`
|
|
410
|
+
|
|
411
|
+
| Option | Type | Description |
|
|
412
|
+
|---|---|---|
|
|
413
|
+
| `--appId / --appSlug` | string | App selector |
|
|
414
|
+
| `--data` | string | JSON payload |
|
|
415
|
+
| `--fromFile` | string | Path to JSON file |
|
|
416
|
+
|
|
417
|
+
### Field Commands
|
|
418
|
+
|
|
419
|
+
#### `docyrus studio list-fields`
|
|
420
|
+
|
|
421
|
+
| Option | Type | Description |
|
|
422
|
+
|---|---|---|
|
|
423
|
+
| `--appId / --appSlug` | string | App selector |
|
|
424
|
+
| `--dataSourceId / --dataSourceSlug` | string | Data source selector |
|
|
425
|
+
|
|
426
|
+
#### `docyrus studio get-field`
|
|
427
|
+
|
|
428
|
+
| Option | Type | Description |
|
|
429
|
+
|---|---|---|
|
|
430
|
+
| `--appId / --appSlug` | string | App selector |
|
|
431
|
+
| `--dataSourceId / --dataSourceSlug` | string | Data source selector |
|
|
432
|
+
| `--fieldId / --fieldSlug` | string | Field selector |
|
|
433
|
+
|
|
434
|
+
#### `docyrus studio create-field`
|
|
435
|
+
|
|
436
|
+
| Option | Type | Description |
|
|
437
|
+
|---|---|---|
|
|
438
|
+
| `--appId / --appSlug` | string | App selector |
|
|
439
|
+
| `--dataSourceId / --dataSourceSlug` | string | Data source selector |
|
|
440
|
+
| `--data` | string | JSON payload |
|
|
441
|
+
| `--fromFile` | string | Path to JSON file |
|
|
442
|
+
| `--name` | string | Field name |
|
|
443
|
+
| `--slug` | string | Field slug |
|
|
444
|
+
| `--type` | string | Field type |
|
|
445
|
+
| `--readOnly` | boolean | Read only |
|
|
446
|
+
| `--status` | number | Field status |
|
|
447
|
+
| `--defaultValue` | string | Default value |
|
|
448
|
+
| `--relationDataSourceId` | string | Relation target data source ID |
|
|
449
|
+
| `--sortOrder` | number | Sort order |
|
|
450
|
+
| `--tenantEnumSetId` | string | Shared enum set ID |
|
|
451
|
+
| `--options` | string | JSON editor options |
|
|
452
|
+
| `--validations` | string | JSON validations |
|
|
453
|
+
|
|
454
|
+
#### `docyrus studio update-field`
|
|
455
|
+
|
|
456
|
+
Same options as `create-field` plus field selector (`--fieldId / --fieldSlug`).
|
|
457
|
+
|
|
458
|
+
#### `docyrus studio delete-field`
|
|
459
|
+
|
|
460
|
+
| Option | Type | Description |
|
|
461
|
+
|---|---|---|
|
|
462
|
+
| App, data source, and field selectors | string | See above |
|
|
463
|
+
|
|
464
|
+
#### `docyrus studio create-fields-batch`
|
|
465
|
+
|
|
466
|
+
| Option | Type | Description |
|
|
467
|
+
|---|---|---|
|
|
468
|
+
| `--appId / --appSlug` | string | App selector |
|
|
469
|
+
| `--dataSourceId / --dataSourceSlug` | string | Data source selector |
|
|
470
|
+
| `--data` | string | JSON payload |
|
|
471
|
+
| `--fromFile` | string | Path to JSON file |
|
|
472
|
+
|
|
473
|
+
#### `docyrus studio update-fields-batch`
|
|
474
|
+
|
|
475
|
+
Same options as `create-fields-batch`.
|
|
476
|
+
|
|
477
|
+
**Note:** The CLI auto-normalizes payloads: `id → fieldId`, `read_only → readOnly`, `default_value → defaultValue`, `relation_data_source_id → relationDataSourceId`, `options → editorOptions`.
|
|
478
|
+
|
|
479
|
+
#### `docyrus studio delete-fields-batch`
|
|
480
|
+
|
|
481
|
+
Same options. Payload key: `fieldIds`.
|
|
482
|
+
|
|
483
|
+
### Enum Commands
|
|
484
|
+
|
|
485
|
+
#### `docyrus studio list-enums`
|
|
486
|
+
|
|
487
|
+
| Option | Type | Description |
|
|
488
|
+
|---|---|---|
|
|
489
|
+
| App, data source, and field selectors | string | See above |
|
|
490
|
+
|
|
491
|
+
#### `docyrus studio create-enums`
|
|
492
|
+
|
|
493
|
+
| Option | Type | Description |
|
|
494
|
+
|---|---|---|
|
|
495
|
+
| App, data source, and field selectors | string | See above |
|
|
496
|
+
| `--data` | string | JSON payload |
|
|
497
|
+
| `--fromFile` | string | Path to JSON file |
|
|
498
|
+
| `--enumSetId` | string | Enum set ID |
|
|
499
|
+
|
|
500
|
+
#### `docyrus studio update-enums`
|
|
501
|
+
|
|
502
|
+
Same options as `create-enums` (without `--enumSetId`).
|
|
503
|
+
|
|
504
|
+
**Note:** The CLI auto-normalizes `id → enumId`.
|
|
505
|
+
|
|
506
|
+
#### `docyrus studio delete-enums`
|
|
507
|
+
|
|
508
|
+
Same options. Payload key: `enumIds`.
|
|
509
|
+
|
|
510
|
+
---
|
|
511
|
+
|
|
512
|
+
## curl — Direct API Requests
|
|
513
|
+
|
|
514
|
+
### `docyrus curl <path>`
|
|
515
|
+
|
|
516
|
+
Send arbitrary requests to the Docyrus API.
|
|
517
|
+
|
|
518
|
+
| Argument | Type | Required | Description |
|
|
519
|
+
|---|---|---|---|
|
|
520
|
+
| `path` | string | yes | API path (no absolute URLs) |
|
|
521
|
+
|
|
522
|
+
| Option | Type | Description |
|
|
523
|
+
|---|---|---|
|
|
524
|
+
| `-X, --request` | string | HTTP method (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS) |
|
|
525
|
+
| `-H, --header` | string[] | Request headers (`Key:Value`, repeatable) |
|
|
526
|
+
| `-d, --data` | string | Request payload |
|
|
527
|
+
| `-G, --get` | boolean | Send data as query string |
|
|
528
|
+
| `-i, --include` | boolean | Include status and response headers |
|
|
529
|
+
| `--noAuth` | boolean | Skip Authorization header |
|
|
530
|
+
|
|
531
|
+
**Notes:**
|
|
532
|
+
- Default method: GET (POST if `-d` provided)
|
|
533
|
+
- Path auto-normalizes `/v1` prefix
|
|
534
|
+
- JSON payloads auto-detect `Content-Type: application/json`
|
|
535
|
+
|
|
536
|
+
---
|
|
537
|
+
|
|
538
|
+
## Settings & Persistence
|
|
539
|
+
|
|
540
|
+
### Storage Locations
|
|
541
|
+
|
|
542
|
+
| File | Path | Description |
|
|
543
|
+
|---|---|---|
|
|
544
|
+
| Auth state | `<settings>/auth.json` | Multi-account, multi-tenant sessions |
|
|
545
|
+
| Environment config | `<settings>/config.json` | Active environment and client config |
|
|
546
|
+
| OpenAPI cache | `<settings>/tenans/<tenantId>/openapi.json` | Cached tenant OpenAPI specs |
|
|
547
|
+
|
|
548
|
+
**Default settings root:** `./.docyrus/` (local) or `~/.docyrus/` (global with `-g`).
|
|
549
|
+
|
|
550
|
+
### Environment Variables
|
|
551
|
+
|
|
552
|
+
| Variable | Description |
|
|
553
|
+
|---|---|
|
|
554
|
+
| `DOCYRUS_API_CLIENT_ID` | OAuth2 client ID fallback |
|
|
@@ -8,8 +8,6 @@ Two block formula formats:
|
|
|
8
8
|
|
|
9
9
|
**Block Subquery** — correlated subquery on child table: `{ alias?, inputs, from: string, with: string | Record<string,string>, filters?: IQueryFilterGroup }`. Detected by `from`+`with`.
|
|
10
10
|
|
|
11
|
-
Compat wrapper: `{ expression: { from, with, inputs } }` is also accepted.
|
|
12
|
-
|
|
13
11
|
## Block Schema
|
|
14
12
|
|
|
15
13
|
Top-level requires exactly 1 element in `inputs[]`. Optional `alias` becomes SQL alias.
|
|
@@ -273,20 +271,16 @@ Allowed: int, int2, int4, int8, bigint, real, float, float4, float8, numeric, do
|
|
|
273
271
|
{
|
|
274
272
|
"key": "total_tasks",
|
|
275
273
|
"expression": {
|
|
276
|
-
"
|
|
277
|
-
|
|
278
|
-
"inputs": [{ "kind": "aggregate", "name": "count", "inputs": [{ "kind": "column", "name": "id" }] }]
|
|
279
|
-
}
|
|
274
|
+
"from": "base_task", "with": "project",
|
|
275
|
+
"inputs": [{ "kind": "aggregate", "name": "count", "inputs": [{ "kind": "column", "name": "id" }] }]
|
|
280
276
|
}
|
|
281
277
|
},
|
|
282
278
|
{
|
|
283
279
|
"key": "open_tasks",
|
|
284
280
|
"expression": {
|
|
285
|
-
"
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
"filters": { "rules": [{ "field": "status", "operator": "not_in", "value": ["<completed_uuid>", "<cancelled_uuid>"] }], "combinator": "and" }
|
|
289
|
-
}
|
|
281
|
+
"from": "base_task", "with": "project",
|
|
282
|
+
"inputs": [{ "kind": "aggregate", "name": "count", "inputs": [{ "kind": "column", "name": "id" }] }],
|
|
283
|
+
"filters": { "rules": [{ "field": "status", "operator": "not_in", "value": ["<completed_uuid>", "<cancelled_uuid>"] }], "combinator": "and" }
|
|
290
284
|
}
|
|
291
285
|
}
|
|
292
286
|
]
|
|
@@ -301,18 +295,16 @@ Allowed: int, int2, int4, int8, bigint, real, float, float4, float8, numeric, do
|
|
|
301
295
|
{
|
|
302
296
|
"key": "task_stats",
|
|
303
297
|
"expression": {
|
|
304
|
-
"
|
|
305
|
-
|
|
306
|
-
"
|
|
307
|
-
|
|
308
|
-
"
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
}]
|
|
315
|
-
}
|
|
298
|
+
"from": "base_task", "with": "project",
|
|
299
|
+
"inputs": [{
|
|
300
|
+
"kind": "function", "name": "jsonb_build_object",
|
|
301
|
+
"inputs": [
|
|
302
|
+
{ "kind": "literal", "literal": "total", "cast": "text" },
|
|
303
|
+
{ "kind": "aggregate", "name": "count", "inputs": [{ "kind": "column", "name": "id" }] },
|
|
304
|
+
{ "kind": "literal", "literal": "open", "cast": "text" },
|
|
305
|
+
{ "kind": "aggregate", "name": "count", "inputs": [{ "kind": "case", "cases": [{ "when": { "kind": "compare", "op": "not in", "left": { "kind": "column", "name": "status" }, "right": { "kind": "literal", "literal": ["<completed_uuid>", "<cancelled_uuid>"] } }, "then": { "kind": "column", "name": "id" } }] }] }
|
|
306
|
+
]
|
|
307
|
+
}]
|
|
316
308
|
}
|
|
317
309
|
}
|
|
318
310
|
```
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Integrations & Events
|
|
2
|
+
|
|
3
|
+
## Connector Framework
|
|
4
|
+
|
|
5
|
+
- **HTTP providers** — OAuth2-enabled external API integrations (Stripe, Slack, Microsoft, etc.) with custom transformers for request/response mapping
|
|
6
|
+
- **SQL providers** — Direct database connections to external databases
|
|
7
|
+
- **Microsoft integrations** — SharePoint and MS Graph connectors
|
|
8
|
+
|
|
9
|
+
## Provider Features
|
|
10
|
+
|
|
11
|
+
- OAuth2 credential management with automatic token refresh
|
|
12
|
+
- Webhook subscription management
|
|
13
|
+
- Configurable pagination
|
|
14
|
+
- Per-tenant and per-user credential isolation
|
|
15
|
+
|
|
16
|
+
## Webhooks & Events
|
|
17
|
+
|
|
18
|
+
- Create and manage webhooks with signed verification
|
|
19
|
+
- Event types: data operations, chat platform messages, collaboration events
|
|
20
|
+
- Public webhook keys for external service integration (AI agent, bot, email, portal, webform)
|
|
21
|
+
- File upload support via webhooks
|
|
22
|
+
- Delivery tracking with retry logic
|
|
23
|
+
|
|
24
|
+
## Content & Document Management
|
|
25
|
+
|
|
26
|
+
### Collaborative Document Editor
|
|
27
|
+
|
|
28
|
+
- Real-time collaborative editing
|
|
29
|
+
- Document versioning and history
|
|
30
|
+
- Fragment-based document access
|
|
31
|
+
- Batch document import and version management
|
|
32
|
+
|
|
33
|
+
### File Management
|
|
34
|
+
|
|
35
|
+
- File uploads with type validation and size limits
|
|
36
|
+
- Organized folder structures
|
|
37
|
+
- File metadata and association with records
|
|
38
|
+
|
|
39
|
+
## Messaging & Notifications
|
|
40
|
+
|
|
41
|
+
### In-App Messaging
|
|
42
|
+
|
|
43
|
+
- Thread-based conversations
|
|
44
|
+
- Message history with user mentions
|
|
45
|
+
- File sharing in messages
|
|
46
|
+
- Conversation channels embedded in data sources
|
|
47
|
+
|
|
48
|
+
### Notifications
|
|
49
|
+
|
|
50
|
+
- Notification center with read/unread tracking
|
|
51
|
+
- Per-type notification preferences
|
|
52
|
+
- Device-based push notifications
|
|
53
|
+
- Email notification delivery
|
|
54
|
+
|
|
55
|
+
### Email
|
|
56
|
+
|
|
57
|
+
- Transactional email templates (signup, password reset, invitations, magic links)
|
|
58
|
+
- Custom HTML email templates with dynamic content
|
|
59
|
+
- Email configuration management
|
|
60
|
+
- Delivery tracking and webhook integration
|