@dxos/plugin-observability 0.8.4-main.9be5663bfe → 0.8.4-main.abd8ff62ef

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 (136) hide show
  1. package/dist/lib/browser/{ObservabilitySettings-EM7ABGCA.mjs → ObservabilitySettings-H6UKYDDT.mjs} +9 -13
  2. package/dist/lib/browser/ObservabilitySettings-H6UKYDDT.mjs.map +7 -0
  3. package/dist/lib/browser/{capture-user-feedback-4HGXJGJL.mjs → capture-user-feedback-3BXDUCZM.mjs} +4 -5
  4. package/dist/lib/browser/capture-user-feedback-3BXDUCZM.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-VZR3FNBD.mjs → chunk-DLBA63VM.mjs} +3 -5
  6. package/dist/lib/browser/chunk-DLBA63VM.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-K33HLC3Z.mjs → chunk-LHGNFXDI.mjs} +2 -3
  8. package/dist/lib/browser/chunk-LHGNFXDI.mjs.map +7 -0
  9. package/dist/lib/browser/{chunk-J6DPYEFZ.mjs → chunk-VQC6DG6V.mjs} +6 -2
  10. package/dist/lib/browser/chunk-VQC6DG6V.mjs.map +7 -0
  11. package/dist/lib/browser/components/index.mjs +45 -0
  12. package/dist/lib/browser/components/index.mjs.map +7 -0
  13. package/dist/lib/browser/index.mjs +10 -86
  14. package/dist/lib/browser/index.mjs.map +4 -4
  15. package/dist/lib/browser/meta.json +1 -1
  16. package/dist/lib/browser/operations/index.mjs +3 -4
  17. package/dist/lib/browser/operations/index.mjs.map +3 -3
  18. package/dist/lib/browser/{send-event-VV2I6QYY.mjs → send-event-F3D32CJX.mjs} +4 -5
  19. package/dist/lib/browser/send-event-F3D32CJX.mjs.map +7 -0
  20. package/dist/lib/browser/{toggle-H2GX3A6G.mjs → toggle-PPNDFGWJ.mjs} +4 -5
  21. package/dist/lib/browser/toggle-PPNDFGWJ.mjs.map +7 -0
  22. package/dist/lib/browser/translations.mjs +8 -0
  23. package/dist/lib/browser/translations.mjs.map +7 -0
  24. package/dist/lib/browser/types/index.mjs +1 -1
  25. package/dist/lib/node-esm/{ObservabilitySettings-VP4A362Z.mjs → ObservabilitySettings-HXTWPHHR.mjs} +9 -13
  26. package/dist/lib/node-esm/ObservabilitySettings-HXTWPHHR.mjs.map +7 -0
  27. package/dist/lib/node-esm/{capture-user-feedback-SDQA2VYI.mjs → capture-user-feedback-LUPWJWGK.mjs} +4 -5
  28. package/dist/lib/{browser/capture-user-feedback-4HGXJGJL.mjs.map → node-esm/capture-user-feedback-LUPWJWGK.mjs.map} +1 -1
  29. package/dist/lib/node-esm/{chunk-FZRJBWSE.mjs → chunk-3B7HMSKM.mjs} +3 -5
  30. package/dist/lib/node-esm/chunk-3B7HMSKM.mjs.map +7 -0
  31. package/dist/lib/node-esm/{chunk-JGHMP7UL.mjs → chunk-J4EHZPH2.mjs} +2 -3
  32. package/dist/lib/node-esm/chunk-J4EHZPH2.mjs.map +7 -0
  33. package/dist/lib/node-esm/{chunk-K7WZOJZF.mjs → chunk-NCIKZY6L.mjs} +6 -2
  34. package/dist/lib/node-esm/chunk-NCIKZY6L.mjs.map +7 -0
  35. package/dist/lib/node-esm/components/index.mjs +46 -0
  36. package/dist/lib/node-esm/components/index.mjs.map +7 -0
  37. package/dist/lib/node-esm/index.mjs +10 -86
  38. package/dist/lib/node-esm/index.mjs.map +4 -4
  39. package/dist/lib/node-esm/meta.json +1 -1
  40. package/dist/lib/node-esm/operations/index.mjs +3 -4
  41. package/dist/lib/node-esm/operations/index.mjs.map +3 -3
  42. package/dist/lib/node-esm/{send-event-EMV3VHAA.mjs → send-event-OKTEXC7M.mjs} +4 -5
  43. package/dist/lib/{browser/send-event-VV2I6QYY.mjs.map → node-esm/send-event-OKTEXC7M.mjs.map} +1 -1
  44. package/dist/lib/node-esm/{toggle-XRNGEYNP.mjs → toggle-YS2KFMXS.mjs} +4 -5
  45. package/dist/lib/node-esm/toggle-YS2KFMXS.mjs.map +7 -0
  46. package/dist/lib/node-esm/translations.mjs +9 -0
  47. package/dist/lib/node-esm/translations.mjs.map +7 -0
  48. package/dist/lib/node-esm/types/index.mjs +1 -1
  49. package/dist/types/src/ObservabilityPlugin.d.ts +6 -0
  50. package/dist/types/src/ObservabilityPlugin.d.ts.map +1 -1
  51. package/dist/types/src/{cli/plugin.d.ts → ObservabilityPlugin.node.d.ts} +2 -1
  52. package/dist/types/src/ObservabilityPlugin.node.d.ts.map +1 -0
  53. package/dist/types/src/ObservabilityPlugin.test.d.ts +2 -0
  54. package/dist/types/src/ObservabilityPlugin.test.d.ts.map +1 -0
  55. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  56. package/dist/types/src/capabilities/client-ready.d.ts.map +1 -1
  57. package/dist/types/src/capabilities/index.d.ts +2 -6
  58. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  59. package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
  60. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
  61. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  62. package/dist/types/src/capabilities/settings.d.ts +2 -5
  63. package/dist/types/src/capabilities/settings.d.ts.map +1 -1
  64. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  65. package/dist/types/src/components/FeedbackForm/FeedbackForm.d.ts +5 -2
  66. package/dist/types/src/components/FeedbackForm/FeedbackForm.d.ts.map +1 -1
  67. package/dist/types/src/components/FeedbackForm/FeedbackForm.stories.d.ts +19 -19
  68. package/dist/types/src/components/FeedbackForm/FeedbackForm.stories.d.ts.map +1 -1
  69. package/dist/types/src/components/ObservabilitySettings/ObservabilitySettings.d.ts +1 -1
  70. package/dist/types/src/components/ObservabilitySettings/ObservabilitySettings.d.ts.map +1 -1
  71. package/dist/types/src/components/ObservabilitySettings/ObservabilitySettings.stories.d.ts +17 -18
  72. package/dist/types/src/components/ObservabilitySettings/ObservabilitySettings.stories.d.ts.map +1 -1
  73. package/dist/types/src/containers/HelpContainer/HelpContainer.d.ts.map +1 -1
  74. package/dist/types/src/index.d.ts +2 -2
  75. package/dist/types/src/index.d.ts.map +1 -1
  76. package/dist/types/src/operations/capture-user-feedback.d.ts +1 -1
  77. package/dist/types/src/operations/capture-user-feedback.d.ts.map +1 -1
  78. package/dist/types/src/operations/definitions.d.ts +1 -1
  79. package/dist/types/src/operations/definitions.d.ts.map +1 -1
  80. package/dist/types/src/operations/index.d.ts +1 -1
  81. package/dist/types/src/operations/index.d.ts.map +1 -1
  82. package/dist/types/src/operations/send-event.d.ts +1 -1
  83. package/dist/types/src/operations/send-event.d.ts.map +1 -1
  84. package/dist/types/src/operations/toggle.d.ts +1 -1
  85. package/dist/types/src/operations/toggle.d.ts.map +1 -1
  86. package/dist/types/src/translations.d.ts +17 -19
  87. package/dist/types/src/translations.d.ts.map +1 -1
  88. package/dist/types/src/types/Settings.d.ts +3 -2
  89. package/dist/types/src/types/Settings.d.ts.map +1 -1
  90. package/dist/types/src/types/capabilities.d.ts +8 -5
  91. package/dist/types/src/types/capabilities.d.ts.map +1 -1
  92. package/dist/types/src/types/events.d.ts.map +1 -1
  93. package/dist/types/tsconfig.tsbuildinfo +1 -1
  94. package/package.json +43 -40
  95. package/src/{cli/plugin.ts → ObservabilityPlugin.node.ts} +4 -2
  96. package/src/ObservabilityPlugin.test.ts +25 -0
  97. package/src/ObservabilityPlugin.ts +18 -4
  98. package/src/capabilities/app-graph-builder.ts +1 -0
  99. package/src/capabilities/client-ready.ts +23 -1
  100. package/src/capabilities/index.ts +1 -1
  101. package/src/capabilities/operation-handler.ts +1 -1
  102. package/src/capabilities/react-surface.tsx +1 -2
  103. package/src/components/FeedbackForm/FeedbackForm.stories.tsx +13 -1
  104. package/src/components/FeedbackForm/FeedbackForm.tsx +19 -3
  105. package/src/components/ObservabilitySettings/ObservabilitySettings.stories.tsx +2 -1
  106. package/src/components/ObservabilitySettings/ObservabilitySettings.tsx +8 -12
  107. package/src/containers/HelpContainer/HelpContainer.tsx +3 -2
  108. package/src/index.ts +6 -2
  109. package/src/operations/capture-user-feedback.ts +1 -1
  110. package/src/operations/definitions.ts +2 -3
  111. package/src/operations/index.ts +1 -1
  112. package/src/operations/send-event.ts +1 -1
  113. package/src/operations/toggle.ts +1 -1
  114. package/src/translations.ts +1 -2
  115. package/src/types/Settings.ts +5 -2
  116. package/src/types/capabilities.ts +7 -0
  117. package/dist/lib/browser/ObservabilitySettings-EM7ABGCA.mjs.map +0 -7
  118. package/dist/lib/browser/chunk-J6DPYEFZ.mjs.map +0 -7
  119. package/dist/lib/browser/chunk-K33HLC3Z.mjs.map +0 -7
  120. package/dist/lib/browser/chunk-VZR3FNBD.mjs.map +0 -7
  121. package/dist/lib/browser/cli/index.mjs +0 -20
  122. package/dist/lib/browser/cli/index.mjs.map +0 -7
  123. package/dist/lib/browser/toggle-H2GX3A6G.mjs.map +0 -7
  124. package/dist/lib/node-esm/ObservabilitySettings-VP4A362Z.mjs.map +0 -7
  125. package/dist/lib/node-esm/capture-user-feedback-SDQA2VYI.mjs.map +0 -7
  126. package/dist/lib/node-esm/chunk-FZRJBWSE.mjs.map +0 -7
  127. package/dist/lib/node-esm/chunk-JGHMP7UL.mjs.map +0 -7
  128. package/dist/lib/node-esm/chunk-K7WZOJZF.mjs.map +0 -7
  129. package/dist/lib/node-esm/cli/index.mjs +0 -21
  130. package/dist/lib/node-esm/cli/index.mjs.map +0 -7
  131. package/dist/lib/node-esm/send-event-EMV3VHAA.mjs.map +0 -7
  132. package/dist/lib/node-esm/toggle-XRNGEYNP.mjs.map +0 -7
  133. package/dist/types/src/cli/index.d.ts +0 -2
  134. package/dist/types/src/cli/index.d.ts.map +0 -1
  135. package/dist/types/src/cli/plugin.d.ts.map +0 -1
  136. package/src/cli/index.ts +0 -5
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/operations/send-event.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\n\nimport { ObservabilityCapabilities } from '../types';\nimport { SendEvent } from './definitions';\n\nconst handler: Operation.WithHandler<typeof SendEvent> = SendEvent.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n // NOTE: This is to ensure that events fired before observability is ready are still sent.\n const observability = yield* Capability.waitFor(ObservabilityCapabilities.Observability);\n const properties = input.properties ?? {};\n observability.events.captureEvent(input.name, properties);\n }),\n ),\n);\n\nexport default handler;\n"],
5
+ "mappings": ";;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiB;AAK1B,IAAMC,UAAmDC,UAAUC,KACjEC,UAAUC,YACDC,kBAAW,WAAWC,OAAK;AAEhC,QAAMC,gBAAgB,OAAOC,WAAWC,QAAQC,0BAA0BC,aAAa;AACvF,QAAMC,aAAaN,MAAMM,cAAc,CAAC;AACxCL,gBAAcM,OAAOC,aAAaR,MAAMS,MAAMH,UAAAA;AAChD,CAAA,CAAA,CAAA;AAIJ,IAAA,qBAAeZ;",
6
+ "names": ["Effect", "Capability", "Operation", "handler", "SendEvent", "pipe", "Operation", "withHandler", "fnUntraced", "input", "observability", "Capability", "waitFor", "ObservabilityCapabilities", "Observability", "properties", "events", "captureEvent", "name"]
7
+ }
@@ -1,18 +1,17 @@
1
1
  import {
2
2
  ObservabilityCapabilities
3
- } from "./chunk-J6DPYEFZ.mjs";
3
+ } from "./chunk-VQC6DG6V.mjs";
4
4
  import {
5
5
  Toggle
6
- } from "./chunk-VZR3FNBD.mjs";
7
- import "./chunk-K33HLC3Z.mjs";
6
+ } from "./chunk-DLBA63VM.mjs";
8
7
  import "./chunk-J5LGTIGS.mjs";
