@descix/cli 1.0.6 → 1.0.8
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/README.md +1 -1
- package/agent-assets/guides/README.md +1 -1
- package/agent-assets/guides/dynamic-site-pattern.md +17 -30
- package/agent-assets/guides/knowledge-only-pattern.md +11 -15
- package/agent-assets/guides/microservice-pattern.md +12 -14
- package/agent-assets/guides/static-site-pattern.md +12 -15
- package/agent-assets/instructions/app-asset-validation.md +1 -1
- package/agent-assets/instructions/onboarding-flow.md +4 -4
- package/agent-assets/reference/app-creation.md +36 -101
- package/agent-assets/reference/architecture.md +43 -51
- package/agent-assets/reference/local-dev.md +1 -6
- package/agent-assets/reference/mcp-integration.md +21 -23
- package/agent-assets/reference/workspace-config.md +97 -340
- package/bin/descix.js +337 -618
- package/lib/api-client.js +30 -22
- package/lib/command-visibility.js +213 -0
- package/lib/commands/airdrop.js +10 -0
- package/lib/commands/auth.js +16 -2
- package/lib/commands/config.js +13 -31
- package/lib/commands/corpus.js +163 -59
- package/lib/commands/health.js +116 -21
- package/lib/commands/init.js +17 -45
- package/lib/commands/kb.js +7 -0
- package/lib/commands/retired-kb-sync.js +5 -27
- package/lib/commands/status.js +0 -9
- package/lib/core/Chunker.js +1 -1
- package/lib/core/CorpusWalker.js +238 -47
- package/lib/core/ManifestLoader.js +68 -0
- package/lib/core/Syncer.js +147 -46
- package/lib/interactive.js +158 -0
- package/lib/origin.js +3 -3
- package/lib/sdk-assets.js +28 -0
- package/lib/verb-invokes.generated.json +233 -0
- package/lib/wallet-file.js +36 -37
- package/lib/workspace-config.js +266 -199
- package/lib/workspace-identity.js +0 -1
- package/package.json +7 -3
- package/templates/agent-claude.md +1 -3
- package/templates/agent-cline.md +1 -2
- package/templates/agent-copilot.md +1 -2
- package/templates/agent-cursor.md +1 -2
- package/templates/scaffolds/microservice/SERVICE_README_sdk.md +1 -1
- package/templates/scaffolds/microservice/templates/SERVICE_README_TEMPLATE.md +2 -3
- package/agent-assets/rules/descix_mcp.template.mdc +0 -243
- package/lib/commands/briefer/errors.js +0 -88
- package/lib/commands/briefer/index.js +0 -319
- package/lib/commands/briefer/sources/canonical-sources.js +0 -129
- package/lib/commands/briefer/sources/entitlements.js +0 -220
- package/lib/commands/briefer/sources/environments.js +0 -205
- package/lib/commands/briefer/sources/identifiers.js +0 -214
- package/lib/commands/briefer/sources/microservice-deploy.js +0 -267
- package/lib/commands/briefer/sources/routing.js +0 -275
- package/lib/commands/briefer/sources/what-is-not.js +0 -223
- package/lib/commands/briefer/stitcher.js +0 -134
- package/lib/commands/briefer/util/source-reader.js +0 -502
- package/lib/commands/mcp.js +0 -273
- package/lib/commands/update.js +0 -581
- package/lib/wizard/setup.js +0 -503
- package/templates/descix_mcp.mdc +0 -122
package/README.md
CHANGED
|
@@ -75,7 +75,7 @@ now exit non-zero and name this replacement.
|
|
|
75
75
|
|
|
76
76
|
1. **Create** the knowledge base (once per KB):
|
|
77
77
|
```bash
|
|
78
|
-
descix
|
|
78
|
+
descix app init -a <app_id> --kb <kb_name>
|
|
79
79
|
```
|
|
80
80
|
2. **Author** a corpus manifest at `.descix/manifests/<kb_name>.json` describing the sources to sync.
|
|
81
81
|
3. **Sync** the corpus to the platform (Pinecone):
|
|
@@ -49,7 +49,7 @@ Does the user need a public website?
|
|
|
49
49
|
### Dynamic Site
|
|
50
50
|
- SSR app where microservice serves the site
|
|
51
51
|
- Everything in `microservice/` (no separate `site/`)
|
|
52
|
-
- Commands: `descix microservice
|
|
52
|
+
- Commands: `descix microservice init`, `descix serve` locally; public microservice deploy is not open
|
|
53
53
|
|
|
54
54
|
## Two-Tier Template System
|
|
55
55
|
|
|
@@ -61,41 +61,35 @@ Keeping the scaffold's shape is what lets the service keep inheriting platform b
|
|
|
61
61
|
|
|
62
62
|
## Configuration (`workspace.json`)
|
|
63
63
|
|
|
64
|
+
One `env.products[]` entry, written by `descix app init` and `descix app set-port` (never by hand):
|
|
65
|
+
|
|
64
66
|
```json
|
|
65
67
|
{
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
"sync_mode": "git",
|
|
72
|
-
"service": {
|
|
73
|
-
"port": 4000,
|
|
74
|
-
"devCommand": "npm run dev"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
68
|
+
"appId": "my-community-my-dynamic-app",
|
|
69
|
+
"communityId": "my-community",
|
|
70
|
+
"localPath": "my-dynamic-app",
|
|
71
|
+
"kbId": "General",
|
|
72
|
+
"microservice": { "port": 4001 }
|
|
80
73
|
}
|
|
81
74
|
```
|
|
82
75
|
|
|
76
|
+
`descix microservice init` refuses to run until `microservice.port` is set: the gateway routes
|
|
77
|
+
`/s/<app_id>` to that port and the service must start on it.
|
|
78
|
+
|
|
83
79
|
## CLI Workflow
|
|
84
80
|
|
|
85
81
|
```bash
|
|
86
82
|
# 1. Create microservice scaffold
|
|
87
83
|
descix microservice init
|
|
88
84
|
|
|
89
|
-
# 2. Add SSR routes to your service
|
|
90
|
-
|
|
91
|
-
# 3. Deploy to Cloud Run (ADMIN/LOCAL ONLY — see note below)
|
|
92
|
-
descix microservice deploy
|
|
85
|
+
# 2. Add SSR routes to your service, run it locally behind the gateway
|
|
86
|
+
descix serve
|
|
93
87
|
|
|
94
|
-
#
|
|
88
|
+
# 3. Register and vectorize (after the service is deployed — see Deployment)
|
|
95
89
|
descix microservice register
|
|
96
90
|
descix microservice vectorize
|
|
97
91
|
|
|
98
|
-
#
|
|
92
|
+
# 4. Sync KB
|
|
99
93
|
descix kb corpus sync -c <community> -a <app>
|
|
100
94
|
```
|
|
101
95
|
|
|
@@ -128,13 +122,6 @@ descix kb corpus sync -c <community> -a <app>
|
|
|
128
122
|
|
|
129
123
|
Dynamic sites deploy to Google Cloud Run as a single container. The service handles both API requests and page rendering.
|
|
130
124
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
descix
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
> **`descix microservice deploy` is not open to every developer yet.** Its own help
|
|
137
|
-
> marks it `[ADMIN/LOCAL]` — it shells out to the platform deploy script — and the
|
|
138
|
-
> CLI states that public MCP deploy is "coming soon". If you are not a platform
|
|
139
|
-
> admin, expect this step to fail on permissions rather than on your code. Build and
|
|
140
|
-
> run locally with `descix serve` until the public path lands.
|
|
125
|
+
> **Public microservice deploy is not open.** The CLI has no deploy verb for developers; a
|
|
126
|
+
> microservice reaches Cloud Run only through the platform team. Build and run it locally
|
|
127
|
+
> with `descix serve`.
|
|
@@ -38,18 +38,15 @@ my-docs/
|
|
|
38
38
|
|
|
39
39
|
## Configuration (`workspace.json`)
|
|
40
40
|
|
|
41
|
+
One `env.products[]` entry, written by `descix app init` (never by hand); no `site` and no
|
|
42
|
+
`microservice` slot:
|
|
43
|
+
|
|
41
44
|
```json
|
|
42
45
|
{
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"localPath": "my-community/my-docs",
|
|
48
|
-
"sync_mode": "git"
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
46
|
+
"appId": "my-community-my-docs",
|
|
47
|
+
"communityId": "my-community",
|
|
48
|
+
"localPath": "my-docs",
|
|
49
|
+
"kbId": "General"
|
|
53
50
|
}
|
|
54
51
|
```
|
|
55
52
|
|
|
@@ -68,13 +65,12 @@ descix drive push -c <community> -a <app>
|
|
|
68
65
|
# 4. Pull converted text back
|
|
69
66
|
descix drive pull -c <community> -a <app>
|
|
70
67
|
|
|
71
|
-
# 5.
|
|
72
|
-
descix kb corpus sync -
|
|
73
|
-
|
|
74
|
-
# 6. Sync to Pinecone
|
|
75
|
-
descix kb corpus sync -c <community> -a <app>
|
|
68
|
+
# 5. Commit the pulled markdown, name its folder in .descix/manifests/<KB>.json, then chunk + sync to Pinecone in one pass
|
|
69
|
+
descix kb corpus sync -a <app>
|
|
76
70
|
```
|
|
77
71
|
|
|
72
|
+
The git path needs no Drive at all: commit markdown, name it in the manifest, run step 5.
|
|
73
|
+
|
|
78
74
|
## Capabilities
|
|
79
75
|
|
|
80
76
|
| Capability | Enabled |
|
|
@@ -85,25 +85,23 @@ out until something depends on the difference.
|
|
|
85
85
|
|
|
86
86
|
## Configuration (`workspace.json`)
|
|
87
87
|
|
|
88
|
+
One `env.products[]` entry, written by `descix app init`, `descix app set-port` and (for the optional
|
|
89
|
+
frontend) `descix app set-site` — never by hand:
|
|
90
|
+
|
|
88
91
|
```json
|
|
89
92
|
{
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
"service": {
|
|
97
|
-
"port": 4000,
|
|
98
|
-
"devCommand": "npm run start"
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
93
|
+
"appId": "my-community-my-service",
|
|
94
|
+
"communityId": "my-community",
|
|
95
|
+
"localPath": "my-service",
|
|
96
|
+
"kbId": "General",
|
|
97
|
+
"site": { "static": "site" },
|
|
98
|
+
"microservice": { "port": 4001 }
|
|
104
99
|
}
|
|
105
100
|
```
|
|
106
101
|
|
|
102
|
+
`descix microservice init` refuses to run until `microservice.port` is set: the gateway routes
|
|
103
|
+
`/s/<app_id>` to that port and the service must start on it.
|
|
104
|
+
|
|
107
105
|
## CLI Workflow
|
|
108
106
|
|
|
109
107
|
```bash
|
|
@@ -45,25 +45,22 @@ my-site/
|
|
|
45
45
|
|
|
46
46
|
## Configuration (`workspace.json`)
|
|
47
47
|
|
|
48
|
+
One `env.products[]` entry, written by `descix app init` and `descix app set-site` (never by hand):
|
|
49
|
+
|
|
48
50
|
```json
|
|
49
51
|
{
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"sync_mode": "git",
|
|
56
|
-
"site": {
|
|
57
|
-
"port": 3000,
|
|
58
|
-
"devCommand": "npm run docs:dev"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
52
|
+
"appId": "my-community-my-site",
|
|
53
|
+
"communityId": "my-community",
|
|
54
|
+
"localPath": "my-site",
|
|
55
|
+
"kbId": "General",
|
|
56
|
+
"site": { "static": "site" }
|
|
64
57
|
}
|
|
65
58
|
```
|
|
66
59
|
|
|
60
|
+
For a framework dev server instead of files on disk, `descix app set-site -a <app_id> --port 3000`
|
|
61
|
+
writes `"site": { "port": 3000 }`; the gateway proxies `/p/<app_id>` to it without rewriting paths,
|
|
62
|
+
so the framework's base path must be `/p/<app_id>/`.
|
|
63
|
+
|
|
67
64
|
## CLI Workflow
|
|
68
65
|
|
|
69
66
|
```bash
|
|
@@ -116,4 +113,4 @@ This copies the site template with:
|
|
|
116
113
|
|
|
117
114
|
## Deployment
|
|
118
115
|
|
|
119
|
-
|
|
116
|
+
`descix site upload -a <app_id>` uploads the files (delta) to the app's site prefix in Google Cloud Storage and records the deploy manifest. The app is then served on its own host, `https://<app_id>.dev.descix.net/` on DEV and `https://<app_id>.descix.net/` on PROD; `descix site status -c <community> -a <app_id>` shows the deployed manifest.
|
|
@@ -334,7 +334,7 @@ This folder doesn't appear to be configured as a DeSciX app.
|
|
|
334
334
|
|
|
335
335
|
Options:
|
|
336
336
|
1. Run `descix init` to configure this folder as a new app
|
|
337
|
-
2. Run `descix
|
|
337
|
+
2. Run `descix quickstart` to configure the entire workspace
|
|
338
338
|
3. Check if this is the correct folder
|
|
339
339
|
|
|
340
340
|
Which would you like to do?
|
|
@@ -17,13 +17,13 @@ Purpose: Maps local folders to DeSciX apps and stores all configuration.
|
|
|
17
17
|
```json
|
|
18
18
|
{
|
|
19
19
|
"version": "2.0",
|
|
20
|
-
"primaryCommunity": "
|
|
20
|
+
"primaryCommunity": "daita",
|
|
21
21
|
"communities": {
|
|
22
|
-
"
|
|
22
|
+
"daita": {
|
|
23
23
|
"apps": {
|
|
24
24
|
"appsdk": {
|
|
25
|
-
"localPath": "
|
|
26
|
-
"absolutePath": "/path/to/workspace/
|
|
25
|
+
"localPath": "daita/appsdk",
|
|
26
|
+
"absolutePath": "/path/to/workspace/daita/appsdk",
|
|
27
27
|
"kbId": "General"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -4,16 +4,17 @@
|
|
|
4
4
|
**Version:** 2.0
|
|
5
5
|
**Last Updated:** January 2026
|
|
6
6
|
|
|
7
|
-
This document describes how apps and communities are created
|
|
7
|
+
This document describes how apps and communities are created in the DeSciX platform and how the local workspace for an app is set up.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
## 1. Core Philosophy
|
|
12
12
|
|
|
13
|
-
**"
|
|
13
|
+
**"One path to an app"**
|
|
14
14
|
|
|
15
|
-
- **
|
|
16
|
-
- **
|
|
15
|
+
- **Apps:** `descix app init -a <name> -c <community> -p <dir>` creates the app on the platform (`create_app_for_community`, which composes the id `<community>-<short>` and guarantees the default KB) and registers it in the local workspace in one idempotent step. The PWA creates apps too; both reach the same server command. Entitlement checks run server-side either way.
|
|
16
|
+
- **Communities:** created by platform admins only (`descix community create` is `[ADMIN]` and writes live Polygon). A developer builds inside an existing community.
|
|
17
|
+
- **Development:** the CLI is the tool for the local workspace, content, and syncing to the cloud.
|
|
17
18
|
|
|
18
19
|
**Important Distinction:**
|
|
19
20
|
|
|
@@ -128,7 +129,7 @@ the file to open first.
|
|
|
128
129
|
|
|
129
130
|
### Adding Scaffolds to Apps
|
|
130
131
|
|
|
131
|
-
After
|
|
132
|
+
After `descix app init` (or PWA creation), add code scaffolds via CLI:
|
|
132
133
|
|
|
133
134
|
```bash
|
|
134
135
|
# Add site scaffold
|
|
@@ -213,96 +214,29 @@ sequenceDiagram
|
|
|
213
214
|
|
|
214
215
|
---
|
|
215
216
|
|
|
216
|
-
## 4. Workspace
|
|
217
|
+
## 4. Local Workspace
|
|
217
218
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
### Flow
|
|
221
|
-
|
|
222
|
-
1. User completes device login (`descix login --setup`)
|
|
223
|
-
2. PWA opens with Workspace Builder
|
|
224
|
-
3. User selects/creates apps to include
|
|
225
|
-
4. PWA returns `workspace_config` to CLI
|
|
226
|
-
5. CLI hydrates local folders
|
|
227
|
-
|
|
228
|
-
### Workspace Config Response
|
|
229
|
-
|
|
230
|
-
```json
|
|
231
|
-
{
|
|
232
|
-
"workspace_config": {
|
|
233
|
-
"communities": {
|
|
234
|
-
"descix": {
|
|
235
|
-
"apps": {
|
|
236
|
-
"agent": {
|
|
237
|
-
"localPath": "descix/agent",
|
|
238
|
-
"sync_mode": "git"
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
},
|
|
244
|
-
"drive_config": {
|
|
245
|
-
"base_folder_id": "1ABC..."
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
---
|
|
251
|
-
|
|
252
|
-
## 5. CLI Hydration
|
|
253
|
-
|
|
254
|
-
### Setup Command
|
|
219
|
+
There is no PWA "workspace builder" hand-off and no hydration step. The local workspace is built by
|
|
220
|
+
CLI verbs, each writing one part of `.descix/workspace.json` (v2.1 — see `workspace-config.md`):
|
|
255
221
|
|
|
256
222
|
```bash
|
|
257
|
-
descix
|
|
223
|
+
descix config init --env dev # creates .descix/workspace.json, pins env.apiUrl
|
|
224
|
+
descix login # .descix/wallet.json (add it to .gitignore yourself)
|
|
225
|
+
descix app init -a <name> -c <community> -p . # env.products[] entry + site/ microservice/ assets/ + default KB
|
|
226
|
+
descix app set-site -a <app_id> --static site # what the gateway serves at /p/<app_id>
|
|
227
|
+
descix app set-port -a <app_id> -p 4001 # required before descix microservice init
|
|
258
228
|
```
|
|
259
229
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
6. Create local folder structure
|
|
267
|
-
7. Pull content from Drive
|
|
268
|
-
|
|
269
|
-
### Hydration Process
|
|
270
|
-
|
|
271
|
-
The `Hydrator` module handles all folder creation and content sync:
|
|
272
|
-
|
|
273
|
-
```javascript
|
|
274
|
-
// Hydrator.hydrateWorkspace() creates:
|
|
275
|
-
[workspace]/
|
|
276
|
-
├── .descix/
|
|
277
|
-
│ └── workspace.json # Workspace configuration (sole config file)
|
|
278
|
-
├── [community]/[app]/
|
|
279
|
-
│ ├── assets/
|
|
280
|
-
│ ├── kb/
|
|
281
|
-
│ │ ├── staging/ # For local files to push to Drive
|
|
282
|
-
│ │ ├── General/ # Converted text from Drive
|
|
283
|
-
│ │ └── chunks/ # Generated chunk files
|
|
284
|
-
│ ├── site/ # Optional: for CodeSite
|
|
285
|
-
│ └── microservice/ # Optional: for backend service
|
|
286
|
-
└── .gitignore # Updated with .descix/wallet.json
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
**Note:** App configuration is stored in `workspace.json`, not in per-app `context.json` files. The CLI auto-detects app context based on the current working directory.
|
|
290
|
-
|
|
291
|
-
### Hydrating Individual Apps
|
|
292
|
-
|
|
293
|
-
After initial setup, users can hydrate specific apps:
|
|
294
|
-
|
|
295
|
-
```bash
|
|
296
|
-
# Pull entire app from Drive
|
|
297
|
-
descix drive pull -c community -a app
|
|
298
|
-
|
|
299
|
-
# Or use the build command for full pipeline
|
|
300
|
-
descix kb corpus sync
|
|
301
|
-
```
|
|
230
|
+
`descix app init` creates `site/`, `microservice/` and `assets/` (with starter
|
|
231
|
+
`system_instructions.md` and `app_description.md`) under the app directory. Knowledge-base content
|
|
232
|
+
is whatever your corpus manifest names (`.descix/manifests/<KB>.json`); Drive content arrives via
|
|
233
|
+
`descix drive pull -c <community> -a <app_id>` into `kb/<KB>/` and goes back via `descix drive push`.
|
|
234
|
+
The CLI auto-detects the app from the directory you are standing in; `-c`/`-a` flags win over
|
|
235
|
+
detection.
|
|
302
236
|
|
|
303
237
|
---
|
|
304
238
|
|
|
305
|
-
##
|
|
239
|
+
## 5. Folder Structure Standards
|
|
306
240
|
|
|
307
241
|
### App Folders
|
|
308
242
|
|
|
@@ -328,7 +262,7 @@ descix kb corpus sync
|
|
|
328
262
|
|
|
329
263
|
---
|
|
330
264
|
|
|
331
|
-
##
|
|
265
|
+
## 6. Entitlement Checks
|
|
332
266
|
|
|
333
267
|
App creation requires appropriate entitlements:
|
|
334
268
|
|
|
@@ -343,7 +277,7 @@ The PWA and backend enforce these checks before template copying.
|
|
|
343
277
|
|
|
344
278
|
---
|
|
345
279
|
|
|
346
|
-
##
|
|
280
|
+
## 7. Key Backend Functions
|
|
347
281
|
|
|
348
282
|
### Template Copying
|
|
349
283
|
|
|
@@ -366,28 +300,29 @@ async function copyFolderRecursive(sourceFolderId, destParentId, newName) {
|
|
|
366
300
|
|
|
367
301
|
---
|
|
368
302
|
|
|
369
|
-
##
|
|
303
|
+
## 8. CLI Commands
|
|
370
304
|
|
|
371
|
-
### App
|
|
305
|
+
### App Creation
|
|
372
306
|
|
|
373
|
-
|
|
307
|
+
```bash
|
|
308
|
+
descix config init --env dev # pin the environment first (no default)
|
|
309
|
+
descix login # device-code sign-in
|
|
310
|
+
descix app init -a <name> -c <community> -p . # create on the platform + register locally + default KB
|
|
311
|
+
```
|
|
374
312
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
3. Run `descix mcp quickstart` or `descix login --setup` to hydrate
|
|
313
|
+
An app created in the PWA is initialized locally with the same verb, minus `-c`:
|
|
314
|
+
`descix app init -a <app_id> -p .`.
|
|
378
315
|
|
|
379
316
|
### Post-Creation Commands
|
|
380
317
|
|
|
381
318
|
```bash
|
|
382
|
-
#
|
|
383
|
-
descix
|
|
384
|
-
descix kb corpus sync # Pull, chunk, sync KB
|
|
385
|
-
descix site upload -a app # Deploy static site
|
|
319
|
+
descix kb corpus sync -a <app_id> # chunk + sync the manifest's sources to Pinecone
|
|
320
|
+
descix site upload -a <app_id> # deploy the static site
|
|
386
321
|
```
|
|
387
322
|
|
|
388
323
|
---
|
|
389
324
|
|
|
390
|
-
##
|
|
325
|
+
## 9. File References
|
|
391
326
|
|
|
392
327
|
| Component | Path | Description |
|
|
393
328
|
|-----------|------|-------------|
|
|
@@ -397,7 +332,7 @@ descix site upload -a app # Deploy static site
|
|
|
397
332
|
| Template Config | `DeSciX_Cloud/microservice/defaults-config.json` | Template folder IDs |
|
|
398
333
|
| Drive Templates | `DeSciX_Core/descix-cli/templates/drive/` | Content templates |
|
|
399
334
|
| Git Scaffolds | `DeSciX_Core/descix-cli/templates/scaffolds/` | Code scaffolds |
|
|
400
|
-
| Hydrator | `DeSciX_Core/descix-cli/lib/core/Hydrator.js` |
|
|
335
|
+
| Hydrator | `DeSciX_Core/descix-cli/lib/core/Hydrator.js` | `copyScaffold` — copies the site / microservice scaffold into an app |
|
|
401
336
|
| WorkspaceConfig | `DeSciX_Core/descix-cli/lib/workspace-config.js` | CLI configuration |
|
|
402
337
|
| Setup Command | `DeSciX_Core/descix-cli/lib/wizard/setup.js` | Initial setup |
|
|
403
338
|
| Scaffold Command | `DeSciX_Core/descix-cli/bin/descix.js` | CLI scaffolds |
|
|
@@ -41,7 +41,7 @@ All core SDK logic resides in `DeSciX_Core/descix-cli/lib/core/`.
|
|
|
41
41
|
|
|
42
42
|
| Function | Description |
|
|
43
43
|
|----------|-------------|
|
|
44
|
-
| `
|
|
44
|
+
| `copyScaffold(type, appPath, options)` | Copy the `site` or `microservice` scaffold into an app (`descix site init` / `descix microservice init`) |
|
|
45
45
|
| `hydrateApp(config, options)` | Pull entire app from Drive |
|
|
46
46
|
| `hydrateKb(config, options)` | Pull and convert KB files from Drive |
|
|
47
47
|
| `pushStaging(config, options)` | Upload files from `kb/staging/` to Drive |
|
|
@@ -146,65 +146,57 @@ All core SDK logic resides in `DeSciX_Core/descix-cli/lib/core/`.
|
|
|
146
146
|
|
|
147
147
|
```json
|
|
148
148
|
{
|
|
149
|
-
"version": "2.
|
|
150
|
-
"
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
}
|
|
149
|
+
"version": "2.1",
|
|
150
|
+
"type": "workspace",
|
|
151
|
+
"workspaceRoot": "/path/to/workspace",
|
|
152
|
+
"env": {
|
|
153
|
+
"environment": "DEV",
|
|
154
|
+
"apiUrl": "https://dev.descix.net",
|
|
155
|
+
"gateway": { "port": 5599 },
|
|
156
|
+
"products": [
|
|
157
|
+
{
|
|
158
|
+
"appId": "daita-agent",
|
|
159
|
+
"communityId": "daita",
|
|
160
|
+
"localPath": "daita/agent",
|
|
161
|
+
"kbId": "General",
|
|
162
|
+
"site": { "port": 3000 },
|
|
163
|
+
"microservice": { "port": 4001 }
|
|
166
164
|
}
|
|
167
|
-
|
|
165
|
+
]
|
|
168
166
|
},
|
|
169
|
-
"driveConfig": {
|
|
170
|
-
"base_folder_id": "1ABC...",
|
|
171
|
-
"base_folder_name": "DeSciX"
|
|
172
|
-
}
|
|
167
|
+
"driveConfig": { "base_folder_id": "1ABC..." }
|
|
173
168
|
}
|
|
174
169
|
```
|
|
175
170
|
|
|
171
|
+
Every key is written by a CLI verb (`descix config init --env …`, `descix app init`, `descix app set-site`, `descix app set-port`, …) — see `workspace-config.md` for the key → verb table. A `communities` block without `env` (the v1 shape) is refused on load.
|
|
172
|
+
|
|
176
173
|
**Note:** `.descix.app/context.json` files are no longer used. All app configuration is stored in `workspace.json`. The CLI auto-detects app context from the current working directory by matching against registered app paths.
|
|
177
174
|
|
|
178
175
|
---
|
|
179
176
|
|
|
180
177
|
## 4. CLI Commands
|
|
181
178
|
|
|
182
|
-
The DeSciX CLI
|
|
179
|
+
The DeSciX CLI publishes content with one verb per plane. Each command resolves app context from `workspace.json` based on the current working directory, or takes `-a <app_id>` explicitly.
|
|
183
180
|
|
|
184
|
-
### 4.1
|
|
185
|
-
|
|
186
|
-
These commands auto-detect app context from `workspace.json` based on the current working directory.
|
|
181
|
+
### 4.1 Publish Commands
|
|
187
182
|
|
|
188
183
|
| Command | Description |
|
|
189
184
|
|---------|-------------|
|
|
190
|
-
| `descix
|
|
191
|
-
| `descix
|
|
192
|
-
| `descix
|
|
193
|
-
| `descix site upload` | Deploy CodeSite to GCS |
|
|
194
|
-
| ~~`descix update all`~~ | **Deleted.** There is no single all-resources verb. Run the three canonical commands: `descix app sync-assets`, `descix kb corpus sync`, `descix site upload`. |
|
|
195
|
-
|
|
196
|
-
### 4.2 KB Processing Commands (`descix kb`)
|
|
185
|
+
| `descix app sync-assets` | Sync app assets (`system_instructions.md`, `app_description.md`, `icon.png`) to the platform |
|
|
186
|
+
| `descix kb corpus sync` | Sync a knowledge base from the git files its manifest names to Pinecone |
|
|
187
|
+
| `descix site upload` | Deploy the site to GCS and record its path on the app |
|
|
197
188
|
|
|
198
|
-
|
|
189
|
+
### 4.2 KB Commands (`descix kb`, `descix drive`)
|
|
199
190
|
|
|
200
191
|
| Command | Description |
|
|
201
192
|
|---------|-------------|
|
|
202
|
-
| `descix
|
|
203
|
-
| `descix
|
|
204
|
-
| `descix kb corpus
|
|
205
|
-
| `descix kb
|
|
206
|
-
| `descix kb
|
|
207
|
-
| `descix
|
|
193
|
+
| `descix app init -a <app_id> --kb <kb_name>` | Create a knowledge base on the app |
|
|
194
|
+
| `descix kb corpus sync` | Sync the manifest's git files to Pinecone |
|
|
195
|
+
| `descix kb corpus status` | Show corpus sync state (files, chunks, last sync, resolved ref) |
|
|
196
|
+
| `descix kb list` | List knowledge bases for an app |
|
|
197
|
+
| `descix kb delete` | Delete a knowledge base (refuses a non-empty KB unless `--force`) |
|
|
198
|
+
| `descix drive pull` | Pull content from Drive and convert to local markdown |
|
|
199
|
+
| `descix drive push` | Push staging files to Drive |
|
|
208
200
|
|
|
209
201
|
### Scaffold Commands
|
|
210
202
|
|
|
@@ -212,7 +204,7 @@ These commands provide granular control over the V2 local-first pipeline.
|
|
|
212
204
|
|---------|-------------|
|
|
213
205
|
| `descix site init` | Copy site template to current app's `site/` folder |
|
|
214
206
|
| `descix site upload` | Deploy site to GCS |
|
|
215
|
-
| `descix site
|
|
207
|
+
| `descix app set-site -a <app_id> --port <port>` | Register the local dev-server port for the app's site (`env.products[].site.port`) |
|
|
216
208
|
| `descix microservice init` | Copy microservice template to current app's `microservice/` folder |
|
|
217
209
|
| `descix microservice register` | Register microservice with gateway |
|
|
218
210
|
| `descix microservice vectorize` | Vectorize README for discovery |
|
|
@@ -231,14 +223,15 @@ These commands provide granular control over the V2 local-first pipeline.
|
|
|
231
223
|
### Setup Command
|
|
232
224
|
|
|
233
225
|
```bash
|
|
234
|
-
descix
|
|
226
|
+
descix quickstart
|
|
235
227
|
```
|
|
236
228
|
|
|
237
229
|
Flow:
|
|
238
|
-
1.
|
|
239
|
-
2.
|
|
240
|
-
3.
|
|
241
|
-
4.
|
|
230
|
+
1. Device login in the browser (skipped when `.descix/wallet.json` holds a valid session)
|
|
231
|
+
2. Create `.descix/workspace.json` (skipped when a workspace already exists up the tree)
|
|
232
|
+
3. Write agent instruction files (`CLAUDE.md`, `.github/copilot-instructions.md`, `.cursorrules`, `.clinerules`)
|
|
233
|
+
4. Write `.vscode/mcp.json` (skipped when the DeSciX extension handles MCP)
|
|
234
|
+
5. Copy the SDK agent assets to `.descix/sdk-assets/` (fails loud if the package's assets are missing)
|
|
242
235
|
|
|
243
236
|
---
|
|
244
237
|
|
|
@@ -256,15 +249,15 @@ Flow:
|
|
|
256
249
|
|
|
257
250
|
```json
|
|
258
251
|
{
|
|
259
|
-
"community_id": "
|
|
252
|
+
"community_id": "daita",
|
|
260
253
|
"app_id": "agent",
|
|
261
254
|
"kb_id": "General",
|
|
262
255
|
"chunks": [
|
|
263
256
|
{
|
|
264
|
-
"id": "
|
|
257
|
+
"id": "daita_agent_General_research_0",
|
|
265
258
|
"text": "...",
|
|
266
259
|
"entity_type": "CHUNK",
|
|
267
|
-
"community_id": "
|
|
260
|
+
"community_id": "daita",
|
|
268
261
|
"app_id": "agent",
|
|
269
262
|
"knowledgebase_name": "General",
|
|
270
263
|
"file_id": "research.md",
|
|
@@ -347,7 +340,6 @@ gcloud auth application-default login \
|
|
|
347
340
|
```
|
|
348
341
|
|
|
349
342
|
**Verification:**
|
|
350
|
-
- `descix mcp quickstart` checks ADC before proceeding
|
|
351
343
|
- `Hydrator` calls `verifyDriveAuth()` before operations
|
|
352
344
|
|
|
353
345
|
### Backend Authentication
|
|
@@ -136,12 +136,7 @@ Check before you write: `--dry-run` enumerates would-be upserts and purges with
|
|
|
136
136
|
writes (exit 0 = no drift, 1 = drift), and `--show-walk` prints the resolved ref and the walked
|
|
137
137
|
files. `descix kb corpus status` shows files, chunks, last sync and resolved ref.
|
|
138
138
|
|
|
139
|
-
**Only
|
|
140
|
-
from disk but never enters a knowledge base. That matters for
|
|
141
|
-
`agent-assets/rules/descix_mcp.template.mdc`, which agents read as a file and which no amount of
|
|
142
|
-
KB querying will surface. If you fix something there, the fix reaches readers of the file and
|
|
143
|
-
nobody asking the KB — so do not assume KB coverage for a surface that has none. This is a known
|
|
144
|
-
boundary, not a defect.
|
|
139
|
+
**Only text extensions are ingested.** The corpus walk takes `.md .txt .js .mjs .cjs .ts .tsx .jsx .py .rs .go .sol .lean .json .jsonl .yaml .yml .toml .csv .tex .sh .bash` (`PROCESSABLE_EXTENSIONS` in `lib/core/CorpusWalker.js`); any other file in a manifest source, `.mdc` included, never enters a knowledge base.
|
|
145
140
|
|
|
146
141
|
#### What you put in a KB changes what comes out of it
|
|
147
142
|
|