deepline 0.3.12 → 0.3.13

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.
@@ -52,6 +52,11 @@ const SOURCE_EXTENSIONS = [
52
52
  '.cjs',
53
53
  '.json',
54
54
  ];
55
+ const TEXT_IMPORT_EXTENSIONS = new Set(['.md', '.txt']);
56
+
57
+ function isTextImportFile(filePath: string): boolean {
58
+ return TEXT_IMPORT_EXTENSIONS.has(extname(filePath));
59
+ }
55
60
 
56
61
  function sha256(buffer: Buffer): string {
57
62
  return createHash('sha256').update(buffer).digest('hex');
@@ -349,6 +354,12 @@ export async function discoverPackagedLocalFiles(
349
354
  visitedFiles.add(absolutePath);
350
355
 
351
356
  const sourceCode = await readFile(absolutePath, 'utf-8');
357
+ if (
358
+ extname(absolutePath).toLowerCase() === '.json' ||
359
+ isTextImportFile(absolutePath)
360
+ ) {
361
+ return;
362
+ }
352
363
  const scanSource = stripCommentsToSpaces(sourceCode);
353
364
  const constants = collectTopLevelStringConstants(sourceCode);
354
365
  const childVisits: Promise<void>[] = [];
@@ -192,7 +192,7 @@ export const SDK_RELEASE = {
192
192
  // 0.3.0 introduces raw-v2: complete scrubbed provider responses are
193
193
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
194
194
  // getters keep their established compatibility behavior.
195
- version: '0.3.12',
195
+ version: '0.3.13',
196
196
  updateSummary:
197
197
  'New raw-v2 tool responses preserve complete scrubbed provider envelopes at toolResponse.rawV2, including JSON:API included resources, links, cursors, and totals. Existing toolResponse.raw and declared getters keep working unchanged.',
198
198
  contracts: {
@@ -964,6 +964,10 @@ export interface PlayRevisionSummary {
964
964
  createdAt?: number;
965
965
  /** Unix timestamp (ms) of last update. */
966
966
  updatedAt?: number;
967
+ /** True when this is the revision currently serving live triggers. */
968
+ isLive?: boolean;
969
+ /** True when this is the newest saved working revision. */
970
+ isWorking?: boolean;
967
971
  }
968
972
 
969
973
  /**
@@ -14,7 +14,13 @@ import {
14
14
  } from 'node:path';
15
15
  import { builtinModules } from 'node:module';
16
16
  import { Parser } from 'acorn';
17
- import { build, transformSync, type Message, type Plugin } from 'esbuild';
17
+ import {
18
+ build,
19
+ transformSync,
20
+ type Loader,
21
+ type Message,
22
+ type Plugin,
23
+ } from 'esbuild';
18
24
  import {
19
25
  PLAY_ARTIFACT_KINDS,
20
26
  type PlayArtifactKind,
@@ -78,6 +84,7 @@ const SOURCE_EXTENSIONS = [
78
84
  '.json',
79
85
  ];
80
86
  const PLAY_SOURCE_FILE_PATTERN = /\.play\.(?:[cm]?[jt]sx?)$/i;
87
+ const TEXT_IMPORT_EXTENSIONS = new Set(['.md', '.txt']);
81
88
  const NODE_BUILTIN_SET = new Set(
82
89
  builtinModules.flatMap((name) =>
83
90
  name.startsWith('node:') ? [name, name.slice(5)] : [name, `node:${name}`],
@@ -1370,8 +1377,14 @@ function localSdkAliasPlugin(adapter: PlayBundlingAdapter): Plugin | null {
1370
1377
  };
1371
1378
  }
1372
1379
 
1373
- function sourceLoaderForPath(path: string): 'ts' | 'tsx' | 'js' | 'jsx' {
1374
- const extension = extname(path).toLowerCase();
1380
+ function isTextImportFile(path: string): boolean {
1381
+ return TEXT_IMPORT_EXTENSIONS.has(extname(path));
1382
+ }
1383
+
1384
+ function sourceLoaderForPath(path: string): Loader {
1385
+ const rawExtension = extname(path);
1386
+ if (TEXT_IMPORT_EXTENSIONS.has(rawExtension)) return 'text';
1387
+ const extension = rawExtension.toLowerCase();
1375
1388
  if (extension === '.tsx') return 'tsx';
1376
1389
  if (extension === '.jsx') return 'jsx';
1377
1390
  if (extension === '.js' || extension === '.mjs' || extension === '.cjs') {
@@ -1700,6 +1713,13 @@ function docflowRuntimeInstrumentationPlugin(
1700
1713
  setup(buildContext) {
1701
1714
  buildContext.onLoad({ filter: /./ }, (args) => {
1702
1715
  if (!customerSourceFiles.has(resolve(args.path))) return undefined;
1716
+ if (isTextImportFile(args.path)) {
1717
+ return {
1718
+ contents: readFileSync(args.path, 'utf8'),
1719
+ loader: 'text',
1720
+ resolveDir: dirname(args.path),
1721
+ };
1722
+ }
1703
1723
  return {
1704
1724
  contents: instrumentPlayDocflowRuntimeHits(
1705
1725
  readFileSync(args.path, 'utf8'),
@@ -1896,7 +1916,10 @@ async function analyzeSourceGraph(
1896
1916
  );
1897
1917
  localFiles.set(absolutePath, sourceCode);
1898
1918
 
1899
- if (extname(absolutePath).toLowerCase() === '.json') {
1919
+ if (
1920
+ extname(absolutePath).toLowerCase() === '.json' ||
1921
+ isTextImportFile(absolutePath)
1922
+ ) {
1900
1923
  return;
1901
1924
  }
1902
1925
 
@@ -1 +1,2 @@
1
1
  #!/usr/bin/env node
2
+ /// <reference path="./text-imports.d.ts" />
@@ -1 +1,2 @@
1
1
  #!/usr/bin/env node
2
+ /// <reference path="./text-imports.d.ts" />
package/dist/cli/index.js CHANGED
@@ -1047,7 +1047,7 @@ var SDK_RELEASE = {
1047
1047
  // 0.3.0 introduces raw-v2: complete scrubbed provider responses are
1048
1048
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
1049
1049
  // getters keep their established compatibility behavior.
1050
- version: "0.3.12",
1050
+ version: "0.3.13",
1051
1051
  updateSummary: "New raw-v2 tool responses preserve complete scrubbed provider envelopes at toolResponse.rawV2, including JSON:API included resources, links, cursors, and totals. Existing toolResponse.raw and declared getters keep working unchanged.",
1052
1052
  contracts: {
1053
1053
  api: {
@@ -18557,11 +18557,13 @@ async function writePlayRunIdFile(destination, runId) {
18557
18557
  handle = null;
18558
18558
  try {
18559
18559
  await (0, import_promises6.link)(tempPath, destination);
18560
- const directory = await (0, import_promises6.open)((0, import_node_path14.dirname)(destination), "r");
18561
- try {
18562
- await directory.sync();
18563
- } finally {
18564
- await directory.close();
18560
+ if (process.platform !== "win32") {
18561
+ const directory = await (0, import_promises6.open)((0, import_node_path14.dirname)(destination), "r");
18562
+ try {
18563
+ await directory.sync();
18564
+ } finally {
18565
+ await directory.close();
18566
+ }
18565
18567
  }
18566
18568
  } catch (error) {
18567
18569
  if (error.code !== "EEXIST") throw error;
@@ -24425,7 +24427,11 @@ async function handlePlayGet(args) {
24425
24427
  }
24426
24428
  function formatVersionLine(version) {
24427
24429
  const revisionLabel = version.artifactHash?.slice(0, 12) ?? "unknown-revision";
24428
- return `v${version.version} ${revisionLabel} ${formatTimestamp(version.createdAt)}`;
24430
+ const state = [
24431
+ version.isLive ? "live" : null,
24432
+ version.isWorking ? "working" : null
24433
+ ].filter(Boolean).join(", ");
24434
+ return `v${version.version} ${revisionLabel} ${formatTimestamp(version.createdAt)}${state ? ` (${state})` : ""}`;
24429
24435
  }
24430
24436
  async function handlePlayVersions(args) {
24431
24437
  const nameIndex = args.indexOf("--name");
@@ -1033,7 +1033,7 @@ var SDK_RELEASE = {
1033
1033
  // 0.3.0 introduces raw-v2: complete scrubbed provider responses are
1034
1034
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
1035
1035
  // getters keep their established compatibility behavior.
1036
- version: "0.3.12",
1036
+ version: "0.3.13",
1037
1037
  updateSummary: "New raw-v2 tool responses preserve complete scrubbed provider envelopes at toolResponse.rawV2, including JSON:API included resources, links, cursors, and totals. Existing toolResponse.raw and declared getters keep working unchanged.",
1038
1038
  contracts: {
1039
1039
  api: {
@@ -12893,7 +12893,10 @@ import {
12893
12893
  } from "path";
12894
12894
  import { builtinModules } from "module";
12895
12895
  import { Parser as Parser2 } from "acorn";
12896
- import { build, transformSync } from "esbuild";
12896
+ import {
12897
+ build,
12898
+ transformSync
12899
+ } from "esbuild";
12897
12900
 
12898
12901
  // ../node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
12899
12902
  var value_exports = {};
@@ -18617,11 +18620,13 @@ async function writePlayRunIdFile(destination, runId) {
18617
18620
  handle = null;
18618
18621
  try {
18619
18622
  await link(tempPath, destination);
18620
- const directory = await open(dirname9(destination), "r");
18621
- try {
18622
- await directory.sync();
18623
- } finally {
18624
- await directory.close();
18623
+ if (process.platform !== "win32") {
18624
+ const directory = await open(dirname9(destination), "r");
18625
+ try {
18626
+ await directory.sync();
18627
+ } finally {
18628
+ await directory.close();
18629
+ }
18625
18630
  }
18626
18631
  } catch (error) {
18627
18632
  if (error.code !== "EEXIST") throw error;
@@ -24485,7 +24490,11 @@ async function handlePlayGet(args) {
24485
24490
  }
24486
24491
  function formatVersionLine(version) {
24487
24492
  const revisionLabel = version.artifactHash?.slice(0, 12) ?? "unknown-revision";
24488
- return `v${version.version} ${revisionLabel} ${formatTimestamp(version.createdAt)}`;
24493
+ const state = [
24494
+ version.isLive ? "live" : null,
24495
+ version.isWorking ? "working" : null
24496
+ ].filter(Boolean).join(", ");
24497
+ return `v${version.version} ${revisionLabel} ${formatTimestamp(version.createdAt)}${state ? ` (${state})` : ""}`;
24489
24498
  }
24490
24499
  async function handlePlayVersions(args) {
24491
24500
  const nameIndex = args.indexOf("--name");
@@ -0,0 +1,9 @@
1
+ declare module '*.md' {
2
+ const content: string;
3
+ export default content;
4
+ }
5
+
6
+ declare module '*.txt' {
7
+ const content: string;
8
+ export default content;
9
+ }
@@ -1,3 +1,4 @@
1
+ /// <reference path="./text-imports.d.ts" />
1
2
  import * as _sinclair_typebox from '@sinclair/typebox';
2
3
  import { Static } from '@sinclair/typebox';
3
4
 
@@ -1,3 +1,4 @@
1
+ /// <reference path="./text-imports.d.ts" />
1
2
  import * as _sinclair_typebox from '@sinclair/typebox';
2
3
  import { Static } from '@sinclair/typebox';
3
4
 
@@ -1,3 +1,4 @@
1
+ /// <reference path="./text-imports.d.ts" />
1
2
  /**
2
3
  * GTM normalization primitives used by generated plays and user-authored
3
4
  * prospecting notebooks.
package/dist/helpers.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /// <reference path="./text-imports.d.ts" />
1
2
  /**
2
3
  * GTM normalization primitives used by generated plays and user-authored
3
4
  * prospecting notebooks.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,6 @@
1
- import { e as PlayRuntimeBackendId, c as PlayCompilerManifest, D as DeeplineError, f as ToolExecutionError, g as ToolExecutionErrorOptions, h as PlayAuthoringColumnMap, i as PlayAuthoringColumnResolver, j as PlayAuthoringRuntimeContext, k as PlayAuthoringConditionalStepResolver, l as PlayAuthoringCsvInput, m as PlayAuthoringCsvOptions, n as PlayAuthoringDatasetBuilder, o as PlayAuthoringDatasetColumnDefinition, p as PlayAuthoringDatasetColumnRunInput, q as ToolExecuteResult, r as PlayAuthoringReferenceLike, s as PlayReturnObject$1, t as PlayAuthoringDefineConfig, u as PlayAuthoringDefinedPlay, v as PlayAuthoringFetchOptions, w as PlayAuthoringFileInput, x as PlayAuthoringBindings, y as PlayAuthoringCallExecution, z as PlayAuthoringCallOptions, A as PlayAuthoringFetchResponse, B as PlayAuthoringInputContract, C as PlayAuthoringStepProgramStep, E as PlayAuthoringRuntimeStepOptions, F as PlaySqlListenerDeclaration, G as PlaySqlListenerEvent, H as PlaySqlListenerOperation, I as PlaySqlQuery, J as PlayAuthoringStepOptions, K as PlayAuthoringStepProgram, L as PlayAuthoringStepProgramResolver, M as PlayAuthoringStepResolver, N as PlayToolExecutionRequest, O as PlayAuthoringStepProgramOptions } from './compiler-manifest-Bth3lcZ_.mjs';
2
- export { Q as DEEPLINE_EXTRACTOR_TARGETS, R as DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS, S as DeeplineEmailStatusGetterValue, U as DeeplineExtractorTarget, V as DeeplineGetterValue, W as DeeplineGetterValueMap, X as JOB_CHANGE_STATUS_VALUES, Y as JobChangeStatus, Z as PHONE_STATUS_VALUES, _ as PhoneStatus, $ as PlayDataset, a0 as PlayDatasetInput, a1 as PreviousCell, a2 as ProviderTransientError, a3 as ProviderTransientErrorCategory, a4 as ProviderUnavailableError, a5 as ProviderUnavailableReason, a6 as ToolExecutionErrorCategory, a7 as ToolExecutionErrorOrigin, a8 as ToolExecutionFailureV1, a9 as ToolExecutionNetworkKind, aa as ToolExecutionNetworkScope, ab as getProviderUnavailableReason, ac as isDeeplineExtractorTarget, ad as isProviderUnavailable, ae as isProviderWaterfallUnavailableError } from './compiler-manifest-Bth3lcZ_.mjs';
1
+ /// <reference path="./text-imports.d.ts" />
2
+ import { e as PlayRuntimeBackendId, c as PlayCompilerManifest, D as DeeplineError, f as ToolExecutionError, g as ToolExecutionErrorOptions, h as PlayAuthoringColumnMap, i as PlayAuthoringColumnResolver, j as PlayAuthoringRuntimeContext, k as PlayAuthoringConditionalStepResolver, l as PlayAuthoringCsvInput, m as PlayAuthoringCsvOptions, n as PlayAuthoringDatasetBuilder, o as PlayAuthoringDatasetColumnDefinition, p as PlayAuthoringDatasetColumnRunInput, q as ToolExecuteResult, r as PlayAuthoringReferenceLike, s as PlayReturnObject$1, t as PlayAuthoringDefineConfig, u as PlayAuthoringDefinedPlay, v as PlayAuthoringFetchOptions, w as PlayAuthoringFileInput, x as PlayAuthoringBindings, y as PlayAuthoringCallExecution, z as PlayAuthoringCallOptions, A as PlayAuthoringFetchResponse, B as PlayAuthoringInputContract, C as PlayAuthoringStepProgramStep, E as PlayAuthoringRuntimeStepOptions, F as PlaySqlListenerDeclaration, G as PlaySqlListenerEvent, H as PlaySqlListenerOperation, I as PlaySqlQuery, J as PlayAuthoringStepOptions, K as PlayAuthoringStepProgram, L as PlayAuthoringStepProgramResolver, M as PlayAuthoringStepResolver, N as PlayToolExecutionRequest, O as PlayAuthoringStepProgramOptions } from './compiler-manifest-Bd0O94yZ.mjs';
3
+ export { Q as DEEPLINE_EXTRACTOR_TARGETS, R as DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS, S as DeeplineEmailStatusGetterValue, U as DeeplineExtractorTarget, V as DeeplineGetterValue, W as DeeplineGetterValueMap, X as JOB_CHANGE_STATUS_VALUES, Y as JobChangeStatus, Z as PHONE_STATUS_VALUES, _ as PhoneStatus, $ as PlayDataset, a0 as PlayDatasetInput, a1 as PreviousCell, a2 as ProviderTransientError, a3 as ProviderTransientErrorCategory, a4 as ProviderUnavailableError, a5 as ProviderUnavailableReason, a6 as ToolExecutionErrorCategory, a7 as ToolExecutionErrorOrigin, a8 as ToolExecutionFailureV1, a9 as ToolExecutionNetworkKind, aa as ToolExecutionNetworkScope, ab as getProviderUnavailableReason, ac as isDeeplineExtractorTarget, ad as isProviderUnavailable, ae as isProviderWaterfallUnavailableError } from './compiler-manifest-Bd0O94yZ.mjs';
3
4
  import '@sinclair/typebox';
4
5
 
5
6
  declare const FIXTURE_BEHAVIOR_VERSION: 1;
@@ -1066,6 +1067,10 @@ interface PlayRevisionSummary {
1066
1067
  createdAt?: number;
1067
1068
  /** Unix timestamp (ms) of last update. */
1068
1069
  updatedAt?: number;
1070
+ /** True when this is the revision currently serving live triggers. */
1071
+ isLive?: boolean;
1072
+ /** True when this is the newest saved working revision. */
1073
+ isWorking?: boolean;
1069
1074
  }
1070
1075
  /**
1071
1076
  * Aggregate row-processing stats for a play's sheet.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { e as PlayRuntimeBackendId, c as PlayCompilerManifest, D as DeeplineError, f as ToolExecutionError, g as ToolExecutionErrorOptions, h as PlayAuthoringColumnMap, i as PlayAuthoringColumnResolver, j as PlayAuthoringRuntimeContext, k as PlayAuthoringConditionalStepResolver, l as PlayAuthoringCsvInput, m as PlayAuthoringCsvOptions, n as PlayAuthoringDatasetBuilder, o as PlayAuthoringDatasetColumnDefinition, p as PlayAuthoringDatasetColumnRunInput, q as ToolExecuteResult, r as PlayAuthoringReferenceLike, s as PlayReturnObject$1, t as PlayAuthoringDefineConfig, u as PlayAuthoringDefinedPlay, v as PlayAuthoringFetchOptions, w as PlayAuthoringFileInput, x as PlayAuthoringBindings, y as PlayAuthoringCallExecution, z as PlayAuthoringCallOptions, A as PlayAuthoringFetchResponse, B as PlayAuthoringInputContract, C as PlayAuthoringStepProgramStep, E as PlayAuthoringRuntimeStepOptions, F as PlaySqlListenerDeclaration, G as PlaySqlListenerEvent, H as PlaySqlListenerOperation, I as PlaySqlQuery, J as PlayAuthoringStepOptions, K as PlayAuthoringStepProgram, L as PlayAuthoringStepProgramResolver, M as PlayAuthoringStepResolver, N as PlayToolExecutionRequest, O as PlayAuthoringStepProgramOptions } from './compiler-manifest-Bth3lcZ_.js';
2
- export { Q as DEEPLINE_EXTRACTOR_TARGETS, R as DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS, S as DeeplineEmailStatusGetterValue, U as DeeplineExtractorTarget, V as DeeplineGetterValue, W as DeeplineGetterValueMap, X as JOB_CHANGE_STATUS_VALUES, Y as JobChangeStatus, Z as PHONE_STATUS_VALUES, _ as PhoneStatus, $ as PlayDataset, a0 as PlayDatasetInput, a1 as PreviousCell, a2 as ProviderTransientError, a3 as ProviderTransientErrorCategory, a4 as ProviderUnavailableError, a5 as ProviderUnavailableReason, a6 as ToolExecutionErrorCategory, a7 as ToolExecutionErrorOrigin, a8 as ToolExecutionFailureV1, a9 as ToolExecutionNetworkKind, aa as ToolExecutionNetworkScope, ab as getProviderUnavailableReason, ac as isDeeplineExtractorTarget, ad as isProviderUnavailable, ae as isProviderWaterfallUnavailableError } from './compiler-manifest-Bth3lcZ_.js';
1
+ /// <reference path="./text-imports.d.ts" />
2
+ import { e as PlayRuntimeBackendId, c as PlayCompilerManifest, D as DeeplineError, f as ToolExecutionError, g as ToolExecutionErrorOptions, h as PlayAuthoringColumnMap, i as PlayAuthoringColumnResolver, j as PlayAuthoringRuntimeContext, k as PlayAuthoringConditionalStepResolver, l as PlayAuthoringCsvInput, m as PlayAuthoringCsvOptions, n as PlayAuthoringDatasetBuilder, o as PlayAuthoringDatasetColumnDefinition, p as PlayAuthoringDatasetColumnRunInput, q as ToolExecuteResult, r as PlayAuthoringReferenceLike, s as PlayReturnObject$1, t as PlayAuthoringDefineConfig, u as PlayAuthoringDefinedPlay, v as PlayAuthoringFetchOptions, w as PlayAuthoringFileInput, x as PlayAuthoringBindings, y as PlayAuthoringCallExecution, z as PlayAuthoringCallOptions, A as PlayAuthoringFetchResponse, B as PlayAuthoringInputContract, C as PlayAuthoringStepProgramStep, E as PlayAuthoringRuntimeStepOptions, F as PlaySqlListenerDeclaration, G as PlaySqlListenerEvent, H as PlaySqlListenerOperation, I as PlaySqlQuery, J as PlayAuthoringStepOptions, K as PlayAuthoringStepProgram, L as PlayAuthoringStepProgramResolver, M as PlayAuthoringStepResolver, N as PlayToolExecutionRequest, O as PlayAuthoringStepProgramOptions } from './compiler-manifest-Bd0O94yZ.js';
3
+ export { Q as DEEPLINE_EXTRACTOR_TARGETS, R as DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS, S as DeeplineEmailStatusGetterValue, U as DeeplineExtractorTarget, V as DeeplineGetterValue, W as DeeplineGetterValueMap, X as JOB_CHANGE_STATUS_VALUES, Y as JobChangeStatus, Z as PHONE_STATUS_VALUES, _ as PhoneStatus, $ as PlayDataset, a0 as PlayDatasetInput, a1 as PreviousCell, a2 as ProviderTransientError, a3 as ProviderTransientErrorCategory, a4 as ProviderUnavailableError, a5 as ProviderUnavailableReason, a6 as ToolExecutionErrorCategory, a7 as ToolExecutionErrorOrigin, a8 as ToolExecutionFailureV1, a9 as ToolExecutionNetworkKind, aa as ToolExecutionNetworkScope, ab as getProviderUnavailableReason, ac as isDeeplineExtractorTarget, ad as isProviderUnavailable, ae as isProviderWaterfallUnavailableError } from './compiler-manifest-Bd0O94yZ.js';
3
4
  import '@sinclair/typebox';
4
5
 
5
6
  declare const FIXTURE_BEHAVIOR_VERSION: 1;
@@ -1066,6 +1067,10 @@ interface PlayRevisionSummary {
1066
1067
  createdAt?: number;
1067
1068
  /** Unix timestamp (ms) of last update. */
1068
1069
  updatedAt?: number;
1070
+ /** True when this is the revision currently serving live triggers. */
1071
+ isLive?: boolean;
1072
+ /** True when this is the newest saved working revision. */
1073
+ isWorking?: boolean;
1069
1074
  }
1070
1075
  /**
1071
1076
  * Aggregate row-processing stats for a play's sheet.
package/dist/index.js CHANGED
@@ -783,7 +783,7 @@ var SDK_RELEASE = {
783
783
  // 0.3.0 introduces raw-v2: complete scrubbed provider responses are
784
784
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
785
785
  // getters keep their established compatibility behavior.
786
- version: "0.3.12",
786
+ version: "0.3.13",
787
787
  updateSummary: "New raw-v2 tool responses preserve complete scrubbed provider envelopes at toolResponse.rawV2, including JSON:API included resources, links, cursors, and totals. Existing toolResponse.raw and declared getters keep working unchanged.",
788
788
  contracts: {
789
789
  api: {
package/dist/index.mjs CHANGED
@@ -706,7 +706,7 @@ var SDK_RELEASE = {
706
706
  // 0.3.0 introduces raw-v2: complete scrubbed provider responses are
707
707
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
708
708
  // getters keep their established compatibility behavior.
709
- version: "0.3.12",
709
+ version: "0.3.13",
710
710
  updateSummary: "New raw-v2 tool responses preserve complete scrubbed provider envelopes at toolResponse.rawV2, including JSON:API included resources, links, cursors, and totals. Existing toolResponse.raw and declared getters keep working unchanged.",
711
711
  contracts: {
712
712
  api: {
@@ -226,8 +226,9 @@
226
226
  "dist/cli/index.d.ts",
227
227
  "dist/cli/index.js",
228
228
  "dist/cli/index.mjs",
229
- "dist/compiler-manifest-Bth3lcZ_.d.mts",
230
- "dist/compiler-manifest-Bth3lcZ_.d.ts",
229
+ "dist/cli/text-imports.d.ts",
230
+ "dist/compiler-manifest-Bd0O94yZ.d.mts",
231
+ "dist/compiler-manifest-Bd0O94yZ.d.ts",
231
232
  "dist/helpers.d.mts",
232
233
  "dist/helpers.d.ts",
233
234
  "dist/helpers.js",
@@ -239,6 +240,8 @@
239
240
  "dist/plays/bundle-play-file.d.mts",
240
241
  "dist/plays/bundle-play-file.d.ts",
241
242
  "dist/plays/bundle-play-file.mjs",
243
+ "dist/plays/text-imports.d.ts",
244
+ "dist/text-imports.d.ts",
242
245
  "dist/viewer/viewer.css",
243
246
  "dist/viewer/viewer.js"
244
247
  ],
@@ -1,5 +1,6 @@
1
- import { T as ToolExecutionErrorSchemaVersion, P as PlayAuthoringContractEdition, a as PlayArtifactKind$1, b as PlaySandboxRuntimeDeclaration, c as PlayCompilerManifest } from '../compiler-manifest-Bth3lcZ_.mjs';
2
- export { d as PLAY_ARTIFACT_KINDS } from '../compiler-manifest-Bth3lcZ_.mjs';
1
+ /// <reference path="./text-imports.d.ts" />
2
+ import { T as ToolExecutionErrorSchemaVersion, P as PlayAuthoringContractEdition, a as PlayArtifactKind$1, b as PlaySandboxRuntimeDeclaration, c as PlayCompilerManifest } from '../compiler-manifest-Bd0O94yZ.mjs';
3
+ export { d as PLAY_ARTIFACT_KINDS } from '../compiler-manifest-Bd0O94yZ.mjs';
3
4
  import '@sinclair/typebox';
4
5
 
5
6
  /**
@@ -1,5 +1,6 @@
1
- import { T as ToolExecutionErrorSchemaVersion, P as PlayAuthoringContractEdition, a as PlayArtifactKind$1, b as PlaySandboxRuntimeDeclaration, c as PlayCompilerManifest } from '../compiler-manifest-Bth3lcZ_.js';
2
- export { d as PLAY_ARTIFACT_KINDS } from '../compiler-manifest-Bth3lcZ_.js';
1
+ /// <reference path="./text-imports.d.ts" />
2
+ import { T as ToolExecutionErrorSchemaVersion, P as PlayAuthoringContractEdition, a as PlayArtifactKind$1, b as PlaySandboxRuntimeDeclaration, c as PlayCompilerManifest } from '../compiler-manifest-Bd0O94yZ.js';
3
+ export { d as PLAY_ARTIFACT_KINDS } from '../compiler-manifest-Bd0O94yZ.js';
3
4
  import '@sinclair/typebox';
4
5
 
5
6
  /**
@@ -28,7 +28,10 @@ import {
28
28
  } from "path";
29
29
  import { builtinModules } from "module";
30
30
  import { Parser as Parser2 } from "acorn";
31
- import { build, transformSync } from "esbuild";
31
+ import {
32
+ build,
33
+ transformSync
34
+ } from "esbuild";
32
35
 
33
36
  // ../shared_libs/play-runtime/backend.ts
34
37
  var PLAY_RUNTIME_BACKENDS = {
@@ -5354,6 +5357,7 @@ var SOURCE_EXTENSIONS = [
5354
5357
  ".json"
5355
5358
  ];
5356
5359
  var PLAY_SOURCE_FILE_PATTERN = /\.play\.(?:[cm]?[jt]sx?)$/i;
5360
+ var TEXT_IMPORT_EXTENSIONS = /* @__PURE__ */ new Set([".md", ".txt"]);
5357
5361
  var NODE_BUILTIN_SET = new Set(
5358
5362
  builtinModules.flatMap(
5359
5363
  (name) => name.startsWith("node:") ? [name, name.slice(5)] : [name, `node:${name}`]
@@ -6067,8 +6071,13 @@ function localSdkAliasPlugin(adapter) {
6067
6071
  }
6068
6072
  };
6069
6073
  }
6074
+ function isTextImportFile(path) {
6075
+ return TEXT_IMPORT_EXTENSIONS.has(extname(path));
6076
+ }
6070
6077
  function sourceLoaderForPath(path) {
6071
- const extension = extname(path).toLowerCase();
6078
+ const rawExtension = extname(path);
6079
+ if (TEXT_IMPORT_EXTENSIONS.has(rawExtension)) return "text";
6080
+ const extension = rawExtension.toLowerCase();
6072
6081
  if (extension === ".tsx") return "tsx";
6073
6082
  if (extension === ".jsx") return "jsx";
6074
6083
  if (extension === ".js" || extension === ".mjs" || extension === ".cjs") {
@@ -6251,6 +6260,13 @@ function docflowRuntimeInstrumentationPlugin(customerSourceFilePaths) {
6251
6260
  setup(buildContext) {
6252
6261
  buildContext.onLoad({ filter: /./ }, (args) => {
6253
6262
  if (!customerSourceFiles.has(resolve(args.path))) return void 0;
6263
+ if (isTextImportFile(args.path)) {
6264
+ return {
6265
+ contents: readFileSync(args.path, "utf8"),
6266
+ loader: "text",
6267
+ resolveDir: dirname(args.path)
6268
+ };
6269
+ }
6254
6270
  return {
6255
6271
  contents: instrumentPlayDocflowRuntimeHits(
6256
6272
  readFileSync(args.path, "utf8")
@@ -6411,7 +6427,7 @@ async function analyzeSourceGraph(entryFile, adapter, exportName) {
6411
6427
  "utf-8"
6412
6428
  );
6413
6429
  localFiles.set(absolutePath, sourceCode2);
6414
- if (extname(absolutePath).toLowerCase() === ".json") {
6430
+ if (extname(absolutePath).toLowerCase() === ".json" || isTextImportFile(absolutePath)) {
6415
6431
  return;
6416
6432
  }
6417
6433
  const handleSpecifier = async (specifier, line, column, kind) => {
@@ -6920,6 +6936,10 @@ var SOURCE_EXTENSIONS2 = [
6920
6936
  ".cjs",
6921
6937
  ".json"
6922
6938
  ];
6939
+ var TEXT_IMPORT_EXTENSIONS2 = /* @__PURE__ */ new Set([".md", ".txt"]);
6940
+ function isTextImportFile2(filePath) {
6941
+ return TEXT_IMPORT_EXTENSIONS2.has(extname2(filePath));
6942
+ }
6923
6943
  function sha2562(buffer) {
6924
6944
  return createHash2("sha256").update(buffer).digest("hex");
6925
6945
  }
@@ -7165,6 +7185,9 @@ async function discoverPackagedLocalFiles(entryFile) {
7165
7185
  }
7166
7186
  visitedFiles.add(absolutePath);
7167
7187
  const sourceCode = await readFile2(absolutePath, "utf-8");
7188
+ if (extname2(absolutePath).toLowerCase() === ".json" || isTextImportFile2(absolutePath)) {
7189
+ return;
7190
+ }
7168
7191
  const scanSource = stripCommentsToSpaces2(sourceCode);
7169
7192
  const constants = collectTopLevelStringConstants(sourceCode);
7170
7193
  const childVisits = [];
@@ -0,0 +1,9 @@
1
+ declare module '*.md' {
2
+ const content: string;
3
+ export default content;
4
+ }
5
+
6
+ declare module '*.txt' {
7
+ const content: string;
8
+ export default content;
9
+ }
@@ -0,0 +1,9 @@
1
+ declare module '*.md' {
2
+ const content: string;
3
+ export default content;
4
+ }
5
+
6
+ declare module '*.txt' {
7
+ const content: string;
8
+ export default content;
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.3.12",
3
+ "version": "0.3.13",
4
4
  "description": "GTM data CLI and TypeScript SDK for coding agents",
5
5
  "license": "MIT",
6
6
  "homepage": "https://code.deepline.com",
@@ -35,11 +35,11 @@
35
35
  },
36
36
  "scripts": {
37
37
  "sync-version": "bun ../scripts/sync-sdk-package-version.ts",
38
- "build": "bun ../scripts/sync-sdk-package-version.ts && tsup && bun ../scripts/write-sdk-install-integrity.ts",
39
- "dev": "bun ../scripts/sync-sdk-package-version.ts && tsup --watch",
38
+ "build": "bun ../scripts/sync-sdk-package-version.ts && tsup && bun ../scripts/finalize-sdk-text-import-types.ts && bun ../scripts/write-sdk-install-integrity.ts",
39
+ "dev": "bun ../scripts/sync-sdk-package-version.ts && bun ../scripts/watch-sdk-build.ts",
40
40
  "typecheck": "tsc --noEmit --declaration false --declarationMap false",
41
- "prepack": "bun ../scripts/sync-sdk-package-version.ts && tsup && bun ../scripts/write-sdk-install-integrity.ts",
42
- "prepublishOnly": "bun ../scripts/sync-sdk-package-version.ts && tsup && bun ../scripts/write-sdk-install-integrity.ts"
41
+ "prepack": "bun ../scripts/sync-sdk-package-version.ts && tsup && bun ../scripts/finalize-sdk-text-import-types.ts && bun ../scripts/write-sdk-install-integrity.ts",
42
+ "prepublishOnly": "bun ../scripts/sync-sdk-package-version.ts && tsup && bun ../scripts/finalize-sdk-text-import-types.ts && bun ../scripts/write-sdk-install-integrity.ts"
43
43
  },
44
44
  "dependencies": {
45
45
  "acorn": "^8.17.0",