@joripspace/cli 0.5.2 → 0.5.4

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/bin/joripspace.js CHANGED
@@ -180,6 +180,9 @@ async function main() {
180
180
  case 'get':
181
181
  await getProject(flags);
182
182
  return;
183
+ case 'report':
184
+ await reportAgentIssue(flags);
185
+ return;
183
186
  case 'db':
184
187
  await dbCommand(rest, flags);
185
188
  return;
@@ -431,6 +434,34 @@ async function getProject(flags) {
431
434
  });
432
435
  }
433
436
 
437
+ async function reportAgentIssue(flags) {
438
+ const project = requireProjectId(flags);
439
+ const category = (stringFlag(flags, 'category') || 'problem').trim().toLowerCase();
440
+ if (category !== 'problem' && category !== 'bug') {
441
+ throw new Error('report --category must be problem or bug');
442
+ }
443
+ const summary = (stringFlag(flags, 'summary') || stringFlag(flags, 'message')).trim();
444
+ if (!summary) throw new Error('report requires --summary');
445
+ const body = await apiRequest(flags, `/v1/projects/${encodeURIComponent(project)}/agent-reports`, {
446
+ method: 'POST',
447
+ ...projectAuth(flags),
448
+ body: {
449
+ category,
450
+ summary,
451
+ details: stringFlag(flags, 'details') || null,
452
+ expected: stringFlag(flags, 'expected') || null,
453
+ actual: stringFlag(flags, 'actual') || null,
454
+ error_code: stringFlag(flags, 'error-code') || null,
455
+ cli_version: require('../package.json').version,
456
+ runtime_version: process.version,
457
+ platform_name: process.platform,
458
+ },
459
+ });
460
+ output(flags, body, (value) => {
461
+ console.log(`Agent report submitted: ${value.report_id}`);
462
+ });
463
+ }
464
+
434
465
  async function dbCommand(rest, flags) {
435
466
  const subcommand = rest[0] || 'schema';
436
467
  const project = requireProjectId(flags);
package/lib/help.js CHANGED
@@ -34,6 +34,7 @@ Usage:
34
34
  joripspace install-template --project PROJECT --token TOKEN --template TEMPLATE --dir . --files-only
35
35
  joripspace template pull --project PROJECT --token TOKEN --dir . [--yes]
36
36
  joripspace get --project PROJECT --token TOKEN
37
+ joripspace report --project PROJECT --category bug --summary "문제 요약" [--details TEXT] [--expected TEXT] [--actual TEXT] [--error-code CODE]
37
38
  joripspace deployments --project PROJECT --token TOKEN [--include-failure-details] [--json]
38
39
  joripspace deployment get --project PROJECT --deployment DEPLOYMENT_ID --json
39
40
  joripspace deployment pull --project PROJECT --deployment DEPLOYMENT_ID --cwd PATH [--force]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joripspace/cli",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "license": "MIT",
5
5
  "description": "The official JoripSpace CLI. Build and deploy web apps with AI agents. Powered by Cosmosfarm.",
6
6
  "type": "commonjs",
@@ -120,6 +120,7 @@ const BEGINNER_ONBOARDING_LINES = [
120
120
  '- If the user says they do not know, give 2-3 simple examples, recommend one default, and continue.',
121
121
  '- Explain only the next useful action. Avoid long technical explanations unless the user asks.',
122
122
  '- If something fails, inspect logs, deployments, and runtime events directly; do not make the user debug technical details.',
123
+ '- When a JoripSpace platform command fails unexpectedly, or its result differs from the documented behavior after one safe verification, submit one incident with the installed CLI `report` command. Include a short summary, expected and actual behavior, available error code, and non-secret diagnostic details. Do not include credentials, personal data, or duplicate reports, and continue helping the user when a safe alternative remains.',
123
124
  ];
124
125
 
125
126
  const USER_CHOICE_PRESENTATION_RULE_LINES = [