@quanta-intellect/vessel-browser 0.1.63 → 0.1.65

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.
@@ -1486,6 +1486,43 @@ const TitleBar = () => {
1486
1486
  })();
1487
1487
  };
1488
1488
  delegateEvents(["click"]);
1489
+ function getEnvFlag(name) {
1490
+ const globalProcess = typeof globalThis === "object" && "process" in globalThis ? globalThis.process : void 0;
1491
+ return globalProcess?.env?.[name];
1492
+ }
1493
+ function isDebugEnabled() {
1494
+ const value = getEnvFlag("VESSEL_DEBUG")?.trim().toLowerCase();
1495
+ return value === "1" || value === "true" || value === "yes" || value === "on";
1496
+ }
1497
+ function writeLog(level, scope, args) {
1498
+ if (level === "debug" && !isDebugEnabled()) {
1499
+ return;
1500
+ }
1501
+ const prefix = `[Vessel ${scope}]`;
1502
+ switch (level) {
1503
+ case "debug":
1504
+ console.debug(prefix, ...args);
1505
+ return;
1506
+ case "info":
1507
+ console.info(prefix, ...args);
1508
+ return;
1509
+ case "warn":
1510
+ console.warn(prefix, ...args);
1511
+ return;
1512
+ case "error":
1513
+ console.error(prefix, ...args);
1514
+ return;
1515
+ }
1516
+ }
1517
+ function createLogger(scope) {
1518
+ return {
1519
+ debug: (...args) => writeLog("debug", scope, args),
1520
+ info: (...args) => writeLog("info", scope, args),
1521
+ warn: (...args) => writeLog("warn", scope, args),
1522
+ error: (...args) => writeLog("error", scope, args)
1523
+ };
1524
+ }
1525
+ const logger$5 = createLogger("TabsStore");
1489
1526
  const [tabs, setTabs] = createSignal([]);
1490
1527
  const [activeTabId, setActiveTabId] = createSignal("");
1491
1528
  let initialized$4 = false;
@@ -1508,7 +1545,7 @@ async function doInit() {
1508
1545
  setActiveTabId(initialState.activeId);
1509
1546
  } catch (error) {
1510
1547
  initialized$4 = false;
1511
- console.error("Failed to initialize tabs store", error);
1548
+ logger$5.error("Failed to initialize tabs store:", error);
1512
1549
  throw error;
1513
1550
  }
1514
1551
  }
@@ -1570,6 +1607,7 @@ function useNow() {
1570
1607
  }
1571
1608
  return now;
1572
1609
  }
1610
+ const logger$4 = createLogger("RuntimeStore");
1573
1611
  const DEFAULT_RUNTIME_STATE = {
1574
1612
  session: null,
1575
1613
  supervisor: {
@@ -1602,7 +1640,7 @@ async function init$3() {
1602
1640
  });
1603
1641
  } catch (error) {
1604
1642
  initialized$3 = false;
1605
- console.error("Failed to initialize runtime store", error);
1643
+ logger$4.error("Failed to initialize runtime store:", error);
1606
1644
  } finally {
1607
1645
  initPromise$2 = null;
1608
1646
  }
@@ -3462,6 +3500,7 @@ const CommandBar = () => {
3462
3500
  });
3463
3501
  };
3464
3502
  delegateEvents(["click", "input", "keydown"]);
3503
+ const logger$3 = createLogger("HistoryStore");
3465
3504
  const INITIAL$1 = { entries: [] };
3466
3505
  const [historyState, setHistoryState] = createSignal(INITIAL$1);
3467
3506
  let initialized$1 = false;
@@ -3477,7 +3516,7 @@ async function init$1() {
3477
3516
  window.vessel.history.onUpdate((s) => setHistoryState(s));
3478
3517
  } catch (error) {
3479
3518
  initialized$1 = false;
3480
- console.error("Failed to initialize history store", error);
3519
+ logger$3.error("Failed to initialize history store:", error);
3481
3520
  } finally {
3482
3521
  initPromise$1 = null;
3483
3522
  }
@@ -3492,6 +3531,7 @@ function useHistory() {
3492
3531
  clear: () => window.vessel.history.clear()
3493
3532
  };
3494
3533
  }
3534
+ const logger$2 = createLogger("BookmarksStore");
3495
3535
  const INITIAL = { folders: [], bookmarks: [] };
3496
3536
  const [bookmarksState, setBookmarksState] = createSignal(INITIAL);
3497
3537
  let initialized = false;
@@ -3507,7 +3547,7 @@ async function init() {
3507
3547
  window.vessel.bookmarks.onUpdate((s) => setBookmarksState(s));
3508
3548
  } catch (error) {
3509
3549
  initialized = false;
3510
- console.error("Failed to initialize bookmarks store", error);
3550
+ logger$2.error("Failed to initialize bookmarks store:", error);
3511
3551
  } finally {
3512
3552
  initPromise = null;
3513
3553
  }
@@ -5324,6 +5364,7 @@ const BUNDLED_KIT_IDS = /* @__PURE__ */ new Set([
5324
5364
  "price-scout",
5325
5365
  "form-filler"
5326
5366
  ]);
