deepline 0.3.23 → 0.3.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1385,6 +1385,17 @@ interface PlayCheckResult {
1385
1385
  valid: boolean;
1386
1386
  errors: string[];
1387
1387
  warnings?: string[];
1388
+ /**
1389
+ * Effective sandbox limits selected for this Play when authoring-contract
1390
+ * preflight succeeded. A valid modern check includes the default 30-minute
1391
+ * timeout when the author did not declare `runtime`.
1392
+ */
1393
+ runtimeLimit?: {
1394
+ timeoutSeconds: number;
1395
+ memoryGiB: number;
1396
+ cpu: number;
1397
+ diskGiB: number;
1398
+ } | null;
1388
1399
  staticPipeline?: Record<string, unknown> | null;
1389
1400
  toolGetterHints?: PlayCheckToolGetterHint[];
1390
1401
  /**
@@ -1448,6 +1459,13 @@ interface PlayCheckResult {
1448
1459
  limitBytes: number;
1449
1460
  withinLimit: boolean;
1450
1461
  };
1462
+ /** Present when this Play declares a cron binding. Advisory only; publish reserves capacity. */
1463
+ activeScheduledPlays?: {
1464
+ used: number;
1465
+ limit: number;
1466
+ remaining: number;
1467
+ approachingLimit: boolean;
1468
+ };
1451
1469
  };
1452
1470
  }
1453
1471
  /** An enabled server-side feature flag that affected a Play check. */
package/dist/index.d.ts CHANGED
@@ -1385,6 +1385,17 @@ interface PlayCheckResult {
1385
1385
  valid: boolean;
1386
1386
  errors: string[];
1387
1387
  warnings?: string[];
1388
+ /**
1389
+ * Effective sandbox limits selected for this Play when authoring-contract
1390
+ * preflight succeeded. A valid modern check includes the default 30-minute
1391
+ * timeout when the author did not declare `runtime`.
1392
+ */
1393
+ runtimeLimit?: {
1394
+ timeoutSeconds: number;
1395
+ memoryGiB: number;
1396
+ cpu: number;
1397
+ diskGiB: number;
1398
+ } | null;
1388
1399
  staticPipeline?: Record<string, unknown> | null;
1389
1400
  toolGetterHints?: PlayCheckToolGetterHint[];
1390
1401
  /**
@@ -1448,6 +1459,13 @@ interface PlayCheckResult {
1448
1459
  limitBytes: number;
1449
1460
  withinLimit: boolean;
1450
1461
  };
1462
+ /** Present when this Play declares a cron binding. Advisory only; publish reserves capacity. */
1463
+ activeScheduledPlays?: {
1464
+ used: number;
1465
+ limit: number;
1466
+ remaining: number;
1467
+ approachingLimit: boolean;
1468
+ };
1451
1469
  };
1452
1470
  }
1453
1471
  /** An enabled server-side feature flag that affected a Play check. */
package/dist/index.js CHANGED
@@ -730,11 +730,6 @@ function resolveConfig(options) {
730
730
  };
731
731
  }
732
732
 
733
- // src/http.ts
734
- var import_node_fs2 = require("fs");
735
- var import_node_os3 = require("os");
736
- var import_node_path2 = require("path");
737
-
738
733
  // ../shared_libs/plays/artifact-contract-version.ts
739
734
  var CURRENT_PLAY_ARTIFACT_CONTRACT_VERSION = 2;
740
735
 
