@respan/cli 0.14.0 → 0.14.2
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/integrate/pi.js +6 -6
- 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/pi-integrate.d.ts +1 -1
- package/dist/lib/skill-refs.generated.d.ts +1 -1
- package/dist/lib/skill-refs.generated.js +1 -1
- package/oclif.manifest.json +970 -970
- package/package.json +1 -1
|
@@ -112,11 +112,11 @@ class IntegratePi extends BaseCommand {
|
|
|
112
112
|
this.log('Set properties via integrate flags or edit respan.json:');
|
|
113
113
|
this.log(' respan integrate pi --customer-id "frank" --workflow-name "my-agent"');
|
|
114
114
|
this.log(' respan integrate pi --attrs \'{"team":"platform","env":"staging"}\'');
|
|
115
|
-
this.log(' respan integrate pi --trace-scope
|
|
115
|
+
this.log(' respan integrate pi --trace-scope run # one trace per prompt instead of one per session ("trace_scope")');
|
|
116
116
|
this.log('');
|
|
117
117
|
this.log('Override per-session with env vars:');
|
|
118
118
|
this.log(' export RESPAN_CUSTOMER_ID="your-name"');
|
|
119
|
-
this.log(' export RESPAN_PI_TRACE_SCOPE=
|
|
119
|
+
this.log(' export RESPAN_PI_TRACE_SCOPE=run # or session (default)');
|
|
120
120
|
this.log(' export RESPAN_PI_TRACING=false # skip tracing for one session');
|
|
121
121
|
this.log('');
|
|
122
122
|
this.log('One-off run without installing (from a project that has the package):');
|
|
@@ -151,8 +151,8 @@ Scope:
|
|
|
151
151
|
--local pi install -l npm:@respan/instrumentation-pi + .pi/respan.json in the project root
|
|
152
152
|
|
|
153
153
|
Trace scope (--trace-scope, "trace_scope" in respan.json):
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
session one multi-root trace per pi session, across processes and pauses (default)
|
|
155
|
+
run one trace per agent run; runs of a session share a thread id
|
|
156
156
|
|
|
157
157
|
Durable delivery (--with-collector):
|
|
158
158
|
Sets base_url to a local Respan collector (http://127.0.0.1:4318) so traces
|
|
@@ -166,7 +166,7 @@ IntegratePi.examples = [
|
|
|
166
166
|
'respan integrate pi --disable',
|
|
167
167
|
'respan integrate pi --local',
|
|
168
168
|
'respan integrate pi --customer-id frank --workflow-name email-agent',
|
|
169
|
-
'respan integrate pi --trace-scope
|
|
169
|
+
'respan integrate pi --trace-scope run',
|
|
170
170
|
'respan integrate pi --with-collector',
|
|
171
171
|
'respan integrate pi --project-id my-project --attrs \'{"env":"prod"}\'',
|
|
172
172
|
'respan integrate pi --dry-run',
|
|
@@ -182,7 +182,7 @@ IntegratePi.flags = {
|
|
|
182
182
|
description: 'Alias of --workflow-name (default: pi)',
|
|
183
183
|
}),
|
|
184
184
|
'trace-scope': Flags.string({
|
|
185
|
-
description: 'Trace scope: "
|
|
185
|
+
description: 'Trace scope: "session" = one multi-root trace per pi session (default), "run" = one trace per agent run',
|
|
186
186
|
options: ['run', 'session'],
|
|
187
187
|
}),
|
|
188
188
|
'with-collector': Flags.boolean({
|
|
@@ -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
|