deepline 0.3.167 → 0.3.169

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/README.md CHANGED
@@ -41,7 +41,7 @@ with project-local skills automatically.
41
41
  Paste this into Claude Code, Codex, or another coding agent:
42
42
 
43
43
  ```text
44
- Install the official Deepline CLI globally from npm (package: deepline) by following https://code.deepline.com/INSTALL.md.
44
+ Install and set up the official Deepline CLI globally from npm (package: deepline) by following https://code.deepline.com/INSTALL.md.
45
45
  ```
46
46
 
47
47
  Once setup is complete, tell your agent what you want to do:
@@ -200,7 +200,7 @@ export const SDK_RELEASE = {
200
200
  // getters keep their established compatibility behavior.
201
201
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
202
202
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
203
- version: '0.3.167',
203
+ version: '0.3.169',
204
204
  updateSummary:
205
205
  '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.',
206
206
  packageCapabilities: {
@@ -73,6 +73,8 @@
73
73
  "./provider-monitor-errors.js": "./provider-monitor-errors.ts",
74
74
  "./provider-monitor-identity-claims": "./provider-monitor-identity-claims.ts",
75
75
  "./provider-monitor-identity-claims.js": "./provider-monitor-identity-claims.ts",
76
+ "./provider-monitor-conflicts": "./provider-monitor-conflicts.ts",
77
+ "./provider-monitor-conflicts.js": "./provider-monitor-conflicts.ts",
76
78
  "./provider-monitor-legacy-aliases": "./provider-monitor-legacy-aliases.ts",
77
79
  "./provider-monitor-legacy-aliases.js": "./provider-monitor-legacy-aliases.ts",
78
80
  "./provider-monitor-priority-execution": "./provider-monitor-priority-execution.ts",
@@ -197,10 +197,17 @@ export type ProviderMonitorCapabilityDefinition = {
197
197
  */
198
198
  upstreamCollision?: {
199
199
  identityKeyFields: readonly string[];
200
+ /**
201
+ * Different effective payload configurations may hold separate Deepline
202
+ * claims inside one provider identity scope. This does not override an
203
+ * upstream 409 if the provider itself enforces a broader uniqueness rule.
204
+ */
205
+ allowDistinctConfigurations?: boolean;
200
206
  /**
201
207
  * This provider can create an updated resource for the same Deepline
202
208
  * monitor key before the prior upstream resource is deprovisioned. This
203
- * never permits a second key to occupy the same identity in one org.
209
+ * never permits a second key to occupy the same exact configuration in
210
+ * one org.
204
211
  */
205
212
  supportsSameIdentityReplacement?: boolean;
206
213
  };
@@ -444,7 +451,7 @@ export function defineProviderMonitorCapability(input: {
444
451
  },
445
452
  identity: {
446
453
  semantics: input.upstreamCollision
447
- ? `One monitor identity uses ${input.upstreamCollision.identityKeyFields.join(', ')}.`
454
+ ? `The provider resource scope uses ${input.upstreamCollision.identityKeyFields.join(', ')}.${input.upstreamCollision.allowDistinctConfigurations ? ' Different effective payload configurations in that scope may be separate monitor resources; exact duplicates still conflict.' : ''}`
448
455
  : 'This monitor uses the provider capability identity declared by Deepline.',
449
456
  update:
450
457
  'Use monitors update for a patch or deploy for a complete desired definition.',
@@ -0,0 +1,85 @@
1
+ import {
2
+ providerMonitorUpstreamIdentityClaimKey,
3
+ providerMonitorUpstreamIdentitySignature,
4
+ } from './provider-monitor-upstream-identity';
5
+
6
+ export type ProviderMonitorConflictIdentity = {
7
+ tool: string;
8
+ /** Exact effective configuration key stored in providerMonitorIdentityClaims. */
9
+ identityKey: string;
10
+ /** Broad provider-declared scope; this is also the legacy claim key. */
11
+ scopeKey: string;
12
+ /** Safe, customer-facing description of the provider-declared scope. */
13
+ identity: Record<string, string | null>;
14
+ };
15
+
16
+ /**
17
+ * Builds the one canonical conflict identity used by scalar Monitors, Fleets,
18
+ * and Batches. Same scope + same configuration conflicts; same scope with a
19
+ * distinct supported configuration gets its own indexed claim.
20
+ */
21
+ export function providerMonitorConflictIdentity(input: {
22
+ tool: string;
23
+ payload: Record<string, unknown> | null | undefined;
24
+ }): ProviderMonitorConflictIdentity | null {
25
+ const signature = providerMonitorUpstreamIdentitySignature(
26
+ input.tool,
27
+ input.payload,
28
+ );
29
+ if (!signature) return null;
30
+ const identity = Object.fromEntries(
31
+ Object.entries(signature.key).sort(([left], [right]) =>
32
+ left.localeCompare(right),
33
+ ),
34
+ );
35
+ const scopeKey = JSON.stringify(identity);
36
+ return {
37
+ tool: signature.tool,
38
+ identityKey:
39
+ providerMonitorUpstreamIdentityClaimKey(input.tool, input.payload) ??
40
+ scopeKey,
41
+ scopeKey,
42
+ identity,
43
+ };
44
+ }
45
+
46
+ /** Exact same effective configuration, regardless of monitor key or owner. */
47
+ export function sameProviderMonitorConflictIdentity(
48
+ left: ProviderMonitorConflictIdentity | null | undefined,
49
+ right: ProviderMonitorConflictIdentity | null | undefined,
50
+ ) {
51
+ return Boolean(
52
+ left &&
53
+ right &&
54
+ left.tool === right.tool &&
55
+ left.identityKey === right.identityKey,
56
+ );
57
+ }
58
+
59
+ /** Same provider resource scope, even when filter/configuration differs. */
60
+ export function sameProviderMonitorConflictScope(
61
+ left: ProviderMonitorConflictIdentity | null | undefined,
62
+ right: ProviderMonitorConflictIdentity | null | undefined,
63
+ ) {
64
+ return Boolean(
65
+ left &&
66
+ right &&
67
+ left.tool === right.tool &&
68
+ left.scopeKey === right.scopeKey,
69
+ );
70
+ }
71
+
72
+ /**
73
+ * Whether the definitions are valid separate variants under the capability's
74
+ * declared policy. Providers can still reject the second create; their 409 is
75
+ * handled as an upstream conflict, not mistaken for a Deepline duplicate.
76
+ */
77
+ export function providerMonitorDefinitionsAreDistinctConfigurations(
78
+ left: ProviderMonitorConflictIdentity | null | undefined,
79
+ right: ProviderMonitorConflictIdentity | null | undefined,
80
+ ) {
81
+ return Boolean(
82
+ sameProviderMonitorConflictScope(left, right) &&
83
+ !sameProviderMonitorConflictIdentity(left, right),
84
+ );
85
+ }
@@ -10,14 +10,14 @@ import {
10
10
  import { MAX_PRIORITY_MONITORS_PER_ORG } from '@deepline/monitors/provider-monitor-priority-execution';
11
11
  import { internal } from '@deepline/convex-client/function-references';
12
12
  import { getRequiredInternalConvexClient } from '@deepline/convex-client/internal-client';
13
- import {
14
- providerMonitorUpstreamIdentitySignature,
15
- type ProviderMonitorUpstreamIdentitySignature,
16
- } from '@deepline/monitors/provider-monitor-upstream-identity';
13
+ import { providerMonitorConflictIdentity } from '@deepline/monitors/provider-monitor-conflicts';
17
14
 
18
15
  export type ProviderMonitorIdentityClaim = {
19
16
  tool: string;
17
+ /** Exact effective configuration identity, used by the indexed claim. */
20
18
  identityKey: string;
19
+ /** Provider-declared broad identity scope; legacy claims used this key. */
20
+ scopeKey: string;
21
21
  identity: Record<string, string | null>;
22
22
  };
23
23
 
@@ -31,13 +31,19 @@ type OrgAuthContext = { orgId: string };
31
31
  */
32
32
  export type ProviderMonitorIdentityClaimReference = Pick<
33
33
  ProviderMonitorIdentityClaim,
34
- 'tool' | 'identityKey'
34
+ 'tool' | 'identityKey' | 'scopeKey'
35
35
  >;
36
36
 
37
37
  export function providerMonitorIdentityClaimReference(
38
38
  claim: ProviderMonitorIdentityClaim | null | undefined,
39
39
  ): ProviderMonitorIdentityClaimReference | null {
40
- return claim ? { tool: claim.tool, identityKey: claim.identityKey } : null;
40
+ return claim
41
+ ? {
42
+ tool: claim.tool,
43
+ identityKey: claim.identityKey,
44
+ scopeKey: claim.scopeKey,
45
+ }
46
+ : null;
41
47
  }
42
48
 
43
49
  export type ProviderMonitorIdentityReservation =
@@ -146,19 +152,6 @@ export function normalizeProviderMonitorLifecycleReservation(input: {
146
152
  };
147
153
  }
148
154
 
149
- function claimFromSignature(
150
- signature: ProviderMonitorUpstreamIdentitySignature,
151
- ): ProviderMonitorIdentityClaim {
152
- const identity = Object.fromEntries(
153
- Object.entries(signature.key).sort(([a], [b]) => a.localeCompare(b)),
154
- );
155
- return {
156
- tool: signature.tool,
157
- identityKey: JSON.stringify(identity),
158
- identity,
159
- };
160
- }
161
-
162
155
  export function providerMonitorIdentityClaim(input: {
163
156
  tool: string;
164
157
  payload: Record<string, unknown> | null | undefined;
@@ -166,11 +159,7 @@ export function providerMonitorIdentityClaim(input: {
166
159
  // Claims protect provider resources, including legacy rows whose public
167
160
  // capability id was later retired. The Convex-safe identity contract owns
168
161
  // those aliases; the live capability registry intentionally does not.
169
- const signature = providerMonitorUpstreamIdentitySignature(
170
- input.tool,
171
- input.payload,
172
- );
173
- return signature ? claimFromSignature(signature) : null;
162
+ return providerMonitorConflictIdentity(input);
174
163
  }
175
164
 
176
165
  /**
@@ -230,6 +219,7 @@ export async function getProviderMonitorIdentityOwner(input: {
230
219
  orgId: input.auth.orgId,
231
220
  tool: input.claim.tool,
232
221
  identityKey: input.claim.identityKey,
222
+ scopeKey: input.claim.scopeKey,
233
223
  },
234
224
  );
235
225
  }
@@ -455,6 +445,7 @@ export async function beginProviderMonitorIdentityReservation(input: {
455
445
  orgId: input.auth.orgId,
456
446
  tool: claim.tool,
457
447
  identityKey: claim.identityKey,
448
+ scopeKey: claim.scopeKey,
458
449
  monitorKey: input.monitorKey,
459
450
  operationId,
460
451
  ...(input.reclaimSelfProvisioning
@@ -491,6 +482,7 @@ async function mutateClaim(
491
482
  orgId: input.auth.orgId,
492
483
  tool: input.claim.tool,
493
484
  identityKey: input.claim.identityKey,
485
+ ...(action === 'release' ? { scopeKey: input.claim.scopeKey } : {}),
494
486
  monitorKey: input.monitorKey,
495
487
  ...(input.operationId ? { operationId: input.operationId } : {}),
496
488
  },
@@ -22,20 +22,34 @@ type ProviderMonitorUpstreamIdentityField = {
22
22
  runtimePayloadAliases?: readonly string[];
23
23
  };
24
24
 
25
+ type ProviderMonitorUpstreamIdentityDefinition = {
26
+ fields: readonly ProviderMonitorUpstreamIdentityField[];
27
+ /**
28
+ * Let distinct effective configurations reserve separate provider monitor
29
+ * claims inside one broad identity scope. The upstream provider can still
30
+ * reject a second resource with 409; this only prevents Deepline from
31
+ * treating different authored filters as an exact duplicate.
32
+ */
33
+ allowDistinctConfigurations?: boolean;
34
+ };
35
+
25
36
  const PROVIDER_MONITOR_UPSTREAM_IDENTITY_FIELDS = {
26
- 'deepline_native.company_radar': [{ name: 'radar_type' }, { name: 'domain' }],
27
- 'deepline_native.contact_radar': [
28
- { name: 'radar_type' },
29
- { name: 'profile_url' },
30
- ],
31
- 'deepline_native.industry_radar': [
32
- { name: 'radar_type' },
33
- { name: 'industry', runtimePayloadAliases: ['keyword'] },
34
- ],
35
- } as const satisfies Record<
36
- string,
37
- readonly ProviderMonitorUpstreamIdentityField[]
38
- >;
37
+ 'deepline_native.company_radar': {
38
+ fields: [{ name: 'radar_type' }, { name: 'domain' }],
39
+ allowDistinctConfigurations: true,
40
+ },
41
+ 'deepline_native.contact_radar': {
42
+ fields: [{ name: 'radar_type' }, { name: 'profile_url' }],
43
+ allowDistinctConfigurations: true,
44
+ },
45
+ 'deepline_native.industry_radar': {
46
+ fields: [
47
+ { name: 'radar_type' },
48
+ { name: 'industry', runtimePayloadAliases: ['keyword'] },
49
+ ],
50
+ allowDistinctConfigurations: true,
51
+ },
52
+ } as const satisfies Record<string, ProviderMonitorUpstreamIdentityDefinition>;
39
53
 
40
54
  function canonicalMonitorTool(tool: string) {
41
55
  // Public TamRadar ids existed before the deepline_native hard cutover. Keep
@@ -82,7 +96,18 @@ export function providerMonitorUpstreamIdentityFields(tool: string) {
82
96
  const canonical = canonicalMonitorTool(tool);
83
97
  return PROVIDER_MONITOR_UPSTREAM_IDENTITY_FIELDS[
84
98
  canonical as keyof typeof PROVIDER_MONITOR_UPSTREAM_IDENTITY_FIELDS
85
- ]?.map((field) => field.name);
99
+ ]?.fields.map((field) => field.name);
100
+ }
101
+
102
+ export function providerMonitorUpstreamIdentityAllowsDistinctConfigurations(
103
+ tool: string,
104
+ ) {
105
+ const canonical = canonicalMonitorTool(tool);
106
+ return (
107
+ PROVIDER_MONITOR_UPSTREAM_IDENTITY_FIELDS[
108
+ canonical as keyof typeof PROVIDER_MONITOR_UPSTREAM_IDENTITY_FIELDS
109
+ ]?.allowDistinctConfigurations ?? false
110
+ );
86
111
  }
87
112
 
88
113
  export function providerMonitorUpstreamIdentitySignature(
@@ -93,7 +118,7 @@ export function providerMonitorUpstreamIdentitySignature(
93
118
  const fields =
94
119
  PROVIDER_MONITOR_UPSTREAM_IDENTITY_FIELDS[
95
120
  canonical as keyof typeof PROVIDER_MONITOR_UPSTREAM_IDENTITY_FIELDS
96
- ];
121
+ ]?.fields;
97
122
  if (!fields?.length) return null;
98
123
  const key: Record<string, ProviderMonitorUpstreamIdentityValue> = {};
99
124
  for (const field of fields) {
@@ -110,3 +135,42 @@ export function providerMonitorUpstreamIdentitySignature(
110
135
  }
111
136
  return { tool: canonical, key };
112
137
  }
138
+
139
+ /**
140
+ * Exact claim identity used by the Convex conflict index. The provider's
141
+ * declared scope remains visible in `scopeKey`; providers that allow
142
+ * configuration variants add every non-scope payload field to the claim key.
143
+ * Keeping the old scope JSON as the prefix lets readers recognize claims
144
+ * created before this distinction was introduced.
145
+ */
146
+ export function providerMonitorUpstreamIdentityClaimKey(
147
+ tool: string,
148
+ payload: Record<string, unknown> | null | undefined,
149
+ ) {
150
+ const signature = providerMonitorUpstreamIdentitySignature(tool, payload);
151
+ if (!signature) return null;
152
+ const scopeKey = stableJson(signature.key);
153
+ if (!providerMonitorUpstreamIdentityAllowsDistinctConfigurations(tool)) {
154
+ return scopeKey;
155
+ }
156
+
157
+ const definition =
158
+ PROVIDER_MONITOR_UPSTREAM_IDENTITY_FIELDS[
159
+ signature.tool as keyof typeof PROVIDER_MONITOR_UPSTREAM_IDENTITY_FIELDS
160
+ ];
161
+ const scopeAndAliases = new Set<string>(
162
+ definition.fields.flatMap((field) => [
163
+ field.name,
164
+ ...('runtimePayloadAliases' in field
165
+ ? (field.runtimePayloadAliases ?? [])
166
+ : []),
167
+ ]),
168
+ );
169
+ const configuration = Object.fromEntries(
170
+ Object.entries(payload ?? {}).filter(
171
+ ([field]) => !scopeAndAliases.has(field),
172
+ ),
173
+ );
174
+ if (Object.keys(configuration).length === 0) return scopeKey;
175
+ return `${scopeKey}#configuration=${stableJson(configuration)}`;
176
+ }
@@ -7,6 +7,40 @@ const BASIC_CREDENTIAL_RE = /\bBasic\s+[A-Za-z0-9+/]{4,}={0,2}\b/g;
7
7
  // segments are far smaller; 16 KiB per segment still leaves ample headroom.
8
8
  const JWT_RE =
9
9
  /\b[A-Za-z0-9_-]{8,16384}\.[A-Za-z0-9_-]{1,16384}\.[A-Za-z0-9_-]{8,16384}\b/g;
10
+ const EMAIL_LOCAL_CHAR_RE = /[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]/;
11
+ const EMAIL_DOMAIN_RE =
12
+ /^[A-Za-z0-9](?:[A-Za-z0-9.-]{0,251}[A-Za-z0-9])?\.[A-Za-z]{2,63}\b/;
13
+
14
+ /** A JWT-shaped substring inside an email address is contact data, not a token. */
15
+ function isEmailLocalPart(value: string, start: number, end: number): boolean {
16
+ let localStart = start;
17
+ while (localStart > 0 && EMAIL_LOCAL_CHAR_RE.test(value[localStart - 1]!)) {
18
+ localStart -= 1;
19
+ }
20
+ let localEnd = end;
21
+ while (
22
+ localEnd < value.length &&
23
+ EMAIL_LOCAL_CHAR_RE.test(value[localEnd]!)
24
+ ) {
25
+ localEnd += 1;
26
+ }
27
+ return (
28
+ localStart < localEnd &&
29
+ localEnd - localStart <= 64 &&
30
+ value[localEnd] === '@' &&
31
+ EMAIL_DOMAIN_RE.test(value.slice(localEnd + 1))
32
+ );
33
+ }
34
+
35
+ function redactTokenUnlessEmail(
36
+ match: string,
37
+ offset: number,
38
+ source: string,
39
+ ): string {
40
+ return isEmailLocalPart(source, offset, offset + match.length)
41
+ ? match
42
+ : SECRET_REDACTION_PLACEHOLDER;
43
+ }
10
44
  const PRIVATE_KEY_RE =
11
45
  /-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g;
12
46
  const SENSITIVE_FIELD_NAME =
@@ -133,9 +167,9 @@ export function redactSecretLikeString(value: string): string {
133
167
  .replace(PRIVATE_KEY_RE, SECRET_REDACTION_PLACEHOLDER)
134
168
  .replace(BEARER_TOKEN_RE, `Bearer ${SECRET_REDACTION_PLACEHOLDER}`)
135
169
  .replace(BASIC_CREDENTIAL_RE, `Basic ${SECRET_REDACTION_PLACEHOLDER}`)
136
- .replace(JWT_RE, SECRET_REDACTION_PLACEHOLDER)
137
- .replace(COMMON_SECRET_RE, SECRET_REDACTION_PLACEHOLDER)
138
- .replace(GENERIC_PREFIXED_SECRET_RE, SECRET_REDACTION_PLACEHOLDER)
170
+ .replace(JWT_RE, redactTokenUnlessEmail)
171
+ .replace(COMMON_SECRET_RE, redactTokenUnlessEmail)
172
+ .replace(GENERIC_PREFIXED_SECRET_RE, redactTokenUnlessEmail)
139
173
  .replace(GENERIC_SECRET_ASSIGNMENT_RE, SECRET_REDACTION_PLACEHOLDER)
140
174
  .replace(HIGH_ENTROPY_ASSIGNMENT_RE, (match) => {
141
175
  const separator = match.includes('=') ? '=' : ':';
package/dist/cli/index.js CHANGED
@@ -3051,7 +3051,7 @@ var SDK_RELEASE = {
3051
3051
  // getters keep their established compatibility behavior.
3052
3052
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
3053
3053
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
3054
- version: "0.3.167",
3054
+ version: "0.3.169",
3055
3055
  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.",
3056
3056
  packageCapabilities: {
3057
3057
  updatePreferences: 1
@@ -4415,6 +4415,22 @@ var SECRET_REDACTION_PLACEHOLDER = "[REDACTED_SECRET]";
4415
4415
  var BEARER_TOKEN_RE = /\bBearer\s+[A-Za-z0-9._~+/=-]{12,}\b/g;
4416
4416
  var BASIC_CREDENTIAL_RE = /\bBasic\s+[A-Za-z0-9+/]{4,}={0,2}\b/g;
4417
4417
  var JWT_RE = /\b[A-Za-z0-9_-]{8,16384}\.[A-Za-z0-9_-]{1,16384}\.[A-Za-z0-9_-]{8,16384}\b/g;
4418
+ var EMAIL_LOCAL_CHAR_RE = /[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]/;
4419
+ var EMAIL_DOMAIN_RE = /^[A-Za-z0-9](?:[A-Za-z0-9.-]{0,251}[A-Za-z0-9])?\.[A-Za-z]{2,63}\b/;
4420
+ function isEmailLocalPart(value, start, end) {
4421
+ let localStart = start;
4422
+ while (localStart > 0 && EMAIL_LOCAL_CHAR_RE.test(value[localStart - 1])) {
4423
+ localStart -= 1;
4424
+ }
4425
+ let localEnd = end;
4426
+ while (localEnd < value.length && EMAIL_LOCAL_CHAR_RE.test(value[localEnd])) {
4427
+ localEnd += 1;
4428
+ }
4429
+ return localStart < localEnd && localEnd - localStart <= 64 && value[localEnd] === "@" && EMAIL_DOMAIN_RE.test(value.slice(localEnd + 1));
4430
+ }
4431
+ function redactTokenUnlessEmail(match, offset, source) {
4432
+ return isEmailLocalPart(source, offset, offset + match.length) ? match : SECRET_REDACTION_PLACEHOLDER;
4433
+ }
4418
4434
  var PRIVATE_KEY_RE = /-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g;
4419
4435
  var SENSITIVE_FIELD_NAME = "authorization|cookie|password|(?:client[_-]?)?secret|(?:access|refresh)[_-]?token|(?:x[_-]?)?api[_-]?key|private[_-]?key|token|credentials";
4420
4436
  var COMMON_SECRET_RE = /\b(?:[prs]k_(?:live|test)_|(?:pat|ghp|github_pat)_|xox[baprs]-)[A-Za-z0-9_./+=:-]{12,}\b/gi;
@@ -4498,7 +4514,7 @@ function redactSecretLikeString(value) {
4498
4514
  return serializedRedacted;
4499
4515
  }
4500
4516
  }
4501
- return serializedRedacted.replace(PRIVATE_KEY_RE, SECRET_REDACTION_PLACEHOLDER).replace(BEARER_TOKEN_RE, `Bearer ${SECRET_REDACTION_PLACEHOLDER}`).replace(BASIC_CREDENTIAL_RE, `Basic ${SECRET_REDACTION_PLACEHOLDER}`).replace(JWT_RE, SECRET_REDACTION_PLACEHOLDER).replace(COMMON_SECRET_RE, SECRET_REDACTION_PLACEHOLDER).replace(GENERIC_PREFIXED_SECRET_RE, SECRET_REDACTION_PLACEHOLDER).replace(GENERIC_SECRET_ASSIGNMENT_RE, SECRET_REDACTION_PLACEHOLDER).replace(HIGH_ENTROPY_ASSIGNMENT_RE, (match) => {
4517
+ return serializedRedacted.replace(PRIVATE_KEY_RE, SECRET_REDACTION_PLACEHOLDER).replace(BEARER_TOKEN_RE, `Bearer ${SECRET_REDACTION_PLACEHOLDER}`).replace(BASIC_CREDENTIAL_RE, `Basic ${SECRET_REDACTION_PLACEHOLDER}`).replace(JWT_RE, redactTokenUnlessEmail).replace(COMMON_SECRET_RE, redactTokenUnlessEmail).replace(GENERIC_PREFIXED_SECRET_RE, redactTokenUnlessEmail).replace(GENERIC_SECRET_ASSIGNMENT_RE, SECRET_REDACTION_PLACEHOLDER).replace(HIGH_ENTROPY_ASSIGNMENT_RE, (match) => {
4502
4518
  const separator = match.includes("=") ? "=" : ":";
4503
4519
  const [key] = match.split(separator, 1);
4504
4520
  return `${key.trim()}${separator}${SECRET_REDACTION_PLACEHOLDER}`;
@@ -3046,7 +3046,7 @@ var SDK_RELEASE = {
3046
3046
  // getters keep their established compatibility behavior.
3047
3047
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
3048
3048
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
3049
- version: "0.3.167",
3049
+ version: "0.3.169",
3050
3050
  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.",
3051
3051
  packageCapabilities: {
3052
3052
  updatePreferences: 1
@@ -4410,6 +4410,22 @@ var SECRET_REDACTION_PLACEHOLDER = "[REDACTED_SECRET]";
4410
4410
  var BEARER_TOKEN_RE = /\bBearer\s+[A-Za-z0-9._~+/=-]{12,}\b/g;
4411
4411
  var BASIC_CREDENTIAL_RE = /\bBasic\s+[A-Za-z0-9+/]{4,}={0,2}\b/g;
4412
4412
  var JWT_RE = /\b[A-Za-z0-9_-]{8,16384}\.[A-Za-z0-9_-]{1,16384}\.[A-Za-z0-9_-]{8,16384}\b/g;
4413
+ var EMAIL_LOCAL_CHAR_RE = /[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]/;
4414
+ var EMAIL_DOMAIN_RE = /^[A-Za-z0-9](?:[A-Za-z0-9.-]{0,251}[A-Za-z0-9])?\.[A-Za-z]{2,63}\b/;
4415
+ function isEmailLocalPart(value, start, end) {
4416
+ let localStart = start;
4417
+ while (localStart > 0 && EMAIL_LOCAL_CHAR_RE.test(value[localStart - 1])) {
4418
+ localStart -= 1;
4419
+ }
4420
+ let localEnd = end;
4421
+ while (localEnd < value.length && EMAIL_LOCAL_CHAR_RE.test(value[localEnd])) {
4422
+ localEnd += 1;
4423
+ }
4424
+ return localStart < localEnd && localEnd - localStart <= 64 && value[localEnd] === "@" && EMAIL_DOMAIN_RE.test(value.slice(localEnd + 1));
4425
+ }
4426
+ function redactTokenUnlessEmail(match, offset, source) {
4427
+ return isEmailLocalPart(source, offset, offset + match.length) ? match : SECRET_REDACTION_PLACEHOLDER;
4428
+ }
4413
4429
  var PRIVATE_KEY_RE = /-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g;
4414
4430
  var SENSITIVE_FIELD_NAME = "authorization|cookie|password|(?:client[_-]?)?secret|(?:access|refresh)[_-]?token|(?:x[_-]?)?api[_-]?key|private[_-]?key|token|credentials";
4415
4431
  var COMMON_SECRET_RE = /\b(?:[prs]k_(?:live|test)_|(?:pat|ghp|github_pat)_|xox[baprs]-)[A-Za-z0-9_./+=:-]{12,}\b/gi;
@@ -4493,7 +4509,7 @@ function redactSecretLikeString(value) {
4493
4509
  return serializedRedacted;
4494
4510
  }
4495
4511
  }
4496
- return serializedRedacted.replace(PRIVATE_KEY_RE, SECRET_REDACTION_PLACEHOLDER).replace(BEARER_TOKEN_RE, `Bearer ${SECRET_REDACTION_PLACEHOLDER}`).replace(BASIC_CREDENTIAL_RE, `Basic ${SECRET_REDACTION_PLACEHOLDER}`).replace(JWT_RE, SECRET_REDACTION_PLACEHOLDER).replace(COMMON_SECRET_RE, SECRET_REDACTION_PLACEHOLDER).replace(GENERIC_PREFIXED_SECRET_RE, SECRET_REDACTION_PLACEHOLDER).replace(GENERIC_SECRET_ASSIGNMENT_RE, SECRET_REDACTION_PLACEHOLDER).replace(HIGH_ENTROPY_ASSIGNMENT_RE, (match) => {
4512
+ return serializedRedacted.replace(PRIVATE_KEY_RE, SECRET_REDACTION_PLACEHOLDER).replace(BEARER_TOKEN_RE, `Bearer ${SECRET_REDACTION_PLACEHOLDER}`).replace(BASIC_CREDENTIAL_RE, `Basic ${SECRET_REDACTION_PLACEHOLDER}`).replace(JWT_RE, redactTokenUnlessEmail).replace(COMMON_SECRET_RE, redactTokenUnlessEmail).replace(GENERIC_PREFIXED_SECRET_RE, redactTokenUnlessEmail).replace(GENERIC_SECRET_ASSIGNMENT_RE, SECRET_REDACTION_PLACEHOLDER).replace(HIGH_ENTROPY_ASSIGNMENT_RE, (match) => {
4497
4513
  const separator = match.includes("=") ? "=" : ":";
4498
4514
  const [key] = match.split(separator, 1);
4499
4515
  return `${key.trim()}${separator}${SECRET_REDACTION_PLACEHOLDER}`;
package/dist/index.js CHANGED
@@ -864,7 +864,7 @@ var SDK_RELEASE = {
864
864
  // getters keep their established compatibility behavior.
865
865
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
866
866
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
867
- version: "0.3.167",
867
+ version: "0.3.169",
868
868
  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.",
869
869
  packageCapabilities: {
870
870
  updatePreferences: 1
@@ -2185,6 +2185,22 @@ var SECRET_REDACTION_PLACEHOLDER = "[REDACTED_SECRET]";
2185
2185
  var BEARER_TOKEN_RE = /\bBearer\s+[A-Za-z0-9._~+/=-]{12,}\b/g;
2186
2186
  var BASIC_CREDENTIAL_RE = /\bBasic\s+[A-Za-z0-9+/]{4,}={0,2}\b/g;
2187
2187
  var JWT_RE = /\b[A-Za-z0-9_-]{8,16384}\.[A-Za-z0-9_-]{1,16384}\.[A-Za-z0-9_-]{8,16384}\b/g;
2188
+ var EMAIL_LOCAL_CHAR_RE = /[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]/;
2189
+ var EMAIL_DOMAIN_RE = /^[A-Za-z0-9](?:[A-Za-z0-9.-]{0,251}[A-Za-z0-9])?\.[A-Za-z]{2,63}\b/;
2190
+ function isEmailLocalPart(value, start, end) {
2191
+ let localStart = start;
2192
+ while (localStart > 0 && EMAIL_LOCAL_CHAR_RE.test(value[localStart - 1])) {
2193
+ localStart -= 1;
2194
+ }
2195
+ let localEnd = end;
2196
+ while (localEnd < value.length && EMAIL_LOCAL_CHAR_RE.test(value[localEnd])) {
2197
+ localEnd += 1;
2198
+ }
2199
+ return localStart < localEnd && localEnd - localStart <= 64 && value[localEnd] === "@" && EMAIL_DOMAIN_RE.test(value.slice(localEnd + 1));
2200
+ }
2201
+ function redactTokenUnlessEmail(match, offset, source) {
2202
+ return isEmailLocalPart(source, offset, offset + match.length) ? match : SECRET_REDACTION_PLACEHOLDER;
2203
+ }
2188
2204
  var PRIVATE_KEY_RE = /-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g;
2189
2205
  var SENSITIVE_FIELD_NAME = "authorization|cookie|password|(?:client[_-]?)?secret|(?:access|refresh)[_-]?token|(?:x[_-]?)?api[_-]?key|private[_-]?key|token|credentials";
2190
2206
  var COMMON_SECRET_RE = /\b(?:[prs]k_(?:live|test)_|(?:pat|ghp|github_pat)_|xox[baprs]-)[A-Za-z0-9_./+=:-]{12,}\b/gi;
@@ -2268,7 +2284,7 @@ function redactSecretLikeString(value) {
2268
2284
  return serializedRedacted;
2269
2285
  }
2270
2286
  }
2271
- return serializedRedacted.replace(PRIVATE_KEY_RE, SECRET_REDACTION_PLACEHOLDER).replace(BEARER_TOKEN_RE, `Bearer ${SECRET_REDACTION_PLACEHOLDER}`).replace(BASIC_CREDENTIAL_RE, `Basic ${SECRET_REDACTION_PLACEHOLDER}`).replace(JWT_RE, SECRET_REDACTION_PLACEHOLDER).replace(COMMON_SECRET_RE, SECRET_REDACTION_PLACEHOLDER).replace(GENERIC_PREFIXED_SECRET_RE, SECRET_REDACTION_PLACEHOLDER).replace(GENERIC_SECRET_ASSIGNMENT_RE, SECRET_REDACTION_PLACEHOLDER).replace(HIGH_ENTROPY_ASSIGNMENT_RE, (match) => {
2287
+ return serializedRedacted.replace(PRIVATE_KEY_RE, SECRET_REDACTION_PLACEHOLDER).replace(BEARER_TOKEN_RE, `Bearer ${SECRET_REDACTION_PLACEHOLDER}`).replace(BASIC_CREDENTIAL_RE, `Basic ${SECRET_REDACTION_PLACEHOLDER}`).replace(JWT_RE, redactTokenUnlessEmail).replace(COMMON_SECRET_RE, redactTokenUnlessEmail).replace(GENERIC_PREFIXED_SECRET_RE, redactTokenUnlessEmail).replace(GENERIC_SECRET_ASSIGNMENT_RE, SECRET_REDACTION_PLACEHOLDER).replace(HIGH_ENTROPY_ASSIGNMENT_RE, (match) => {
2272
2288
  const separator = match.includes("=") ? "=" : ":";
2273
2289
  const [key] = match.split(separator, 1);
2274
2290
  return `${key.trim()}${separator}${SECRET_REDACTION_PLACEHOLDER}`;
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.167",
771
+ version: "0.3.169",
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
@@ -2089,6 +2089,22 @@ var SECRET_REDACTION_PLACEHOLDER = "[REDACTED_SECRET]";
2089
2089
  var BEARER_TOKEN_RE = /\bBearer\s+[A-Za-z0-9._~+/=-]{12,}\b/g;
2090
2090
  var BASIC_CREDENTIAL_RE = /\bBasic\s+[A-Za-z0-9+/]{4,}={0,2}\b/g;
2091
2091
  var JWT_RE = /\b[A-Za-z0-9_-]{8,16384}\.[A-Za-z0-9_-]{1,16384}\.[A-Za-z0-9_-]{8,16384}\b/g;
2092
+ var EMAIL_LOCAL_CHAR_RE = /[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]/;
2093
+ var EMAIL_DOMAIN_RE = /^[A-Za-z0-9](?:[A-Za-z0-9.-]{0,251}[A-Za-z0-9])?\.[A-Za-z]{2,63}\b/;
2094
+ function isEmailLocalPart(value, start, end) {
2095
+ let localStart = start;
2096
+ while (localStart > 0 && EMAIL_LOCAL_CHAR_RE.test(value[localStart - 1])) {
2097
+ localStart -= 1;
2098
+ }
2099
+ let localEnd = end;
2100
+ while (localEnd < value.length && EMAIL_LOCAL_CHAR_RE.test(value[localEnd])) {
2101
+ localEnd += 1;
2102
+ }
2103
+ return localStart < localEnd && localEnd - localStart <= 64 && value[localEnd] === "@" && EMAIL_DOMAIN_RE.test(value.slice(localEnd + 1));
2104
+ }
2105
+ function redactTokenUnlessEmail(match, offset, source) {
2106
+ return isEmailLocalPart(source, offset, offset + match.length) ? match : SECRET_REDACTION_PLACEHOLDER;
2107
+ }
2092
2108
  var PRIVATE_KEY_RE = /-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g;
2093
2109
  var SENSITIVE_FIELD_NAME = "authorization|cookie|password|(?:client[_-]?)?secret|(?:access|refresh)[_-]?token|(?:x[_-]?)?api[_-]?key|private[_-]?key|token|credentials";
2094
2110
  var COMMON_SECRET_RE = /\b(?:[prs]k_(?:live|test)_|(?:pat|ghp|github_pat)_|xox[baprs]-)[A-Za-z0-9_./+=:-]{12,}\b/gi;
@@ -2172,7 +2188,7 @@ function redactSecretLikeString(value) {
2172
2188
  return serializedRedacted;
2173
2189
  }
2174
2190
  }
2175
- return serializedRedacted.replace(PRIVATE_KEY_RE, SECRET_REDACTION_PLACEHOLDER).replace(BEARER_TOKEN_RE, `Bearer ${SECRET_REDACTION_PLACEHOLDER}`).replace(BASIC_CREDENTIAL_RE, `Basic ${SECRET_REDACTION_PLACEHOLDER}`).replace(JWT_RE, SECRET_REDACTION_PLACEHOLDER).replace(COMMON_SECRET_RE, SECRET_REDACTION_PLACEHOLDER).replace(GENERIC_PREFIXED_SECRET_RE, SECRET_REDACTION_PLACEHOLDER).replace(GENERIC_SECRET_ASSIGNMENT_RE, SECRET_REDACTION_PLACEHOLDER).replace(HIGH_ENTROPY_ASSIGNMENT_RE, (match) => {
2191
+ return serializedRedacted.replace(PRIVATE_KEY_RE, SECRET_REDACTION_PLACEHOLDER).replace(BEARER_TOKEN_RE, `Bearer ${SECRET_REDACTION_PLACEHOLDER}`).replace(BASIC_CREDENTIAL_RE, `Basic ${SECRET_REDACTION_PLACEHOLDER}`).replace(JWT_RE, redactTokenUnlessEmail).replace(COMMON_SECRET_RE, redactTokenUnlessEmail).replace(GENERIC_PREFIXED_SECRET_RE, redactTokenUnlessEmail).replace(GENERIC_SECRET_ASSIGNMENT_RE, SECRET_REDACTION_PLACEHOLDER).replace(HIGH_ENTROPY_ASSIGNMENT_RE, (match) => {
2176
2192
  const separator = match.includes("=") ? "=" : ":";
2177
2193
  const [key] = match.split(separator, 1);
2178
2194
  return `${key.trim()}${separator}${SECRET_REDACTION_PLACEHOLDER}`;
@@ -64,6 +64,7 @@
64
64
  "dist/bundling-sources/shared_libs/monitors/provider-callback-verification.ts",
65
65
  "dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts",
66
66
  "dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts",
67
+ "dist/bundling-sources/shared_libs/monitors/provider-monitor-conflicts.ts",
67
68
  "dist/bundling-sources/shared_libs/monitors/provider-monitor-consumer-health.ts",
68
69
  "dist/bundling-sources/shared_libs/monitors/provider-monitor-control-plane-capability.ts",
69
70
  "dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts",
@@ -149,7 +149,7 @@ type SdkRelease = {
149
149
  supportPolicy: SdkSupportPolicy;
150
150
  };
151
151
  declare const SDK_RELEASE: {
152
- readonly version: "0.3.167";
152
+ readonly version: "0.3.169";
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.167";
152
+ readonly version: "0.3.169";
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.167",
77
+ version: "0.3.169",
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.167",
51
+ version: "0.3.169",
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.167",
3
+ "version": "0.3.169",
4
4
  "description": "GTM data CLI and TypeScript SDK for coding agents",
5
5
  "license": "MIT",
6
6
  "homepage": "https://code.deepline.com",