9
8
 
10
9
  // src/operations/toggle.ts
11
10
  import * as Effect from "effect/Effect";
12
11
  import { Capabilities, Capability } from "@dxos/app-framework";
13
12
  import { AppCapabilities } from "@dxos/app-toolkit";
13
+ import { Operation } from "@dxos/compute";
14
14
  import { Observability } from "@dxos/observability";
15
- import { Operation } from "@dxos/operation";
16
15
  import { meta } from "#meta";
17
16
  var handler = Toggle.pipe(Operation.withHandler(Effect.fnUntraced(function* (input) {
18
17
  const namespace = yield* Capability.get(ObservabilityCapabilities.Namespace);
@@ -45,4 +44,4 @@ var toggle_default = handler;
45
44
  export {
46
45
  toggle_default as default
47
46
  };
48
- //# sourceMappingURL=toggle-H2GX3A6G.mjs.map
47
+ //# sourceMappingURL=toggle-PPNDFGWJ.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/operations/toggle.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport { Observability } from '@dxos/observability';\n\nimport { meta } from '#meta';\n\nimport { ObservabilityCapabilities, type Settings } from '../types';\nimport { Toggle } from './definitions';\n\nconst handler: Operation.WithHandler<typeof Toggle> = Toggle.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n const namespace = yield* Capability.get(ObservabilityCapabilities.Namespace);\n const observability = yield* Capability.get(ObservabilityCapabilities.Observability);\n const capabilities = yield* Capability.Service;\n const registry = capabilities.get(Capabilities.AtomRegistry);\n const allSettings = capabilities.getAll(AppCapabilities.Settings);\n const settingsObj = allSettings.find((s: AppCapabilities.Settings) => s.prefix === meta.id);\n if (!settingsObj) {\n return false;\n }\n const settings = registry.get(settingsObj.atom) as Settings.Settings;\n const newEnabled = input.state ?? !settings.enabled;\n registry.set(settingsObj.atom, { ...settings, enabled: newEnabled });\n observability.events.captureEvent('observability.toggle', {\n enabled: newEnabled,\n });\n\n if (newEnabled) {\n yield* observability.enable();\n } else {\n yield* observability.disable();\n }\n yield* Effect.promise(() => Observability.storeObservabilityDisabled(namespace, !newEnabled));\n return newEnabled;\n }),\n ),\n);\n\nexport default handler;\n"],
5
+ "mappings": ";;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,uBAAuB;AAChC,SAASC,iBAAiB;AAC1B,SAASC,qBAAqB;AAE9B,SAASC,YAAY;AAKrB,IAAMC,UAAgDC,OAAOC,KAC3DC,UAAUC,YACDC,kBAAW,WAAWC,OAAK;AAChC,QAAMC,YAAY,OAAOC,WAAWC,IAAIC,0BAA0BC,SAAS;AAC3E,QAAMC,gBAAgB,OAAOJ,WAAWC,IAAIC,0BAA0BG,aAAa;AACnF,QAAMC,eAAe,OAAON,WAAWO;AACvC,QAAMC,WAAWF,aAAaL,IAAIQ,aAAaC,YAAY;AAC3D,QAAMC,cAAcL,aAAaM,OAAOC,gBAAgBC,QAAQ;AAChE,QAAMC,cAAcJ,YAAYK,KAAK,CAACC,MAAgCA,EAAEC,WAAWC,KAAKC,EAAE;AAC1F,MAAI,CAACL,aAAa;AAChB,WAAO;EACT;AACA,QAAMM,WAAWb,SAASP,IAAIc,YAAYO,IAAI;AAC9C,QAAMC,aAAazB,MAAM0B,SAAS,CAACH,SAASI;AAC5CjB,WAASkB,IAAIX,YAAYO,MAAM;IAAE,GAAGD;IAAUI,SAASF;EAAW,CAAA;AAClEnB,gBAAcuB,OAAOC,aAAa,wBAAwB;IACxDH,SAASF;EACX,CAAA;AAEA,MAAIA,YAAY;AACd,WAAOnB,cAAcyB,OAAM;EAC7B,OAAO;AACL,WAAOzB,cAAc0B,QAAO;EAC9B;AACA,SAAcC,eAAQ,MAAM1B,cAAc2B,2BAA2BjC,WAAW,CAACwB,UAAAA,CAAAA;AACjF,SAAOA;AACT,CAAA,CAAA,CAAA;AAIJ,IAAA,iBAAe/B;",
6
+ "names": ["Effect", "Capabilities", "Capability", "AppCapabilities", "Operation", "Observability", "meta", "handler", "Toggle", "pipe", "Operation", "withHandler", "fnUntraced", "input", "namespace", "Capability", "get", "ObservabilityCapabilities", "Namespace", "observability", "Observability", "capabilities", "Service", "registry", "Capabilities", "AtomRegistry", "allSettings", "getAll", "AppCapabilities", "Settings", "settingsObj", "find", "s", "prefix", "meta", "id", "settings", "atom", "newEnabled", "state", "enabled", "set", "events", "captureEvent", "enable", "disable", "promise", "storeObservabilityDisabled"]
7
+ }
@@ -0,0 +1,8 @@
1
+ import {
2
+ translations
3
+ } from "./chunk-LHGNFXDI.mjs";
4
+ import "./chunk-J5LGTIGS.mjs";
5
+ export {
6
+ translations
7
+ };
8
+ //# sourceMappingURL=translations.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -4,7 +4,7 @@ import {
4
4
  ObservabilityCapabilities,
5
5
  ObservabilityEvents,
6
6
  Settings_exports
7
- } from "../chunk-J6DPYEFZ.mjs";
7
+ } from "../chunk-VQC6DG6V.mjs";
8
8
  import "../chunk-J5LGTIGS.mjs";
9
9
  export {
10
10
  ClientCapability,
@@ -3,9 +3,10 @@ import "./chunk-HSLMI22Q.mjs";
3
3
 
4
4
  // src/components/ObservabilitySettings/ObservabilitySettings.tsx
5
5
  import React from "react";
6
- import { Input, Message, useTranslation } from "@dxos/react-ui";
6
+ import { Message, useTranslation } from "@dxos/react-ui";
7
7
  import { Settings as SettingsForm } from "@dxos/react-ui-form";
8
8
  import { meta } from "#meta";
9
+ import { Settings } from "#types";
9
10
  var ObservabilitySettings = ({ settings, onSettingsChange }) => {
10
11
  const { t } = useTranslation(meta.id);
11
12
  return /* @__PURE__ */ React.createElement(SettingsForm.Viewport, null, /* @__PURE__ */ React.createElement(SettingsForm.Section, {
@@ -14,19 +15,14 @@ var ObservabilitySettings = ({ settings, onSettingsChange }) => {
14
15
  })
15
16
  }, /* @__PURE__ */ React.createElement(Message.Root, {
16
17
  valence: "info"
17
- }, /* @__PURE__ */ React.createElement(Message.Content, null, t("observability.description"))), /* @__PURE__ */ React.createElement(SettingsForm.Item, {
18
- title: t("observability-enabled.label"),
19
- description: t("observability-enabled.description")
20
- }, /* @__PURE__ */ React.createElement(Input.Switch, {
21
- disabled: !onSettingsChange,
22
- checked: settings.enabled,
23
- onCheckedChange: (checked) => onSettingsChange?.((s) => ({
24
- ...s,
25
- enabled: !!checked
26
- }))
27
- }))));
18
+ }, /* @__PURE__ */ React.createElement(Message.Content, null, t("observability.description"))), /* @__PURE__ */ React.createElement(SettingsForm.FieldSet, {
19
+ readonly: !onSettingsChange,
20
+ schema: Settings.Settings,
21
+ values: settings,
22
+ onValuesChanged: (values) => onSettingsChange?.(() => values)
23
+ })));
28
24
  };
