@descix/cli 1.0.5 → 1.0.7

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 (46) hide show
  1. package/README.md +130 -34
  2. package/agent-assets/guides/dynamic-site-pattern.md +10 -14
  3. package/agent-assets/guides/knowledge-only-pattern.md +11 -15
  4. package/agent-assets/guides/microservice-pattern.md +12 -14
  5. package/agent-assets/guides/static-site-pattern.md +12 -15
  6. package/agent-assets/instructions/onboarding-flow.md +4 -4
  7. package/agent-assets/reference/app-creation.md +36 -101
  8. package/agent-assets/reference/architecture.md +24 -27
  9. package/agent-assets/reference/local-dev.md +0 -4
  10. package/agent-assets/reference/mcp-integration.md +14 -22
  11. package/agent-assets/reference/workspace-config.md +97 -340
  12. package/agent-assets/rules/descix_mcp.template.mdc +1 -1
  13. package/bin/descix.js +159 -98
  14. package/lib/api-client.js +30 -22
  15. package/lib/commands/airdrop.js +10 -0
  16. package/lib/commands/auth.js +33 -3
  17. package/lib/commands/briefer/index.js +8 -5
  18. package/lib/commands/config.js +13 -31
  19. package/lib/commands/corpus.js +161 -54
  20. package/lib/commands/health.js +116 -21
  21. package/lib/commands/init.js +25 -48
  22. package/lib/commands/kb.js +14 -4
  23. package/lib/commands/update.js +0 -1
  24. package/lib/core/Chunker.js +1 -1
  25. package/lib/core/CorpusWalker.js +238 -47
  26. package/lib/core/Hydrator.js +88 -11
  27. package/lib/core/ManifestLoader.js +68 -0
  28. package/lib/core/Syncer.js +147 -46
  29. package/lib/interactive.js +158 -0
  30. package/lib/origin.js +3 -3
  31. package/lib/wallet-file.js +36 -37
  32. package/lib/wizard/setup.js +104 -22
  33. package/lib/workspace-config.js +325 -167
  34. package/lib/workspace-identity.js +0 -1
  35. package/package.json +3 -3
  36. package/templates/agent-claude.md +0 -3
  37. package/templates/agent-cline.md +0 -3
  38. package/templates/agent-copilot.md +0 -3
  39. package/templates/agent-cursor.md +0 -3
  40. package/templates/drive/app/kb/General/README.md +1 -1
  41. package/templates/drive_templates/agent_app_template/kb/General/README.md +1 -1
  42. package/templates/scaffolds/microservice/SERVICE_README_sdk.md +3 -3
  43. package/templates/scaffolds/microservice/defaults-config.json +3 -1
  44. package/templates/scaffolds/microservice/manifest.json +9 -5
  45. package/templates/scaffolds/microservice/package.json +1 -1
  46. package/templates/scaffolds/microservice/services/commandHandlers/sampleCommands.js +2 -2
@@ -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
- | `hydrateWorkspace(root, config, driveConfig, options)` | Full workspace setup with folder creation and Drive sync |
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,33 +146,30 @@ All core SDK logic resides in `DeSciX_Core/descix-cli/lib/core/`.
146
146
 
147
147
  ```json
148
148
  {
149
- "version": "2.0",
150
- "communities": {
151
- "descix": {
152
- "apps": {
153
- "agent": {
154
- "localPath": "descix/agent",
155
- "kbId": "General",
156
- "absolutePath": "/path/to/workspace/descix/agent",
157
- "site": {
158
- "port": 3000,
159
- "devCommand": "npm run docs:dev"
160
- },
161
- "service": {
162
- "port": 4001,
163
- "devCommand": "npm run start"
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
  ---
@@ -191,7 +188,7 @@ These commands auto-detect app context from `workspace.json` based on the curren
191
188
  | `descix app sync-assets` | Sync app assets (icon, description, instructions) to Drive |
192
189
  | `descix kb corpus sync` | Full three-stage sync (Local → Drive → GCS → Pinecone) |
193
190
  | `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`. |
191
+ | `descix update all` | App assets + site in sequence. It does **not** touch the knowledge base (`update kb` is removed): run `descix kb corpus sync` for that. |
195
192
 
196
193
  ### 4.2 KB Processing Commands (`descix kb`)
197
194
 
@@ -256,15 +253,15 @@ Flow:
256
253
 
257
254
  ```json
