deepline 0.3.239 → 0.3.241

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.d.ts CHANGED
@@ -1269,6 +1269,11 @@ interface ToolDefinition extends ToolExecutionMetadataFields {
1269
1269
  outputSchema?: Record<string, unknown>;
1270
1270
  /** User-facing pricing summary. Internal provider/settlement costs are intentionally omitted. */
1271
1271
  pricing?: ToolPricingSummary | null;
1272
+ /** How to use the tool well: the provider's summary and the tool's own notes. */
1273
+ guidance?: {
1274
+ provider?: string;
1275
+ tool?: string;
1276
+ };
1272
1277
  /** Copyable play-runtime guidance for V2 tool execution results. */
1273
1278
  usageGuidance?: {
1274
1279
  execute?: string;
@@ -4533,6 +4538,15 @@ type TargetBillingStatusResult = {
4533
4538
  payment_state: string;
4534
4539
  recharge_state: string;
4535
4540
  billing_email?: string | null;
4541
+ /** Omitted when unavailable; null when no address has been saved. */
4542
+ billing_address?: {
4543
+ line1: string | null;
4544
+ line2: string | null;
4545
+ city: string | null;
4546
+ state: string | null;
4547
+ postal_code: string | null;
4548
+ country: string | null;
4549
+ } | null;
4536
4550
  collection_method?: 'charge_automatically' | 'send_invoice';
4537
4551
  payment_access_policy?: 'payment_required' | 'net_30' | 'net_60';
4538
4552
  plan_invoice?: {
@@ -4863,7 +4877,9 @@ type BillingNamespace = {
4863
4877
  /** Start, change, cancel, or undo a target plan transition. */
4864
4878
  transitionPlan: (options: TargetBillingPlanTransitionOptions) => Promise<TargetBillingMutationResult>;
4865
4879
  /** Create a Stripe-hosted billing Portal session. */
4866
- portalSession: () => Promise<{
4880
+ portalSession: (options?: {
4881
+ flow?: 'customer_update';
4882
+ }) => Promise<{
4867
4883
  url: string;
4868
4884
  }>;
4869
4885
  };
@@ -6022,7 +6038,9 @@ declare class DeeplineClient {
6022
6038
  */
6023
6039
  transitionTargetBillingPlan(options: TargetBillingPlanTransitionOptions): Promise<TargetBillingMutationResult>;
6024
6040
  /** Create a Stripe-hosted portal session for payment recovery and invoices. */
6025
- createTargetBillingPortalSession(): Promise<{
6041
+ createTargetBillingPortalSession(options?: {
6042
+ flow?: 'customer_update';
6043
+ }): Promise<{
6026
6044
  url: string;
6027
6045
  }>;
6028
6046
  /** Create an additional workspace through the durable PAYG workflow. */
package/dist/index.js CHANGED
@@ -814,6 +814,12 @@ function resolveConfig(options) {
814
814
  };
815
815
  }
816
816
 
817
+ // ../integration-contracts/opensosdata/execution-policy.ts
818
+ var OPENSOSDATA_LOOKUP_REQUEST_TIMEOUT_MS = 12e4;
819
+ var OPENSOSDATA_POLL_INTERVAL_MS = 3e3;
820
+ var OPENSOSDATA_POLL_TIMEOUT_MS = 9e4;
821
+ var OPENSOSDATA_LOOKUP_CLIENT_TIMEOUT_MS = 6e4 + OPENSOSDATA_LOOKUP_REQUEST_TIMEOUT_MS + OPENSOSDATA_POLL_TIMEOUT_MS + OPENSOSDATA_POLL_INTERVAL_MS + OPENSOSDATA_LOOKUP_REQUEST_TIMEOUT_MS + 15e3;
822
+
817
823
  // ../integration-contracts/theirstack/execution-policy.ts
818
824
  var THEIRSTACK_SLOW_JOB_SEARCH_PROVIDER_TIMEOUT_MS = 135e3;
819
825
  var THEIRSTACK_SLOW_JOB_SEARCH_CLIENT_TIMEOUT_MS = 6e4 + THEIRSTACK_SLOW_JOB_SEARCH_PROVIDER_TIMEOUT_MS + 15e3;
@@ -964,6 +970,9 @@ var APIFY_SYNC_DEFAULT_TIMEOUT_MS = 3e5;
964
970
  var APIFY_SYNC_RESPONSE_GRACE_MS = 9e4;
965
971
  function resolveToolExecuteTimeoutMs(toolId, input) {
966
972
  const normalized = toolId.trim().toLowerCase();
973
+ if (normalized === "opensosdata_business_lookup") {
974
+ return OPENSOSDATA_LOOKUP_CLIENT_TIMEOUT_MS;
975
+ }
967
976
  if (normalized === "apify_run_actor_sync") {
968
977
  const requestedTimeoutMs = input.timeoutMs ?? APIFY_SYNC_DEFAULT_TIMEOUT_MS;
969
978
  if (typeof requestedTimeoutMs === "number" && Number.isFinite(requestedTimeoutMs) && requestedTimeoutMs > 0) {
@@ -1267,7 +1276,7 @@ var SDK_RELEASE = {
1267
1276
  // getters keep their established compatibility behavior.
1268
1277
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
1269
1278
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
1270
- version: "0.3.239",
1279
+ version: "0.3.241",
1271
1280
  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.",
1272
1281
  packageCapabilities: {
1273
1282
  updatePreferences: 1
@@ -2022,6 +2031,7 @@ var HttpClient = class {
2022
2031
  let fetchAttempts = 0;
2023
2032
  let lastRequestUrl = url;
2024
2033
  let networkFailedAt;
2034
+ let networkPhase = "before_request";
2025
2035
  const headers = this.authHeaders(options?.headers);
2026
2036
  if (options?.body !== void 0) {
2027
2037
  headers["Content-Type"] = "application/json";
@@ -2040,6 +2050,7 @@ var HttpClient = class {
2040
2050
  const backoffMs = Math.min(1e3 * Math.pow(2, attempt - 1), 3e4);
2041
2051
  const delayMs = retryAfterDelayMs === null ? backoffMs : Math.max(backoffMs, retryAfterDelayMs);
2042
2052
  retryAfterDelayMs = null;
2053
+ networkPhase = "retry_wait";
2043
2054
  try {
2044
2055
  await sleep(delayMs, options?.signal);
2045
2056
  } catch (error) {
@@ -2065,16 +2076,19 @@ var HttpClient = class {
2065
2076
  options?.signal?.addEventListener("abort", abortRequest, {
2066
2077
  once: true
2067
2078
  });
2079
+ networkPhase = "before_request";
2068
2080
  try {
2069
2081
  const requestBody = options?.formData !== void 0 ? typeof options.formData === "function" ? options.formData() : options.formData : options?.body !== void 0 ? JSON.stringify(options.body) : void 0;
2070
2082
  fetchAttempts += 1;
2071
2083
  lastRequestUrl = candidateUrl;
2084
+ networkPhase = "awaiting_headers";
2072
2085
  const response = await fetch(candidateUrl, {
2073
2086
  method,
2074
2087
  headers,
2075
2088
  body: requestBody,
2076
2089
  signal: controller.signal
2077
2090
  });
2091
+ networkPhase = "reading_body";
2078
2092
  options?.onResponse?.(response);
2079
2093
  if (response.status === 404 && options?.allowNotFound) {
2080
2094
  clearTimeout(timeoutId);
@@ -2217,7 +2231,8 @@ var HttpClient = class {
2217
2231
  failedAtUtc: new Date(failedAt).toISOString(),
2218
2232
  // Elapsed time covers the entire logical request, including retries.
2219
2233
  elapsedMs: Math.max(0, failedAt - requestStartedAt),
2220
- attempts: fetchAttempts
2234
+ attempts: fetchAttempts,
2235
+ phase: networkPhase
2221
2236
  }
2222
2237
  };
2223
2238
  if (options?.toolId) {
@@ -3992,7 +4007,7 @@ var DeeplineClient = class _DeeplineClient {
3992
4007
  purchaseCredits: (options2) => this.purchaseTargetBillingCredits(options2),
3993
4008
  recoverCreditPurchase: (options2) => this.recoverTargetBillingCreditPurchase(options2),
3994
4009
  transitionPlan: (options2) => this.transitionTargetBillingPlan(options2),
3995
- portalSession: () => this.createTargetBillingPortalSession()
4010
+ portalSession: (options2) => this.createTargetBillingPortalSession(options2)
3996
4011
  };
3997
4012
  this.workspaces = {
3998
4013
  create: (options2) => this.createWorkspace(options2)
@@ -6513,8 +6528,11 @@ var DeeplineClient = class _DeeplineClient {
6513
6528
  );
6514
6529
  }
6515
6530
  /** Create a Stripe-hosted portal session for payment recovery and invoices. */
6516
- async createTargetBillingPortalSession() {
6517
- const response = await this.http.post("/api/v2/billing/portal-sessions", {});
6531
+ async createTargetBillingPortalSession(options) {
6532
+ const response = await this.http.post(
6533
+ options?.flow === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
6534
+ {}
6535
+ );
6518
6536
  return response.data;
6519
6537
  }
6520
6538
  /** Create an additional workspace through the durable PAYG workflow. */
package/dist/index.mjs CHANGED
@@ -718,6 +718,12 @@ function resolveConfig(options) {
718
718
  };
719
719
  }
720
720
 
721
+ // ../integration-contracts/opensosdata/execution-policy.ts
722
+ var OPENSOSDATA_LOOKUP_REQUEST_TIMEOUT_MS = 12e4;
723
+ var OPENSOSDATA_POLL_INTERVAL_MS = 3e3;
724
+ var OPENSOSDATA_POLL_TIMEOUT_MS = 9e4;
725
+ var OPENSOSDATA_LOOKUP_CLIENT_TIMEOUT_MS = 6e4 + OPENSOSDATA_LOOKUP_REQUEST_TIMEOUT_MS + OPENSOSDATA_POLL_TIMEOUT_MS + OPENSOSDATA_POLL_INTERVAL_MS + OPENSOSDATA_LOOKUP_REQUEST_TIMEOUT_MS + 15e3;
726
+
721
727
  // ../integration-contracts/theirstack/execution-policy.ts
722
728
  var THEIRSTACK_SLOW_JOB_SEARCH_PROVIDER_TIMEOUT_MS = 135e3;
723
729
  var THEIRSTACK_SLOW_JOB_SEARCH_CLIENT_TIMEOUT_MS = 6e4 + THEIRSTACK_SLOW_JOB_SEARCH_PROVIDER_TIMEOUT_MS + 15e3;
@@ -868,6 +874,9 @@ var APIFY_SYNC_DEFAULT_TIMEOUT_MS = 3e5;
868
874
  var APIFY_SYNC_RESPONSE_GRACE_MS = 9e4;
869
875
  function resolveToolExecuteTimeoutMs(toolId, input) {
870
876
  const normalized = toolId.trim().toLowerCase();
877
+ if (normalized === "opensosdata_business_lookup") {
878
+ return OPENSOSDATA_LOOKUP_CLIENT_TIMEOUT_MS;
879
+ }
871
880
  if (normalized === "apify_run_actor_sync") {
872
881
  const requestedTimeoutMs = input.timeoutMs ?? APIFY_SYNC_DEFAULT_TIMEOUT_MS;
873
882
  if (typeof requestedTimeoutMs === "number" && Number.isFinite(requestedTimeoutMs) && requestedTimeoutMs > 0) {
@@ -1171,7 +1180,7 @@ var SDK_RELEASE = {
1171
1180
  // getters keep their established compatibility behavior.
1172
1181
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
1173
1182
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
1174
- version: "0.3.239",
1183
+ version: "0.3.241",
1175
1184
  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.",
1176
1185
  packageCapabilities: {
1177
1186
  updatePreferences: 1
@@ -1926,6 +1935,7 @@ var HttpClient = class {
1926
1935
  let fetchAttempts = 0;
1927
1936
  let lastRequestUrl = url;
1928
1937
  let networkFailedAt;
1938
+ let networkPhase = "before_request";
1929
1939
  const headers = this.authHeaders(options?.headers);
1930
1940
  if (options?.body !== void 0) {
1931
1941
  headers["Content-Type"] = "application/json";
@@ -1944,6 +1954,7 @@ var HttpClient = class {
1944
1954
  const backoffMs = Math.min(1e3 * Math.pow(2, attempt - 1), 3e4);
1945
1955
  const delayMs = retryAfterDelayMs === null ? backoffMs : Math.max(backoffMs, retryAfterDelayMs);
1946
1956
  retryAfterDelayMs = null;
1957
+ networkPhase = "retry_wait";
1947
1958
  try {
1948
1959
  await sleep(delayMs, options?.signal);
1949
1960
  } catch (error) {
@@ -1969,16 +1980,19 @@ var HttpClient = class {
1969
1980
  options?.signal?.addEventListener("abort", abortRequest, {
1970
1981
  once: true
1971
1982
  });
1983
+ networkPhase = "before_request";
1972
1984
  try {
1973
1985
  const requestBody = options?.formData !== void 0 ? typeof options.formData === "function" ? options.formData() : options.formData : options?.body !== void 0 ? JSON.stringify(options.body) : void 0;
1974
1986
  fetchAttempts += 1;
1975
1987
  lastRequestUrl = candidateUrl;
1988
+ networkPhase = "awaiting_headers";
1976
1989
  const response = await fetch(candidateUrl, {
1977
1990
  method,
1978
1991
  headers,
1979
1992
  body: requestBody,
1980
1993
  signal: controller.signal
1981
1994
  });
1995
+ networkPhase = "reading_body";
1982
1996
  options?.onResponse?.(response);
1983
1997
  if (response.status === 404 && options?.allowNotFound) {
1984
1998
  clearTimeout(timeoutId);
@@ -2121,7 +2135,8 @@ var HttpClient = class {
2121
2135
  failedAtUtc: new Date(failedAt).toISOString(),
2122
2136
  // Elapsed time covers the entire logical request, including retries.
2123
2137
  elapsedMs: Math.max(0, failedAt - requestStartedAt),
2124
- attempts: fetchAttempts
2138
+ attempts: fetchAttempts,
2139
+ phase: networkPhase
2125
2140
  }
2126
2141
  };
2127
2142
  if (options?.toolId) {
@@ -3896,7 +3911,7 @@ var DeeplineClient = class _DeeplineClient {
3896
3911
  purchaseCredits: (options2) => this.purchaseTargetBillingCredits(options2),
3897
3912
  recoverCreditPurchase: (options2) => this.recoverTargetBillingCreditPurchase(options2),
3898
3913
  transitionPlan: (options2) => this.transitionTargetBillingPlan(options2),
3899
- portalSession: () => this.createTargetBillingPortalSession()
3914
+ portalSession: (options2) => this.createTargetBillingPortalSession(options2)
3900
3915
  };
3901
3916
  this.workspaces = {
3902
3917
  create: (options2) => this.createWorkspace(options2)
@@ -6417,8 +6432,11 @@ var DeeplineClient = class _DeeplineClient {
6417
6432
  );
6418
6433
  }
6419
6434
  /** Create a Stripe-hosted portal session for payment recovery and invoices. */
6420
- async createTargetBillingPortalSession() {
6421
- const response = await this.http.post("/api/v2/billing/portal-sessions", {});
6435
+ async createTargetBillingPortalSession(options) {
6436
+ const response = await this.http.post(
6437
+ options?.flow === "customer_update" ? "/api/v2/billing/portal-sessions?flow=customer_update" : "/api/v2/billing/portal-sessions",
6438
+ {}
6439
+ );
6422
6440
  return response.data;
6423
6441
  }
6424
6442
  /** Create an additional workspace through the durable PAYG workflow. */
@@ -33,6 +33,7 @@
33
33
  "dist/bundling-sources/shared_libs/integration-contracts/index.ts",
34
34
  "dist/bundling-sources/shared_libs/integration-contracts/monitor-fleet-contract.ts",
35
35
  "dist/bundling-sources/shared_libs/integration-contracts/monitor-input-contract.ts",
36
+ "dist/bundling-sources/shared_libs/integration-contracts/opensosdata/execution-policy.ts",
36
37
  "dist/bundling-sources/shared_libs/integration-contracts/README.md",
37
38
  "dist/bundling-sources/shared_libs/integration-contracts/theirstack/execution-policy.ts",
38
39
  "dist/bundling-sources/shared_libs/integration-contracts/waterfall/execution-policy.ts",
@@ -149,7 +149,7 @@ type SdkRelease = {
149
149
  supportPolicy: SdkSupportPolicy;
150
150
  };
151
151
  declare const SDK_RELEASE: {
152
- readonly version: "0.3.239";
152
+ readonly version: "0.3.241";
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.239";
152
+ readonly version: "0.3.241";
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.239",
77
+ version: "0.3.241",
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.239",
51
+ version: "0.3.241",
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.239",
3
+ "version": "0.3.241",
4
4
  "description": "GTM data CLI and TypeScript SDK for coding agents",
5
5
  "license": "MIT",
6
6
  "homepage": "https://code.deepline.com",