29
25
  export {
30
26
  ObservabilitySettings as default
31
27
  };
32
- //# sourceMappingURL=ObservabilitySettings-VP4A362Z.mjs.map
28
+ //# sourceMappingURL=ObservabilitySettings-HXTWPHHR.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/ObservabilitySettings/ObservabilitySettings.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { Message, useTranslation } from '@dxos/react-ui';\nimport { Settings as SettingsForm } from '@dxos/react-ui-form';\n\nimport { meta } from '#meta';\nimport { Settings } from '#types';\n\nexport type ObservabilitySettingsProps = AppSurface.SettingsArticleProps<Settings.Settings>;\n\nexport const ObservabilitySettings = ({ settings, onSettingsChange }: ObservabilitySettingsProps) => {\n const { t } = useTranslation(meta.id);\n\n return (\n <SettingsForm.Viewport>\n <SettingsForm.Section title={t('settings.title', { ns: meta.id })}>\n <Message.Root valence='info'>\n <Message.Content>{t('observability.description')}</Message.Content>\n </Message.Root>\n <SettingsForm.FieldSet\n readonly={!onSettingsChange}\n schema={Settings.Settings}\n values={settings}\n onValuesChanged={(values) => onSettingsChange?.(() => values)}\n />\n </SettingsForm.Section>\n </SettingsForm.Viewport>\n );\n};\n"],
5
+ "mappings": ";;;;AAIA,OAAOA,WAAW;AAGlB,SAASC,SAASC,sBAAsB;AACxC,SAASC,YAAYC,oBAAoB;AAEzC,SAASC,YAAY;AACrB,SAASF,gBAAgB;AAIlB,IAAMG,wBAAwB,CAAC,EAAEC,UAAUC,iBAAgB,MAA8B;AAC9F,QAAM,EAAEC,EAAC,IAAKP,eAAeG,KAAKK,EAAE;AAEpC,SACE,sBAAA,cAACN,aAAaO,UAAQ,MACpB,sBAAA,cAACP,aAAaQ,SAAO;IAACC,OAAOJ,EAAE,kBAAkB;MAAEK,IAAIT,KAAKK;IAAG,CAAA;KAC7D,sBAAA,cAACT,QAAQc,MAAI;IAACC,SAAQ;KACpB,sBAAA,cAACf,QAAQgB,SAAO,MAAER,EAAE,2BAAA,CAAA,CAAA,GAEtB,sBAAA,cAACL,aAAac,UAAQ;IACpBC,UAAU,CAACX;IACXY,QAAQjB,SAASA;IACjBkB,QAAQd;IACRe,iBAAiB,CAACD,WAAWb,mBAAmB,MAAMa,MAAAA;;AAKhE;",
6
+ "names": ["React", "Message", "useTranslation", "Settings", "SettingsForm", "meta", "ObservabilitySettings", "settings", "onSettingsChange", "t", "id", "Viewport", "Section", "title", "ns", "Root", "valence", "Content", "FieldSet", "readonly", "schema", "values", "onValuesChanged"]
7
+ }
@@ -1,17 +1,16 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
  import {
3
3
  ObservabilityCapabilities
4
- } from "./chunk-K7WZOJZF.mjs";
4
+ } from "./chunk-NCIKZY6L.mjs";
5
5
  import {
6
6
  CaptureUserFeedback
7
- } from "./chunk-FZRJBWSE.mjs";
8
- import "./chunk-JGHMP7UL.mjs";
7
+ } from "./chunk-3B7HMSKM.mjs";
9
8
  import "./chunk-HSLMI22Q.mjs";
10
9
 
11
10
  // src/operations/capture-user-feedback.ts
