viyv-daemon 0.1.5 → 0.1.6

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.js CHANGED
@@ -14644,7 +14644,7 @@ var LocalSocketServer = class _LocalSocketServer extends EventEmitter {
14644
14644
  };
14645
14645
 
14646
14646
  // src/socket/handlers.ts
14647
- var PACKAGE_VERSION = "0.1.5";
14647
+ var PACKAGE_VERSION = "0.1.6";
14648
14648
  function createSocketHandler(daemon) {
14649
14649
  return async (_clientId, message) => {
14650
14650
  switch (message.type) {
@@ -38582,7 +38582,7 @@ var IpcEventManager = class {
38582
38582
  };
38583
38583
 
38584
38584
  // src/managers/message-router-manager.ts
38585
- var PACKAGE_VERSION2 = "0.1.5";
38585
+ var PACKAGE_VERSION2 = "0.1.6";
38586
38586
  var MessageRouterManager = class {
38587
38587
  deps;
38588
38588
  constructor(deps) {
@@ -49346,19 +49346,6 @@ function drawStepIndicator(current, total) {
49346
49346
  console.log(chalk2.gray(` Step ${current} of ${total} `) + progress);
49347
49347
  console.log("");
49348
49348
  }
49349
- function drawInfoBox(content, icon = "\u2139\uFE0F") {
49350
- console.log("");
49351
- console.log(chalk2.bgCyan.black(` ${icon} INFO `));
49352
- for (const line of content) {
49353
- console.log(chalk2.cyan(" \u2502 ") + line);
49354
- }
49355
- console.log("");
49356
- }
49357
- function drawBulletList(items, bullet = "\u2605") {
49358
- for (const item of items) {
49359
- console.log(chalk2.yellow(` ${bullet} `) + item);
49360
- }
49361
- }
49362
49349
  function emptyLines(count2) {
49363
49350
  for (let i = 0; i < count2; i++) {
49364
49351
  console.log("");
@@ -49388,201 +49375,34 @@ function drawLogo() {
49388
49375
  console.log(colorFn(lines[i]));
49389
49376
  }
49390
49377
  }
49391
- function drawHeader(title, subtitle) {
49392
- const width = 52;
49393
- const topBorder = "\u256D" + "\u2500".repeat(width) + "\u256E";
49394
- const bottomBorder = "\u2570" + "\u2500".repeat(width) + "\u256F";
49395
- console.log(chalk2.cyan(topBorder));
49396
- console.log(chalk2.cyan("\u2502") + " ".repeat(width) + chalk2.cyan("\u2502"));
49397
- const titlePadding = Math.floor((width - visibleLength(title)) / 2);
49398
- const titleLine = " ".repeat(titlePadding) + chalk2.bold.white(title) + " ".repeat(width - titlePadding - visibleLength(title));
49399
- console.log(chalk2.cyan("\u2502") + titleLine + chalk2.cyan("\u2502"));
49400
- if (subtitle) {
49401
- const subPadding = Math.floor((width - visibleLength(subtitle)) / 2);
49402
- const subLine = " ".repeat(subPadding) + chalk2.gray(subtitle) + " ".repeat(width - subPadding - visibleLength(subtitle));
49403
- console.log(chalk2.cyan("\u2502") + subLine + chalk2.cyan("\u2502"));
49404
- }
49405
- console.log(chalk2.cyan("\u2502") + " ".repeat(width) + chalk2.cyan("\u2502"));
49406
- console.log(chalk2.cyan(bottomBorder));
49407
- }
49408
49378
 
49409
49379
  // src/cli/onboarding/welcome-screen.ts
49410
- var VERSION = "0.1.5";
49411
- function showWelcomeScreen() {
49380
+ var VERSION = "0.1.6";
49381
+ function showCompactWelcome() {
49412
49382
  console.clear();
49413
49383
  emptyLines(1);
49414
49384
  drawLogo();
49415
49385
  emptyLines(1);
49416
- drawHeader("Welcome to viyv-daemon!", `v${VERSION} \u2022 Multi-Agent Orchestration`);
49386
+ console.log(chalk3.bold.white(" Welcome to viyv-daemon! ") + chalk3.gray(`(v${VERSION})`));
49417
49387
  emptyLines(1);
49418
- console.log(chalk3.white(" viyv \u306F\u3001AI\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3092\u30ED\u30FC\u30AB\u30EB\u3067\u5B9F\u884C\u3057\u3001"));
49419
- console.log(chalk3.white(" \u30C1\u30FC\u30E0\u3068\u9023\u643A\u3057\u3066\u30BF\u30B9\u30AF\u3092\u81EA\u52D5\u5316\u3059\u308B\u30B7\u30B9\u30C6\u30E0\u3067\u3059\u3002"));
49420
- emptyLines(1);
49421
- console.log(chalk3.bold.cyan(" \u4E3B\u306A\u6A5F\u80FD:"));
49422
- console.log("");
49423
- drawBulletList([
49424
- "\u30ED\u30FC\u30AB\u30EB\u3067AI\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3092\u5B9F\u884C",
49425
- "\u8907\u6570\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u306E\u9023\u643A\u30FB\u5354\u8ABF",
49426
- "\u30C1\u30FC\u30E0\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u3068\u306E\u540C\u671F",
49427
- "\u30BF\u30B9\u30AF\u306E\u30B9\u30B1\u30B8\u30E5\u30FC\u30EB\u5B9F\u884C"
49428
- ]);
49388
+ console.log(chalk3.white(" \u30C1\u30FC\u30E0\u306E Hub \u306B\u63A5\u7D9A\u3059\u308B\u305F\u3081\u306E\u60C5\u5831\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002"));
49389
+ console.log(chalk3.gray(" \uFF08\u7BA1\u7406\u8005\u304B\u3089\u63D0\u4F9B\u3055\u308C\u305F URL \u3092\u4F7F\u7528\u3057\u307E\u3059\uFF09"));
49429
49390
  emptyLines(1);
49430
49391
  }
49431
49392
 
49432
49393
  // src/cli/onboarding/concepts-guide.ts
49433
49394
  import chalk4 from "chalk";
49434
- function getDisplayWidth(str) {
49435
- let width = 0;
49436
- for (const char of str) {
49437
- const code = char.codePointAt(0) ?? 0;
49438
- if (code >= 127744 && code <= 129750) {
49439
- width += 2;
49440
- } else if (code >= 19968 && code <= 40959 || // CJK Unified
49441
- code >= 12288 && code <= 12351 || // CJK Punctuation
49442
- code >= 12352 && code <= 12447 || // Hiragana
49443
- code >= 12448 && code <= 12543 || // Katakana
49444
- code >= 65280 && code <= 65519) {
49445
- width += 2;
49446
- } else if (code === 8592) {
49447
- width += 1;
49448
- } else {
49449
- width += 1;
49450
- }
49451
- }
49452
- return width;
49453
- }
49454
- function padEndDisplay(str, targetWidth) {
49455
- const currentWidth = getDisplayWidth(str);
49456
- if (currentWidth >= targetWidth) return str;
49457
- return str + " ".repeat(targetWidth - currentWidth);
49458
- }
49459
- var CONCEPTS = [
49460
- {
49461
- name: "\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9",
49462
- nameEn: "Workspace",
49463
- icon: "\u{1F4C1}",
49464
- description: "\u30C1\u30FC\u30E0\u306E\u5171\u6709\u74B0\u5883\u3002\u30BF\u30B9\u30AF\u30FB\u8A2D\u5B9A\u3092\u7BA1\u7406"
49465
- },
49466
- {
49467
- name: "\u30CE\u30FC\u30C9",
49468
- nameEn: "Node",
49469
- icon: "\u{1F4BB}",
49470
- description: "\u3042\u306A\u305F\u306EPC\u3067\u52D5\u304F\u30C7\u30FC\u30E2\u30F3 \u2190 \u4ECA\u30B3\u30B3\uFF01",
49471
- highlight: true
49472
- },
49473
- {
49474
- name: "\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8",
49475
- nameEn: "Agent",
49476
- icon: "\u{1F916}",
49477
- description: "\u30BF\u30B9\u30AF\u3092\u5B9F\u884C\u3059\u308BAI\u30A2\u30B7\u30B9\u30BF\u30F3\u30C8"
49478
- },
49479
- {
49480
- name: "\u30CF\u30D6",
49481
- nameEn: "Hub",
49482
- icon: "\u{1F310}",
49483
- description: "\u4E2D\u592E\u30B5\u30FC\u30D0\u30FC\u3002\u5168\u30CE\u30FC\u30C9\u3092\u8ABF\u6574\u30FB\u540C\u671F"
49484
- }
49485
- ];
49486
- var TABLE_WIDTH = 60;
49487
- function showConceptsGuide() {
49488
- drawSectionHeader("Key Concepts", "\u{1F4DA}");
49489
- console.log(chalk4.gray(" \u250C" + "\u2500".repeat(TABLE_WIDTH) + "\u2510"));
49490
- for (let i = 0; i < CONCEPTS.length; i++) {
49491
- const concept = CONCEPTS[i];
49492
- showConceptRow(concept, i === CONCEPTS.length - 1);
49493
- }
49494
- console.log(chalk4.gray(" \u2514" + "\u2500".repeat(TABLE_WIDTH) + "\u2518"));
49495
- emptyLines(1);
49496
- showCompactArchitecture();
49497
- }
49498
- function showConceptRow(concept, isLast) {
49499
- const iconPart = concept.icon + " ";
49500
- const namePart = padEndDisplay(concept.nameEn, 10);
49501
- const jpNamePart = padEndDisplay(`(${concept.name})`, 12);
49502
- const descPart = concept.description;
49503
- const contentWidth = 2 + getDisplayWidth(iconPart) + 10 + 12 + getDisplayWidth(descPart);
49504
- const padding = Math.max(0, TABLE_WIDTH - contentWidth);
49505
- const coloredName = concept.highlight ? chalk4.bold.cyan(namePart) : chalk4.bold.white(namePart);
49506
- const coloredJpName = chalk4.gray(jpNamePart);
49507
- const coloredDesc = concept.highlight ? chalk4.cyan(descPart) : chalk4.white(descPart);
49508
- const row = ` ${iconPart}${coloredName}${coloredJpName}${coloredDesc}${" ".repeat(padding)} `;
49509
- console.log(chalk4.gray(" \u2502") + row + chalk4.gray("\u2502"));
49510
- if (!isLast) {
49511
- console.log(chalk4.gray(" \u251C" + "\u2500".repeat(TABLE_WIDTH) + "\u2524"));
49512
- }
49513
- }
49514
- function showCompactArchitecture() {
49515
- console.log(chalk4.bold.cyan(" System Overview:"));
49516
- console.log("");
49517
- console.log(chalk4.gray(" \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"));
49518
- console.log(chalk4.gray(" \u2502") + chalk4.cyan(" HUB ") + chalk4.gray("\u2502"));
49519
- console.log(chalk4.gray(" \u2514\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2518"));
49520
- console.log(chalk4.gray(" \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"));
49521
- console.log(chalk4.gray(" \u2502 \u2502 \u2502"));
49522
- console.log(chalk4.gray(" \u250C\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2510 \u250C\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2510 \u250C\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2510"));
49523
- console.log(chalk4.gray(" \u2502") + chalk4.green(" Node A ") + chalk4.gray("\u2502 \u2502") + chalk4.yellow(" You ") + chalk4.gray("\u2502 \u2502") + chalk4.magenta(" Node C ") + chalk4.gray("\u2502"));
49524
- console.log(chalk4.gray(" \u2514\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2518"));
49525
- console.log(chalk4.gray(" \u2502 \u2502 \u2502"));
49526
- console.log(chalk4.gray(" ") + chalk4.cyan("Agent") + chalk4.gray(" ") + chalk4.cyan.bold("Agent") + chalk4.gray(" ") + chalk4.cyan("Agent"));
49527
- console.log("");
49528
- console.log(chalk4.gray(" \u{1F4A1} \u5168\u3066\u306E\u30CE\u30FC\u30C9\u306F Workspace \u5185\u3067\u9023\u643A\u3057\u30BF\u30B9\u30AF\u3092\u5171\u6709"));
49529
- console.log("");
49530
- }
49531
49395
 
49532
49396
  // src/cli/onboarding/features-overview.ts
49533
49397
  import chalk5 from "chalk";
49534
- var DAEMON_TYPES = [
49535
- {
49536
- name: "\u958B\u767A",
49537
- nameEn: "Development",
49538
- icon: "\u{1F6E0}\uFE0F",
49539
- color: chalk5.green,
49540
- features: ["\u30B3\u30FC\u30C9\u751F\u6210", "\u30C7\u30D0\u30C3\u30B0\u652F\u63F4", "PR\u30EC\u30D3\u30E5\u30FC", "\u30C7\u30D7\u30ED\u30A4\u81EA\u52D5\u5316"]
49541
- },
49542
- {
49543
- name: "PM",
49544
- nameEn: "Project Mgmt",
49545
- icon: "\u{1F4CB}",
49546
- color: chalk5.blue,
49547
- features: ["\u30BF\u30B9\u30AF\u7BA1\u7406", "\u9032\u6357\u30EC\u30DD\u30FC\u30C8", "\u30EA\u30B9\u30AF\u7BA1\u7406"]
49548
- },
49549
- {
49550
- name: "CS",
49551
- nameEn: "Support",
49552
- icon: "\u{1F3A7}",
49553
- color: chalk5.yellow,
49554
- features: ["\u9867\u5BA2\u5BFE\u5FDC", "\u30CA\u30EC\u30C3\u30B8\u7BA1\u7406"]
49555
- },
49556
- {
49557
- name: "QA",
49558
- nameEn: "Quality",
49559
- icon: "\u{1F50D}",
49560
- color: chalk5.magenta,
49561
- features: ["\u30C6\u30B9\u30C8\u8A08\u753B", "\u30D0\u30B0\u8FFD\u8DE1", "\u54C1\u8CEA\u6307\u6A19"]
49562
- },
49563
- {
49564
- name: "\u6C4E\u7528",
49565
- nameEn: "General",
49566
- icon: "\u2699\uFE0F",
49567
- color: chalk5.cyan,
49568
- features: ["\u696D\u52D9\u81EA\u52D5\u5316", "\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8", "\u30C7\u30FC\u30BF\u5206\u6790"]
49569
- }
49570
- ];
49571
- function showFeaturesOverview() {
49572
- drawSectionHeader("What You Can Do", "\u{1F680}");
49573
- for (let i = 0; i < DAEMON_TYPES.length; i++) {
49574
- const daemon = DAEMON_TYPES[i];
49575
- showDaemonCard(daemon);
49576
- }
49577
- emptyLines(1);
49578
- console.log(chalk5.gray(" \u{1F4A1} Tip: \u30C7\u30FC\u30E2\u30F3\u306F\u5F8C\u304B\u3089 ") + chalk5.cyan("viyv-daemon create") + chalk5.gray(" \u3067\u4F5C\u6210\u3067\u304D\u307E\u3059"));
49579
- console.log("");
49580
- }
49581
- function showDaemonCard(daemon) {
49582
- const header = `${daemon.icon} ${daemon.color.bold(daemon.nameEn)} ${chalk5.gray(`(${daemon.name})`)}`;
49583
- const features = daemon.features.map((f) => chalk5.white(f)).join(chalk5.gray(" \u2022 "));
49584
- console.log(` ${header}`);
49585
- console.log(` ${features}`);
49398
+ function showCompactCapabilities() {
49399
+ console.log(chalk5.bold.cyan(" \u2728 \u3067\u304D\u308B\u3053\u3068:"));
49400
+ console.log(`${chalk5.yellow(" \u{1F4AC} ")}\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3068\u30C1\u30E3\u30C3\u30C8\u30FB\u30BF\u30B9\u30AF\u6307\u793A`);
49401
+ console.log(`${chalk5.yellow(" \u{1F517} ")}Slack\u30FBGmail\u30FBCalendar \u9023\u643A`);
49402
+ console.log(`${chalk5.yellow(" \u26A1 ")}\u30A4\u30D9\u30F3\u30C8\u30C8\u30EA\u30AC\u30FC\u3067\u81EA\u52D5\u5B9F\u884C`);
49403
+ console.log(
49404
+ `${chalk5.yellow(" \u{1F6E0}\uFE0F ")}${chalk5.gray("\u7528\u9014\u5225\u30D7\u30EA\u30BB\u30C3\u30C8 (Dev / PM / CS / QA / General)")}`
49405
+ );
49586
49406
  console.log("");
49587
49407
  }
49588
49408
 
@@ -49642,47 +49462,20 @@ async function showWorkspaceCreationGuide(enrollUrl) {
49642
49462
  }
49643
49463
 
49644
49464
  // src/cli/onboarding/setup-wizard.ts
49645
- import chalk7 from "chalk";
49646
- import { confirm as confirm2, input as input2 } from "@inquirer/prompts";
49647
49465
  init_loader();
49648
- var TOTAL_STEPS = 5;
49466
+ import { confirm as confirm2, input as input2 } from "@inquirer/prompts";
49467
+ import chalk7 from "chalk";
49468
+ import open3 from "open";
49469
+ var TOTAL_STEPS = 2;
49649
49470
  async function runOnboardingWizard(checkResult) {
49650
49471
  try {
49651
- showWelcomeScreen();
49652
- drawStepIndicator(1, TOTAL_STEPS);
49653
- const shouldContinue = await confirm2({
49654
- message: "\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3092\u958B\u59CB\u3057\u307E\u3059\u304B\uFF1F",
49655
- default: true
49656
- });
49657
- if (!shouldContinue) {
49658
- console.log(chalk7.gray("\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3092\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u307E\u3057\u305F\u3002"));
49659
- return false;
49660
- }
49661
- console.clear();
49662
- showConceptsGuide();
49663
- drawStepIndicator(2, TOTAL_STEPS);
49664
- await confirm2({
49665
- message: "\u7D9A\u884C\u3057\u307E\u3059\u304B\uFF1F",
49666
- default: true
49667
- });
49668
- console.clear();
49669
- showFeaturesOverview();
49670
- drawStepIndicator(3, TOTAL_STEPS);
49671
- await confirm2({
49672
- message: "\u7D9A\u884C\u3057\u307E\u3059\u304B\uFF1F",
49673
- default: true
49674
- });
49675
- console.clear();
49676
- const urlConfigSuccess = await configureUrls(checkResult, 4, TOTAL_STEPS);
49677
- if (!urlConfigSuccess) {
49678
- return false;
49679
- }
49472
+ showCompactWelcome();
49473
+ const urlSuccess = await configureUrls(checkResult, 1, TOTAL_STEPS);
49474
+ if (!urlSuccess) return false;
49680
49475
  console.clear();
49681
- const enrollSuccess = await runEnrollment(5, TOTAL_STEPS);
49682
- if (!enrollSuccess) {
49683
- return false;
49684
- }
49685
- showSetupComplete();
49476
+ const enrollSuccess = await runEnrollment(2, TOTAL_STEPS);
49477
+ if (!enrollSuccess) return false;
49478
+ await showSetupComplete();
49686
49479
  return true;
49687
49480
  } catch (error) {
49688
49481
  if (error instanceof Error && error.message.includes("User force closed")) {
@@ -49694,19 +49487,8 @@ async function runOnboardingWizard(checkResult) {
49694
49487
  }
49695
49488
  }
49696
49489
  async function configureUrls(checkResult, step, totalSteps) {
49697
- console.log(chalk7.bold.cyan(" \u{1F517} Connection Setup"));
49698
- console.log(chalk7.gray(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
49699
- console.log("");
49700
49490
  let state = loadConfig();
49701
49491
  if (!checkResult.hasHubUrl) {
49702
- drawInfoBox(
49703
- [
49704
- "Hub URL\u306FWebSocket\u63A5\u7D9A\u5148\u3067\u3059\u3002",
49705
- "\u30C1\u30FC\u30E0\u306EHub\u7BA1\u7406\u8005\u304B\u3089\u63D0\u4F9B\u3055\u308C\u305FURL\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
49706
- "\u4F8B: wss://hub.viyv.io"
49707
- ],
49708
- "\u{1F310}"
49709
- );
49710
49492
  const hubUrl = await input2({
49711
49493
  message: "Hub URL (WebSocket):",
49712
49494
  default: state.config.cloudHubUrl || "wss://",
@@ -49720,18 +49502,9 @@ async function configureUrls(checkResult, step, totalSteps) {
49720
49502
  updateConfig({ cloudHubUrl: hubUrl });
49721
49503
  }
49722
49504
  if (!checkResult.hasEnrollUrl) {
49723
- emptyLines(1);
49724
- drawInfoBox(
49725
- [
49726
- "Enroll URL\u306F\u8A8D\u8A3C\u7528\u306EWeb\u30B5\u30FC\u30D0\u30FCURL\u3067\u3059\u3002",
49727
- "\u901A\u5E38\u306F\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u3068\u540C\u3058\u30C9\u30E1\u30A4\u30F3\u3067\u3059\u3002",
49728
- "\u4F8B: https://app.viyv.io"
49729
- ],
49730
- "\u{1F510}"
49731
- );
49732
49505
  state = loadConfig();
49733
49506
  const enrollUrl = await input2({
49734
- message: "Enroll URL (Web):",
49507
+ message: "Dashboard URL (Web):",
49735
49508
  default: state.config.enrollUrl || "https://",
49736
49509
  validate: (v) => {
49737
49510
  if (!v.startsWith("http://") && !v.startsWith("https://")) {
@@ -49743,11 +49516,11 @@ async function configureUrls(checkResult, step, totalSteps) {
49743
49516
  updateConfig({ enrollUrl });
49744
49517
  }
49745
49518
  emptyLines(1);
49746
- console.log(chalk7.green("\u2713 ") + "URL\u8A2D\u5B9A\u3092\u4FDD\u5B58\u3057\u307E\u3057\u305F");
49519
+ console.log(`${chalk7.green(" \u2713 ")}URL\u8A2D\u5B9A\u3092\u4FDD\u5B58\u3057\u307E\u3057\u305F`);
49747
49520
  emptyLines(1);
49748
49521
  drawStepIndicator(step, totalSteps);
49749
49522
  const shouldContinue = await confirm2({
49750
- message: "Enrollment\u3092\u958B\u59CB\u3057\u307E\u3059\u304B\uFF1F",
49523
+ message: "\u30C7\u30D0\u30A4\u30B9\u8A8D\u8A3C\u306B\u9032\u307F\u307E\u3059\u304B\uFF1F",
49751
49524
  default: true
49752
49525
  });
49753
49526
  return shouldContinue;
@@ -49756,20 +49529,9 @@ async function runEnrollment(step, totalSteps) {
49756
49529
  console.log(chalk7.bold.cyan(" \u{1F510} Device Enrollment"));
49757
49530
  console.log(chalk7.gray(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
49758
49531
  console.log("");
49759
- drawBox(
49760
- [
49761
- chalk7.bold.white("\u30C7\u30D0\u30A4\u30B9\u8A8D\u8A3C"),
49762
- "",
49763
- "\u30D6\u30E9\u30A6\u30B6\u304C\u958B\u304D\u307E\u3059\u3002\u8868\u793A\u3055\u308C\u305F\u30B3\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066",
49764
- "\u3053\u306E\u30C7\u30D0\u30A4\u30B9\u3092\u8A8D\u8A3C\u3057\u3066\u304F\u3060\u3055\u3044\u3002"
49765
- ],
49766
- {
49767
- style: "rounded",
49768
- borderColor: "cyan",
49769
- width: 50,
49770
- padding: 2
49771
- }
49772
- );
49532
+ console.log(chalk7.white(" \u30D6\u30E9\u30A6\u30B6\u304C\u958B\u304D\u307E\u3059\u3002\u8868\u793A\u3055\u308C\u305F\u30B3\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066"));
49533
+ console.log(chalk7.white(" \u3053\u306E\u30C7\u30D0\u30A4\u30B9\u3092\u8A8D\u8A3C\u3057\u3066\u304F\u3060\u3055\u3044\u3002"));
49534
+ console.log("");
49773
49535
  drawStepIndicator(step, totalSteps);
49774
49536
  const state = loadConfig();
49775
49537
  const success = await performEnrollment({
@@ -49779,12 +49541,14 @@ async function runEnrollment(step, totalSteps) {
49779
49541
  });
49780
49542
  return success;
49781
49543
  }
49782
- function showSetupComplete() {
49544
+ async function showSetupComplete() {
49783
49545
  console.clear();
49784
- emptyLines(2);
49546
+ emptyLines(1);
49785
49547
  console.log(chalk7.green(" \u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E"));
49786
49548
  console.log(chalk7.green(" \u2502 \u2502"));
49787
- console.log(chalk7.green(" \u2502") + chalk7.bold.white(" \u{1F389} Setup Complete! \u{1F389} ") + chalk7.green("\u2502"));
49549
+ console.log(
49550
+ chalk7.green(" \u2502") + chalk7.bold.white(" \u{1F389} Setup Complete! \u{1F389} ") + chalk7.green("\u2502")
49551
+ );
49788
49552
  console.log(chalk7.green(" \u2502 \u2502"));
49789
49553
  console.log(chalk7.green(" \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F"));
49790
49554
  emptyLines(1);
@@ -49792,25 +49556,50 @@ function showSetupComplete() {
49792
49556
  console.log(chalk7.bold.cyan(" \u{1F4CB} \u8A2D\u5B9A\u5185\u5BB9:"));
49793
49557
  console.log("");
49794
49558
  console.log(chalk7.gray(" \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"));
49795
- console.log(chalk7.gray(" \u2502 ") + chalk7.white("Node ID: ") + chalk7.cyan(state.config.nodeId.slice(0, 8) + "...").padEnd(30) + chalk7.gray(" \u2502"));
49796
- console.log(chalk7.gray(" \u2502 ") + chalk7.white("Workspace: ") + chalk7.cyan(state.config.workspaceId || "(not set)").padEnd(30) + chalk7.gray(" \u2502"));
49797
- console.log(chalk7.gray(" \u2502 ") + chalk7.white("Hub URL: ") + chalk7.cyan(truncateUrl(state.config.cloudHubUrl, 28)).padEnd(30) + chalk7.gray(" \u2502"));
49559
+ console.log(
49560
+ chalk7.gray(" \u2502 ") + chalk7.white("Node ID: ") + chalk7.cyan(`${state.config.nodeId.slice(0, 8)}...`).padEnd(30) + chalk7.gray(" \u2502")
49561
+ );
49562
+ console.log(
49563
+ chalk7.gray(" \u2502 ") + chalk7.white("Workspace: ") + chalk7.cyan(state.config.workspaceId || "(not set)").padEnd(30) + chalk7.gray(" \u2502")
49564
+ );
49565
+ console.log(
49566
+ chalk7.gray(" \u2502 ") + chalk7.white("Hub URL: ") + chalk7.cyan(truncateUrl(state.config.cloudHubUrl, 28)).padEnd(30) + chalk7.gray(" \u2502")
49567
+ );
49798
49568
  console.log(chalk7.gray(" \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"));
49799
49569
  emptyLines(1);
49570
+ showCompactCapabilities();
49800
49571
  console.log(chalk7.bold.cyan(" \u{1F680} \u6B21\u306E\u30B9\u30C6\u30C3\u30D7:"));
49801
- console.log("");
49802
- console.log(chalk7.yellow(" 1. ") + "\u30C7\u30FC\u30E2\u30F3\u3092\u4F5C\u6210 \u2192 " + chalk7.cyan("viyv-daemon create"));
49803
- console.log(chalk7.yellow(" 2. ") + "\u30C7\u30FC\u30E2\u30F3\u3092\u8D77\u52D5 \u2192 " + chalk7.cyan("viyv-daemon start"));
49804
- console.log("");
49572
+ console.log(chalk7.white(" \u30C7\u30FC\u30E2\u30F3\u306F\u81EA\u52D5\u7684\u306B\u8D77\u52D5\u3057\u307E\u3059\u3002"));
49573
+ console.log(chalk7.white(" \u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u304B\u3089\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3092\u4F5C\u6210\u3057\u3066\u304F\u3060\u3055\u3044\u3002"));
49574
+ emptyLines(1);
49575
+ const dashboardUrl = state.config.enrollUrl ? `${state.config.enrollUrl}/dashboard` : null;
49576
+ if (dashboardUrl) {
49577
+ const shouldOpen = await confirm2({
49578
+ message: `\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u3092\u958B\u304D\u307E\u3059\u304B\uFF1F \u2192 ${dashboardUrl}`,
49579
+ default: true
49580
+ });
49581
+ if (shouldOpen) {
49582
+ console.log("");
49583
+ console.log(chalk7.gray(` Opening: ${dashboardUrl}`));
49584
+ try {
49585
+ await open3(dashboardUrl);
49586
+ console.log(chalk7.green(" \u2713 \u30D6\u30E9\u30A6\u30B6\u3092\u958B\u304D\u307E\u3057\u305F"));
49587
+ } catch {
49588
+ console.log(
49589
+ chalk7.yellow(` \u30D6\u30E9\u30A6\u30B6\u3092\u958B\u3051\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u624B\u52D5\u3067\u958B\u3044\u3066\u304F\u3060\u3055\u3044: ${dashboardUrl}`)
49590
+ );
49591
+ }
49592
+ }
49593
+ }
49805
49594
  emptyLines(1);
49806
49595
  }
49807
49596
  function truncateUrl(url, maxLen) {
49808
49597
  if (url.length <= maxLen) return url;
49809
- return url.slice(0, maxLen - 3) + "...";
49598
+ return `${url.slice(0, maxLen - 3)}...`;
49810
49599
  }
49811
49600
 
49812
49601
  // src/cli/index.ts
49813
- var PACKAGE_VERSION3 = "0.1.5";
49602
+ var PACKAGE_VERSION3 = "0.1.6";
49814
49603
  function formatUptime(ms) {
49815
49604
  const seconds = Math.floor(ms / 1e3);
49816
49605
  const minutes = Math.floor(seconds / 60);
@@ -50697,7 +50486,7 @@ function printUpdateNotice(info) {
50697
50486
 
50698
50487
  // src/index.ts
50699
50488
  process.noDeprecation = true;
50700
- var PACKAGE_VERSION4 = "0.1.5";
50489
+ var PACKAGE_VERSION4 = "0.1.6";
50701
50490
  var KNOWN_COMMANDS = [
50702
50491
  "start",
50703
50492
  "stop",