@docyrus/docyrus 0.0.27 → 0.0.28

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/main.js CHANGED
@@ -98830,6 +98830,79 @@ ${captureLines}` : capture.stack;
98830
98830
  }
98831
98831
  });
98832
98832
 
98833
+ // ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
98834
+ var require_picocolors = __commonJS({
98835
+ "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports2, module2) {
98836
+ "use strict";
98837
+ var p = process || {};
98838
+ var argv = p.argv || [];
98839
+ var env2 = p.env || {};
98840
+ var isColorSupported = !(!!env2.NO_COLOR || argv.includes("--no-color")) && (!!env2.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env2.TERM !== "dumb" || !!env2.CI);
98841
+ var formatter = (open, close, replace = open) => (input) => {
98842
+ let string4 = "" + input, index = string4.indexOf(close, open.length);
98843
+ return ~index ? open + replaceClose(string4, close, replace, index) + close : open + string4 + close;
98844
+ };
98845
+ var replaceClose = (string4, close, replace, index) => {
98846
+ let result = "", cursor = 0;
98847
+ do {
98848
+ result += string4.substring(cursor, index) + replace;
98849
+ cursor = index + close.length;
98850
+ index = string4.indexOf(close, cursor);
98851
+ } while (~index);
98852
+ return result + string4.substring(cursor);
98853
+ };
98854
+ var createColors = (enabled = isColorSupported) => {
98855
+ let f = enabled ? formatter : () => String;
98856
+ return {
98857
+ isColorSupported: enabled,
98858
+ reset: f("\x1B[0m", "\x1B[0m"),
98859
+ bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
98860
+ dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
98861
+ italic: f("\x1B[3m", "\x1B[23m"),
98862
+ underline: f("\x1B[4m", "\x1B[24m"),
98863
+ inverse: f("\x1B[7m", "\x1B[27m"),
98864
+ hidden: f("\x1B[8m", "\x1B[28m"),
98865
+ strikethrough: f("\x1B[9m", "\x1B[29m"),
98866
+ black: f("\x1B[30m", "\x1B[39m"),
98867
+ red: f("\x1B[31m", "\x1B[39m"),
98868
+ green: f("\x1B[32m", "\x1B[39m"),
98869
+ yellow: f("\x1B[33m", "\x1B[39m"),
98870
+ blue: f("\x1B[34m", "\x1B[39m"),
98871
+ magenta: f("\x1B[35m", "\x1B[39m"),
98872
+ cyan: f("\x1B[36m", "\x1B[39m"),
98873
+ white: f("\x1B[37m", "\x1B[39m"),
98874
+ gray: f("\x1B[90m", "\x1B[39m"),
98875
+ bgBlack: f("\x1B[40m", "\x1B[49m"),
98876
+ bgRed: f("\x1B[41m", "\x1B[49m"),
98877
+ bgGreen: f("\x1B[42m", "\x1B[49m"),
98878
+ bgYellow: f("\x1B[43m", "\x1B[49m"),
98879
+ bgBlue: f("\x1B[44m", "\x1B[49m"),
98880
+ bgMagenta: f("\x1B[45m", "\x1B[49m"),
98881
+ bgCyan: f("\x1B[46m", "\x1B[49m"),
98882
+ bgWhite: f("\x1B[47m", "\x1B[49m"),
98883
+ blackBright: f("\x1B[90m", "\x1B[39m"),
98884
+ redBright: f("\x1B[91m", "\x1B[39m"),
98885
+ greenBright: f("\x1B[92m", "\x1B[39m"),
98886
+ yellowBright: f("\x1B[93m", "\x1B[39m"),
98887
+ blueBright: f("\x1B[94m", "\x1B[39m"),
98888
+ magentaBright: f("\x1B[95m", "\x1B[39m"),
98889
+ cyanBright: f("\x1B[96m", "\x1B[39m"),
98890
+ whiteBright: f("\x1B[97m", "\x1B[39m"),
98891
+ bgBlackBright: f("\x1B[100m", "\x1B[49m"),
98892
+ bgRedBright: f("\x1B[101m", "\x1B[49m"),
98893
+ bgGreenBright: f("\x1B[102m", "\x1B[49m"),
98894
+ bgYellowBright: f("\x1B[103m", "\x1B[49m"),
98895
+ bgBlueBright: f("\x1B[104m", "\x1B[49m"),
98896
+ bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
98897
+ bgCyanBright: f("\x1B[106m", "\x1B[49m"),
98898
+ bgWhiteBright: f("\x1B[107m", "\x1B[49m")
98899
+ };
98900
+ };
98901
+ module2.exports = createColors();
98902
+ module2.exports.createColors = createColors;
98903
+ }
98904
+ });
98905
+
98833
98906
  // src/main.ts
98834
98907
  var main_exports = {};
98835
98908
  __export(main_exports, {
@@ -124691,7 +124764,7 @@ function buildInputSchema(args, env2, options2) {
124691
124764
  // package.json
124692
124765
  var package_default = {
124693
124766
  name: "@docyrus/docyrus",
124694
- version: "0.0.27",
124767
+ version: "0.0.28",
124695
124768
  private: false,
124696
124769
  description: "Docyrus API CLI",
124697
124770
  main: "./main.js",
@@ -129459,6 +129532,33 @@ var import_node_child_process4 = require("node:child_process");
129459
129532
  var import_node_fs5 = require("node:fs");
129460
129533
  var import_promises8 = require("node:fs/promises");
129461
129534
  var import_node_path11 = require("node:path");
129535
+
129536
+ // src/services/spinner.ts
129537
+ var import_picocolors = __toESM(require_picocolors());
129538
+ var SPINNER_FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
129539
+ var SPINNER_INTERVAL_MS = 80;
129540
+ function createSpinner(message) {
129541
+ let frameIndex = 0;
129542
+ let currentMessage = message;
129543
+ const render = () => {
129544
+ const frame = import_picocolors.default.cyan(SPINNER_FRAMES[frameIndex]);
129545
+ process.stderr.write(`\r ${frame} ${import_picocolors.default.dim(currentMessage)}`);
129546
+ frameIndex = (frameIndex + 1) % SPINNER_FRAMES.length;
129547
+ };
129548
+ render();
129549
+ const interval = setInterval(render, SPINNER_INTERVAL_MS);
129550
+ return {
129551
+ update(newMessage) {
129552
+ currentMessage = newMessage;
129553
+ },
129554
+ stop() {
129555
+ clearInterval(interval);
129556
+ process.stderr.write(`\r${" ".repeat(currentMessage.length + 10)}\r`);
129557
+ }
129558
+ };
129559
+ }
129560
+
129561
+ // src/services/piAgentLauncher.ts
129462
129562
  var DOCYRUS_EXTERNAL_SKILL_SOURCE = "docyrus/agent-skills";
129463
129563
  var DOCYRUS_PACKAGED_PLATFORM_SKILL_NAME = "docyrus-platform";
129464
129564
  var DOCYRUS_MIGRATED_SKILL_NAMES = [
@@ -129876,11 +129976,13 @@ function createPiAgentLauncher(options2) {
129876
129976
  request,
129877
129977
  stdinIsTTY
129878
129978
  });
129979
+ const spinner = createSpinner("Initializing...");
129879
129980
  const activeEnvironment = await options2.environmentConfigService.getActiveEnvironment();
129880
129981
  const activeProfile = await options2.authStore.getActiveProfile(activeEnvironment.apiBaseUrl);
129881
129982
  const settingsRootPath = options2.settingsPaths.rootPath;
129882
129983
  const agentRootPath = resolveDocyrusPiAgentRootPath(settingsRootPath);
129883
129984
  const resourceRoot = resolveResourceRoot({ cwd });
129985
+ spinner.update("Syncing skills...");
129884
129986
  await syncPackagedSkills({
129885
129987
  resourceRoot,
129886
129988
  agentRootPath
@@ -129895,6 +129997,7 @@ function createPiAgentLauncher(options2) {
129895
129997
  settingsRootPath
129896
129998
  })
129897
129999
  });
130000
+ spinner.update("Installing skills...");
129898
130001
  await installExternalDocyrusSkillsOnce({
129899
130002
  agentRootPath,
129900
130003
  cwd,
@@ -129907,11 +130010,13 @@ function createPiAgentLauncher(options2) {
129907
130010
  scope: options2.settingsPaths.scope,
129908
130011
  spawnCommand
129909
130012
  });
130013
+ spinner.update("Installing tools...");
129910
130014
  const diffity = await ensureManagedDiffityInstalled({
129911
130015
  agentRootPath,
129912
130016
  cwd,
129913
130017
  spawnCommand
129914
130018
  });
130019
+ spinner.stop();
129915
130020
  const loaderEntryPath = resolveLoaderPath({ cwd });
129916
130021
  const cliEntryPath = resolveCliEntryPath({ cwd });
129917
130022
  const piPackageRoot = resolvePiPackageRoot({ cwd });
@@ -129987,11 +130092,13 @@ function resolveServerLoaderEntryPath(cwd, dirname7) {
129987
130092
  function createPiAgentServerLauncher(options2) {
129988
130093
  const cwd = options2.cwd ?? process.cwd();
129989
130094
  return async (request) => {
130095
+ const spinner = createSpinner("Initializing...");
129990
130096
  const activeEnvironment = await options2.environmentConfigService.getActiveEnvironment();
129991
130097
  const activeProfile = await options2.authStore.getActiveProfile(activeEnvironment.apiBaseUrl);
129992
130098
  const settingsRootPath = options2.settingsPaths.rootPath;
129993
130099
  const agentRootPath = resolveDocyrusPiAgentRootPath(settingsRootPath);
129994
130100
  const resourceRoot = resolvePackagedPiResourceRoot({ cwd });
130101
+ spinner.update("Syncing skills...");
129995
130102
  await syncPackagedSkills({
129996
130103
  resourceRoot,
129997
130104
  agentRootPath
@@ -130006,6 +130113,7 @@ function createPiAgentServerLauncher(options2) {
130006
130113
  settingsRootPath
130007
130114
  })
130008
130115
  });
130116
+ spinner.update("Installing skills...");
130009
130117
  await installExternalDocyrusSkillsOnce({
130010
130118
  agentRootPath,
130011
130119
  cwd,
@@ -130018,6 +130126,7 @@ function createPiAgentServerLauncher(options2) {
130018
130126
  scope: options2.settingsPaths.scope,
130019
130127
  spawnCommand: import_node_child_process5.spawnSync
130020
130128
  });
130129
+ spinner.stop();
130021
130130
  const loaderEntryPath = resolveServerLoaderEntryPath(cwd, __dirname);
130022
130131
  const piPackageRoot = resolveInstalledPiPackageRootPath({ cwd });
130023
130132
  const child = (0, import_node_child_process5.spawn)(process.execPath, [loaderEntryPath], {