@respan/cli 0.9.0 → 0.11.0

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 (62) hide show
  1. package/dist/commands/datasets/create-span.js +5 -3
  2. package/dist/commands/datasets/create.js +5 -4
  3. package/dist/commands/datasets/get-span.js +5 -1
  4. package/dist/commands/datasets/get.js +1 -1
  5. package/dist/commands/datasets/list.js +5 -1
  6. package/dist/commands/datasets/spans.js +1 -1
  7. package/dist/commands/datasets/update.js +3 -6
  8. package/dist/commands/{datasets/add-spans.d.ts → eval/index.d.ts} +2 -3
  9. package/dist/commands/eval/index.js +26 -0
  10. package/dist/commands/evaluators/create.js +10 -7
  11. package/dist/commands/evaluators/get.js +1 -1
  12. package/dist/commands/evaluators/list.js +1 -1
  13. package/dist/commands/evaluators/run.js +8 -7
  14. package/dist/commands/evaluators/update.js +6 -7
  15. package/dist/commands/experiments/create.js +9 -8
  16. package/dist/commands/experiments/get.js +1 -1
  17. package/dist/commands/experiments/list.js +1 -1
  18. package/dist/commands/logs/create.js +9 -7
  19. package/dist/commands/logs/get.js +1 -1
  20. package/dist/commands/logs/list.js +4 -3
  21. package/dist/commands/logs/summary.js +3 -2
  22. package/dist/commands/prompts/create-version.js +9 -9
  23. package/dist/commands/prompts/create.js +5 -4
  24. package/dist/commands/prompts/get.js +1 -1
  25. package/dist/commands/prompts/list.js +1 -1
  26. package/dist/commands/prompts/update.js +3 -6
  27. package/dist/commands/prompts/versions.js +1 -1
  28. package/dist/commands/setup/doctor.d.ts +0 -1
  29. package/dist/commands/setup/doctor.js +25 -40
  30. package/dist/commands/setup/gateway.d.ts +16 -0
  31. package/dist/commands/setup/gateway.js +33 -0
  32. package/dist/commands/setup/index.d.ts +4 -33
  33. package/dist/commands/setup/index.js +11 -907
  34. package/dist/commands/setup/tracing.d.ts +16 -0
  35. package/dist/commands/setup/tracing.js +33 -0
  36. package/dist/commands/traces/get.js +1 -1
  37. package/dist/commands/traces/list.js +8 -10
  38. package/dist/commands/traces/summary.js +6 -2
  39. package/dist/commands/users/get.js +1 -1
  40. package/dist/commands/users/list.js +5 -7
  41. package/dist/lib/agents.d.ts +16 -0
  42. package/dist/lib/agents.js +75 -0
  43. package/dist/lib/auth.js +24 -0
  44. package/dist/lib/base-command.d.ts +2 -0
  45. package/dist/lib/base-command.js +11 -1
  46. package/dist/lib/colors.d.ts +7 -0
  47. package/dist/lib/colors.js +10 -0
  48. package/dist/lib/eval/runner.d.ts +15 -0
  49. package/dist/lib/eval/runner.js +292 -0
  50. package/dist/lib/eval/schema.d.ts +67 -0
  51. package/dist/lib/eval/schema.js +22 -0
  52. package/dist/lib/integrate.d.ts +6 -0
  53. package/dist/lib/integrate.js +11 -0
  54. package/dist/lib/setup-base-command.d.ts +84 -0
  55. package/dist/lib/setup-base-command.js +649 -0
  56. package/dist/lib/skill-content.d.ts +1 -0
  57. package/dist/lib/skill-content.js +16 -0
  58. package/dist/lib/skill-refs.generated.d.ts +6 -0
  59. package/dist/lib/skill-refs.generated.js +1489 -0
  60. package/oclif.manifest.json +385 -230
  61. package/package.json +8 -3
  62. package/dist/commands/datasets/add-spans.js +0 -24