12
11
  import * as Effect from "effect/Effect";
13
12
  import { Capability } from "@dxos/app-framework";
14
- import { Operation } from "@dxos/operation";
13
+ import { Operation } from "@dxos/compute";
15
14
  var handler = CaptureUserFeedback.pipe(Operation.withHandler(Effect.fnUntraced(function* (input) {
16
15
  const observability = yield* Capability.get(ObservabilityCapabilities.Observability);
17
16
  observability.feedback.captureUserFeedback({
@@ -23,4 +22,4 @@ var capture_user_feedback_default = handler;
23
22
  export {
24
23
  capture_user_feedback_default as default
25
24
  };
26
- //# sourceMappingURL=capture-user-feedback-SDQA2VYI.mjs.map
25
+ //# sourceMappingURL=capture-user-feedback-LUPWJWGK.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/operations/capture-user-feedback.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/operation';\n\nimport { ObservabilityCapabilities } from '../types';\nimport { CaptureUserFeedback } from './definitions';\n\nconst handler: Operation.WithHandler<typeof CaptureUserFeedback> = CaptureUserFeedback.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n const observability = yield* Capability.get(ObservabilityCapabilities.Observability);\n observability.feedback.captureUserFeedback({ message: input.message, includeLogs: input.includeLogs });\n }),\n ),\n);\n\nexport default handler;\n"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\n\nimport { ObservabilityCapabilities } from '../types';\nimport { CaptureUserFeedback } from './definitions';\n\nconst handler: Operation.WithHandler<typeof CaptureUserFeedback> = CaptureUserFeedback.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* (input) {\n const observability = yield* Capability.get(ObservabilityCapabilities.Observability);\n observability.feedback.captureUserFeedback({ message: input.message, includeLogs: input.includeLogs });\n }),\n ),\n);\n\nexport default handler;\n"],
5
5
  "mappings": ";;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiB;AAK1B,IAAMC,UAA6DC,oBAAoBC,KACrFC,UAAUC,YACDC,kBAAW,WAAWC,OAAK;AAChC,QAAMC,gBAAgB,OAAOC,WAAWC,IAAIC,0BAA0BC,aAAa;AACnFJ,gBAAcK,SAASC,oBAAoB;IAAEC,SAASR,MAAMQ;IAASC,aAAaT,MAAMS;EAAY,CAAA;AACtG,CAAA,CAAA,CAAA;AAIJ,IAAA,gCAAef;",
6
6
  "names": ["Effect", "Capability", "Operation", "handler", "CaptureUserFeedback", "pipe", "Operation", "withHandler", "fnUntraced", "input", "observability", "Capability", "get", "ObservabilityCapabilities", "Observability", "feedback", "captureUserFeedback", "message", "includeLogs"]
7
7
  }
@@ -1,7 +1,4 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- translations
4
- } from "./chunk-JGHMP7UL.mjs";
5
2
  import {
6
3
  __export
7
4
  } from "./chunk-HSLMI22Q.mjs";
@@ -16,9 +13,10 @@ __export(definitions_exports, {
16
13
  });
17
14
  import * as Schema from "effect/Schema";
18
15
  import { Capability } from "@dxos/app-framework";
16
+ import { Operation } from "@dxos/compute";
19
17
  import { Format } from "@dxos/echo";
20
- import { Operation } from "@dxos/operation";
21
18
  import { meta } from "#meta";
19
+ import { translations } from "#translations";
22
20
  var t = translations[0]["en-US"][meta.id];
23
21
  var UserFeedback = Schema.Struct({
24
22
  message: Format.Text.pipe(Schema.nonEmptyString(), Schema.maxLength(4096), Schema.annotations({
@@ -83,4 +81,4 @@ export {
83
81
  SendEvent,
84
82
  definitions_exports
85
83
  };
86
- //# sourceMappingURL=chunk-FZRJBWSE.mjs.map
84
+ //# sourceMappingURL=chunk-3B7HMSKM.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/operations/definitions.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\nimport { Format } from '@dxos/echo';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\nconst t = translations[0]['en-US'][meta.id];\n\nexport const UserFeedback = Schema.Struct({\n message: Format.Text.pipe(\n Schema.nonEmptyString(),\n Schema.maxLength(4_096),\n Schema.annotations({\n title: t['feedback-textarea.label'],\n description: t['feedback-textarea.placeholder'],\n }),\n ),\n includeLogs: Schema.Boolean.pipe(\n Schema.annotations({\n title: t['include-debug-logs.label'],\n }),\n Schema.optional,\n ),\n});\n\nexport type UserFeedback = Schema.Schema.Type<typeof UserFeedback>;\n\nconst OBSERVABILITY_OPERATION = `${meta.id}.operation`;\n\n/**\n * Operations for the Observability plugin.\n */\nexport const Toggle = Operation.make({\n meta: {\n key: `${OBSERVABILITY_OPERATION}.toggle`,\n name: 'Toggle Observability',\n description: 'Toggle observability on or off.',\n },\n services: [Capability.Service],\n input: Schema.Struct({\n state: Schema.optional(Schema.Boolean),\n }),\n output: Schema.Boolean,\n});\n\nexport const CaptureUserFeedback = Operation.make({\n meta: {\n key: `${OBSERVABILITY_OPERATION}.capture-feedback`,\n name: 'Capture User Feedback',\n description: 'Capture user feedback.',\n },\n services: [Capability.Service],\n input: UserFeedback,\n output: Schema.Void,\n});\n\nexport const SendEvent = Operation.make({\n meta: {\n key: `${OBSERVABILITY_OPERATION}.send-event`,\n name: 'Send Event',\n description: 'Send an observability event.',\n },\n services: [Capability.Service],\n input: Schema.Struct({\n name: Schema.String.annotations({ description: 'The name of the event.' }),\n properties: Schema.optional(Schema.Any).annotations({ description: 'Event properties.' }),\n }),\n output: Schema.Void,\n});\n"],
5
+ "mappings": ";;;;;;AAAA;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiB;AAC1B,SAASC,cAAc;AAEvB,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAE7B,IAAMC,IAAID,aAAa,CAAA,EAAG,OAAA,EAASD,KAAKG,EAAE;AAEnC,IAAMC,eAAsBC,cAAO;EACxCC,SAASP,OAAOQ,KAAKC,KACZC,sBAAc,GACdC,iBAAU,IAAA,GACVC,mBAAY;IACjBC,OAAOV,EAAE,yBAAA;IACTW,aAAaX,EAAE,+BAAA;EACjB,CAAA,CAAA;EAEFY,aAAoBC,eAAQP,KACnBG,mBAAY;IACjBC,OAAOV,EAAE,0BAAA;EACX,CAAA,GACOc,eAAQ;AAEnB,CAAA;AAIA,IAAMC,0BAA0B,GAAGjB,KAAKG,EAAE;AAKnC,IAAMe,SAASpB,UAAUqB,KAAK;EACnCnB,MAAM;IACJoB,KAAK,GAAGH,uBAAAA;IACRI,MAAM;IACNR,aAAa;EACf;EACAS,UAAU;IAACzB,WAAW0B;;EACtBC,OAAcnB,cAAO;IACnBoB,OAAcT,gBAAgBD,cAAO;EACvC,CAAA;EACAW,QAAeX;AACjB,CAAA;AAEO,IAAMY,sBAAsB7B,UAAUqB,KAAK;EAChDnB,MAAM;IACJoB,KAAK,GAAGH,uBAAAA;IACRI,MAAM;IACNR,aAAa;EACf;EACAS,UAAU;IAACzB,WAAW0B;;EACtBC,OAAOpB;EACPsB,QAAeE;AACjB,CAAA;AAEO,IAAMC,YAAY/B,UAAUqB,KAAK;EACtCnB,MAAM;IACJoB,KAAK,GAAGH,uBAAAA;IACRI,MAAM;IACNR,aAAa;EACf;EACAS,UAAU;IAACzB,WAAW0B;;EACtBC,OAAcnB,cAAO;IACnBgB,MAAaS,cAAOnB,YAAY;MAAEE,aAAa;IAAyB,CAAA;IACxEkB,YAAmBf,gBAAgBgB,UAAG,EAAErB,YAAY;MAAEE,aAAa;IAAoB,CAAA;EACzF,CAAA;EACAa,QAAeE;AACjB,CAAA;",
6
+ "names": ["Schema", "Capability", "Operation", "Format", "meta", "translations", "t", "id", "UserFeedback", "Struct", "message", "Text", "pipe", "nonEmptyString", "maxLength", "annotations", "title", "description", "includeLogs", "Boolean", "optional", "OBSERVABILITY_OPERATION", "Toggle", "make", "key", "name", "services", "Service", "input", "state", "output", "CaptureUserFeedback", "Void", "SendEvent", "String", "properties", "Any"]
7
+ }
@@ -13,8 +13,6 @@ var translations = [
13
13
  "observability-toast-action.label": "Settings",
14
14
  "observability-toast-action.alt": "Open settings to learn more or to disable.",
15
15
  "observability-toast-close.label": "Okay",
16
- "observability-enabled.label": "Enable telemetry",
17
- "observability-enabled.description": "Send anonymous usage and performance data to help improve the product.",
18
16
  // TODO: Add link about telemetry privacy. Make it clearer that user data is not collected.
19
17
  "observability.description": "When enabled, basic usage data will used to improve the product. This may include performance metrics, error logs, and usage data. No personally identifiable information, other than your public key, is included with this data and no private data ever leaves your devices.",
20
18
  "help.label": "Feedback & Support",
@@ -22,6 +20,7 @@ var translations = [
22
20
  "feedback-textarea.placeholder": "Please enter your feedback, technical issue, or feature request.",
23
21
  "include-debug-logs.label": "Include debug logs",
24
22
  "send-feedback.label": "Send Feedback",
23
+ "download-logs.label": "Download logs",
25
24
  "feedback-toast.label": "Thank you for your feedback!",
26
25
  "feedback-toast.description": "We will review your feedback and get back to you as soon as possible."
27
26
  }
@@ -32,4 +31,4 @@ var translations = [
32
31
  export {
33
32
  translations
34
33
  };
35
- //# sourceMappingURL=chunk-JGHMP7UL.mjs.map
34
+ //# sourceMappingURL=chunk-J4EHZPH2.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/translations.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'plugin.name': 'Telemetry',\n 'settings.title': 'Telemetry settings',\n 'observability-toast.label': 'Privacy Notice',\n 'observability-toast.description':\n 'Composer collects usage and performance metrics to improve the product. No user data is collected.',\n 'observability-toast-action.label': 'Settings',\n 'observability-toast-action.alt': 'Open settings to learn more or to disable.',\n 'observability-toast-close.label': 'Okay',\n // TODO: Add link about telemetry privacy. Make it clearer that user data is not collected.\n 'observability.description':\n 'When enabled, basic usage data will used to improve the product. This may include performance metrics, error logs, and usage data. No personally identifiable information, other than your public key, is included with this data and no private data ever leaves your devices.',\n 'help.label': 'Feedback & Support',\n 'feedback-textarea.label': 'Feedback',\n 'feedback-textarea.placeholder': 'Please enter your feedback, technical issue, or feature request.',\n 'include-debug-logs.label': 'Include debug logs',\n 'send-feedback.label': 'Send Feedback',\n 'download-logs.label': 'Download logs',\n 'feedback-toast.label': 'Thank you for your feedback!',\n 'feedback-toast.description': 'We will review your feedback and get back to you as soon as possible.',\n },\n },\n },\n] as const satisfies Resource[];\n"],
5
+ "mappings": ";;;AAMA,SAASA,YAAY;AAEd,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACD,KAAKE,EAAE,GAAG;QACT,eAAe;QACf,kBAAkB;QAClB,6BAA6B;QAC7B,mCACE;QACF,oCAAoC;QACpC,kCAAkC;QAClC,mCAAmC;;QAEnC,6BACE;QACF,cAAc;QACd,2BAA2B;QAC3B,iCAAiC;QACjC,4BAA4B;QAC5B,uBAAuB;QACvB,uBAAuB;QACvB,wBAAwB;QACxB,8BAA8B;MAChC;IACF;EACF;;",
6
+ "names": ["meta", "translations", "id"]
7
+ }
@@ -16,6 +16,7 @@ import { meta } from "#meta";
16
16
  }));
17
17
  ObservabilityCapabilities2.State = Capability.make(`${meta.id}.capability.state`);
18
18
  ObservabilityCapabilities2.Observability = Capability.make(`${meta.id}.capability.observability`);
19
+ ObservabilityCapabilities2.LogDownloader = Capability.make(`${meta.id}.capability.log-downloader`);
19
20
  })(ObservabilityCapabilities || (ObservabilityCapabilities = {}));
20
21
  var ClientCapability = Capability.make("org.dxos.plugin.client.capability.client");
21
22
  var ObservabilityCapabilities;
@@ -37,7 +38,10 @@ __export(Settings_exports, {
37
38
  });
38
39
  import * as Schema2 from "effect/Schema";
39
40
  var Settings = Schema2.mutable(Schema2.Struct({
40
- enabled: Schema2.Boolean
41
+ enabled: Schema2.Boolean.annotations({
42
+ title: "Enable telemetry",
43
+ description: "Send anonymous usage and performance data to help improve the product."
44
+ })
41
45
  }));
42
46
 
43
47
  export {
@@ -47,4 +51,4 @@ export {
47
51
  ObservabilityEvents,
48
52
  Settings_exports
49
53
  };
50
- //# sourceMappingURL=chunk-K7WZOJZF.mjs.map
54
+ //# sourceMappingURL=chunk-NCIKZY6L.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/types/capabilities.ts", "../../../src/types/events.ts", "../../../src/types/Settings.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Atom } from '@effect-atom/atom-react';\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { type Client } from '@dxos/client';\nimport { type Observability } from '@dxos/observability';\n\nimport { meta } from '#meta';\n\nimport * as Settings from './Settings';\n\nexport namespace ObservabilityCapabilities {\n export const Namespace = Capability.make<string>(`${meta.id}.capability.namespace`);\n\n export const Settings = Capability.make<Atom.Writable<Settings.Settings>>(`${meta.id}.capability.settings`);\n\n export const StateSchema = Schema.mutable(\n Schema.Struct({\n group: Schema.optional(Schema.String),\n notified: Schema.optional(Schema.Boolean),\n }),\n );\n\n export type State = Schema.Schema.Type<typeof StateSchema>;\n\n export const State = Capability.make<Atom.Writable<State>>(`${meta.id}.capability.state`);\n\n export const Observability = Capability.make<Observability.Observability>(`${meta.id}.capability.observability`);\n\n /**\n * Optional capability — when contributed, the help/feedback UI exposes a \"Download logs\" action.\n * The callback is responsible for the entire download (read store, encode, save file).\n */\n export type LogDownloader = () => void | Promise<void>;\n export const LogDownloader = Capability.make<LogDownloader>(`${meta.id}.capability.log-downloader`);\n}\n\n// NOTE: This is cloned from the client plugin to avoid circular dependencies.\n// TODO(burdon): Figure out how to share defs.\nexport const ClientCapability = Capability.make<Client>('org.dxos.plugin.client.capability.client');\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { ActivationEvent } from '@dxos/app-framework';\nimport { AppActivationEvents } from '@dxos/app-toolkit';\n\nimport { meta } from '#meta';\n\nexport namespace ObservabilityEvents {\n export const StateReady: ActivationEvent.ActivationEvent = AppActivationEvents.createStateEvent(meta.id);\n}\n\n// NOTE: This is cloned from the client plugin to avoid circular dependencies.\nexport const ClientReadyEvent = ActivationEvent.make('org.dxos.plugin.client.event.client-ready');\n", "//\n// Copyright 2023 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nexport const Settings = Schema.mutable(\n Schema.Struct({\n enabled: Schema.Boolean.annotations({\n title: 'Enable telemetry',\n description: 'Send anonymous usage and performance data to help improve the product.',\n }),\n // TODO(wittjosiah): Separate settings for each observability feature.\n // metrics?: boolean;\n // telemetry?: boolean;\n // errors?: boolean;\n }),\n);\n\nexport interface Settings extends Schema.Schema.Type<typeof Settings> {}\n"],
5
+ "mappings": ";;;;;;AAKA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAI3B,SAASC,YAAY;UAIJC,4BAAAA;6BACFC,YAAYH,WAAWI,KAAa,GAAGH,KAAKI,EAAE,uBAAuB;6BAErEC,WAAWN,WAAWI,KAAuC,GAAGH,KAAKI,EAAE,sBAAsB;6BAE7FE,cAAqBC,eACzBC,cAAO;IACZC,OAAcC,gBAAgBC,aAAM;IACpCC,UAAiBF,gBAAgBG,cAAO;EAC1C,CAAA,CAAA;6BAKWC,QAAQf,WAAWI,KAA2B,GAAGH,KAAKI,EAAE,mBAAmB;6BAE3EW,gBAAgBhB,WAAWI,KAAkC,GAAGH,KAAKI,EAAE,2BAA2B;6BAOlGY,gBAAgBjB,WAAWI,KAAoB,GAAGH,KAAKI,EAAE,4BAA4B;AACpG,GAxBiBH,8BAAAA,4BAAAA,CAAAA,EAAAA;AA4BV,IAAMgB,mBAAmBlB,WAAWI,KAAa,0CAAA;;;;ACvCxD,SAASe,uBAAuB;AAChC,SAASC,2BAA2B;AAEpC,SAASC,QAAAA,aAAY;UAEJC,sBAAAA;uBACFC,aAA8CH,oBAAoBI,iBAAiBH,MAAKI,EAAE;AACzG,GAFiBH,wBAAAA,sBAAAA,CAAAA,EAAAA;AAKV,IAAMI,mBAAmBP,gBAAgBQ,KAAK,2CAAA;;;;ACdrD;;;;AAMA,YAAYC,aAAY;AAEjB,IAAMC,WAAkBC,gBACtBC,eAAO;EACZC,SAAgBC,gBAAQC,YAAY;IAClCC,OAAO;IACPC,aAAa;EACf,CAAA;AAKF,CAAA,CAAA;",
6
+ "names": ["Schema", "Capability", "meta", "ObservabilityCapabilities", "Namespace", "make", "id", "Settings", "StateSchema", "mutable", "Struct", "group", "optional", "String", "notified", "Boolean", "State", "Observability", "LogDownloader", "ClientCapability", "ActivationEvent", "AppActivationEvents", "meta", "ObservabilityEvents", "StateReady", "createStateEvent", "id", "ClientReadyEvent", "make", "Schema", "Settings", "mutable", "Struct", "enabled", "Boolean", "annotations", "title", "description"]
7
+ }
@@ -0,0 +1,46 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import "../chunk-HSLMI22Q.mjs";
3
+
4
+ // src/components/index.ts
5
+ import { lazy } from "react";
6
+
7
+ // src/components/FeedbackForm/FeedbackForm.tsx
8
+ import React from "react";
9
+ import { IconButton, useTranslation } from "@dxos/react-ui";
10
+ import { Form } from "@dxos/react-ui-form";
11
+ import { meta } from "#meta";
12
+ import { UserFeedback } from "#operations";
13
+ var defaultValues = {
14
+ message: "",
15
+ includeLogs: true
16
+ };
17
+ var FeedbackForm = ({ onSave, disabled, onDownloadLogs }) => {
18
+ const { t } = useTranslation(meta.id);
19
+ return /* @__PURE__ */ React.createElement(Form.Root, {
20
+ schema: UserFeedback,
21
+ defaultValues,
22
+ onSave
23
+ }, /* @__PURE__ */ React.createElement(Form.Viewport, null, /* @__PURE__ */ React.createElement(Form.Content, null, /* @__PURE__ */ React.createElement(Form.FieldSet, null), /* @__PURE__ */ React.createElement(Form.Submit, {
24
+ icon: "ph--paper-plane-tilt--regular",
25
+ label: t("send-feedback.label"),
26
+ disabled
27
+ }), onDownloadLogs && /* @__PURE__ */ React.createElement("div", {
28
+ role: "none",
29
+ className: "flex w-full pt-form-padding"
30
+ }, /* @__PURE__ */ React.createElement(IconButton, {
31
+ classNames: "w-full",
32
+ type: "button",
33
+ icon: "ph--download-simple--regular",
34
+ label: t("download-logs.label"),
35
+ onClick: () => void onDownloadLogs(),
36
+ "data-testid": "download-logs-button"
37
+ })))));
38
+ };
39
+
40
+ // src/components/index.ts
41
+ var ObservabilitySettings = lazy(() => import("../ObservabilitySettings-HXTWPHHR.mjs"));
42
+ export {
43
+ FeedbackForm,
44
+ ObservabilitySettings
45
+ };
46
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/components/index.ts", "../../../../src/components/FeedbackForm/FeedbackForm.tsx"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type ComponentType, lazy } from 'react';\n\nexport * from './FeedbackForm';\n\nexport const ObservabilitySettings: ComponentType<any> = lazy(() => import('./ObservabilitySettings'));\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { IconButton, useTranslation } from '@dxos/react-ui';\nimport { Form, type FormRootProps, type FormSubmitProps } from '@dxos/react-ui-form';\n\nimport { meta } from '#meta';\nimport { UserFeedback } from '#operations';\n\nexport type FeedbackFormProps = Pick<FormRootProps<UserFeedback>, 'onSave'> &\n Pick<FormSubmitProps, 'disabled'> & {\n /** Optional handler — when supplied a \"Download logs\" button is rendered below the submit action. */\n onDownloadLogs?: () => void | Promise<void>;\n };\n\nconst defaultValues: UserFeedback = {\n message: '',\n includeLogs: true,\n};\n\nexport const FeedbackForm = ({ onSave, disabled, onDownloadLogs }: FeedbackFormProps) => {\n const { t } = useTranslation(meta.id);\n\n return (\n <Form.Root schema={UserFeedback} defaultValues={defaultValues} onSave={onSave}>\n <Form.Viewport>\n <Form.Content>\n <Form.FieldSet />\n <Form.Submit icon='ph--paper-plane-tilt--regular' label={t('send-feedback.label')} disabled={disabled} />\n {onDownloadLogs && (\n <div role='none' className='flex w-full pt-form-padding'>\n <IconButton\n classNames='w-full'\n type='button'\n icon='ph--download-simple--regular'\n label={t('download-logs.label')}\n onClick={() => void onDownloadLogs()}\n data-testid='download-logs-button'\n />\n </div>\n )}\n </Form.Content>\n </Form.Viewport>\n </Form.Root>\n );\n};\n"],
5
+ "mappings": ";;;;AAIA,SAA6BA,YAAY;;;ACAzC,OAAOC,WAAW;AAElB,SAASC,YAAYC,sBAAsB;AAC3C,SAASC,YAAsD;AAE/D,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAQ7B,IAAMC,gBAA8B;EAClCC,SAAS;EACTC,aAAa;AACf;AAEO,IAAMC,eAAe,CAAC,EAAEC,QAAQC,UAAUC,eAAc,MAAqB;AAClF,QAAM,EAAEC,EAAC,IAAKX,eAAeE,KAAKU,EAAE;AAEpC,SACE,sBAAA,cAACX,KAAKY,MAAI;IAACC,QAAQX;IAAcC;IAA8BI;KAC7D,sBAAA,cAACP,KAAKc,UAAQ,MACZ,sBAAA,cAACd,KAAKe,SAAO,MACX,sBAAA,cAACf,KAAKgB,UAAQ,IAAA,GACd,sBAAA,cAAChB,KAAKiB,QAAM;IAACC,MAAK;IAAgCC,OAAOT,EAAE,qBAAA;IAAwBF;MAClFC,kBACC,sBAAA,cAACW,OAAAA;IAAIC,MAAK;IAAOC,WAAU;KACzB,sBAAA,cAACxB,YAAAA;IACCyB,YAAW;IACXC,MAAK;IACLN,MAAK;IACLC,OAAOT,EAAE,qBAAA;IACTe,SAAS,MAAM,KAAKhB,eAAAA;IACpBiB,eAAY;;AAQ5B;;;ADxCO,IAAMC,wBAA4CC,KAAK,MAAM,OAAO,uCAAA,CAAA;",
6
+ "names": ["lazy", "React", "IconButton", "useTranslation", "Form", "meta", "UserFeedback", "defaultValues", "message", "includeLogs", "FeedbackForm", "onSave", "disabled", "onDownloadLogs", "t", "id", "Root", "schema", "Viewport", "Content", "FieldSet", "Submit", "icon", "label", "div", "role", "className", "classNames", "type", "onClick", "data-testid", "ObservabilitySettings", "lazy"]
7
+ }
@@ -1,45 +1,19 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ translations
4
+ } from "./chunk-J4EHZPH2.mjs";
2
5
  import {
3
6
  ObservabilityCapabilities,
4
7
  ObservabilityEvents
5
- } from "./chunk-K7WZOJZF.mjs";
6
- import {
7
- translations
8
- } from "./chunk-JGHMP7UL.mjs";
8
+ } from "./chunk-NCIKZY6L.mjs";
9
9
  import "./chunk-HSLMI22Q.mjs";
