deepline 0.3.53 → 0.3.55

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.
@@ -199,7 +199,7 @@ export const SDK_RELEASE = {
199
199
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
200
200
  // getters keep their established compatibility behavior.
201
201
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
202
- version: '0.3.53',
202
+ version: '0.3.55',
203
203
  updateSummary:
204
204
  'Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.',
205
205
  packageCapabilities: {
package/dist/cli/index.js CHANGED
@@ -1075,7 +1075,7 @@ var SDK_RELEASE = {
1075
1075
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
1076
1076
  // getters keep their established compatibility behavior.
1077
1077
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
1078
- version: "0.3.53",
1078
+ version: "0.3.55",
1079
1079
  updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
1080
1080
  packageCapabilities: {
1081
1081
  updatePreferences: 1
@@ -7989,6 +7989,16 @@ function savePendingClaim(baseUrl, claim) {
7989
7989
  mode: 384
7990
7990
  });
7991
7991
  }
7992
+ function resolvePendingAuthClaimForResume(baseUrl, requestedScope) {
7993
+ if (requestedScope) {
7994
+ const claim = readPendingAuthClaim(baseUrl, requestedScope);
7995
+ return { claim, scope: claim?.scope ?? requestedScope };
7996
+ }
7997
+ const folder = readPendingAuthClaim(baseUrl, "folder");
7998
+ if (folder) return { claim: folder, scope: folder.scope };
7999
+ const global = readPendingAuthClaim(baseUrl, "global");
8000
+ return { claim: global, scope: global?.scope ?? "global" };
8001
+ }
7992
8002
  function readPendingAuthClaim(baseUrl, scope) {
7993
8003
  let filePath;
7994
8004
  try {
@@ -8019,7 +8029,12 @@ function readPendingAuthClaim(baseUrl, scope) {
8019
8029
  return {
8020
8030
  claimToken,
8021
8031
  claimUrl: typeof parsed.claimUrl === "string" ? parsed.claimUrl.trim() : "",
8022
- scope
8032
+ // The record's own scope, when it has one. `register` writes this field
8033
+ // precisely so a resume can learn where the credential belongs; reading
8034
+ // back the caller's argument instead made it decorative, and a record
8035
+ // found by searching would have reported the scope of the search rather
8036
+ // than the scope it was created with.
8037
+ scope: parsed.scope === "folder" || parsed.scope === "global" ? parsed.scope : scope
8023
8038
  };
8024
8039
  } catch {
8025
8040
  return null;
@@ -8205,12 +8220,13 @@ async function printClaimSuccessBanner(baseUrl, apiKey, statusData) {
8205
8220
  async function handleRegister(args) {
8206
8221
  const baseUrl = autoDetectBaseUrl().replace(/\/$/, "");
8207
8222
  let orgName = "";
8223
+ let orgId = "";
8208
8224
  let agentName = "";
8209
8225
  let waitMode;
8210
8226
  let authScope;
8211
8227
  try {
8212
8228
  waitMode = parseRegisterWaitMode(args);
8213
- authScope = parseAuthScope(args);
8229
+ authScope = args.includes("--auth-scope") ? parseAuthScope(args) : args.includes("--org-id") ? "folder" : "global";
8214
8230
  if (authScope === "folder") {
8215
8231
  pendingClaimPath(baseUrl, authScope);
8216
8232
  }
@@ -8220,6 +8236,7 @@ async function handleRegister(args) {
8220
8236
  }
8221
8237
  for (let i = 0; i < args.length; i++) {
8222
8238
  if (args[i] === "--org-name" && args[i + 1]) orgName = args[++i];
8239
+ else if (args[i] === "--org-id" && args[i + 1]) orgId = args[++i];
8223
8240
  else if (args[i] === "--agent-name" && args[i + 1]) agentName = args[++i];
8224
8241
  }
8225
8242
  if (!agentName) {
@@ -8231,6 +8248,7 @@ async function handleRegister(args) {
8231
8248
  }
8232
8249
  const payload = {};
8233
8250
  if (orgName) payload.org_name = orgName;
8251
+ if (orgId) payload.org_id = orgId;
8234
8252
  if (agentName) payload.agent_name = agentName;
8235
8253
  const { status, data } = await httpJson(
8236
8254
  "POST",
@@ -8321,12 +8339,14 @@ async function handleRegister(args) {
8321
8339
  async function handleWait(args) {
8322
8340
  const baseUrl = autoDetectBaseUrl().replace(/\/$/, "");
8323
8341
  let timeoutSeconds = 300;
8324
- let authScope;
8325
- try {
8326
- authScope = parseAuthScope(args);
8327
- } catch (error) {
8328
- console.error(error instanceof Error ? error.message : String(error));
8329
- return 2;
8342
+ let requestedScope;
8343
+ if (args.includes("--auth-scope")) {
8344
+ try {
8345
+ requestedScope = parseAuthScope(args);
8346
+ } catch (error) {
8347
+ console.error(error instanceof Error ? error.message : String(error));
8348
+ return 2;
8349
+ }
8330
8350
  }
8331
8351
  for (let i = 0; i < args.length; i++) {
8332
8352
  if (args[i] === "--timeout" && args[i + 1]) {
@@ -8336,7 +8356,9 @@ async function handleWait(args) {
8336
8356
  }
8337
8357
  }
8338
8358
  }
8339
- const pendingClaim = readPendingAuthClaim(baseUrl, authScope);
8359
+ const resumed = resolvePendingAuthClaimForResume(baseUrl, requestedScope);
8360
+ const pendingClaim = resumed.claim;
8361
+ const authScope = resumed.scope;
8340
8362
  const claimToken = pendingClaim?.claimToken ?? "";
8341
8363
  if (!pendingClaim) {
8342
8364
  const scopedApiKey = authScope === "folder" ? resolveProjectApiKeyForBaseUrl(baseUrl) : resolveGlobalApiKeyForBaseUrl(baseUrl);
@@ -8442,7 +8464,10 @@ async function handleStatus(args) {
8442
8464
  }
8443
8465
  const apiKey = authScope === "folder" ? resolveProjectApiKeyForBaseUrl(baseUrl) : authScope === "global" ? resolveGlobalApiKeyForBaseUrl(baseUrl) : resolveApiKeyForBaseUrl(baseUrl);
8444
8466
  if (!apiKey) {
8445
- const pendingClaim = authScope ? readPendingAuthClaim(baseUrl, authScope) : readPendingAuthClaim(baseUrl, "folder") ?? readPendingAuthClaim(baseUrl, "global");
8467
+ const { claim: pendingClaim } = resolvePendingAuthClaimForResume(
8468
+ baseUrl,
8469
+ authScope ?? void 0
8470
+ );
8446
8471
  if (pendingClaim) {
8447
8472
  printCommandEnvelope(
8448
8473
  {
@@ -8632,13 +8657,17 @@ Examples:
8632
8657
  deepline auth register --wait no
8633
8658
  deepline auth register --auth-scope folder --wait no
8634
8659
  `
8635
- ).option("--org-name <name>", "Workspace name to prefill").option("--agent-name <name>", "Agent name to register").option("--wait <mode>", "Wait mode: auto, yes, or no", "auto").option("--no-wait", "Alias for --wait no").option(
8660
+ ).option("--org-name <name>", "Workspace name to prefill").option(
8661
+ "--org-id <id>",
8662
+ "Bind to this workspace directly, skipping the browser picker"
8663
+ ).option("--agent-name <name>", "Agent name to register").option("--wait <mode>", "Wait mode: auto, yes, or no", "auto").option("--no-wait", "Alias for --wait no").option(
8636
8664
  "--auth-scope <scope>",
8637
8665
  "Credential scope: global or folder",
8638
8666
  "global"
8639
8667
  ).action(async (options) => {
8640
8668
  process.exitCode = await handleRegister([
8641
8669
  ...options.orgName ? ["--org-name", options.orgName] : [],
8670
+ ...options.orgId ? ["--org-id", String(options.orgId)] : [],
8642
8671
  ...options.agentName ? ["--agent-name", options.agentName] : [],
8643
8672
  ...options.noWait || options.wait === false ? ["--wait", "no"] : ["--wait", String(options.wait ?? "auto")],
8644
8673
  "--auth-scope",
@@ -32993,7 +33022,7 @@ var install_commands_default = {
32993
33022
  npx_binary: "npx",
32994
33023
  npx_add_args_template: [
32995
33024
  "--yes",
32996
- "skills@1.5.18",
33025
+ "skills@1.5.15",
32997
33026
  "add",
32998
33027
  "{skills_source_url}",
32999
33028
  "--agent",
@@ -33013,9 +33042,15 @@ var install_commands_default = {
33013
33042
  // src/cli/install-commands.ts
33014
33043
  var INSTALL_COMMANDS = install_commands_default;
33015
33044
  var DEFAULT_SKILL_AGENTS = INSTALL_COMMANDS.skills.default_agents;
33016
- var SKILLS_NPX_PACKAGE = INSTALL_COMMANDS.skills.npx_add_args_template.find(
33017
- (arg) => arg.startsWith("skills@")
33018
- ) ?? "skills@1.5.18";
33045
+ var skillsNpxPackage = INSTALL_COMMANDS.skills.npx_add_args_template.find(
33046
+ (arg) => /^skills@\d+\.\d+\.\d+$/.test(arg)
33047
+ );
33048
+ if (!skillsNpxPackage) {
33049
+ throw new Error(
33050
+ "shared_libs/cli/install-commands.json must pin an exact skills package version."
33051
+ );
33052
+ }
33053
+ var SKILLS_NPX_PACKAGE = skillsNpxPackage;
33019
33054
  var DEFAULT_V1_SKILL_NAMES = [
33020
33055
  "build-tam",
33021
33056
  "clay-to-deepline",
@@ -33351,7 +33386,7 @@ function runLegacySkillsCleanup(agents) {
33351
33386
  command: "bunx",
33352
33387
  args: [
33353
33388
  "--bun",
33354
- "skills",
33389
+ SKILLS_NPX_PACKAGE,
33355
33390
  "remove",
33356
33391
  "--global",
33357
33392
  "--agent",
@@ -33364,7 +33399,7 @@ function runLegacySkillsCleanup(agents) {
33364
33399
  command: "npx",
33365
33400
  args: [
33366
33401
  "--yes",
33367
- "skills",
33402
+ SKILLS_NPX_PACKAGE,
33368
33403
  "remove",
33369
33404
  "--global",
33370
33405
  "--agent",
@@ -33378,7 +33413,7 @@ function runLegacySkillsCleanup(agents) {
33378
33413
  command: "npx",
33379
33414
  args: [
33380
33415
  "--yes",
33381
- "skills",
33416
+ SKILLS_NPX_PACKAGE,
33382
33417
  "remove",
33383
33418
  "--global",
33384
33419
  "--agent",
@@ -33527,9 +33562,9 @@ function skillsStatePathForScope(baseUrl, scope, root) {
33527
33562
  }
33528
33563
  function buildSkillsPlan(input2) {
33529
33564
  const scopeArgs = input2.scope === "global" ? ["--global"] : [];
33530
- const allManagedNames = [
33531
- .../* @__PURE__ */ new Set([...input2.skillNames, ...LEGACY_SKILL_NAMES_TO_REMOVE])
33532
- ].sort((a, b) => a.localeCompare(b));
33565
+ const legacyNames = [...LEGACY_SKILL_NAMES_TO_REMOVE].sort(
33566
+ (a, b) => a.localeCompare(b)
33567
+ );
33533
33568
  return {
33534
33569
  scope: input2.scope,
33535
33570
  root: input2.root,
@@ -33549,7 +33584,7 @@ function buildSkillsPlan(input2) {
33549
33584
  "--agent",
33550
33585
  ...input2.agents,
33551
33586
  "-y",
33552
- ...allManagedNames
33587
+ ...legacyNames
33553
33588
  ]
33554
33589
  },
33555
33590
  install: {
@@ -33700,16 +33735,8 @@ async function runSkillsCommand(options, dependencies = {}) {
33700
33735
  `Replacing Deepline skills for ${agents.join(", ")} (${scope})...
33701
33736
  `
33702
33737
  );
33738
+ const execute = dependencies.runProcess ?? runProcess;
33703
33739
  try {
33704
- const execute = dependencies.runProcess ?? runProcess;
33705
- const removeCode = await execute(
33706
- plan.remove.command,
33707
- plan.remove.args,
33708
- root ?? void 0
33709
- );
33710
- if (removeCode !== 0) {
33711
- throw new Error("Could not remove the existing Deepline skills.");
33712
- }
33713
33740
  const installCode = await execute(
33714
33741
  plan.install.command,
33715
33742
  plan.install.args,
@@ -33734,6 +33761,23 @@ async function runSkillsCommand(options, dependencies = {}) {
33734
33761
  );
33735
33762
  return 5;
33736
33763
  }
33764
+ try {
33765
+ const removeCode = await execute(
33766
+ plan.remove.command,
33767
+ plan.remove.args,
33768
+ root ?? void 0
33769
+ );
33770
+ if (removeCode !== 0) {
33771
+ process.stderr.write(
33772
+ "Current Deepline skills installed, but legacy skill cleanup failed. The installed skills remain usable.\n"
33773
+ );
33774
+ }
33775
+ } catch (error) {
33776
+ process.stderr.write(
33777
+ `Current Deepline skills installed, but legacy skill cleanup failed: ${error instanceof Error ? error.message : String(error)}. The installed skills remain usable.
33778
+ `
33779
+ );
33780
+ }
33737
33781
  (0, import_node_fs17.mkdirSync)((0, import_node_path19.dirname)(plan.statePath), { recursive: true });
33738
33782
  (0, import_node_fs17.writeFileSync)(
33739
33783
  plan.statePath,
@@ -33787,8 +33831,9 @@ function registerSkillsCommand(program) {
33787
33831
  "after",
33788
33832
  `
33789
33833
  Notes:
33790
- This command removes and reinstalls only Deepline-managed skill names using
33791
- skills@1.5.18. Local scope writes into the resolved persistent project.
33834
+ This command reinstalls current Deepline-managed skills using ${SKILLS_NPX_PACKAGE},
33835
+ then removes legacy Deepline skill names. Local scope writes into the resolved
33836
+ persistent project.
33792
33837
 
33793
33838
  Examples:
33794
33839
  deepline skills --json
@@ -34658,6 +34703,8 @@ async function runSetupCommand(options) {
34658
34703
  });
34659
34704
  const doctorChecks = asRecord3(doctorPayload?.checks);
34660
34705
  const apiCheck = asRecord3(doctorChecks?.api);
34706
+ const workspaceRecord = asRecord3(apiCheck?.workspace);
34707
+ const workspaceName = typeof workspaceRecord?.name === "string" && workspaceRecord.name.trim() ? workspaceRecord.name.trim() : null;
34661
34708
  printCommandEnvelope(
34662
34709
  {
34663
34710
  ok: true,
@@ -34681,7 +34728,10 @@ async function runSetupCommand(options) {
34681
34728
  {
34682
34729
  title: "setup",
34683
34730
  lines: [
34684
- "Deepline is installed and connected.",
34731
+ workspaceName ? `Deepline is installed and connected to ${workspaceName}.` : "Deepline is installed and connected.",
34732
+ ...workspaceName ? [
34733
+ "To link a different workspace, run: deepline auth register"
34734
+ ] : [],
34685
34735
  `Use ${DEEPLINE_GTM_SKILL} in your agent.`,
34686
34736
  ...DEEPLINE_GTM_STARTER_PROMPTS.map(
34687
34737
  (example, index) => `${index + 1}. ${example.title}: ${example.prompt}`
@@ -1060,7 +1060,7 @@ var SDK_RELEASE = {
1060
1060
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
1061
1061
  // getters keep their established compatibility behavior.
1062
1062
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
1063
- version: "0.3.53",
1063
+ version: "0.3.55",
1064
1064
  updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
1065
1065
  packageCapabilities: {
1066
1066
  updatePreferences: 1
@@ -7986,6 +7986,16 @@ function savePendingClaim(baseUrl, claim) {
7986
7986
  mode: 384
7987
7987
  });
7988
7988
  }
7989
+ function resolvePendingAuthClaimForResume(baseUrl, requestedScope) {
7990
+ if (requestedScope) {
7991
+ const claim = readPendingAuthClaim(baseUrl, requestedScope);
7992
+ return { claim, scope: claim?.scope ?? requestedScope };
7993
+ }
7994
+ const folder = readPendingAuthClaim(baseUrl, "folder");
7995
+ if (folder) return { claim: folder, scope: folder.scope };
7996
+ const global = readPendingAuthClaim(baseUrl, "global");
7997
+ return { claim: global, scope: global?.scope ?? "global" };
7998
+ }
7989
7999
  function readPendingAuthClaim(baseUrl, scope) {
7990
8000
  let filePath;
7991
8001
  try {
@@ -8016,7 +8026,12 @@ function readPendingAuthClaim(baseUrl, scope) {
8016
8026
  return {
8017
8027
  claimToken,
8018
8028
  claimUrl: typeof parsed.claimUrl === "string" ? parsed.claimUrl.trim() : "",
8019
- scope
8029
+ // The record's own scope, when it has one. `register` writes this field
8030
+ // precisely so a resume can learn where the credential belongs; reading
8031
+ // back the caller's argument instead made it decorative, and a record
8032
+ // found by searching would have reported the scope of the search rather
8033
+ // than the scope it was created with.
8034
+ scope: parsed.scope === "folder" || parsed.scope === "global" ? parsed.scope : scope
8020
8035
  };
8021
8036
  } catch {
8022
8037
  return null;
@@ -8202,12 +8217,13 @@ async function printClaimSuccessBanner(baseUrl, apiKey, statusData) {
8202
8217
  async function handleRegister(args) {
8203
8218
  const baseUrl = autoDetectBaseUrl().replace(/\/$/, "");
8204
8219
  let orgName = "";
8220
+ let orgId = "";
8205
8221
  let agentName = "";
8206
8222
  let waitMode;
8207
8223
  let authScope;
8208
8224
  try {
8209
8225
  waitMode = parseRegisterWaitMode(args);
8210
- authScope = parseAuthScope(args);
8226
+ authScope = args.includes("--auth-scope") ? parseAuthScope(args) : args.includes("--org-id") ? "folder" : "global";
8211
8227
  if (authScope === "folder") {
8212
8228
  pendingClaimPath(baseUrl, authScope);
8213
8229
  }
@@ -8217,6 +8233,7 @@ async function handleRegister(args) {
8217
8233
  }
8218
8234
  for (let i = 0; i < args.length; i++) {
8219
8235
  if (args[i] === "--org-name" && args[i + 1]) orgName = args[++i];
8236
+ else if (args[i] === "--org-id" && args[i + 1]) orgId = args[++i];
8220
8237
  else if (args[i] === "--agent-name" && args[i + 1]) agentName = args[++i];
8221
8238
  }
8222
8239
  if (!agentName) {
@@ -8228,6 +8245,7 @@ async function handleRegister(args) {
8228
8245
  }
8229
8246
  const payload = {};
8230
8247
  if (orgName) payload.org_name = orgName;
8248
+ if (orgId) payload.org_id = orgId;
8231
8249
  if (agentName) payload.agent_name = agentName;
8232
8250
  const { status, data } = await httpJson(
8233
8251
  "POST",
@@ -8318,12 +8336,14 @@ async function handleRegister(args) {
8318
8336
  async function handleWait(args) {
8319
8337
  const baseUrl = autoDetectBaseUrl().replace(/\/$/, "");
8320
8338
  let timeoutSeconds = 300;
8321
- let authScope;
8322
- try {
8323
- authScope = parseAuthScope(args);
8324
- } catch (error) {
8325
- console.error(error instanceof Error ? error.message : String(error));
8326
- return 2;
8339
+ let requestedScope;
8340
+ if (args.includes("--auth-scope")) {
8341
+ try {
8342
+ requestedScope = parseAuthScope(args);
8343
+ } catch (error) {
8344
+ console.error(error instanceof Error ? error.message : String(error));
8345
+ return 2;
8346
+ }
8327
8347
  }
8328
8348
  for (let i = 0; i < args.length; i++) {
8329
8349
  if (args[i] === "--timeout" && args[i + 1]) {
@@ -8333,7 +8353,9 @@ async function handleWait(args) {
8333
8353
  }
8334
8354
  }
8335
8355
  }
8336
- const pendingClaim = readPendingAuthClaim(baseUrl, authScope);
8356
+ const resumed = resolvePendingAuthClaimForResume(baseUrl, requestedScope);
8357
+ const pendingClaim = resumed.claim;
8358
+ const authScope = resumed.scope;
8337
8359
  const claimToken = pendingClaim?.claimToken ?? "";
8338
8360
  if (!pendingClaim) {
8339
8361
  const scopedApiKey = authScope === "folder" ? resolveProjectApiKeyForBaseUrl(baseUrl) : resolveGlobalApiKeyForBaseUrl(baseUrl);
@@ -8439,7 +8461,10 @@ async function handleStatus(args) {
8439
8461
  }
8440
8462
  const apiKey = authScope === "folder" ? resolveProjectApiKeyForBaseUrl(baseUrl) : authScope === "global" ? resolveGlobalApiKeyForBaseUrl(baseUrl) : resolveApiKeyForBaseUrl(baseUrl);
8441
8463
  if (!apiKey) {
8442
- const pendingClaim = authScope ? readPendingAuthClaim(baseUrl, authScope) : readPendingAuthClaim(baseUrl, "folder") ?? readPendingAuthClaim(baseUrl, "global");
8464
+ const { claim: pendingClaim } = resolvePendingAuthClaimForResume(
8465
+ baseUrl,
8466
+ authScope ?? void 0
8467
+ );
8443
8468
  if (pendingClaim) {
8444
8469
  printCommandEnvelope(
8445
8470
  {
@@ -8629,13 +8654,17 @@ Examples:
8629
8654
  deepline auth register --wait no
8630
8655
  deepline auth register --auth-scope folder --wait no
8631
8656
  `
8632
- ).option("--org-name <name>", "Workspace name to prefill").option("--agent-name <name>", "Agent name to register").option("--wait <mode>", "Wait mode: auto, yes, or no", "auto").option("--no-wait", "Alias for --wait no").option(
8657
+ ).option("--org-name <name>", "Workspace name to prefill").option(
8658
+ "--org-id <id>",
8659
+ "Bind to this workspace directly, skipping the browser picker"
8660
+ ).option("--agent-name <name>", "Agent name to register").option("--wait <mode>", "Wait mode: auto, yes, or no", "auto").option("--no-wait", "Alias for --wait no").option(
8633
8661
  "--auth-scope <scope>",
8634
8662
  "Credential scope: global or folder",
8635
8663
  "global"
8636
8664
  ).action(async (options) => {
8637
8665
  process.exitCode = await handleRegister([
8638
8666
  ...options.orgName ? ["--org-name", options.orgName] : [],
8667
+ ...options.orgId ? ["--org-id", String(options.orgId)] : [],
8639
8668
  ...options.agentName ? ["--agent-name", options.agentName] : [],
8640
8669
  ...options.noWait || options.wait === false ? ["--wait", "no"] : ["--wait", String(options.wait ?? "auto")],
8641
8670
  "--auth-scope",
@@ -33075,7 +33104,7 @@ var install_commands_default = {
33075
33104
  npx_binary: "npx",
33076
33105
  npx_add_args_template: [
33077
33106
  "--yes",
33078
- "skills@1.5.18",
33107
+ "skills@1.5.15",
33079
33108
  "add",
33080
33109
  "{skills_source_url}",
33081
33110
  "--agent",
@@ -33095,9 +33124,15 @@ var install_commands_default = {
33095
33124
  // src/cli/install-commands.ts
33096
33125
  var INSTALL_COMMANDS = install_commands_default;
33097
33126
  var DEFAULT_SKILL_AGENTS = INSTALL_COMMANDS.skills.default_agents;
33098
- var SKILLS_NPX_PACKAGE = INSTALL_COMMANDS.skills.npx_add_args_template.find(
33099
- (arg) => arg.startsWith("skills@")
33100
- ) ?? "skills@1.5.18";
33127
+ var skillsNpxPackage = INSTALL_COMMANDS.skills.npx_add_args_template.find(
33128
+ (arg) => /^skills@\d+\.\d+\.\d+$/.test(arg)
33129
+ );
33130
+ if (!skillsNpxPackage) {
33131
+ throw new Error(
33132
+ "shared_libs/cli/install-commands.json must pin an exact skills package version."
33133
+ );
33134
+ }
33135
+ var SKILLS_NPX_PACKAGE = skillsNpxPackage;
33101
33136
  var DEFAULT_V1_SKILL_NAMES = [
33102
33137
  "build-tam",
33103
33138
  "clay-to-deepline",
@@ -33439,7 +33474,7 @@ function runLegacySkillsCleanup(agents) {
33439
33474
  command: "bunx",
33440
33475
  args: [
33441
33476
  "--bun",
33442
- "skills",
33477
+ SKILLS_NPX_PACKAGE,
33443
33478
  "remove",
33444
33479
  "--global",
33445
33480
  "--agent",
@@ -33452,7 +33487,7 @@ function runLegacySkillsCleanup(agents) {
33452
33487
  command: "npx",
33453
33488
  args: [
33454
33489
  "--yes",
33455
- "skills",
33490
+ SKILLS_NPX_PACKAGE,
33456
33491
  "remove",
33457
33492
  "--global",
33458
33493
  "--agent",
@@ -33466,7 +33501,7 @@ function runLegacySkillsCleanup(agents) {
33466
33501
  command: "npx",
33467
33502
  args: [
33468
33503
  "--yes",
33469
- "skills",
33504
+ SKILLS_NPX_PACKAGE,
33470
33505
  "remove",
33471
33506
  "--global",
33472
33507
  "--agent",
@@ -33615,9 +33650,9 @@ function skillsStatePathForScope(baseUrl, scope, root) {
33615
33650
  }
33616
33651
  function buildSkillsPlan(input2) {
33617
33652
  const scopeArgs = input2.scope === "global" ? ["--global"] : [];
33618
- const allManagedNames = [
33619
- .../* @__PURE__ */ new Set([...input2.skillNames, ...LEGACY_SKILL_NAMES_TO_REMOVE])
33620
- ].sort((a, b) => a.localeCompare(b));
33653
+ const legacyNames = [...LEGACY_SKILL_NAMES_TO_REMOVE].sort(
33654
+ (a, b) => a.localeCompare(b)
33655
+ );
33621
33656
  return {
33622
33657
  scope: input2.scope,
33623
33658
  root: input2.root,
@@ -33637,7 +33672,7 @@ function buildSkillsPlan(input2) {
33637
33672
  "--agent",
33638
33673
  ...input2.agents,
33639
33674
  "-y",
33640
- ...allManagedNames
33675
+ ...legacyNames
33641
33676
  ]
33642
33677
  },
33643
33678
  install: {
@@ -33788,16 +33823,8 @@ async function runSkillsCommand(options, dependencies = {}) {
33788
33823
  `Replacing Deepline skills for ${agents.join(", ")} (${scope})...
33789
33824
  `
33790
33825
  );
33826
+ const execute = dependencies.runProcess ?? runProcess;
33791
33827
  try {
33792
- const execute = dependencies.runProcess ?? runProcess;
33793
- const removeCode = await execute(
33794
- plan.remove.command,
33795
- plan.remove.args,
33796
- root ?? void 0
33797
- );
33798
- if (removeCode !== 0) {
33799
- throw new Error("Could not remove the existing Deepline skills.");
33800
- }
33801
33828
  const installCode = await execute(
33802
33829
  plan.install.command,
33803
33830
  plan.install.args,
@@ -33822,6 +33849,23 @@ async function runSkillsCommand(options, dependencies = {}) {
33822
33849
  );
33823
33850
  return 5;
33824
33851
  }
33852
+ try {
33853
+ const removeCode = await execute(
33854
+ plan.remove.command,
33855
+ plan.remove.args,
33856
+ root ?? void 0
33857
+ );
33858
+ if (removeCode !== 0) {
33859
+ process.stderr.write(
33860
+ "Current Deepline skills installed, but legacy skill cleanup failed. The installed skills remain usable.\n"
33861
+ );
33862
+ }
33863
+ } catch (error) {
33864
+ process.stderr.write(
33865
+ `Current Deepline skills installed, but legacy skill cleanup failed: ${error instanceof Error ? error.message : String(error)}. The installed skills remain usable.
33866
+ `
33867
+ );
33868
+ }
33825
33869
  mkdirSync10(dirname15(plan.statePath), { recursive: true });
33826
33870
  writeFileSync13(
33827
33871
  plan.statePath,
@@ -33875,8 +33919,9 @@ function registerSkillsCommand(program) {
33875
33919
  "after",
33876
33920
  `
33877
33921
  Notes:
33878
- This command removes and reinstalls only Deepline-managed skill names using
33879
- skills@1.5.18. Local scope writes into the resolved persistent project.
33922
+ This command reinstalls current Deepline-managed skills using ${SKILLS_NPX_PACKAGE},
33923
+ then removes legacy Deepline skill names. Local scope writes into the resolved
33924
+ persistent project.
33880
33925
 
33881
33926
  Examples:
33882
33927
  deepline skills --json
@@ -34746,6 +34791,8 @@ async function runSetupCommand(options) {
34746
34791
  });
34747
34792
  const doctorChecks = asRecord3(doctorPayload?.checks);
34748
34793
  const apiCheck = asRecord3(doctorChecks?.api);
34794
+ const workspaceRecord = asRecord3(apiCheck?.workspace);
34795
+ const workspaceName = typeof workspaceRecord?.name === "string" && workspaceRecord.name.trim() ? workspaceRecord.name.trim() : null;
34749
34796
  printCommandEnvelope(
34750
34797
  {
34751
34798
  ok: true,
@@ -34769,7 +34816,10 @@ async function runSetupCommand(options) {
34769
34816
  {
34770
34817
  title: "setup",
34771
34818
  lines: [
34772
- "Deepline is installed and connected.",
34819
+ workspaceName ? `Deepline is installed and connected to ${workspaceName}.` : "Deepline is installed and connected.",
34820
+ ...workspaceName ? [
34821
+ "To link a different workspace, run: deepline auth register"
34822
+ ] : [],
34773
34823
  `Use ${DEEPLINE_GTM_SKILL} in your agent.`,
34774
34824
  ...DEEPLINE_GTM_STARTER_PROMPTS.map(
34775
34825
  (example, index) => `${index + 1}. ${example.title}: ${example.prompt}`
package/dist/index.js CHANGED
@@ -816,7 +816,7 @@ var SDK_RELEASE = {
816
816
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
817
817
  // getters keep their established compatibility behavior.
818
818
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
819
- version: "0.3.53",
819
+ version: "0.3.55",
820
820
  updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
821
821
  packageCapabilities: {
822
822
  updatePreferences: 1
package/dist/index.mjs CHANGED
@@ -738,7 +738,7 @@ var SDK_RELEASE = {
738
738
  // available at toolResponse.rawV2 while toolResponse.raw and all declared
739
739
  // getters keep their established compatibility behavior.
740
740
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
741
- version: "0.3.53",
741
+ version: "0.3.55",
742
742
  updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
743
743
  packageCapabilities: {
744
744
  updatePreferences: 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.3.53",
3
+ "version": "0.3.55",
4
4
  "description": "GTM data CLI and TypeScript SDK for coding agents",
5
5
  "license": "MIT",
6
6
  "homepage": "https://code.deepline.com",