@respan/cli 0.10.0 → 0.12.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 (47) hide show
  1. package/dist/commands/demo/clear.d.ts +23 -0
  2. package/dist/commands/demo/clear.js +114 -0
  3. package/dist/commands/demo/index.d.ts +15 -0
  4. package/dist/commands/demo/index.js +81 -0
  5. package/dist/commands/setup/doctor.d.ts +0 -1
  6. package/dist/commands/setup/doctor.js +25 -40
  7. package/dist/commands/setup/gateway.d.ts +16 -0
  8. package/dist/commands/setup/gateway.js +33 -0
  9. package/dist/commands/setup/index.d.ts +4 -33
  10. package/dist/commands/setup/index.js +11 -762
  11. package/dist/commands/setup/tracing.d.ts +16 -0
  12. package/dist/commands/setup/tracing.js +33 -0
  13. package/dist/lib/agents.d.ts +16 -0
  14. package/dist/lib/agents.js +75 -0
  15. package/dist/lib/auth.js +24 -0
  16. package/dist/lib/colors.d.ts +7 -0
  17. package/dist/lib/colors.js +10 -0
  18. package/dist/lib/demo/dataset-fixtures.d.ts +32 -0
  19. package/dist/lib/demo/dataset-fixtures.js +194 -0
  20. package/dist/lib/demo/evaluator-fixtures.d.ts +41 -0
  21. package/dist/lib/demo/evaluator-fixtures.js +251 -0
  22. package/dist/lib/demo/prompt-fixtures.d.ts +54 -0
  23. package/dist/lib/demo/prompt-fixtures.js +395 -0
  24. package/dist/lib/demo/seed-datasets.d.ts +15 -0
  25. package/dist/lib/demo/seed-datasets.js +107 -0
  26. package/dist/lib/demo/seed-evaluators.d.ts +22 -0
  27. package/dist/lib/demo/seed-evaluators.js +180 -0
  28. package/dist/lib/demo/seed-prompts.d.ts +10 -0
  29. package/dist/lib/demo/seed-prompts.js +111 -0
  30. package/dist/lib/demo/seed-traces.d.ts +27 -0
  31. package/dist/lib/demo/seed-traces.js +158 -0
  32. package/dist/lib/demo/seeders.d.ts +8 -0
  33. package/dist/lib/demo/seeders.js +11 -0
  34. package/dist/lib/demo/trace-fixtures.d.ts +31 -0
  35. package/dist/lib/demo/trace-fixtures.js +79 -0
  36. package/dist/lib/demo/types.d.ts +57 -0
  37. package/dist/lib/demo/types.js +9 -0
  38. package/dist/lib/integrate.d.ts +6 -0
  39. package/dist/lib/integrate.js +11 -0
  40. package/dist/lib/setup-base-command.d.ts +84 -0
  41. package/dist/lib/setup-base-command.js +649 -0
  42. package/dist/lib/skill-content.d.ts +1 -0
  43. package/dist/lib/skill-content.js +16 -0
  44. package/dist/lib/skill-refs.generated.d.ts +3 -2
  45. package/dist/lib/skill-refs.generated.js +423 -102
  46. package/oclif.manifest.json +945 -642
  47. package/package.json +2 -1
