@moda-ai/cli 1.14.1 → 1.14.3
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/dist/cli.js +0 -57
- package/dist/doctor.js +0 -6
- package/dist/init/index.js +0 -36
- package/dist/init/tenant.js +6 -3
- package/package.json +1 -1
- package/skills/integration/index.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -5,9 +5,6 @@ import { callDataAPI, ApiError, getApiRequestCount, resetApiRequestCount, } from
|
|
|
5
5
|
import { OverviewSchema, ClustersSchema, ClusterConversationsSchema, ConversationsSchema, SearchSchema, WorldStateSchema, ContextSchema, AuditSchema, FrustrationsSchema, ToolFailuresSchema, ToolFailureDetailSchema, } from './schemas.js';
|
|
6
6
|
import { withFrustrationAnchors, withToolFailureAnchors, embeddedWindowSize, asRecord, asString, asNumber } from './transforms.js';
|
|
7
7
|
import { runPromptsCommand } from './prompts.js';
|
|
8
|
-
// Coding-agent capture (shadow workspace / Shadow Spark / trace hooks) is temporarily
|
|
9
|
-
// disabled while the feature is finished — see the commented-out command registrations below.
|
|
10
|
-
// import { runHooksInstall, runSparkCommand, runWorkspaceCommand } from './workspace.js';
|
|
11
8
|
import { runSkillsCommand } from './skills.js';
|
|
12
9
|
import { runHarnessCommand } from './harness.js';
|
|
13
10
|
import { runSyncCommand } from './sync.js';
|
|
@@ -1034,60 +1031,6 @@ export const commandRegistry = createCommandRegistry([
|
|
|
1034
1031
|
resetApiRequestCountBeforeRun: true,
|
|
1035
1032
|
telemetry: 'result-and-error',
|
|
1036
1033
|
}),
|
|
1037
|
-
// Coding-agent capture commands disabled until the feature is production-ready.
|
|
1038
|
-
// Re-enable by restoring these registrations, the workspace.js import above, the
|
|
1039
|
-
// "Shadow workspace" help section, the init hooks phase, and the doctor spark/hook checks.
|
|
1040
|
-
// {
|
|
1041
|
-
// name: 'workspace',
|
|
1042
|
-
// description: 'Manage Moda shadow workspace snapshots',
|
|
1043
|
-
// examples: ['moda workspace init', 'moda workspace snapshot --json', 'moda workspace explain'],
|
|
1044
|
-
// auth: 'none',
|
|
1045
|
-
// outputModes: ['human', 'json', 'agent'],
|
|
1046
|
-
// mutability: 'write',
|
|
1047
|
-
// validateConfigBeforeRun: false,
|
|
1048
|
-
// resetApiRequestCountBeforeRun: false,
|
|
1049
|
-
// telemetry: 'none',
|
|
1050
|
-
// handler: async (context) => ({
|
|
1051
|
-
// exitCode: await runWorkspaceCommand({
|
|
1052
|
-
// command: context.command,
|
|
1053
|
-
// positional: context.positional,
|
|
1054
|
-
// positionals: context.positionals,
|
|
1055
|
-
// flags: context.flags,
|
|
1056
|
-
// }),
|
|
1057
|
-
// }),
|
|
1058
|
-
// },
|
|
1059
|
-
// {
|
|
1060
|
-
// name: 'spark',
|
|
1061
|
-
// aliases: ['shadow'],
|
|
1062
|
-
// description: 'Manage Shadow Spark workspace snapshots',
|
|
1063
|
-
// examples: ['moda spark status', 'moda spark explain', 'moda spark snapshot --dry-run --json'],
|
|
1064
|
-
// auth: 'none',
|
|
1065
|
-
// outputModes: ['human', 'json', 'agent'],
|
|
1066
|
-
// mutability: 'write',
|
|
1067
|
-
// validateConfigBeforeRun: false,
|
|
1068
|
-
// resetApiRequestCountBeforeRun: false,
|
|
1069
|
-
// telemetry: 'none',
|
|
1070
|
-
// handler: runSparkCommand,
|
|
1071
|
-
// },
|
|
1072
|
-
// {
|
|
1073
|
-
// name: 'hooks',
|
|
1074
|
-
// description: 'Install coding-agent trace hooks',
|
|
1075
|
-
// examples: ['moda hooks install', 'moda hooks install --agent=all'],
|
|
1076
|
-
// auth: 'none',
|
|
1077
|
-
// outputModes: ['human', 'json', 'agent'],
|
|
1078
|
-
// mutability: 'write',
|
|
1079
|
-
// validateConfigBeforeRun: false,
|
|
1080
|
-
// resetApiRequestCountBeforeRun: false,
|
|
1081
|
-
// telemetry: 'none',
|
|
1082
|
-
// handler: async (context) => ({
|
|
1083
|
-
// exitCode: await runHooksInstall({
|
|
1084
|
-
// command: context.command,
|
|
1085
|
-
// positional: context.positional,
|
|
1086
|
-
// positionals: context.positionals,
|
|
1087
|
-
// flags: context.flags,
|
|
1088
|
-
// }),
|
|
1089
|
-
// }),
|
|
1090
|
-
// },
|
|
1091
1034
|
{
|
|
1092
1035
|
name: 'skills',
|
|
1093
1036
|
description: 'Generate, pull, and sync Moda skills',
|
package/dist/doctor.js
CHANGED
|
@@ -163,12 +163,6 @@ export async function buildDoctorReport(context, options) {
|
|
|
163
163
|
'__tests__',
|
|
164
164
|
]));
|
|
165
165
|
checks.push(sdkInitializationCheck(context.cwd));
|
|
166
|
-
// Coding-agent capture (Shadow Spark + trace hooks) is temporarily disabled, so doctor
|
|
167
|
-
// must not recommend its commands. `shadowSpark` in the status payload falls back to
|
|
168
|
-
// 'skipped' via checkStatus.
|
|
169
|
-
// checks.push(shadowSparkWorkspaceCheck(context.cwd, context.env));
|
|
170
|
-
// checks.push(hookCheck(context.env));
|
|
171
|
-
// checks.push(...hookTelemetryChecks(context.env, ingestUrl));
|
|
172
166
|
checks.push(validationEventPathCheck(ingestUrl));
|
|
173
167
|
if (options.offline || !apiKey) {
|
|
174
168
|
checks.push(...offlineCloudChecks(options.offline));
|
package/dist/init/index.js
CHANGED
|
@@ -8,8 +8,6 @@ import { detectAgents } from './mcp.js';
|
|
|
8
8
|
import { installRules } from './rules.js';
|
|
9
9
|
import { initPrompts, runPromptSync } from '../prompts.js';
|
|
10
10
|
import { runSkillSync } from '../skills.js';
|
|
11
|
-
// Coding-agent capture is temporarily disabled — see the hooks phase below.
|
|
12
|
-
// import { runHooksInstall } from '../workspace.js';
|
|
13
11
|
import { SDK_GUIDE_PATH, writeSdkIntegrationGuide } from './sdk-guide.js';
|
|
14
12
|
import { runSdkIntegration } from './sdk-integration.js';
|
|
15
13
|
import { createCommandContext } from '../command-context.js';
|
|
@@ -197,8 +195,6 @@ export async function runInit(flags, options = {}) {
|
|
|
197
195
|
// Step 5: Setup plan
|
|
198
196
|
log(renderInitStep(5, 7, 'Setup Plan', 'Every write/sync action is explicit before it is applied.'));
|
|
199
197
|
const setupPlan = buildSetupPlan({
|
|
200
|
-
// Coding-agent capture is temporarily disabled; never prompt for or install trace hooks.
|
|
201
|
-
// installHooks: await shouldIngestCodingAgentTraces(flags, yes),
|
|
202
198
|
installHooks: false,
|
|
203
199
|
integrateSdk: await shouldIntegrateSdk(flags, yes),
|
|
204
200
|
configureCiCd: await shouldConfigureCiCd(flags, yes),
|
|
@@ -219,25 +215,7 @@ export async function runInit(flags, options = {}) {
|
|
|
219
215
|
// Step 6: Apply approved setup changes.
|
|
220
216
|
log(renderInitStep(6, 7, 'Apply Approved Changes'));
|
|
221
217
|
emit('apply', 'Applying approved setup changes.');
|
|
222
|
-
// Coding-agent capture is temporarily disabled; the hooks phase never runs.
|
|
223
|
-
// const ingestCodingAgentTraces = setupPlan.find((action) => action.category === 'hooks')?.approved === true;
|
|
224
218
|
const ingestCodingAgentTraces = false;
|
|
225
|
-
// if (ingestCodingAgentTraces) {
|
|
226
|
-
// try {
|
|
227
|
-
// await runHooksInstall({
|
|
228
|
-
// command: 'hooks',
|
|
229
|
-
// positional: 'install',
|
|
230
|
-
// positionals: ['install'],
|
|
231
|
-
// flags: { agent: 'all', ...(human ? {} : { json: 'true' }) },
|
|
232
|
-
// });
|
|
233
|
-
// } catch (err) {
|
|
234
|
-
// const message = err instanceof Error ? err.message : String(err);
|
|
235
|
-
// warn(renderInitNote(`hook/telemetry install failed: ${message}`, 'warning'));
|
|
236
|
-
// warn(' Run `moda hooks install --agent=all` manually to enable traces.');
|
|
237
|
-
// }
|
|
238
|
-
// } else {
|
|
239
|
-
// log(renderInitNote('Skipped coding-agent trace ingestion', 'skipped'));
|
|
240
|
-
// }
|
|
241
219
|
const agents = detectAgents();
|
|
242
220
|
if (agents.length > 0) {
|
|
243
221
|
log(renderInitNote(`Detected coding agents: ${agents.join(', ')}`));
|
|
@@ -601,20 +579,6 @@ function resumeFlagsForInit(flags) {
|
|
|
601
579
|
}
|
|
602
580
|
return out;
|
|
603
581
|
}
|
|
604
|
-
// Coding-agent capture is temporarily disabled; restore this prompt with the hooks phase.
|
|
605
|
-
// async function shouldIngestCodingAgentTraces(
|
|
606
|
-
// flags: Record<string, unknown>,
|
|
607
|
-
// yes: boolean,
|
|
608
|
-
// ): Promise<boolean> {
|
|
609
|
-
// const explicit = parseOptionalBoolean(flagValue(flags, 'coding-agent-traces', 'coding_agent_traces'));
|
|
610
|
-
// if (explicit !== undefined) return explicit;
|
|
611
|
-
// if (isTruthyFlag(flagValue(flags, 'no-coding-agent-traces', 'no_coding_agent_traces'))) return false;
|
|
612
|
-
// if (yes) return true;
|
|
613
|
-
// return confirm({
|
|
614
|
-
// message: 'Ingest coding-agent traces for Claude Code, Codex, and Cursor?',
|
|
615
|
-
// default: true,
|
|
616
|
-
// });
|
|
617
|
-
// }
|
|
618
582
|
async function shouldConfigureCiCd(flags, yes) {
|
|
619
583
|
const explicit = parseOptionalBoolean(flagValue(flags, 'ci-cd', 'ci_cd', 'ci'));
|
|
620
584
|
if (explicit !== undefined)
|
package/dist/init/tenant.js
CHANGED
|
@@ -390,9 +390,12 @@ export async function selectTenantAndCreateKey(options = {}) {
|
|
|
390
390
|
throw new CliAccessError(parsed.message ||
|
|
391
391
|
'This organization has reached its CLI API key limit.', {
|
|
392
392
|
// Command-agnostic: this path is shared by `moda init` and
|
|
393
|
-
// `moda provision`.
|
|
394
|
-
|
|
395
|
-
|
|
393
|
+
// `moda provision`. Prefer asking an admin to raise the
|
|
394
|
+
// per-tenant cap; revoke/reuse remain valid escape hatches.
|
|
395
|
+
guidance: 'Ask your organization admin to raise the CLI key limit in the dashboard ' +
|
|
396
|
+
'(Settings → API Keys → CLI key limit), or revoke unused "CLI - ..." keys, ' +
|
|
397
|
+
'or reuse the existing key already saved in ~/.moda/config.json from a previous ' +
|
|
398
|
+
'moda init / moda provision --save, then retry.',
|
|
396
399
|
});
|
|
397
400
|
}
|
|
398
401
|
throw new Error(`Failed to create API key (409): ${body}`);
|
package/package.json
CHANGED