5367
+ const logger$1 = createLogger("AutomationKits");
5327
5368
  const BUNDLED_KITS = [
5328
5369
  {
5329
5370
  id: "research-collect",
@@ -5457,8 +5498,8 @@ Steps:
5457
5498
  function renderKitPrompt(kit, values) {
5458
5499
  for (const input of kit.inputs) {
5459
5500
  if (input.required && !values[input.key]?.trim()) {
5460
- console.warn(
5461
- `[automation-kits] Required field "${input.key}" is empty for kit "${kit.id}".`
5501
+ logger$1.warn(
5502
+ `Required field "${input.key}" is empty for kit "${kit.id}".`
5462
5503
  );
5463
5504
  }
5464
5505
  }
@@ -8628,6 +8669,7 @@ const CHAT_PROVIDERS = Object.values(PROVIDERS).map((p) => ({
8628
8669
  defaultModel: p.defaultModel,
8629
8670
  models: p.models
8630
8671
  }));
8672
+ const logger = createLogger("Settings");
8631
8673
  const Settings = () => {
8632
8674
  const {
8633
8675
  settingsOpen: settingsOpen2,
@@ -8657,7 +8699,8 @@ const Settings = () => {
8657
8699
  try {
8658
8700
  const sessions = await window.vessel.sessions.list();
8659
8701
  setSessionList(sessions);
8660
- } catch {
8702
+ } catch (err) {
8703
+ logger.warn("Failed to load named sessions list:", err);
8661
8704
  }
8662
8705
  };
8663
8706
  const [vaultEntries, setVaultEntries] = createSignal([]);
@@ -8689,7 +8732,8 @@ const Settings = () => {
8689
8732
  try {
8690
8733
  const profiles = await window.vessel.autofill.list();
8691
8734
  setAutofillProfiles(profiles);
8692
- } catch {
8735
+ } catch (err) {
8736
+ logger.warn("Failed to load autofill profiles:", err);
8693
8737
  }
8694
8738
  };
8695
8739
  const handleAutofillAdd = async () => {
@@ -8777,7 +8821,8 @@ const Settings = () => {
8777
8821
  try {
8778
8822
  const entries2 = await window.vessel.vault.list();
8779
8823
  setVaultEntries(entries2);
8780
- } catch {
8824
+ } catch (err) {
8825
+ logger.warn("Failed to load vault entries:", err);
8781
8826
  }
8782
8827
  };
8783
8828
  const handleVaultAdd = async () => {
@@ -8824,7 +8869,8 @@ const Settings = () => {
8824
8869
  kind: "success",
8825
8870
  text: "Credential removed."
8826
8871
  });
8827
- } catch {
8872
+ } catch (err) {
8873
+ logger.warn("Failed to remove credential:", err);
8828
8874
  setVaultMessage({
8829
8875
  kind: "error",
8830
8876
  text: "Failed to remove credential."
@@ -8850,7 +8896,8 @@ const Settings = () => {
8850
8896
  const s = premiumState().status;
8851
8897
  return s === "active" || s === "trialing";
8852
8898
  };
8853
- const trackPremiumContext = (step) => window.vessel.premium.trackContext(step).catch(() => {
8899
+ const trackPremiumContext = (step) => window.vessel.premium.trackContext(step).catch((err) => {
8900
+ logger.warn("Failed to track premium context:", err);
8854
8901
  });
8855
8902
  const startPremiumCheckout = () => {
8856
8903
  void window.vessel.premium.checkout(premiumEmail().trim() || void 0);
@@ -8902,7 +8949,8 @@ const Settings = () => {
8902
8949
  setModelFetchWarning(null);
8903
8950
  setModelFetchState("error");
8904
8951
  }
8905
- }).catch(() => {
8952
+ }).catch((err) => {
8953
+ logger.warn("Failed to fetch provider models:", err);
8906
8954
  setProviderModels([]);
8907
8955
  setModelFetchWarning(null);
8908
8956
  setModelFetchState("error");
@@ -8967,7 +9015,8 @@ const Settings = () => {
8967
9015
  const ps = await window.vessel.premium.getState();
8968
9016
  setPremiumState(ps);
8969
9017
  if (ps.email) setPremiumEmail(ps.email);
8970
- } catch {
9018
+ } catch (err) {
9019
+ logger.warn("Failed to load premium state:", err);
8971
9020
  }
8972
9021
  await loadVaultEntries();
8973
9022
  await loadSessionList();
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; connect-src 'self'; font-src 'self' data:;" />
7
7
  <title>Vessel</title>
8
- <script type="module" crossorigin src="./assets/index-B2vPgkX2.js"></script>
8
+ <script type="module" crossorigin src="./assets/index-BQjjFSb1.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="./assets/index-4OgPv5GF.css">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@quanta-intellect/vessel-browser",
3
3
  "mcpName": "io.github.unmodeled-tyler/vessel-browser",
4
- "version": "0.1.63",
4
+ "version": "0.1.65",
5
5
  "description": "AI-native web browser runtime for autonomous agents with human supervision",
6
6
  "main": "./out/main/index.js",
7
7
  "bin": {