@dxos/shell 0.7.0 → 0.7.1-staging.599df14

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.
@@ -1237,7 +1237,7 @@ import { FirstAidKit as FirstAidKit2, Key, Plugs, PlugsConnected } from "@phosph
1237
1237
  import React29, { useEffect as useEffect4, useMemo as useMemo3, useState as useState9 } from "react";
1238
1238
  import { generateName as generateName3 } from "@dxos/display-name";
1239
1239
  import { invariant as invariant3 } from "@dxos/invariant";
1240
- import { log as log6 } from "@dxos/log";
1240
+ import { log as log7 } from "@dxos/log";
1241
1241
  import { useClient as useClient6 } from "@dxos/react-client";
1242
1242
  import { useIdentity, useDevices, useHaloInvitations as useHaloInvitations2 } from "@dxos/react-client/halo";
1243
1243
  import { useInvitationStatus as useInvitationStatus2 } from "@dxos/react-client/invitations";
@@ -1437,6 +1437,7 @@ import { useClient as useClient5 } from "@dxos/react-client";
1437
1437
  // packages/sdk/shell/src/panels/IdentityPanel/useEdgeAgentsHandlers.ts
1438
1438
  import { useEffect as useEffect2, useState as useState6 } from "react";
1439
1439
  import { invariant } from "@dxos/invariant";
1440
+ import { log as log4 } from "@dxos/log";
1440
1441
  import { QueryAgentStatusResponse } from "@dxos/protocols/proto/dxos/client/services";
1441
1442
  import { EdgeReplicationSetting } from "@dxos/protocols/proto/dxos/echo/metadata";
1442
1443
  import { useClient as useClient3 } from "@dxos/react-client";
