umbrella-context 0.1.2 → 0.1.32

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.
Files changed (68) hide show
  1. package/bin/um.js +2 -0
  2. package/dist/adapters/byterover-context-runtime-store.d.ts +15 -0
  3. package/dist/adapters/byterover-context-runtime-store.js +57 -0
  4. package/dist/adapters/byterover-runtime-bridge.d.ts +218 -0
  5. package/dist/adapters/byterover-runtime-bridge.js +343 -0
  6. package/dist/adapters/byterover-transport-task-store.d.ts +13 -0
  7. package/dist/adapters/byterover-transport-task-store.js +50 -0
  8. package/dist/adapters/umbrella-onboarding.d.ts +27 -0
  9. package/dist/adapters/umbrella-onboarding.js +79 -0
  10. package/dist/adapters/umbrella-provider-runtime.d.ts +38 -0
  11. package/dist/adapters/umbrella-provider-runtime.js +199 -0
  12. package/dist/adapters/vendor-byterover.d.ts +4 -0
  13. package/dist/adapters/vendor-byterover.js +19 -0
  14. package/dist/commands/activity.d.ts +2 -0
  15. package/dist/commands/activity.js +82 -0
  16. package/dist/commands/bridge.d.ts +2 -0
  17. package/dist/commands/bridge.js +40 -0
  18. package/dist/commands/catalog.d.ts +34 -0
  19. package/dist/commands/catalog.js +234 -0
  20. package/dist/commands/connect.js +14 -14
  21. package/dist/commands/connectors.d.ts +24 -0
  22. package/dist/commands/connectors.js +626 -0
  23. package/dist/commands/curate.d.ts +1 -0
  24. package/dist/commands/curate.js +48 -3
  25. package/dist/commands/debug.d.ts +2 -0
  26. package/dist/commands/debug.js +55 -0
  27. package/dist/commands/fix.js +54 -0
  28. package/dist/commands/hub.d.ts +22 -0
  29. package/dist/commands/hub.js +487 -0
  30. package/dist/commands/interactive.d.ts +2 -0
  31. package/dist/commands/interactive.js +970 -62
  32. package/dist/commands/locations.d.ts +1 -0
  33. package/dist/commands/locations.js +15 -12
  34. package/dist/commands/logout.d.ts +2 -0
  35. package/dist/commands/logout.js +34 -0
  36. package/dist/commands/model.d.ts +11 -0
  37. package/dist/commands/model.js +225 -0
  38. package/dist/commands/providers.d.ts +17 -0
  39. package/dist/commands/providers.js +379 -0
  40. package/dist/commands/pull.js +60 -1
  41. package/dist/commands/push.js +62 -2
  42. package/dist/commands/reset.d.ts +2 -0
  43. package/dist/commands/reset.js +35 -0
  44. package/dist/commands/restart.d.ts +2 -0
  45. package/dist/commands/restart.js +21 -0
  46. package/dist/commands/search.js +65 -1
  47. package/dist/commands/session.d.ts +2 -0
  48. package/dist/commands/session.js +241 -0
  49. package/dist/commands/setup.js +58 -56
  50. package/dist/commands/space.d.ts +12 -0
  51. package/dist/commands/space.js +138 -42
  52. package/dist/commands/status.d.ts +29 -0
  53. package/dist/commands/status.js +120 -19
  54. package/dist/commands/tasks.d.ts +2 -0
  55. package/dist/commands/tasks.js +95 -0
  56. package/dist/commands/transport.d.ts +2 -0
  57. package/dist/commands/transport.js +88 -0
  58. package/dist/commands/tree.d.ts +2 -0
  59. package/dist/commands/tree.js +98 -0
  60. package/dist/commands/tui.d.ts +2 -0
  61. package/dist/commands/tui.js +1273 -0
  62. package/dist/config.d.ts +23 -0
  63. package/dist/config.js +69 -0
  64. package/dist/index.js +41 -5
  65. package/dist/repo-state.d.ts +227 -1
  66. package/dist/repo-state.js +920 -4
  67. package/dist/umbrella.js +29 -5
  68. package/package.json +11 -3
