@dxos/plugin-observability 0.8.4-main.8360d9e660 → 0.8.4-main.8baae0fced
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/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/neutral/ObservabilityPlugin.mjs +60 -0
- package/dist/lib/neutral/ObservabilityPlugin.mjs.map +7 -0
- package/dist/lib/neutral/ObservabilityPlugin.node.mjs +22 -0
- package/dist/lib/neutral/ObservabilityPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/ObservabilityPlugin.workerd.mjs +22 -0
- package/dist/lib/neutral/ObservabilityPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/ObservabilitySettings-H6UKYDDT.mjs +27 -0
- package/dist/lib/neutral/ObservabilitySettings-H6UKYDDT.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +17 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/{browser/chunk-2WPL7OWM.mjs → neutral/chunk-RPFT4FVC.mjs} +6 -2
- package/dist/lib/neutral/chunk-RPFT4FVC.mjs.map +7 -0
- package/dist/lib/neutral/chunk-TQA4K4HH.mjs +106 -0
- package/dist/lib/neutral/chunk-TQA4K4HH.mjs.map +7 -0
- package/dist/lib/neutral/chunk-U3O7BYGC.mjs +8 -0
- package/dist/lib/neutral/chunk-U3O7BYGC.mjs.map +7 -0
- package/dist/lib/{browser/client-ready-NOYYQV6U.mjs → neutral/client-ready-TM7VE6CH.mjs} +30 -16
- package/dist/lib/neutral/client-ready-TM7VE6CH.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +9 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +18 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/operation-handler-4WWRXOHR.mjs +13 -0
- package/dist/lib/neutral/operation-handler-4WWRXOHR.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-SHB2SLRK.mjs +35 -0
- package/dist/lib/neutral/react-surface-SHB2SLRK.mjs.map +7 -0
- package/dist/lib/neutral/send-event-AUVYZHS2.mjs +20 -0
- package/dist/lib/neutral/send-event-AUVYZHS2.mjs.map +7 -0
- package/dist/lib/{browser/settings-YCQ67D55.mjs → neutral/settings-MZYK2WQR.mjs} +7 -14
- package/dist/lib/neutral/settings-MZYK2WQR.mjs.map +7 -0
- package/dist/lib/{browser/state-I2G23I3G.mjs → neutral/state-5COCK3KV.mjs} +5 -8
- package/dist/lib/neutral/state-5COCK3KV.mjs.map +7 -0
- package/dist/lib/neutral/toggle-6WX7G476.mjs +45 -0
- package/dist/lib/neutral/toggle-6WX7G476.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +26 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +14 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/ObservabilityPlugin.d.ts +6 -0
- package/dist/types/src/ObservabilityPlugin.d.ts.map +1 -1
- package/dist/types/src/{cli/plugin.d.ts → ObservabilityPlugin.node.d.ts} +2 -1
- package/dist/types/src/ObservabilityPlugin.node.d.ts.map +1 -0
- package/dist/types/src/ObservabilityPlugin.test.d.ts +2 -0
- package/dist/types/src/ObservabilityPlugin.test.d.ts.map +1 -0
- package/dist/types/src/ObservabilityPlugin.workerd.d.ts +4 -0
- package/dist/types/src/ObservabilityPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/client-ready.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +16 -6
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/{settings/settings.d.ts → settings.d.ts} +2 -5
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/components/ObservabilitySettings/ObservabilitySettings.d.ts +6 -0
- package/dist/types/src/components/ObservabilitySettings/ObservabilitySettings.d.ts.map +1 -0
- package/dist/types/src/components/ObservabilitySettings/ObservabilitySettings.stories.d.ts +29 -0
- package/dist/types/src/components/ObservabilitySettings/ObservabilitySettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/ObservabilitySettings/index.d.ts +2 -0
- package/dist/types/src/components/ObservabilitySettings/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +2 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/send-event.d.ts +5 -0
- package/dist/types/src/operations/send-event.d.ts.map +1 -0
- package/dist/types/src/operations/toggle.d.ts +5 -0
- package/dist/types/src/operations/toggle.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +10 -18
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/ObservabilityCapabilities.d.ts +28 -0
- package/dist/types/src/types/ObservabilityCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/ObservabilityEvents.d.ts +4 -0
- package/dist/types/src/types/ObservabilityEvents.d.ts.map +1 -0
- package/dist/types/src/types/ObservabilityOperation.d.ts +10 -0
- package/dist/types/src/types/ObservabilityOperation.d.ts.map +1 -0
- package/dist/types/src/types/Settings.d.ts +7 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +4 -3
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +82 -46
- package/src/ObservabilityPlugin.node.ts +33 -0
- package/src/ObservabilityPlugin.test.ts +25 -0
- package/src/ObservabilityPlugin.ts +27 -20
- package/src/ObservabilityPlugin.workerd.ts +32 -0
- package/src/capabilities/{client-ready/client-ready.ts → client-ready.ts} +31 -9
- package/src/capabilities/index.ts +13 -6
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +35 -0
- package/src/capabilities/{settings/settings.ts → settings.ts} +4 -5
- package/src/capabilities/{state/state.ts → state.ts} +2 -2
- package/src/components/ObservabilitySettings/ObservabilitySettings.stories.tsx +34 -0
- package/src/components/ObservabilitySettings/ObservabilitySettings.tsx +34 -0
- package/src/components/ObservabilitySettings/index.ts +5 -0
- package/src/components/index.ts +3 -1
- package/src/index.ts +1 -3
- package/src/meta.ts +2 -0
- package/src/operations/index.ts +10 -0
- package/src/operations/send-event.ts +23 -0
- package/src/operations/toggle.ts +46 -0
- package/src/plugin.ts +11 -0
- package/src/translations.ts +10 -17
- package/src/types/ObservabilityCapabilities.ts +42 -0
- package/src/types/{events.ts → ObservabilityEvents.ts} +4 -4
- package/src/types/ObservabilityOperation.ts +41 -0
- package/src/types/Settings.ts +22 -0
- package/src/types/index.ts +4 -3
- package/dist/lib/browser/HelpContainer-KTMKZBHY.mjs +0 -74
- package/dist/lib/browser/HelpContainer-KTMKZBHY.mjs.map +0 -7
- package/dist/lib/browser/ObservabilitySettings-ICX2QGCA.mjs +0 -12
- package/dist/lib/browser/app-graph-builder-367TIDLZ.mjs +0 -41
- package/dist/lib/browser/app-graph-builder-367TIDLZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-2WPL7OWM.mjs.map +0 -7
- package/dist/lib/browser/chunk-D4FKSLUA.mjs +0 -10
- package/dist/lib/browser/chunk-D4FKSLUA.mjs.map +0 -7
- package/dist/lib/browser/chunk-EHHO2HH2.mjs +0 -138
- package/dist/lib/browser/chunk-EHHO2HH2.mjs.map +0 -7
- package/dist/lib/browser/chunk-GUYC2TF5.mjs +0 -41
- package/dist/lib/browser/chunk-GUYC2TF5.mjs.map +0 -7
- package/dist/lib/browser/chunk-U5DG3DSQ.mjs +0 -32
- package/dist/lib/browser/chunk-U5DG3DSQ.mjs.map +0 -7
- package/dist/lib/browser/cli/index.mjs +0 -24
- package/dist/lib/browser/cli/index.mjs.map +0 -7
- package/dist/lib/browser/client-ready-NOYYQV6U.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -93
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/operation-resolver-VDE6BGUA.mjs +0 -78
- package/dist/lib/browser/operation-resolver-VDE6BGUA.mjs.map +0 -7
- package/dist/lib/browser/react-surface-EW3DW2JH.mjs +0 -39
- package/dist/lib/browser/react-surface-EW3DW2JH.mjs.map +0 -7
- package/dist/lib/browser/settings-YCQ67D55.mjs.map +0 -7
- package/dist/lib/browser/state-I2G23I3G.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -18
- package/dist/lib/node-esm/HelpContainer-TF3KOC2E.mjs +0 -75
- package/dist/lib/node-esm/HelpContainer-TF3KOC2E.mjs.map +0 -7
- package/dist/lib/node-esm/ObservabilitySettings-WJ7CWCNV.mjs +0 -13
- package/dist/lib/node-esm/app-graph-builder-PJ5PRDPL.mjs +0 -42
- package/dist/lib/node-esm/app-graph-builder-PJ5PRDPL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2AMYV5T4.mjs +0 -139
- package/dist/lib/node-esm/chunk-2AMYV5T4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6OEBM6QE.mjs +0 -42
- package/dist/lib/node-esm/chunk-6OEBM6QE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HGAUN765.mjs +0 -12
- package/dist/lib/node-esm/chunk-HGAUN765.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-LJSRL5PE.mjs +0 -18
- package/dist/lib/node-esm/chunk-LJSRL5PE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-POCWWX7Z.mjs +0 -33
- package/dist/lib/node-esm/chunk-POCWWX7Z.mjs.map +0 -7
- package/dist/lib/node-esm/cli/index.mjs +0 -25
- package/dist/lib/node-esm/cli/index.mjs.map +0 -7
- package/dist/lib/node-esm/client-ready-QDMM2N3K.mjs +0 -103
- package/dist/lib/node-esm/client-ready-QDMM2N3K.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -94
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/operation-resolver-PKDJM72F.mjs +0 -79
- package/dist/lib/node-esm/operation-resolver-PKDJM72F.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-YJATSR4Q.mjs +0 -40
- package/dist/lib/node-esm/react-surface-YJATSR4Q.mjs.map +0 -7
- package/dist/lib/node-esm/settings-2PQK3YZN.mjs +0 -38
- package/dist/lib/node-esm/settings-2PQK3YZN.mjs.map +0 -7
- package/dist/lib/node-esm/state-ZVKG6WA6.mjs +0 -31
- package/dist/lib/node-esm/state-ZVKG6WA6.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -19
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +0 -6
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/client-ready/client-ready.d.ts.map +0 -1
- package/dist/types/src/capabilities/client-ready/index.d.ts +0 -4
- package/dist/types/src/capabilities/client-ready/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -7
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/index.d.ts +0 -7
- package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/index.d.ts +0 -11
- package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
- package/dist/types/src/cli/index.d.ts +0 -2
- package/dist/types/src/cli/index.d.ts.map +0 -1
- package/dist/types/src/cli/plugin.d.ts.map +0 -1
- package/dist/types/src/components/FeedbackForm/FeedbackForm.d.ts +0 -6
- package/dist/types/src/components/FeedbackForm/FeedbackForm.d.ts.map +0 -1
- package/dist/types/src/components/FeedbackForm/FeedbackForm.stories.d.ts +0 -35
- package/dist/types/src/components/FeedbackForm/FeedbackForm.stories.d.ts.map +0 -1
- package/dist/types/src/components/FeedbackForm/index.d.ts +0 -2
- package/dist/types/src/components/FeedbackForm/index.d.ts.map +0 -1
- package/dist/types/src/containers/HelpContainer/HelpContainer.d.ts +0 -4
- package/dist/types/src/containers/HelpContainer/HelpContainer.d.ts.map +0 -1
- package/dist/types/src/containers/HelpContainer/index.d.ts +0 -3
- package/dist/types/src/containers/HelpContainer/index.d.ts.map +0 -1
- package/dist/types/src/containers/ObservabilitySettings/ObservabilitySettings.d.ts +0 -12
- package/dist/types/src/containers/ObservabilitySettings/ObservabilitySettings.d.ts.map +0 -1
- package/dist/types/src/containers/ObservabilitySettings/index.d.ts +0 -3
- package/dist/types/src/containers/ObservabilitySettings/index.d.ts.map +0 -1
- package/dist/types/src/containers/index.d.ts +0 -6
- package/dist/types/src/containers/index.d.ts.map +0 -1
- package/dist/types/src/types/capabilities.d.ts +0 -27
- package/dist/types/src/types/capabilities.d.ts.map +0 -1
- package/dist/types/src/types/events.d.ts +0 -6
- package/dist/types/src/types/events.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -63
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -40
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/client-ready/index.ts +0 -9
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -76
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/react-surface/react-surface.tsx +0 -35
- package/src/capabilities/settings/index.ts +0 -7
- package/src/capabilities/state/index.ts +0 -7
- package/src/cli/index.ts +0 -5
- package/src/cli/plugin.ts +0 -28
- package/src/components/FeedbackForm/FeedbackForm.stories.tsx +0 -33
- package/src/components/FeedbackForm/FeedbackForm.tsx +0 -33
- package/src/components/FeedbackForm/index.ts +0 -5
- package/src/containers/HelpContainer/HelpContainer.tsx +0 -55
- package/src/containers/HelpContainer/index.ts +0 -7
- package/src/containers/ObservabilitySettings/ObservabilitySettings.tsx +0 -53
- package/src/containers/ObservabilitySettings/index.ts +0 -11
- package/src/containers/index.ts +0 -11
- package/src/types/capabilities.ts +0 -34
- package/src/types/schema.ts +0 -84
- /package/dist/lib/{browser/ObservabilitySettings-ICX2QGCA.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/ObservabilitySettings-WJ7CWCNV.mjs.map → neutral/meta.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types → neutral/operations}/index.mjs.map +0 -0
- /package/dist/types/src/capabilities/{client-ready/client-ready.d.ts → client-ready.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
- /package/dist/types/src/capabilities/{state/state.d.ts → state.d.ts} +0 -0
package/src/index.ts
CHANGED
package/src/meta.ts
CHANGED
|
@@ -8,9 +8,11 @@ import { trim } from '@dxos/util';
|
|
|
8
8
|
export const meta: Plugin.Meta = {
|
|
9
9
|
id: 'org.dxos.plugin.observability',
|
|
10
10
|
name: 'Telemetry',
|
|
11
|
+
author: 'DXOS',
|
|
11
12
|
description: trim`
|
|
12
13
|
Application observability and telemetry collection for monitoring performance and usage patterns.
|
|
13
14
|
Track metrics, logs, and traces for system health and analytics.
|
|
14
15
|
`,
|
|
15
16
|
icon: 'ph--eye--regular',
|
|
17
|
+
tags: ['system'],
|
|
16
18
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
9
|
+
|
|
10
|
+
import { ObservabilityCapabilities, ObservabilityOperation } from '../types';
|
|
11
|
+
|
|
12
|
+
const handler: Operation.WithHandler<typeof ObservabilityOperation.SendEvent> = ObservabilityOperation.SendEvent.pipe(
|
|
13
|
+
Operation.withHandler(
|
|
14
|
+
Effect.fnUntraced(function* (input) {
|
|
15
|
+
// NOTE: This is to ensure that events fired before observability is ready are still sent.
|
|
16
|
+
const observability = yield* Capability.waitFor(ObservabilityCapabilities.Observability);
|
|
17
|
+
const properties = input.properties ?? {};
|
|
18
|
+
observability.events.captureEvent(input.name, properties);
|
|
19
|
+
}),
|
|
20
|
+
),
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
export default handler;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
|
+
import { Operation } from '@dxos/compute';
|
|
10
|
+
import { Observability } from '@dxos/observability';
|
|
11
|
+
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
|
|
14
|
+
import { ObservabilityCapabilities, ObservabilityOperation, type Settings } from '../types';
|
|
15
|
+
|
|
16
|
+
const handler: Operation.WithHandler<typeof ObservabilityOperation.Toggle> = ObservabilityOperation.Toggle.pipe(
|
|
17
|
+
Operation.withHandler(
|
|
18
|
+
Effect.fnUntraced(function* (input) {
|
|
19
|
+
const namespace = yield* Capability.get(ObservabilityCapabilities.Namespace);
|
|
20
|
+
const observability = yield* Capability.get(ObservabilityCapabilities.Observability);
|
|
21
|
+
const capabilities = yield* Capability.Service;
|
|
22
|
+
const registry = capabilities.get(Capabilities.AtomRegistry);
|
|
23
|
+
const allSettings = capabilities.getAll(AppCapabilities.Settings);
|
|
24
|
+
const settingsObj = allSettings.find((s: AppCapabilities.Settings) => s.prefix === meta.id);
|
|
25
|
+
if (!settingsObj) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
const settings = registry.get(settingsObj.atom) as Settings.Settings;
|
|
29
|
+
const newEnabled = input.state ?? !settings.enabled;
|
|
30
|
+
registry.set(settingsObj.atom, { ...settings, enabled: newEnabled });
|
|
31
|
+
observability.events.captureEvent('observability.toggle', {
|
|
32
|
+
enabled: newEnabled,
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
if (newEnabled) {
|
|
36
|
+
yield* observability.enable();
|
|
37
|
+
} else {
|
|
38
|
+
yield* observability.disable();
|
|
39
|
+
}
|
|
40
|
+
yield* Effect.promise(() => Observability.storeObservabilityDisabled(namespace, !newEnabled));
|
|
41
|
+
return newEnabled;
|
|
42
|
+
}),
|
|
43
|
+
),
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
export default handler;
|
package/src/plugin.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
|
|
7
|
+
import { meta } from './meta';
|
|
8
|
+
|
|
9
|
+
export const ObservabilityPlugin = Plugin.lazy(meta, () => import('#plugin'));
|
|
10
|
+
|
|
11
|
+
export { ObservabilityOperationHandlerSet } from './operations';
|
package/src/translations.ts
CHANGED
|
@@ -4,31 +4,24 @@
|
|
|
4
4
|
|
|
5
5
|
import { type Resource } from '@dxos/react-ui';
|
|
6
6
|
|
|
7
|
-
import { meta } from '
|
|
7
|
+
import { meta } from '#meta';
|
|
8
8
|
|
|
9
9
|
export const translations = [
|
|
10
10
|
{
|
|
11
11
|
'en-US': {
|
|
12
12
|
[meta.id]: {
|
|
13
|
-
'plugin
|
|
14
|
-
'
|
|
15
|
-
'
|
|
16
|
-
'observability
|
|
13
|
+
'plugin.name': 'Telemetry',
|
|
14
|
+
'help.label': 'Feedback',
|
|
15
|
+
'settings.title': 'Telemetry settings',
|
|
16
|
+
'observability-toast.label': 'Privacy Notice',
|
|
17
|
+
'observability-toast.description':
|
|
17
18
|
'Composer collects usage and performance metrics to improve the product. No user data is collected.',
|
|
18
|
-
'observability
|
|
19
|
-
'observability
|
|
20
|
-
'observability
|
|
21
|
-
'observability enabled label': 'Enable telemetry',
|
|
19
|
+
'observability-toast-action.label': 'Settings',
|
|
20
|
+
'observability-toast-action.alt': 'Open settings to learn more or to disable.',
|
|
21
|
+
'observability-toast-close.label': 'Okay',
|
|
22
22
|
// TODO: Add link about telemetry privacy. Make it clearer that user data is not collected.
|
|
23
|
-
'observability
|
|
23
|
+
'observability.description':
|
|
24
24
|
'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.',
|
|
25
|
-
'help label': 'Feedback & Support',
|
|
26
|
-
'feedback textarea label': 'Feedback',
|
|
27
|
-
'feedback textarea placeholder': 'Please enter your feedback, technical issue, or feature request.',
|
|
28
|
-
'include debug logs label': 'Include debug logs',
|
|
29
|
-
'send feedback label': 'Send Feedback',
|
|
30
|
-
'feedback toast label': 'Thank you for your feedback!',
|
|
31
|
-
'feedback toast description': 'We will review your feedback and get back to you as soon as possible.',
|
|
32
25
|
},
|
|
33
26
|
},
|
|
34
27
|
},
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import { type Atom } from '@effect-atom/atom-react';
|
|
8
|
+
import * as Schema from 'effect/Schema';
|
|
9
|
+
|
|
10
|
+
import { Capability } from '@dxos/app-framework';
|
|
11
|
+
import { type Client } from '@dxos/client';
|
|
12
|
+
import { type Observability as ObservabilityNs } from '@dxos/observability';
|
|
13
|
+
|
|
14
|
+
import { meta } from '#meta';
|
|
15
|
+
|
|
16
|
+
export const Namespace = Capability.make<string>(`${meta.id}.capability.namespace`);
|
|
17
|
+
|
|
18
|
+
export const Settings = Capability.make<Atom.Writable<import('./Settings').Settings>>(`${meta.id}.capability.settings`);
|
|
19
|
+
|
|
20
|
+
export const StateSchema = Schema.mutable(
|
|
21
|
+
Schema.Struct({
|
|
22
|
+
group: Schema.optional(Schema.String),
|
|
23
|
+
notified: Schema.optional(Schema.Boolean),
|
|
24
|
+
}),
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
export type State = Schema.Schema.Type<typeof StateSchema>;
|
|
28
|
+
|
|
29
|
+
export const State = Capability.make<Atom.Writable<State>>(`${meta.id}.capability.state`);
|
|
30
|
+
|
|
31
|
+
export const Observability = Capability.make<ObservabilityNs.Observability>(`${meta.id}.capability.observability`);
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Optional capability — when contributed, the help/feedback UI exposes a "Download logs" action.
|
|
35
|
+
* The callback is responsible for the entire download (read store, encode, save file).
|
|
36
|
+
*/
|
|
37
|
+
export type LogDownloader = () => void | Promise<void>;
|
|
38
|
+
export const LogDownloader = Capability.make<LogDownloader>(`${meta.id}.capability.log-downloader`);
|
|
39
|
+
|
|
40
|
+
// NOTE: This is cloned from the client plugin to avoid circular dependencies.
|
|
41
|
+
// TODO(burdon): Figure out how to share defs.
|
|
42
|
+
export const ClientCapability = Capability.make<Client>('org.dxos.plugin.client.capability.client');
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
5
7
|
import { ActivationEvent } from '@dxos/app-framework';
|
|
6
8
|
import { AppActivationEvents } from '@dxos/app-toolkit';
|
|
7
9
|
|
|
8
|
-
import { meta } from '
|
|
10
|
+
import { meta } from '#meta';
|
|
9
11
|
|
|
10
|
-
export
|
|
11
|
-
export const StateReady: ActivationEvent.ActivationEvent = AppActivationEvents.createStateEvent(meta.id);
|
|
12
|
-
}
|
|
12
|
+
export const StateReady: ActivationEvent.ActivationEvent = AppActivationEvents.createStateEvent(meta.id);
|
|
13
13
|
|
|
14
14
|
// NOTE: This is cloned from the client plugin to avoid circular dependencies.
|
|
15
15
|
export const ClientReadyEvent = ActivationEvent.make('org.dxos.plugin.client.event.client-ready');
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import * as Schema from 'effect/Schema';
|
|
8
|
+
|
|
9
|
+
import { Capability } from '@dxos/app-framework';
|
|
10
|
+
import { Operation } from '@dxos/compute';
|
|
11
|
+
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
|
|
14
|
+
const OBSERVABILITY_OPERATION = `${meta.id}.operation`;
|
|
15
|
+
|
|
16
|
+
export const Toggle = Operation.make({
|
|
17
|
+
meta: {
|
|
18
|
+
key: `${OBSERVABILITY_OPERATION}.toggle`,
|
|
19
|
+
name: 'Toggle Observability',
|
|
20
|
+
description: 'Toggle observability on or off.',
|
|
21
|
+
},
|
|
22
|
+
services: [Capability.Service],
|
|
23
|
+
input: Schema.Struct({
|
|
24
|
+
state: Schema.optional(Schema.Boolean),
|
|
25
|
+
}),
|
|
26
|
+
output: Schema.Boolean,
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export const SendEvent = Operation.make({
|
|
30
|
+
meta: {
|
|
31
|
+
key: `${OBSERVABILITY_OPERATION}.send-event`,
|
|
32
|
+
name: 'Send Event',
|
|
33
|
+
description: 'Send an observability event.',
|
|
34
|
+
},
|
|
35
|
+
services: [Capability.Service],
|
|
36
|
+
input: Schema.Struct({
|
|
37
|
+
name: Schema.String.annotations({ description: 'The name of the event.' }),
|
|
38
|
+
properties: Schema.optional(Schema.Any).annotations({ description: 'Event properties.' }),
|
|
39
|
+
}),
|
|
40
|
+
output: Schema.Void,
|
|
41
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import * as Schema from 'effect/Schema';
|
|
8
|
+
|
|
9
|
+
export const Settings = Schema.mutable(
|
|
10
|
+
Schema.Struct({
|
|
11
|
+
enabled: Schema.Boolean.annotations({
|
|
12
|
+
title: 'Enable telemetry',
|
|
13
|
+
description: 'Send anonymous usage and performance data to help improve the product.',
|
|
14
|
+
}),
|
|
15
|
+
// TODO(wittjosiah): Separate settings for each observability feature.
|
|
16
|
+
// metrics?: boolean;
|
|
17
|
+
// telemetry?: boolean;
|
|
18
|
+
// errors?: boolean;
|
|
19
|
+
}),
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
export interface Settings extends Schema.Schema.Type<typeof Settings> {}
|
package/src/types/index.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
5
|
+
export * as ObservabilityCapabilities from './ObservabilityCapabilities';
|
|
6
|
+
export * as ObservabilityEvents from './ObservabilityEvents';
|
|
7
|
+
export * as ObservabilityOperation from './ObservabilityOperation';
|
|
8
|
+
export * as Settings from './Settings';
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
FeedbackForm
|
|
3
|
-
} from "./chunk-U5DG3DSQ.mjs";
|
|
4
|
-
import {
|
|
5
|
-
ObservabilityCapabilities,
|
|
6
|
-
ObservabilityOperation
|
|
7
|
-
} from "./chunk-EHHO2HH2.mjs";
|
|
8
|
-
import {
|
|
9
|
-
meta
|
|
10
|
-
} from "./chunk-2WPL7OWM.mjs";
|
|
11
|
-
|
|
12
|
-
// src/containers/HelpContainer/HelpContainer.tsx
|
|
13
|
-
import * as Effect from "effect/Effect";
|
|
14
|
-
import React, { useCallback, useState } from "react";
|
|
15
|
-
import { useCapability, useOperationInvoker } from "@dxos/app-framework/ui";
|
|
16
|
-
import { LayoutOperation } from "@dxos/app-toolkit";
|
|
17
|
-
import { runAndForwardErrors } from "@dxos/effect";
|
|
18
|
-
import { useAsyncEffect } from "@dxos/react-hooks";
|
|
19
|
-
import { osTranslations } from "@dxos/ui-theme";
|
|
20
|
-
var HelpContainer = () => {
|
|
21
|
-
const { invokePromise } = useOperationInvoker();
|
|
22
|
-
const observability = useCapability(ObservabilityCapabilities.Observability);
|
|
23
|
-
const [feedbackAvailable, setFeedbackAvailable] = useState(false);
|
|
24
|
-
useAsyncEffect(async (controller) => {
|
|
25
|
-
const available = await observability.isAvailable("feedback").pipe(Effect.catchAll(() => Effect.succeed(false)), Effect.catchAllDefect(() => Effect.succeed(false)), runAndForwardErrors);
|
|
26
|
-
if (!controller.signal.aborted) {
|
|
27
|
-
setFeedbackAvailable(available);
|
|
28
|
-
}
|
|
29
|
-
}, [
|
|
30
|
-
observability
|
|
31
|
-
]);
|
|
32
|
-
const handleSave = useCallback(async (values) => {
|
|
33
|
-
await invokePromise(ObservabilityOperation.CaptureUserFeedback, values);
|
|
34
|
-
await invokePromise(LayoutOperation.UpdateComplementary, {
|
|
35
|
-
state: "collapsed"
|
|
36
|
-
});
|
|
37
|
-
await invokePromise(LayoutOperation.AddToast, {
|
|
38
|
-
id: `${meta.id}.feedback-success`,
|
|
39
|
-
icon: "ph--paper-plane-tilt--regular",
|
|
40
|
-
duration: 3e3,
|
|
41
|
-
title: [
|
|
42
|
-
"feedback toast label",
|
|
43
|
-
{
|
|
44
|
-
ns: meta.id
|
|
45
|
-
}
|
|
46
|
-
],
|
|
47
|
-
description: [
|
|
48
|
-
"feedback toast description",
|
|
49
|
-
{
|
|
50
|
-
ns: meta.id
|
|
51
|
-
}
|
|
52
|
-
],
|
|
53
|
-
closeLabel: [
|
|
54
|
-
"close label",
|
|
55
|
-
{
|
|
56
|
-
ns: osTranslations
|
|
57
|
-
}
|
|
58
|
-
]
|
|
59
|
-
});
|
|
60
|
-
}, [
|
|
61
|
-
invokePromise
|
|
62
|
-
]);
|
|
63
|
-
return /* @__PURE__ */ React.createElement(FeedbackForm, {
|
|
64
|
-
onSave: handleSave,
|
|
65
|
-
disabled: !feedbackAvailable
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
// src/containers/HelpContainer/index.ts
|
|
70
|
-
var HelpContainer_default = HelpContainer;
|
|
71
|
-
export {
|
|
72
|
-
HelpContainer_default as default
|
|
73
|
-
};
|
|
74
|
-
//# sourceMappingURL=HelpContainer-KTMKZBHY.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/containers/HelpContainer/HelpContainer.tsx", "../../../src/containers/HelpContainer/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React, { useCallback, useState } from 'react';\n\nimport { useCapability, useOperationInvoker } from '@dxos/app-framework/ui';\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { runAndForwardErrors } from '@dxos/effect';\nimport { useAsyncEffect } from '@dxos/react-hooks';\nimport { osTranslations } from '@dxos/ui-theme';\n\nimport { FeedbackForm } from '../../components';\nimport { meta } from '../../meta';\nimport { ObservabilityCapabilities, ObservabilityOperation, type UserFeedback } from '../../types';\n\n/** Renders the feedback form, disabling it when the feedback survey is unavailable. */\nexport const HelpContainer = () => {\n const { invokePromise } = useOperationInvoker();\n const observability = useCapability(ObservabilityCapabilities.Observability);\n const [feedbackAvailable, setFeedbackAvailable] = useState(false);\n\n useAsyncEffect(\n async (controller) => {\n const available = await observability.isAvailable('feedback').pipe(\n Effect.catchAll(() => Effect.succeed(false)),\n Effect.catchAllDefect(() => Effect.succeed(false)),\n runAndForwardErrors,\n );\n if (!controller.signal.aborted) {\n setFeedbackAvailable(available);\n }\n },\n [observability],\n );\n\n const handleSave = useCallback(\n async (values: UserFeedback) => {\n await invokePromise(ObservabilityOperation.CaptureUserFeedback, values);\n await invokePromise(LayoutOperation.UpdateComplementary, { state: 'collapsed' });\n await invokePromise(LayoutOperation.AddToast, {\n id: `${meta.id}.feedback-success`,\n icon: 'ph--paper-plane-tilt--regular',\n duration: 3000,\n title: ['feedback toast label', { ns: meta.id }],\n description: ['feedback toast description', { ns: meta.id }],\n closeLabel: ['close label', { ns: osTranslations }],\n });\n },\n [invokePromise],\n );\n\n return <FeedbackForm onSave={handleSave} disabled={!feedbackAvailable} />;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { HelpContainer } from './HelpContainer';\n\nexport default HelpContainer;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;AAIA,YAAYA,YAAY;AACxB,OAAOC,SAASC,aAAaC,gBAAgB;AAE7C,SAASC,eAAeC,2BAA2B;AACnD,SAASC,uBAAuB;AAChC,SAASC,2BAA2B;AACpC,SAASC,sBAAsB;AAC/B,SAASC,sBAAsB;AAOxB,IAAMC,gBAAgB,MAAA;AAC3B,QAAM,EAAEC,cAAa,IAAKC,oBAAAA;AAC1B,QAAMC,gBAAgBC,cAAcC,0BAA0BC,aAAa;AAC3E,QAAM,CAACC,mBAAmBC,oBAAAA,IAAwBC,SAAS,KAAA;AAE3DC,iBACE,OAAOC,eAAAA;AACL,UAAMC,YAAY,MAAMT,cAAcU,YAAY,UAAA,EAAYC,KACrDC,gBAAS,MAAaC,eAAQ,KAAA,CAAA,GAC9BC,sBAAe,MAAaD,eAAQ,KAAA,CAAA,GAC3CE,mBAAAA;AAEF,QAAI,CAACP,WAAWQ,OAAOC,SAAS;AAC9BZ,2BAAqBI,SAAAA;IACvB;EACF,GACA;IAACT;GAAc;AAGjB,QAAMkB,aAAaC,YACjB,OAAOC,WAAAA;AACL,UAAMtB,cAAcuB,uBAAuBC,qBAAqBF,MAAAA;AAChE,UAAMtB,cAAcyB,gBAAgBC,qBAAqB;MAAEC,OAAO;IAAY,CAAA;AAC9E,UAAM3B,cAAcyB,gBAAgBG,UAAU;MAC5CC,IAAI,GAAGC,KAAKD,EAAE;MACdE,MAAM;MACNC,UAAU;MACVC,OAAO;QAAC;QAAwB;UAAEC,IAAIJ,KAAKD;QAAG;;MAC9CM,aAAa;QAAC;QAA8B;UAAED,IAAIJ,KAAKD;QAAG;;MAC1DO,YAAY;QAAC;QAAe;UAAEF,IAAIG;QAAe;;IACnD,CAAA;EACF,GACA;IAACrC;GAAc;AAGjB,SAAO,sBAAA,cAACsC,cAAAA;IAAaC,QAAQnB;IAAYoB,UAAU,CAAClC;;AACtD;;;AChDA,IAAA,wBAAemC;",
|
|
6
|
-
"names": ["Effect", "React", "useCallback", "useState", "useCapability", "useOperationInvoker", "LayoutOperation", "runAndForwardErrors", "useAsyncEffect", "osTranslations", "HelpContainer", "invokePromise", "useOperationInvoker", "observability", "useCapability", "ObservabilityCapabilities", "Observability", "feedbackAvailable", "setFeedbackAvailable", "useState", "useAsyncEffect", "controller", "available", "isAvailable", "pipe", "catchAll", "succeed", "catchAllDefect", "runAndForwardErrors", "signal", "aborted", "handleSave", "useCallback", "values", "ObservabilityOperation", "CaptureUserFeedback", "LayoutOperation", "UpdateComplementary", "state", "AddToast", "id", "meta", "icon", "duration", "title", "ns", "description", "closeLabel", "osTranslations", "FeedbackForm", "onSave", "disabled", "HelpContainer"]
|
|
7
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ObservabilitySettings,
|
|
3
|
-
ObservabilitySettingsSchema
|
|
4
|
-
} from "./chunk-GUYC2TF5.mjs";
|
|
5
|
-
import "./chunk-EHHO2HH2.mjs";
|
|
6
|
-
import "./chunk-2WPL7OWM.mjs";
|
|
7
|
-
export {
|
|
8
|
-
ObservabilitySettings,
|
|
9
|
-
ObservabilitySettingsSchema,
|
|
10
|
-
ObservabilitySettings as default
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=ObservabilitySettings-ICX2QGCA.mjs.map
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
meta
|
|
3
|
-
} from "./chunk-2WPL7OWM.mjs";
|
|
4
|
-
|
|
5
|
-
// src/capabilities/app-graph-builder/app-graph-builder.ts
|
|
6
|
-
import * as Effect from "effect/Effect";
|
|
7
|
-
import { Capability } from "@dxos/app-framework";
|
|
8
|
-
import { AppCapabilities, COMPANION_PREFIX } from "@dxos/app-toolkit";
|
|
9
|
-
import { GraphBuilder, NodeMatcher } from "@dxos/plugin-graph";
|
|
10
|
-
var DECK_COMPANION_TYPE = "org.dxos.plugin.deck.deck-companion";
|
|
11
|
-
var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
12
|
-
const extensions = yield* Effect.all([
|
|
13
|
-
GraphBuilder.createExtension({
|
|
14
|
-
id: `${meta.id}.help`,
|
|
15
|
-
match: NodeMatcher.whenRoot,
|
|
16
|
-
connector: (node) => Effect.succeed([
|
|
17
|
-
{
|
|
18
|
-
id: `${COMPANION_PREFIX}help`,
|
|
19
|
-
type: DECK_COMPANION_TYPE,
|
|
20
|
-
data: null,
|
|
21
|
-
properties: {
|
|
22
|
-
label: [
|
|
23
|
-
"help label",
|
|
24
|
-
{
|
|
25
|
-
ns: meta.id
|
|
26
|
-
}
|
|
27
|
-
],
|
|
28
|
-
icon: "ph--question--regular",
|
|
29
|
-
disposition: "hidden",
|
|
30
|
-
position: "hoist"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
])
|
|
34
|
-
})
|
|
35
|
-
]);
|
|
36
|
-
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
37
|
-
}));
|
|
38
|
-
export {
|
|
39
|
-
app_graph_builder_default as default
|
|
40
|
-
};
|
|
41
|
-
//# sourceMappingURL=app-graph-builder-367TIDLZ.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/app-graph-builder/app-graph-builder.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities, COMPANION_PREFIX } from '@dxos/app-toolkit';\nimport { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';\n\nimport { meta } from '../../meta';\n\nconst DECK_COMPANION_TYPE = 'org.dxos.plugin.deck.deck-companion';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const extensions = yield* Effect.all([\n GraphBuilder.createExtension({\n id: `${meta.id}.help`,\n match: NodeMatcher.whenRoot,\n connector: (node) =>\n Effect.succeed([\n {\n id: `${COMPANION_PREFIX}help`,\n type: DECK_COMPANION_TYPE,\n data: null,\n properties: {\n label: ['help label', { ns: meta.id }],\n icon: 'ph--question--regular',\n disposition: 'hidden',\n position: 'hoist',\n },\n },\n ]),\n }),\n ]);\n\n return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);\n }),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiBC,wBAAwB;AAClD,SAASC,cAAcC,mBAAmB;AAI1C,IAAMC,sBAAsB;AAE5B,IAAA,4BAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,QAAMC,aAAa,OAAcC,WAAI;IACnCC,aAAaC,gBAAgB;MAC3BC,IAAI,GAAGC,KAAKD,EAAE;MACdE,OAAOC,YAAYC;MACnBC,WAAW,CAACC,SACHC,eAAQ;QACb;UACEP,IAAI,GAAGQ,gBAAAA;UACPC,MAAMjB;UACNkB,MAAM;UACNC,YAAY;YACVC,OAAO;cAAC;cAAc;gBAAEC,IAAIZ,KAAKD;cAAG;;YACpCc,MAAM;YACNC,aAAa;YACbC,UAAU;UACZ;QACF;OACD;IACL,CAAA;GACD;AAED,SAAOvB,WAAWwB,YAAYC,gBAAgBC,iBAAiBvB,UAAAA;AACjE,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "Capability", "AppCapabilities", "COMPANION_PREFIX", "GraphBuilder", "NodeMatcher", "DECK_COMPANION_TYPE", "Capability", "makeModule", "fnUntraced", "extensions", "all", "GraphBuilder", "createExtension", "id", "meta", "match", "NodeMatcher", "whenRoot", "connector", "node", "succeed", "COMPANION_PREFIX", "type", "data", "properties", "label", "ns", "icon", "disposition", "position", "contributes", "AppCapabilities", "AppGraphBuilder"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\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": ";AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;AACR;",
|
|
6
|
-
"names": ["trim", "meta", "id", "name", "description", "trim", "icon"]
|
|
7
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// src/containers/index.ts
|
|
2
|
-
import { lazy } from "react";
|
|
3
|
-
var HelpContainer = lazy(() => import("./HelpContainer-KTMKZBHY.mjs"));
|
|
4
|
-
var ObservabilitySettings = lazy(() => import("./ObservabilitySettings-ICX2QGCA.mjs"));
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
HelpContainer,
|
|
8
|
-
ObservabilitySettings
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=chunk-D4FKSLUA.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/containers/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type ComponentType, lazy } from 'react';\n\nexport { ObservabilitySettingsSchema } from './ObservabilitySettings';\nexport type { ObservabilitySettingsProps, ObservabilitySettingsComponentProps } from './ObservabilitySettings';\n\nexport const HelpContainer: ComponentType<any> = lazy(() => import('./HelpContainer'));\nexport const ObservabilitySettings: ComponentType<any> = lazy(() => import('./ObservabilitySettings'));\n"],
|
|
5
|
-
"mappings": ";AAIA,SAA6BA,YAAY;AAKlC,IAAMC,gBAAoCC,KAAK,MAAM,OAAO,8BAAA,CAAA;AAC5D,IAAMC,wBAA4CD,KAAK,MAAM,OAAO,sCAAA,CAAA;",
|
|
6
|
-
"names": ["lazy", "HelpContainer", "lazy", "ObservabilitySettings"]
|
|
7
|
-
}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
meta
|
|
3
|
-
} from "./chunk-2WPL7OWM.mjs";
|
|
4
|
-
|
|
5
|
-
// src/types/capabilities.ts
|
|
6
|
-
import * as Schema from "effect/Schema";
|
|
7
|
-
import { Capability } from "@dxos/app-framework";
|
|
8
|
-
(function(ObservabilityCapabilities2) {
|
|
9
|
-
ObservabilityCapabilities2.Settings = Capability.make(`${meta.id}.capability.settings`);
|
|
10
|
-
ObservabilityCapabilities2.StateSchema = Schema.mutable(Schema.Struct({
|
|
11
|
-
group: Schema.optional(Schema.String),
|
|
12
|
-
notified: Schema.optional(Schema.Boolean)
|
|
13
|
-
}));
|
|
14
|
-
ObservabilityCapabilities2.State = Capability.make(`${meta.id}.capability.state`);
|
|
15
|
-
ObservabilityCapabilities2.Observability = Capability.make(`${meta.id}.capability.observability`);
|
|
16
|
-
})(ObservabilityCapabilities || (ObservabilityCapabilities = {}));
|
|
17
|
-
var ClientCapability = Capability.make("org.dxos.plugin.client.capability.client");
|
|
18
|
-
var ObservabilityCapabilities;
|
|
19
|
-
|
|
20
|
-
// src/types/events.ts
|
|
21
|
-
import { ActivationEvent } from "@dxos/app-framework";
|
|
22
|
-
import { AppActivationEvents } from "@dxos/app-toolkit";
|
|
23
|
-
(function(ObservabilityEvents2) {
|
|
24
|
-
ObservabilityEvents2.StateReady = AppActivationEvents.createStateEvent(meta.id);
|
|
25
|
-
})(ObservabilityEvents || (ObservabilityEvents = {}));
|
|
26
|
-
var ClientReadyEvent = ActivationEvent.make("org.dxos.plugin.client.event.client-ready");
|
|
27
|
-
var ObservabilityEvents;
|
|
28
|
-
|
|
29
|
-
// src/types/schema.ts
|
|
30
|
-
import * as Schema2 from "effect/Schema";
|
|
31
|
-
import { Capability as Capability2 } from "@dxos/app-framework";
|
|
32
|
-
import { Format } from "@dxos/echo";
|
|
33
|
-
import { Operation } from "@dxos/operation";
|
|
34
|
-
|
|
35
|
-
// src/translations.ts
|
|
36
|
-
var translations = [
|
|
37
|
-
{
|
|
38
|
-
"en-US": {
|
|
39
|
-
[meta.id]: {
|
|
40
|
-
"plugin name": "Telemetry",
|
|
41
|
-
"settings title": "Telemetry settings",
|
|
42
|
-
"observability toast label": "Privacy Notice",
|
|
43
|
-
"observability toast description": "Composer collects usage and performance metrics to improve the product. No user data is collected.",
|
|
44
|
-
"observability toast action label": "Settings",
|
|
45
|
-
"observability toast action alt": "Open settings to learn more or to disable.",
|
|
46
|
-
"observability toast close label": "Okay",
|
|
47
|
-
"observability enabled label": "Enable telemetry",
|
|
48
|
-
// TODO: Add link about telemetry privacy. Make it clearer that user data is not collected.
|
|
49
|
-
"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.",
|
|
50
|
-
"help label": "Feedback & Support",
|
|
51
|
-
"feedback textarea label": "Feedback",
|
|
52
|
-
"feedback textarea placeholder": "Please enter your feedback, technical issue, or feature request.",
|
|
53
|
-
"include debug logs label": "Include debug logs",
|
|
54
|
-
"send feedback label": "Send Feedback",
|
|
55
|
-
"feedback toast label": "Thank you for your feedback!",
|
|
56
|
-
"feedback toast description": "We will review your feedback and get back to you as soon as possible."
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
];
|
|
61
|
-
|
|
62
|
-
// src/types/schema.ts
|
|
63
|
-
var t = translations[0]["en-US"][meta.id];
|
|
64
|
-
var UserFeedback = Schema2.Struct({
|
|
65
|
-
message: Format.Text.pipe(Schema2.nonEmptyString(), Schema2.maxLength(4096), Schema2.annotations({
|
|
66
|
-
title: t["feedback textarea label"],
|
|
67
|
-
description: t["feedback textarea placeholder"]
|
|
68
|
-
})),
|
|
69
|
-
includeLogs: Schema2.Boolean.pipe(Schema2.annotations({
|
|
70
|
-
title: t["include debug logs label"]
|
|
71
|
-
}), Schema2.optional)
|
|
72
|
-
});
|
|
73
|
-
var OBSERVABILITY_OPERATION = `${meta.id}.operation`;
|
|
74
|
-
(function(ObservabilityOperation2) {
|
|
75
|
-
ObservabilityOperation2.Toggle = Operation.make({
|
|
76
|
-
meta: {
|
|
77
|
-
key: `${OBSERVABILITY_OPERATION}.toggle`,
|
|
78
|
-
name: "Toggle Observability",
|
|
79
|
-
description: "Toggle observability on or off."
|
|
80
|
-
},
|
|
81
|
-
services: [
|
|
82
|
-
Capability2.Service
|
|
83
|
-
],
|
|
84
|
-
schema: {
|
|
85
|
-
input: Schema2.Struct({
|
|
86
|
-
state: Schema2.optional(Schema2.Boolean)
|
|
87
|
-
}),
|
|
88
|
-
output: Schema2.Boolean
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
ObservabilityOperation2.CaptureUserFeedback = Operation.make({
|
|
92
|
-
meta: {
|
|
93
|
-
key: `${OBSERVABILITY_OPERATION}.capture-feedback`,
|
|
94
|
-
name: "Capture User Feedback",
|
|
95
|
-
description: "Capture user feedback."
|
|
96
|
-
},
|
|
97
|
-
services: [
|
|
98
|
-
Capability2.Service
|
|
99
|
-
],
|
|
100
|
-
schema: {
|
|
101
|
-
input: UserFeedback,
|
|
102
|
-
output: Schema2.Void
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
ObservabilityOperation2.SendEvent = Operation.make({
|
|
106
|
-
meta: {
|
|
107
|
-
key: `${OBSERVABILITY_OPERATION}.send-event`,
|
|
108
|
-
name: "Send Event",
|
|
109
|
-
description: "Send an observability event."
|
|
110
|
-
},
|
|
111
|
-
services: [
|
|
112
|
-
Capability2.Service
|
|
113
|
-
],
|
|
114
|
-
schema: {
|
|
115
|
-
input: Schema2.Struct({
|
|
116
|
-
name: Schema2.String.annotations({
|
|
117
|
-
description: "The name of the event."
|
|
118
|
-
}),
|
|
119
|
-
properties: Schema2.optional(Schema2.Any).annotations({
|
|
120
|
-
description: "Event properties."
|
|
121
|
-
})
|
|
122
|
-
}),
|
|
123
|
-
output: Schema2.Void
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
})(ObservabilityOperation || (ObservabilityOperation = {}));
|
|
127
|
-
var ObservabilityOperation;
|
|
128
|
-
|
|
129
|
-
export {
|
|
130
|
-
ClientCapability,
|
|
131
|
-
ObservabilityCapabilities,
|
|
132
|
-
ClientReadyEvent,
|
|
133
|
-
ObservabilityEvents,
|
|
134
|
-
translations,
|
|
135
|
-
UserFeedback,
|
|
136
|
-
ObservabilityOperation
|
|
137
|
-
};
|
|
138
|
-
//# sourceMappingURL=chunk-EHHO2HH2.mjs.map
|