@@ -1475,7 +1476,7 @@ var useEdgeAgentHandlers = ({ identity }) => {
1475
1476
  const onAgentCreate = async () => {
1476
1477
  invariant(identity, "Identity not found", {
1477
1478
  F: __dxlog_file3,
1478
- L: 58,
1479
+ L: 59,
1479
1480
  S: void 0,
1480
1481
  A: [
1481
1482
  "identity",
@@ -1496,10 +1497,18 @@ var useEdgeAgentHandlers = ({ identity }) => {
1496
1497
  setAgentStatus("creating");
1497
1498
  setValidationMessage("");
1498
1499
  try {
1499
- await service.createAgent();
1500
+ await service.createAgent(null, {
1501
+ timeout: 7500
1502
+ });
1500
1503
  await Promise.all(client.spaces.get().map((space) => space?.internal.setEdgeReplicationPreference(EdgeReplicationSetting.ENABLED)));
1501
1504
  setAgentStatus("created");
1502
1505
  } catch (err) {
1506
+ log4.catch(err, void 0, {
1507
+ F: __dxlog_file3,
1508
+ L: 82,
1509
+ S: void 0,
1510
+ C: (f, a) => f(...a)
1511
+ });
1503
1512
  setAgentStatus("error");
1504
1513
  setValidationMessage(`Error creating an agent: ${err.message}`);
1505
1514
  }
@@ -1524,7 +1533,7 @@ var useEdgeAgentHandlers = ({ identity }) => {
1524
1533
  // packages/sdk/shell/src/panels/IdentityPanel/useKubeAgentHandlers.ts
1525
1534
  import { useCallback as useCallback4, useEffect as useEffect3, useState as useState7 } from "react";
1526
1535
  import { invariant as invariant2 } from "@dxos/invariant";
1527
- import { log as log4 } from "@dxos/log";
1536
+ import { log as log5 } from "@dxos/log";
1528
1537
  import { useClient as useClient4, useAgentHostingClient } from "@dxos/react-client";
1529
1538
  import { Invitation as Invitation3, InvitationEncoder as InvitationEncoder2 } from "@dxos/react-client/invitations";
1530
1539
  var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/useKubeAgentHandlers.ts";
@@ -1613,7 +1622,7 @@ var useKubeAgentHandlers = ({ invitations, identity }) => {
1613
1622
  const handleAgentCreate = useCallback4(async (invitation) => {
1614
1623
  const invitationCode = InvitationEncoder2.encode(invitation);
1615
1624
  if (invitation.state === Invitation3.State.CONNECTING) {
1616
- log4.info(JSON.stringify({
1625
+ log5.info(JSON.stringify({
1617
1626
  invitationCode,
1618
1627
  authCode: invitation.authCode
1619
1628
  }), void 0, {
@@ -1790,7 +1799,7 @@ var InvitationManager = ({ invitationUrl, active, send, status, multiUse, authCo
1790
1799
  // packages/sdk/shell/src/steps/ConfirmReset.tsx
1791
1800
  import { Warning } from "@phosphor-icons/react";
1792
1801
  import React28, { useState as useState8 } from "react";
1793
- import { log as log5 } from "@dxos/log";
1802
+ import { log as log6 } from "@dxos/log";
1794
1803
  import { Message, useTranslation as useTranslation13 } from "@dxos/react-ui";
1795
1804
  import { getSize as getSize12, mx as mx21 } from "@dxos/react-ui-theme";
1796
1805
  var __dxlog_file5 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/steps/ConfirmReset.tsx";
@@ -1801,7 +1810,7 @@ var ConfirmReset = ({ active, onCancel, onConfirm, mode }) => {
1801
1810
  const processReset = async () => {
1802
1811
  setPending(true);
1803
1812
  return onConfirm?.().then(() => setPending(false), (error) => {
1804
- log5.catch(error, void 0, {
1813
+ log6.catch(error, void 0, {
1805
1814
  F: __dxlog_file5,
1806
1815
  L: 38,
1807
1816
  S: void 0,
@@ -2079,7 +2088,7 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
2079
2088
  invitations
2080
2089
  });
2081
2090
  if (!identity) {
2082
- log6.error("IdentityPanel rendered with no active identity.", void 0, {
2091
+ log7.error("IdentityPanel rendered with no active identity.", void 0, {
2083
2092
  F: __dxlog_file6,
2084
2093
  L: 288,
2085
2094
  S: void 0,
@@ -2096,7 +2105,7 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
2096
2105
  const handleChangeConnectionState = async (nextState) => client?.mesh.updateConfig(nextState);
2097
2106
  useEffect4(() => {
2098
2107
  const subscription = identityService.subscribe((state) => {
2099
- log6("[state]", state, {
2108
+ log7("[state]", state, {
2100
2109
  F: __dxlog_file6,
2101
2110
  L: 301,
2102
2111
  S: void 0,
@@ -2152,7 +2161,7 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
2152
2161
 
2153
2162
  // packages/sdk/shell/src/panels/JoinPanel/JoinPanel.tsx
2154
2163
  import React38, { useCallback as useCallback6, useEffect as useEffect6, useMemo as useMemo4 } from "react";
2155
- import { log as log10 } from "@dxos/log";
2164
+ import { log as log11 } from "@dxos/log";
2156
2165
  import { useClient as useClient8, useMulticastObservable } from "@dxos/react-client";
2157
2166
  import { useIdentity as useIdentity2 } from "@dxos/react-client/halo";
2158
2167
  import { useId as useId8, useThemeContext as useThemeContext5 } from "@dxos/react-ui";
@@ -2194,12 +2203,12 @@ var JoinHeading = /* @__PURE__ */ forwardRef9(({ mode, titleId, exitActionParent
2194
2203
  import { useMachine as useMachine2 } from "@xstate/react";
2195
2204
  import { useCallback as useCallback5 } from "react";
2196
2205
  import { assign as assign2, createMachine as createMachine2 } from "xstate";
2197
- import { log as log7 } from "@dxos/log";
2206
+ import { log as log8 } from "@dxos/log";
2198
2207
  import { AlreadyJoinedError } from "@dxos/react-client";
2199
2208
  import { Invitation as Invitation5, InvitationEncoder as InvitationEncoder3 } from "@dxos/react-client/invitations";
2200
2209
  var __dxlog_file7 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/joinMachine.ts";
2201
2210
  var getInvitationSubscribable = (Kind, invitation) => {
2202
- log7("[subscribing to invitation]", invitation, {
2211
+ log8("[subscribing to invitation]", invitation, {
2203
2212
  F: __dxlog_file7,
2204
2213
  L: 90,
2205
2214
  S: void 0,
@@ -2209,7 +2218,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
2209
2218
  subscribe: (next, onError, complete) => invitation.subscribe((invitation2) => {
2210
2219
  switch (invitation2.state) {
2211
2220
  case Invitation5.State.CONNECTING: {
2212
- log7("[invitation connecting]", {
2221
+ log8("[invitation connecting]", {
2213
2222
  Kind,
2214
2223
  invitation: invitation2
2215
2224
  }, {
@@ -2224,7 +2233,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
2224
2233
  });
2225
2234
  }
2226
2235
  case Invitation5.State.CONNECTED: {
2227
- log7("[invitation connected]", {
2236
+ log8("[invitation connected]", {
2228
2237
  Kind,
2229
2238
  invitation: invitation2
2230
2239
  }, {
@@ -2239,7 +2248,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
2239
2248
  });
2240
2249
  }
2241
2250
  case Invitation5.State.READY_FOR_AUTHENTICATION: {
2242
- log7("[invitation ready for authentication]", {
2251
+ log8("[invitation ready for authentication]", {
2243
2252
  Kind,
2244
2253
  invitation: invitation2
2245
2254
  }, {
@@ -2254,7 +2263,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
2254
2263
  });
2255
2264
  }
2256
2265
  case Invitation5.State.AUTHENTICATING: {
2257
- log7("[invitation authenticating]", {
2266
+ log8("[invitation authenticating]", {
2258
2267
  Kind,
2259
2268
  invitation: invitation2
2260
2269
  }, {
@@ -2269,7 +2278,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
2269
2278
  });
2270
2279
  }
2271
2280
  case Invitation5.State.SUCCESS: {
2272
- log7("[invitation success]", {
2281
+ log8("[invitation success]", {
2273
2282
  Kind,
2274
2283
  invitation: invitation2
2275
2284
  }, {
@@ -2285,7 +2294,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
2285
2294
  return complete?.();
2286
2295
  }
2287
2296
  case Invitation5.State.CANCELLED: {
2288
- log7.warn("[invitation cancelled]", {
2297
+ log8.warn("[invitation cancelled]", {
2289
2298
  Kind
2290
2299
  }, {
2291
2300
  F: __dxlog_file7,
@@ -2299,7 +2308,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
2299
2308
  });
2300
2309
  }
2301
2310
  case Invitation5.State.TIMEOUT: {
2302
- log7.error("[invitation timeout]", {
2311
+ log8.error("[invitation timeout]", {
2303
2312
  Kind
2304
2313
  }, {
2305
2314
  F: __dxlog_file7,
@@ -2315,7 +2324,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
2315
2324
  }
2316
2325
  }, (error) => {
2317
2326
  if (error instanceof AlreadyJoinedError) {
2318
- log7("[already joined]", {
2327
+ log8("[already joined]", {
2319
2328
  Kind,
2320
2329
  error
2321
2330
  }, {
@@ -2330,7 +2339,7 @@ var getInvitationSubscribable = (Kind, invitation) => {
2330
2339
  });
2331
2340
  return complete?.();
2332
2341
  }
2333
- log7.error("[invitation errored]", {
2342
+ log8.error("[invitation errored]", {
2334
2343
  Kind,
2335
2344
  error
2336
2345
  }, {
@@ -2669,7 +2678,7 @@ var joinMachine = createMachine2({
2669
2678
  } : context.space
2670
2679
  }),
2671
2680
  log: (context, event) => {
2672
- log7("[transition]", {
2681
+ log8("[transition]", {
2673
2682
  event,
2674
2683
  haloInvitation: context.halo.invitation,
2675
2684
  spaceInvitation: context.space.invitation
@@ -2687,7 +2696,7 @@ var defaultCodeFromUrl = (invitationType, text) => {
2687
2696
  const searchParams = new URLSearchParams(text.substring(text.lastIndexOf("?")));
2688
2697
  return searchParams.get(`${invitationType}InvitationCode`) ?? searchParams.get(`${invitationType}Invitation`) ?? searchParams.get("invitationCode") ?? searchParams.get("invitation") ?? text;
2689
2698
  } catch (err) {
2690
- log7.catch(err, void 0, {
2699
+ log8.catch(err, void 0, {
2691
2700
  F: __dxlog_file7,
2692
2701
  L: 452,
2693
2702
  S: void 0,
@@ -2708,7 +2717,7 @@ var useJoinMachine = (client, options) => {
2708
2717
  invitationSubscribable: getInvitationSubscribable("Halo", invitationObservable)
2709
2718
  };
2710
2719
  } catch (err) {
2711
- log7.error("Could not redeem device invitation code", err, {
2720
+ log8.error("Could not redeem device invitation code", err, {
2712
2721
  F: __dxlog_file7,
2713
2722
  L: 473,
2714
2723
  S: void 0,
@@ -2733,7 +2742,7 @@ var useJoinMachine = (client, options) => {
2733
2742
  invitationSubscribable: getInvitationSubscribable("Space", invitationObservable)
2734
2743
  };
2735
2744
  } catch (err) {
2736
- log7.error("Could not redeem space invitation code", err, {
2745
+ log8.error("Could not redeem space invitation code", err, {
2737
2746
  F: __dxlog_file7,
2738
2747
  L: 495,
2739
2748
  S: void 0,
@@ -2897,7 +2906,7 @@ var IdentityAdded = (props) => {
2897
2906
 
2898
2907
  // packages/sdk/shell/src/panels/JoinPanel/steps/IdentityInput.tsx
2899
2908
  import React33, { useState as useState10 } from "react";
2900
- import { log as log8 } from "@dxos/log";
2909
+ import { log as log9 } from "@dxos/log";
2901
2910
  import { useClient as useClient7 } from "@dxos/react-client";
2902
2911
  import { useTranslation as useTranslation18 } from "@dxos/react-ui";
2903
2912
  var __dxlog_file8 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/IdentityInput.tsx";
@@ -2917,7 +2926,7 @@ var IdentityInput = (props) => {
2917
2926
  identity
2918
2927
  });
2919
2928
  }, (error) => {
2920
- log8.catch(error, void 0, {
2929
+ log9.catch(error, void 0, {
2921
2930
  F: __dxlog_file8,
2922
2931
  L: 38,
2923
2932
  S: void 0,
@@ -2934,7 +2943,7 @@ var IdentityInput = (props) => {
2934
2943
  identity
2935
2944
  });
2936
2945
  }, (error) => {
2937
- log8.catch(error, void 0, {
2946
+ log9.catch(error, void 0, {
2938
2947
  F: __dxlog_file8,
2939
2948
  L: 48,
2940
2949
  S: void 0,
@@ -2987,7 +2996,7 @@ import { useTranslation as useTranslation19 } from "@dxos/react-ui";
2987
2996
 
2988
2997
  // packages/sdk/shell/src/panels/JoinPanel/steps/InvitationInput.tsx
2989
2998
  import React35, { useState as useState11, useEffect as useEffect5, cloneElement as cloneElement4 } from "react";
2990
- import { log as log9 } from "@dxos/log";
2999
+ import { log as log10 } from "@dxos/log";
2991
3000
  import { useTranslation as useTranslation20 } from "@dxos/react-ui";
2992
3001
  var __dxlog_file9 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/JoinPanel/steps/InvitationInput.tsx";
2993
3002
  var invitationCodeFromUrl = (text) => {
@@ -2996,7 +3005,7 @@ var invitationCodeFromUrl = (text) => {
2996
3005
  const invitation = searchParams.get("spaceInvitationCode") ?? searchParams.get("deviceInvitationCode");
2997
3006
  return invitation ?? text;
2998
3007
  } catch (err) {
2999
- log9.catch(err, void 0, {
3008
+ log10.catch(err, void 0, {
3000
3009
  F: __dxlog_file9,
3001
3010
  L: 25,
3002
3011
  S: void 0,
@@ -3376,7 +3385,7 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialDisposition =
3376
3385
  });
3377
3386
  useEffect6(() => {
3378
3387
  const subscription = joinService.subscribe((state) => {
3379
- log10("[state]", state, {
3388
+ log11("[state]", state, {
3380
3389
  F: __dxlog_file10,
3381
3390
  L: 210,
3382
3391
  S: void 0,
@@ -3666,14 +3675,14 @@ var JoinPanel = ({ titleId: propsTitleId, mode = "default", initialDisposition =
3666
3675
  // packages/sdk/shell/src/panels/SpacePanel/SpacePanel.tsx
3667
3676
  import { Planet } from "@phosphor-icons/react";
3668
3677
  import React40, { useEffect as useEffect7, useMemo as useMemo5 } from "react";
3669
- import { log as log13 } from "@dxos/log";
3678
+ import { log as log14 } from "@dxos/log";
3670
3679
  import { useInvitationStatus as useInvitationStatus3 } from "@dxos/react-client/invitations";
3671
3680
  import { useId as useId9, useTranslation as useTranslation24 } from "@dxos/react-ui";
3672
3681
 
3673
3682
  // packages/sdk/shell/src/panels/SpacePanel/spaceMachine.ts
3674
3683
  import { useMachine as useMachine3 } from "@xstate/react";
3675
3684
  import { assign as assign3, createMachine as createMachine3 } from "xstate";
3676
- import { log as log11 } from "@dxos/log";
3685
+ import { log as log12 } from "@dxos/log";
3677
3686
  var __dxlog_file11 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/SpacePanel/spaceMachine.ts";
3678
3687
  var spaceMachine = createMachine3({
3679
3688
  id: "space",
@@ -3711,7 +3720,7 @@ var spaceMachine = createMachine3({
3711
3720
  invitation: () => void 0
3712
3721
  }),
3713
3722
  log: (context, event) => {
3714
- log11("[transition]", {
3723
+ log12("[transition]", {
3715
3724
  event,
3716
3725
  context
3717
3726
  }, {
@@ -3735,7 +3744,7 @@ var useSpaceMachine = (options) => {
3735
3744
  // packages/sdk/shell/src/panels/SpacePanel/steps/SpaceManager.tsx
3736
3745
  import { Placeholder as Placeholder2, UserPlus, UsersThree } from "@phosphor-icons/react";
3737
3746
  import React39, { useCallback as useCallback7, useState as useState13 } from "react";
3738
- import { log as log12 } from "@dxos/log";
3747
+ import { log as log13 } from "@dxos/log";
3739
3748
  import { useConfig } from "@dxos/react-client";
3740
3749
  import { useSpaceInvitations as useSpaceInvitations2 } from "@dxos/react-client/echo";
3741
3750
  import { Invitation as Invitation8, InvitationEncoder as InvitationEncoder4 } from "@dxos/react-client/invitations";
@@ -3746,7 +3755,7 @@ var activeActionKey = "dxos:react-shell/space-manager/active-action";
3746
3755
  var handleInvitationEvent = (invitation, subscription) => {
3747
3756
  const invitationCode = InvitationEncoder4.encode(invitation);
3748
3757
  if (invitation.state === Invitation8.State.CONNECTING) {
3749
- log12.info(JSON.stringify({
3758
+ log13.info(JSON.stringify({
3750
3759
  invitationCode,
3751
3760
  authCode: invitation.authCode
3752
3761
  }), void 0, {
@@ -3924,7 +3933,7 @@ var SpacePanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code,
3924
3933
  });
3925
3934
  useEffect7(() => {
3926
3935
  const subscription = spaceService.subscribe((state) => {
3927
- log13("[state]", state, {
3936
+ log14("[state]", state, {
3928
3937
  F: __dxlog_file13,
3929
3938
  L: 95,
3930
3939
  S: void 0,
@@ -4037,7 +4046,7 @@ import { createIFramePort } from "@dxos/rpc-tunnel";
4037
4046
 
4038
4047
  // packages/sdk/shell/src/composites/Shell/Shell.tsx
4039
4048
  import React46, { useEffect as useEffect8, useState as useState14 } from "react";
4040
- import { log as log14 } from "@dxos/log";
4049
+ import { log as log15 } from "@dxos/log";
4041
4050
  import { useClient as useClient9 } from "@dxos/react-client";
4042
4051
  import { ShellDisplay, ShellLayout } from "@dxos/react-client";
4043
4052
  import { useSpace as useSpace2 } from "@dxos/react-client/echo";
@@ -4115,7 +4124,7 @@ var Shell = ({ runtime }) => {
4115
4124
  ]);
4116
4125
  useEffect8(() => {
4117
4126
  if (layout === ShellLayout.SPACE && !space) {
4118
- log14.warn("No space found for shell space invitations.", void 0, {
4127
+ log15.warn("No space found for shell space invitations.", void 0, {
4119
4128
  F: __dxlog_file14,
4120
4129
  L: 67,
4121
4130
  S: void 0,