@unbrained/pm-cli 2026.10.15 → 2026.10.18
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/.agents/skills/pm-developer/references/COMMAND_PLAYBOOK.md +1 -1
- package/.claude-plugin/marketplace.json +1 -1
- package/AGENTS.md +1 -0
- package/CHANGELOG.md +45 -0
- package/dist/cli/extension-command-options.d.ts +3 -1
- package/dist/cli/extension-command-options.js +1 -1
- package/dist/cli/help-content.js +2 -2
- package/dist/cli/register-list-query.js +2 -2
- package/dist/cli/register-mutation.js +2 -2
- package/dist/cli/register-operations.js +1 -1
- package/dist/cli/register-structured-mutation.d.ts +0 -5
- package/dist/cli/register-structured-mutation.js +1 -1
- package/dist/cli/runtime/invocation-options.js +1 -1
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/{chunk-7VHINXZP.js → chunk-4GA4MUTE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RJ5N44WY.js → chunk-4V6ONLI6.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LNKLQYBG.js → chunk-6VZKYJW7.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-7PATQWTH.js +20 -0
- package/dist/cli-bundle/chunks/chunk-7WIEAGDS.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-52EZH2QQ.js → chunk-AETP4JEM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WBBW3WQX.js → chunk-FIJOSX2C.js} +28 -28
- package/dist/cli-bundle/chunks/chunk-LUKVNL72.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-NC3QVGDD.js → chunk-OJ77ZQN3.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-PYRREEUB.js +30 -0
- package/dist/cli-bundle/chunks/chunk-RHQJ6VWC.js +237 -0
- package/dist/cli-bundle/chunks/{chunk-N56CAQBU.js → chunk-RNABUEFB.js} +52 -52
- package/dist/cli-bundle/chunks/chunk-TO6CIV4C.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-JGKTOBVB.js → chunk-ZZED447K.js} +4 -4
- package/dist/cli-bundle/chunks/{register-list-query-FKKFQ66D.js → register-list-query-PUCVYYBD.js} +7 -7
- package/dist/cli-bundle/chunks/register-mutation-GGGVBXD5.js +20 -0
- package/dist/cli-bundle/chunks/{register-operations-GEQ2H7PS.js → register-operations-NRZ6Q4QE.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-PSJTQBBO.js → register-setup-MV3P3YSF.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-2MPQUMTF.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-H3P77KVU.js → chunk-5UKCSZWT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-4KQFMOM7.js → chunk-A4ZHHTEX.js} +5 -5
- package/dist/cli-bundle/focused-chunks/{chunk-5OO54BIV.js → chunk-B4YLP5ZB.js} +3 -3
- package/dist/cli-bundle/focused-chunks/chunk-BFEMT5U3.js +20 -0
- package/dist/cli-bundle/focused-chunks/{chunk-THYQR3ON.js → chunk-FW7CSSKL.js} +61 -61
- package/dist/cli-bundle/focused-chunks/{chunk-3RNUMVK4.js → chunk-HYPRPSYD.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-FQKPOZKS.js → chunk-IRVL4UXR.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-Q4VNCTR2.js → chunk-L55KQ2KT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-52I2SNKJ.js → chunk-MASIOFPG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-RJ3EIHDU.js +26 -0
- package/dist/cli-bundle/focused-chunks/chunk-SEL4Z2OO.js +167 -0
- package/dist/cli-bundle/focused-chunks/{chunk-TYLG5VEB.js → chunk-TB7F4FCR.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-KIIFVULU.js → chunk-TZUIBG3P.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-N6FUKTZS.js → chunk-Z7YIFCNE.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-5KRACGBK.js → chunk-ZDBS2DCT.js} +3 -3
- package/dist/cli-bundle/main.js +27 -27
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +2 -2
- package/dist/cli-bundle/sdk-core.js +23 -23
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +55 -54
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +7 -7
- package/dist/core/extensions/extension-types.d.ts +15 -0
- package/dist/core/extensions/extension-types.js +1 -1
- package/dist/core/extensions/flag-value-types.d.ts +16 -0
- package/dist/core/extensions/flag-value-types.js +1 -1
- package/dist/core/extensions/registration-contracts.js +1 -1
- package/dist/core/history/event-index.d.ts +8 -1
- package/dist/core/history/event-index.js +19 -18
- package/dist/core/item/item-format.js +3 -3
- package/dist/core/lock/lock.d.ts +8 -1
- package/dist/core/lock/lock.js +3 -3
- package/dist/core/output/mutation-projection.d.ts +0 -21
- package/dist/core/output/mutation-projection.js +1 -1
- package/dist/core/output/output.js +2 -2
- package/dist/core/schema/type-workflows.d.ts +1 -1
- package/dist/core/schema/type-workflows.js +1 -1
- package/dist/core/shared/text-normalization.d.ts +2 -0
- package/dist/core/shared/text-normalization.js +1 -1
- package/dist/core/store/item-mutation-precondition.d.ts +11 -0
- package/dist/core/store/item-mutation-precondition.js +2 -0
- package/dist/core/store/item-store.js +1 -1
- package/dist/core/store/paths.js +1 -1
- package/dist/core/telemetry/policy.d.ts +2 -0
- package/dist/core/telemetry/policy.js +1 -1
- package/dist/core/telemetry/runtime.d.ts +5 -3
- package/dist/core/telemetry/runtime.js +3 -3
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tool-definitions.js +1 -1
- package/dist/sdk/cli-contracts/agent-output-contracts.js +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +1 -1
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +1 -1
- package/dist/sdk/cli-contracts/registration-helpers.d.ts +1 -1
- package/dist/sdk/cli-contracts/registration-helpers.js +1 -1
- package/dist/sdk/cli-contracts/tool-schema.d.ts +2 -2
- package/dist/sdk/cli-contracts/tool-schema.js +1 -1
- package/dist/sdk/context-intent-contracts.js +1 -1
- package/dist/sdk/core.d.ts +2 -1
- package/dist/sdk/core.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
- package/dist/sdk/governance/health/projection.d.ts +37 -0
- package/dist/sdk/governance/health/projection.js +2 -0
- package/dist/sdk/governance/health.d.ts +7 -18
- package/dist/sdk/governance/health.js +2 -2
- package/dist/sdk/guide-topics.js +1 -1
- package/dist/sdk/index.d.ts +2 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/item-transaction.d.ts +72 -9
- package/dist/sdk/item-transaction.js +1 -1
- package/dist/sdk/lifecycle/claim.d.ts +15 -1
- package/dist/sdk/lifecycle/claim.js +1 -1
- package/dist/sdk/lifecycle/close.d.ts +2 -8
- package/dist/sdk/lifecycle/close.js +1 -1
- package/dist/sdk/lifecycle/core-item-fields.d.ts +6 -0
- package/dist/sdk/lifecycle/core-item-fields.js +2 -0
- package/dist/sdk/lifecycle/mcp-actions.js +1 -1
- package/dist/sdk/lifecycle/mutation-option-validation.d.ts +2 -0
- package/dist/sdk/lifecycle/mutation-option-validation.js +2 -0
- package/dist/sdk/lifecycle/release-handoff.d.ts +12 -0
- package/dist/sdk/lifecycle/release-handoff.js +2 -0
- package/dist/sdk/lifecycle/structured-mutation-plan.d.ts +33 -0
- package/dist/sdk/lifecycle/structured-mutation-plan.js +2 -0
- package/dist/sdk/lifecycle/task-composition.d.ts +2 -2
- package/dist/sdk/lifecycle/task-composition.js +1 -1
- package/dist/sdk/lifecycle/update.d.ts +3 -11
- package/dist/sdk/lifecycle/update.js +1 -1
- package/dist/sdk/lifecycle/workflow-transition.d.ts +13 -0
- package/dist/sdk/lifecycle/workflow-transition.js +2 -0
- package/dist/sdk/lifecycle-policy.d.ts +12 -2
- package/dist/sdk/lifecycle-policy.js +1 -1
- package/dist/sdk/mutation-events.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/query/list.d.ts +2 -0
- package/dist/sdk/query/list.js +1 -1
- package/dist/sdk/read-output-budget.js +1 -1
- package/dist/sdk/runtime-input.js +1 -1
- package/dist/sdk/runtime-primitives.d.ts +1 -1
- package/dist/sdk/runtime-primitives.js +1 -1
- package/dist/sdk/runtime.d.ts +8 -8
- package/dist/sdk/runtime.js +1 -1
- package/dist/sdk/structured-mutations.d.ts +52 -1
- package/dist/sdk/structured-mutations.js +1 -1
- package/dist/sdk/workspace-transaction.js +2 -2
- package/dist/types.d.ts +2 -2
- package/dist/types.js +1 -1
- package/docs/AGENT_GUIDE.md +33 -4
- package/docs/CLOSE_EVIDENCE_RECOVERY.md +16 -7
- package/docs/COMMANDS.md +111 -10
- package/docs/CONFIGURATION.md +22 -1
- package/docs/DEVELOPMENT_DEPENDENCY_SECURITY.md +22 -3
- package/docs/ECOSYSTEM_PLANNING_REVIEW.md +5 -1
- package/docs/EXTENSIONS.md +1 -1
- package/docs/OUTPUT_PROJECTION_CONTRACTS.md +10 -0
- package/docs/RELEASING.md +8 -1
- package/docs/SDK.md +114 -2
- package/docs/SDK_CONTEXT_COORDINATION.md +71 -7
- package/docs/SDK_STORAGE_LIFECYCLE.md +24 -2
- package/docs/TESTING.md +23 -0
- package/docs/examples/ci/github-actions-pm-extension-gate.yml +1 -1
- package/docs/examples/ci/gitlab-ci-pm-extension-gate.yml +1 -1
- package/docs/examples/ci/jenkins-pm-extension-gate.Jenkinsfile +1 -1
- package/docs/generated/FLAG_LEXICON_BUDGETS.md +1 -1
- package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +16 -3
- package/marketplace.json +1 -1
- package/node_modules/@opentelemetry/core/package.json +2 -1
- package/node_modules/@opentelemetry/instrumentation/package.json +2 -1
- package/node_modules/@opentelemetry/resources/package.json +2 -1
- package/node_modules/@opentelemetry/sdk-trace/package.json +2 -1
- package/node_modules/@opentelemetry/sdk-trace-base/package.json +2 -1
- package/node_modules/@sentry/core/build/cjs/client.js +5 -4
- package/node_modules/@sentry/core/build/cjs/tracing/ai/gen-ai-attributes.js +0 -4
- package/node_modules/@sentry/core/build/cjs/tracing/ai/utils.js +33 -23
- package/node_modules/@sentry/core/build/cjs/tracing/anthropic-ai/index.js +7 -6
- package/node_modules/@sentry/core/build/cjs/tracing/anthropic-ai/streaming.js +3 -1
- package/node_modules/@sentry/core/build/cjs/tracing/google-genai/index.js +13 -14
- package/node_modules/@sentry/core/build/cjs/tracing/google-genai/streaming.js +6 -1
- package/node_modules/@sentry/core/build/cjs/tracing/langchain/utils.js +71 -21
- package/node_modules/@sentry/core/build/cjs/tracing/langgraph/utils.js +23 -33
- package/node_modules/@sentry/core/build/cjs/tracing/openai/streaming.js +6 -0
- package/node_modules/@sentry/core/build/cjs/tracing/openai/utils.js +11 -0
- package/node_modules/@sentry/core/build/cjs/tracing/workers-ai/utils.js +1 -1
- package/node_modules/@sentry/core/build/cjs/utils/eventUtils.js +4 -0
- package/node_modules/@sentry/core/build/cjs/utils/prepareEvent.js +2 -2
- package/node_modules/@sentry/core/build/cjs/utils/version.js +1 -1
- package/node_modules/@sentry/core/build/esm/client.js +6 -5
- package/node_modules/@sentry/core/build/esm/package.json +1 -1
- package/node_modules/@sentry/core/build/esm/tracing/ai/gen-ai-attributes.js +1 -3
- package/node_modules/@sentry/core/build/esm/tracing/ai/utils.js +34 -24
- package/node_modules/@sentry/core/build/esm/tracing/anthropic-ai/index.js +8 -7
- package/node_modules/@sentry/core/build/esm/tracing/anthropic-ai/streaming.js +3 -1
- package/node_modules/@sentry/core/build/esm/tracing/google-genai/index.js +15 -16
- package/node_modules/@sentry/core/build/esm/tracing/google-genai/streaming.js +6 -1
- package/node_modules/@sentry/core/build/esm/tracing/langchain/utils.js +73 -24
- package/node_modules/@sentry/core/build/esm/tracing/langgraph/utils.js +24 -34
- package/node_modules/@sentry/core/build/esm/tracing/openai/streaming.js +6 -0
- package/node_modules/@sentry/core/build/esm/tracing/openai/utils.js +11 -0
- package/node_modules/@sentry/core/build/esm/tracing/workers-ai/utils.js +2 -2
- package/node_modules/@sentry/core/build/esm/utils/eventUtils.js +4 -1
- package/node_modules/@sentry/core/build/esm/utils/prepareEvent.js +2 -2
- package/node_modules/@sentry/core/build/esm/utils/version.js +1 -1
- package/node_modules/@sentry/core/build/types/tracing/ai/utils.d.ts +3 -7
- package/node_modules/@sentry/core/build/types/tracing/anthropic-ai/types.d.ts +2 -2
- package/node_modules/@sentry/core/build/types/tracing/langchain/types.d.ts +15 -0
- package/node_modules/@sentry/core/build/types/tracing/langchain/utils.d.ts +1 -0
- package/node_modules/@sentry/core/build/types/tracing/langgraph/utils.d.ts +2 -0
- package/node_modules/@sentry/core/build/types/tracing/openai/types.d.ts +2 -0
- package/node_modules/@sentry/core/build/types/utils/eventUtils.d.ts +2 -1
- package/node_modules/@sentry/core/build/types-ts3.8/tracing/ai/utils.d.ts +3 -7
- package/node_modules/@sentry/core/build/types-ts3.8/tracing/anthropic-ai/types.d.ts +2 -2
- package/node_modules/@sentry/core/build/types-ts3.8/tracing/langchain/types.d.ts +15 -0
- package/node_modules/@sentry/core/build/types-ts3.8/tracing/langchain/utils.d.ts +1 -0
- package/node_modules/@sentry/core/build/types-ts3.8/tracing/langgraph/utils.d.ts +2 -0
- package/node_modules/@sentry/core/build/types-ts3.8/tracing/openai/types.d.ts +2 -0
- package/node_modules/@sentry/core/build/types-ts3.8/utils/eventUtils.d.ts +2 -1
- package/node_modules/@sentry/core/package.json +1 -1
- package/node_modules/@sentry/node/build/esm/package.json +1 -1
- package/node_modules/@sentry/node/package.json +5 -5
- package/node_modules/@sentry/node-core/build/cjs/integrations/anr/index.js +1 -1
- package/node_modules/@sentry/node-core/build/cjs/integrations/local-variables/local-variables-async.js +1 -1
- package/node_modules/@sentry/node-core/build/esm/integrations/anr/index.js +1 -1
- package/node_modules/@sentry/node-core/build/esm/integrations/anr/worker-script.js +2 -2
- package/node_modules/@sentry/node-core/build/esm/integrations/local-variables/local-variables-async.js +1 -1
- package/node_modules/@sentry/node-core/build/esm/integrations/local-variables/worker-script.js +1 -1
- package/node_modules/@sentry/node-core/build/esm/package.json +1 -1
- package/node_modules/@sentry/node-core/package.json +10 -4
- package/node_modules/@sentry/opentelemetry/build/esm/package.json +1 -1
- package/node_modules/@sentry/opentelemetry/package.json +5 -2
- package/node_modules/@sentry/server-utils/build/THIRD-PARTY-LICENSES.txt +55 -55
- package/node_modules/@sentry/server-utils/build/esm/package.json +1 -1
- package/node_modules/@sentry/server-utils/package.json +2 -2
- package/node_modules/@toon-format/toon/README.md +10 -41
- package/node_modules/@toon-format/toon/dist/index.d.mts +12 -36
- package/node_modules/@toon-format/toon/dist/index.mjs +134 -202
- package/node_modules/@toon-format/toon/package.json +2 -2
- package/node_modules/debug/package.json +3 -0
- package/node_modules/fdir/package.json +3 -0
- package/node_modules/has-flag/index.d.ts +39 -0
- package/node_modules/has-flag/index.js +8 -0
- package/node_modules/has-flag/license +9 -0
- package/node_modules/has-flag/package.json +46 -0
- package/node_modules/has-flag/readme.md +89 -0
- package/node_modules/supports-color/browser.js +5 -0
- package/node_modules/supports-color/index.js +135 -0
- package/node_modules/supports-color/license +9 -0
- package/node_modules/supports-color/package.json +53 -0
- package/node_modules/supports-color/readme.md +76 -0
- package/package.json +5 -4
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/package.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/package.json +1 -1
- package/plugins/pm-codex/plugin.json +1 -1
- package/runtime-dependencies.json +1 -1
- package/dist/cli-bundle/chunks/chunk-7OEGNA4X.js +0 -20
- package/dist/cli-bundle/chunks/chunk-EMEEHV2Y.js +0 -2
- package/dist/cli-bundle/chunks/chunk-JSUJWIHQ.js +0 -30
- package/dist/cli-bundle/chunks/chunk-VIMQCFCK.js +0 -2
- package/dist/cli-bundle/chunks/chunk-X2H6UR26.js +0 -236
- package/dist/cli-bundle/chunks/register-mutation-EWMMVZJB.js +0 -20
- package/dist/cli-bundle/focused-chunks/chunk-5TBAVZDR.js +0 -20
- package/dist/cli-bundle/focused-chunks/chunk-HTA3TNC3.js +0 -26
- package/dist/cli-bundle/focused-chunks/chunk-JKBH7YGX.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-PDYE7QDX.js +0 -166
- package/docs/ecosystem-review-2026-09-28.json +0 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS, GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS } from '@sentry/conventions/attributes';
|
|
1
2
|
import { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes.js';
|
|
2
3
|
import { SPAN_STATUS_ERROR } from '../spanstatus.js';
|
|
3
4
|
import { startSpan } from '../trace.js';
|
|
4
5
|
import { GEN_AI_EXECUTE_TOOL_OPERATION_ATTRIBUTE, GEN_AI_TOOL_INPUT_ATTRIBUTE, GEN_AI_TOOL_OUTPUT_ATTRIBUTE, GEN_AI_TOOL_TYPE_ATTRIBUTE, GEN_AI_TOOL_NAME_ATTRIBUTE, GEN_AI_OPERATION_NAME_ATTRIBUTE, GEN_AI_AGENT_NAME_ATTRIBUTE, GEN_AI_TOOL_DESCRIPTION_ATTRIBUTE, GEN_AI_TOOL_CALL_ID_ATTRIBUTE, GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE, GEN_AI_RESPONSE_TEXT_ATTRIBUTE, GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE, GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE, GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE, GEN_AI_RESPONSE_MODEL_ATTRIBUTE, GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE } from '../ai/gen-ai-attributes.js';
|
|
5
|
-
import { normalizeLangChainMessages } from '../langchain/utils.js';
|
|
6
|
+
import { normalizeLangChainMessages, extractMessageTokenUsageAttributes } from '../langchain/utils.js';
|
|
6
7
|
import { LANGGRAPH_ORIGIN } from './constants.js';
|
|
7
8
|
|
|
8
9
|
function extractLLMFromParams(args) {
|
|
@@ -116,39 +117,14 @@ function extractToolCalls(messages) {
|
|
|
116
117
|
return toolCalls.length > 0 ? toolCalls : null;
|
|
117
118
|
}
|
|
118
119
|
function extractTokenUsageFromMessage(message) {
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
if (typeof usage.output_tokens === "number") {
|
|
129
|
-
outputTokens = usage.output_tokens;
|
|
130
|
-
}
|
|
131
|
-
if (typeof usage.total_tokens === "number") {
|
|
132
|
-
totalTokens = usage.total_tokens;
|
|
133
|
-
}
|
|
134
|
-
return { inputTokens, outputTokens, totalTokens };
|
|
135
|
-
}
|
|
136
|
-
if (msg.response_metadata && typeof msg.response_metadata === "object") {
|
|
137
|
-
const metadata = msg.response_metadata;
|
|
138
|
-
if (metadata.tokenUsage && typeof metadata.tokenUsage === "object") {
|
|
139
|
-
const tokenUsage = metadata.tokenUsage;
|
|
140
|
-
if (typeof tokenUsage.promptTokens === "number") {
|
|
141
|
-
inputTokens = tokenUsage.promptTokens;
|
|
142
|
-
}
|
|
143
|
-
if (typeof tokenUsage.completionTokens === "number") {
|
|
144
|
-
outputTokens = tokenUsage.completionTokens;
|
|
145
|
-
}
|
|
146
|
-
if (typeof tokenUsage.totalTokens === "number") {
|
|
147
|
-
totalTokens = tokenUsage.totalTokens;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
return { inputTokens, outputTokens, totalTokens };
|
|
120
|
+
const attributes = extractMessageTokenUsageAttributes(message);
|
|
121
|
+
return {
|
|
122
|
+
inputTokens: attributes[GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE] ?? 0,
|
|
123
|
+
outputTokens: attributes[GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE] ?? 0,
|
|
124
|
+
totalTokens: attributes[GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE] ?? 0,
|
|
125
|
+
cacheCreationInputTokens: attributes[GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS],
|
|
126
|
+
cacheReadInputTokens: attributes[GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS]
|
|
127
|
+
};
|
|
152
128
|
}
|
|
153
129
|
function extractModelMetadata(span, message) {
|
|
154
130
|
const msg = message;
|
|
@@ -196,11 +172,19 @@ function setResponseAttributes(span, inputMessages, result) {
|
|
|
196
172
|
let totalInputTokens = 0;
|
|
197
173
|
let totalOutputTokens = 0;
|
|
198
174
|
let totalTokens = 0;
|
|
175
|
+
let cacheCreationInputTokens;
|
|
176
|
+
let cacheReadInputTokens;
|
|
199
177
|
for (const message of newMessages) {
|
|
200
178
|
const tokens = extractTokenUsageFromMessage(message);
|
|
201
179
|
totalInputTokens += tokens.inputTokens;
|
|
202
180
|
totalOutputTokens += tokens.outputTokens;
|
|
203
181
|
totalTokens += tokens.totalTokens;
|
|
182
|
+
if (tokens.cacheCreationInputTokens !== void 0) {
|
|
183
|
+
cacheCreationInputTokens = (cacheCreationInputTokens ?? 0) + tokens.cacheCreationInputTokens;
|
|
184
|
+
}
|
|
185
|
+
if (tokens.cacheReadInputTokens !== void 0) {
|
|
186
|
+
cacheReadInputTokens = (cacheReadInputTokens ?? 0) + tokens.cacheReadInputTokens;
|
|
187
|
+
}
|
|
204
188
|
extractModelMetadata(span, message);
|
|
205
189
|
}
|
|
206
190
|
if (totalInputTokens > 0) {
|
|
@@ -212,6 +196,12 @@ function setResponseAttributes(span, inputMessages, result) {
|
|
|
212
196
|
if (totalTokens > 0) {
|
|
213
197
|
span.setAttribute(GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE, totalTokens);
|
|
214
198
|
}
|
|
199
|
+
if (cacheCreationInputTokens !== void 0) {
|
|
200
|
+
span.setAttribute(GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS, cacheCreationInputTokens);
|
|
201
|
+
}
|
|
202
|
+
if (cacheReadInputTokens !== void 0) {
|
|
203
|
+
span.setAttribute(GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS, cacheReadInputTokens);
|
|
204
|
+
}
|
|
215
205
|
}
|
|
216
206
|
|
|
217
207
|
export { extractAgentNameFromParams, extractLLMFromParams, extractModelMetadata, extractTokenUsageFromMessage, extractToolCalls, extractToolsFromCompiledGraph, setResponseAttributes, wrapToolsWithSpans };
|
|
@@ -31,6 +31,8 @@ function processChatCompletionChunk(chunk, state, recordOutputs) {
|
|
|
31
31
|
state.promptTokens = chunk.usage.prompt_tokens;
|
|
32
32
|
state.completionTokens = chunk.usage.completion_tokens;
|
|
33
33
|
state.totalTokens = chunk.usage.total_tokens;
|
|
34
|
+
state.cacheReadInputTokens = chunk.usage.prompt_tokens_details?.cached_tokens ?? state.cacheReadInputTokens;
|
|
35
|
+
state.cacheCreationInputTokens = chunk.usage.prompt_tokens_details?.cache_write_tokens ?? state.cacheCreationInputTokens;
|
|
34
36
|
}
|
|
35
37
|
for (const choice of chunk.choices ?? []) {
|
|
36
38
|
if (recordOutputs) {
|
|
@@ -84,6 +86,8 @@ function processResponsesApiEvent(streamEvent, state, recordOutputs, span) {
|
|
|
84
86
|
state.promptTokens = response.usage.input_tokens;
|
|
85
87
|
state.completionTokens = response.usage.output_tokens;
|
|
86
88
|
state.totalTokens = response.usage.total_tokens;
|
|
89
|
+
state.cacheReadInputTokens = response.usage.input_tokens_details?.cached_tokens ?? state.cacheReadInputTokens;
|
|
90
|
+
state.cacheCreationInputTokens = response.usage.input_tokens_details?.cache_write_tokens ?? state.cacheCreationInputTokens;
|
|
87
91
|
}
|
|
88
92
|
if (response.status) {
|
|
89
93
|
state.finishReasons.push(response.status);
|
|
@@ -103,6 +107,8 @@ async function* instrumentStream(stream, span, recordOutputs) {
|
|
|
103
107
|
promptTokens: void 0,
|
|
104
108
|
completionTokens: void 0,
|
|
105
109
|
totalTokens: void 0,
|
|
110
|
+
cacheReadInputTokens: void 0,
|
|
111
|
+
cacheCreationInputTokens: void 0,
|
|
106
112
|
chatCompletionToolCalls: {},
|
|
107
113
|
responsesApiToolCalls: []
|
|
108
114
|
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS, GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS } from '@sentry/conventions/attributes';
|
|
2
|
+
import { isObjectLike } from '../../utils/is.js';
|
|
1
3
|
import { GEN_AI_RESPONSE_FINISH_REASONS_ATTRIBUTE, GEN_AI_RESPONSE_TEXT_ATTRIBUTE, GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE, GEN_AI_REQUEST_MODEL_ATTRIBUTE, GEN_AI_REQUEST_TEMPERATURE_ATTRIBUTE, GEN_AI_REQUEST_TOP_P_ATTRIBUTE, GEN_AI_REQUEST_FREQUENCY_PENALTY_ATTRIBUTE, GEN_AI_REQUEST_PRESENCE_PENALTY_ATTRIBUTE, GEN_AI_REQUEST_STREAM_ATTRIBUTE, GEN_AI_REQUEST_ENCODING_FORMAT_ATTRIBUTE, GEN_AI_REQUEST_DIMENSIONS_ATTRIBUTE, GEN_AI_CONVERSATION_ID_ATTRIBUTE, GEN_AI_RESPONSE_ID_ATTRIBUTE, GEN_AI_RESPONSE_MODEL_ATTRIBUTE, GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE, GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE, GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE } from '../ai/gen-ai-attributes.js';
|
|
2
4
|
|
|
3
5
|
function isResponsesApiStreamEvent(event) {
|
|
@@ -32,6 +34,15 @@ function addResponseAttributes(span, result, recordOutputs) {
|
|
|
32
34
|
if (typeof usage.total_tokens === "number") {
|
|
33
35
|
attrs[GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE] = usage.total_tokens;
|
|
34
36
|
}
|
|
37
|
+
const inputDetails = usage.prompt_tokens_details ?? usage.input_tokens_details;
|
|
38
|
+
if (isObjectLike(inputDetails)) {
|
|
39
|
+
if (typeof inputDetails.cached_tokens === "number") {
|
|
40
|
+
attrs[GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS] = inputDetails.cached_tokens;
|
|
41
|
+
}
|
|
42
|
+
if (typeof inputDetails.cache_write_tokens === "number") {
|
|
43
|
+
attrs[GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS] = inputDetails.cache_write_tokens;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
35
46
|
}
|
|
36
47
|
if (Array.isArray(response.choices)) {
|
|
37
48
|
const choices = response.choices;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GEN_AI_REQUEST_TEMPERATURE, GEN_AI_REQUEST_MAX_TOKENS, GEN_AI_REQUEST_TOP_P, GEN_AI_REQUEST_TOP_K, GEN_AI_REQUEST_FREQUENCY_PENALTY, GEN_AI_REQUEST_PRESENCE_PENALTY, GEN_AI_EMBEDDINGS_INPUT, GEN_AI_SYSTEM_INSTRUCTIONS, GEN_AI_INPUT_MESSAGES, GEN_AI_REQUEST_MODEL, GEN_AI_OPERATION_NAME, GEN_AI_PROVIDER_NAME } from '@sentry/conventions/attributes';
|
|
2
2
|
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../../semanticAttributes.js';
|
|
3
3
|
import { GEN_AI_REQUEST_STREAM_ATTRIBUTE, GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE, GEN_AI_RESPONSE_TEXT_ATTRIBUTE, GEN_AI_RESPONSE_TOOL_CALLS_ATTRIBUTE, GEN_AI_OUTPUT_MESSAGES_ATTRIBUTE } from '../ai/gen-ai-attributes.js';
|
|
4
|
-
import { extractSystemInstructions, getTruncatedJsonString,
|
|
4
|
+
import { extractSystemInstructions, getTruncatedJsonString, getTokenUsageAttributes } from '../ai/utils.js';
|
|
5
5
|
import { stringify } from '../../utils/string.js';
|
|
6
6
|
import { WORKERS_AI_ORIGIN, WORKERS_AI_PROVIDER_NAME } from './constants.js';
|
|
7
7
|
|
|
@@ -111,7 +111,7 @@ function addResponseAttributes(span, result, recordOutputs) {
|
|
|
111
111
|
}
|
|
112
112
|
const response = result;
|
|
113
113
|
if (response.usage) {
|
|
114
|
-
|
|
114
|
+
span.setAttributes(getTokenUsageAttributes(response.usage.prompt_tokens, response.usage.completion_tokens));
|
|
115
115
|
}
|
|
116
116
|
if (recordOutputs) {
|
|
117
117
|
let responseText;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
function isInternalException(hint) {
|
|
2
|
+
return hint.data?.__sentry__ === true;
|
|
3
|
+
}
|
|
1
4
|
function getPossibleEventMessages(event) {
|
|
2
5
|
const possibleMessages = [];
|
|
3
6
|
if (event.message) {
|
|
@@ -16,5 +19,5 @@ function getPossibleEventMessages(event) {
|
|
|
16
19
|
return possibleMessages;
|
|
17
20
|
}
|
|
18
21
|
|
|
19
|
-
export { getPossibleEventMessages };
|
|
22
|
+
export { getPossibleEventMessages, isInternalException };
|
|
20
23
|
//# sourceMappingURL=eventUtils.js.map
|
|
@@ -2,6 +2,7 @@ import { DEFAULT_ENVIRONMENT } from '../constants.js';
|
|
|
2
2
|
import { notifyEventProcessors } from '../eventProcessors.js';
|
|
3
3
|
import { Scope } from '../scope.js';
|
|
4
4
|
import { getFilenameToDebugIdMap } from './debug-ids.js';
|
|
5
|
+
import { isInternalException } from './eventUtils.js';
|
|
5
6
|
import { uuid4, addExceptionMechanism } from './misc.js';
|
|
6
7
|
import { normalize } from './normalize.js';
|
|
7
8
|
import { getCombinedScopeData, applyScopeDataToEvent } from './scopeData.js';
|
|
@@ -41,8 +42,7 @@ function prepareEvent(options, event, hint, scope, client, isolationScope) {
|
|
|
41
42
|
// Run scope event processors _after_ all other processors
|
|
42
43
|
...data.eventProcessors
|
|
43
44
|
];
|
|
44
|
-
const
|
|
45
|
-
const result = isInternalException ? resolvedSyncPromise(prepared) : notifyEventProcessors(eventProcessors, prepared, hint);
|
|
45
|
+
const result = isInternalException(hint) ? resolvedSyncPromise(prepared) : notifyEventProcessors(eventProcessors, prepared, hint);
|
|
46
46
|
return result.then((evt) => {
|
|
47
47
|
if (evt) {
|
|
48
48
|
applyDebugMeta(evt);
|
|
@@ -40,14 +40,9 @@ export declare function shouldEnableTruncation(enableTruncation: boolean | undef
|
|
|
40
40
|
*/
|
|
41
41
|
export declare function buildMethodPath(currentPath: string, prop: string): string;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
44
|
-
* @param span - The span to add attributes to
|
|
45
|
-
* @param promptTokens - The number of prompt tokens
|
|
46
|
-
* @param completionTokens - The number of completion tokens
|
|
47
|
-
* @param cachedInputTokens - The number of cached input tokens
|
|
48
|
-
* @param cachedOutputTokens - The number of cached output tokens
|
|
43
|
+
* Build token usage attributes. Input tokens include cache reads and writes, which are subsets.
|
|
49
44
|
*/
|
|
50
|
-
export declare function
|
|
45
|
+
export declare function getTokenUsageAttributes(promptTokens?: number, completionTokens?: number, cacheCreationInputTokens?: number, cacheReadInputTokens?: number, totalTokens?: number): Record<string, number>;
|
|
51
46
|
export interface StreamResponseState {
|
|
52
47
|
responseId?: string;
|
|
53
48
|
responseModel?: string;
|
|
@@ -59,6 +54,7 @@ export interface StreamResponseState {
|
|
|
59
54
|
totalTokens?: number;
|
|
60
55
|
cacheCreationInputTokens?: number;
|
|
61
56
|
cacheReadInputTokens?: number;
|
|
57
|
+
reasoningOutputTokens?: number;
|
|
62
58
|
}
|
|
63
59
|
/**
|
|
64
60
|
* Ends a streaming span by setting all accumulated response attributes and ending the span.
|
|
@@ -49,8 +49,8 @@ type SuccessfulResponse = {
|
|
|
49
49
|
usage?: {
|
|
50
50
|
input_tokens: number;
|
|
51
51
|
output_tokens: number;
|
|
52
|
-
cache_creation_input_tokens
|
|
53
|
-
cache_read_input_tokens
|
|
52
|
+
cache_creation_input_tokens?: number;
|
|
53
|
+
cache_read_input_tokens?: number;
|
|
54
54
|
};
|
|
55
55
|
error?: never;
|
|
56
56
|
};
|
|
@@ -54,11 +54,26 @@ export interface LangChainMessage {
|
|
|
54
54
|
};
|
|
55
55
|
role?: string;
|
|
56
56
|
additional_kwargs?: Record<string, unknown>;
|
|
57
|
+
usage_metadata?: {
|
|
58
|
+
input_tokens?: number;
|
|
59
|
+
output_tokens?: number;
|
|
60
|
+
total_tokens?: number;
|
|
61
|
+
input_token_details?: {
|
|
62
|
+
cache_read?: number;
|
|
63
|
+
cache_creation?: number;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
57
66
|
lc?: number;
|
|
58
67
|
id?: string[] | string;
|
|
59
68
|
response_metadata?: {
|
|
69
|
+
[key: string]: unknown;
|
|
60
70
|
model_name?: string;
|
|
61
71
|
finish_reason?: string;
|
|
72
|
+
tokenUsage?: {
|
|
73
|
+
promptTokens?: number;
|
|
74
|
+
completionTokens?: number;
|
|
75
|
+
totalTokens?: number;
|
|
76
|
+
};
|
|
62
77
|
};
|
|
63
78
|
kwargs?: {
|
|
64
79
|
[key: string]: unknown;
|
|
@@ -47,6 +47,7 @@ export declare function extractLLMRequestAttributes(llm: LangChainSerialized, pr
|
|
|
47
47
|
* - Provider system value falls back to `serialized.id?.[2]`.
|
|
48
48
|
*/
|
|
49
49
|
export declare function extractChatModelRequestAttributes(llm: LangChainSerialized, langChainMessages: LangChainMessage[][], recordInputs: boolean, enableTruncation: boolean, invocationParams?: Record<string, unknown>, langSmithMetadata?: Record<string, unknown>): Record<string, SpanAttributeValue | undefined>;
|
|
50
|
+
export declare function extractMessageTokenUsageAttributes(message: LangChainMessage): Record<string, number>;
|
|
50
51
|
/**
|
|
51
52
|
* Extracts response-related attributes based on a `LangChainLLMResult`.
|
|
52
53
|
*
|
|
@@ -27,6 +27,8 @@ export declare function extractTokenUsageFromMessage(message: LangChainMessage):
|
|
|
27
27
|
inputTokens: number;
|
|
28
28
|
outputTokens: number;
|
|
29
29
|
totalTokens: number;
|
|
30
|
+
cacheCreationInputTokens?: number;
|
|
31
|
+
cacheReadInputTokens?: number;
|
|
30
32
|
};
|
|
31
33
|
/**
|
|
32
34
|
* Extract model and finish reason from a message's response_metadata
|
|
@@ -114,6 +114,7 @@ export interface OpenAIResponseObject {
|
|
|
114
114
|
input_tokens: number;
|
|
115
115
|
input_tokens_details?: {
|
|
116
116
|
cached_tokens?: number;
|
|
117
|
+
cache_write_tokens?: number;
|
|
117
118
|
};
|
|
118
119
|
output_tokens: number;
|
|
119
120
|
output_tokens_details?: {
|
|
@@ -302,6 +303,7 @@ export interface ChatCompletionChunk {
|
|
|
302
303
|
prompt_tokens_details: {
|
|
303
304
|
audio_tokens: number;
|
|
304
305
|
cached_tokens: number;
|
|
306
|
+
cache_write_tokens?: number;
|
|
305
307
|
};
|
|
306
308
|
};
|
|
307
309
|
}
|
|
@@ -40,14 +40,9 @@ export declare function shouldEnableTruncation(enableTruncation: boolean | undef
|
|
|
40
40
|
*/
|
|
41
41
|
export declare function buildMethodPath(currentPath: string, prop: string): string;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
44
|
-
* @param span - The span to add attributes to
|
|
45
|
-
* @param promptTokens - The number of prompt tokens
|
|
46
|
-
* @param completionTokens - The number of completion tokens
|
|
47
|
-
* @param cachedInputTokens - The number of cached input tokens
|
|
48
|
-
* @param cachedOutputTokens - The number of cached output tokens
|
|
43
|
+
* Build token usage attributes. Input tokens include cache reads and writes, which are subsets.
|
|
49
44
|
*/
|
|
50
|
-
export declare function
|
|
45
|
+
export declare function getTokenUsageAttributes(promptTokens?: number, completionTokens?: number, cacheCreationInputTokens?: number, cacheReadInputTokens?: number, totalTokens?: number): Record<string, number>;
|
|
51
46
|
export interface StreamResponseState {
|
|
52
47
|
responseId?: string;
|
|
53
48
|
responseModel?: string;
|
|
@@ -59,6 +54,7 @@ export interface StreamResponseState {
|
|
|
59
54
|
totalTokens?: number;
|
|
60
55
|
cacheCreationInputTokens?: number;
|
|
61
56
|
cacheReadInputTokens?: number;
|
|
57
|
+
reasoningOutputTokens?: number;
|
|
62
58
|
}
|
|
63
59
|
/**
|
|
64
60
|
* Ends a streaming span by setting all accumulated response attributes and ending the span.
|
|
@@ -49,8 +49,8 @@ type SuccessfulResponse = {
|
|
|
49
49
|
usage?: {
|
|
50
50
|
input_tokens: number;
|
|
51
51
|
output_tokens: number;
|
|
52
|
-
cache_creation_input_tokens
|
|
53
|
-
cache_read_input_tokens
|
|
52
|
+
cache_creation_input_tokens?: number;
|
|
53
|
+
cache_read_input_tokens?: number;
|
|
54
54
|
};
|
|
55
55
|
error?: never;
|
|
56
56
|
};
|
|
@@ -54,11 +54,26 @@ export interface LangChainMessage {
|
|
|
54
54
|
};
|
|
55
55
|
role?: string;
|
|
56
56
|
additional_kwargs?: Record<string, unknown>;
|
|
57
|
+
usage_metadata?: {
|
|
58
|
+
input_tokens?: number;
|
|
59
|
+
output_tokens?: number;
|
|
60
|
+
total_tokens?: number;
|
|
61
|
+
input_token_details?: {
|
|
62
|
+
cache_read?: number;
|
|
63
|
+
cache_creation?: number;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
57
66
|
lc?: number;
|
|
58
67
|
id?: string[] | string;
|
|
59
68
|
response_metadata?: {
|
|
69
|
+
[key: string]: unknown;
|
|
60
70
|
model_name?: string;
|
|
61
71
|
finish_reason?: string;
|
|
72
|
+
tokenUsage?: {
|
|
73
|
+
promptTokens?: number;
|
|
74
|
+
completionTokens?: number;
|
|
75
|
+
totalTokens?: number;
|
|
76
|
+
};
|
|
62
77
|
};
|
|
63
78
|
kwargs?: {
|
|
64
79
|
[key: string]: unknown;
|
|
@@ -47,6 +47,7 @@ export declare function extractLLMRequestAttributes(llm: LangChainSerialized, pr
|
|
|
47
47
|
* - Provider system value falls back to `serialized.id?.[2]`.
|
|
48
48
|
*/
|
|
49
49
|
export declare function extractChatModelRequestAttributes(llm: LangChainSerialized, langChainMessages: LangChainMessage[][], recordInputs: boolean, enableTruncation: boolean, invocationParams?: Record<string, unknown>, langSmithMetadata?: Record<string, unknown>): Record<string, SpanAttributeValue | undefined>;
|
|
50
|
+
export declare function extractMessageTokenUsageAttributes(message: LangChainMessage): Record<string, number>;
|
|
50
51
|
/**
|
|
51
52
|
* Extracts response-related attributes based on a `LangChainLLMResult`.
|
|
52
53
|
*
|
|
@@ -27,6 +27,8 @@ export declare function extractTokenUsageFromMessage(message: LangChainMessage):
|
|
|
27
27
|
inputTokens: number;
|
|
28
28
|
outputTokens: number;
|
|
29
29
|
totalTokens: number;
|
|
30
|
+
cacheCreationInputTokens?: number;
|
|
31
|
+
cacheReadInputTokens?: number;
|
|
30
32
|
};
|
|
31
33
|
/**
|
|
32
34
|
* Extract model and finish reason from a message's response_metadata
|
|
@@ -114,6 +114,7 @@ export interface OpenAIResponseObject {
|
|
|
114
114
|
input_tokens: number;
|
|
115
115
|
input_tokens_details?: {
|
|
116
116
|
cached_tokens?: number;
|
|
117
|
+
cache_write_tokens?: number;
|
|
117
118
|
};
|
|
118
119
|
output_tokens: number;
|
|
119
120
|
output_tokens_details?: {
|
|
@@ -302,6 +303,7 @@ export interface ChatCompletionChunk {
|
|
|
302
303
|
prompt_tokens_details: {
|
|
303
304
|
audio_tokens: number;
|
|
304
305
|
cached_tokens: number;
|
|
306
|
+
cache_write_tokens?: number;
|
|
305
307
|
};
|
|
306
308
|
};
|
|
307
309
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/core",
|
|
3
|
-
"version": "10.76.
|
|
3
|
+
"version": "10.76.2",
|
|
4
4
|
"description": "Base implementation for all Sentry JavaScript SDKs",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/core",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"10.76.
|
|
1
|
+
{"type":"module","version":"10.76.2","sideEffects":false}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/node",
|
|
3
|
-
"version": "10.76.
|
|
3
|
+
"version": "10.76.2",
|
|
4
4
|
"description": "Sentry Node SDK using OpenTelemetry for performance instrumentation",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/node",
|
|
@@ -70,10 +70,10 @@
|
|
|
70
70
|
"@opentelemetry/instrumentation": "^0.220.0",
|
|
71
71
|
"@opentelemetry/sdk-trace-base": "^2.9.0",
|
|
72
72
|
"@sentry/conventions": "^0.16.0",
|
|
73
|
-
"@sentry/core": "10.76.
|
|
74
|
-
"@sentry/node-core": "10.76.
|
|
75
|
-
"@sentry/opentelemetry": "10.76.
|
|
76
|
-
"@sentry/server-utils": "10.76.
|
|
73
|
+
"@sentry/core": "10.76.2",
|
|
74
|
+
"@sentry/node-core": "10.76.2",
|
|
75
|
+
"@sentry/opentelemetry": "10.76.2",
|
|
76
|
+
"@sentry/server-utils": "10.76.2",
|
|
77
77
|
"import-in-the-middle": "^3.0.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|