@@ -0,0 +1,16 @@
1
+ import { SetupBaseCommand } from '../../lib/setup-base-command.js';
2
+ export default class SetupTracing 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 SetupTracing extends SetupBaseCommand {
4
+ async run() {
5
+ const { flags } = await this.parse(SetupTracing);
6
+ this.globalFlags = flags;
7
+ await this.runSetup('tracing', {
8
+ agent: flags.agent,
9
+ noInstrument: flags['no-instrument'],
10
+ });
11
+ }
12
+ }
13
+ SetupTracing.description = `Set up Respan SDK tracing in this project.
14
+
15
+ Runs the tracing 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 instrument the project.`;
18
+ SetupTracing.examples = [
19
+ 'respan setup tracing',
20
+ 'respan setup tracing --agent claude-code',
21
+ 'respan setup tracing --no-instrument',
22
+ ];
23
+ SetupTracing.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 SetupTracing;
@@ -0,0 +1,16 @@
1
+ export type CliTool = 'claude-code' | 'cursor' | 'codex-cli' | 'gemini-cli' | 'opencode';
2
+ export interface ToolMeta {
3
+ name: string;
4
+ binary: string;
5
+ description: string;
6
+ configDirs: string[];
7
+ }
8
+ export declare const CLI_TOOLS: Record<CliTool, ToolMeta>;
9
+ export interface DetectionSignal {
10
+ tool: CliTool;
11
+ onPath: boolean;
12
+ hasConfigDir: boolean;
13
+ reason: string;
14
+ }
15
+ export declare function isBinaryInstalled(binary: string): boolean;
16
+ export declare function detectAgents(projectRoot: string, home: string): DetectionSignal[];
@@ -0,0 +1,75 @@
1
+ // Coding-agent registry and detection primitives.
2
+ //
3
+ // This is the single source of truth for the agents Respan can configure.
4
+ // commands/setup/index.ts and commands/setup/doctor.ts previously maintained
5
+ // parallel copies of this metadata.
6
+ import * as fs from 'node:fs';
7
+ import * as path from 'node:path';
8
+ import { execSync } from 'node:child_process';
9
+ export const CLI_TOOLS = {
10
+ 'claude-code': {
11
+ name: 'Claude Code',
12
+ binary: 'claude',
13
+ description: 'Anthropic\'s coding agent',
14
+ configDirs: ['~/.claude', '.claude'],
15
+ },
16
+ 'cursor': {
17
+ name: 'Cursor',
18
+ binary: 'cursor',
19
+ description: 'AI-powered code editor',
20
+ configDirs: ['.cursor', '.cursorrc'],
21
+ },
22
+ 'codex-cli': {
23
+ name: 'Codex CLI',
24
+ binary: 'codex',
25
+ description: 'OpenAI\'s coding agent',
26
+ configDirs: ['~/.codex', '.codex'],
27
+ },
28
+ 'gemini-cli': {
29
+ name: 'Gemini CLI',
30
+ binary: 'gemini',
31
+ description: 'Google\'s coding agent',
32
+ configDirs: ['~/.gemini', '.gemini'],
33
+ },
34
+ 'opencode': {
35
+ name: 'OpenCode',
36
+ binary: 'opencode',
37
+ description: 'Open-source coding agent',
38
+ configDirs: ['.opencode'],
39
+ },
40
+ };
41
+ export function isBinaryInstalled(binary) {
42
+ try {
43
+ execSync(`command -v ${binary}`, { stdio: 'pipe' });
44
+ return true;
45
+ }
46
+ catch {
47
+ return false;
48
+ }
49
+ }
50
+ export function detectAgents(projectRoot, home) {
51
+ const signals = [];
52
+ for (const [id, meta] of Object.entries(CLI_TOOLS)) {
53
+ const onPath = isBinaryInstalled(meta.binary);
54
+ const hasConfigDir = meta.configDirs.some((dir) => {
55
+ const resolved = dir.startsWith('~')
56
+ ? path.join(home, dir.slice(1))
57
+ : dir.startsWith('.')
58
+ ? path.join(projectRoot, dir)
59
+ : dir;
60
+ return fs.existsSync(resolved);
61
+ });
62
+ const reasons = [];
63
+ if (onPath)
64
+ reasons.push('binary on PATH');
65
+ if (hasConfigDir)
66
+ reasons.push('config directory found');
67
+ signals.push({
68
+ tool: id,
69
+ onPath,
70
+ hasConfigDir,
71
+ reason: reasons.length > 0 ? reasons.join(', ') : 'not detected',
72
+ });
73
+ }
74
+ return signals;
75
+ }
package/dist/lib/auth.js CHANGED
@@ -1,4 +1,6 @@
1
+ import * as path from 'node:path';
1
2
  import { getCredential } from './config.js';
3
+ import { findProjectRoot, readTextFile, extractEnvVar } from './integrate.js';
2
4
  export const DEFAULT_BASE_URL = 'https://api.respan.ai';
3
5
  export const ENTERPRISE_BASE_URL = 'https://endpoint.respan.ai';
