deepline 0.2.47 → 0.2.49

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/index.mjs CHANGED
@@ -689,7 +689,7 @@ var SDK_RELEASE = {
689
689
  // 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
690
690
  // exposed storage-dependent synchronous access. This deliberate minor
691
691
  // release keeps lazy paging semantics independent of row residency.
692
- version: "0.2.47",
692
+ version: "0.2.49",
693
693
  contracts: {
694
694
  api: {
695
695
  name: "sdk-http-api",
@@ -3524,7 +3524,7 @@ var DeeplineClient = class {
3524
3524
  deploy: (definition, options2) => this.deployMonitor(definition, options2),
3525
3525
  list: (options2) => this.listMonitors(options2),
3526
3526
  get: (key) => this.getMonitor(key),
3527
- test: (key, payload) => this.testMonitorWebhook(key, payload),
3527
+ test: (key, payload, options2) => this.testMonitorWebhook(key, payload, options2),
3528
3528
  validate: (key) => this.validateMonitor(key),
3529
3529
  dependents: (key) => this.getMonitorDependents(key),
3530
3530
  update: (key, patch) => this.updateMonitor(key, patch),
@@ -5693,10 +5693,16 @@ var DeeplineClient = class {
5693
5693
  { method: "GET" }
5694
5694
  );
5695
5695
  }
5696
- async testMonitorWebhook(key, payload) {
5696
+ async testMonitorWebhook(key, payload, options) {
5697
5697
  return this.http.request(
5698
5698
  `/api/v2/monitors/deployed/${encodeURIComponent(key)}/test`,
5699
- { method: "POST", body: { payload } }
5699
+ {
5700
+ method: "POST",
5701
+ body: {
5702
+ payload,
5703
+ ...options?.validationOnly ? { mode: "validation_only" } : {}
5704
+ }
5705
+ }
5700
5706
  );
5701
5707
  }
5702
5708
  async setupMonitor(tool, payload) {
@@ -212,8 +212,8 @@
212
212
  "dist/cli/index.d.ts",
213
213
  "dist/cli/index.js",
214
214
  "dist/cli/index.mjs",
215
- "dist/compiler-manifest-CGZadg-v.d.mts",
216
- "dist/compiler-manifest-CGZadg-v.d.ts",
215
+ "dist/compiler-manifest-BPA3r-VG.d.mts",
216
+ "dist/compiler-manifest-BPA3r-VG.d.ts",
217
217
  "dist/helpers.d.mts",
218
218
  "dist/helpers.d.ts",
219
219
  "dist/helpers.js",
@@ -1,5 +1,5 @@
1
- import { T as ToolExecutionErrorSchemaVersion, P as PlayAuthoringContractEdition, a as PlayArtifactKind$1, b as PlaySandboxRuntimeDeclaration, c as PlayCompilerManifest } from '../compiler-manifest-CGZadg-v.mjs';
2
- export { d as PLAY_ARTIFACT_KINDS } from '../compiler-manifest-CGZadg-v.mjs';
1
+ import { T as ToolExecutionErrorSchemaVersion, P as PlayAuthoringContractEdition, a as PlayArtifactKind$1, b as PlaySandboxRuntimeDeclaration, c as PlayCompilerManifest } from '../compiler-manifest-BPA3r-VG.mjs';
2
+ export { d as PLAY_ARTIFACT_KINDS } from '../compiler-manifest-BPA3r-VG.mjs';
3
3
  import '@sinclair/typebox';
4
4
 
5
5
  type PlayPackageImport = {
@@ -1,5 +1,5 @@
1
- import { T as ToolExecutionErrorSchemaVersion, P as PlayAuthoringContractEdition, a as PlayArtifactKind$1, b as PlaySandboxRuntimeDeclaration, c as PlayCompilerManifest } from '../compiler-manifest-CGZadg-v.js';
2
- export { d as PLAY_ARTIFACT_KINDS } from '../compiler-manifest-CGZadg-v.js';
1
+ import { T as ToolExecutionErrorSchemaVersion, P as PlayAuthoringContractEdition, a as PlayArtifactKind$1, b as PlaySandboxRuntimeDeclaration, c as PlayCompilerManifest } from '../compiler-manifest-BPA3r-VG.js';
2
+ export { d as PLAY_ARTIFACT_KINDS } from '../compiler-manifest-BPA3r-VG.js';
3
3
  import '@sinclair/typebox';
4
4
 
5
5
  type PlayPackageImport = {
@@ -2806,6 +2806,76 @@ var PLAY_AUTHORING_FIELD_REGISTRY = {
2806
2806
  description: "HTTP header containing the webhook signature.",
2807
2807
  errorMessage: "bindings.webhook.hmac.header must be a non-empty static string."
2808
2808
  },
2809
+ "bindings.webhook.auth.type": {
2810
+ schema: Type.Literal("standard-webhooks"),
2811
+ fixtures: {
2812
+ valid: "standard-webhooks",
2813
+ invalid: "svix",
2814
+ absent: void 0,
2815
+ unresolved: { expression: "type" },
2816
+ edition1: void 0
2817
+ },
2818
+ referenceType: "'standard-webhooks'",
2819
+ // auth itself is optional; once present, the AST adapter requires this
2820
+ // field together with headerFamily and signingSecrets.
2821
+ required: false,
2822
+ resolution: "static-required",
2823
+ issueCode: "play_authoring_standard_webhooks_invalid",
2824
+ description: "Uses the Standard Webhooks v1 symmetric signing scheme.",
2825
+ errorMessage: 'bindings.webhook.auth.type must be the static literal "standard-webhooks".'
2826
+ },
2827
+ "bindings.webhook.auth.headerFamily": {
2828
+ schema: Type.Union([Type.Literal("standard"), Type.Literal("svix")]),
2829
+ fixtures: {
2830
+ valid: "svix",
2831
+ invalid: "webhook",
2832
+ absent: void 0,
2833
+ unresolved: { expression: "headerFamily" },
2834
+ edition1: void 0
2835
+ },
2836
+ referenceType: "'standard' | 'svix'",
2837
+ // auth itself is optional; once present, the AST adapter requires this
2838
+ // field together with type and signingSecrets.
2839
+ required: false,
2840
+ resolution: "static-required",
2841
+ issueCode: "play_authoring_standard_webhooks_invalid",
2842
+ description: "Header namespace expected from the webhook provider.",
2843
+ errorMessage: 'bindings.webhook.auth.headerFamily must be the static literal "standard" or "svix".'
2844
+ },
2845
+ "bindings.webhook.auth.signingSecrets[]": {
2846
+ schema: SecretEnvironmentNameSchema,
2847
+ fixtures: {
2848
+ valid: "VECTOR_WEBHOOK_SECRET",
2849
+ invalid: "vector_webhook_secret",
2850
+ absent: void 0,
2851
+ unresolved: { expression: "secret" },
2852
+ edition1: void 0
2853
+ },
2854
+ referenceType: "string",
2855
+ // auth itself is optional; once present, the AST adapter requires this
2856
+ // field together with type and headerFamily.
2857
+ required: false,
2858
+ resolution: "static-required",
2859
+ issueCode: "play_authoring_standard_webhooks_invalid",
2860
+ description: "Deepline Secret name used to verify Standard Webhooks.",
2861
+ errorMessage: "bindings.webhook.auth.signingSecrets entries must be uppercase Deepline Secret names beginning with a letter."
2862
+ },
2863
+ "bindings.webhook.auth.toleranceSeconds": {
2864
+ schema: Type.Integer({ minimum: 1, maximum: 3600 }),
2865
+ fixtures: {
2866
+ valid: 300,
2867
+ invalid: 0,
2868
+ absent: void 0,
2869
+ unresolved: { expression: "toleranceSeconds" },
2870
+ edition1: void 0
2871
+ },
2872
+ referenceType: "number",
2873
+ required: false,
2874
+ resolution: "static-required",
2875
+ issueCode: "play_authoring_standard_webhooks_invalid",
2876
+ description: "Accepted delivery timestamp skew in seconds, from 1 through 3600.",
2877
+ errorMessage: "bindings.webhook.auth.toleranceSeconds must be a static whole number from 1 through 3600."
2878
+ },
2809
2879
  "bindings.cron.schedule": {
2810
2880
  schema: Type.String({ minLength: 1 }),
2811
2881
  fixtures: {
@@ -3830,7 +3900,7 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
3830
3900
  ` inline?: ${cloudReferenceType("inline")};`,
3831
3901
  ` billing?: { maxCreditsPerRun?: ${cloudReferenceType("billing.maxCreditsPerRun")} };`,
3832
3902
  ` runtime?: { timeout?: ${cloudReferenceType("runtime.timeout")}; size?: ${cloudReferenceType("runtime.size")} };`,
3833
- ` webhook?: { hmac?: { algorithm?: ${cloudReferenceType("bindings.webhook.hmac.algorithm")}; header?: ${cloudReferenceType("bindings.webhook.hmac.header")}; secretEnv: ${cloudReferenceType("bindings.webhook.hmac.secretEnv")} } };`,
3903
+ ` webhook?: { hmac?: { algorithm?: ${cloudReferenceType("bindings.webhook.hmac.algorithm")}; header?: ${cloudReferenceType("bindings.webhook.hmac.header")}; secretEnv: ${cloudReferenceType("bindings.webhook.hmac.secretEnv")} }; auth?: { type: ${cloudReferenceType("bindings.webhook.auth.type")}; headerFamily: ${cloudReferenceType("bindings.webhook.auth.headerFamily")}; signingSecrets: readonly ${cloudReferenceType("bindings.webhook.auth.signingSecrets[]")}[]; toleranceSeconds?: ${cloudReferenceType("bindings.webhook.auth.toleranceSeconds")} } };`,
3834
3904
  ` cron?: { schedule: ${cloudReferenceType("bindings.cron.schedule")}; timezone?: ${cloudReferenceType("bindings.cron.timezone")} };`,
3835
3905
  " sqlListeners?: readonly SqlListenerDeclaration[];",
3836
3906
  ` secrets?: readonly ${cloudReferenceType("bindings.secrets[]")}[];`,
@@ -881,6 +881,21 @@ body {
881
881
  .expectation-result.pass { color: var(--green); }
882
882
  .expectation-result.fail { color: var(--red); }
883
883
  .expectation-result.unknown { color: var(--yellow); }
884
+ .infra-signals {
885
+ margin-top: 10px;
886
+ border: 1px solid color-mix(in srgb, var(--red) 45%, var(--viewer-border));
887
+ border-radius: var(--viewer-radius-md);
888
+ background: color-mix(in srgb, var(--red) 5%, var(--bg));
889
+ color: var(--text-dim);
890
+ font-size: 10px;
891
+ }
892
+ .infra-signals-heading { padding: 7px 9px; border-bottom: 1px solid var(--viewer-border); color: var(--red); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
893
+ .infra-signals ul { margin: 0; padding: 0; list-style: none; }
894
+ .infra-signals li { padding: 7px 9px; }
895
+ .infra-signals li + li { border-top: 1px solid var(--viewer-border); }
896
+ .infra-signals strong { color: var(--text); font-family: var(--viewer-font-mono); }
897
+ .infra-signals span { margin-left: 7px; color: var(--text-dimmer); font-family: var(--viewer-font-mono); }
898
+ .infra-signals p { margin: 4px 0 0; overflow-wrap: anywhere; }
884
899
  .lane-prompt, .lane-result { border-bottom: 1px solid var(--viewer-border); }
885
900
  .lane-prompt summary, .lane-result summary { cursor: pointer; padding: 8px 13px; color: var(--text-dim); font-size: 11px; font-weight: 650; }
886
901
  .lane-prompt .prompt-text, .lane-result .md-rendered { padding: 0 13px 12px; font-size: 12px; }
@@ -1354,16 +1354,38 @@ function renderExpectationMiniTable(session) {
1354
1354
  </div>`;
1355
1355
  }
1356
1356
 
1357
+ function normalizedInfraSignals(metric) {
1358
+ if (!metric || !Array.isArray(metric.infra_signals)) return [];
1359
+ return metric.infra_signals.filter(signal => signal && typeof signal === 'object').map(signal => ({
1360
+ code: String(signal.code || 'unknown_infrastructure_error'),
1361
+ source: String(signal.source || 'unknown'),
1362
+ message: String(signal.message || 'No detail was recorded.'),
1363
+ }));
1364
+ }
1365
+
1366
+ function renderInfraSignals(metric) {
1367
+ const signals = normalizedInfraSignals(metric);
1368
+ if (!signals.length) return '';
1369
+ const rows = signals.map(signal => `<li><strong>${esc(signal.code)}</strong><span>${esc(signal.source)}</span><p>${esc(signal.message)}</p></li>`).join('');
1370
+ return `<div class="infra-signals"><div class="infra-signals-heading">Infrastructure signals</div><ul>${rows}</ul></div>`;
1371
+ }
1372
+
1357
1373
  function renderLaneSession(session) {
1358
1374
  const i = session.sourceIndex;
1359
1375
  const d = session.dimensions;
1360
1376
  const prefix = 'lane-' + i;
1361
1377
  const errorRate = session.stats.tool_calls > 0 ? Math.round(session.stats.tool_errors / session.stats.tool_calls * 100) : 0;
1378
+ const metric = session.evalMetric || {};
1379
+ const infraAffected = metric.sample_validity === 'infra_affected';
1380
+ const infraSignals = normalizedInfraSignals(metric);
1381
+ const infraCodes = [...new Set(infraSignals.map(signal => signal.code))].join(', ');
1382
+ const embeddedFailures = Number(metric.embedded_failure_count || 0);
1362
1383
  let html = `<article class="lane-session">
1363
1384
  <header class="lane-session-header">
1364
1385
  <div class="lane-title-row"><div><span class="run-kicker">Run ${esc(d.run)}</span><h3>${esc(d.agent)} / ${esc(d.model)}</h3></div><button class="download-btn" onclick="downloadJsonl(${i})">JSONL</button></div>
1365
- <div class="dimension-chips"><span>${esc(d.skill)}</span><span>${formatDuration(session.stats.duration_s)}</span><span>${session.stats.tool_calls} calls</span><span class="${session.stats.tool_errors ? 'chip-error' : ''}">${session.stats.tool_errors} errors${errorRate ? ' · ' + errorRate + '%' : ''}</span></div>
1386
+ <div class="dimension-chips"><span>${esc(d.skill)}</span><span>${formatDuration(session.stats.duration_s)}</span><span>${session.stats.tool_calls} calls</span><span class="${session.stats.tool_errors ? 'chip-error' : ''}">${session.stats.tool_errors} errors${errorRate ? ' · ' + errorRate + '%' : ''}</span>${embeddedFailures ? `<span class="chip-error">${embeddedFailures} embedded failures</span>` : ''}${infraAffected ? `<span class="chip-error">infra affected${infraCodes ? ' · ' + esc(infraCodes) : ''}</span>` : ''}</div>
1366
1387
  ${renderExpectationMiniTable(session)}
1388
+ ${renderInfraSignals(metric)}
1367
1389
  </header>`;
1368
1390
  if (!session.transcript_available) {
1369
1391
  html += '<div class="transcript-unavailable">No transcript was retained for this completed eval. Its scored expectations remain included in this comparison.</div>';
@@ -1431,6 +1453,7 @@ function downloadJsonl(i) {
1431
1453
 
1432
1454
  function renderSession(i) {
1433
1455
  const s = SESSIONS[i];
1456
+ const metric = s.evalMetric || {};
1434
1457
  const main = document.getElementById('main-content');
1435
1458
  main.classList.add('full-width');
1436
1459
 
@@ -1458,11 +1481,22 @@ function renderSession(i) {
1458
1481
  html += item('Turns', s.stats.num_turns || '\u2014');
1459
1482
  html += item('Tool Calls', s.stats.tool_calls);
1460
1483
  html += item('Errors', s.stats.tool_errors + (s.stats.tool_calls > 0 ? ' (' + Math.round(s.stats.tool_errors / s.stats.tool_calls * 100) + '%)' : ''));
1484
+ if (Number(metric.embedded_failure_count || 0) > 0) {
1485
+ html += item('Embedded Failures', Number(metric.embedded_failure_count));
1486
+ }
1487
+ if (metric.sample_validity === 'infra_affected') {
1488
+ html += item('Sample Validity', 'infra affected');
1489
+ }
1490
+ const infraSignals = normalizedInfraSignals(metric);
1491
+ if (infraSignals.length) {
1492
+ html += item('Infra Signal Codes', [...new Set(infraSignals.map(signal => signal.code))].join(', '));
1493
+ }
1461
1494
  if (s.stats.cost_usd != null) html += item('Cost', '$' + s.stats.cost_usd.toFixed(2));
1462
1495
  if (s.stats.loop_groups > 0) html += item('Retry Loops', s.stats.loop_groups);
1463
1496
  if (s.stats.error_streak_groups > 0) html += item('Error Streaks', s.stats.error_streak_groups + ' (max ' + s.stats.max_error_streak + ')');
1464
1497
  html += '</div>';
1465
1498
  html += renderExpectationMiniTable(s);
1499
+ html += renderInfraSignals(metric);
1466
1500
  if (!s.transcript_available) {
1467
1501
  html += '<div class="transcript-unavailable">No transcript was retained for this completed eval. Its scored expectations remain included in this comparison.</div>';
1468
1502
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.2.47",
3
+ "version": "0.2.49",
4
4
  "description": "Deepline SDK + CLI — B2B data enrichment powered by durable cloud execution",
5
5
  "license": "MIT",
6
6
  "repository": {