@dxos/plugin-observability 0.8.4-main.74a063c4e0 → 0.8.4-main.765dc60934
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 +62 -0
- package/dist/lib/neutral/ObservabilityPlugin.mjs.map +7 -0
- package/dist/lib/{node-esm/cli/index.mjs → neutral/ObservabilityPlugin.node.mjs} +8 -7
- package/dist/lib/neutral/ObservabilityPlugin.node.mjs.map +7 -0
- package/dist/lib/{browser/ObservabilitySettings-EM7ABGCA.mjs → neutral/ObservabilitySettings-H6UKYDDT.mjs} +9 -13
- package/dist/lib/neutral/ObservabilitySettings-H6UKYDDT.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-PTVHNKQY.mjs +37 -0
- package/dist/lib/neutral/app-graph-builder-PTVHNKQY.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +19 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-ANCT53Y3.mjs +19 -0
- package/dist/lib/neutral/chunk-ANCT53Y3.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/neutral/client-ready-TM7VE6CH.mjs +116 -0
- 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/{browser/send-event-VV2I6QYY.mjs → neutral/send-event-AUVYZHS2.mjs} +7 -10
- package/dist/lib/neutral/send-event-AUVYZHS2.mjs.map +7 -0
- package/dist/lib/neutral/settings-MZYK2WQR.mjs +30 -0
- package/dist/lib/neutral/settings-MZYK2WQR.mjs.map +7 -0
- package/dist/lib/neutral/state-5COCK3KV.mjs +27 -0
- package/dist/lib/neutral/state-5COCK3KV.mjs.map +7 -0
- package/dist/lib/{browser/toggle-H2GX3A6G.mjs → neutral/toggle-6WX7G476.mjs} +8 -11
- package/dist/lib/neutral/toggle-6WX7G476.mjs.map +7 -0
- package/dist/lib/{browser/chunk-K33HLC3Z.mjs → neutral/translations.mjs} +4 -12
- 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/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/client-ready.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +2 -6
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +2 -5
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/components/ObservabilitySettings/ObservabilitySettings.d.ts +1 -1
- package/dist/types/src/components/ObservabilitySettings/ObservabilitySettings.d.ts.map +1 -1
- package/dist/types/src/components/ObservabilitySettings/ObservabilitySettings.stories.d.ts +9 -18
- package/dist/types/src/components/ObservabilitySettings/ObservabilitySettings.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -4
- 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 +1 -3
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/send-event.d.ts +3 -3
- package/dist/types/src/operations/send-event.d.ts.map +1 -1
- package/dist/types/src/operations/toggle.d.ts +3 -3
- package/dist/types/src/operations/toggle.d.ts.map +1 -1
- 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 +9 -19
- 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 +3 -2
- package/dist/types/src/types/Settings.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +3 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +75 -62
- package/src/{cli/plugin.ts → ObservabilityPlugin.node.ts} +5 -3
- package/src/ObservabilityPlugin.test.ts +25 -0
- package/src/ObservabilityPlugin.ts +20 -7
- package/src/capabilities/app-graph-builder.ts +1 -0
- package/src/capabilities/client-ready.ts +25 -4
- package/src/capabilities/index.ts +1 -1
- package/src/capabilities/operation-handler.ts +1 -1
- package/src/capabilities/react-surface.tsx +2 -9
- package/src/components/ObservabilitySettings/ObservabilitySettings.stories.tsx +2 -1
- package/src/components/ObservabilitySettings/ObservabilitySettings.tsx +8 -12
- package/src/components/index.ts +0 -2
- package/src/index.ts +1 -4
- package/src/meta.ts +1 -0
- package/src/operations/index.ts +1 -5
- package/src/operations/send-event.ts +3 -4
- package/src/operations/toggle.ts +3 -4
- package/src/plugin.ts +11 -0
- package/src/translations.ts +0 -9
- package/src/types/ObservabilityCapabilities.ts +42 -0
- package/src/types/{events.ts → ObservabilityEvents.ts} +3 -3
- package/src/types/ObservabilityOperation.ts +41 -0
- package/src/types/Settings.ts +5 -2
- package/src/types/index.ts +3 -2
- package/dist/lib/browser/ObservabilitySettings-EM7ABGCA.mjs.map +0 -7
- package/dist/lib/browser/capture-user-feedback-4HGXJGJL.mjs +0 -25
- package/dist/lib/browser/capture-user-feedback-4HGXJGJL.mjs.map +0 -7
- package/dist/lib/browser/chunk-J6DPYEFZ.mjs +0 -49
- package/dist/lib/browser/chunk-J6DPYEFZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-K33HLC3Z.mjs.map +0 -7
- package/dist/lib/browser/chunk-VZR3FNBD.mjs +0 -85
- package/dist/lib/browser/chunk-VZR3FNBD.mjs.map +0 -7
- package/dist/lib/browser/cli/index.mjs +0 -20
- package/dist/lib/browser/cli/index.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -110
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/operations/index.mjs +0 -16
- package/dist/lib/browser/operations/index.mjs.map +0 -7
- package/dist/lib/browser/send-event-VV2I6QYY.mjs.map +0 -7
- package/dist/lib/browser/toggle-H2GX3A6G.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -16
- package/dist/lib/node-esm/ObservabilitySettings-VP4A362Z.mjs +0 -32
- package/dist/lib/node-esm/ObservabilitySettings-VP4A362Z.mjs.map +0 -7
- package/dist/lib/node-esm/capture-user-feedback-SDQA2VYI.mjs +0 -26
- package/dist/lib/node-esm/capture-user-feedback-SDQA2VYI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FZRJBWSE.mjs +0 -86
- package/dist/lib/node-esm/chunk-FZRJBWSE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-JGHMP7UL.mjs +0 -35
- package/dist/lib/node-esm/chunk-JGHMP7UL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-K7WZOJZF.mjs +0 -50
- package/dist/lib/node-esm/chunk-K7WZOJZF.mjs.map +0 -7
- package/dist/lib/node-esm/cli/index.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -111
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/operations/index.mjs +0 -17
- package/dist/lib/node-esm/operations/index.mjs.map +0 -7
- package/dist/lib/node-esm/send-event-EMV3VHAA.mjs +0 -24
- package/dist/lib/node-esm/send-event-EMV3VHAA.mjs.map +0 -7
- package/dist/lib/node-esm/toggle-XRNGEYNP.mjs +0 -49
- package/dist/lib/node-esm/toggle-XRNGEYNP.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -17
- 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 -36
- 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 -2
- package/dist/types/src/containers/HelpContainer/index.d.ts.map +0 -1
- package/dist/types/src/containers/index.d.ts +0 -3
- package/dist/types/src/containers/index.d.ts.map +0 -1
- package/dist/types/src/operations/capture-user-feedback.d.ts +0 -5
- package/dist/types/src/operations/capture-user-feedback.d.ts.map +0 -1
- package/dist/types/src/operations/definitions.d.ts +0 -23
- package/dist/types/src/operations/definitions.d.ts.map +0 -1
- package/dist/types/src/types/capabilities.d.ts +0 -28
- 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/src/cli/index.ts +0 -5
- package/src/components/FeedbackForm/FeedbackForm.stories.tsx +0 -32
- package/src/components/FeedbackForm/FeedbackForm.tsx +0 -33
- package/src/components/FeedbackForm/index.ts +0 -5
- package/src/containers/HelpContainer/HelpContainer.tsx +0 -56
- package/src/containers/HelpContainer/index.ts +0 -5
- package/src/containers/index.ts +0 -7
- package/src/operations/capture-user-feedback.ts +0 -22
- package/src/operations/definitions.ts +0 -77
- package/src/types/capabilities.ts +0 -37
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
- /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/meta.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types → neutral/operations}/index.mjs.map +0 -0
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
ObservabilityCapabilities
|
|
4
|
-
} from "./chunk-K7WZOJZF.mjs";
|
|
5
|
-
import {
|
|
6
|
-
Toggle
|
|
7
|
-
} from "./chunk-FZRJBWSE.mjs";
|
|
8
|
-
import "./chunk-JGHMP7UL.mjs";
|
|
9
|
-
import "./chunk-HSLMI22Q.mjs";
|
|
10
|
-
|
|
11
|
-
// src/operations/toggle.ts
|
|
12
|
-
import * as Effect from "effect/Effect";
|
|
13
|
-
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
14
|
-
import { AppCapabilities } from "@dxos/app-toolkit";
|
|
15
|
-
import { Observability } from "@dxos/observability";
|
|
16
|
-
import { Operation } from "@dxos/operation";
|
|
17
|
-
import { meta } from "#meta";
|
|
18
|
-
var handler = Toggle.pipe(Operation.withHandler(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) => s.prefix === meta.id);
|
|
25
|
-
if (!settingsObj) {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
const settings = registry.get(settingsObj.atom);
|
|
29
|
-
const newEnabled = input.state ?? !settings.enabled;
|
|
30
|
-
registry.set(settingsObj.atom, {
|
|
31
|
-
...settings,
|
|
32
|
-
enabled: newEnabled
|
|
33
|
-
});
|
|
34
|
-
observability.events.captureEvent("observability.toggle", {
|
|
35
|
-
enabled: newEnabled
|
|
36
|
-
});
|
|
37
|
-
if (newEnabled) {
|
|
38
|
-
yield* observability.enable();
|
|
39
|
-
} else {
|
|
40
|
-
yield* observability.disable();
|
|
41
|
-
}
|
|
42
|
-
yield* Effect.promise(() => Observability.storeObservabilityDisabled(namespace, !newEnabled));
|
|
43
|
-
return newEnabled;
|
|
44
|
-
})));
|
|
45
|
-
var toggle_default = handler;
|
|
46
|
-
export {
|
|
47
|
-
toggle_default as default
|
|
48
|
-
};
|
|
49
|
-
//# sourceMappingURL=toggle-XRNGEYNP.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
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 { Observability } from '@dxos/observability';\nimport { Operation } from '@dxos/operation';\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,qBAAqB;AAC9B,SAASC,iBAAiB;AAE1B,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", "Observability", "Operation", "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
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
ClientCapability,
|
|
4
|
-
ClientReadyEvent,
|
|
5
|
-
ObservabilityCapabilities,
|
|
6
|
-
ObservabilityEvents,
|
|
7
|
-
Settings_exports
|
|
8
|
-
} from "../chunk-K7WZOJZF.mjs";
|
|
9
|
-
import "../chunk-HSLMI22Q.mjs";
|
|
10
|
-
export {
|
|
11
|
-
ClientCapability,
|
|
12
|
-
ClientReadyEvent,
|
|
13
|
-
ObservabilityCapabilities,
|
|
14
|
-
ObservabilityEvents,
|
|
15
|
-
Settings_exports as Settings
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/cli/plugin.ts"],"names":[],"mappings":"AAMA,OAAO,EAA4B,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAQvE,eAAO,MAAM,mBAAmB,4BAgB/B,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type FormRootProps, type FormSubmitProps } from '@dxos/react-ui-form';
|
|
3
|
-
import { UserFeedback } from '#operations';
|
|
4
|
-
export type FeedbackFormProps = Pick<FormRootProps<UserFeedback>, 'onSave'> & Pick<FormSubmitProps, 'disabled'>;
|
|
5
|
-
export declare const FeedbackForm: ({ onSave, disabled }: FeedbackFormProps) => React.JSX.Element;
|
|
6
|
-
//# sourceMappingURL=FeedbackForm.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FeedbackForm.d.ts","sourceRoot":"","sources":["../../../../../src/components/FeedbackForm/FeedbackForm.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAQ,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGrF,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,EAAE,QAAQ,CAAC,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AAOhH,eAAO,MAAM,YAAY,GAAI,sBAAsB,iBAAiB,sBAanE,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: ({ onSave, disabled }: import("./FeedbackForm").FeedbackFormProps) => import("react").JSX.Element;
|
|
5
|
-
decorators: import("@storybook/react").Decorator[];
|
|
6
|
-
parameters: {
|
|
7
|
-
layout: string;
|
|
8
|
-
translations: [{
|
|
9
|
-
readonly 'en-US': {
|
|
10
|
-
readonly [meta.id]: {
|
|
11
|
-
readonly 'plugin.name': "Telemetry";
|
|
12
|
-
readonly 'settings.title': "Telemetry settings";
|
|
13
|
-
readonly 'observability-toast.label': "Privacy Notice";
|
|
14
|
-
readonly 'observability-toast.description': "Composer collects usage and performance metrics to improve the product. No user data is collected.";
|
|
15
|
-
readonly 'observability-toast-action.label': "Settings";
|
|
16
|
-
readonly 'observability-toast-action.alt': "Open settings to learn more or to disable.";
|
|
17
|
-
readonly 'observability-toast-close.label': "Okay";
|
|
18
|
-
readonly 'observability-enabled.label': "Enable telemetry";
|
|
19
|
-
readonly 'observability-enabled.description': "Send anonymous usage and performance data to help improve the product.";
|
|
20
|
-
readonly '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.";
|
|
21
|
-
readonly 'help.label': "Feedback & Support";
|
|
22
|
-
readonly 'feedback-textarea.label': "Feedback";
|
|
23
|
-
readonly 'feedback-textarea.placeholder': "Please enter your feedback, technical issue, or feature request.";
|
|
24
|
-
readonly 'include-debug-logs.label': "Include debug logs";
|
|
25
|
-
readonly 'send-feedback.label': "Send Feedback";
|
|
26
|
-
readonly 'feedback-toast.label': "Thank you for your feedback!";
|
|
27
|
-
readonly 'feedback-toast.description': "We will review your feedback and get back to you as soon as possible.";
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
}];
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
export default meta;
|
|
34
|
-
type Story = StoryObj<typeof meta>;
|
|
35
|
-
export declare const Default: Story;
|
|
36
|
-
//# sourceMappingURL=FeedbackForm.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FeedbackForm.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/FeedbackForm/FeedbackForm.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAOjE,QAAA,MAAM,IAAI;;;;;;;;yBALmD,CAEzD,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;CAWyB,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/FeedbackForm/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HelpContainer.d.ts","sourceRoot":"","sources":["../../../../../src/containers/HelpContainer/HelpContainer.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAarD,uFAAuF;AACvF,eAAO,MAAM,aAAa,yBAoCzB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/containers/HelpContainer/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/containers/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,aAAa,EAAQ,MAAM,OAAO,CAAC;AAEjD,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,GAAG,CAAyC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"capture-user-feedback.d.ts","sourceRoot":"","sources":["../../../../src/operations/capture-user-feedback.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD,QAAA,MAAM,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC,OAAO,mBAAmB,CAO9D,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as Schema from 'effect/Schema';
|
|
2
|
-
import { Capability } from '@dxos/app-framework';
|
|
3
|
-
import { Operation } from '@dxos/operation';
|
|
4
|
-
export declare const UserFeedback: Schema.Struct<{
|
|
5
|
-
message: Schema.refine<string, Schema.filter<typeof Schema.String>>;
|
|
6
|
-
includeLogs: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
|
|
7
|
-
}>;
|
|
8
|
-
export type UserFeedback = Schema.Schema.Type<typeof UserFeedback>;
|
|
9
|
-
/**
|
|
10
|
-
* Operations for the Observability plugin.
|
|
11
|
-
*/
|
|
12
|
-
export declare const Toggle: Operation.Definition<{
|
|
13
|
-
readonly state?: boolean | undefined;
|
|
14
|
-
}, boolean, Capability.Service>;
|
|
15
|
-
export declare const CaptureUserFeedback: Operation.Definition<{
|
|
16
|
-
readonly message: string;
|
|
17
|
-
readonly includeLogs?: boolean | undefined;
|
|
18
|
-
}, void, Capability.Service>;
|
|
19
|
-
export declare const SendEvent: Operation.Definition<{
|
|
20
|
-
readonly name: string;
|
|
21
|
-
readonly properties?: any;
|
|
22
|
-
}, void, Capability.Service>;
|
|
23
|
-
//# sourceMappingURL=definitions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../../../src/operations/definitions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAQ5C,eAAO,MAAM,YAAY;;;EAevB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,YAAY,CAAC,CAAC;AAInE;;GAEG;AACH,eAAO,MAAM,MAAM;;+BAWjB,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;4BAS9B,CAAC;AAEH,eAAO,MAAM,SAAS;;;4BAYpB,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { type Atom } from '@effect-atom/atom-react';
|
|
2
|
-
import * as Schema from 'effect/Schema';
|
|
3
|
-
import { Capability } from '@dxos/app-framework';
|
|
4
|
-
import { type Client } from '@dxos/client';
|
|
5
|
-
import { type Observability } from '@dxos/observability';
|
|
6
|
-
export declare namespace ObservabilityCapabilities {
|
|
7
|
-
const Namespace: Capability.InterfaceDef<string>;
|
|
8
|
-
const Settings: Capability.InterfaceDef<Atom.Writable<{
|
|
9
|
-
enabled: boolean;
|
|
10
|
-
}, {
|
|
11
|
-
enabled: boolean;
|
|
12
|
-
}>>;
|
|
13
|
-
const StateSchema: Schema.mutable<Schema.Struct<{
|
|
14
|
-
group: Schema.optional<typeof Schema.String>;
|
|
15
|
-
notified: Schema.optional<typeof Schema.Boolean>;
|
|
16
|
-
}>>;
|
|
17
|
-
type State = Schema.Schema.Type<typeof StateSchema>;
|
|
18
|
-
const State: Capability.InterfaceDef<Atom.Writable<{
|
|
19
|
-
group?: string | undefined;
|
|
20
|
-
notified?: boolean | undefined;
|
|
21
|
-
}, {
|
|
22
|
-
group?: string | undefined;
|
|
23
|
-
notified?: boolean | undefined;
|
|
24
|
-
}>>;
|
|
25
|
-
const Observability: Capability.InterfaceDef<Observability.Observability>;
|
|
26
|
-
}
|
|
27
|
-
export declare const ClientCapability: Capability.InterfaceDef<Client>;
|
|
28
|
-
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/types/capabilities.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAMzD,yBAAiB,yBAAyB,CAAC;IAClC,MAAM,SAAS,iCAA6D,CAAC;IAE7E,MAAM,QAAQ;;;;OAAsF,CAAC;IAErG,MAAM,WAAW;;;OAKvB,CAAC;IAEF,KAAY,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,WAAW,CAAC,CAAC;IAEpD,MAAM,KAAK;;;;;;OAAuE,CAAC;IAEnF,MAAM,aAAa,sDAAsF,CAAC;CAClH;AAID,eAAO,MAAM,gBAAgB,iCAAsE,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ActivationEvent } from '@dxos/app-framework';
|
|
2
|
-
export declare namespace ObservabilityEvents {
|
|
3
|
-
const StateReady: ActivationEvent.ActivationEvent;
|
|
4
|
-
}
|
|
5
|
-
export declare const ClientReadyEvent: ActivationEvent.ActivationEvent;
|
|
6
|
-
//# sourceMappingURL=events.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../src/types/events.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAKtD,yBAAiB,mBAAmB,CAAC;IAC5B,MAAM,UAAU,EAAE,eAAe,CAAC,eAA+D,CAAC;CAC1G;AAGD,eAAO,MAAM,gBAAgB,iCAAoE,CAAC"}
|
package/src/cli/index.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
-
|
|
7
|
-
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
8
|
-
|
|
9
|
-
import { translations } from '../../translations';
|
|
10
|
-
import { FeedbackForm } from './FeedbackForm';
|
|
11
|
-
|
|
12
|
-
const meta = {
|
|
13
|
-
title: 'plugins/plugin-observability/components/FeedbackForm',
|
|
14
|
-
component: FeedbackForm,
|
|
15
|
-
decorators: [withTheme(), withLayout({ layout: 'column' })],
|
|
16
|
-
parameters: {
|
|
17
|
-
layout: 'fullscreen',
|
|
18
|
-
translations,
|
|
19
|
-
},
|
|
20
|
-
} satisfies Meta<typeof FeedbackForm>;
|
|
21
|
-
|
|
22
|
-
export default meta;
|
|
23
|
-
|
|
24
|
-
type Story = StoryObj<typeof meta>;
|
|
25
|
-
|
|
26
|
-
export const Default: Story = {
|
|
27
|
-
args: {
|
|
28
|
-
onSave: (values) => {
|
|
29
|
-
console.log(values);
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2024 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { useTranslation } from '@dxos/react-ui';
|
|
8
|
-
import { Form, type FormRootProps, type FormSubmitProps } from '@dxos/react-ui-form';
|
|
9
|
-
|
|
10
|
-
import { meta } from '#meta';
|
|
11
|
-
import { UserFeedback } from '#operations';
|
|
12
|
-
|
|
13
|
-
export type FeedbackFormProps = Pick<FormRootProps<UserFeedback>, 'onSave'> & Pick<FormSubmitProps, 'disabled'>;
|
|
14
|
-
|
|
15
|
-
const defaultValues: UserFeedback = {
|
|
16
|
-
message: '',
|
|
17
|
-
includeLogs: true,
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const FeedbackForm = ({ onSave, disabled }: FeedbackFormProps) => {
|
|
21
|
-
const { t } = useTranslation(meta.id);
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<Form.Root schema={UserFeedback} defaultValues={defaultValues} onSave={onSave}>
|
|
25
|
-
<Form.Viewport>
|
|
26
|
-
<Form.Content>
|
|
27
|
-
<Form.FieldSet />
|
|
28
|
-
<Form.Submit icon='ph--paper-plane-tilt--regular' label={t('send-feedback.label')} disabled={disabled} />
|
|
29
|
-
</Form.Content>
|
|
30
|
-
</Form.Viewport>
|
|
31
|
-
</Form.Root>
|
|
32
|
-
);
|
|
33
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
import React, { useCallback, useState } from 'react';
|
|
7
|
-
|
|
8
|
-
import { useCapability, useOperationInvoker } from '@dxos/app-framework/ui';
|
|
9
|
-
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
10
|
-
import { runAndForwardErrors } from '@dxos/effect';
|
|
11
|
-
import { useAsyncEffect } from '@dxos/react-hooks';
|
|
12
|
-
import { osTranslations } from '@dxos/ui-theme';
|
|
13
|
-
|
|
14
|
-
import { FeedbackForm } from '#components';
|
|
15
|
-
import { meta } from '#meta';
|
|
16
|
-
import { ObservabilityOperation, type UserFeedback } from '#operations';
|
|
17
|
-
import { ObservabilityCapabilities } from '#types';
|
|
18
|
-
|
|
19
|
-
/** Renders the feedback form, disabling it when the feedback survey is unavailable. */
|
|
20
|
-
export const HelpContainer = () => {
|
|
21
|
-
const { invokePromise } = useOperationInvoker();
|
|
22
|
-
const observability = useCapability(ObservabilityCapabilities.Observability);
|
|
23
|
-
const [feedbackAvailable, setFeedbackAvailable] = useState(false);
|
|
24
|
-
|
|
25
|
-
useAsyncEffect(
|
|
26
|
-
async (controller) => {
|
|
27
|
-
const available = await observability.isAvailable('feedback').pipe(
|
|
28
|
-
Effect.catchAll(() => Effect.succeed(false)),
|
|
29
|
-
Effect.catchAllDefect(() => Effect.succeed(false)),
|
|
30
|
-
runAndForwardErrors,
|
|
31
|
-
);
|
|
32
|
-
if (!controller.signal.aborted) {
|
|
33
|
-
setFeedbackAvailable(available);
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
[observability],
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
const handleSave = useCallback(
|
|
40
|
-
async (values: UserFeedback) => {
|
|
41
|
-
await invokePromise(ObservabilityOperation.CaptureUserFeedback, values);
|
|
42
|
-
await invokePromise(LayoutOperation.UpdateComplementary, { state: 'collapsed' });
|
|
43
|
-
await invokePromise(LayoutOperation.AddToast, {
|
|
44
|
-
id: `${meta.id}.feedback-success`,
|
|
45
|
-
icon: 'ph--paper-plane-tilt--regular',
|
|
46
|
-
duration: 3000,
|
|
47
|
-
title: ['feedback-toast.label', { ns: meta.id }],
|
|
48
|
-
description: ['feedback-toast.description', { ns: meta.id }],
|
|
49
|
-
closeLabel: ['close.label', { ns: osTranslations }],
|
|
50
|
-
});
|
|
51
|
-
},
|
|
52
|
-
[invokePromise],
|
|
53
|
-
);
|
|
54
|
-
|
|
55
|
-
return <FeedbackForm onSave={handleSave} disabled={!feedbackAvailable} />;
|
|
56
|
-
};
|
package/src/containers/index.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
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/operation';
|
|
9
|
-
|
|
10
|
-
import { ObservabilityCapabilities } from '../types';
|
|
11
|
-
import { CaptureUserFeedback } from './definitions';
|
|
12
|
-
|
|
13
|
-
const handler: Operation.WithHandler<typeof CaptureUserFeedback> = CaptureUserFeedback.pipe(
|
|
14
|
-
Operation.withHandler(
|
|
15
|
-
Effect.fnUntraced(function* (input) {
|
|
16
|
-
const observability = yield* Capability.get(ObservabilityCapabilities.Observability);
|
|
17
|
-
observability.feedback.captureUserFeedback({ message: input.message, includeLogs: input.includeLogs });
|
|
18
|
-
}),
|
|
19
|
-
),
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
export default handler;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Schema from 'effect/Schema';
|
|
6
|
-
|
|
7
|
-
import { Capability } from '@dxos/app-framework';
|
|
8
|
-
import { Format } from '@dxos/echo';
|
|
9
|
-
import { Operation } from '@dxos/operation';
|
|
10
|
-
|
|
11
|
-
import { meta } from '#meta';
|
|
12
|
-
|
|
13
|
-
import { translations } from '../translations';
|
|
14
|
-
|
|
15
|
-
const t = translations[0]['en-US'][meta.id];
|
|
16
|
-
|
|
17
|
-
export const UserFeedback = Schema.Struct({
|
|
18
|
-
message: Format.Text.pipe(
|
|
19
|
-
Schema.nonEmptyString(),
|
|
20
|
-
Schema.maxLength(4_096),
|
|
21
|
-
Schema.annotations({
|
|
22
|
-
title: t['feedback-textarea.label'],
|
|
23
|
-
description: t['feedback-textarea.placeholder'],
|
|
24
|
-
}),
|
|
25
|
-
),
|
|
26
|
-
includeLogs: Schema.Boolean.pipe(
|
|
27
|
-
Schema.annotations({
|
|
28
|
-
title: t['include-debug-logs.label'],
|
|
29
|
-
}),
|
|
30
|
-
Schema.optional,
|
|
31
|
-
),
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
export type UserFeedback = Schema.Schema.Type<typeof UserFeedback>;
|
|
35
|
-
|
|
36
|
-
const OBSERVABILITY_OPERATION = `${meta.id}.operation`;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Operations for the Observability plugin.
|
|
40
|
-
*/
|
|
41
|
-
export const Toggle = Operation.make({
|
|
42
|
-
meta: {
|
|
43
|
-
key: `${OBSERVABILITY_OPERATION}.toggle`,
|
|
44
|
-
name: 'Toggle Observability',
|
|
45
|
-
description: 'Toggle observability on or off.',
|
|
46
|
-
},
|
|
47
|
-
services: [Capability.Service],
|
|
48
|
-
input: Schema.Struct({
|
|
49
|
-
state: Schema.optional(Schema.Boolean),
|
|
50
|
-
}),
|
|
51
|
-
output: Schema.Boolean,
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
export const CaptureUserFeedback = Operation.make({
|
|
55
|
-
meta: {
|
|
56
|
-
key: `${OBSERVABILITY_OPERATION}.capture-feedback`,
|
|
57
|
-
name: 'Capture User Feedback',
|
|
58
|
-
description: 'Capture user feedback.',
|
|
59
|
-
},
|
|
60
|
-
services: [Capability.Service],
|
|
61
|
-
input: UserFeedback,
|
|
62
|
-
output: Schema.Void,
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
export const SendEvent = Operation.make({
|
|
66
|
-
meta: {
|
|
67
|
-
key: `${OBSERVABILITY_OPERATION}.send-event`,
|
|
68
|
-
name: 'Send Event',
|
|
69
|
-
description: 'Send an observability event.',
|
|
70
|
-
},
|
|
71
|
-
services: [Capability.Service],
|
|
72
|
-
input: Schema.Struct({
|
|
73
|
-
name: Schema.String.annotations({ description: 'The name of the event.' }),
|
|
74
|
-
properties: Schema.optional(Schema.Any).annotations({ description: 'Event properties.' }),
|
|
75
|
-
}),
|
|
76
|
-
output: Schema.Void,
|
|
77
|
-
});
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type Atom } from '@effect-atom/atom-react';
|
|
6
|
-
import * as Schema from 'effect/Schema';
|
|
7
|
-
|
|
8
|
-
import { Capability } from '@dxos/app-framework';
|
|
9
|
-
import { type Client } from '@dxos/client';
|
|
10
|
-
import { type Observability } from '@dxos/observability';
|
|
11
|
-
|
|
12
|
-
import { meta } from '#meta';
|
|
13
|
-
|
|
14
|
-
import * as Settings from './Settings';
|
|
15
|
-
|
|
16
|
-
export namespace ObservabilityCapabilities {
|
|
17
|
-
export const Namespace = Capability.make<string>(`${meta.id}.capability.namespace`);
|
|
18
|
-
|
|
19
|
-
export const Settings = Capability.make<Atom.Writable<Settings.Settings>>(`${meta.id}.capability.settings`);
|
|
20
|
-
|
|
21
|
-
export const StateSchema = Schema.mutable(
|
|
22
|
-
Schema.Struct({
|
|
23
|
-
group: Schema.optional(Schema.String),
|
|
24
|
-
notified: Schema.optional(Schema.Boolean),
|
|
25
|
-
}),
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
export type State = Schema.Schema.Type<typeof StateSchema>;
|
|
29
|
-
|
|
30
|
-
export const State = Capability.make<Atom.Writable<State>>(`${meta.id}.capability.state`);
|
|
31
|
-
|
|
32
|
-
export const Observability = Capability.make<Observability.Observability>(`${meta.id}.capability.observability`);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// NOTE: This is cloned from the client plugin to avoid circular dependencies.
|
|
36
|
-
// TODO(burdon): Figure out how to share defs.
|
|
37
|
-
export const ClientCapability = Capability.make<Client>('org.dxos.plugin.client.capability.client');
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|