deepline 0.3.270 → 0.3.271

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.
@@ -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.270',
203
+ version: '0.3.271',
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: {
@@ -151,6 +151,7 @@ import {
151
151
  markPostgresSchedulerAttemptWaiting,
152
152
  materializePostgresSchedulerFiles,
153
153
  listPostgresSchedulerCompletedRunnerTerminals,
154
+ type PostgresSchedulerCompletedRunnerTerminal,
154
155
  listPostgresSchedulerAmbiguousModalCreateIntents,
155
156
  recordPostgresSchedulerAttemptRuntimeResource,
156
157
  recordPostgresSchedulerAmbiguousModalCreateIntent,
@@ -1939,7 +1940,12 @@ async function readTerminalSheetRowOutcomes(input: {
1939
1940
  runId: string;
1940
1941
  attempt: number;
1941
1942
  }): Promise<
1942
- Array<{ tableNamespace: string; completed: number; failed: number; total: number }>
1943
+ Array<{
1944
+ tableNamespace: string;
1945
+ completed: number;
1946
+ failed: number;
1947
+ total: number;
1948
+ }>
1943
1949
  > {
1944
1950
  const sheetNamespaces = [
1945
1951
  ...new Set(
@@ -2014,11 +2020,14 @@ async function collectFailedTerminalSettledProgressEvents(input: {
2014
2020
  occurredAt: Date.now(),
2015
2021
  });
2016
2022
  } catch (error) {
2017
- console.warn('[absurd-runtime.worker] failed_terminal_settled_counts_failed', {
2018
- runId: input.runId,
2019
- attempt: input.attempt,
2020
- error: error instanceof Error ? error.message : String(error),
2021
- });
2023
+ console.warn(
2024
+ '[absurd-runtime.worker] failed_terminal_settled_counts_failed',
2025
+ {
2026
+ runId: input.runId,
2027
+ attempt: input.attempt,
2028
+ error: error instanceof Error ? error.message : String(error),
2029
+ },
2030
+ );
2022
2031
  return [];
2023
2032
  }
2024
2033
  }
@@ -2073,7 +2082,11 @@ function requestTerminalOutboxProjection(input: {
2073
2082
  attempted: projection?.attempted ?? null,
2074
2083
  projected: projection?.projected ?? null,
2075
2084
  });
2076
- if (projection && projection.attempted === 0 && !projection.targetDelivered) {
2085
+ if (
2086
+ projection &&
2087
+ projection.attempted === 0 &&
2088
+ !projection.targetDelivered
2089
+ ) {
2077
2090
  // Nothing was claimable for this run: another dispatcher holds its
2078
2091
  // outbox lease or a predecessor is not yet due. Delivery now depends
2079
2092
  // on that holder or the projector's next wave.
@@ -5748,17 +5761,21 @@ export async function recoverAbsurdRuntimeCompletedRunnerTerminals(input: {
5748
5761
  schedulerOptions?: Pick<PostgresSchedulerOptions, 'schema'>;
5749
5762
  absurdReleaseId?: string | null;
5750
5763
  limit?: number;
5764
+ /** Preselected by the fixed controller's one-query cross-lane scan. */
5765
+ terminals?: readonly PostgresSchedulerCompletedRunnerTerminal[];
5751
5766
  }): Promise<{ recovered: number; skipped: number }> {
5752
5767
  const options = input.schedulerOptions ?? {};
5753
- const terminals = await listPostgresSchedulerCompletedRunnerTerminals(
5754
- input.client,
5755
- {
5756
- limit: input.limit,
5757
- absurdReleaseId: input.absurdReleaseId,
5758
- includeFailed: true,
5759
- },
5760
- options,
5761
- );
5768
+ const terminals =
5769
+ input.terminals ??
5770
+ (await listPostgresSchedulerCompletedRunnerTerminals(
5771
+ input.client,
5772
+ {
5773
+ limit: input.limit,
5774
+ absurdReleaseId: input.absurdReleaseId,
5775
+ includeFailed: true,
5776
+ },
5777
+ options,
5778
+ ));
5762
5779
  let recovered = 0;
5763
5780
  let skipped = 0;
5764
5781
 
@@ -5955,18 +5972,40 @@ export async function recoverAbsurdRuntimeCompletedRunnerTerminalsAcrossLanes(in
5955
5972
  schedulerOptions?: Pick<PostgresSchedulerOptions, 'schema'>;
5956
5973
  limitPerLane?: number;
5957
5974
  }): Promise<{ recovered: number; skipped: number }> {
5975
+ const releaseIds = [
5976
+ ...new Set(input.releaseIds.map((id) => id.trim()).filter(Boolean)),
5977
+ ];
5978
+ if (releaseIds.length === 0) return { recovered: 0, skipped: 0 };
5979
+ const terminals = await listPostgresSchedulerCompletedRunnerTerminals(
5980
+ input.client,
5981
+ {
5982
+ absurdReleaseIds: releaseIds,
5983
+ includeFailed: true,
5984
+ limit: input.limitPerLane,
5985
+ },
5986
+ input.schedulerOptions,
5987
+ );
5988
+ const terminalsByReleaseId = new Map<
5989
+ string,
5990
+ PostgresSchedulerCompletedRunnerTerminal[]
5991
+ >();
5992
+ for (const terminal of terminals) {
5993
+ if (!terminal.releaseId) continue;
5994
+ const laneTerminals = terminalsByReleaseId.get(terminal.releaseId) ?? [];
5995
+ laneTerminals.push(terminal);
5996
+ terminalsByReleaseId.set(terminal.releaseId, laneTerminals);
5997
+ }
5998
+
5958
5999
  let recovered = 0;
5959
6000
  let skipped = 0;
5960
- for (const releaseId of [
5961
- ...new Set(input.releaseIds.map((id) => id.trim())),
5962
- ]) {
5963
- if (!releaseId) continue;
6001
+ for (const releaseId of releaseIds) {
5964
6002
  const outcome = await recoverAbsurdRuntimeCompletedRunnerTerminals({
5965
6003
  client: input.client,
5966
6004
  queue: absurdQueueNameForRelease(releaseId),
5967
6005
  absurdReleaseId: releaseId,
5968
6006
  schedulerOptions: input.schedulerOptions,
5969
6007
  limit: input.limitPerLane,
6008
+ terminals: terminalsByReleaseId.get(releaseId) ?? [],
5970
6009
  });
5971
6010
  recovered += outcome.recovered;
5972
6011
  skipped += outcome.skipped;
@@ -322,7 +322,9 @@ const POSTGRES_SCHEDULER_SCHEMA_INIT_STATEMENT_TIMEOUT_MS = 60_000;
322
322
  // v54 expands the optional per-run canonical event-store marker.
323
323
  // v55 refreshes the unified event journal projection. The canonical retention
324
324
  // index stays operator-prepared concurrently before marked-run admission.
325
- export const POSTGRES_SCHEDULER_SCHEMA_VERSION = 55;
325
+ // v56 adds a release-leading index for fixed-controller runner-terminal
326
+ // recovery, which scans only active runs for each release lane.
327
+ export const POSTGRES_SCHEDULER_SCHEMA_VERSION = 56;
326
328
  const POSTGRES_SCHEDULER_SCHEMA_MIGRATIONS_TABLE =
327
329
  'scheduler_schema_migrations';
328
330
  export const POSTGRES_SCHEDULER_OPEN_RECOVERY_INDEX =
@@ -2034,6 +2036,15 @@ export async function hasCurrentPostgresSchedulerSchemaShape(
2034
2036
  AND index_row.indrelid = to_regclass($4)
2035
2037
  AND index_row.indisready AND index_row.indisvalid
2036
2038
  )
2039
+ AND EXISTS (
2040
+ SELECT 1 FROM pg_index AS index_row
2041
+ JOIN pg_class AS index_class ON index_class.oid = index_row.indexrelid
2042
+ JOIN pg_namespace AS index_namespace ON index_namespace.oid = index_class.relnamespace
2043
+ WHERE index_namespace.nspname = $1
2044
+ AND index_class.relname = 'runtime_scheduler_runs_absurd_release_active_idx'
2045
+ AND index_row.indrelid = to_regclass($4)
2046
+ AND index_row.indisready AND index_row.indisvalid
2047
+ )
2037
2048
  AND EXISTS (
2038
2049
  SELECT 1 FROM pg_index AS index_row
2039
2050
  JOIN pg_class AS index_class ON index_class.oid = index_row.indexrelid
@@ -3990,6 +4001,11 @@ export async function ensurePostgresSchedulerSchema(
3990
4001
  WHERE status IN ('completed', 'failed', 'cancelled')
3991
4002
  AND started_at IS NOT NULL
3992
4003
  `);
4004
+ await client.query(`
4005
+ CREATE INDEX IF NOT EXISTS runtime_scheduler_runs_absurd_release_active_idx
4006
+ ON ${tableName('runs', options)} ((launch_json ->> 'absurdReleaseId'), run_id)
4007
+ WHERE status IN ('queued', 'running', 'waiting')
4008
+ `);
3993
4009
  }
3994
4010
  await client.query(`
3995
4011
  CREATE INDEX IF NOT EXISTS runtime_scheduler_receipts_run_idx
@@ -4165,6 +4181,12 @@ const POSTGRES_SCHEDULER_RUNTIME_ADMIN_INDEXES = [
4165
4181
  WHERE status IN ('completed', 'failed', 'cancelled')
4166
4182
  AND started_at IS NOT NULL`,
4167
4183
  },
4184
+ {
4185
+ name: 'runtime_scheduler_runs_absurd_release_active_idx',
4186
+ table: 'runs',
4187
+ definition: `((launch_json ->> 'absurdReleaseId'), run_id)
4188
+ WHERE status IN ('queued', 'running', 'waiting')`,
4189
+ },
4168
4190
  {
4169
4191
  name: 'runtime_scheduler_rate_reservation_bucket_expiry_idx',
4170
4192
  table: 'rate_reservations',
@@ -12521,6 +12543,7 @@ async function readPostgresSchedulerRunnerTerminalReceivedAtMs(
12521
12543
  * there is no release stamp.
12522
12544
  */
12523
12545
  export type PostgresSchedulerCompletedRunnerTerminal = {
12546
+ releaseId: string | null;
12524
12547
  runId: string;
12525
12548
  attempt: number;
12526
12549
  leaseToken: string;
@@ -12532,45 +12555,95 @@ export async function listPostgresSchedulerCompletedRunnerTerminals(
12532
12555
  input: {
12533
12556
  limit?: number;
12534
12557
  absurdReleaseId?: string | null;
12558
+ absurdReleaseIds?: readonly string[];
12535
12559
  includeFailed?: boolean;
12536
12560
  } = {},
12537
12561
  options?: Pick<PostgresSchedulerOptions, 'schema'>,
12538
12562
  ): Promise<PostgresSchedulerCompletedRunnerTerminal[]> {
12539
12563
  const limit = Math.min(500, Math.max(1, Math.floor(input.limit ?? 100)));
12564
+ const releaseIds = input.absurdReleaseIds
12565
+ ? [
12566
+ ...new Set(
12567
+ input.absurdReleaseIds.map((id) => id.trim()).filter(Boolean),
12568
+ ),
12569
+ ]
12570
+ : null;
12571
+ if (releaseIds && releaseIds.length === 0) return [];
12572
+ const activeAttemptStatus = input.includeFailed
12573
+ ? `attempts.status IN ('running', 'waiting')`
12574
+ : `attempts.status = 'running'`;
12575
+ const runnerTerminalStatus = input.includeFailed
12576
+ ? `attempts.runner_result_json ->> 'status' IN ('completed', 'failed')`
12577
+ : `attempts.runner_result_json ->> 'status' = 'completed'`;
12578
+ const terminalQuery = releaseIds
12579
+ ? {
12580
+ sql: `
12581
+ WITH requested_lanes AS (
12582
+ SELECT DISTINCT btrim(release_id) AS release_id
12583
+ FROM unnest($1::text[]) AS requested(release_id)
12584
+ WHERE btrim(release_id) <> ''
12585
+ )
12586
+ SELECT terminals.release_id,
12587
+ terminals.run_id,
12588
+ terminals.attempt,
12589
+ terminals.lease_token,
12590
+ terminals.runner_result_json
12591
+ FROM requested_lanes AS lanes
12592
+ CROSS JOIN LATERAL (
12593
+ SELECT runs.launch_json ->> 'absurdReleaseId' AS release_id,
12594
+ attempts.run_id,
12595
+ attempts.attempt,
12596
+ attempts.lease_token,
12597
+ attempts.runner_result_json
12598
+ FROM ${tableName('runs', options)} AS runs
12599
+ JOIN ${tableName('attempts', options)} AS attempts
12600
+ ON attempts.run_id = runs.run_id
12601
+ WHERE runs.launch_json ->> 'absurdReleaseId' = lanes.release_id
12602
+ AND runs.status IN ('queued', 'running', 'waiting')
12603
+ AND ${activeAttemptStatus}
12604
+ AND attempts.lease_token IS NOT NULL
12605
+ AND ${runnerTerminalStatus}
12606
+ ORDER BY attempts.updated_at ASC, attempts.run_id ASC
12607
+ LIMIT $2
12608
+ ) AS terminals
12609
+ `,
12610
+ params: [releaseIds, limit],
12611
+ }
12612
+ : (() => {
12613
+ const releaseId = input.absurdReleaseId?.trim() || null;
12614
+ const releasePredicate = releaseId
12615
+ ? `AND runs.launch_json ->> 'absurdReleaseId' = $1::text`
12616
+ : '';
12617
+ return {
12618
+ sql: `
12619
+ SELECT runs.launch_json ->> 'absurdReleaseId' AS release_id,
12620
+ attempts.run_id,
12621
+ attempts.attempt,
12622
+ attempts.lease_token,
12623
+ attempts.runner_result_json
12624
+ FROM ${tableName('attempts', options)} AS attempts
12625
+ JOIN ${tableName('runs', options)} AS runs
12626
+ ON runs.run_id = attempts.run_id
12627
+ WHERE ${activeAttemptStatus}
12628
+ AND attempts.lease_token IS NOT NULL
12629
+ AND ${runnerTerminalStatus}
12630
+ AND runs.status IN ('queued', 'running', 'waiting')
12631
+ ${releasePredicate}
12632
+ ORDER BY attempts.updated_at ASC, attempts.run_id ASC
12633
+ LIMIT $${releaseId ? 2 : 1}
12634
+ `,
12635
+ params: releaseId ? [releaseId, limit] : [limit],
12636
+ };
12637
+ })();
12540
12638
  const terminals = await client.query<{
12639
+ release_id: string | null;
12541
12640
  run_id: string;
12542
12641
  attempt: number;
12543
12642
  lease_token: string;
12544
12643
  runner_result_json: unknown;
12545
- }>(
12546
- `
12547
- SELECT
12548
- attempts.run_id,
12549
- attempts.attempt,
12550
- attempts.lease_token,
12551
- attempts.runner_result_json
12552
- FROM ${tableName('attempts', options)} AS attempts
12553
- JOIN ${tableName('runs', options)} AS runs
12554
- ON runs.run_id = attempts.run_id
12555
- WHERE attempts.status = ANY($4::text[])
12556
- AND attempts.lease_token IS NOT NULL
12557
- AND attempts.runner_result_json ->> 'status' = ANY($3::text[])
12558
- AND runs.status IN ('queued', 'running', 'waiting')
12559
- AND (
12560
- $1::text IS NULL
12561
- OR runs.launch_json ->> 'absurdReleaseId' = $1::text
12562
- )
12563
- ORDER BY attempts.updated_at ASC, attempts.run_id ASC
12564
- LIMIT $2
12565
- `,
12566
- [
12567
- input.absurdReleaseId?.trim() || null,
12568
- limit,
12569
- input.includeFailed ? ['completed', 'failed'] : ['completed'],
12570
- input.includeFailed ? ['running', 'waiting'] : ['running'],
12571
- ],
12572
- );
12644
+ }>(terminalQuery.sql, terminalQuery.params);
12573
12645
  return terminals.rows.map((row) => ({
12646
+ releaseId: row.release_id,
12574
12647
  runId: row.run_id,
12575
12648
  attempt: row.attempt,
12576
12649
  leaseToken: row.lease_token,
@@ -10,9 +10,9 @@ declare const DEEPLINE_GTM_SKILL = "/deepline-gtm";
10
10
  * promise of "the same starter workflows offered after setup" was false for
11
11
  * anyone who landed on the dashboard first.
12
12
  *
13
- * Surfaces that cannot import this module (the Mintlify docs, the Python
14
- * onboard, the shell installer heredocs) are checked against it by
15
- * `scripts/check-starter-prompts.ts`.
13
+ * Mintlify starter blocks are generated from this list by
14
+ * `bun scripts/regen.ts starter-prompts` (also run by the commit hook).
15
+ * `scripts/check-starter-prompts.ts` rejects generated-document drift.
16
16
  */
17
17
  declare const DEEPLINE_GTM_STARTER_PROMPTS: readonly [{
18
18
  readonly id: "competitor-tracking";
@@ -24,12 +24,15 @@ declare const DEEPLINE_GTM_STARTER_PROMPTS: readonly [{
24
24
  readonly prompt: "/deepline-gtm Find 10 CTOs at B2B SaaS companies and enrich them with email addresses.";
25
25
  }, {
26
26
  readonly id: "decision-maker-discovery";
27
- readonly title: "Decision-maker discovery";
28
- readonly prompt: "/deepline-gtm Find the best people to contact at these companies and verify their email addresses.";
27
+ readonly title: "Fintech hiring and growth";
28
+ readonly prompt: "/deepline-gtm Find five fintech companies with live SDR openings and six-month headcount growth. Show dated evidence for both.";
29
29
  }];
30
30
  /** The first starter prompt, for surfaces that show exactly one example. */
31
31
  declare const DEEPLINE_GTM_PRIMARY_STARTER_PROMPT: "/deepline-gtm Track competitors of my company. Use my business email domain when available; otherwise ask for my company name.";
32
- declare const DEEPLINE_GTM_HANDOFF_QUESTION = "Would you like to try one of these examples, or tell me your own business problem?";
32
+ declare const DEEPLINE_GTM_HANDOFF_QUESTION = "What would you like to do with Deepline?";
33
+ declare const DEEPLINE_GTM_CUSTOM_OPTION = "Tell me what you want to accomplish and I'll help you build it";
34
+ /** Three executable examples followed by the custom-task choice. */
35
+ declare const DEEPLINE_GTM_STARTER_OPTIONS: readonly [...("/deepline-gtm Track competitors of my company. Use my business email domain when available; otherwise ask for my company name." | "/deepline-gtm Find 10 CTOs at B2B SaaS companies and enrich them with email addresses." | "/deepline-gtm Find five fintech companies with live SDR openings and six-month headcount growth. Show dated evidence for both.")[], "Tell me what you want to accomplish and I'll help you build it"];
33
36
  declare function deeplineGtmGettingStartedPayload(): {
34
37
  skill: string;
35
38
  examples: readonly [{
@@ -42,11 +45,12 @@ declare function deeplineGtmGettingStartedPayload(): {
42
45
  readonly prompt: "/deepline-gtm Find 10 CTOs at B2B SaaS companies and enrich them with email addresses.";
43
46
  }, {
44
47
  readonly id: "decision-maker-discovery";
45
- readonly title: "Decision-maker discovery";
46
- readonly prompt: "/deepline-gtm Find the best people to contact at these companies and verify their email addresses.";
48
+ readonly title: "Fintech hiring and growth";
49
+ readonly prompt: "/deepline-gtm Find five fintech companies with live SDR openings and six-month headcount growth. Show dated evidence for both.";
47
50
  }];
48
51
  question: string;
52
+ customOption: string;
49
53
  customProblemBehavior: string;
50
54
  };
51
55
 
52
- export { DEEPLINE_GTM_HANDOFF_QUESTION, DEEPLINE_GTM_PRIMARY_STARTER_PROMPT, DEEPLINE_GTM_SKILL, DEEPLINE_GTM_STARTER_PROMPTS, deeplineGtmGettingStartedPayload };
56
+ export { DEEPLINE_GTM_CUSTOM_OPTION, DEEPLINE_GTM_HANDOFF_QUESTION, DEEPLINE_GTM_PRIMARY_STARTER_PROMPT, DEEPLINE_GTM_SKILL, DEEPLINE_GTM_STARTER_OPTIONS, DEEPLINE_GTM_STARTER_PROMPTS, deeplineGtmGettingStartedPayload };
@@ -10,9 +10,9 @@ declare const DEEPLINE_GTM_SKILL = "/deepline-gtm";
10
10
  * promise of "the same starter workflows offered after setup" was false for
11
11
  * anyone who landed on the dashboard first.
12
12
  *
13
- * Surfaces that cannot import this module (the Mintlify docs, the Python
14
- * onboard, the shell installer heredocs) are checked against it by
15
- * `scripts/check-starter-prompts.ts`.
13
+ * Mintlify starter blocks are generated from this list by
14
+ * `bun scripts/regen.ts starter-prompts` (also run by the commit hook).
15
+ * `scripts/check-starter-prompts.ts` rejects generated-document drift.
16
16
  */
17
17
  declare const DEEPLINE_GTM_STARTER_PROMPTS: readonly [{
18
18
  readonly id: "competitor-tracking";
@@ -24,12 +24,15 @@ declare const DEEPLINE_GTM_STARTER_PROMPTS: readonly [{
24
24
  readonly prompt: "/deepline-gtm Find 10 CTOs at B2B SaaS companies and enrich them with email addresses.";
25
25
  }, {
26
26
  readonly id: "decision-maker-discovery";
27
- readonly title: "Decision-maker discovery";
28
- readonly prompt: "/deepline-gtm Find the best people to contact at these companies and verify their email addresses.";
27
+ readonly title: "Fintech hiring and growth";
28
+ readonly prompt: "/deepline-gtm Find five fintech companies with live SDR openings and six-month headcount growth. Show dated evidence for both.";
29
29
  }];
30
30
  /** The first starter prompt, for surfaces that show exactly one example. */
31
31
  declare const DEEPLINE_GTM_PRIMARY_STARTER_PROMPT: "/deepline-gtm Track competitors of my company. Use my business email domain when available; otherwise ask for my company name.";
32
- declare const DEEPLINE_GTM_HANDOFF_QUESTION = "Would you like to try one of these examples, or tell me your own business problem?";
32
+ declare const DEEPLINE_GTM_HANDOFF_QUESTION = "What would you like to do with Deepline?";
33
+ declare const DEEPLINE_GTM_CUSTOM_OPTION = "Tell me what you want to accomplish and I'll help you build it";
34
+ /** Three executable examples followed by the custom-task choice. */
35
+ declare const DEEPLINE_GTM_STARTER_OPTIONS: readonly [...("/deepline-gtm Track competitors of my company. Use my business email domain when available; otherwise ask for my company name." | "/deepline-gtm Find 10 CTOs at B2B SaaS companies and enrich them with email addresses." | "/deepline-gtm Find five fintech companies with live SDR openings and six-month headcount growth. Show dated evidence for both.")[], "Tell me what you want to accomplish and I'll help you build it"];
33
36
  declare function deeplineGtmGettingStartedPayload(): {
34
37
  skill: string;
35
38
  examples: readonly [{
@@ -42,11 +45,12 @@ declare function deeplineGtmGettingStartedPayload(): {
42
45
  readonly prompt: "/deepline-gtm Find 10 CTOs at B2B SaaS companies and enrich them with email addresses.";
43
46
  }, {
44
47
  readonly id: "decision-maker-discovery";
45
- readonly title: "Decision-maker discovery";
46
- readonly prompt: "/deepline-gtm Find the best people to contact at these companies and verify their email addresses.";
48
+ readonly title: "Fintech hiring and growth";
49
+ readonly prompt: "/deepline-gtm Find five fintech companies with live SDR openings and six-month headcount growth. Show dated evidence for both.";
47
50
  }];
48
51
  question: string;
52
+ customOption: string;
49
53
  customProblemBehavior: string;
50
54
  };
51
55
 
52
- export { DEEPLINE_GTM_HANDOFF_QUESTION, DEEPLINE_GTM_PRIMARY_STARTER_PROMPT, DEEPLINE_GTM_SKILL, DEEPLINE_GTM_STARTER_PROMPTS, deeplineGtmGettingStartedPayload };
56
+ export { DEEPLINE_GTM_CUSTOM_OPTION, DEEPLINE_GTM_HANDOFF_QUESTION, DEEPLINE_GTM_PRIMARY_STARTER_PROMPT, DEEPLINE_GTM_SKILL, DEEPLINE_GTM_STARTER_OPTIONS, DEEPLINE_GTM_STARTER_PROMPTS, deeplineGtmGettingStartedPayload };
@@ -20,9 +20,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/cli/getting-started.ts
21
21
  var getting_started_exports = {};
22
22
  __export(getting_started_exports, {
23
+ DEEPLINE_GTM_CUSTOM_OPTION: () => DEEPLINE_GTM_CUSTOM_OPTION,
23
24
  DEEPLINE_GTM_HANDOFF_QUESTION: () => DEEPLINE_GTM_HANDOFF_QUESTION,
24
25
  DEEPLINE_GTM_PRIMARY_STARTER_PROMPT: () => DEEPLINE_GTM_PRIMARY_STARTER_PROMPT,
25
26
  DEEPLINE_GTM_SKILL: () => DEEPLINE_GTM_SKILL,
27
+ DEEPLINE_GTM_STARTER_OPTIONS: () => DEEPLINE_GTM_STARTER_OPTIONS,
26
28
  DEEPLINE_GTM_STARTER_PROMPTS: () => DEEPLINE_GTM_STARTER_PROMPTS,
27
29
  deeplineGtmGettingStartedPayload: () => deeplineGtmGettingStartedPayload
28
30
  });
@@ -40,26 +42,36 @@ var DEEPLINE_GTM_STARTER_PROMPTS = [
40
42
  prompt: "/deepline-gtm Find 10 CTOs at B2B SaaS companies and enrich them with email addresses."
41
43
  },
42
44
  {
45
+ // Historical ID retained for SDK payload compatibility; the current
46
+ // starter copy is the fintech hiring-and-growth workflow below.
43
47
  id: "decision-maker-discovery",
44
- title: "Decision-maker discovery",
45
- prompt: "/deepline-gtm Find the best people to contact at these companies and verify their email addresses."
48
+ title: "Fintech hiring and growth",
49
+ prompt: "/deepline-gtm Find five fintech companies with live SDR openings and six-month headcount growth. Show dated evidence for both."
46
50
  }
47
51
  ];
48
52
  var DEEPLINE_GTM_PRIMARY_STARTER_PROMPT = DEEPLINE_GTM_STARTER_PROMPTS[0].prompt;
49
- var DEEPLINE_GTM_HANDOFF_QUESTION = "Would you like to try one of these examples, or tell me your own business problem?";
53
+ var DEEPLINE_GTM_HANDOFF_QUESTION = "What would you like to do with Deepline?";
54
+ var DEEPLINE_GTM_CUSTOM_OPTION = "Tell me what you want to accomplish and I'll help you build it";
55
+ var DEEPLINE_GTM_STARTER_OPTIONS = [
56
+ ...DEEPLINE_GTM_STARTER_PROMPTS.map(({ prompt }) => prompt),
57
+ DEEPLINE_GTM_CUSTOM_OPTION
58
+ ];
50
59
  function deeplineGtmGettingStartedPayload() {
51
60
  return {
52
61
  skill: DEEPLINE_GTM_SKILL,
53
62
  examples: DEEPLINE_GTM_STARTER_PROMPTS,
54
63
  question: DEEPLINE_GTM_HANDOFF_QUESTION,
64
+ customOption: DEEPLINE_GTM_CUSTOM_OPTION,
55
65
  customProblemBehavior: "Turn the business problem into one exact /deepline-gtm prompt, show that reusable prompt, then execute it without asking the user to paste it again."
56
66
  };
57
67
  }
58
68
  // Annotate the CommonJS export names for ESM import in node:
59
69
  0 && (module.exports = {
70
+ DEEPLINE_GTM_CUSTOM_OPTION,
60
71
  DEEPLINE_GTM_HANDOFF_QUESTION,
61
72
  DEEPLINE_GTM_PRIMARY_STARTER_PROMPT,
62
73
  DEEPLINE_GTM_SKILL,
74
+ DEEPLINE_GTM_STARTER_OPTIONS,
63
75
  DEEPLINE_GTM_STARTER_PROMPTS,
64
76
  deeplineGtmGettingStartedPayload
65
77
  });
@@ -12,25 +12,35 @@ var DEEPLINE_GTM_STARTER_PROMPTS = [
12
12
  prompt: "/deepline-gtm Find 10 CTOs at B2B SaaS companies and enrich them with email addresses."
13
13
  },
14
14
  {
15
+ // Historical ID retained for SDK payload compatibility; the current
16
+ // starter copy is the fintech hiring-and-growth workflow below.
15
17
  id: "decision-maker-discovery",
16
- title: "Decision-maker discovery",
17
- prompt: "/deepline-gtm Find the best people to contact at these companies and verify their email addresses."
18
+ title: "Fintech hiring and growth",
19
+ prompt: "/deepline-gtm Find five fintech companies with live SDR openings and six-month headcount growth. Show dated evidence for both."
18
20
  }
19
21
  ];
20
22
  var DEEPLINE_GTM_PRIMARY_STARTER_PROMPT = DEEPLINE_GTM_STARTER_PROMPTS[0].prompt;
21
- var DEEPLINE_GTM_HANDOFF_QUESTION = "Would you like to try one of these examples, or tell me your own business problem?";
23
+ var DEEPLINE_GTM_HANDOFF_QUESTION = "What would you like to do with Deepline?";
24
+ var DEEPLINE_GTM_CUSTOM_OPTION = "Tell me what you want to accomplish and I'll help you build it";
25
+ var DEEPLINE_GTM_STARTER_OPTIONS = [
26
+ ...DEEPLINE_GTM_STARTER_PROMPTS.map(({ prompt }) => prompt),
27
+ DEEPLINE_GTM_CUSTOM_OPTION
28
+ ];
22
29
  function deeplineGtmGettingStartedPayload() {
23
30
  return {
24
31
  skill: DEEPLINE_GTM_SKILL,
25
32
  examples: DEEPLINE_GTM_STARTER_PROMPTS,
26
33
  question: DEEPLINE_GTM_HANDOFF_QUESTION,
34
+ customOption: DEEPLINE_GTM_CUSTOM_OPTION,
27
35
  customProblemBehavior: "Turn the business problem into one exact /deepline-gtm prompt, show that reusable prompt, then execute it without asking the user to paste it again."
28
36
  };
29
37
  }
30
38
  export {
39
+ DEEPLINE_GTM_CUSTOM_OPTION,
31
40
  DEEPLINE_GTM_HANDOFF_QUESTION,
32
41
  DEEPLINE_GTM_PRIMARY_STARTER_PROMPT,
33
42
  DEEPLINE_GTM_SKILL,
43
+ DEEPLINE_GTM_STARTER_OPTIONS,
34
44
  DEEPLINE_GTM_STARTER_PROMPTS,
35
45
  deeplineGtmGettingStartedPayload
36
46
  };
package/dist/cli/index.js CHANGED
@@ -3512,7 +3512,7 @@ var SDK_RELEASE = {
3512
3512
  // getters keep their established compatibility behavior.
3513
3513
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
3514
3514
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
3515
- version: "0.3.270",
3515
+ version: "0.3.271",
3516
3516
  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.",
3517
3517
  packageCapabilities: {
3518
3518
  updatePreferences: 1
@@ -42374,10 +42374,11 @@ function parseSessionAgent(value) {
42374
42374
  function parseSessionRating(value) {
42375
42375
  if (value === void 0) return void 0;
42376
42376
  const normalized = value.trim().toLowerCase();
42377
+ if (normalized === "poor") return "bad";
42377
42378
  if (normalized === "good" || normalized === "bad" || normalized === "neutral") {
42378
42379
  return normalized;
42379
42380
  }
42380
- throw new Error("Invalid --rating value. Expected good, bad, or neutral.");
42381
+ throw new Error("Invalid --rating value. Expected good, poor, or neutral.");
42381
42382
  }
42382
42383
  function findSessionFile(sessionId, agent) {
42383
42384
  if (!UUID_RE.test(sessionId)) {
@@ -42877,7 +42878,7 @@ Examples:
42877
42878
  deepline ${familyName} send --current-session --json
42878
42879
  deepline ${familyName} send --agent codex --current-session --json
42879
42880
  deepline ${familyName} send --session-id 5a3bfb97-a2d9-49d9-82c6-52ccc03dadca --label "pilot run"
42880
- deepline ${familyName} send --current-session --rating bad --json # tag the session as one that went badly
42881
+ deepline ${familyName} send --current-session --rating poor --json # tag the session as one that went poorly
42881
42882
  deepline ${familyName} send --file ./debug.log --json
42882
42883
  `
42883
42884
  ).option(
@@ -42895,8 +42896,8 @@ Examples:
42895
42896
  "Limit transcript discovery to one agent runtime",
42896
42897
  "auto"
42897
42898
  ).option("--current-session", "Use the newest local agent session JSONL").option("--file <path>", "Upload a raw local file instead of a session").option(
42898
- "--rating <good|bad|neutral>",
42899
- "Tag the upload by outcome, not tone, so Deepline can filter sessions: good = the user's goal was met without product problems; bad = the goal was missed, or a product failure, bug, or avoidable friction (including a substantial workaround) got in the way; neutral = partly met or unclear."
42899
+ "--rating <good|poor|neutral>",
42900
+ "Tag the upload by outcome, not tone, so Deepline can filter sessions: good = the user's goal was met without product problems; poor = the goal was missed, or a product failure, bug, or avoidable friction (including a substantial workaround) got in the way; neutral = partly met or unclear."
42900
42901
  ).option("--json", "Emit JSON output. Also automatic when stdout is piped").action(handleSessionsSend);
42901
42902
  parent.command("render").description("Render local session transcript(s) to an HTML viewer.").addHelpText(
42902
42903
  "after",
@@ -47803,18 +47804,26 @@ var DEEPLINE_GTM_STARTER_PROMPTS = [
47803
47804
  prompt: "/deepline-gtm Find 10 CTOs at B2B SaaS companies and enrich them with email addresses."
47804
47805
  },
47805
47806
  {
47807
+ // Historical ID retained for SDK payload compatibility; the current
47808
+ // starter copy is the fintech hiring-and-growth workflow below.
47806
47809
  id: "decision-maker-discovery",
47807
- title: "Decision-maker discovery",
47808
- prompt: "/deepline-gtm Find the best people to contact at these companies and verify their email addresses."
47810
+ title: "Fintech hiring and growth",
47811
+ prompt: "/deepline-gtm Find five fintech companies with live SDR openings and six-month headcount growth. Show dated evidence for both."
47809
47812
  }
47810
47813
  ];
47811
47814
  var DEEPLINE_GTM_PRIMARY_STARTER_PROMPT = DEEPLINE_GTM_STARTER_PROMPTS[0].prompt;
47812
- var DEEPLINE_GTM_HANDOFF_QUESTION = "Would you like to try one of these examples, or tell me your own business problem?";
47815
+ var DEEPLINE_GTM_HANDOFF_QUESTION = "What would you like to do with Deepline?";
47816
+ var DEEPLINE_GTM_CUSTOM_OPTION = "Tell me what you want to accomplish and I'll help you build it";
47817
+ var DEEPLINE_GTM_STARTER_OPTIONS = [
47818
+ ...DEEPLINE_GTM_STARTER_PROMPTS.map(({ prompt }) => prompt),
47819
+ DEEPLINE_GTM_CUSTOM_OPTION
47820
+ ];
47813
47821
  function deeplineGtmGettingStartedPayload() {
47814
47822
  return {
47815
47823
  skill: DEEPLINE_GTM_SKILL,
47816
47824
  examples: DEEPLINE_GTM_STARTER_PROMPTS,
47817
47825
  question: DEEPLINE_GTM_HANDOFF_QUESTION,
47826
+ customOption: DEEPLINE_GTM_CUSTOM_OPTION,
47818
47827
  customProblemBehavior: "Turn the business problem into one exact /deepline-gtm prompt, show that reusable prompt, then execute it without asking the user to paste it again."
47819
47828
  };
47820
47829
  }
@@ -51342,10 +51351,11 @@ async function runSetupCommand(options) {
51342
51351
  workspaceName ? `Deepline is installed and connected to ${workspaceName}.` : "Deepline is installed and connected.",
51343
51352
  ...workspaceName ? ["To link a different workspace, run: deepline auth register"] : [],
51344
51353
  `Use ${DEEPLINE_GTM_SKILL} in your agent.`,
51354
+ gettingStarted.question,
51345
51355
  ...DEEPLINE_GTM_STARTER_PROMPTS.map(
51346
51356
  (example, index) => `${index + 1}. ${example.title}: ${example.prompt}`
51347
51357
  ),
51348
- gettingStarted.question
51358
+ `4. ${gettingStarted.customOption}`
51349
51359
  ]
51350
51360
  }
51351
51361
  ]
@@ -3507,7 +3507,7 @@ var SDK_RELEASE = {
3507
3507
  // getters keep their established compatibility behavior.
3508
3508
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
3509
3509
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
3510
- version: "0.3.270",
3510
+ version: "0.3.271",
3511
3511
  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.",
3512
3512
  packageCapabilities: {
3513
3513
  updatePreferences: 1
@@ -42455,10 +42455,11 @@ function parseSessionAgent(value) {
42455
42455
  function parseSessionRating(value) {
42456
42456
  if (value === void 0) return void 0;
42457
42457
  const normalized = value.trim().toLowerCase();
42458
+ if (normalized === "poor") return "bad";
42458
42459
  if (normalized === "good" || normalized === "bad" || normalized === "neutral") {
42459
42460
  return normalized;
42460
42461
  }
42461
- throw new Error("Invalid --rating value. Expected good, bad, or neutral.");
42462
+ throw new Error("Invalid --rating value. Expected good, poor, or neutral.");
42462
42463
  }
42463
42464
  function findSessionFile(sessionId, agent) {
42464
42465
  if (!UUID_RE.test(sessionId)) {
@@ -42958,7 +42959,7 @@ Examples:
42958
42959
  deepline ${familyName} send --current-session --json
42959
42960
  deepline ${familyName} send --agent codex --current-session --json
42960
42961
  deepline ${familyName} send --session-id 5a3bfb97-a2d9-49d9-82c6-52ccc03dadca --label "pilot run"
42961
- deepline ${familyName} send --current-session --rating bad --json # tag the session as one that went badly
42962
+ deepline ${familyName} send --current-session --rating poor --json # tag the session as one that went poorly
42962
42963
  deepline ${familyName} send --file ./debug.log --json
42963
42964
  `
42964
42965
  ).option(
@@ -42976,8 +42977,8 @@ Examples:
42976
42977
  "Limit transcript discovery to one agent runtime",
42977
42978
  "auto"
42978
42979
  ).option("--current-session", "Use the newest local agent session JSONL").option("--file <path>", "Upload a raw local file instead of a session").option(
42979
- "--rating <good|bad|neutral>",
42980
- "Tag the upload by outcome, not tone, so Deepline can filter sessions: good = the user's goal was met without product problems; bad = the goal was missed, or a product failure, bug, or avoidable friction (including a substantial workaround) got in the way; neutral = partly met or unclear."
42980
+ "--rating <good|poor|neutral>",
42981
+ "Tag the upload by outcome, not tone, so Deepline can filter sessions: good = the user's goal was met without product problems; poor = the goal was missed, or a product failure, bug, or avoidable friction (including a substantial workaround) got in the way; neutral = partly met or unclear."
42981
42982
  ).option("--json", "Emit JSON output. Also automatic when stdout is piped").action(handleSessionsSend);
42982
42983
  parent.command("render").description("Render local session transcript(s) to an HTML viewer.").addHelpText(
42983
42984
  "after",
@@ -47890,18 +47891,26 @@ var DEEPLINE_GTM_STARTER_PROMPTS = [
47890
47891
  prompt: "/deepline-gtm Find 10 CTOs at B2B SaaS companies and enrich them with email addresses."
47891
47892
  },
47892
47893
  {
47894
+ // Historical ID retained for SDK payload compatibility; the current
47895
+ // starter copy is the fintech hiring-and-growth workflow below.
47893
47896
  id: "decision-maker-discovery",
47894
- title: "Decision-maker discovery",
47895
- prompt: "/deepline-gtm Find the best people to contact at these companies and verify their email addresses."
47897
+ title: "Fintech hiring and growth",
47898
+ prompt: "/deepline-gtm Find five fintech companies with live SDR openings and six-month headcount growth. Show dated evidence for both."
47896
47899
  }
47897
47900
  ];
47898
47901
  var DEEPLINE_GTM_PRIMARY_STARTER_PROMPT = DEEPLINE_GTM_STARTER_PROMPTS[0].prompt;
47899
- var DEEPLINE_GTM_HANDOFF_QUESTION = "Would you like to try one of these examples, or tell me your own business problem?";
47902
+ var DEEPLINE_GTM_HANDOFF_QUESTION = "What would you like to do with Deepline?";
47903
+ var DEEPLINE_GTM_CUSTOM_OPTION = "Tell me what you want to accomplish and I'll help you build it";
47904
+ var DEEPLINE_GTM_STARTER_OPTIONS = [
47905
+ ...DEEPLINE_GTM_STARTER_PROMPTS.map(({ prompt }) => prompt),
47906
+ DEEPLINE_GTM_CUSTOM_OPTION
47907
+ ];
47900
47908
  function deeplineGtmGettingStartedPayload() {
47901
47909
  return {
47902
47910
  skill: DEEPLINE_GTM_SKILL,
47903
47911
  examples: DEEPLINE_GTM_STARTER_PROMPTS,
47904
47912
  question: DEEPLINE_GTM_HANDOFF_QUESTION,
47913
+ customOption: DEEPLINE_GTM_CUSTOM_OPTION,
47905
47914
  customProblemBehavior: "Turn the business problem into one exact /deepline-gtm prompt, show that reusable prompt, then execute it without asking the user to paste it again."
47906
47915
  };
47907
47916
  }
@@ -51452,10 +51461,11 @@ async function runSetupCommand(options) {
51452
51461
  workspaceName ? `Deepline is installed and connected to ${workspaceName}.` : "Deepline is installed and connected.",
51453
51462
  ...workspaceName ? ["To link a different workspace, run: deepline auth register"] : [],
51454
51463
  `Use ${DEEPLINE_GTM_SKILL} in your agent.`,
51464
+ gettingStarted.question,
51455
51465
  ...DEEPLINE_GTM_STARTER_PROMPTS.map(
51456
51466
  (example, index) => `${index + 1}. ${example.title}: ${example.prompt}`
51457
51467
  ),
51458
- gettingStarted.question
51468
+ `4. ${gettingStarted.customOption}`
51459
51469
  ]
51460
51470
  }
51461
51471
  ]
package/dist/index.js CHANGED
@@ -1325,7 +1325,7 @@ var SDK_RELEASE = {
1325
1325
  // getters keep their established compatibility behavior.
1326
1326
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
1327
1327
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
1328
- version: "0.3.270",
1328
+ version: "0.3.271",
1329
1329
  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.",
1330
1330
  packageCapabilities: {
1331
1331
  updatePreferences: 1
package/dist/index.mjs CHANGED
@@ -1229,7 +1229,7 @@ var SDK_RELEASE = {
1229
1229
  // getters keep their established compatibility behavior.
1230
1230
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
1231
1231
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
1232
- version: "0.3.270",
1232
+ version: "0.3.271",
1233
1233
  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.",
1234
1234
  packageCapabilities: {
1235
1235
  updatePreferences: 1
@@ -149,7 +149,7 @@ type SdkRelease = {
149
149
  supportPolicy: SdkSupportPolicy;
150
150
  };
151
151
  declare const SDK_RELEASE: {
152
- readonly version: "0.3.270";
152
+ readonly version: "0.3.271";
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.270";
152
+ readonly version: "0.3.271";
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.270",
77
+ version: "0.3.271",
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.270",
51
+ version: "0.3.271",
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.270",
3
+ "version": "0.3.271",
4
4
  "description": "GTM data CLI and TypeScript SDK for coding agents",
5
5
  "license": "MIT",
6
6
  "homepage": "https://code.deepline.com",