10
10
 
11
- // src/components/index.ts
12
- import { lazy } from "react";
13
-
14
- // src/components/FeedbackForm/FeedbackForm.tsx
15
- import React from "react";
16
- import { useTranslation } from "@dxos/react-ui";
17
- import { Form } from "@dxos/react-ui-form";
18
- import { meta } from "#meta";
19
- import { UserFeedback } from "#operations";
20
- var defaultValues = {
21
- message: "",
22
- includeLogs: true
23
- };
24
- var FeedbackForm = ({ onSave, disabled }) => {
25
- const { t } = useTranslation(meta.id);
26
- return /* @__PURE__ */ React.createElement(Form.Root, {
27
- schema: UserFeedback,
28
- defaultValues,
29
- onSave
30
- }, /* @__PURE__ */ React.createElement(Form.Viewport, null, /* @__PURE__ */ React.createElement(Form.Content, null, /* @__PURE__ */ React.createElement(Form.FieldSet, null), /* @__PURE__ */ React.createElement(Form.Submit, {
31
- icon: "ph--paper-plane-tilt--regular",
32
- label: t("send-feedback.label"),
33
- disabled
34
- }))));
35
- };
36
-
37
- // src/components/index.ts
38
- var ObservabilitySettings = lazy(() => import("./ObservabilitySettings-VP4A362Z.mjs"));
11
+ // src/index.ts
12
+ import { Plugin } from "@dxos/app-framework";
39
13
 
