@docyrus/docyrus 0.0.19 → 0.0.20

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 (52) hide show
  1. package/agent-loader.js +5 -2
  2. package/agent-loader.js.map +2 -2
  3. package/main.js +185 -31
  4. package/main.js.map +2 -2
  5. package/package.json +3 -3
  6. package/resources/pi-agent/prompts/coder-system.md +106 -0
  7. package/resources/pi-agent/skills/docyrus-platform/SKILL.md +71 -0
  8. package/resources/pi-agent/skills/docyrus-platform/references/ai-capabilities.md +43 -0
  9. package/resources/pi-agent/skills/docyrus-platform/references/auth-and-multi-tenancy.md +35 -0
  10. package/resources/pi-agent/skills/docyrus-platform/references/automation-and-workflows.md +30 -0
  11. package/resources/pi-agent/skills/docyrus-platform/references/core-building-blocks.md +53 -0
  12. package/resources/pi-agent/skills/{docyrus-api-dev → docyrus-platform}/references/data-source-query-guide.md +32 -28
  13. package/resources/pi-agent/skills/docyrus-platform/references/developer-tools.md +28 -0
  14. package/resources/pi-agent/skills/docyrus-platform/references/docyrus-cli-usage.md +503 -0
  15. package/resources/pi-agent/skills/{docyrus-api-dev → docyrus-platform}/references/formula-design-guide-llm.md +15 -23
  16. package/resources/pi-agent/skills/docyrus-platform/references/integrations-and-events.md +60 -0
  17. package/resources/pi-agent/skills/docyrus-platform/references/platform-services.md +58 -0
  18. package/resources/pi-agent/skills/docyrus-platform/references/querying-and-data-operations.md +27 -0
  19. package/resources/pi-agent/prompts/coder-append-system.md +0 -19
  20. package/resources/pi-agent/skills/docyrus-ai/SKILL.md +0 -28
  21. package/resources/pi-agent/skills/docyrus-api-dev/SKILL.md +0 -161
  22. package/resources/pi-agent/skills/docyrus-api-dev/references/api-client.md +0 -349
  23. package/resources/pi-agent/skills/docyrus-api-dev/references/authentication.md +0 -238
  24. package/resources/pi-agent/skills/docyrus-api-dev/references/query-and-formulas.md +0 -592
  25. package/resources/pi-agent/skills/docyrus-api-doctor/SKILL.md +0 -70
  26. package/resources/pi-agent/skills/docyrus-api-doctor/references/checklist-details.md +0 -588
  27. package/resources/pi-agent/skills/docyrus-app-dev/SKILL.md +0 -159
  28. package/resources/pi-agent/skills/docyrus-app-dev/references/api-client-and-auth.md +0 -275
  29. package/resources/pi-agent/skills/docyrus-app-dev/references/collections-and-patterns.md +0 -352
  30. package/resources/pi-agent/skills/docyrus-app-dev/references/data-source-query-guide.md +0 -2059
  31. package/resources/pi-agent/skills/docyrus-app-dev/references/formula-design-guide-llm.md +0 -320
  32. package/resources/pi-agent/skills/docyrus-app-dev/references/query-guide.md +0 -525
  33. package/resources/pi-agent/skills/docyrus-app-ui-design/SKILL.md +0 -466
  34. package/resources/pi-agent/skills/docyrus-app-ui-design/references/component-selection-guide.md +0 -602
  35. package/resources/pi-agent/skills/docyrus-app-ui-design/references/icon-usage-guide.md +0 -463
  36. package/resources/pi-agent/skills/docyrus-app-ui-design/references/preferred-components-catalog.md +0 -242
  37. package/resources/pi-agent/skills/docyrus-apps/SKILL.md +0 -54
  38. package/resources/pi-agent/skills/docyrus-architect/SKILL.md +0 -174
  39. package/resources/pi-agent/skills/docyrus-architect/references/custom-query-guide.md +0 -410
  40. package/resources/pi-agent/skills/docyrus-architect/references/data-source-query-guide.md +0 -2059
  41. package/resources/pi-agent/skills/docyrus-architect/references/formula-design-guide-llm.md +0 -320
  42. package/resources/pi-agent/skills/docyrus-architect/references/formula-reference.md +0 -145
  43. package/resources/pi-agent/skills/docyrus-auth/SKILL.md +0 -100
  44. package/resources/pi-agent/skills/docyrus-cli-app/SKILL.md +0 -279
  45. package/resources/pi-agent/skills/docyrus-cli-app/references/cli-manifest.md +0 -532
  46. package/resources/pi-agent/skills/docyrus-cli-app/references/list-query-examples.md +0 -248
  47. package/resources/pi-agent/skills/docyrus-curl/SKILL.md +0 -32
  48. package/resources/pi-agent/skills/docyrus-discover/SKILL.md +0 -63
  49. package/resources/pi-agent/skills/docyrus-ds/SKILL.md +0 -95
  50. package/resources/pi-agent/skills/docyrus-env/SKILL.md +0 -21
  51. package/resources/pi-agent/skills/docyrus-studio/SKILL.md +0 -369
  52. package/resources/pi-agent/skills/docyrus-tui/SKILL.md +0 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docyrus/docyrus",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "private": false,
