@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
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
{
|
|
2
|
+
"admin-login": [
|
|
3
|
+
"admin_bootstrap_login"
|
|
4
|
+
],
|
|
5
|
+
"airdrop execute-queue": [
|
|
6
|
+
"airdrop_execute_queue"
|
|
7
|
+
],
|
|
8
|
+
"app delete": [
|
|
9
|
+
"delete_app"
|
|
10
|
+
],
|
|
11
|
+
"app init": [
|
|
12
|
+
"create_app_for_community",
|
|
13
|
+
"get_product_context",
|
|
14
|
+
"init_git_mode_kb"
|
|
15
|
+
],
|
|
16
|
+
"app invite": [
|
|
17
|
+
"create_app_invite"
|
|
18
|
+
],
|
|
19
|
+
"app list": [
|
|
20
|
+
"fetch_my_purchases"
|
|
21
|
+
],
|
|
22
|
+
"app media-upload": [
|
|
23
|
+
"get_asset_upload_token"
|
|
24
|
+
],
|
|
25
|
+
"app open": [],
|
|
26
|
+
"app set-api-url": [
|
|
27
|
+
"update_app_metadata"
|
|
28
|
+
],
|
|
29
|
+
"app set-default-model": [
|
|
30
|
+
"clear_app_default_model",
|
|
31
|
+
"set_app_default_model"
|
|
32
|
+
],
|
|
33
|
+
"app set-listed": [
|
|
34
|
+
"update_app"
|
|
35
|
+
],
|
|
36
|
+
"app set-localpath": [],
|
|
37
|
+
"app set-name": [
|
|
38
|
+
"update_app"
|
|
39
|
+
],
|
|
40
|
+
"app set-port": [],
|
|
41
|
+
"app set-price": [
|
|
42
|
+
"update_app_metadata"
|
|
43
|
+
],
|
|
44
|
+
"app set-repo": [
|
|
45
|
+
"set_app_repo"
|
|
46
|
+
],
|
|
47
|
+
"app set-site": [],
|
|
48
|
+
"app sync-assets": [
|
|
49
|
+
"sync_app_assets"
|
|
50
|
+
],
|
|
51
|
+
"app unmap": [],
|
|
52
|
+
"buy chains": [],
|
|
53
|
+
"buy poll": [
|
|
54
|
+
"get_quote_status"
|
|
55
|
+
],
|
|
56
|
+
"buy quote": [
|
|
57
|
+
"create_crypto_quote"
|
|
58
|
+
],
|
|
59
|
+
"buy status": [
|
|
60
|
+
"get_quote_status"
|
|
61
|
+
],
|
|
62
|
+
"chat": [
|
|
63
|
+
"ask_multiple_apps",
|
|
64
|
+
"ask_question_to_app"
|
|
65
|
+
],
|
|
66
|
+
"clone": [
|
|
67
|
+
"get_repo_credentials"
|
|
68
|
+
],
|
|
69
|
+
"community check-token": [
|
|
70
|
+
"check_token_symbol_available"
|
|
71
|
+
],
|
|
72
|
+
"community contract": [
|
|
73
|
+
"get_contract_details"
|
|
74
|
+
],
|
|
75
|
+
"community create": [
|
|
76
|
+
"create_community_skeleton"
|
|
77
|
+
],
|
|
78
|
+
"community delete": [
|
|
79
|
+
"delete_community"
|
|
80
|
+
],
|
|
81
|
+
"community deploy-token": [
|
|
82
|
+
"deploy_contract"
|
|
83
|
+
],
|
|
84
|
+
"community info": [
|
|
85
|
+
"get_community"
|
|
86
|
+
],
|
|
87
|
+
"community link-token": [
|
|
88
|
+
"link_contract_to_community"
|
|
89
|
+
],
|
|
90
|
+
"community list": [
|
|
91
|
+
"find_communities"
|
|
92
|
+
],
|
|
93
|
+
"community rename": [
|
|
94
|
+
"rename_community"
|
|
95
|
+
],
|
|
96
|
+
"config init": [],
|
|
97
|
+
"config set-dev-certs": [],
|
|
98
|
+
"config set-env": [],
|
|
99
|
+
"config set-gateway-port": [],
|
|
100
|
+
"config set-powch-url": [],
|
|
101
|
+
"config set-site-url": [],
|
|
102
|
+
"config set-url": [],
|
|
103
|
+
"config show": [],
|
|
104
|
+
"credits balance": [
|
|
105
|
+
"get_credit_balance"
|
|
106
|
+
],
|
|
107
|
+
"credits buy": [
|
|
108
|
+
"create_stripe_checkout_session"
|
|
109
|
+
],
|
|
110
|
+
"credits grant": [
|
|
111
|
+
"grant_credits"
|
|
112
|
+
],
|
|
113
|
+
"credits history": [
|
|
114
|
+
"get_credit_history"
|
|
115
|
+
],
|
|
116
|
+
"credits refund": [
|
|
117
|
+
"refund_credits"
|
|
118
|
+
],
|
|
119
|
+
"doctor": [],
|
|
120
|
+
"drive pull": [],
|
|
121
|
+
"drive push": [],
|
|
122
|
+
"health": [],
|
|
123
|
+
"init": [
|
|
124
|
+
"find_communities",
|
|
125
|
+
"resolve_invite"
|
|
126
|
+
],
|
|
127
|
+
"kb clear-override-model": [
|
|
128
|
+
"clear_kb_model_override"
|
|
129
|
+
],
|
|
130
|
+
"kb corpus status": [],
|
|
131
|
+
"kb corpus sync": [
|
|
132
|
+
"get_kb_rag_status",
|
|
133
|
+
"get_product_context",
|
|
134
|
+
"kb_delete_chunks",
|
|
135
|
+
"kb_list_file_ids",
|
|
136
|
+
"kb_sync_chunks",
|
|
137
|
+
"list_knowledge_bases"
|
|
138
|
+
],
|
|
139
|
+
"kb delete": [
|
|
140
|
+
"delete_knowledge_base"
|
|
141
|
+
],
|
|
142
|
+
"kb doctor": [
|
|
143
|
+
"get_kb_rag_status"
|
|
144
|
+
],
|
|
145
|
+
"kb list": [
|
|
146
|
+
"list_knowledge_bases"
|
|
147
|
+
],
|
|
148
|
+
"kb set-override-model": [
|
|
149
|
+
"set_kb_model_override"
|
|
150
|
+
],
|
|
151
|
+
"login": [
|
|
152
|
+
"device_check_status",
|
|
153
|
+
"device_request_login",
|
|
154
|
+
"sync_auto_purchases"
|
|
155
|
+
],
|
|
156
|
+
"logout": [],
|
|
157
|
+
"mcp execute": [],
|
|
158
|
+
"mcp-serve": [],
|
|
159
|
+
"microservice health": [
|
|
160
|
+
"service_health_check"
|
|
161
|
+
],
|
|
162
|
+
"microservice init": [],
|
|
163
|
+
"microservice list": [
|
|
164
|
+
"list_services"
|
|
165
|
+
],
|
|
166
|
+
"microservice register": [
|
|
167
|
+
"register_service"
|
|
168
|
+
],
|
|
169
|
+
"microservice register-delegate": [
|
|
170
|
+
"fetch_my_purchases",
|
|
171
|
+
"register_delegate"
|
|
172
|
+
],
|
|
173
|
+
"microservice reload": [
|
|
174
|
+
"reload_service_manifests"
|
|
175
|
+
],
|
|
176
|
+
"microservice restart": [],
|
|
177
|
+
"microservice vectorize": [
|
|
178
|
+
"vectorize_service_readme"
|
|
179
|
+
],
|
|
180
|
+
"new-chat": [],
|
|
181
|
+
"purchases": [
|
|
182
|
+
"fetch_my_purchases"
|
|
183
|
+
],
|
|
184
|
+
"quickstart": [
|
|
185
|
+
"device_check_status",
|
|
186
|
+
"device_request_login",
|
|
187
|
+
"find_communities",
|
|
188
|
+
"resolve_invite",
|
|
189
|
+
"sync_auto_purchases"
|
|
190
|
+
],
|
|
191
|
+
"reconnect": [
|
|
192
|
+
"reconnect_by_wallet"
|
|
193
|
+
],
|
|
194
|
+
"referral create": [
|
|
195
|
+
"generate_referral_code"
|
|
196
|
+
],
|
|
197
|
+
"role create": [
|
|
198
|
+
"create_role"
|
|
199
|
+
],
|
|
200
|
+
"serve": [],
|
|
201
|
+
"site delete": [
|
|
202
|
+
"delete_site_files"
|
|
203
|
+
],
|
|
204
|
+
"site init": [],
|
|
205
|
+
"site list": [
|
|
206
|
+
"list_site_files"
|
|
207
|
+
],
|
|
208
|
+
"site status": [
|
|
209
|
+
"get_site_manifest"
|
|
210
|
+
],
|
|
211
|
+
"site upload": [
|
|
212
|
+
"confirm_site_deploy",
|
|
213
|
+
"get_site_build_config",
|
|
214
|
+
"get_site_deploy_token"
|
|
215
|
+
],
|
|
216
|
+
"stats": [
|
|
217
|
+
"get_user_community_stats"
|
|
218
|
+
],
|
|
219
|
+
"status": [],
|
|
220
|
+
"store generate-summary": [
|
|
221
|
+
"generate_entity_summary"
|
|
222
|
+
],
|
|
223
|
+
"store search": [
|
|
224
|
+
"search_store"
|
|
225
|
+
],
|
|
226
|
+
"tell-me-how": [
|
|
227
|
+
"tell_me_how"
|
|
228
|
+
],
|
|
229
|
+
"whoami": [
|
|
230
|
+
"fetch_my_purchases",
|
|
231
|
+
"validate_session"
|
|
232
|
+
]
|
|
233
|
+
}
|
package/lib/wallet-file.js
CHANGED
|
@@ -68,30 +68,23 @@ export class WalletFileManager {
|
|
|
68
68
|
* @returns {Promise<boolean>} Success status
|
|
69
69
|
*/
|
|
70
70
|
static async saveWalletFile(walletPath, walletData) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
if (walletData.signature) {
|
|
80
|
-
walletData.API_KEY = walletData.signature;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// Ensure directory exists
|
|
84
|
-
const dir = path.dirname(walletPath);
|
|
85
|
-
await fs.mkdir(dir, { recursive: true });
|
|
71
|
+
// THROWS on any failure, never returns false. Every caller used to await this and ignore the
|
|
72
|
+
// boolean, so `descix login` printed "Login successful!" and a "saved to" path for a file that
|
|
73
|
+
// was never written (measured on PROD 2026-09-16). A save that did not happen must stop the
|
|
74
|
+
// caller.
|
|
75
|
+
const problems = this.walletFileProblems(walletData);
|
|
76
|
+
if (problems.length > 0) {
|
|
77
|
+
throw new Error(`refusing to write ${walletPath}: ${problems.join('; ')}`);
|
|
78
|
+
}
|
|
86
79
|
|
|
87
|
-
|
|
88
|
-
|
|
80
|
+
// WS-HEADLESS-MVP-A1 §2.5 — keep the API_KEY alias mirrored to the canonical
|
|
81
|
+
// signature so the on-disk file self-documents the alias (alias-only rename).
|
|
82
|
+
walletData.API_KEY = walletData.signature;
|
|
89
83
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
84
|
+
await fs.mkdir(path.dirname(walletPath), { recursive: true });
|
|
85
|
+
// Write file with restricted permissions (600)
|
|
86
|
+
await fs.writeFile(walletPath, JSON.stringify(walletData, null, 2), { mode: 0o600 });
|
|
87
|
+
return true;
|
|
95
88
|
}
|
|
96
89
|
|
|
97
90
|
/**
|
|
@@ -100,25 +93,31 @@ export class WalletFileManager {
|
|
|
100
93
|
* @returns {boolean} True if valid
|
|
101
94
|
*/
|
|
102
95
|
static validateWalletFile(walletData) {
|
|
96
|
+
return this.walletFileProblems(walletData).length === 0;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Every reason `walletData` is not a usable credential, named by FIELD, never by value — the
|
|
101
|
+
* messages are printed, and a signature is a credential. Empty array = valid.
|
|
102
|
+
* tokenSymbol and communityId are optional (may be absent in multi-community mode).
|
|
103
|
+
* @param {Object} walletData
|
|
104
|
+
* @returns {string[]}
|
|
105
|
+
*/
|
|
106
|
+
static walletFileProblems(walletData) {
|
|
103
107
|
if (!walletData || typeof walletData !== 'object') {
|
|
104
|
-
return
|
|
108
|
+
return ['the credential is not an object'];
|
|
105
109
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
// Note: tokenSymbol and communityId are optional (may be absent in multi-community mode)
|
|
109
|
-
const required = ['walletAddress', 'signature'];
|
|
110
|
-
for (const field of required) {
|
|
110
|
+
const problems = [];
|
|
111
|
+
for (const field of ['walletAddress', 'signature']) {
|
|
111
112
|
if (!walletData[field] || typeof walletData[field] !== 'string') {
|
|
112
|
-
|
|
113
|
+
problems.push(`${field} is empty`);
|
|
113
114
|
}
|
|
114
115
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
return false;
|
|
116
|
+
if (typeof walletData.walletAddress === 'string' && walletData.walletAddress
|
|
117
|
+
&& !/^0x[a-fA-F0-9]{40}$/.test(walletData.walletAddress)) {
|
|
118
|
+
problems.push('walletAddress is not a 0x-prefixed 40-hex-digit address');
|
|
119
119
|
}
|
|
120
|
-
|
|
121
|
-
return true;
|
|
120
|
+
return problems;
|
|
122
121
|
}
|
|
123
122
|
|
|
124
123
|
/**
|
|
@@ -237,8 +236,8 @@ export class WalletFileManager {
|
|
|
237
236
|
*/
|
|
238
237
|
static async createWalletFile(walletData, preferredPath = null) {
|
|
239
238
|
const walletPath = preferredPath || this.getDefaultWalletPath();
|
|
240
|
-
|
|
241
|
-
return
|
|
239
|
+
await this.saveWalletFile(walletPath, walletData);
|
|
240
|
+
return walletPath;
|
|
242
241
|
}
|
|
243
242
|
}
|
|
244
243
|
|