@osfactory/otel-hook 0.1.2 → 0.2.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/cli.js CHANGED
@@ -356,6 +356,23 @@ var BOOLEAN_FLAGS = /* @__PURE__ */ new Set([
356
356
  "--require-callback-id",
357
357
  "--no-derive-callback-id"
358
358
  ]);
359
+ var LEGACY_PROVIDER_FLAGS = {
360
+ "--cursor": "cursor",
361
+ "--claude": "claude-code",
362
+ "--codex": "codex"
363
+ };
364
+ function normalizeLegacyProviderFlags(argv) {
365
+ const out = [];
366
+ for (const token of argv) {
367
+ const providerId = LEGACY_PROVIDER_FLAGS[token];
368
+ if (providerId !== void 0) {
369
+ out.push("--provider", providerId);
370
+ continue;
371
+ }
372
+ out.push(token);
373
+ }
374
+ return out;
375
+ }
359
376
  var tokenize = (argv) => {
360
377
  const values = /* @__PURE__ */ new Map();
361
378
  const booleans = /* @__PURE__ */ new Set();
@@ -704,7 +721,7 @@ var parseCliArgs = (argv) => {
704
721
  if (rest.includes("--help") || rest.includes("-h")) {
705
722
  return { status: "help", topic: command };
706
723
  }
707
- const tokens = tokenize(rest);
724
+ const tokens = tokenize(normalizeLegacyProviderFlags(rest));
708
725
  const errors = [...tokens.errors];
709
726
  if (command === "providers") {
710
727
  rejectFlagsFor(command, tokens, PROVIDERS_FLAGS, errors);
@@ -4000,6 +4017,15 @@ var parseClaudeCode = (input, context) => {
4000
4017
  generationId,
4001
4018
  model: UNKNOWN_MODEL,
4002
4019
  outcome: "ok",
4020
+ ...payload.last_assistant_message === void 0 || payload.last_assistant_message === "" ? {} : {
4021
+ outputContent: [
4022
+ context.privacy.describeContent({
4023
+ kind: "response",
4024
+ role: "assistant",
4025
+ text: payload.last_assistant_message
4026
+ })
4027
+ ]
4028
+ },
4003
4029
  ...withUsage(payload.usage)
4004
4030
  });
4005
4031
  break;
@@ -7192,7 +7218,7 @@ import {
7192
7218
  } from "@opentelemetry/semantic-conventions/incubating";
7193
7219
 
7194
7220
  // src/version.ts
7195
- var VERSION = "0.1.2";
7221
+ var VERSION = "0.2.0";
7196
7222
 
7197
7223
  // src/telemetry/semconv.ts
7198
7224
  var SCOPE_NAME = "@osfactory/otel-hook";