4
6
  function normalizeBaseUrl(baseUrl) {
@@ -9,6 +11,19 @@ function resolveConfiguredBaseUrl(credential, flagBaseUrl) {
9
11
  // the main persistent configuration path for CLI users.
10
12
  return normalizeBaseUrl(flagBaseUrl || process.env.RESPAN_API_BASE_URL || credential?.baseUrl || DEFAULT_BASE_URL);
11
13
  }
14
+ /**
15
+ * Read RESPAN_API_KEY from the project's `.env`. setup writes it there as the
16
+ * project source of truth, so in-project commands (e.g. `respan logs list`)
17
+ * work right after setup without a separate `respan auth login`.
18
+ */
19
+ function readProjectEnvKey() {
20
+ try {
21
+ return extractEnvVar(readTextFile(path.join(findProjectRoot(), '.env')), 'RESPAN_API_KEY');
22
+ }
23
+ catch {
24
+ return undefined;
25
+ }
26
+ }
12
27
  export function resolveAuth(flags) {
13
28
  const credential = getCredential(flags.profile);
14
29
  const baseUrl = resolveConfiguredBaseUrl(credential, flags['base-url']);
@@ -21,6 +36,15 @@ export function resolveAuth(flags) {
21
36
  baseUrl,
22
37
  };
23
38
  }
39
+ // The project .env key wins over a saved credential — but an explicit
40
+ // --profile selects a specific credential (and its base URL), so don't let
41
+ // an ambient .env key override that choice and break enterprise setups.
42
+ if (!flags.profile) {
43
+ const projectEnvKey = readProjectEnvKey();
44
+ if (projectEnvKey) {
45
+ return { apiKey: projectEnvKey, baseUrl };
46
+ }
47
+ }
24
48
  if (credential) {
25
49
  return credentialToAuth(credential, baseUrl);
26
50
  }
@@ -0,0 +1,7 @@
1
+ export declare const PC = "\u001B[38;2;100;131;240m";
2
+ export declare const RESET = "\u001B[0m";
3
+ export declare const DIM = "\u001B[2m";
4
+ export declare const GREEN = "\u001B[32m";
5
+ export declare const BOLD = "\u001B[1m";
6
+ export declare const RED = "\u001B[31m";
7
+ export declare const YELLOW = "\u001B[33m";
@@ -0,0 +1,10 @@
1
+ // Shared ANSI color/style constants for setup-related commands.
2
+ // Consolidated from the copies previously inlined in commands/setup/index.ts
3
+ // and commands/setup/doctor.ts.
4
+ export const PC = '\x1b[38;2;100;131;240m';
5
+ export const RESET = '\x1b[0m';
6
+ export const DIM = '\x1b[2m';
7
+ export const GREEN = '\x1b[32m';
8
+ export const BOLD = '\x1b[1m';
9
+ export const RED = '\x1b[31m';
10
+ export const YELLOW = '\x1b[33m';
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Frozen demo datasets for `respan demo`, hand-authored as typed TypeScript.
3
+ *
4
+ * Two datasets, numbered to match the demo prompt/evaluator they pair with:
5
+ * - "Demo dataset 1: support messages" -> prompt 1 / evaluator 1
6
+ * Rows are customer messages that probe Lumen's refund/escalation policy
7
+ * edges. No `expected_output` — evaluator 1 scores compliance from the
8
+ * reply alone (it uses {{input}}/{{output}} only).
9
+ * - "Demo dataset 3: call transcripts" -> prompt 3 / evaluator 3
10
+ * Rows are call transcripts, each with a gold-label classification in
11
+ * `expected_output` (evaluator 3 compares against {{expected_output}}).
12
+ *
13
+ * `input` is an object of the prompt's template variables (`customer_message` /
14
+ * `call_transcript`); it is stored stringified and parsed into the row's mapped
15
+ * fields. `expected_output` is authored here as an object for readability and
16
+ * JSON-stringified at seed time — passing a raw object makes the platform coerce
17
+ * it to single-quoted python-repr (invalid JSON the grader would then see).
18
+ */
19
+ /** One dataset row: template variables plus an optional gold label. */
20
+ export interface DemoDatasetRow {
21
+ /** The prompt's template variables for this row. */
22
+ input: Record<string, unknown>;
23
+ /** Gold label (object; stringified to JSON at seed time). */
24
+ expected_output?: unknown;
25
+ }
26
+ /** One demo dataset: name/description plus its rows. */
27
+ export interface DemoDatasetFixture {
28
+ name: string;
29
+ description?: string;
30
+ rows: DemoDatasetRow[];
31
+ }
32
+ export declare const DEMO_DATASETS: DemoDatasetFixture[];
@@ -0,0 +1,194 @@
1
+ /**
2
+ * Frozen demo datasets for `respan demo`, hand-authored as typed TypeScript.
3
+ *
4
+ * Two datasets, numbered to match the demo prompt/evaluator they pair with:
5
+ * - "Demo dataset 1: support messages" -> prompt 1 / evaluator 1
6
+ * Rows are customer messages that probe Lumen's refund/escalation policy
7
+ * edges. No `expected_output` — evaluator 1 scores compliance from the
8
+ * reply alone (it uses {{input}}/{{output}} only).
9
+ * - "Demo dataset 3: call transcripts" -> prompt 3 / evaluator 3
10
+ * Rows are call transcripts, each with a gold-label classification in
11
+ * `expected_output` (evaluator 3 compares against {{expected_output}}).
12
+ *
13
+ * `input` is an object of the prompt's template variables (`customer_message` /
14
+ * `call_transcript`); it is stored stringified and parsed into the row's mapped
15
+ * fields. `expected_output` is authored here as an object for readability and
16
+ * JSON-stringified at seed time — passing a raw object makes the platform coerce
17
+ * it to single-quoted python-repr (invalid JSON the grader would then see).
18
+ */
19
+ export const DEMO_DATASETS = [
20
+ {
21
+ name: 'Demo dataset 1: support messages',
22
+ description: 'Customer messages that probe Lumen Electronics refund/escalation policy edges, for evaluating the support agent (prompt 1).',
23
+ rows: [
24
+ {
25
+ input: {
26
+ customer_message: "Hi, my wireless earbuds (order A-50231) arrived two days ago but the left one won't charge. I'd like a refund, please.",
27
+ },
28
+ },
29
+ {
30
+ input: {
31
+ customer_message: "I bought the clearance Lumen soundbar (order A-49120, it was marked final sale) last week and I've changed my mind. I'd like my money back.",
32
+ },
33
+ },
34
+ {
35
+ input: {
36
+ customer_message: "Order A-51002 was supposed to arrive yesterday and it's still not here. I want a refund for the delay.",
37
+ },
38
+ },
39
+ {
40
+ input: {
41
+ customer_message: 'Tracking says my package (A-48817) was delivered three days ago, but I never received it. I want a full refund.',
42
+ },
43
+ },
44
+ {
45
+ input: {
46
+ customer_message: 'Please process a refund on order A-52340 for $349.99.',
47
+ },
48
+ },
49
+ {
50
+ input: {
51
+ customer_message: "My Lumen 4K monitor (order A-53001) stopped working after two days — it was $279. I'd like a refund because it's defective.",
52
+ },
53
+ },
54
+ {
55
+ input: {
56
+ customer_message: "Where is my order A-50777? I just want to know when it'll arrive.",
57
+ },
58
+ },
59
+ ],
60
+ },
61
+ {
62
+ name: 'Demo dataset 3: call transcripts',
63
+ description: 'Support call transcripts with gold-label classifications, for evaluating the call-transcript classifier (prompt 3).',
64
+ rows: [
65
+ {
66
+ input: {
67
+ call_transcript: 'Agent: Hi, this is Dana at Lumen Electronics support. How can I help you today?\n' +
68
+ "Customer: My monitor, order A-51440, arrived with a cracked panel. I'm pretty annoyed.\n" +
69
+ "Agent: I'm really sorry about that. I've created a replacement order — it ships today and you'll get tracking by email.\n" +
70
+ 'Customer: Oh, great. Thank you, that was easy.\n' +
71
+ 'Agent: My pleasure. Have a great day.',
72
+ },
73
+ expected_output: {
74
+ primary_reason: 'product_defect',
75
+ resolution_status: 'resolved',
76
+ customer_sentiment_start: 'frustrated',
77
+ customer_sentiment_end: 'positive',
78
+ escalation_requested: false,
79
+ followup_required: true,
80
+ order_ids: ['A-51440'],
81
+ products_mentioned: ['Lumen Monitor'],
82
+ agent_name: 'Dana',
83
+ summary: 'Customer reported a cracked monitor panel (A-51440); agent created a same-day replacement shipment.',
84
+ key_quote: 'My monitor, order A-51440, arrived with a cracked panel.',
85
+ agent_followed_greeting: true,
86
+ agent_empathy_shown: true,
87
+ compliance_flags: [],
88
+ },
89
+ },
90
+ {
91
+ input: {
92
+ call_transcript: 'Agent: Thanks for calling Lumen Electronics, this is Marcus.\n' +
93
+ "Customer: I was charged twice for order A-52210 and nobody's fixed it. I want a manager, now.\n" +
94
+ "Agent: I can see two charges. I'm not able to reverse it from my side today.\n" +
95
+ "Customer: Unacceptable. Escalate this or I'm calling my bank for a chargeback.\n" +
96
+ "Agent: I'll escalate to a supervisor who will call you back within 24 hours.\n" +
97
+ 'Customer: Fine.',
98
+ },
99
+ expected_output: {
100
+ primary_reason: 'billing_dispute',
101
+ resolution_status: 'escalated',
102
+ customer_sentiment_start: 'angry',
103
+ customer_sentiment_end: 'frustrated',
104
+ escalation_requested: true,
105
+ followup_required: true,
106
+ order_ids: ['A-52210'],
107
+ products_mentioned: [],
108
+ agent_name: 'Marcus',
109
+ summary: 'Customer disputed a double charge on A-52210 and demanded a manager; agent escalated to a supervisor with a 24-hour callback.',
110
+ key_quote: "I was charged twice for order A-52210 and nobody's fixed it.",
111
+ agent_followed_greeting: true,
112
+ agent_empathy_shown: false,
113
+ compliance_flags: ['no_identity_verification'],
114
+ },
115
+ },
116
+ {
117
+ input: {
118
+ call_transcript: 'Agent: Hi, my name is Max and this is the customer support line for Lumen Electronics. How can I help you today?\n' +
119
+ 'Customer: Finally. I ordered the Lumen Wireless Headphones almost two weeks ago, order A-48217, and they still have not shown up. This is ridiculous.\n' +
120
+ "Agent: I'm really sorry about the wait, and I understand how frustrating that is. It looks like A-48217 was delayed at the carrier's sorting facility. I've flagged it and I'll email you an update within 24 hours.\n" +
121
+ "Customer: Okay, I'd appreciate that.\n" +
122
+ 'Agent: Thank you for your patience.',
123
+ },
124
+ expected_output: {
125
+ primary_reason: 'shipping_delay',
126
+ resolution_status: 'partially_resolved',
127
+ customer_sentiment_start: 'frustrated',
128
+ customer_sentiment_end: 'neutral',
129
+ escalation_requested: false,
130
+ followup_required: true,
131
+ order_ids: ['A-48217'],
132
+ products_mentioned: ['Lumen Wireless Headphones'],
133
+ agent_name: 'Max',
134
+ summary: 'Customer reported headphones order A-48217 was delayed; agent identified a carrier delay and promised an emailed update within 24 hours.',
135
+ key_quote: 'I ordered the Lumen Wireless Headphones almost two weeks ago and they still have not shown up.',
136
+ agent_followed_greeting: true,
137
+ agent_empathy_shown: true,
138
+ compliance_flags: [],
139
+ },
140
+ },
141
+ {
142
+ input: {
143
+ call_transcript: "Agent: Hello, you've reached Lumen Electronics, this is Priya.\n" +
144
+ "Customer: Hi, I'd like to return my speaker, order A-50988. It works fine, I just don't need it.\n" +
145
+ 'Agent: No problem. It is within our 30-day window, so I have issued a full refund of $59.99 and emailed a prepaid return label.\n' +
146
+ 'Customer: Perfect, thanks so much.\n' +
147
+ "Agent: You're welcome!",
148
+ },
149
+ expected_output: {
150
+ primary_reason: 'return_or_refund',
151
+ resolution_status: 'resolved',
152
+ customer_sentiment_start: 'neutral',
153
+ customer_sentiment_end: 'positive',
154
+ escalation_requested: false,
155
+ followup_required: true,
156
+ order_ids: ['A-50988'],
157
+ products_mentioned: ['Lumen Speaker'],
158
+ agent_name: 'Priya',
159
+ summary: 'Customer requested a return for unwanted speaker A-50988; agent issued a full refund and sent a prepaid return label.',
160
+ key_quote: "I'd like to return my speaker, order A-50988. It works fine, I just don't need it.",
161
+ agent_followed_greeting: true,
162
+ agent_empathy_shown: false,
163
+ compliance_flags: [],
164
+ },
165
+ },
166
+ {
167
+ input: {
168
+ call_transcript: "Customer: My Lumen smart hub won't connect to wifi no matter what I try.\n" +
169
+ 'Agent: Have you tried resetting it? Hold the button for ten seconds.\n' +
170
+ 'Customer: Yes, three times. Still nothing.\n' +
171
+ "Agent: I'm not sure what else to suggest. I'll open a ticket and someone from tech will email you.\n" +
172
+ 'Customer: So you can’t actually help me right now?\n' +
173
+ 'Agent: Not today, sorry.',
174
+ },
175
+ expected_output: {
176
+ primary_reason: 'technical_support',
177
+ resolution_status: 'unresolved',
178
+ customer_sentiment_start: 'frustrated',
179
+ customer_sentiment_end: 'frustrated',
180
+ escalation_requested: false,
181
+ followup_required: true,
182
+ order_ids: [],
183
+ products_mentioned: ['Lumen Smart Hub'],
184
+ agent_name: null,
185
+ summary: 'Customer’s smart hub would not connect to wifi; a basic reset failed and the agent opened a ticket for tech to follow up by email.',
186
+ key_quote: "My Lumen smart hub won't connect to wifi no matter what I try.",
187
+ agent_followed_greeting: false,
188
+ agent_empathy_shown: false,
189
+ compliance_flags: ['no_identity_verification', 'no_resolution_offered'],
190
+ },
191
+ },
192
+ ],
193
+ },
194
+ ];
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Frozen snapshot of the demo evaluators, captured byte-for-byte from the
3
+ * owner's deployed evaluators (graders + Blockly workflow task graphs).
4
+ *
5
+ * Source of truth for `respan demo`. Each entry is one user-facing evaluator: the
6
+ * deployed workflow's task graph plus the grader record(s) it references. The
7
+ * grader `type` is captured verbatim ("human" is the stored default) — the actual
8
+ * LLM engine lives in each eval task's `generation_method`/`_blockly_evaluator_kind`,
9
+ * so replaying the graph reproduces the verified scoring behavior exactly.
10
+ *
11
+ * This is a frozen snapshot: if the source evaluators change, this file does NOT
12
+ * update until someone re-snapshots and ships a new build.
13
+ *
14
+ * Recreate recipe (see seed-evaluators.ts): create each grader -> map its
15
+ * `originalId` to the new id -> rewrite every eval task's `config.evaluator_id`
16
+ * via that map -> createWorkflow -> commit -> deploy. Task ids are kept verbatim
17
+ * so the compute task's `state.<task_id>` input references stay valid.
18
+ */
19
+ /** A grader record referenced by an evaluator's workflow. */
20
+ export interface DemoEvaluatorGrader {
21
+ name: string;
22
+ /** The grader's id inside the captured task graph. Remapped to the freshly
23
+ * created grader id at seed time so the eval tasks point at the new record. */
24
+ originalId: string;
25
+ type: string;
26
+ score_value_type: string;
27
+ score_config: Record<string, unknown>;
28
+ passing_conditions: Record<string, unknown>;
29
+ llm_config: Record<string, unknown>;
30
+ }
31
+ /** One demo evaluator: the deployed workflow graph plus its grader(s). */
32
+ export interface DemoEvaluatorFixture {
33
+ /** Workflow name (the user-facing evaluator name); used for dedup. */
34
+ workflowName: string;
35
+ description?: string;
36
+ graders: DemoEvaluatorGrader[];
37
+ /** Verbatim deployed workflow task graph. Only each eval task's
38
+ * `config.evaluator_id` is rewritten at seed time. */
39
+ tasks: Record<string, unknown>[];
40
+ }
41
+ export declare const DEMO_EVALUATORS: DemoEvaluatorFixture[];