deepline 0.3.143 → 0.3.145

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
@@ -768,7 +768,7 @@ var SDK_RELEASE = {
768
768
  // getters keep their established compatibility behavior.
769
769
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
770
770
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
771
- version: "0.3.143",
771
+ version: "0.3.145",
772
772
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
773
773
  packageCapabilities: {
774
774
  updatePreferences: 1
@@ -4678,6 +4678,7 @@ var DeeplineClient = class _DeeplineClient {
4678
4678
  invoices: {
4679
4679
  list: (options2) => this.listBillingInvoices(options2)
4680
4680
  },
4681
+ usageEvent: (requestId) => this.getBillingUsageEvent(requestId),
4681
4682
  targetPlans: () => this.getTargetBillingPlans(),
4682
4683
  targetStatus: () => this.getTargetBillingStatus(),
4683
4684
  autoRecharge: {
@@ -7049,6 +7050,33 @@ var DeeplineClient = class _DeeplineClient {
7049
7050
  async getBillingPlans() {
7050
7051
  return this.http.get("/api/v2/billing/catalog/current");
7051
7052
  }
7053
+ /**
7054
+ * Read the authenticated usage record for one execution request. The
7055
+ * request id comes from the original `executeTool` result and is not a
7056
+ * retry or idempotency token.
7057
+ */
7058
+ async getBillingUsageEvent(requestId) {
7059
+ const normalizedRequestId = requestId.trim();
7060
+ if (normalizedRequestId.length === 0 || normalizedRequestId.length > 200 || normalizedRequestId !== requestId) {
7061
+ throw new DeeplineError(
7062
+ "Usage request_id must contain 1\u2013200 characters with no leading or trailing whitespace.",
7063
+ void 0,
7064
+ "INVALID_USAGE_REQUEST_ID"
7065
+ );
7066
+ }
7067
+ const response = await this.http.get(
7068
+ `/api/v2/usage/events?request_id=${encodeURIComponent(normalizedRequestId)}`
7069
+ );
7070
+ const event = response.entries?.[0];
7071
+ if (!event) {
7072
+ throw new DeeplineError(
7073
+ "No usage event was found for this request_id.",
7074
+ void 0,
7075
+ "USAGE_EVENT_NOT_FOUND"
7076
+ );
7077
+ }
7078
+ return event;
7079
+ }
7052
7080
  /**
7053
7081
  * Charge the saved payment method and add Deepline credits to the active
7054
7082
  * workspace. Prefer `client.billing.topUp(...)`.
@@ -8748,6 +8776,17 @@ function findFirstTargetByPath(result, paths) {
8748
8776
  }
8749
8777
  return null;
8750
8778
  }
8779
+ function findFirstExplicitNullTargetByPath(result, paths) {
8780
+ for (const path of paths ?? []) {
8781
+ for (const candidate of candidateResultPaths(path)) {
8782
+ const explicitNull = valuesAtSegments(result, parsePath(candidate)).find(
8783
+ (entry) => entry.value === null
8784
+ );
8785
+ if (explicitNull) return { value: null, path: explicitNull.path };
8786
+ }
8787
+ }
8788
+ return null;
8789
+ }
8751
8790
  function firstValueForPaths(result, paths) {
8752
8791
  return findFirstTargetByPath(result, paths);
8753
8792
  }
@@ -9007,7 +9046,11 @@ function buildTargets(result, extractors, targetGetters) {
9007
9046
  continue;
9008
9047
  }
9009
9048
  const fromExtractor = findFirstTargetByPath(result, descriptor.paths);
9010
- if (!fromExtractor) continue;
9049
+ if (!fromExtractor) {
9050
+ const explicitNull = isSemanticStatus ? null : findFirstExplicitNullTargetByPath(result, descriptor.paths);
9051
+ if (explicitNull) targets[target] = explicitNull;
9052
+ continue;
9053
+ }
9011
9054
  const transformed = coerceToEnum(
9012
9055
  applyExtractorTransforms(fromExtractor.value, descriptor),
9013
9056
  descriptor
@@ -9030,6 +9073,14 @@ function buildTargets(result, extractors, targetGetters) {
9030
9073
  targets[target] = fromMetadata;
9031
9074
  continue;
9032
9075
  }
9076
+ const explicitNull = findFirstExplicitNullTargetByPath(
9077
+ result,
9078
+ targetGetters?.[target]
9079
+ );
9080
+ if (explicitNull) {
9081
+ targets[target] = explicitNull;
9082
+ continue;
9083
+ }
9033
9084
  const fallback = findFirstTargetByKey(result, target);
9034
9085
  if (fallback) {
9035
9086
  targets[target] = fallback;
@@ -9037,6 +9088,7 @@ function buildTargets(result, extractors, targetGetters) {
9037
9088
  }
9038
9089
  if (metadataTargets.size === 0) {
9039
9090
  for (const target of ["email", "phone", "linkedin", "domain", "status"]) {
9091
+ if (targets[target]) continue;
9040
9092
  const found = findFirstTargetByKey(result, target);
9041
9093
  if (found) targets[target] = found;
9042
9094
  }
@@ -552,8 +552,8 @@
552
552
  "dist/cli/index.js",
553
553
  "dist/cli/index.mjs",
554
554
  "dist/cli/text-imports.d.ts",
555
- "dist/compiler-manifest-BIqRyj5m.d.mts",
556
- "dist/compiler-manifest-BIqRyj5m.d.ts",
555
+ "dist/compiler-manifest-BJBNPTWt.d.mts",
556
+ "dist/compiler-manifest-BJBNPTWt.d.ts",
557
557
  "dist/helpers.d.mts",
558
558
  "dist/helpers.d.ts",
559
559
  "dist/helpers.js",
@@ -1,6 +1,6 @@
1
1
  /// <reference path="./text-imports.d.ts" />
2
- import { P as PlayArtifactKind, a as PlayBundleArtifact, b as PlaySandboxRuntimeDeclaration, c as PlayCompilerManifest } from '../compiler-manifest-BIqRyj5m.mjs';
3
- export { d as PLAY_ARTIFACT_KINDS, e as PlayArtifactCompatibility, f as PlayImportPolicy, g as PlayPackageImport, h as PlayRuntimeFeature } from '../compiler-manifest-BIqRyj5m.mjs';
2
+ import { P as PlayArtifactKind, a as PlayBundleArtifact, b as PlaySandboxRuntimeDeclaration, c as PlayCompilerManifest } from '../compiler-manifest-BJBNPTWt.mjs';
3
+ export { d as PLAY_ARTIFACT_KINDS, e as PlayArtifactCompatibility, f as PlayImportPolicy, g as PlayPackageImport, h as PlayRuntimeFeature } from '../compiler-manifest-BJBNPTWt.mjs';
4
4
  import '@sinclair/typebox';
5
5
 
6
6
  type ImportedPlayDependency = {
@@ -1,6 +1,6 @@
1
1
  /// <reference path="./text-imports.d.ts" />
2
- import { P as PlayArtifactKind, a as PlayBundleArtifact, b as PlaySandboxRuntimeDeclaration, c as PlayCompilerManifest } from '../compiler-manifest-BIqRyj5m.js';
3
- export { d as PLAY_ARTIFACT_KINDS, e as PlayArtifactCompatibility, f as PlayImportPolicy, g as PlayPackageImport, h as PlayRuntimeFeature } from '../compiler-manifest-BIqRyj5m.js';
2
+ import { P as PlayArtifactKind, a as PlayBundleArtifact, b as PlaySandboxRuntimeDeclaration, c as PlayCompilerManifest } from '../compiler-manifest-BJBNPTWt.js';
3
+ export { d as PLAY_ARTIFACT_KINDS, e as PlayArtifactCompatibility, f as PlayImportPolicy, g as PlayPackageImport, h as PlayRuntimeFeature } from '../compiler-manifest-BJBNPTWt.js';
4
4
  import '@sinclair/typebox';
5
5
 
6
6
  type ImportedPlayDependency = {
@@ -149,7 +149,7 @@ type SdkRelease = {
149
149
  supportPolicy: SdkSupportPolicy;
150
150
  };
151
151
  declare const SDK_RELEASE: {
152
- readonly version: "0.3.143";
152
+ readonly version: "0.3.145";
153
153
  readonly updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.";
154
154
  readonly packageCapabilities: {
155
155
  readonly updatePreferences: 1;
package/dist/release.d.ts CHANGED
@@ -149,7 +149,7 @@ type SdkRelease = {
149
149
  supportPolicy: SdkSupportPolicy;
150
150
  };
151
151
  declare const SDK_RELEASE: {
152
- readonly version: "0.3.143";
152
+ readonly version: "0.3.145";
153
153
  readonly updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.";
154
154
  readonly packageCapabilities: {
155
155
  readonly updatePreferences: 1;
package/dist/release.js CHANGED
@@ -74,7 +74,7 @@ var SDK_RELEASE = {
74
74
  // getters keep their established compatibility behavior.
75
75
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
76
76
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
77
- version: "0.3.143",
77
+ version: "0.3.145",
78
78
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
79
79
  packageCapabilities: {
80
80
  updatePreferences: 1
package/dist/release.mjs CHANGED
@@ -48,7 +48,7 @@ var SDK_RELEASE = {
48
48
  // getters keep their established compatibility behavior.
49
49
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
50
50
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
51
- version: "0.3.143",
51
+ version: "0.3.145",
52
52
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
53
53
  packageCapabilities: {
54
54
  updatePreferences: 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.3.143",
3
+ "version": "0.3.145",
4
4
  "description": "GTM data CLI and TypeScript SDK for coding agents",
5
5
  "license": "MIT",
6
6
  "homepage": "https://code.deepline.com",