@dxos/plugin-observability 0.8.4-main.70d3990 → 0.8.4-main.7996785055
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/dist/lib/browser/HelpContainer-2FYDP2J4.mjs +77 -0
- package/dist/lib/browser/HelpContainer-2FYDP2J4.mjs.map +7 -0
- package/dist/lib/browser/ObservabilitySettings-PV4ZSSDZ.mjs +13 -0
- package/dist/lib/browser/ObservabilitySettings-PV4ZSSDZ.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-FJ7NEONF.mjs +41 -0
- package/dist/lib/browser/app-graph-builder-FJ7NEONF.mjs.map +7 -0
- package/dist/lib/browser/capture-user-feedback-52OBVQXF.mjs +24 -0
- package/dist/lib/browser/capture-user-feedback-52OBVQXF.mjs.map +7 -0
- package/dist/lib/browser/chunk-5VA3PEPS.mjs +36 -0
- package/dist/lib/browser/chunk-5VA3PEPS.mjs.map +7 -0
- package/dist/lib/browser/chunk-AQBCTSG2.mjs +110 -0
- package/dist/lib/browser/chunk-AQBCTSG2.mjs.map +7 -0
- package/dist/lib/browser/{chunk-W7QWKVS3.mjs → chunk-EZN4UVBW.mjs} +9 -2
- package/dist/lib/browser/chunk-EZN4UVBW.mjs.map +7 -0
- package/dist/lib/browser/chunk-II2Z4NW6.mjs +32 -0
- package/dist/lib/browser/chunk-II2Z4NW6.mjs.map +7 -0
- package/dist/lib/browser/chunk-JCEPLSD4.mjs +41 -0
- package/dist/lib/browser/chunk-JCEPLSD4.mjs.map +7 -0
- package/dist/lib/browser/chunk-MYIEIHOB.mjs +8 -0
- package/dist/lib/browser/chunk-MYIEIHOB.mjs.map +7 -0
- package/dist/lib/browser/chunk-P62HDKTZ.mjs +10 -0
- package/dist/lib/browser/chunk-P62HDKTZ.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +24 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/client-ready-D7S65A4A.mjs +105 -0
- package/dist/lib/browser/client-ready-D7S65A4A.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +79 -110
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-handler-BJPXGGUU.mjs +16 -0
- package/dist/lib/browser/operation-handler-BJPXGGUU.mjs.map +7 -0
- package/dist/lib/browser/operations/index.mjs +14 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/react-surface-H2H42AZN.mjs +40 -0
- package/dist/lib/browser/react-surface-H2H42AZN.mjs.map +7 -0
- package/dist/lib/browser/send-event-VG4G6GLD.mjs +22 -0
- package/dist/lib/browser/send-event-VG4G6GLD.mjs.map +7 -0
- package/dist/lib/browser/settings-O35S3EAY.mjs +39 -0
- package/dist/lib/browser/settings-O35S3EAY.mjs.map +7 -0
- package/dist/lib/browser/state-FH4APQ7D.mjs +30 -0
- package/dist/lib/browser/state-FH4APQ7D.mjs.map +7 -0
- package/dist/lib/browser/toggle-UYNRZ7AN.mjs +48 -0
- package/dist/lib/browser/toggle-UYNRZ7AN.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +10 -6
- package/dist/lib/node-esm/HelpContainer-ZBAPKRWN.mjs +78 -0
- package/dist/lib/node-esm/HelpContainer-ZBAPKRWN.mjs.map +7 -0
- package/dist/lib/node-esm/ObservabilitySettings-XXE55SI6.mjs +14 -0
- package/dist/lib/node-esm/ObservabilitySettings-XXE55SI6.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-6SRZ27F3.mjs +42 -0
- package/dist/lib/node-esm/app-graph-builder-6SRZ27F3.mjs.map +7 -0
- package/dist/lib/node-esm/capture-user-feedback-KJZBMLCS.mjs +25 -0
- package/dist/lib/node-esm/capture-user-feedback-KJZBMLCS.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-2FZEWT55.mjs +37 -0
- package/dist/lib/node-esm/chunk-2FZEWT55.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-EV4RJG4X.mjs +10 -0
- package/dist/lib/node-esm/chunk-EV4RJG4X.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-J3N65J6S.mjs +12 -0
- package/dist/lib/node-esm/chunk-J3N65J6S.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-NBZXESR2.mjs +33 -0
- package/dist/lib/node-esm/chunk-NBZXESR2.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-AVJTLRX5.mjs → chunk-NRPR7RO6.mjs} +8 -2
- package/dist/lib/node-esm/chunk-NRPR7RO6.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-O2FWX3U6.mjs +42 -0
- package/dist/lib/node-esm/chunk-O2FWX3U6.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-PFYZRYI5.mjs +111 -0
- package/dist/lib/node-esm/chunk-PFYZRYI5.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +25 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/client-ready-2IDY2LT7.mjs +106 -0
- package/dist/lib/node-esm/client-ready-2IDY2LT7.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +79 -110
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-handler-UAYZDYTH.mjs +17 -0
- package/dist/lib/node-esm/operation-handler-UAYZDYTH.mjs.map +7 -0
- package/dist/lib/node-esm/operations/index.mjs +15 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-5SDD7GHG.mjs +41 -0
- package/dist/lib/node-esm/react-surface-5SDD7GHG.mjs.map +7 -0
- package/dist/lib/node-esm/send-event-2EOZICTS.mjs +23 -0
- package/dist/lib/node-esm/send-event-2EOZICTS.mjs.map +7 -0
- package/dist/lib/node-esm/settings-RTRZZI74.mjs +40 -0
- package/dist/lib/node-esm/settings-RTRZZI74.mjs.map +7 -0
- package/dist/lib/node-esm/state-GTAZ3K25.mjs +31 -0
- package/dist/lib/node-esm/state-GTAZ3K25.mjs.map +7 -0
- package/dist/lib/node-esm/toggle-YUPWPW6E.mjs +49 -0
- package/dist/lib/node-esm/toggle-YUPWPW6E.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +10 -6
- package/dist/types/src/ObservabilityPlugin.d.ts +3 -2
- package/dist/types/src/ObservabilityPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/client-ready/client-ready.d.ts +10 -0
- package/dist/types/src/capabilities/client-ready/client-ready.d.ts.map +1 -0
- package/dist/types/src/capabilities/client-ready/index.d.ts +4 -0
- package/dist/types/src/capabilities/client-ready/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +6 -16
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler/index.d.ts +4 -0
- package/dist/types/src/capabilities/operation-handler/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/index.d.ts +7 -0
- package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/settings.d.ts +10 -0
- package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/index.d.ts +11 -0
- package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/state.d.ts +13 -0
- package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
- package/dist/types/src/cli/index.d.ts +2 -0
- package/dist/types/src/cli/index.d.ts.map +1 -0
- package/dist/types/src/cli/plugin.d.ts +3 -0
- package/dist/types/src/cli/plugin.d.ts.map +1 -0
- package/dist/types/src/components/FeedbackForm/FeedbackForm.d.ts +6 -0
- package/dist/types/src/components/FeedbackForm/FeedbackForm.d.ts.map +1 -0
- package/dist/types/src/components/FeedbackForm/FeedbackForm.stories.d.ts +35 -0
- package/dist/types/src/components/FeedbackForm/FeedbackForm.stories.d.ts.map +1 -0
- package/dist/types/src/components/FeedbackForm/index.d.ts +2 -0
- package/dist/types/src/components/FeedbackForm/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +0 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/HelpContainer/HelpContainer.d.ts +4 -0
- package/dist/types/src/containers/HelpContainer/HelpContainer.d.ts.map +1 -0
- package/dist/types/src/containers/HelpContainer/index.d.ts +3 -0
- package/dist/types/src/containers/HelpContainer/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/ObservabilitySettings}/ObservabilitySettings.d.ts +4 -2
- package/dist/types/src/containers/ObservabilitySettings/ObservabilitySettings.d.ts.map +1 -0
- package/dist/types/src/containers/ObservabilitySettings/index.d.ts +3 -0
- package/dist/types/src/containers/ObservabilitySettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +6 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +2 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/capture-user-feedback.d.ts +5 -0
- package/dist/types/src/operations/capture-user-feedback.d.ts.map +1 -0
- package/dist/types/src/operations/definitions.d.ts +23 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +5 -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/translations.d.ts +3 -2
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +28 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +6 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +55 -34
- package/src/ObservabilityPlugin.ts +48 -46
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +40 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/client-ready/client-ready.ts +85 -0
- package/src/capabilities/client-ready/index.ts +9 -0
- package/src/capabilities/index.ts +6 -10
- package/src/capabilities/operation-handler/index.ts +11 -0
- package/src/capabilities/operation-handler/operation-handler.ts +16 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +35 -0
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +34 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +29 -0
- package/src/cli/index.ts +5 -0
- package/src/cli/plugin.ts +31 -0
- package/src/components/FeedbackForm/FeedbackForm.stories.tsx +33 -0
- package/src/components/FeedbackForm/FeedbackForm.tsx +33 -0
- package/src/components/FeedbackForm/index.ts +5 -0
- package/src/components/index.ts +0 -2
- package/src/containers/HelpContainer/HelpContainer.tsx +56 -0
- package/src/containers/HelpContainer/index.ts +7 -0
- package/src/containers/ObservabilitySettings/ObservabilitySettings.tsx +53 -0
- package/src/containers/ObservabilitySettings/index.ts +11 -0
- package/src/containers/index.ts +11 -0
- package/src/index.ts +2 -2
- package/src/meta.ts +3 -3
- package/src/operations/capture-user-feedback.ts +23 -0
- package/src/operations/definitions.ts +76 -0
- package/src/operations/index.ts +14 -0
- package/src/operations/send-event.ts +25 -0
- package/src/operations/toggle.ts +48 -0
- package/src/translations.ts +3 -3
- package/src/types/capabilities.ts +36 -0
- package/src/types/events.ts +15 -0
- package/src/types/index.ts +2 -1
- package/dist/lib/browser/app-graph-builder-3I6HZ5AR.mjs +0 -44
- package/dist/lib/browser/app-graph-builder-3I6HZ5AR.mjs.map +0 -7
- package/dist/lib/browser/chunk-EC7HTFA5.mjs +0 -18
- package/dist/lib/browser/chunk-EC7HTFA5.mjs.map +0 -7
- package/dist/lib/browser/chunk-I32JO7N6.mjs +0 -191
- package/dist/lib/browser/chunk-I32JO7N6.mjs.map +0 -7
- package/dist/lib/browser/chunk-W7QWKVS3.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZPNE2QLZ.mjs +0 -181
- package/dist/lib/browser/chunk-ZPNE2QLZ.mjs.map +0 -7
- package/dist/lib/browser/client-ready-SGUJYKFO.mjs +0 -102
- package/dist/lib/browser/client-ready-SGUJYKFO.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-7AS3LQUD.mjs +0 -77
- package/dist/lib/browser/intent-resolver-7AS3LQUD.mjs.map +0 -7
- package/dist/lib/browser/react-surface-D7OCQATN.mjs +0 -32
- package/dist/lib/browser/react-surface-D7OCQATN.mjs.map +0 -7
- package/dist/lib/browser/settings-ILBB3GCR.mjs +0 -25
- package/dist/lib/browser/settings-ILBB3GCR.mjs.map +0 -7
- package/dist/lib/browser/state-FJD6K3ZZ.mjs +0 -26
- package/dist/lib/browser/state-FJD6K3ZZ.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-KH2GA6G7.mjs +0 -45
- package/dist/lib/node-esm/app-graph-builder-KH2GA6G7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AVJTLRX5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HACSZKXD.mjs +0 -19
- package/dist/lib/node-esm/chunk-HACSZKXD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HDEVP6Z4.mjs +0 -182
- package/dist/lib/node-esm/chunk-HDEVP6Z4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JA6DTCPS.mjs +0 -192
- package/dist/lib/node-esm/chunk-JA6DTCPS.mjs.map +0 -7
- package/dist/lib/node-esm/client-ready-AQWXCEF7.mjs +0 -103
- package/dist/lib/node-esm/client-ready-AQWXCEF7.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-JI4234E7.mjs +0 -78
- package/dist/lib/node-esm/intent-resolver-JI4234E7.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-KRRSSVTP.mjs +0 -33
- package/dist/lib/node-esm/react-surface-KRRSSVTP.mjs.map +0 -7
- package/dist/lib/node-esm/settings-LRA7DFLS.mjs +0 -26
- package/dist/lib/node-esm/settings-LRA7DFLS.mjs.map +0 -7
- package/dist/lib/node-esm/state-XNBMNLB7.mjs +0 -27
- package/dist/lib/node-esm/state-XNBMNLB7.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -12
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/client-ready.d.ts +0 -10
- package/dist/types/src/capabilities/client-ready.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -7
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings.d.ts +0 -4
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/state.d.ts +0 -6
- package/dist/types/src/capabilities/state.d.ts.map +0 -1
- package/dist/types/src/components/FeedbackForm.d.ts +0 -6
- package/dist/types/src/components/FeedbackForm.d.ts.map +0 -1
- package/dist/types/src/components/HelpContainer.d.ts +0 -3
- package/dist/types/src/components/HelpContainer.d.ts.map +0 -1
- package/dist/types/src/components/ObservabilitySettings.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -5
- package/dist/types/src/events.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -313
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -47
- package/src/capabilities/capabilities.ts +0 -23
- package/src/capabilities/client-ready.ts +0 -98
- package/src/capabilities/intent-resolver.ts +0 -69
- package/src/capabilities/react-surface.tsx +0 -27
- package/src/capabilities/settings.ts +0 -21
- package/src/capabilities/state.ts +0 -22
- package/src/components/FeedbackForm.tsx +0 -82
- package/src/components/HelpContainer.tsx +0 -42
- package/src/components/ObservabilitySettings.tsx +0 -49
- package/src/events.ts +0 -14
- package/src/types/schema.ts +0 -216
|
@@ -1,313 +0,0 @@
|
|
|
1
|
-
import * as Schema from 'effect/Schema';
|
|
2
|
-
import { Key } from '@dxos/echo';
|
|
3
|
-
export declare const UserFeedback: Schema.Struct<{
|
|
4
|
-
message: Schema.filter<Schema.filter<typeof Schema.String>>;
|
|
5
|
-
}>;
|
|
6
|
-
export type UserFeedback = Schema.Schema.Type<typeof UserFeedback>;
|
|
7
|
-
export declare namespace ObservabilityAction {
|
|
8
|
-
const Toggle_base: Schema.TaggedClass<Toggle, `${string}/action/toggle`, {
|
|
9
|
-
readonly _tag: Schema.tag<`${string}/action/toggle`>;
|
|
10
|
-
} & {
|
|
11
|
-
input: Schema.Struct<{
|
|
12
|
-
state: Schema.optional<typeof Schema.Boolean>;
|
|
13
|
-
}>;
|
|
14
|
-
output: typeof Schema.Boolean;
|
|
15
|
-
}>;
|
|
16
|
-
export class Toggle extends Toggle_base {
|
|
17
|
-
}
|
|
18
|
-
const CaptureUserFeedback_base: Schema.TaggedClass<CaptureUserFeedback, `${string}/action/capture-feedback`, {
|
|
19
|
-
readonly _tag: Schema.tag<`${string}/action/capture-feedback`>;
|
|
20
|
-
} & {
|
|
21
|
-
input: Schema.Struct<{
|
|
22
|
-
message: Schema.filter<Schema.filter<typeof Schema.String>>;
|
|
23
|
-
}>;
|
|
24
|
-
output: typeof Schema.Void;
|
|
25
|
-
}>;
|
|
26
|
-
export class CaptureUserFeedback extends CaptureUserFeedback_base {
|
|
27
|
-
}
|
|
28
|
-
const BaseSendEvent_base: Schema.TaggedClass<BaseSendEvent, `${string}/action/send-event`, {
|
|
29
|
-
readonly _tag: Schema.tag<`${string}/action/send-event`>;
|
|
30
|
-
} & {
|
|
31
|
-
input: Schema.Struct<{
|
|
32
|
-
name: typeof Schema.String;
|
|
33
|
-
properties: Schema.optional<typeof Schema.Object>;
|
|
34
|
-
}>;
|
|
35
|
-
output: typeof Schema.Void;
|
|
36
|
-
}>;
|
|
37
|
-
/** Base intent for sending events. */
|
|
38
|
-
export class BaseSendEvent extends BaseSendEvent_base {
|
|
39
|
-
}
|
|
40
|
-
const SendEvent_base: Schema.TaggedClass<SendEvent, `${string}/action/send-event`, {
|
|
41
|
-
readonly _tag: Schema.tag<`${string}/action/send-event`>;
|
|
42
|
-
} & {
|
|
43
|
-
input: Schema.Union<[Schema.Struct<{
|
|
44
|
-
name: Schema.Literal<["identity.create"]>;
|
|
45
|
-
}>, Schema.Struct<{
|
|
46
|
-
name: Schema.Literal<["identity.join"]>;
|
|
47
|
-
}>, Schema.Struct<{
|
|
48
|
-
name: Schema.Literal<["identity.recover"]>;
|
|
49
|
-
}>, Schema.Struct<{
|
|
50
|
-
name: Schema.Literal<["identity.share"]>;
|
|
51
|
-
}>, Schema.Struct<{
|
|
52
|
-
name: Schema.Literal<["navigation.activate"]>;
|
|
53
|
-
properties: Schema.Struct<{
|
|
54
|
-
subjectId: typeof Schema.String;
|
|
55
|
-
typename: Schema.optional<typeof Schema.String>;
|
|
56
|
-
}>;
|
|
57
|
-
}>, Schema.Struct<{
|
|
58
|
-
name: Schema.Literal<["page.load"]>;
|
|
59
|
-
properties: Schema.Struct<{
|
|
60
|
-
loadDuration: typeof Schema.Number;
|
|
61
|
-
}>;
|
|
62
|
-
}>, Schema.Struct<{
|
|
63
|
-
name: Schema.Literal<["plugins.toggle"]>;
|
|
64
|
-
properties: Schema.Struct<{
|
|
65
|
-
plugin: typeof Schema.String;
|
|
66
|
-
enabled: typeof Schema.Boolean;
|
|
67
|
-
}>;
|
|
68
|
-
}>, Schema.Struct<{
|
|
69
|
-
name: Schema.Literal<["space.create"]>;
|
|
70
|
-
properties: Schema.Struct<{
|
|
71
|
-
spaceId: Schema.Schema<Key.SpaceId, string, never> & {
|
|
72
|
-
byteLength: number;
|
|
73
|
-
encode: (value: Uint8Array) => Key.SpaceId;
|
|
74
|
-
decode: (value: Key.SpaceId) => Uint8Array;
|
|
75
|
-
isValid: (value: unknown) => value is Key.SpaceId;
|
|
76
|
-
make: (value: string) => Key.SpaceId;
|
|
77
|
-
random: () => Key.SpaceId;
|
|
78
|
-
};
|
|
79
|
-
}>;
|
|
80
|
-
}>, Schema.Struct<{
|
|
81
|
-
name: Schema.Literal<["space.join"]>;
|
|
82
|
-
properties: Schema.Struct<{
|
|
83
|
-
spaceId: Schema.Schema<Key.SpaceId, string, never> & {
|
|
84
|
-
byteLength: number;
|
|
85
|
-
encode: (value: Uint8Array) => Key.SpaceId;
|
|
86
|
-
decode: (value: Key.SpaceId) => Uint8Array;
|
|
87
|
-
isValid: (value: unknown) => value is Key.SpaceId;
|
|
88
|
-
make: (value: string) => Key.SpaceId;
|
|
89
|
-
random: () => Key.SpaceId;
|
|
90
|
-
};
|
|
91
|
-
}>;
|
|
92
|
-
}>, Schema.Struct<{
|
|
93
|
-
name: Schema.Literal<["space.limit"]>;
|
|
94
|
-
properties: Schema.Struct<{
|
|
95
|
-
spaceId: Schema.Schema<Key.SpaceId, string, never> & {
|
|
96
|
-
byteLength: number;
|
|
97
|
-
encode: (value: Uint8Array) => Key.SpaceId;
|
|
98
|
-
decode: (value: Key.SpaceId) => Uint8Array;
|
|
99
|
-
isValid: (value: unknown) => value is Key.SpaceId;
|
|
100
|
-
make: (value: string) => Key.SpaceId;
|
|
101
|
-
random: () => Key.SpaceId;
|
|
102
|
-
};
|
|
103
|
-
}>;
|
|
104
|
-
}>, Schema.Struct<{
|
|
105
|
-
name: Schema.Literal<["space.lock"]>;
|
|
106
|
-
properties: Schema.Struct<{
|
|
107
|
-
spaceId: Schema.Schema<Key.SpaceId, string, never> & {
|
|
108
|
-
byteLength: number;
|
|
109
|
-
encode: (value: Uint8Array) => Key.SpaceId;
|
|
110
|
-
decode: (value: Key.SpaceId) => Uint8Array;
|
|
111
|
-
isValid: (value: unknown) => value is Key.SpaceId;
|
|
112
|
-
make: (value: string) => Key.SpaceId;
|
|
113
|
-
random: () => Key.SpaceId;
|
|
114
|
-
};
|
|
115
|
-
}>;
|
|
116
|
-
}>, Schema.Struct<{
|
|
117
|
-
name: Schema.Literal<["space.migrate"]>;
|
|
118
|
-
properties: Schema.Struct<{
|
|
119
|
-
spaceId: Schema.Schema<Key.SpaceId, string, never> & {
|
|
120
|
-
byteLength: number;
|
|
121
|
-
encode: (value: Uint8Array) => Key.SpaceId;
|
|
122
|
-
decode: (value: Key.SpaceId) => Uint8Array;
|
|
123
|
-
isValid: (value: unknown) => value is Key.SpaceId;
|
|
124
|
-
make: (value: string) => Key.SpaceId;
|
|
125
|
-
random: () => Key.SpaceId;
|
|
126
|
-
};
|
|
127
|
-
targetVersion: Schema.optional<typeof Schema.String>;
|
|
128
|
-
version: Schema.optional<typeof Schema.String>;
|
|
129
|
-
}>;
|
|
130
|
-
}>, Schema.Struct<{
|
|
131
|
-
name: Schema.Literal<["space.schema.use"]>;
|
|
132
|
-
properties: Schema.Struct<{
|
|
133
|
-
spaceId: Schema.Schema<Key.SpaceId, string, never> & {
|
|
134
|
-
byteLength: number;
|
|
135
|
-
encode: (value: Uint8Array) => Key.SpaceId;
|
|
136
|
-
decode: (value: Key.SpaceId) => Uint8Array;
|
|
137
|
-
isValid: (value: unknown) => value is Key.SpaceId;
|
|
138
|
-
make: (value: string) => Key.SpaceId;
|
|
139
|
-
random: () => Key.SpaceId;
|
|
140
|
-
};
|
|
141
|
-
typename: typeof Schema.String;
|
|
142
|
-
}>;
|
|
143
|
-
}>, Schema.Struct<{
|
|
144
|
-
name: Schema.Literal<["space.schema.add"]>;
|
|
145
|
-
properties: Schema.Struct<{
|
|
146
|
-
spaceId: Schema.Schema<Key.SpaceId, string, never> & {
|
|
147
|
-
byteLength: number;
|
|
148
|
-
encode: (value: Uint8Array) => Key.SpaceId;
|
|
149
|
-
decode: (value: Key.SpaceId) => Uint8Array;
|
|
150
|
-
isValid: (value: unknown) => value is Key.SpaceId;
|
|
151
|
-
make: (value: string) => Key.SpaceId;
|
|
152
|
-
random: () => Key.SpaceId;
|
|
153
|
-
};
|
|
154
|
-
objectId: typeof Schema.String;
|
|
155
|
-
typename: typeof Schema.String;
|
|
156
|
-
}>;
|
|
157
|
-
}>, Schema.Struct<{
|
|
158
|
-
name: Schema.Literal<["space.object.add"]>;
|
|
159
|
-
properties: Schema.Struct<{
|
|
160
|
-
spaceId: Schema.Schema<Key.SpaceId, string, never> & {
|
|
161
|
-
byteLength: number;
|
|
162
|
-
encode: (value: Uint8Array) => Key.SpaceId;
|
|
163
|
-
decode: (value: Key.SpaceId) => Uint8Array;
|
|
164
|
-
isValid: (value: unknown) => value is Key.SpaceId;
|
|
165
|
-
make: (value: string) => Key.SpaceId;
|
|
166
|
-
random: () => Key.SpaceId;
|
|
167
|
-
};
|
|
168
|
-
objectId: typeof Schema.String;
|
|
169
|
-
typename: Schema.optional<typeof Schema.String>;
|
|
170
|
-
}>;
|
|
171
|
-
}>, Schema.Struct<{
|
|
172
|
-
name: Schema.Literal<["space.share"]>;
|
|
173
|
-
properties: Schema.Struct<{
|
|
174
|
-
spaceId: Schema.Schema<Key.SpaceId, string, never> & {
|
|
175
|
-
byteLength: number;
|
|
176
|
-
encode: (value: Uint8Array) => Key.SpaceId;
|
|
177
|
-
decode: (value: Key.SpaceId) => Uint8Array;
|
|
178
|
-
isValid: (value: unknown) => value is Key.SpaceId;
|
|
179
|
-
make: (value: string) => Key.SpaceId;
|
|
180
|
-
random: () => Key.SpaceId;
|
|
181
|
-
};
|
|
182
|
-
}>;
|
|
183
|
-
}>, Schema.Struct<{
|
|
184
|
-
name: Schema.Literal<["space.unlock"]>;
|
|
185
|
-
properties: Schema.Struct<{
|
|
186
|
-
spaceId: Schema.Schema<Key.SpaceId, string, never> & {
|
|
187
|
-
byteLength: number;
|
|
188
|
-
encode: (value: Uint8Array) => Key.SpaceId;
|
|
189
|
-
decode: (value: Key.SpaceId) => Uint8Array;
|
|
190
|
-
isValid: (value: unknown) => value is Key.SpaceId;
|
|
191
|
-
make: (value: string) => Key.SpaceId;
|
|
192
|
-
random: () => Key.SpaceId;
|
|
193
|
-
};
|
|
194
|
-
}>;
|
|
195
|
-
}>, Schema.Struct<{
|
|
196
|
-
name: Schema.Literal<["threads.create"]>;
|
|
197
|
-
properties: Schema.Struct<{
|
|
198
|
-
spaceId: Schema.Schema<Key.SpaceId, string, never> & {
|
|
199
|
-
byteLength: number;
|
|
200
|
-
encode: (value: Uint8Array) => Key.SpaceId;
|
|
201
|
-
decode: (value: Key.SpaceId) => Uint8Array;
|
|
202
|
-
isValid: (value: unknown) => value is Key.SpaceId;
|
|
203
|
-
make: (value: string) => Key.SpaceId;
|
|
204
|
-
random: () => Key.SpaceId;
|
|
205
|
-
};
|
|
206
|
-
threadId: typeof Schema.String;
|
|
207
|
-
}>;
|
|
208
|
-
}>, Schema.Struct<{
|
|
209
|
-
name: Schema.Literal<["threads.delete"]>;
|
|
210
|
-
properties: Schema.Struct<{
|
|
211
|
-
spaceId: Schema.Schema<Key.SpaceId, string, never> & {
|
|
212
|
-
byteLength: number;
|
|
213
|
-
encode: (value: Uint8Array) => Key.SpaceId;
|
|
214
|
-
decode: (value: Key.SpaceId) => Uint8Array;
|
|
215
|
-
isValid: (value: unknown) => value is Key.SpaceId;
|
|
216
|
-
make: (value: string) => Key.SpaceId;
|
|
217
|
-
random: () => Key.SpaceId;
|
|
218
|
-
};
|
|
219
|
-
threadId: typeof Schema.String;
|
|
220
|
-
}>;
|
|
221
|
-
}>, Schema.Struct<{
|
|
222
|
-
name: Schema.Literal<["threads.message.add"]>;
|
|
223
|
-
properties: Schema.Struct<{
|
|
224
|
-
spaceId: Schema.Schema<Key.SpaceId, string, never> & {
|
|
225
|
-
byteLength: number;
|
|
226
|
-
encode: (value: Uint8Array) => Key.SpaceId;
|
|
227
|
-
decode: (value: Key.SpaceId) => Uint8Array;
|
|
228
|
-
isValid: (value: unknown) => value is Key.SpaceId;
|
|
229
|
-
make: (value: string) => Key.SpaceId;
|
|
230
|
-
random: () => Key.SpaceId;
|
|
231
|
-
};
|
|
232
|
-
threadId: typeof Schema.String;
|
|
233
|
-
threadLength: typeof Schema.Number;
|
|
234
|
-
messageId: typeof Schema.String;
|
|
235
|
-
messageLength: typeof Schema.Number;
|
|
236
|
-
}>;
|
|
237
|
-
}>, Schema.Struct<{
|
|
238
|
-
name: Schema.Literal<["threads.message.delete"]>;
|
|
239
|
-
properties: Schema.Struct<{
|
|
240
|
-
spaceId: Schema.Schema<Key.SpaceId, string, never> & {
|
|
241
|
-
byteLength: number;
|
|
242
|
-
encode: (value: Uint8Array) => Key.SpaceId;
|
|
243
|
-
decode: (value: Key.SpaceId) => Uint8Array;
|
|
244
|
-
isValid: (value: unknown) => value is Key.SpaceId;
|
|
245
|
-
make: (value: string) => Key.SpaceId;
|
|
246
|
-
random: () => Key.SpaceId;
|
|
247
|
-
};
|
|
248
|
-
threadId: typeof Schema.String;
|
|
249
|
-
messageId: typeof Schema.String;
|
|
250
|
-
}>;
|
|
251
|
-
}>, Schema.Struct<{
|
|
252
|
-
name: Schema.Literal<["threads.message.undo-delete"]>;
|
|
253
|
-
properties: Schema.Struct<{
|
|
254
|
-
spaceId: Schema.Schema<Key.SpaceId, string, never> & {
|
|
255
|
-
byteLength: number;
|
|
256
|
-
encode: (value: Uint8Array) => Key.SpaceId;
|
|
257
|
-
decode: (value: Key.SpaceId) => Uint8Array;
|
|
258
|
-
isValid: (value: unknown) => value is Key.SpaceId;
|
|
259
|
-
make: (value: string) => Key.SpaceId;
|
|
260
|
-
random: () => Key.SpaceId;
|
|
261
|
-
};
|
|
262
|
-
threadId: typeof Schema.String;
|
|
263
|
-
messageId: typeof Schema.String;
|
|
264
|
-
}>;
|
|
265
|
-
}>, Schema.Struct<{
|
|
266
|
-
name: Schema.Literal<["threads.message.update"]>;
|
|
267
|
-
properties: Schema.Struct<{
|
|
268
|
-
spaceId: Schema.Schema<Key.SpaceId, string, never> & {
|
|
269
|
-
byteLength: number;
|
|
270
|
-
encode: (value: Uint8Array) => Key.SpaceId;
|
|
271
|
-
decode: (value: Key.SpaceId) => Uint8Array;
|
|
272
|
-
isValid: (value: unknown) => value is Key.SpaceId;
|
|
273
|
-
make: (value: string) => Key.SpaceId;
|
|
274
|
-
random: () => Key.SpaceId;
|
|
275
|
-
};
|
|
276
|
-
messageId: typeof Schema.String;
|
|
277
|
-
messageLength: typeof Schema.Number;
|
|
278
|
-
}>;
|
|
279
|
-
}>, Schema.Struct<{
|
|
280
|
-
name: Schema.Literal<["threads.toggle-resolved"]>;
|
|
281
|
-
properties: Schema.Struct<{
|
|
282
|
-
spaceId: Schema.Schema<Key.SpaceId, string, never> & {
|
|
283
|
-
byteLength: number;
|
|
284
|
-
encode: (value: Uint8Array) => Key.SpaceId;
|
|
285
|
-
decode: (value: Key.SpaceId) => Uint8Array;
|
|
286
|
-
isValid: (value: unknown) => value is Key.SpaceId;
|
|
287
|
-
make: (value: string) => Key.SpaceId;
|
|
288
|
-
random: () => Key.SpaceId;
|
|
289
|
-
};
|
|
290
|
-
threadId: typeof Schema.String;
|
|
291
|
-
}>;
|
|
292
|
-
}>, Schema.Struct<{
|
|
293
|
-
name: Schema.Literal<["threads.undo-delete"]>;
|
|
294
|
-
properties: Schema.Struct<{
|
|
295
|
-
spaceId: Schema.Schema<Key.SpaceId, string, never> & {
|
|
296
|
-
byteLength: number;
|
|
297
|
-
encode: (value: Uint8Array) => Key.SpaceId;
|
|
298
|
-
decode: (value: Key.SpaceId) => Uint8Array;
|
|
299
|
-
isValid: (value: unknown) => value is Key.SpaceId;
|
|
300
|
-
make: (value: string) => Key.SpaceId;
|
|
301
|
-
random: () => Key.SpaceId;
|
|
302
|
-
};
|
|
303
|
-
threadId: typeof Schema.String;
|
|
304
|
-
}>;
|
|
305
|
-
}>]>;
|
|
306
|
-
output: typeof Schema.Void;
|
|
307
|
-
}>;
|
|
308
|
-
/** Intent with strict types for first-party events. */
|
|
309
|
-
export class SendEvent extends SendEvent_base {
|
|
310
|
-
}
|
|
311
|
-
export {};
|
|
312
|
-
}
|
|
313
|
-
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAUjC,eAAO,MAAM,YAAY;;EAEvB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,YAAY,CAAC,CAAC;AAEnE,yBAAiB,mBAAmB,CAAC;;;;;;;;;IACnC,MAAM,OAAO,MAAO,SAAQ,WAK1B;KAAG;;;;;;;;;IAEL,MAAM,OAAO,mBAAoB,SAAQ,wBAMxC;KAAG;;;;;;;;;;IAEJ,sCAAsC;IACtC,MAAM,OAAO,aAAc,SAAQ,kBAMjC;KAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEL,uDAAuD;IACvD,MAAM,OAAO,SAAU,SAAQ,cAsK7B;KAAG;;CACN"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Atom } from '@effect-atom/atom-react';
|
|
6
|
-
import * as Function from 'effect/Function';
|
|
7
|
-
import * as Option from 'effect/Option';
|
|
8
|
-
|
|
9
|
-
import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
|
|
10
|
-
import { ROOT_ID, createExtension } from '@dxos/plugin-graph';
|
|
11
|
-
|
|
12
|
-
import { meta } from '../meta';
|
|
13
|
-
|
|
14
|
-
// NOTE: Copied from @dxos/plugin-deck to break circular dependency.
|
|
15
|
-
const ATTENDABLE_PATH_SEPARATOR = '~';
|
|
16
|
-
|
|
17
|
-
const DECK_COMPANION_TYPE = 'dxos.org/plugin/deck/deck-companion';
|
|
18
|
-
|
|
19
|
-
export default (_context: PluginContext) =>
|
|
20
|
-
contributes(Capabilities.AppGraphBuilder, [
|
|
21
|
-
createExtension({
|
|
22
|
-
id: `${meta.id}/help`,
|
|
23
|
-
connector: (node) =>
|
|
24
|
-
Atom.make((get) =>
|
|
25
|
-
Function.pipe(
|
|
26
|
-
get(node),
|
|
27
|
-
Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),
|
|
28
|
-
Option.map((node) => {
|
|
29
|
-
return [
|
|
30
|
-
{
|
|
31
|
-
id: [node.id, 'help'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
32
|
-
type: DECK_COMPANION_TYPE,
|
|
33
|
-
data: null,
|
|
34
|
-
properties: {
|
|
35
|
-
label: ['help label', { ns: meta.id }],
|
|
36
|
-
icon: 'ph--question--regular',
|
|
37
|
-
disposition: 'hidden',
|
|
38
|
-
position: 'hoist',
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
];
|
|
42
|
-
}),
|
|
43
|
-
Option.getOrElse(() => []),
|
|
44
|
-
),
|
|
45
|
-
),
|
|
46
|
-
}),
|
|
47
|
-
]);
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { defineCapability } from '@dxos/app-framework';
|
|
6
|
-
import { type Client } from '@dxos/client';
|
|
7
|
-
import { type Observability } from '@dxos/observability';
|
|
8
|
-
|
|
9
|
-
import { meta } from '../meta';
|
|
10
|
-
|
|
11
|
-
export namespace ObservabilityCapabilities {
|
|
12
|
-
export type State = {
|
|
13
|
-
group?: string;
|
|
14
|
-
notified?: boolean;
|
|
15
|
-
};
|
|
16
|
-
export const State = defineCapability<State>(`${meta.id}/capability/state`);
|
|
17
|
-
|
|
18
|
-
export const Observability = defineCapability<Observability>(`${meta.id}/capability/observability`);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// NOTE: This is cloned from the client plugin to avoid circular dependencies.
|
|
22
|
-
// TODO(burdon): Figure out how to share defs.
|
|
23
|
-
export const ClientCapability = defineCapability<Client>('dxos.org/plugin/client/capability/client');
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
Capabilities,
|
|
7
|
-
LayoutAction,
|
|
8
|
-
type PluginContext,
|
|
9
|
-
SettingsAction,
|
|
10
|
-
contributes,
|
|
11
|
-
createIntent,
|
|
12
|
-
} from '@dxos/app-framework';
|
|
13
|
-
import { type Observability, setupTelemetryListeners } from '@dxos/observability';
|
|
14
|
-
|
|
15
|
-
import { meta } from '../meta';
|
|
16
|
-
import { ObservabilityAction } from '../types';
|
|
17
|
-
|
|
18
|
-
import { ClientCapability, ObservabilityCapabilities } from './capabilities';
|
|
19
|
-
|
|
20
|
-
type ClientReadyOptions = {
|
|
21
|
-
context: PluginContext;
|
|
22
|
-
namespace: string;
|
|
23
|
-
observability: Observability;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export default async ({ context, namespace, observability }: ClientReadyOptions) => {
|
|
27
|
-
const manager = context.getCapability(Capabilities.PluginManager);
|
|
28
|
-
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
29
|
-
const state = context.getCapability(ObservabilityCapabilities.State);
|
|
30
|
-
const client = context.getCapability(ClientCapability);
|
|
31
|
-
|
|
32
|
-
const sendPrivacyNotice = async () => {
|
|
33
|
-
const environment = client?.config?.values.runtime?.app?.env?.DX_ENVIRONMENT;
|
|
34
|
-
const notify =
|
|
35
|
-
environment && environment !== 'ci' && !environment.endsWith('.local') && !environment.endsWith('.lan');
|
|
36
|
-
if (!state.notified && notify) {
|
|
37
|
-
await dispatch(
|
|
38
|
-
createIntent(LayoutAction.AddToast, {
|
|
39
|
-
part: 'toast',
|
|
40
|
-
subject: {
|
|
41
|
-
id: `${meta.id}/notice`,
|
|
42
|
-
title: ['observability toast label', { ns: meta.id }],
|
|
43
|
-
description: ['observability toast description', { ns: meta.id }],
|
|
44
|
-
duration: Infinity,
|
|
45
|
-
icon: 'ph--info--regular',
|
|
46
|
-
actionLabel: ['observability toast action label', { ns: meta.id }],
|
|
47
|
-
actionAlt: ['observability toast action alt', { ns: meta.id }],
|
|
48
|
-
closeLabel: ['observability toast close label', { ns: meta.id }],
|
|
49
|
-
onAction: () => dispatch(createIntent(SettingsAction.Open, { plugin: meta.id })),
|
|
50
|
-
},
|
|
51
|
-
}),
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
state.notified = true;
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
// Ensure errors are tagged with enabled plugins to help with reproductions.
|
|
59
|
-
manager.enabled.map((plugin) => observability?.setTag(`pluginEnabled-${plugin}`, 'true', 'errors'));
|
|
60
|
-
|
|
61
|
-
await dispatch(
|
|
62
|
-
createIntent(ObservabilityAction.SendEvent, {
|
|
63
|
-
name: 'page.load',
|
|
64
|
-
properties: {
|
|
65
|
-
// TODO(wittjosiah): These apis are deprecated. Is there a better way to find this information?
|
|
66
|
-
loadDuration: window.performance.timing.loadEventEnd - window.performance.timing.loadEventStart,
|
|
67
|
-
},
|
|
68
|
-
}),
|
|
69
|
-
);
|
|
70
|
-
|
|
71
|
-
// Start client observability (i.e. not running as shared worker)
|
|
72
|
-
// TODO(nf): how to prevent multiple instances for single shared worker?
|
|
73
|
-
const cleanup = setupTelemetryListeners(namespace, client, observability);
|
|
74
|
-
|
|
75
|
-
await Promise.all([
|
|
76
|
-
observability.setIdentityTags(client.services.services),
|
|
77
|
-
observability.startRuntimeMetrics(client),
|
|
78
|
-
observability.startNetworkMetrics(client.services.services),
|
|
79
|
-
observability.startSpacesMetrics(client, namespace),
|
|
80
|
-
]);
|
|
81
|
-
|
|
82
|
-
if (client.halo.identity.get()) {
|
|
83
|
-
await sendPrivacyNotice();
|
|
84
|
-
} else {
|
|
85
|
-
const subscription = client.halo.identity.subscribe(async (identity) => {
|
|
86
|
-
if (identity && observability) {
|
|
87
|
-
await sendPrivacyNotice();
|
|
88
|
-
await observability.setIdentityTags(client.services.services);
|
|
89
|
-
subscription.unsubscribe();
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
return contributes(ObservabilityCapabilities.Observability, observability, async () => {
|
|
95
|
-
cleanup();
|
|
96
|
-
await observability.close();
|
|
97
|
-
});
|
|
98
|
-
};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Capabilities, IntentAction, type PluginContext, contributes, createResolver } from '@dxos/app-framework';
|
|
6
|
-
import { log } from '@dxos/log';
|
|
7
|
-
import { getTelemetryIdentity, storeObservabilityDisabled } from '@dxos/observability';
|
|
8
|
-
|
|
9
|
-
import { type ObservabilitySettingsProps } from '../components';
|
|
10
|
-
import { meta } from '../meta';
|
|
11
|
-
import { ObservabilityAction } from '../types';
|
|
12
|
-
|
|
13
|
-
import { ClientCapability, ObservabilityCapabilities } from './capabilities';
|
|
14
|
-
|
|
15
|
-
export default ({ context, namespace }: { context: PluginContext; namespace: string }) =>
|
|
16
|
-
contributes(Capabilities.IntentResolver, [
|
|
17
|
-
createResolver({
|
|
18
|
-
intent: IntentAction.Track,
|
|
19
|
-
resolve: (intent) => {
|
|
20
|
-
log.info('intent', { intent });
|
|
21
|
-
},
|
|
22
|
-
}),
|
|
23
|
-
createResolver({
|
|
24
|
-
intent: ObservabilityAction.Toggle,
|
|
25
|
-
resolve: async ({ state }) => {
|
|
26
|
-
const client = context.getCapability(ClientCapability);
|
|
27
|
-
const observability = context.getCapability(ObservabilityCapabilities.Observability);
|
|
28
|
-
const settings = context
|
|
29
|
-
.getCapability(Capabilities.SettingsStore)
|
|
30
|
-
.getStore<ObservabilitySettingsProps>(meta.id)!.value;
|
|
31
|
-
settings.enabled = state ?? !settings.enabled;
|
|
32
|
-
observability.track({
|
|
33
|
-
...getTelemetryIdentity(client),
|
|
34
|
-
action: 'observability.toggle',
|
|
35
|
-
properties: {
|
|
36
|
-
enabled: settings.enabled,
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
observability.setMode(settings.enabled ? 'basic' : 'disabled');
|
|
40
|
-
await storeObservabilityDisabled(namespace, !settings.enabled);
|
|
41
|
-
return { data: settings.enabled };
|
|
42
|
-
},
|
|
43
|
-
}),
|
|
44
|
-
createResolver({
|
|
45
|
-
intent: ObservabilityAction.SendEvent,
|
|
46
|
-
resolve: (data) => {
|
|
47
|
-
const client = context.getCapability(ClientCapability);
|
|
48
|
-
const properties = 'properties' in data ? data.properties : {};
|
|
49
|
-
|
|
50
|
-
// NOTE: This is to ensure that events fired before observability is ready are still sent.
|
|
51
|
-
// TODO(wittjosiah): If the intent dispatcher supports concurrent actions in the future,
|
|
52
|
-
// then this could be awaited still rather than voiding.
|
|
53
|
-
void context.waitForCapability(ObservabilityCapabilities.Observability).then((observability) => {
|
|
54
|
-
observability.track({
|
|
55
|
-
...getTelemetryIdentity(client),
|
|
56
|
-
action: data.name,
|
|
57
|
-
properties,
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
},
|
|
61
|
-
}),
|
|
62
|
-
createResolver({
|
|
63
|
-
intent: ObservabilityAction.CaptureUserFeedback,
|
|
64
|
-
resolve: async (data) => {
|
|
65
|
-
const observability = context.getCapability(ObservabilityCapabilities.Observability);
|
|
66
|
-
observability.captureUserFeedback(data.message);
|
|
67
|
-
},
|
|
68
|
-
}),
|
|
69
|
-
]);
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
|
|
8
|
-
import { SettingsStore } from '@dxos/local-storage';
|
|
9
|
-
|
|
10
|
-
import { HelpContainer, ObservabilitySettings, type ObservabilitySettingsProps } from '../components';
|
|
11
|
-
import { meta } from '../meta';
|
|
12
|
-
|
|
13
|
-
export default () =>
|
|
14
|
-
contributes(Capabilities.ReactSurface, [
|
|
15
|
-
createSurface({
|
|
16
|
-
id: meta.id,
|
|
17
|
-
role: 'article',
|
|
18
|
-
filter: (data): data is { subject: SettingsStore<ObservabilitySettingsProps> } =>
|
|
19
|
-
data.subject instanceof SettingsStore && data.subject.prefix === meta.id,
|
|
20
|
-
component: ({ data: { subject } }) => <ObservabilitySettings settings={subject.value} />,
|
|
21
|
-
}),
|
|
22
|
-
createSurface({
|
|
23
|
-
id: `${meta.id}/help`,
|
|
24
|
-
role: 'deck-companion--help',
|
|
25
|
-
component: () => <HelpContainer />,
|
|
26
|
-
}),
|
|
27
|
-
]);
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Capabilities, contributes } from '@dxos/app-framework';
|
|
6
|
-
import { live } from '@dxos/live-object';
|
|
7
|
-
|
|
8
|
-
import { type ObservabilitySettingsProps, ObservabilitySettingsSchema } from '../components';
|
|
9
|
-
import { meta } from '../meta';
|
|
10
|
-
|
|
11
|
-
export default () => {
|
|
12
|
-
const settings = live<ObservabilitySettingsProps>({
|
|
13
|
-
enabled: true,
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
return contributes(Capabilities.Settings, {
|
|
17
|
-
prefix: meta.id,
|
|
18
|
-
schema: ObservabilitySettingsSchema,
|
|
19
|
-
value: settings,
|
|
20
|
-
});
|
|
21
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { contributes } from '@dxos/app-framework';
|
|
6
|
-
import { LocalStorageStore } from '@dxos/local-storage';
|
|
7
|
-
import { getObservabilityGroup } from '@dxos/observability';
|
|
8
|
-
|
|
9
|
-
import { meta } from '../meta';
|
|
10
|
-
|
|
11
|
-
import { ObservabilityCapabilities } from './capabilities';
|
|
12
|
-
|
|
13
|
-
export default async ({ namespace }: { namespace: string }) => {
|
|
14
|
-
const state = new LocalStorageStore<ObservabilityCapabilities.State>(meta.id);
|
|
15
|
-
|
|
16
|
-
state.prop({ key: 'notified', type: LocalStorageStore.bool({ allowUndefined: true }) });
|
|
17
|
-
|
|
18
|
-
// NOTE: This is not stored in local storage such that it can be accessed by workers.
|
|
19
|
-
state.values.group = await getObservabilityGroup(namespace);
|
|
20
|
-
|
|
21
|
-
return contributes(ObservabilityCapabilities.State, state.values, () => state.close());
|
|
22
|
-
};
|