258
255
  {
259
- "community_id": "descix",
256
+ "community_id": "daita",
260
257
  "app_id": "agent",
261
258
  "kb_id": "General",
262
259
  "chunks": [
263
260
  {
264
- "id": "descix_agent_General_research_0",
261
+ "id": "daita_agent_General_research_0",
265
262
  "text": "...",
266
263
  "entity_type": "CHUNK",
267
- "community_id": "descix",
264
+ "community_id": "daita",
268
265
  "app_id": "agent",
269
266
  "knowledgebase_name": "General",
270
267
  "file_id": "research.md",
@@ -143,10 +143,6 @@ KB querying will surface. If you fix something there, the fix reaches readers of
143
143
  nobody asking the KB — so do not assume KB coverage for a surface that has none. This is a known
144
144
  boundary, not a defect.
145
145
 
146
- `descix kb chunk`, `descix kb sync` and `descix update kb` still run but are **superseded
147
- duplicates** — each names `kb corpus sync` as its replacement in its own `--help` and is slated
148
- for removal. Do not put them in new instructions.
149
-
150
146
  #### What you put in a KB changes what comes out of it
151
147
 
152
148
  Retrieval is **vocabulary-dominated**, and when it goes wrong it does so silently. Measured against
@@ -71,7 +71,7 @@ All MCP calls include a `_descix` context object for identity propagation:
71
71
  expires_at: "..."
72
72
  },
73
73
  workspace: {
74
- community_id: "descix",
74
+ community_id: "daita",
75
75
  app_id: "agent"
76
76
  }
77
77
  }
@@ -224,7 +224,7 @@ const plan = await tell_me_how({
224
224
  const result = await execute_remote_command({
225
225
  command: plan.recommended_tools[0].name,
226
226
  params: {
227
- community_id: "descix",
227
+ community_id: "daita",
228
228
  app_id: "agent",
229
229
  kb_id: "General"
230
230
  }
@@ -241,19 +241,13 @@ const result = await execute_remote_command({
241
241
  descix mcp quickstart
242
242
  │
243
243
  ▼
244
- Prerequisites Check (gcloud, ADC)
244
+ Requires a prior `descix login` (refuses and names it otherwise)
245
245
  │
246
246
  ▼
247
- Device Login (browser)
247
+ Setup wizard (lib/wizard/setup.js)
248
248
  │
249
249
  ▼
250
- Workspace Builder (PWA)
251
- │
252
- ▼
253
- Hydration (Hydrator module)
254
- │
255
- ▼
256
- Credentials Saved (.descix/wallet.json)
250
+ .cursor/rules/descix_mcp.mdc deployed
257
251
  │
258
252
  ▼
259
253
  ✓ Ready for agent interaction
@@ -290,18 +284,17 @@ When `--scope project` is used:
290
284
  4. Returns focused recommendations
291
285
 
292
286
  ```javascript
293
- // workspace.json
287
+ // workspace.json (v2.1)
294
288
  {
295
- "communities": {
296
- "descix": {
297
- "apps": {
298
- "agent": { "localPath": ".", "sync_mode": "git" }
299
- }
300
- }
289
+ "env": {
290
+ "apiUrl": "https://dev.descix.net",
291
+ "products": [
292
+ { "appId": "daita-agent", "communityId": "daita", "localPath": ".", "kbId": "General" }
293
+ ]
301
294
  }
302
295
  }
303
296
 
304
- // tell_me_how with project scope only searches within descix/agent
297
+ // tell_me_how with project scope only searches within daita-agent
305
298
  ```
306
299
 
307
300
  ---
@@ -319,12 +312,11 @@ descix tell-me-how "How do I sync my knowledge base?"
319
312
 
320
313
  ### 6.2 workspace.json from Hydration
321
314
 
322
- The `Hydrator` module creates `workspace.json` during setup:
315
+ `descix config init --env …` creates `workspace.json`; `descix app init` adds the app's `env.products[]` entry; `descix mcp quickstart` fills `driveConfig.base_folder_id`:
323
316
 
324
317
  ```javascript
325
- // Created by Hydrator.hydrateWorkspace()
326
318
  {
327
- "communities": { ... },
319
+ "env": { "apiUrl": "https://dev.descix.net", "products": [ /* one entry per app */ ] },
328
320
  "driveConfig": {
329
321
  "base_folder_id": "..." // For tell_me_how project scope
330
322
  }