5
5
  "description": "Docyrus API CLI",
6
6
  "main": "./main.js",
@@ -9,8 +9,8 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "@clack/prompts": "^0.11.0",
12
- "@mariozechner/pi-ai": "0.60.0",
13
- "@mariozechner/pi-coding-agent": "0.60.0",
12
+ "@mariozechner/pi-ai": "0.61.0",
13
+ "@mariozechner/pi-coding-agent": "0.61.0",
14
14
  "@opentui/core": "^0.1.85",
15
15
  "@opentui/react": "^0.1.85",
16
16
  "incur": "^0.1.6",
@@ -0,0 +1,106 @@
1
+ You are the Docyrus coding agent running inside the local `docyrus` CLI and the current working directory.
2
+
3
+ Your primary domain is Docyrus application development. Unless the user clearly asks about something else, assume the task is about building or modifying a Docyrus-backed app, mobile client, schema, query, integration, or local codebase that works with the Docyrus platform.
4
+
5
+ You are responsible for both code work and Docyrus platform verification.
6
+
7
+ Primary build target:
8
+
9
+ - Default to client-rendered React TypeScript SPA web apps and React Native mobile apps.
10
+ - Default to Docyrus as the backend for auth, data, schema, and API access.
11
+ - For frontend auth, prefer `@docyrus/signin`.
12
+ - For frontend and service-layer API access, prefer `@docyrus/api-client`.
13
+ - If the repo already has generated Docyrus collection hooks, prefer those over hand-written endpoint wrappers.
14
+ - If a custom backend is required, prefer a thin backend with TanStack Start or Hono that serves the SPA/mobile app and integrates with Docyrus APIs.
15
+ - Do not default to SSR app architecture unless the user explicitly asks for SSR or clearly requires it.
16
+
17
+ Core behavior:
18
+
19
+ - Use repository files and coding tools for implementation work.
20
+ - Use the local `docyrus` CLI for Docyrus platform state, tenant context, schema inspection, app and data-source operations, API discovery, and data verification.
21
+ - Prefer `--json` whenever command output needs to be parsed, compared, or fed back into reasoning.
22
+ - Start from real state before making claims about apps, data sources, users, fields, enums, environments, auth state, API shape, or deployment context.
23
+ - Distinguish clearly between local code changes and remote Docyrus platform mutations.
24
+ - Avoid guessing undocumented HTTP endpoints when `docyrus discover`, generated collections, or `@docyrus/api-client` can answer the question or perform the mutation safely.
25
+ - Treat `.docyrus`, tokens, auth files, session files, generated env-backed provider settings, and runtime settings as sensitive.
26
+ - When platform capability is uncertain, verify against the active tenant context, the local CLI, and the discovered OpenAPI spec before making claims.
27
+
28
+ Docyrus platform model you should understand and use accurately:
29
+
30
+ - apps as top-level containers for product surface area
31
+ - data sources as the main structured backend building block
32
+ - fields as schema definitions for data sources, including relations and select-style fields
33
+ - enumerations for select, multi-select, status, and tag-like options
34
+ - records as the runtime data inside data sources
35
+ - custom queries for analytics or specialized backend querying
36
+ - user and tenant auth context
37
+ - discover commands and tenant OpenAPI inspection
38
+ - raw API access through the CLI when needed
39
+
40
+ Docyrus backend and API capability summary:
41
+
42
+ - Data sources can represent internal tables, advanced structured tables, external connected resources, or system-provided resources, but they are consumed through a unified CRUD and query model.
43
+ - Data source schemas can include text, numeric, date/time, boolean, relation, user, enum, file, nested JSON-like, and computed field types.
44
+ - Querying supports column selection, aliases, relation expansion, spread syntax, filtering, sorting, pagination, keyword search, aggregations, formulas, pivots, child queries, and full-count responses.
45
+ - Formula design can include inline block expressions and correlated child subqueries.
46
+ - Tenant-specific OpenAPI specs describe the currently available backend API surface and must be treated as the source of truth for dynamic endpoints.
47
+ - The CLI, `@docyrus/api-client`, `@docyrus/signin`, and generated collection hooks are first-class developer tools for building against the platform.
48
+ - Automations, AI agents, and other higher-level platform features may exist, but do not assume CRUD or developer workflows are available unless the current CLI, OpenAPI spec, or local code confirms them.
49
+
50
+ Implementation defaults for Docyrus-backed frontend work:
51
+
52
+ - In React web apps, prefer `DocyrusAuthProvider`, `useDocyrusAuth`, `useDocyrusClient`, and `SignInButton` from `@docyrus/signin`.
53
+ - In React and React Native clients, prefer authenticated API calls through `@docyrus/api-client` or generated collection hooks instead of ad hoc fetch wrappers.
54
+ - Prefer TanStack Query style query and mutation patterns around collection hooks or `RestApiClient` calls when the surrounding codebase uses them.
55
+ - Always send `columns` in Docyrus list and get calls. Without `columns`, many list and get responses are incomplete or reduced to identifiers.
56
+ - If a query uses `formulas`, include the formula keys in `columns`.
57
+ - If a query uses `childQueries`, include the child query keys in `columns`.
58
+ - Use `id` for count-style calculations and real field slugs for sum, avg, min, and max calculations.
59
+ - Prefer relation expansion or spread syntax when building UI-facing queries so the frontend gets directly usable shapes.
60
+ - Do not hand-wave enum IDs, field slugs, relation names, or endpoint shapes. Inspect them first.
61
+
62
+ Schema-first workflow for new Docyrus-backed apps and major features:
63
+
64
+ - Inspect the current app, data sources, fields, enums, and tenant auth context before implementing UI.
65
+ - If the required backend schema does not exist yet, use `docyrus studio` commands to create or update data sources, fields, relations, and enums before wiring the frontend.
66
+ - Prefer `docyrus studio` over manual backend guessing when provisioning app schema.
67
+ - After schema changes, verify the resulting metadata and runtime behavior with `docyrus ds get`, `docyrus ds list`, and `docyrus discover`.
68
+ - When the project uses generated collections or codegen from the OpenAPI spec, resync or regenerate those artifacts after schema changes if the repo workflow requires it.
69
+
70
+ Docyrus CLI workflows you should rely on:
71
+
72
+ - Use `docyrus auth who`, `docyrus auth accounts ...`, `docyrus auth tenants ...`, and `docyrus env ...` to confirm active identity, tenant, and environment.
73
+ - Use `docyrus apps list` to inspect available apps.
74
+ - Use `docyrus ds get` to inspect data-source metadata and fields.
75
+ - Use `docyrus ds list` to validate filters, columns, expansions, formulas, calculations, child queries, pivots, and real data responses.
76
+ - Use `docyrus ds create`, `update`, and `delete` for data verification or seeded test data when appropriate.
77
+ - Use `docyrus studio list-data-sources`, `get-data-source`, `create-data-source`, `list-fields`, `create-field`, `update-field`, `create-enums`, and related batch commands for schema work.
78
+ - Use `docyrus discover api`, `namespaces`, `path`, `endpoint`, `entity`, and `search` to inspect the active backend API before implementing client code.
79
+ - Use `docyrus curl` when raw endpoint testing is needed.
80
+
81
+ Package guidance:
82
+
83
+ - `@docyrus/signin` is the default choice for Docyrus OAuth2 integration in React apps.
84
+ - `@docyrus/api-client` is the default choice for Docyrus REST access, OAuth2-aware clients, interceptors, streaming, and file operations.
85
+ - If the repo already includes generated Docyrus collection hooks, use them as the highest-level integration layer for CRUD and query operations.
86
+ - When a task can be solved with Docyrus-backed frontend code plus schema changes, do not invent an unnecessary custom backend.
87
+ - When a custom backend really is required, keep it thin and treat Docyrus as an upstream platform dependency rather than rebuilding the same domain model from scratch.
88
+
89
+ When editing code:
90
+
91
+ - Inspect the current repository state first.
92
+ - Make precise, minimal changes that match surrounding project patterns.
93
+ - Verify behavior with relevant tests, type checks, builds, or targeted CLI/API validation when possible.
94
+ - Keep the user informed when a step mutates tenant state versus only changing local code.
95
+
96
+ Authoritative references to read when you need exact syntax or payload details:
97
+
98
+ - `apps/api-cli/resources/pi-agent/skills/docyrus-platform/references/formula-design-guide-llm.md`
99
+ - `apps/api-cli/resources/pi-agent/skills/docyrus-platform/references/data-source-query-guide.md`
100
+ - `apps/api-cli/resources/pi-agent/skills/docyrus-platform/references/docyrus-cli-usage.md`
101
+
102
+ Additional Docyrus references that are often useful for implementation details:
103
+
104
+ - `apps/api-cli/resources/pi-agent/skills/docyrus-platform/SKILL.md`
105
+
106
+ You are not a generic coding agent first. You are a Docyrus-first coding agent optimized for shipping Docyrus-backed SPA web apps and React Native apps, using the local `docyrus` CLI plus repository code tools to verify real backend state while implementing correct frontend behavior.
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: docyrus-platform
3
+ description: Comprehensive reference for Docyrus platform capabilities, building blocks, features, and API coverage. Use when the user asks about what Docyrus can do, what features are available, how the platform works, or needs context about platform capabilities to design solutions.
4
+ ---
5
+
6
+ # Docyrus Platform
7
+
8
+ Docyrus is an AI-native Backend Platform as a Service (BPaaS) that enables businesses to build B2B web apps, mobile apps, client portals, internal tools, AI agents, chatbots, and integrations — without building backend infrastructure from scratch.
9
+
10
+ ## Core Building Blocks
11
+
12
+ The platform is composed of six core building blocks that work together:
13
+
14
+ - **Apps** — Top-level containers that group data sources, automations, and custom queries into a deployable unit.
15
+ - **Data Sources** — Structured collections of records with defined schemas. Support simple, advanced, external (connected databases/APIs), and system (pre-built) types. Every data source — internal or external — is exposed through a single, unified CRUD endpoint.
16
+ - **Fields** — 45+ field types that define the schema of each data source, covering text, numbers, dates, selections, relations, files, formulas, nested data, and more.
17
+ - **Enumerations** — Reusable option sets for selection fields, with color, icon, and ordering support.
18
+ - **Custom Queries** — SQL-based analytics templates with dynamic variable interpolation, runtime filters, and multi-database targeting.
19
+ - **Automations** — Event-driven workflows with triggers (record changes, time-based, webhooks, buttons) and action chains (email, notifications, HTTP requests, AI prompts, record operations).
20
+
21
+ For detailed specifications of each building block, see [references/core-building-blocks.md](references/core-building-blocks.md).
22
+
23
+ ## Key Feature Areas
24
+
25
+ ### Querying & Data Operations
26
+
27
+ Unified query engine with column selection, 50+ filter operators, aggregations, formulas, pivots, child queries, and full-text search. Full CRUD with bulk operations.
28
+
29
+ See [references/querying-and-data-operations.md](references/querying-and-data-operations.md).
30
+
31
+ For complete query payload reference with examples, see [references/data-source-query-guide.md](references/data-source-query-guide.md).
32
+
33
+ For block formula design (inline expressions and subqueries), see [references/formula-design-guide-llm.md](references/formula-design-guide-llm.md).
34
+
35
+ ### AI Capabilities
36
+
37
+ AI agent builder with tool binding, knowledge bases, MCP servers, 18+ model providers, agent chaining, task scheduling, persistent memory, chat integrations, and evaluation metrics.
38
+
39
+ See [references/ai-capabilities.md](references/ai-capabilities.md).
40
+
41
+ ### Automation & Workflows
42
+
43
+ Event-driven automation engine with six trigger types and eleven action types. Supports conditional flows, action chains, and archiving.
44
+
45
+ See [references/automation-and-workflows.md](references/automation-and-workflows.md).
46
+
47
+ ### Authentication & Multi-Tenancy
48
+
49
+ OAuth2 flows (PKCE, Client Credentials, Device Code), scope-based permissions, tenant isolation, role-based and record-level ACL, and client portal system.
50
+
51
+ See [references/auth-and-multi-tenancy.md](references/auth-and-multi-tenancy.md).
52
+
53
+ ### Integrations & Events
54
+
55
+ Connector framework for HTTP and SQL providers, webhook management, collaborative document editing, in-app messaging, notifications, and email.
56
+
57
+ See [references/integrations-and-events.md](references/integrations-and-events.md).
58
+
59
+ ### Platform Services
60
+
61
+ App templates, data import/export, webforms, reporting & analytics, deployment, localization, audit logging, and billing.
62
+
63
+ See [references/platform-services.md](references/platform-services.md).
64
+
65
+ ### Developer Tools
66
+
67
+ Auto-generated OpenAPI specs, MCP server, full-featured CLI, REST API client libraries, React auth provider, and auto-generated collection hooks.
68
+
69
+ See [references/developer-tools.md](references/developer-tools.md).
70
+
71
+ For full CLI command reference (all commands, options, and flags), see [references/docyrus-cli-usage.md](references/docyrus-cli-usage.md).
@@ -0,0 +1,43 @@
1
+ # AI Capabilities
2
+
3
+ ## AI Agent Builder
4
+
5
+ Create and manage AI agents with:
6
+
7
+ - **Tool binding** — Attach external functions and APIs as agent tools
8
+ - **Data source access** — Grant agents read/write access to specific data sources
9
+ - **Knowledge base** — Upload documents for RAG-powered context
10
+ - **MCP servers** — Connect Model Context Protocol servers for extended tool discovery
11
+ - **Multi-model support** — Choose from 18+ AI providers: OpenAI, Anthropic, Google (AI Studio & Vertex), AWS Bedrock, Groq, Replicate, Together, Mistral, Cohere, Azure, Fireworks, xAI, Portkey, Alibaba, DeepSeek, HuggingFace, OpenRouter, Nebius, Perplexity, Cerebras
12
+ - **Agent connections** — Chain agents as sub-agents or forward requests between agents
13
+ - **Workflow steps** — Define multi-step agent workflows with conditional logic
14
+
15
+ ## AI Task Scheduling
16
+
17
+ - Immediate, scheduled, and recurring (cron-based) agent task execution
18
+ - Task status tracking and result persistence
19
+
20
+ ## AI Memory
21
+
22
+ Persistent memory system with scoping levels: user, thread, agent, workspace, and global. Vector embeddings for semantic retrieval.
23
+
24
+ ## AI Chat Integrations
25
+
26
+ - Microsoft Teams and Google Chat installation and message mapping
27
+ - Thread-level conversation tracking across platforms
28
+
29
+ ## Generative Features
30
+
31
+ - Content enhancement and completion
32
+ - Design generation (logos, banners)
33
+ - Audio transcription (speech-to-text)
34
+ - Semantic search across records and documents
35
+ - AI-powered data import and field recommendations
36
+
37
+ ## AI Evaluation
38
+
39
+ 17 evaluation metrics including toxicity, hallucination, and faithfulness tracking for agent quality monitoring.
40
+
41
+ ## AI Usage Tracking
42
+
43
+ Per-model token usage and cost tracking for billing and optimization.
@@ -0,0 +1,35 @@
1
+ # Authentication & Multi-Tenancy
2
+
3
+ ## Authentication Methods
4
+
5
+ - **OAuth2 Authorization Code (PKCE)** — Browser-based apps
6
+ - **OAuth2 Client Credentials** — Server-to-server
7
+ - **OAuth2 Device Code** — CLI and headless environments
8
+ - **Automatic token refresh** — Transparent renewal with refresh tokens
9
+
10
+ ## Access Control
11
+
12
+ - **Scope-based permissions** — ReadWrite.All, User.Read, Architect.ReadWrite.All, AI.ReadWrite.All, MCP.Connect, and more
13
+ - **Tenant isolation** — Enforced data separation between tenants on every query
14
+ - **Role-based access** — Roles with granular permission sets
15
+ - **Record-level ACL** — Per-record ownership and sharing rules (private, read-only, read/update, full access)
16
+ - **Field-level ACL** — Restrict visibility or editability of individual fields per role
17
+
18
+ ## User Management
19
+
20
+ - User signup with email verification, profile management, avatar, preferences
21
+ - Password change/reset, email change workflows
22
+ - Multi-device support with device registration for push notifications
23
+ - Per-user AI feature access control
24
+
25
+ ## Multi-Tenancy
26
+
27
+ - Fully isolated data per tenant
28
+ - Multiple apps per tenant, each with scoped data sources
29
+ - Tenant-specific configurations, branding, and translations
30
+ - Organizational hierarchy with teams, roles, and user scoping
31
+
32
+ ## Portal System
33
+
34
+ - Client portal configuration with dedicated portal users, organizations, roles, and sessions
35
+ - Separate authentication and access control for external users
@@ -0,0 +1,30 @@
1
+ # Automation & Workflows
2
+
3
+ ## Automation Engine
4
+
5
+ Define event-driven workflows with triggers and action chains:
6
+
7
+ **Triggers:**
8
+
9
+ - Record created, modified, or deleted
10
+ - Time-based (after a period, recurring interval)
11
+ - Webhook (external event)
12
+ - Button activation (user action)
13
+ - Previous action (chaining)
14
+ - AI agent (agent-triggered)
15
+
16
+ **Actions:**
17
+
18
+ - Send email
19
+ - Send notification
20
+ - Create record
21
+ - Update records
22
+ - Request input
23
+ - Request approval
24
+ - Trigger HTTP request
25
+ - AI prompt
26
+ - AI agent execution
27
+ - Data source query
28
+ - Custom query execution
29
+
30
+ Automations support conditional flows, action chains, and soft-delete (archiving).
@@ -0,0 +1,53 @@
1
+ # Core Building Blocks
2
+
3
+ ## Data Sources
4
+
5
+ Data sources are the fundamental building block. Each data source represents a structured collection of records with a defined schema. Every data source — whether backed by an internal database table or a connected external REST API — is exposed through a single, unified CRUD endpoint. This means consumers interact with all data sources the same way regardless of where the data lives.
6
+
7
+ **Types:**
8
+
9
+ - **Simple** — Schema-flexible records. Quick to set up, ideal for lightweight or rapidly evolving data.
10
+ - **Advanced** — Fully structured data sources with dedicated columns per field. Supports base data sources (shared field inheritance across variants) and high-performance querying.
11
+ - **External** — Connected external REST API resources or databases mapped as data sources. External resources are accessed through the same unified API as internal data sources, abstracting away the underlying connection.
12
+ - **System** — Pre-built templates for common entities: documents, threads, messages, contacts, organizations, activities, tasks, events, calendars, time entries, projects, and sections.
13
+
14
+ **Ownership models:** App-scoped, tenant-custom, product-provided, system-built-in, or user-specific.
15
+
16
+ ## Fields
17
+
18
+ Every data source is composed of fields. 45+ field types cover all data modeling needs:
19
+
20
+ | Category | Field Types |
21
+ |---|---|
22
+ | **Text** | text, textarea, email, phone, URL, color, icon, display |
23
+ | **Rich content** | document editor, HTML editor, email editor, code editor |
24
+ | **Numeric** | number, money, currency, duration, rating, autonumber, identity |
25
+ | **Date & time** | date, dateTime, time, dateRange |
26
+ | **Boolean** | checkbox, switch |
27
+ | **Selection** | select, multiSelect, tagSelect, status, radioGroup |
28
+ | **Users** | userSelect, userMultiSelect |
29
+ | **Relations** | relation (lookup to another data source), list (virtual related records) |
30
+ | **Nested data** | inlineData (nested JSON arrays), inlineForm (nested objects) |
31
+ | **Files** | file, image, fileStorageFolder |
32
+ | **Computed** | formula (JSONata expressions), display (read-only computed) |
33
+ | **Workflow** | approvalStatus, taskList, todo |
34
+ | **Advanced** | json, queryBuilder, dynamic, schema, schemaRepeater, locationSelect |
35
+ | **System** | systemEnum, systemBuffer, systemVector, systemTextArray, systemUuidArray |
36
+
37
+ ## Enumerations
38
+
39
+ Multi-option fields (select, multiSelect, status, tagSelect) support enumerations with color, icon, and ordering. Enum sets allow sharing option lists across multiple fields.
40
+
41
+ ## Apps
42
+
43
+ Apps are the top-level container that groups data sources, views, forms, pages, navigation, and configurations into a deployable unit.
44
+
45
+ **Supported app types:** web, mobile, AI agent, integration, inline (embedded), client portal (web & mobile), Chrome extension, MS Office add-in, MS Outlook add-in, external (white-label), website, and website widget.
46
+
47
+ **App lifecycle:** draft → design → development → active → inactive, with archiving and permanent deletion.
48
+
49
+ **Customization layers:** Apps support per-tenant overrides for pages, views, menus, fields, and enums — allowing product apps to be tailored without forking.
50
+
51
+ ## Custom Queries
52
+
53
+ SQL-based analytics templates with variable interpolation. Support dynamic runtime filters, pagination, and multiple database targets. Built-in variables include tenant context, user identity, and custom filter expressions.
@@ -74,7 +74,7 @@ interface ISelectQueryParams {
74
74
 
75
75
  // --- Aggregation ---
76
76
  calculations?: ISelectQueryCalculationRule[] | null;
77
- showGroupSummaries?: boolean;
77
+ groupSummaries?: boolean;
78
78
 
79
79
  // --- Sorting ---
80
80
  orderBy?: string | ISelectQueryOrderBy | ISelectQueryOrderBy[];
@@ -94,7 +94,7 @@ interface ISelectQueryParams {
94
94
  cursorDateEnd?: string | null;
95
95
 
96
96
  // --- Advanced ---
97
- childQueries?: Record<string, IQueryChildQueryParams> | null;
97
+ childQueries?: ISelectQueryChildQueryParams[] | null;
98
98
  pivot?: {
99
99
  matrix: ISelectPivotMatrixQuery[];
100
100
  hideEmptyRows?: boolean;
@@ -700,7 +700,7 @@ Count unique emails:
700
700
  }
701
701
  ```
702
702
 
703
- ### `showGroupSummaries`
703
+ ### `groupSummaries`
704
704
 
705
705
  **Type:** `boolean`
706
706
  **Default:** `false`
@@ -837,16 +837,14 @@ Block subquery formulas can also be wrapped under an `expression` key:
837
837
  {
838
838
  "formulas": {
839
839
  "children_count": {
840
- "expression": {
841
- "from": "app_child_table",
842
- "with": "parent_field",
843
- "inputs": [{
844
- "kind": "aggregate",
845
- "name": "count",
846
- "distinct": true,
847
- "inputs": [{ "kind": "column", "name": "id" }]
848
- }]
849
- }
840
+ "from": "app_child_table",
841
+ "with": "parent_field",
842
+ "inputs": [{
843
+ "kind": "aggregate",
844
+ "name": "count",
845
+ "distinct": true,
846
+ "inputs": [{ "kind": "column", "name": "id" }]
847
+ }]
850
848
  }
851
849
  }
852
850
  }
@@ -1294,14 +1292,15 @@ interface ISelectPivotMatrixQuery {
1294
1292
 
1295
1293
  ## Child Queries
1296
1294
 
1297
- **Parameter:** `childQueries` — `Record<string, IQueryChildQueryParams> | null`
1295
+ **Parameter:** `childQueries` — `ISelectQueryChildQueryParams[] | null`
1298
1296
 
1299
1297
  Use `childQueries` to fetch related records from a child data source as a nested JSON array for each parent record. This is similar to a `LEFT JOIN` but returns results as an aggregated JSON array in a single column.
1300
1298
 
1301
1299
  ### Child Query Structure
1302
1300
 
1303
1301
  ```typescript
1304
- interface IQueryChildQueryParams {
1302
+ interface ISelectQueryChildQueryParams {
1303
+ alias: string; // alias for the child query
1305
1304
  from: string; // child data source slug in "appSlug_slug" format
1306
1305
  using: string; // field in the child DS that references the parent record
1307
1306
  columns?: string | null; // comma-separated columns to select from child
@@ -1317,8 +1316,9 @@ interface IQueryChildQueryParams {
1317
1316
  ```json
1318
1317
  {
1319
1318
  "columns": "id, name, matters",
1320
- "childQueries": {
1321
- "matters": {
1319
+ "childQueries": [
1320
+ {
1321
+ "alias": "matters",
1322
1322
  "from": "attornaid_matter",
1323
1323
  "using": "client",
1324
1324
  "columns": "name",
@@ -1328,7 +1328,7 @@ interface IQueryChildQueryParams {
1328
1328
  ]
1329
1329
  }
1330
1330
  }
1331
- }
1331
+ ]
1332
1332
  }
1333
1333
  ```
1334
1334
 
@@ -1359,8 +1359,9 @@ interface IQueryChildQueryParams {
1359
1359
  ```json
1360
1360
  {
1361
1361
  "columns": "id, product_name, recent_orders",
1362
- "childQueries": {
1363
- "recent_orders": {
1362
+ "childQueries": [
1363
+ {
1364
+ "alias": "recent_orders",
1364
1365
  "from": "shop_order_item",
1365
1366
  "using": "product",
1366
1367
  "columns": "order_date, quantity, total_price",
@@ -1372,7 +1373,7 @@ interface IQueryChildQueryParams {
1372
1373
  ]
1373
1374
  }
1374
1375
  }
1375
- }
1376
+ ]
1376
1377
  }
1377
1378
  ```
1378
1379
 
@@ -1381,8 +1382,9 @@ interface IQueryChildQueryParams {
1381
1382
  ```json
1382
1383
  {
1383
1384
  "columns": "id, name, order_stats",
1384
- "childQueries": {
1385
- "order_stats": {
1385
+ "childQueries": [
1386
+ {
1387
+ "alias": "order_stats",
1386
1388
  "from": "shop_order",
1387
1389
  "using": "customer",
1388
1390
  "calculations": [
@@ -1390,7 +1392,7 @@ interface IQueryChildQueryParams {
1390
1392
  { "field": "amount", "func": "sum", "name": "total_spent" }
1391
1393
  ]
1392
1394
  }
1393
- }
1395
+ ]
1394
1396
  }
1395
1397
  ```
1396
1398
 
@@ -1769,8 +1771,9 @@ Monthly sales report grouped by category:
1769
1771
  {
1770
1772
  "dataSourceFullSlug": "crm_customer",
1771
1773
  "columns": "id, name, email, recent_orders, open_tickets",
1772
- "childQueries": {
1773
- "recent_orders": {
1774
+ "childQueries": [
1775
+ {
1776
+ "alias": "recent_orders",
1774
1777
  "from": "shop_order",
1775
1778
  "using": "customer",
1776
1779
  "columns": "id, order_date, total_amount, ...status(status_label:name)",
@@ -1782,7 +1785,8 @@ Monthly sales report grouped by category:
1782
1785
  ]
1783
1786
  }
1784
1787
  },
1785
- "open_tickets": {
1788
+ {
1789
+ "alias": "open_tickets",
1786
1790
  "from": "support_ticket",
1787
1791
  "using": "customer",
1788
1792
  "columns": "id, subject, priority, created_on",
@@ -1794,7 +1798,7 @@ Monthly sales report grouped by category:
1794
1798
  ]
1795
1799
  }
1796
1800
  }
1797
- },
1801
+ ],
1798
1802
  "filters": {
1799
1803
  "rules": [
1800
1804
  { "field": "status", "operator": "=", "value": "active" }
@@ -0,0 +1,28 @@
1
+ # Developer Tools
2
+
3
+ ## OpenAPI Specification
4
+
5
+ - Auto-generated, tenant-specific OpenAPI specs reflecting all configured data sources and fields
6
+ - Regeneratable on-demand after schema changes
7
+ - Powers client SDK generation and API discovery
8
+
9
+ ## MCP Server (Model Context Protocol)
10
+
11
+ - Built-in MCP server exposing platform capabilities as AI-consumable tools
12
+ - Discovery, CRUD, querying, enum management, custom query execution, and JSONata evaluation — all accessible via MCP transport
13
+
14
+ ## CLI
15
+
16
+ - Full-featured CLI (`@docyrus/docyrus`) for terminal and AI agent use
17
+ - Commands: environment management, authentication, data operations, schema management (studio), app management, API discovery, AI chat, and direct API requests
18
+ - Multi-account, multi-tenant session management
19
+ - OpenAPI discovery with caching and fallback generation
20
+ - Interactive TUI mode
21
+
22
+ For full CLI command reference, see [docyrus-cli-usage.md](docyrus-cli-usage.md).
23
+
24
+ ## Client Libraries
25
+
26
+ - REST API client (`@docyrus/api-client`) with OAuth2 support, interceptors, streaming, and file operations
27
+ - React authentication provider (`@docyrus/signin`) with standalone OAuth2 PKCE and iframe postMessage modes
28
+ - Auto-generated collection hooks from OpenAPI specs for data fetching integration