@respan/cli 0.14.1 → 0.15.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.
- package/dist/commands/setup/gateway.d.ts +2 -2
- package/dist/commands/setup/gateway.js +3 -7
- package/dist/commands/setup/index.d.ts +2 -2
- package/dist/commands/setup/index.js +4 -10
- package/dist/commands/setup/tracing.d.ts +2 -2
- package/dist/commands/setup/tracing.js +3 -7
- package/dist/lib/demo/seed-prompts.js +7 -7
- package/dist/lib/demo/trace-fixtures.d.ts +14 -5
- package/dist/lib/demo/trace-fixtures.js +26 -17
- package/dist/lib/setup-base-command.d.ts +2 -108
- package/dist/lib/setup-base-command.js +8 -754
- package/oclif.manifest.json +531 -534
- package/package.json +2 -3
- package/dist/lib/skill-content.d.ts +0 -1
- package/dist/lib/skill-content.js +0 -16
- package/dist/lib/skill-refs.generated.d.ts +0 -6
- package/dist/lib/skill-refs.generated.js +0 -1585
|
@@ -5,11 +5,11 @@ export default class SetupGateway extends SetupBaseCommand {
|
|
|
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>;
|
|
10
8
|
'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
9
|
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
10
|
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>;
|
|
@@ -10,11 +10,7 @@ class SetupGateway extends SetupBaseCommand {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
SetupGateway.description =
|
|
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.`;
|
|
13
|
+
SetupGateway.description = 'Deprecated gateway setup entry point. Prints the official gateway setup prompt.';
|
|
18
14
|
SetupGateway.examples = [
|
|
19
15
|
'respan setup gateway',
|
|
20
16
|
'respan setup gateway --agent claude-code',
|
|
@@ -23,10 +19,10 @@ SetupGateway.examples = [
|
|
|
23
19
|
SetupGateway.flags = {
|
|
24
20
|
...SetupBaseCommand.baseFlags,
|
|
25
21
|
agent: Flags.string({
|
|
26
|
-
description: '
|
|
22
|
+
description: 'Deprecated compatibility flag; no agent is launched',
|
|
27
23
|
}),
|
|
28
24
|
'no-instrument': Flags.boolean({
|
|
29
|
-
description: '
|
|
25
|
+
description: 'Deprecated compatibility flag; setup only prints a prompt',
|
|
30
26
|
default: false,
|
|
31
27
|
}),
|
|
32
28
|
};
|
|
@@ -5,11 +5,11 @@ export default class Setup extends SetupBaseCommand {
|
|
|
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>;
|
|
10
8
|
'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
9
|
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
10
|
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>;
|
|
@@ -4,20 +4,14 @@ class Setup extends SetupBaseCommand {
|
|
|
4
4
|
async run() {
|
|
5
5
|
const { flags } = await this.parse(Setup);
|
|
6
6
|
this.globalFlags = flags;
|
|
7
|
-
// No mode
|
|
7
|
+
// No mode: print both prompts without an interactive question.
|
|
8
8
|
await this.runSetup(undefined, {
|
|
9
9
|
agent: flags.agent,
|
|
10
10
|
noInstrument: flags['no-instrument'],
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
Setup.description =
|
|
15
|
-
|
|
16
|
-
Sets up your API key, installs skills and SDK docs for your preferred
|
|
17
|
-
coding agents, and optionally runs a setup agent. Asks whether you want
|
|
18
|
-
to set up tracing or gateway routing.
|
|
19
|
-
|
|
20
|
-
This is the recommended way to get started with Respan.`;
|
|
14
|
+
Setup.description = 'Deprecated setup entry point. Prints tracing and gateway setup prompts.';
|
|
21
15
|
Setup.examples = [
|
|
22
16
|
'npx @respan/cli setup',
|
|
23
17
|
'respan setup',
|
|
@@ -29,10 +23,10 @@ Setup.examples = [
|
|
|
29
23
|
Setup.flags = {
|
|
30
24
|
...SetupBaseCommand.baseFlags,
|
|
31
25
|
agent: Flags.string({
|
|
32
|
-
description: '
|
|
26
|
+
description: 'Deprecated compatibility flag; no agent is launched',
|
|
33
27
|
}),
|
|
34
28
|
'no-instrument': Flags.boolean({
|
|
35
|
-
description: '
|
|
29
|
+
description: 'Deprecated compatibility flag; setup only prints a prompt',
|
|
36
30
|
default: false,
|
|
37
31
|
}),
|
|
38
32
|
};
|
|
@@ -5,11 +5,11 @@ export default class SetupTracing extends SetupBaseCommand {
|
|
|
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>;
|
|
10
8
|
'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
9
|
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
10
|
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>;
|
|
@@ -10,11 +10,7 @@ class SetupTracing extends SetupBaseCommand {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
SetupTracing.description =
|
|
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.`;
|
|
13
|
+
SetupTracing.description = 'Deprecated tracing setup entry point. Prints the official tracing setup prompt.';
|
|
18
14
|
SetupTracing.examples = [
|
|
19
15
|
'respan setup tracing',
|
|
20
16
|
'respan setup tracing --agent claude-code',
|
|
@@ -23,10 +19,10 @@ SetupTracing.examples = [
|
|
|
23
19
|
SetupTracing.flags = {
|
|
24
20
|
...SetupBaseCommand.baseFlags,
|
|
25
21
|
agent: Flags.string({
|
|
26
|
-
description: '
|
|
22
|
+
description: 'Deprecated compatibility flag; no agent is launched',
|
|
27
23
|
}),
|
|
28
24
|
'no-instrument': Flags.boolean({
|
|
29
|
-
description: '
|
|
25
|
+
description: 'Deprecated compatibility flag; setup only prints a prompt',
|
|
30
26
|
default: false,
|
|
31
27
|
}),
|
|
32
28
|
};
|
|
@@ -9,19 +9,19 @@
|
|
|
9
9
|
import { DEMO_PROMPTS } from './prompt-fixtures.js';
|
|
10
10
|
/** Prompts in the account whose name exactly matches a demo fixture name.
|
|
11
11
|
*
|
|
12
|
-
* Queried with the `name` `
|
|
13
|
-
*
|
|
14
|
-
* single `value: [a, b, c]` matches
|
|
15
|
-
*
|
|
16
|
-
* case-sensitive
|
|
17
|
-
* found, for clear). */
|
|
12
|
+
* Queried with the `name` exact-match filter (operator `''`), one query per
|
|
13
|
+
* fixture name. The backend rejects `iexact` with a 400, and `icontains` does
|
|
14
|
+
* NOT OR-match across a multi-value array — a single `value: [a, b, c]` matches
|
|
15
|
+
* nothing — so each name is queried on its own. Matches are re-confirmed
|
|
16
|
+
* client-side with an exact, case-sensitive comparison. Returns every match (so
|
|
17
|
+
* duplicates are all found, for clear). */
|
|
18
18
|
async function findExistingPrompts(ctx) {
|
|
19
19
|
const found = [];
|
|
20
20
|
for (const fixture of DEMO_PROMPTS) {
|
|
21
21
|
const response = await ctx.client.prompts.listPrompts({
|
|
22
22
|
Authorization: ctx.authHeader,
|
|
23
23
|
page_size: 100,
|
|
24
|
-
filters: { name: { operator: '
|
|
24
|
+
filters: { name: { operator: '', value: [fixture.name] } },
|
|
25
25
|
});
|
|
26
26
|
for (const row of response.results ?? []) {
|
|
27
27
|
if (row.id && row.name === fixture.name) {
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Frozen snapshot of the demo traces
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Frozen snapshot of the demo traces as ready-to-POST OTLP v2 bodies: a multi-agent
|
|
3
|
+
* AI Service Desk run across two tenants, 17 spans each. Four agents (triage,
|
|
4
|
+
* identity, knowledge, notification) hand off to each other, each making one
|
|
5
|
+
* gpt-6.1-sol call and one tool call, plus a RAG embedding. Source of truth for the
|
|
6
|
+
* traces portion of `respan demo`.
|
|
5
7
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
+
* Span names follow the SDKs' semantic style (`llm.<model>`, `agent.<name>`,
|
|
9
|
+
* `tool.<name>`, `handoff.<from>_to_<to>`, `embedding`; see
|
|
10
|
+
* contribution/writing-instrumentations.md), and handoff spans carry
|
|
11
|
+
* `respan.entity.log_type: handoff`. Derived from the team's original
|
|
12
|
+
* `trace-bodies/` dataset by dropping the Vercel AI SDK wrapper spans
|
|
13
|
+
* (`ai.generateText`, `ai.embed`) and moving the LLM calls to gpt-6.1-sol.
|
|
14
|
+
*
|
|
15
|
+
* Each `body` is a complete OTLP/JSON payload for `POST /api/v2/traces`. The
|
|
16
|
+
* seeder (`seed-traces.ts`) re-stamps fresh trace/span ids and recent
|
|
8
17
|
* timestamps on each fresh seed, and sets the root span's name to `workflow` (below)
|
|
9
18
|
* so it shows in the dashboard Workflow column and is unique per trace — the dataset
|
|
10
19
|
* repeats some scenarios with a byte-identical root span, and a unique root name keeps
|