@sentry/junior 0.211.0 → 0.213.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/{agent-XXC-9m0B.js → agent-I74ocTD9.js} +19 -19
- package/dist/{agent-hooks-7vR8uZw2.js → agent-hooks-CdRPMAIE.js} +207 -47
- package/dist/{agent-runner-CqXaUvvQ.js → agent-runner-B81eojZx.js} +5 -5
- package/dist/api/schema.js +2 -2
- package/dist/api.d.ts +1 -1
- package/dist/api.js +72 -33
- package/dist/{app-gyu3D9Gn.d.ts → app-D4nNdzPG.d.ts} +1 -1
- package/dist/app.d.ts +1 -1
- package/dist/app.js +31 -31
- package/dist/{auth-pause-state-r-1vEoSX.js → auth-pause-state-BeY0ljFA.js} +6 -6
- package/dist/{briefs-DIj_YgLE.js → briefs-BVIBIvY1.js} +4 -4
- package/dist/{catalog-runtime-BMMLIpxX.js → catalog-runtime-nNOUcF0O.js} +1 -1
- package/dist/{checkpoint-B6jEtGHN.js → checkpoint-BBfOHMai.js} +7 -7
- package/dist/cli/chat.js +13 -13
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +1 -1
- package/dist/cli/plugins.js +3 -3
- package/dist/cli/snapshot-create.js +3 -3
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-BBPo9KiG.js → client-HV5MI31k.js} +2 -2
- package/dist/{config-DMq-uJAV.js → config-DFAtlLoY.js} +2 -2
- package/dist/{conversation-AA4R1VUn.js → conversation-CRWntH-A.js} +19 -19
- package/dist/{conversation-privacy-D99FrYrV.js → conversation-privacy-cpqWNIJp.js} +1 -1
- package/dist/{credential-sync-Cz1T9Ws-.js → credential-sync--5BV3QNF.js} +20 -20
- package/dist/{db-D74z7BZH.d.ts → db-Ca9Nt5ci.d.ts} +1 -1
- package/dist/{execution-stats-BkCnuVBv.js → execution-stats-BjUUUOM8.js} +3 -4
- package/dist/{executor-B5VURdwg.js → executor-BTrFBTlg.js} +39 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-DUs_jnBa.js → job-queue-CEKc-Fos.js} +1 -1
- package/dist/{logging-CXQcqM-W.js → logging-BBIO8nx4.js} +1 -1
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-B0KXcd24.js → oauth-callback-server-BDbi0GuG.js} +2 -2
- package/dist/{pending-auth-CxZjizu_.js → pending-auth-YFna7Jtg.js} +2 -2
- package/dist/{profile-8K6D5LHD.js → profile-JxMky6PH.js} +4 -4
- package/dist/{prompt-C1IA4qkj.js → prompt-kRlibHYT.js} +1 -1
- package/dist/{registry-DUa5NdZP.js → registry-BpzPQJAy.js} +1 -1
- package/dist/{resolve-E_-QQ8pM.js → resolve-CygYPkMg.js} +2 -2
- package/dist/{runner-Bf0HnWqY.js → runner-NyIU3zAg.js} +9 -9
- package/dist/{sandbox-egress-signals-BW9FzWoQ.js → sandbox-egress-signals-3UbZEFoN.js} +1 -1
- package/dist/{schema-CwTeb-BF.js → schema-xHUgeh46.js} +1 -1
- package/dist/short-title-CCAI4K8n.js +65 -0
- package/dist/{skills-B1f5Ku_s.js → skills-DqgB34uh.js} +2 -2
- package/dist/{spawn-BsOCLy8T.js → spawn-BUerJdfD.js} +2 -2
- package/dist/{stats-CrITkCy5.js → stats-CAV_taik.js} +5 -5
- package/dist/{store-Det8MQ9g.d.ts → store-DoewL5mG.d.ts} +3 -2
- package/dist/{task-queue-CcqJCAUd.js → task-queue-CcODaB31.js} +3 -3
- package/dist/{task-runner-7IOXx_Uo.js → task-runner-BY358TR3.js} +8 -8
- package/dist/{thread-state-Y3PGLZQa.js → thread-state-DsLsunrt.js} +5 -5
- package/dist/{turn-execution-Bm6Xbaoi.js → turn-execution-CFdT_jiq.js} +3 -3
- package/dist/{turn-lifecycle-Czzk8ila.js → turn-lifecycle-ofsiIkCp.js} +1 -1
- package/dist/{validation-A2SMrAkJ.js → validation-DyZEuf_c.js} +1 -1
- package/dist/{version-CfRx6f_C.js → version-Rvkbcp_Z.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{web-authorization-DN3cJuLB.js → web-authorization-BRFPi8xN.js} +1 -1
- package/dist/{web-input-lJH42B_R.js → web-input-PmIax5-U.js} +4 -4
- package/dist/{work-CRHJu3hb.js → work-xudMvrk2.js} +9 -9
- package/dist/{worker-D6oTNemM.js → worker-EwmMphqi.js} +5 -5
- package/migrations/0042_conversation_metrics.sql +26 -0
- package/migrations/meta/0042_snapshot.json +3610 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +5 -5
- package/dist/usage-DHJ3ng2s.js +0 -166
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
CREATE TABLE "junior_conversation_metrics" (
|
|
2
|
+
"conversation_id" text NOT NULL,
|
|
3
|
+
"run_id" text NOT NULL,
|
|
4
|
+
"metric" text NOT NULL,
|
|
5
|
+
"value" double precision NOT NULL,
|
|
6
|
+
"occurred_at" timestamp with time zone NOT NULL,
|
|
7
|
+
"updated_at" timestamp with time zone NOT NULL,
|
|
8
|
+
CONSTRAINT "junior_conversation_metrics_conversation_id_run_id_metric_pk" PRIMARY KEY("conversation_id","run_id","metric")
|
|
9
|
+
);
|
|
10
|
+
--> statement-breakpoint
|
|
11
|
+
ALTER TABLE "junior_conversation_metrics" ADD CONSTRAINT "junior_conversation_metrics_conversation_id_junior_conversations_conversation_id_fk" FOREIGN KEY ("conversation_id") REFERENCES "public"."junior_conversations"("conversation_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
12
|
+
CREATE INDEX "junior_conversation_metrics_occurred_at_metric_idx" ON "junior_conversation_metrics" USING btree ("occurred_at","metric");--> statement-breakpoint
|
|
13
|
+
INSERT INTO "junior_conversation_metrics" ("conversation_id", "run_id", "metric", "value", "occurred_at", "updated_at")
|
|
14
|
+
SELECT conversation_id, coalesce(metric_run_id, 'legacy:' || conversation_id), metric, value, updated_at, updated_at
|
|
15
|
+
FROM junior_conversations
|
|
16
|
+
CROSS JOIN LATERAL (VALUES
|
|
17
|
+
('duration_ms', duration_ms::double precision),
|
|
18
|
+
('total_tokens', CASE WHEN coalesce(usage_json->>'inputTokens', usage_json->>'outputTokens', usage_json->>'cachedInputTokens', usage_json->>'cacheCreationTokens') IS NOT NULL THEN coalesce((usage_json->>'inputTokens')::double precision, 0) + coalesce((usage_json->>'outputTokens')::double precision, 0) + coalesce((usage_json->>'cachedInputTokens')::double precision, 0) + coalesce((usage_json->>'cacheCreationTokens')::double precision, 0) ELSE (usage_json->>'totalTokens')::double precision END),
|
|
19
|
+
('input_tokens', (usage_json->>'inputTokens')::double precision),
|
|
20
|
+
('output_tokens', (usage_json->>'outputTokens')::double precision),
|
|
21
|
+
('cached_input_tokens', (usage_json->>'cachedInputTokens')::double precision),
|
|
22
|
+
('cache_creation_tokens', (usage_json->>'cacheCreationTokens')::double precision),
|
|
23
|
+
('reasoning_tokens', (usage_json->>'reasoningTokens')::double precision),
|
|
24
|
+
('cost_usd', CASE WHEN usage_json->'cost'->>'total' IS NOT NULL THEN (usage_json->'cost'->>'total')::double precision WHEN coalesce(usage_json->'cost'->>'input', usage_json->'cost'->>'output', usage_json->'cost'->>'cacheRead', usage_json->'cost'->>'cacheWrite') IS NOT NULL THEN coalesce((usage_json->'cost'->>'input')::double precision, 0) + coalesce((usage_json->'cost'->>'output')::double precision, 0) + coalesce((usage_json->'cost'->>'cacheRead')::double precision, 0) + coalesce((usage_json->'cost'->>'cacheWrite')::double precision, 0) END)
|
|
25
|
+
) AS metric_rows(metric, value)
|
|
26
|
+
WHERE value IS NOT NULL AND value >= 0;
|