@@ -0,0 +1,16 @@
1
+ import { SetupBaseCommand } from '../../lib/setup-base-command.js';
2
+ export default class SetupGateway extends SetupBaseCommand {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ agent: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
7
+ 'no-instrument': import("@oclif/core/interfaces").BooleanFlag<boolean>;
8
+ json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
9
+ csv: import("@oclif/core/interfaces").BooleanFlag<boolean>;
10
+ 'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ 'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
+ verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
14
+ };
15
+ run(): Promise<void>;
16
+ }
@@ -0,0 +1,33 @@
1
+ import { Flags } from '@oclif/core';
2
+ import { SetupBaseCommand } from '../../lib/setup-base-command.js';
3
+ class SetupGateway extends SetupBaseCommand {
4
+ async run() {
5
+ const { flags } = await this.parse(SetupGateway);
6
+ this.globalFlags = flags;
7
+ await this.runSetup('gateway', {
8
+ agent: flags.agent,
9
+ noInstrument: flags['no-instrument'],
10
+ });
11
+ }
12
+ }
13
+ SetupGateway.description = `Set up Respan gateway routing in this project.
14
+
15
+ Runs the gateway setup flow directly (skips the "Tracing or Gateway?"
16
+ question). Sets up your API key, installs the Respan skill, and optionally
17
+ opens your coding agent to route the detected framework through the gateway.`;
18
+ SetupGateway.examples = [
19
+ 'respan setup gateway',
20
+ 'respan setup gateway --agent claude-code',
21
+ 'respan setup gateway --no-instrument',
22
+ ];
23
+ SetupGateway.flags = {
24
+ ...SetupBaseCommand.baseFlags,
25
+ agent: Flags.string({
26
+ description: 'Agent to configure (claude-code, cursor, codex-cli, gemini-cli, opencode)',
27
+ }),
28
+ 'no-instrument': Flags.boolean({
29
+ description: 'Skip opening the agent after setup',
30
+ default: false,
31
+ }),
32
+ };
33
+ export default SetupGateway;
@@ -1,45 +1,16 @@
1
- import { BaseCommand } from '../../lib/base-command.js';
2
- export default class Setup extends BaseCommand {
1
+ import { SetupBaseCommand } from '../../lib/setup-base-command.js';
2
+ export default class Setup extends SetupBaseCommand {
3
3
  static description: string;
4
4
  static examples: string[];
5
5
  static flags: {
6
6
  agent: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
7
7
  'no-instrument': import("@oclif/core/interfaces").BooleanFlag<boolean>;
8
+ json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
9
+ csv: import("@oclif/core/interfaces").BooleanFlag<boolean>;
8
10
  'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
11
  'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
12
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
- json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
12
- csv: import("@oclif/core/interfaces").BooleanFlag<boolean>;
13
13
  verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
14
14
  };
15
15
  run(): Promise<void>;
16
- private askApiKey;
17
- private verifyApiKey;
18
- /**
19
- * Build a rich demo OTLP trace that mimics a customer support agent workflow:
20
- * workflow: customer_support_pipeline
21
- * └── agent: support_agent
22
- * ├── tool: lookup_order
23
- * ├── chat: openai.chat (classify intent)
24
- * ├── tool: process_refund
25
- * ├── chat: openai.chat (generate response)
26
- * └── task: log_resolution
27
- */
28
- private buildDemoTrace;
29
- private detectAgents;
30
- private selectAgent;
31
- private installSkill;
32
- private runInstrumentAgent;
33
- private getSkillMd;
34
- private logStep;
35
- private isBinaryInstalled;
36
- private extractEnvVar;
37
- private saveToEnv;
38
- private getGitEmail;
39
- /**
40
- * Send a lightweight setup notification (email only).
41
- * This helps the team know when new users set up Respan so we can
42
- * reach out and help with onboarding.
43
- */
44
- private notifySetup;
45
16
  }