40
14
  // src/meta.ts
41
15
  import { trim } from "@dxos/util";
42
- var meta2 = {
16
+ var meta = {
43
17
  id: "org.dxos.plugin.observability",
44
18
  name: "Telemetry",
45
19
  description: trim`
@@ -49,63 +23,13 @@ var meta2 = {
49
23
  icon: "ph--eye--regular"
50
24
  };
51
25
 
52
- // src/ObservabilityPlugin.ts
53
- import * as Effect from "effect/Effect";
54
- import { ActivationEvent, ActivationEvents, Capability, Plugin } from "@dxos/app-framework";
55
- import { AppActivationEvents, AppPlugin } from "@dxos/app-toolkit";
56
- import { AppGraphBuilder, ClientReady, ObservabilitySettings as ObservabilitySettings2, ObservabilityState, OperationHandler, ReactSurface } from "#capabilities";
57
- import { meta as meta3 } from "#meta";
58
- import { ClientReadyEvent, ObservabilityEvents as ObservabilityEvents2 } from "#types";
59
- import { ObservabilityCapabilities as ObservabilityCapabilities2 } from "#types";
60
- var ObservabilityPlugin = Plugin.define(meta3).pipe(AppPlugin.addAppGraphModule({
61
- activate: AppGraphBuilder
62
- }), AppPlugin.addSurfaceModule({
63
- activate: ReactSurface
64
- }), AppPlugin.addTranslationsModule({
65
- translations
66
- }), Plugin.addModule(({ namespace, observability }) => ({
67
- id: "observability",
68
- activatesOn: ActivationEvents.Startup,
69
- activate: () => Effect.gen(function* () {
70
- const obs = yield* Effect.tryPromise(() => observability());
71
- return Capability.contributes(ObservabilityCapabilities2.Observability, obs);
72
- })
73
- })), Plugin.addModule({
74
- activatesOn: AppActivationEvents.SetupSettings,
75
- activate: ObservabilitySettings2
76
- }), Plugin.addModule(({ namespace }) => ({
77
- id: Capability.getModuleTag(ObservabilityState),
78
- activatesOn: ActivationEvents.Startup,
79
- activatesAfter: [
80
- ObservabilityEvents2.StateReady
81
- ],
82
- activate: () => ObservabilityState({
83
- namespace
84
- })
85
- })), Plugin.addModule(({ namespace }) => ({
86
- id: "namespace",
87
- activatesOn: ActivationEvents.Startup,
88
- activate: () => Effect.succeed(Capability.contributes(ObservabilityCapabilities2.Namespace, namespace))
89
- })), AppPlugin.addOperationHandlerModule({
90
- activate: OperationHandler
91
- }), Plugin.addModule(({ namespace, observability }) => ({
92
- id: Capability.getModuleTag(ClientReady),
93
- activatesOn: ActivationEvent.allOf(ActivationEvents.OperationInvokerReady, ObservabilityEvents2.StateReady, ClientReadyEvent),
94
- activate: () => Effect.gen(function* () {
95
- const obs = yield* Effect.tryPromise(() => observability());
96
- return yield* ClientReady({
97
- namespace,
98
- observability: obs
99
- });
100
- })
101
- })), Plugin.make);
26
+ // src/index.ts
27
+ var ObservabilityPlugin = Plugin.lazy(meta, () => import("#plugin"));
102
28
  export {
103
- FeedbackForm,
104
29
  ObservabilityCapabilities,
105
30
  ObservabilityEvents,
106
31
  ObservabilityPlugin,
107
- ObservabilitySettings,
108
- meta2 as meta,
32
+ meta,
109
33
  translations as observabilityTranslations
110
34
  };
111
35
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../../src/components/index.ts", "../../../src/components/FeedbackForm/FeedbackForm.tsx", "../../../src/meta.ts", "../../../src/ObservabilityPlugin.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type ComponentType, lazy } from 'react';\n\nexport * from './FeedbackForm';\n\nexport const ObservabilitySettings: ComponentType<any> = lazy(() => import('./ObservabilitySettings'));\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { useTranslation } from '@dxos/react-ui';\nimport { Form, type FormRootProps, type FormSubmitProps } from '@dxos/react-ui-form';\n\nimport { meta } from '#meta';\nimport { UserFeedback } from '#operations';\n\nexport type FeedbackFormProps = Pick<FormRootProps<UserFeedback>, 'onSave'> & Pick<FormSubmitProps, 'disabled'>;\n\nconst defaultValues: UserFeedback = {\n message: '',\n includeLogs: true,\n};\n\nexport const FeedbackForm = ({ onSave, disabled }: FeedbackFormProps) => {\n const { t } = useTranslation(meta.id);\n\n return (\n <Form.Root schema={UserFeedback} defaultValues={defaultValues} onSave={onSave}>\n <Form.Viewport>\n <Form.Content>\n <Form.FieldSet />\n <Form.Submit icon='ph--paper-plane-tilt--regular' label={t('send-feedback.label')} disabled={disabled} />\n </Form.Content>\n </Form.Viewport>\n </Form.Root>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.observability',\n name: 'Telemetry',\n description: trim`\n Application observability and telemetry collection for monitoring performance and usage patterns.\n Track metrics, logs, and traces for system health and analytics.\n `,\n icon: 'ph--eye--regular',\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { ActivationEvent, ActivationEvents, Capability, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';\nimport { type Observability } from '@dxos/observability';\n\nimport {\n AppGraphBuilder,\n ClientReady,\n ObservabilitySettings,\n ObservabilityState,\n OperationHandler,\n ReactSurface,\n} from '#capabilities';\nimport { meta } from '#meta';\nimport { ClientReadyEvent, ObservabilityEvents } from '#types';\nimport { ObservabilityCapabilities } from '#types';\n\nimport { translations } from './translations';\n\nexport type ObservabilityPluginOptions = {\n namespace: string;\n observability: () => Promise<Observability.Observability>;\n};\n\nexport const ObservabilityPlugin = Plugin.define<ObservabilityPluginOptions>(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule(({ namespace, observability }) => ({\n id: 'observability',\n activatesOn: ActivationEvents.Startup,\n activate: () =>\n Effect.gen(function* () {\n const obs = yield* Effect.tryPromise(() => observability());\n return Capability.contributes(ObservabilityCapabilities.Observability, obs);\n }),\n })),\n Plugin.addModule({\n activatesOn: AppActivationEvents.SetupSettings,\n activate: ObservabilitySettings,\n }),\n Plugin.addModule(({ namespace }) => ({\n id: Capability.getModuleTag(ObservabilityState),\n activatesOn: ActivationEvents.Startup,\n activatesAfter: [ObservabilityEvents.StateReady],\n activate: () => ObservabilityState({ namespace }),\n })),\n Plugin.addModule(({ namespace }) => ({\n id: 'namespace',\n activatesOn: ActivationEvents.Startup,\n activate: () => Effect.succeed(Capability.contributes(ObservabilityCapabilities.Namespace, namespace)),\n })),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n Plugin.addModule(({ namespace, observability }) => ({\n id: Capability.getModuleTag(ClientReady),\n activatesOn: ActivationEvent.allOf(\n ActivationEvents.OperationInvokerReady,\n ObservabilityEvents.StateReady,\n ClientReadyEvent,\n ),\n activate: () =>\n Effect.gen(function* () {\n const obs = yield* Effect.tryPromise(() => observability());\n return yield* ClientReady({ namespace, observability: obs });\n }),\n })),\n Plugin.make,\n);\n"],
5
- "mappings": ";;;;;;;;;;;AAIA,SAA6BA,YAAY;;;ACAzC,OAAOC,WAAW;AAElB,SAASC,sBAAsB;AAC/B,SAASC,YAAsD;AAE/D,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAI7B,IAAMC,gBAA8B;EAClCC,SAAS;EACTC,aAAa;AACf;AAEO,IAAMC,eAAe,CAAC,EAAEC,QAAQC,SAAQ,MAAqB;AAClE,QAAM,EAAEC,EAAC,IAAKC,eAAeC,KAAKC,EAAE;AAEpC,SACE,sBAAA,cAACC,KAAKC,MAAI;IAACC,QAAQC;IAAcb;IAA8BI;KAC7D,sBAAA,cAACM,KAAKI,UAAQ,MACZ,sBAAA,cAACJ,KAAKK,SAAO,MACX,sBAAA,cAACL,KAAKM,UAAQ,IAAA,GACd,sBAAA,cAACN,KAAKO,QAAM;IAACC,MAAK;IAAgCC,OAAOb,EAAE,qBAAA;IAAwBD;;AAK7F;;;ADxBO,IAAMe,wBAA4CC,KAAK,MAAM,OAAO,sCAAA,CAAA;;;AEH3E,SAASC,YAAY;AAEd,IAAMC,QAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;AACR;;;ACXA,YAAYC,YAAY;AAExB,SAASC,iBAAiBC,kBAAkBC,YAAYC,cAAc;AACtE,SAASC,qBAAqBC,iBAAiB;AAG/C,SACEC,iBACAC,aACAC,yBAAAA,wBACAC,oBACAC,kBACAC,oBACK;AACP,SAASC,QAAAA,aAAY;AACrB,SAASC,kBAAkBC,uBAAAA,4BAA2B;AACtD,SAASC,6BAAAA,kCAAiC;AASnC,IAAMC,sBAAsBC,OAAOC,OAAmCC,KAAAA,EAAMC,KACjFC,UAAUC,kBAAkB;EAAEC,UAAUC;AAAgB,CAAA,GACxDH,UAAUI,iBAAiB;EAAEF,UAAUG;AAAa,CAAA,GACpDL,UAAUM,sBAAsB;EAAEC;AAAa,CAAA,GAC/CX,OAAOY,UAAU,CAAC,EAAEC,WAAWC,cAAa,OAAQ;EAClDC,IAAI;EACJC,aAAaC,iBAAiBC;EAC9BZ,UAAU,MACDa,WAAI,aAAA;AACT,UAAMC,MAAM,OAAcC,kBAAW,MAAMP,cAAAA,CAAAA;AAC3C,WAAOQ,WAAWC,YAAYC,2BAA0BC,eAAeL,GAAAA;EACzE,CAAA;AACJ,EAAA,GACApB,OAAOY,UAAU;EACfI,aAAaU,oBAAoBC;EACjCrB,UAAUsB;AACZ,CAAA,GACA5B,OAAOY,UAAU,CAAC,EAAEC,UAAS,OAAQ;EACnCE,IAAIO,WAAWO,aAAaC,kBAAAA;EAC5Bd,aAAaC,iBAAiBC;EAC9Ba,gBAAgB;IAACC,qBAAoBC;;EACrC3B,UAAU,MAAMwB,mBAAmB;IAAEjB;EAAU,CAAA;AACjD,EAAA,GACAb,OAAOY,UAAU,CAAC,EAAEC,UAAS,OAAQ;EACnCE,IAAI;EACJC,aAAaC,iBAAiBC;EAC9BZ,UAAU,MAAa4B,eAAQZ,WAAWC,YAAYC,2BAA0BW,WAAWtB,SAAAA,CAAAA;AAC7F,EAAA,GACAT,UAAUgC,0BAA0B;EAAE9B,UAAU+B;AAAiB,CAAA,GACjErC,OAAOY,UAAU,CAAC,EAAEC,WAAWC,cAAa,OAAQ;EAClDC,IAAIO,WAAWO,aAAaS,WAAAA;EAC5BtB,aAAauB,gBAAgBC,MAC3BvB,iBAAiBwB,uBACjBT,qBAAoBC,YACpBS,gBAAAA;EAEFpC,UAAU,MACDa,WAAI,aAAA;AACT,UAAMC,MAAM,OAAcC,kBAAW,MAAMP,cAAAA,CAAAA;AAC3C,WAAO,OAAOwB,YAAY;MAAEzB;MAAWC,eAAeM;IAAI,CAAA;EAC5D,CAAA;AACJ,EAAA,GACApB,OAAO2C,IAAI;",
6
- "names": ["lazy", "React", "useTranslation", "Form", "meta", "UserFeedback", "defaultValues", "message", "includeLogs", "FeedbackForm", "onSave", "disabled", "t", "useTranslation", "meta", "id", "Form", "Root", "schema", "UserFeedback", "Viewport", "Content", "FieldSet", "Submit", "icon", "label", "ObservabilitySettings", "lazy", "trim", "meta", "id", "name", "description", "trim", "icon", "Effect", "ActivationEvent", "ActivationEvents", "Capability", "Plugin", "AppActivationEvents", "AppPlugin", "AppGraphBuilder", "ClientReady", "ObservabilitySettings", "ObservabilityState", "OperationHandler", "ReactSurface", "meta", "ClientReadyEvent", "ObservabilityEvents", "ObservabilityCapabilities", "ObservabilityPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addAppGraphModule", "activate", "AppGraphBuilder", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations", "addModule", "namespace", "observability", "id", "activatesOn", "ActivationEvents", "Startup", "gen", "obs", "tryPromise", "Capability", "contributes", "ObservabilityCapabilities", "Observability", "AppActivationEvents", "SetupSettings", "ObservabilitySettings", "getModuleTag", "ObservabilityState", "activatesAfter", "ObservabilityEvents", "StateReady", "succeed", "Namespace", "addOperationHandlerModule", "OperationHandler", "ClientReady", "ActivationEvent", "allOf", "OperationInvokerReady", "ClientReadyEvent", "make"]
3
+ "sources": ["../../../src/index.ts", "../../../src/meta.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport { meta } from './meta';\n\nexport { ObservabilityCapabilities, ObservabilityEvents } from './types';\n// TODO(wittjosiah): FeedbackForm should be factored out of plugin-observability into a shared UI package.\nexport * from './meta';\nexport const ObservabilityPlugin = Plugin.lazy(meta, () => import('#plugin'));\nexport { translations as observabilityTranslations } from './translations';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.observability',\n name: 'Telemetry',\n description: trim`\n Application observability and telemetry collection for monitoring performance and usage patterns.\n Track metrics, logs, and traces for system health and analytics.\n `,\n icon: 'ph--eye--regular',\n};\n"],
5
+ "mappings": ";;;;;;;;;;;AAIA,SAASA,cAAc;;;ACCvB,SAASC,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaJ;;;;EAIbK,MAAM;AACR;;;ADJO,IAAMC,sBAAsBC,OAAOC,KAAKC,MAAM,MAAM,OAAO,SAAA,CAAA;",
6
+ "names": ["Plugin", "trim", "meta", "id", "name", "description", "icon", "ObservabilityPlugin", "Plugin", "lazy", "meta"]
7
7
  }