@@ -783,7 +778,7 @@ var SDK_RELEASE = {
783
778
  // 0.3.0 introduces raw-v2: complete scrubbed provider responses are
784
779
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
785
780
  // getters keep their established compatibility behavior.
786
- version: "0.3.23",
781
+ version: "0.3.24",
787
782
  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
783
  contracts: {
789
784
  api: {
@@ -972,6 +967,79 @@ function detectAgentRuntime(options = {}) {
972
967
  return options.defaultRuntime ?? "unknown";
973
968
  }
974
969
 
970
+ // src/skills-version.ts
971
+ var import_node_fs2 = require("fs");
972
+ var import_node_path2 = require("path");
973
+ function activePluginSkillsDir() {
974
+ const pluginMode = process.env.DEEPLINE_PLUGIN_MODE?.trim().toLowerCase();
975
+ if (pluginMode !== "true" && pluginMode !== "1" && pluginMode !== "yes" && pluginMode !== "on") {
976
+ return "";
977
+ }
978
+ const dir = process.env.DEEPLINE_PLUGIN_SKILLS_DIR?.trim() ?? "";
979
+ return dir && (0, import_node_fs2.existsSync)(dir) ? dir : "";
980
+ }
981
+ function readPluginSkillsVersion() {
982
+ const dir = activePluginSkillsDir();
983
+ if (!dir) return "";
984
+ try {
985
+ return (0, import_node_fs2.readFileSync)((0, import_node_path2.join)(dir, ".version"), "utf-8").trim();
986
+ } catch {
987
+ return "";
988
+ }
989
+ }
990
+ function sdkSkillsVersionPath(baseUrl, agents = []) {
991
+ const suffix = agents.length > 0 ? `-${agents.join("-")}` : "";
992
+ return (0, import_node_path2.join)(sdkCliStateDirPath(baseUrl), `skills${suffix}-version`);
993
+ }
994
+ function legacySdkSkillsVersionPath(baseUrl) {
995
+ return (0, import_node_path2.join)((0, import_node_path2.dirname)(sdkCliStateDirPath(baseUrl)), "sdk-skills", ".version");
996
+ }
997
+ function resolveAutoSyncSkillAgents() {
998
+ switch (detectAgentRuntime()) {
999
+ case "codex":
1000
+ return ["codex"];
1001
+ case "claude_code":
1002
+ return ["claude-code"];
1003
+ case "cursor":
1004
+ return ["cursor"];
1005
+ case "gemini":
1006
+ return ["gemini-cli"];
1007
+ case "antigravity":
1008
+ return ["antigravity"];
1009
+ default:
1010
+ return [];
1011
+ }
1012
+ }
1013
+ function readSdkSkillsLocalVersion(baseUrl) {
1014
+ const pluginVersion = readPluginSkillsVersion();
1015
+ if (pluginVersion) return pluginVersion;
1016
+ const agents = resolveAutoSyncSkillAgents();
1017
+ const scopedPath = sdkSkillsVersionPath(baseUrl, agents);
1018
+ if (agents.length > 0 && (0, import_node_fs2.existsSync)(scopedPath)) {
1019
+ try {
1020
+ return (0, import_node_fs2.readFileSync)(scopedPath, "utf-8").trim();
1021
+ } catch {
1022
+ return "";
1023
+ }
1024
+ }
1025
+ if (agents.length > 0) {
1026
+ const legacyPath = legacySdkSkillsVersionPath(baseUrl);
1027
+ if (!(0, import_node_fs2.existsSync)(legacyPath)) return "";
1028
+ try {
1029
+ return (0, import_node_fs2.readFileSync)(legacyPath, "utf-8").trim();
1030
+ } catch {
1031
+ return "";
1032
+ }
1033
+ }
1034
+ const path = (0, import_node_fs2.existsSync)(sdkSkillsVersionPath(baseUrl)) ? sdkSkillsVersionPath(baseUrl) : legacySdkSkillsVersionPath(baseUrl);
1035
+ if (!(0, import_node_fs2.existsSync)(path)) return "";
1036
+ try {
1037
+ return (0, import_node_fs2.readFileSync)(path, "utf-8").trim();
1038
+ } catch {
1039
+ return "";
1040
+ }
1041
+ }
1042
+
975
1043
  // ../shared_libs/play-runtime/coordinator-headers.ts
976
1044
  var COORDINATOR_INTERNAL_TOKEN_HEADER = "x-deepline-internal-token";
977
1045
  var COORDINATOR_URL_OVERRIDE_HEADER = "x-deepline-coordinator-url";
@@ -1308,21 +1376,9 @@ var HttpClient = class {
1308
1376
  );
1309
1377
  if (explicit) return explicit;
1310
1378
  try {
1311
- const versionPath = (0, import_node_path2.join)(
1312
- sdkCliStateDirPath(this.config.baseUrl),
1313
- "skills-version"
1379
+ return this.cleanDiagnosticHeader(
1380
+ readSdkSkillsLocalVersion(this.config.baseUrl)
1314
1381
  );
1315
- const legacyVersionPath = (0, import_node_path2.join)(
1316
- process.env.HOME?.trim() || (0, import_node_os3.homedir)(),
1317
- ".local",
1318
- "deepline",
1319
- baseUrlSlug(this.config.baseUrl),
1320
- "sdk-skills",
1321
- ".version"
1322
- );
1323
- const resolvedPath = (0, import_node_fs2.existsSync)(versionPath) ? versionPath : legacyVersionPath;
1324
- if (!(0, import_node_fs2.existsSync)(resolvedPath)) return null;
1325
- return this.cleanDiagnosticHeader((0, import_node_fs2.readFileSync)(resolvedPath, "utf-8"));
1326
1382
  } catch {
1327
1383
  return null;
1328
1384
  }
@@ -8961,7 +9017,7 @@ function getDefinedPlayMetadata(value) {
8961
9017
 
8962
9018
  // src/tool-output.ts
8963
9019
  var import_node_fs3 = require("fs");
8964
- var import_node_os4 = require("os");
9020
+ var import_node_os3 = require("os");
8965
9021
  var import_node_path3 = require("path");
8966
9022
  function isPlainObject(value) {
8967
9023
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
@@ -9079,7 +9135,7 @@ function tryConvertToList(payload, options) {
9079
9135
  return null;
9080
9136
  }
9081
9137
  function ensureOutputDir() {
9082
- const outputDir = (0, import_node_path3.join)((0, import_node_os4.homedir)(), ".local", "share", "deepline", "data");
9138
+ const outputDir = (0, import_node_path3.join)((0, import_node_os3.homedir)(), ".local", "share", "deepline", "data");
9083
9139
  (0, import_node_fs3.mkdirSync)(outputDir, { recursive: true });
9084
9140
  return outputDir;
9085
9141
  }
package/dist/index.mjs CHANGED
@@ -653,11 +653,6 @@ function resolveConfig(options) {
653
653
  };
654
654
  }
655
655
 
656
- // src/http.ts
657
- import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
658
- import { homedir as homedir3 } from "os";
659
- import { join as join2 } from "path";
660
-
661
656
  // ../shared_libs/plays/artifact-contract-version.ts
662
657
  var CURRENT_PLAY_ARTIFACT_CONTRACT_VERSION = 2;
663
658
 
@@ -706,7 +701,7 @@ var SDK_RELEASE = {
706
701
  // 0.3.0 introduces raw-v2: complete scrubbed provider responses are
707
702
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
708
703
  // getters keep their established compatibility behavior.
709
- version: "0.3.23",
704
+ version: "0.3.24",
710
705
  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
706
  contracts: {
712
707
  api: {
@@ -895,6 +890,79 @@ function detectAgentRuntime(options = {}) {
895
890
  return options.defaultRuntime ?? "unknown";
896
891
  }
897
892
 
893
+ // src/skills-version.ts
894
+ import { existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
895
+ import { dirname as dirname2, join as join2 } from "path";
896
+ function activePluginSkillsDir() {
897
+ const pluginMode = process.env.DEEPLINE_PLUGIN_MODE?.trim().toLowerCase();
898
+ if (pluginMode !== "true" && pluginMode !== "1" && pluginMode !== "yes" && pluginMode !== "on") {
899
+ return "";
900
+ }
901
+ const dir = process.env.DEEPLINE_PLUGIN_SKILLS_DIR?.trim() ?? "";
902
+ return dir && existsSync2(dir) ? dir : "";
903
+ }
904
+ function readPluginSkillsVersion() {
905
+ const dir = activePluginSkillsDir();
906
+ if (!dir) return "";
907
+ try {
908
+ return readFileSync2(join2(dir, ".version"), "utf-8").trim();
909
+ } catch {
910
+ return "";
911
+ }
912
+ }
913
+ function sdkSkillsVersionPath(baseUrl, agents = []) {
914
+ const suffix = agents.length > 0 ? `-${agents.join("-")}` : "";
915
+ return join2(sdkCliStateDirPath(baseUrl), `skills${suffix}-version`);
916
+ }
917
+ function legacySdkSkillsVersionPath(baseUrl) {
918
+ return join2(dirname2(sdkCliStateDirPath(baseUrl)), "sdk-skills", ".version");
919
+ }
920
+ function resolveAutoSyncSkillAgents() {
921
+ switch (detectAgentRuntime()) {
922
+ case "codex":
923
+ return ["codex"];
924
+ case "claude_code":
925
+ return ["claude-code"];
926
+ case "cursor":
927
+ return ["cursor"];
928
+ case "gemini":
929
+ return ["gemini-cli"];
930
+ case "antigravity":
931
+ return ["antigravity"];
932
+ default:
933
+ return [];
934
+ }
935
+ }
936
+ function readSdkSkillsLocalVersion(baseUrl) {
937
+ const pluginVersion = readPluginSkillsVersion();
938
+ if (pluginVersion) return pluginVersion;
939
+ const agents = resolveAutoSyncSkillAgents();
940
+ const scopedPath = sdkSkillsVersionPath(baseUrl, agents);
941
+ if (agents.length > 0 && existsSync2(scopedPath)) {
942
+ try {
943
+ return readFileSync2(scopedPath, "utf-8").trim();
944
+ } catch {
945
+ return "";
946
+ }
947
+ }
948
+ if (agents.length > 0) {
949
+ const legacyPath = legacySdkSkillsVersionPath(baseUrl);
950
+ if (!existsSync2(legacyPath)) return "";
951
+ try {
952
+ return readFileSync2(legacyPath, "utf-8").trim();
953
+ } catch {
954
+ return "";
955
+ }
956
+ }
957
+ const path = existsSync2(sdkSkillsVersionPath(baseUrl)) ? sdkSkillsVersionPath(baseUrl) : legacySdkSkillsVersionPath(baseUrl);
958
+ if (!existsSync2(path)) return "";
959
+ try {
960
+ return readFileSync2(path, "utf-8").trim();
961
+ } catch {
962
+ return "";
963
+ }
964
+ }
965
+
898
966
  // ../shared_libs/play-runtime/coordinator-headers.ts
899
967
  var COORDINATOR_INTERNAL_TOKEN_HEADER = "x-deepline-internal-token";
900
968
  var COORDINATOR_URL_OVERRIDE_HEADER = "x-deepline-coordinator-url";
@@ -1231,21 +1299,9 @@ var HttpClient = class {
1231
1299
  );
1232
1300
  if (explicit) return explicit;
1233
1301
  try {
1234
- const versionPath = join2(
1235
- sdkCliStateDirPath(this.config.baseUrl),
1236
- "skills-version"
1302
+ return this.cleanDiagnosticHeader(
1303
+ readSdkSkillsLocalVersion(this.config.baseUrl)
1237
1304
  );
1238
- const legacyVersionPath = join2(
1239
- process.env.HOME?.trim() || homedir3(),
1240
- ".local",
1241
- "deepline",
1242
- baseUrlSlug(this.config.baseUrl),
1243
- "sdk-skills",
1244
- ".version"
1245
- );
1246
- const resolvedPath = existsSync2(versionPath) ? versionPath : legacyVersionPath;
1247
- if (!existsSync2(resolvedPath)) return null;
1248
- return this.cleanDiagnosticHeader(readFileSync2(resolvedPath, "utf-8"));
1249
1305
  } catch {
1250
1306
  return null;
1251
1307
  }
@@ -8885,13 +8941,13 @@ function getDefinedPlayMetadata(value) {
8885
8941
  // src/tool-output.ts
8886
8942
  import {
8887
8943
  closeSync,
8888
- mkdirSync as mkdirSync2,
8944
+ mkdirSync as mkdirSync3,
8889
8945
  openSync,
8890
- writeFileSync as writeFileSync2,
8946
+ writeFileSync as writeFileSync3,
8891
8947
  writeSync
8892
8948
  } from "fs";
8893
- import { homedir as homedir4 } from "os";
8894
- import { dirname as dirname2, join as join3 } from "path";
8949
+ import { homedir as homedir3 } from "os";
8950
+ import { dirname as dirname3, join as join3 } from "path";
8895
8951
  function isPlainObject(value) {
8896
8952
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
8897
8953
  }
@@ -9008,19 +9064,19 @@ function tryConvertToList(payload, options) {
9008
9064
  return null;
9009
9065
  }
9010
9066
  function ensureOutputDir() {
9011
- const outputDir = join3(homedir4(), ".local", "share", "deepline", "data");
9012
- mkdirSync2(outputDir, { recursive: true });
9067
+ const outputDir = join3(homedir3(), ".local", "share", "deepline", "data");
9068
+ mkdirSync3(outputDir, { recursive: true });
9013
9069
  return outputDir;
9014
9070
  }
9015
9071
  function writeJsonOutputFile(payload, stem) {
9016
9072
  const outputDir = ensureOutputDir();
9017
9073
  const outputPath = join3(outputDir, `${stem}_${Date.now()}.json`);
9018
- writeFileSync2(outputPath, JSON.stringify(payload, null, 2), "utf-8");
9074
+ writeFileSync3(outputPath, JSON.stringify(payload, null, 2), "utf-8");
9019
9075
  return outputPath;
9020
9076
  }
9021
9077
  function writeCsvOutputFile(rows, stem, options) {
9022
9078
  const outputPath = options?.outPath ? options.outPath : join3(ensureOutputDir(), `${stem}_${Date.now()}.csv`);
9023
- mkdirSync2(dirname2(outputPath), { recursive: true });
9079
+ mkdirSync3(dirname3(outputPath), { recursive: true });
9024
9080
  const columns = columnsForRows(rows);
9025
9081
  const escapeCell = (value) => {
9026
9082
  const normalized = value == null ? "" : typeof value === "string" || typeof value === "number" || typeof value === "boolean" ? String(value) : JSON.stringify(value);
@@ -16,6 +16,7 @@
16
16
  "dist/bundling-sources/sdk/src/plays/local-file-discovery.ts",
17
17
  "dist/bundling-sources/sdk/src/release.ts",
18
18
  "dist/bundling-sources/sdk/src/runs/observe-transport.ts",
19
+ "dist/bundling-sources/sdk/src/skills-version.ts",
19
20
  "dist/bundling-sources/sdk/src/stream-reconnect.ts",
20
21
  "dist/bundling-sources/sdk/src/tool-output.ts",
21
22
  "dist/bundling-sources/sdk/src/types.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.3.23",
3
+ "version": "0.3.24",
4
4
  "description": "GTM data CLI and TypeScript SDK for coding agents",
5
5
  "license": "MIT",
6
6
  "homepage": "https://code.deepline.com",