@yagni-app/code-staging 1.0.7-staging.1266.1 → 1.0.7-staging.1268.1

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/README.md CHANGED
@@ -183,7 +183,10 @@ prefix instead of `claude_code`:
183
183
  `yagni_code.llm_request` and `yagni_code.tool`, carrying both the flat
184
184
  Claude Code attributes (`model`, `input_tokens`, `cost_usd`, `tool_name`)
185
185
  and the OTel GenAI conventions (`gen_ai.*`) that LLM-observability
186
- products read. The two count tokens differently on purpose: the flat
186
+ products read. `gen_ai.operation.name` classifies each span the way those
187
+ products expect: `invoke_agent` on the interaction root, `chat` on the LLM
188
+ request, `execute_tool` on tool spans (the turn span has no semconv
189
+ operation and is left unset). The two count tokens differently on purpose: the flat
187
190
  `input_tokens` / `cache_read_tokens` / `cache_creation_tokens` are disjoint,
188
191
  exactly as Claude Code reports them, while `gen_ai.usage.input_tokens`
189
192
  follows the semconv and includes the cached tokens, with
@@ -168,9 +168,13 @@ export class SessionTelemetry {
168
168
  this.interactionSequence += 1;
169
169
  const promptId = randomUUID();
170
170
  const promptLength = typeof prompt === "string" ? prompt.length : 0;
171
+ // `invoke_agent` is the semconv operation for the root of an agent run.
172
+ // Without it Datadog files the trace as a generic workflow, flags an
173
+ // instrumentation issue on the span, and leaves it out of per-agent views.
171
174
  const span = this.tracer.startSpan(SPAN_INTERACTION, {
172
175
  attributes: {
173
176
  ...this.spanAttributes(),
177
+ [ATTR_GEN_AI_OPERATION_NAME]: "invoke_agent",
174
178
  user_prompt_length: promptLength,
175
179
  "interaction.sequence": this.interactionSequence,
176
180
  "prompt.id": promptId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yagni-app/code-staging",
3
- "version": "1.0.7-staging.1266.1",
3
+ "version": "1.0.7-staging.1268.1",
4
4
  "description": "YAGNI Code: a terminal coding agent that already knows your company. One YAGNI login routes the model and grounds the agent in your team's context.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "YAGNI, Inc. <jack@yagni.app> (https://yagni.app)",
@@ -58,5 +58,5 @@
58
58
  "turndown": "^7.2.4",
59
59
  "typebox": "^1.3.15"
60
60
  },
61
- "yagniSourceSha": "d1402054944b48117ac873cddd543c7ba14408a0"
61
+ "yagniSourceSha": "49b4f1be0c81923619b1dd54a977da9653deee1d"
62
62
  }