package/dist/umbrella.js CHANGED
@@ -1,6 +1,16 @@
1
1
  function trimTrailingSlash(value) {
2
2
  return value.replace(/\/+$/, "");
3
3
  }
4
+ function isLocalOnlyUmbrellaUrl(value) {
5
+ try {
6
+ const parsed = new URL(value);
7
+ const host = parsed.hostname.toLowerCase();
8
+ return host === "127.0.0.1" || host === "localhost" || host === "::1";
9
+ }
10
+ catch {
11
+ return false;
12
+ }
13
+ }
4
14
  async function requestJson(url, options) {
5
15
  const headers = {
6
16
  Accept: "application/json",
@@ -11,11 +21,25 @@ async function requestJson(url, options) {
11
21
  if (options?.cookie) {
12
22
  headers.Cookie = options.cookie;
13
23
  }
14
- const response = await fetch(url, {
15
- method: options?.method ?? (options?.body === undefined ? "GET" : "POST"),
16
- headers,
17
- body: options?.body === undefined ? undefined : JSON.stringify(options.body),
18
- });
24
+ let response;
25
+ try {
26
+ response = await fetch(url, {
27
+ method: options?.method ?? (options?.body === undefined ? "GET" : "POST"),
28
+ headers,
29
+ body: options?.body === undefined ? undefined : JSON.stringify(options.body),
30
+ });
31
+ }
32
+ catch (error) {
33
+ const parsed = new URL(url);
34
+ const origin = `${parsed.protocol}//${parsed.host}`;
35
+ const localHint = isLocalOnlyUmbrellaUrl(origin)
36
+ ? " That address only works if Umbrella is running on this same computer. If Umbrella lives on another machine, use that machine's real URL or IP instead."
37
+ : "";
38
+ const detail = error instanceof Error && error.message
39
+ ? ` ${error.message}`
40
+ : "";
41
+ throw new Error(`Could not reach Umbrella at ${origin}.${localHint}${detail}`);
42
+ }
19
43
  const setCookieHeader = response.headers.getSetCookie?.() ?? [];
20
44
  const nextCookie = setCookieHeader
21
45
  .map((entry) => entry.split(";")[0]?.trim())
package/package.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "umbrella-context",
3
- "version": "0.1.2",
3
+ "version": "0.1.32",
4
4
  "description": "Umbrella Context CLI for connecting a device to company context spaces, querying saved context, and syncing MCP access.",
5
5
  "type": "module",
6
6
  "bin": {
7
- "umbrella-context": "./dist/index.js",
8
- "agent-memory": "./dist/index.js"
7
+ "um": "./bin/um.js",
8
+ "umbrella-context": "./bin/um.js",
9
+ "agent-memory": "./bin/um.js"
9
10
  },
10
11
  "files": [
12
+ "bin",
11
13
  "dist",
12
14
  "README.md",
13
15
  "package.json"
@@ -23,12 +25,18 @@
23
25
  "cac": "^6.7.14",
24
26
  "chalk": "^5.4.1",
25
27
  "conf": "^13.1.0",
28
+ "ink": "^5.2.1",
29
+ "ink-spinner": "^5.0.0",
30
+ "ink-text-input": "^5.0.1",
26
31
  "prompts": "^2.4.2",
32
+ "react": "^18.3.1",
33
+ "zustand": "^5.0.8",
27
34
  "zod": "^3.25.76"
28
35
  },
29
36
  "devDependencies": {
30
37
  "@types/node": "^22.10.5",
31
38
  "@types/prompts": "^2.4.9",
39
+ "@types/react": "^18.3.12",
32
40
  "tsx": "^4.19.2",
33
41
  "typescript": "^5.7.3"
34
42
  },