@dxos/plugin-observability 0.8.4-main.84f28bd → 0.8.4-main.937b3ca
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/app-graph-builder-6KDHLPUO.mjs +44 -0
- package/dist/lib/browser/app-graph-builder-6KDHLPUO.mjs.map +7 -0
- package/dist/lib/browser/chunk-3XZDP7JS.mjs +16 -0
- package/dist/lib/browser/chunk-3XZDP7JS.mjs.map +7 -0
- package/dist/lib/browser/chunk-PYNLPSSZ.mjs +133 -0
- package/dist/lib/browser/chunk-PYNLPSSZ.mjs.map +7 -0
- package/dist/lib/browser/chunk-SN7DIHQG.mjs +102 -0
- package/dist/lib/browser/chunk-SN7DIHQG.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +23 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/client-ready-YWKHC5S2.mjs +107 -0
- package/dist/lib/browser/client-ready-YWKHC5S2.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +72 -104
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-4ROZET3B.mjs +82 -0
- package/dist/lib/browser/operation-resolver-4ROZET3B.mjs.map +7 -0
- package/dist/lib/browser/react-surface-SJTESQAF.mjs +37 -0
- package/dist/lib/browser/react-surface-SJTESQAF.mjs.map +7 -0
- package/dist/lib/browser/settings-SQ4ICR7F.mjs +35 -0
- package/dist/lib/browser/settings-SQ4ICR7F.mjs.map +7 -0
- package/dist/lib/browser/state-IKCFXHYV.mjs +31 -0
- package/dist/lib/browser/state-IKCFXHYV.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +18 -0
- package/dist/lib/node-esm/app-graph-builder-4YHKY4SP.mjs +45 -0
- package/dist/lib/node-esm/app-graph-builder-4YHKY4SP.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-2ECMMPZY.mjs +18 -0
- package/dist/lib/node-esm/chunk-2ECMMPZY.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-4T4N2NJZ.mjs +134 -0
- package/dist/lib/node-esm/chunk-4T4N2NJZ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HNMV7ZZZ.mjs +103 -0
- package/dist/lib/node-esm/chunk-HNMV7ZZZ.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +24 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/client-ready-YLYG6F6H.mjs +108 -0
- package/dist/lib/node-esm/client-ready-YLYG6F6H.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +72 -104
- 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-resolver-UI7ZINXR.mjs +83 -0
- package/dist/lib/node-esm/operation-resolver-UI7ZINXR.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-D53VLGHY.mjs +38 -0
- package/dist/lib/node-esm/react-surface-D53VLGHY.mjs.map +7 -0
- package/dist/lib/node-esm/settings-WIRCHLWE.mjs +36 -0
- package/dist/lib/node-esm/settings-WIRCHLWE.mjs.map +7 -0
- package/dist/lib/node-esm/state-MQR4PNOT.mjs +32 -0
- package/dist/lib/node-esm/state-MQR4PNOT.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +19 -0
- package/dist/types/src/ObservabilityPlugin.d.ts +4 -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 +6 -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-resolver/index.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +7 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.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 +9 -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.d.ts +3 -3
- package/dist/types/src/components/FeedbackForm.d.ts.map +1 -1
- package/dist/types/src/components/FeedbackForm.stories.d.ts +34 -0
- package/dist/types/src/components/FeedbackForm.stories.d.ts.map +1 -0
- package/dist/types/src/components/HelpContainer.d.ts.map +1 -1
- package/dist/types/src/components/ObservabilitySettings.d.ts +5 -3
- package/dist/types/src/components/ObservabilitySettings.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- 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 +27 -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 +4 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/types/schema.d.ts +61 -0
- package/dist/types/src/types/schema.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +50 -39
- package/src/ObservabilityPlugin.ts +54 -51
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +42 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/client-ready/client-ready.ts +97 -0
- package/src/capabilities/client-ready/index.ts +7 -0
- package/src/capabilities/index.ts +6 -10
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +82 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +34 -0
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +33 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +30 -0
- package/src/cli/index.ts +5 -0
- package/src/cli/plugin.ts +27 -0
- package/src/components/FeedbackForm.stories.tsx +33 -0
- package/src/components/FeedbackForm.tsx +13 -69
- package/src/components/HelpContainer.tsx +20 -24
- package/src/components/ObservabilitySettings.tsx +28 -23
- package/src/index.ts +1 -2
- package/src/meta.ts +8 -5
- package/src/translations.ts +3 -2
- package/src/types/capabilities.ts +34 -0
- package/src/types/events.ts +14 -0
- package/src/types/index.ts +7 -0
- package/src/types/schema.ts +78 -0
- package/dist/lib/browser/app-graph-builder-DCOBBL5B.mjs +0 -43
- package/dist/lib/browser/app-graph-builder-DCOBBL5B.mjs.map +0 -7
- package/dist/lib/browser/chunk-57RVSKYP.mjs +0 -13
- package/dist/lib/browser/chunk-57RVSKYP.mjs.map +0 -7
- package/dist/lib/browser/chunk-D7WLH4F5.mjs +0 -179
- package/dist/lib/browser/chunk-D7WLH4F5.mjs.map +0 -7
- package/dist/lib/browser/chunk-N3VKS2LF.mjs +0 -175
- package/dist/lib/browser/chunk-N3VKS2LF.mjs.map +0 -7
- package/dist/lib/browser/chunk-UUOBAWT2.mjs +0 -18
- package/dist/lib/browser/chunk-UUOBAWT2.mjs.map +0 -7
- package/dist/lib/browser/client-ready-KK3EWEBV.mjs +0 -102
- package/dist/lib/browser/client-ready-KK3EWEBV.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-A4EV25OK.mjs +0 -77
- package/dist/lib/browser/intent-resolver-A4EV25OK.mjs.map +0 -7
- package/dist/lib/browser/react-surface-FUXMXVYO.mjs +0 -32
- package/dist/lib/browser/react-surface-FUXMXVYO.mjs.map +0 -7
- package/dist/lib/browser/settings-OSMKJOUM.mjs +0 -25
- package/dist/lib/browser/settings-OSMKJOUM.mjs.map +0 -7
- package/dist/lib/browser/state-VIOQS2IL.mjs +0 -26
- package/dist/lib/browser/state-VIOQS2IL.mjs.map +0 -7
- package/dist/lib/browser/types.mjs +0 -10
- package/dist/lib/node-esm/app-graph-builder-6JT2RPVM.mjs +0 -44
- package/dist/lib/node-esm/app-graph-builder-6JT2RPVM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4BFWCQJ5.mjs +0 -180
- package/dist/lib/node-esm/chunk-4BFWCQJ5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7XR7KMAA.mjs +0 -15
- package/dist/lib/node-esm/chunk-7XR7KMAA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JTKEM7PT.mjs +0 -19
- package/dist/lib/node-esm/chunk-JTKEM7PT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RG73SOOD.mjs +0 -176
- package/dist/lib/node-esm/chunk-RG73SOOD.mjs.map +0 -7
- package/dist/lib/node-esm/client-ready-EZVAX7D5.mjs +0 -103
- package/dist/lib/node-esm/client-ready-EZVAX7D5.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-7HLSOM7X.mjs +0 -78
- package/dist/lib/node-esm/intent-resolver-7HLSOM7X.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-TYVAHN2E.mjs +0 -33
- package/dist/lib/node-esm/react-surface-TYVAHN2E.mjs.map +0 -7
- package/dist/lib/node-esm/settings-S2OXVO3G.mjs +0 -26
- package/dist/lib/node-esm/settings-S2OXVO3G.mjs.map +0 -7
- package/dist/lib/node-esm/state-J2WS6L64.mjs +0 -27
- package/dist/lib/node-esm/state-J2WS6L64.mjs.map +0 -7
- package/dist/lib/node-esm/types.mjs +0 -11
- 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/events.d.ts +0 -5
- package/dist/types/src/events.d.ts.map +0 -1
- package/dist/types/src/types.d.ts +0 -286
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -45
- package/src/capabilities/capabilities.ts +0 -22
- package/src/capabilities/client-ready.ts +0 -97
- package/src/capabilities/intent-resolver.ts +0 -68
- package/src/capabilities/react-surface.tsx +0 -27
- package/src/capabilities/settings.ts +0 -21
- package/src/capabilities/state.ts +0 -21
- package/src/events.ts +0 -14
- package/src/types.ts +0 -203
- /package/dist/lib/browser/{types.mjs.map → types/index.mjs.map} +0 -0
- /package/dist/lib/node-esm/{types.mjs.map → types/index.mjs.map} +0 -0
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'effect';
|
|
2
|
-
import { Type } 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, "dxos.org/plugin/observability/action/toggle", {
|
|
9
|
-
readonly _tag: Schema.tag<"dxos.org/plugin/observability/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, "dxos.org/plugin/observability/action/capture-feedback", {
|
|
19
|
-
readonly _tag: Schema.tag<"dxos.org/plugin/observability/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, "dxos.org/plugin/observability/action/send-event", {
|
|
29
|
-
readonly _tag: Schema.tag<"dxos.org/plugin/observability/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, "dxos.org/plugin/observability/action/send-event", {
|
|
41
|
-
readonly _tag: Schema.tag<"dxos.org/plugin/observability/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<Type.SpaceId, string, never> & {
|
|
72
|
-
byteLength: number;
|
|
73
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
74
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
75
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
76
|
-
make: (value: string) => Type.SpaceId;
|
|
77
|
-
random: () => Type.SpaceId;
|
|
78
|
-
};
|
|
79
|
-
}>;
|
|
80
|
-
}>, Schema.Struct<{
|
|
81
|
-
name: Schema.Literal<["space.join"]>;
|
|
82
|
-
properties: Schema.Struct<{
|
|
83
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
84
|
-
byteLength: number;
|
|
85
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
86
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
87
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
88
|
-
make: (value: string) => Type.SpaceId;
|
|
89
|
-
random: () => Type.SpaceId;
|
|
90
|
-
};
|
|
91
|
-
}>;
|
|
92
|
-
}>, Schema.Struct<{
|
|
93
|
-
name: Schema.Literal<["space.limit"]>;
|
|
94
|
-
properties: Schema.Struct<{
|
|
95
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
96
|
-
byteLength: number;
|
|
97
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
98
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
99
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
100
|
-
make: (value: string) => Type.SpaceId;
|
|
101
|
-
random: () => Type.SpaceId;
|
|
102
|
-
};
|
|
103
|
-
}>;
|
|
104
|
-
}>, Schema.Struct<{
|
|
105
|
-
name: Schema.Literal<["space.lock"]>;
|
|
106
|
-
properties: Schema.Struct<{
|
|
107
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
108
|
-
byteLength: number;
|
|
109
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
110
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
111
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
112
|
-
make: (value: string) => Type.SpaceId;
|
|
113
|
-
random: () => Type.SpaceId;
|
|
114
|
-
};
|
|
115
|
-
}>;
|
|
116
|
-
}>, Schema.Struct<{
|
|
117
|
-
name: Schema.Literal<["space.migrate"]>;
|
|
118
|
-
properties: Schema.Struct<{
|
|
119
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
120
|
-
byteLength: number;
|
|
121
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
122
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
123
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
124
|
-
make: (value: string) => Type.SpaceId;
|
|
125
|
-
random: () => Type.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.object.add"]>;
|
|
132
|
-
properties: Schema.Struct<{
|
|
133
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
134
|
-
byteLength: number;
|
|
135
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
136
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
137
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
138
|
-
make: (value: string) => Type.SpaceId;
|
|
139
|
-
random: () => Type.SpaceId;
|
|
140
|
-
};
|
|
141
|
-
objectId: typeof Schema.String;
|
|
142
|
-
typename: Schema.optional<typeof Schema.String>;
|
|
143
|
-
}>;
|
|
144
|
-
}>, Schema.Struct<{
|
|
145
|
-
name: Schema.Literal<["space.share"]>;
|
|
146
|
-
properties: Schema.Struct<{
|
|
147
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
148
|
-
byteLength: number;
|
|
149
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
150
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
151
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
152
|
-
make: (value: string) => Type.SpaceId;
|
|
153
|
-
random: () => Type.SpaceId;
|
|
154
|
-
};
|
|
155
|
-
}>;
|
|
156
|
-
}>, Schema.Struct<{
|
|
157
|
-
name: Schema.Literal<["space.unlock"]>;
|
|
158
|
-
properties: Schema.Struct<{
|
|
159
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
160
|
-
byteLength: number;
|
|
161
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
162
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
163
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
164
|
-
make: (value: string) => Type.SpaceId;
|
|
165
|
-
random: () => Type.SpaceId;
|
|
166
|
-
};
|
|
167
|
-
}>;
|
|
168
|
-
}>, Schema.Struct<{
|
|
169
|
-
name: Schema.Literal<["threads.create"]>;
|
|
170
|
-
properties: Schema.Struct<{
|
|
171
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
172
|
-
byteLength: number;
|
|
173
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
174
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
175
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
176
|
-
make: (value: string) => Type.SpaceId;
|
|
177
|
-
random: () => Type.SpaceId;
|
|
178
|
-
};
|
|
179
|
-
threadId: typeof Schema.String;
|
|
180
|
-
}>;
|
|
181
|
-
}>, Schema.Struct<{
|
|
182
|
-
name: Schema.Literal<["threads.delete"]>;
|
|
183
|
-
properties: Schema.Struct<{
|
|
184
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
185
|
-
byteLength: number;
|
|
186
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
187
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
188
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
189
|
-
make: (value: string) => Type.SpaceId;
|
|
190
|
-
random: () => Type.SpaceId;
|
|
191
|
-
};
|
|
192
|
-
threadId: typeof Schema.String;
|
|
193
|
-
}>;
|
|
194
|
-
}>, Schema.Struct<{
|
|
195
|
-
name: Schema.Literal<["threads.message.add"]>;
|
|
196
|
-
properties: Schema.Struct<{
|
|
197
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
198
|
-
byteLength: number;
|
|
199
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
200
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
201
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
202
|
-
make: (value: string) => Type.SpaceId;
|
|
203
|
-
random: () => Type.SpaceId;
|
|
204
|
-
};
|
|
205
|
-
threadId: typeof Schema.String;
|
|
206
|
-
threadLength: typeof Schema.Number;
|
|
207
|
-
messageId: typeof Schema.String;
|
|
208
|
-
messageLength: typeof Schema.Number;
|
|
209
|
-
}>;
|
|
210
|
-
}>, Schema.Struct<{
|
|
211
|
-
name: Schema.Literal<["threads.message.delete"]>;
|
|
212
|
-
properties: Schema.Struct<{
|
|
213
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
214
|
-
byteLength: number;
|
|
215
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
216
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
217
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
218
|
-
make: (value: string) => Type.SpaceId;
|
|
219
|
-
random: () => Type.SpaceId;
|
|
220
|
-
};
|
|
221
|
-
threadId: typeof Schema.String;
|
|
222
|
-
messageId: typeof Schema.String;
|
|
223
|
-
}>;
|
|
224
|
-
}>, Schema.Struct<{
|
|
225
|
-
name: Schema.Literal<["threads.message.undo-delete"]>;
|
|
226
|
-
properties: Schema.Struct<{
|
|
227
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
228
|
-
byteLength: number;
|
|
229
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
230
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
231
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
232
|
-
make: (value: string) => Type.SpaceId;
|
|
233
|
-
random: () => Type.SpaceId;
|
|
234
|
-
};
|
|
235
|
-
threadId: typeof Schema.String;
|
|
236
|
-
messageId: typeof Schema.String;
|
|
237
|
-
}>;
|
|
238
|
-
}>, Schema.Struct<{
|
|
239
|
-
name: Schema.Literal<["threads.message.update"]>;
|
|
240
|
-
properties: Schema.Struct<{
|
|
241
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
242
|
-
byteLength: number;
|
|
243
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
244
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
245
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
246
|
-
make: (value: string) => Type.SpaceId;
|
|
247
|
-
random: () => Type.SpaceId;
|
|
248
|
-
};
|
|
249
|
-
messageId: typeof Schema.String;
|
|
250
|
-
messageLength: typeof Schema.Number;
|
|
251
|
-
}>;
|
|
252
|
-
}>, Schema.Struct<{
|
|
253
|
-
name: Schema.Literal<["threads.toggle-resolved"]>;
|
|
254
|
-
properties: Schema.Struct<{
|
|
255
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
256
|
-
byteLength: number;
|
|
257
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
258
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
259
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
260
|
-
make: (value: string) => Type.SpaceId;
|
|
261
|
-
random: () => Type.SpaceId;
|
|
262
|
-
};
|
|
263
|
-
threadId: typeof Schema.String;
|
|
264
|
-
}>;
|
|
265
|
-
}>, Schema.Struct<{
|
|
266
|
-
name: Schema.Literal<["threads.undo-delete"]>;
|
|
267
|
-
properties: Schema.Struct<{
|
|
268
|
-
spaceId: Schema.Schema<Type.SpaceId, string, never> & {
|
|
269
|
-
byteLength: number;
|
|
270
|
-
encode: (value: Uint8Array) => Type.SpaceId;
|
|
271
|
-
decode: (value: Type.SpaceId) => Uint8Array;
|
|
272
|
-
isValid: (value: string) => value is Type.SpaceId;
|
|
273
|
-
make: (value: string) => Type.SpaceId;
|
|
274
|
-
random: () => Type.SpaceId;
|
|
275
|
-
};
|
|
276
|
-
threadId: typeof Schema.String;
|
|
277
|
-
}>;
|
|
278
|
-
}>]>;
|
|
279
|
-
output: typeof Schema.Void;
|
|
280
|
-
}>;
|
|
281
|
-
/** Intent with strict types for first-party events. */
|
|
282
|
-
export class SendEvent extends SendEvent_base {
|
|
283
|
-
}
|
|
284
|
-
export {};
|
|
285
|
-
}
|
|
286
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAUlC,eAAO,MAAM,YAAY;;EAEvB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,YAAY,CAAC,CAAC;AAInE,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,cAuJ7B;KAAG;;CACN"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Rx } from '@effect-rx/rx-react';
|
|
6
|
-
import { Option, pipe } from 'effect';
|
|
7
|
-
|
|
8
|
-
import { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';
|
|
9
|
-
import { createExtension, ROOT_ID } from '@dxos/plugin-graph';
|
|
10
|
-
|
|
11
|
-
import { OBSERVABILITY_PLUGIN } from '../meta';
|
|
12
|
-
|
|
13
|
-
// NOTE: Copied from @dxos/plugin-deck to break circular dependency.
|
|
14
|
-
const ATTENDABLE_PATH_SEPARATOR = '~';
|
|
15
|
-
const DECK_COMPANION_TYPE = 'dxos.org/plugin/deck/deck-companion';
|
|
16
|
-
|
|
17
|
-
export default (context: PluginContext) =>
|
|
18
|
-
contributes(Capabilities.AppGraphBuilder, [
|
|
19
|
-
createExtension({
|
|
20
|
-
id: `${OBSERVABILITY_PLUGIN}/help`,
|
|
21
|
-
connector: (node) =>
|
|
22
|
-
Rx.make((get) =>
|
|
23
|
-
pipe(
|
|
24
|
-
get(node),
|
|
25
|
-
Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),
|
|
26
|
-
Option.map((node) => {
|
|
27
|
-
return [
|
|
28
|
-
{
|
|
29
|
-
id: [node.id, 'help'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
30
|
-
type: DECK_COMPANION_TYPE,
|
|
31
|
-
data: null,
|
|
32
|
-
properties: {
|
|
33
|
-
label: ['help label', { ns: OBSERVABILITY_PLUGIN }],
|
|
34
|
-
icon: 'ph--question--regular',
|
|
35
|
-
disposition: 'hidden',
|
|
36
|
-
position: 'hoist',
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
];
|
|
40
|
-
}),
|
|
41
|
-
Option.getOrElse(() => []),
|
|
42
|
-
),
|
|
43
|
-
),
|
|
44
|
-
}),
|
|
45
|
-
]);
|
|
@@ -1,22 +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 { OBSERVABILITY_PLUGIN } from '../meta';
|
|
10
|
-
|
|
11
|
-
export namespace ObservabilityCapabilities {
|
|
12
|
-
export type State = {
|
|
13
|
-
group?: string;
|
|
14
|
-
notified?: boolean;
|
|
15
|
-
};
|
|
16
|
-
export const State = defineCapability<State>(`${OBSERVABILITY_PLUGIN}/capability/state`);
|
|
17
|
-
|
|
18
|
-
export const Observability = defineCapability<Observability>(`${OBSERVABILITY_PLUGIN}/capability/observability`);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// NOTE: This is cloned from the client plugin to avoid circular dependencies.
|
|
22
|
-
export const ClientCapability = defineCapability<Client>('dxos.org/plugin/client/capability/client');
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
Capabilities,
|
|
7
|
-
contributes,
|
|
8
|
-
createIntent,
|
|
9
|
-
LayoutAction,
|
|
10
|
-
SettingsAction,
|
|
11
|
-
type PluginContext,
|
|
12
|
-
} from '@dxos/app-framework';
|
|
13
|
-
import { setupTelemetryListeners, type Observability } from '@dxos/observability';
|
|
14
|
-
|
|
15
|
-
import { ClientCapability, ObservabilityCapabilities } from './capabilities';
|
|
16
|
-
import { OBSERVABILITY_PLUGIN } from '../meta';
|
|
17
|
-
import { ObservabilityAction } from '../types';
|
|
18
|
-
|
|
19
|
-
type ClientReadyOptions = {
|
|
20
|
-
context: PluginContext;
|
|
21
|
-
namespace: string;
|
|
22
|
-
observability: Observability;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export default async ({ context, namespace, observability }: ClientReadyOptions) => {
|
|
26
|
-
const manager = context.getCapability(Capabilities.PluginManager);
|
|
27
|
-
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
28
|
-
const state = context.getCapability(ObservabilityCapabilities.State);
|
|
29
|
-
const client = context.getCapability(ClientCapability);
|
|
30
|
-
|
|
31
|
-
const sendPrivacyNotice = async () => {
|
|
32
|
-
const environment = client?.config?.values.runtime?.app?.env?.DX_ENVIRONMENT;
|
|
33
|
-
const notify =
|
|
34
|
-
environment && environment !== 'ci' && !environment.endsWith('.local') && !environment.endsWith('.lan');
|
|
35
|
-
if (!state.notified && notify) {
|
|
36
|
-
await dispatch(
|
|
37
|
-
createIntent(LayoutAction.AddToast, {
|
|
38
|
-
part: 'toast',
|
|
39
|
-
subject: {
|
|
40
|
-
id: `${OBSERVABILITY_PLUGIN}/notice`,
|
|
41
|
-
title: ['observability toast label', { ns: OBSERVABILITY_PLUGIN }],
|
|
42
|
-
description: ['observability toast description', { ns: OBSERVABILITY_PLUGIN }],
|
|
43
|
-
duration: Infinity,
|
|
44
|
-
icon: 'ph--info--regular',
|
|
45
|
-
actionLabel: ['observability toast action label', { ns: OBSERVABILITY_PLUGIN }],
|
|
46
|
-
actionAlt: ['observability toast action alt', { ns: OBSERVABILITY_PLUGIN }],
|
|
47
|
-
closeLabel: ['observability toast close label', { ns: OBSERVABILITY_PLUGIN }],
|
|
48
|
-
onAction: () => dispatch(createIntent(SettingsAction.Open, { plugin: OBSERVABILITY_PLUGIN })),
|
|
49
|
-
},
|
|
50
|
-
}),
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
state.notified = true;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
// Ensure errors are tagged with enabled plugins to help with reproductions.
|
|
58
|
-
manager.enabled.map((plugin) => observability?.setTag(`pluginEnabled-${plugin}`, 'true', 'errors'));
|
|
59
|
-
|
|
60
|
-
await dispatch(
|
|
61
|
-
createIntent(ObservabilityAction.SendEvent, {
|
|
62
|
-
name: 'page.load',
|
|
63
|
-
properties: {
|
|
64
|
-
// TODO(wittjosiah): These apis are deprecated. Is there a better way to find this information?
|
|
65
|
-
loadDuration: window.performance.timing.loadEventEnd - window.performance.timing.loadEventStart,
|
|
66
|
-
},
|
|
67
|
-
}),
|
|
68
|
-
);
|
|
69
|
-
|
|
70
|
-
// Start client observability (i.e. not running as shared worker)
|
|
71
|
-
// TODO(nf): how to prevent multiple instances for single shared worker?
|
|
72
|
-
const cleanup = setupTelemetryListeners(namespace, client, observability);
|
|
73
|
-
|
|
74
|
-
await Promise.all([
|
|
75
|
-
observability.setIdentityTags(client.services.services),
|
|
76
|
-
observability.startRuntimeMetrics(client),
|
|
77
|
-
observability.startNetworkMetrics(client.services.services),
|
|
78
|
-
observability.startSpacesMetrics(client, namespace),
|
|
79
|
-
]);
|
|
80
|
-
|
|
81
|
-
if (client.halo.identity.get()) {
|
|
82
|
-
await sendPrivacyNotice();
|
|
83
|
-
} else {
|
|
84
|
-
const subscription = client.halo.identity.subscribe(async (identity) => {
|
|
85
|
-
if (identity && observability) {
|
|
86
|
-
await sendPrivacyNotice();
|
|
87
|
-
await observability.setIdentityTags(client.services.services);
|
|
88
|
-
subscription.unsubscribe();
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
return contributes(ObservabilityCapabilities.Observability, observability, async () => {
|
|
94
|
-
cleanup();
|
|
95
|
-
await observability.close();
|
|
96
|
-
});
|
|
97
|
-
};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Capabilities, contributes, createResolver, IntentAction, type PluginContext } from '@dxos/app-framework';
|
|
6
|
-
import { log } from '@dxos/log';
|
|
7
|
-
import { getTelemetryIdentity, storeObservabilityDisabled } from '@dxos/observability';
|
|
8
|
-
|
|
9
|
-
import { ClientCapability, ObservabilityCapabilities } from './capabilities';
|
|
10
|
-
import { type ObservabilitySettingsProps } from '../components';
|
|
11
|
-
import { OBSERVABILITY_PLUGIN } from '../meta';
|
|
12
|
-
import { ObservabilityAction } from '../types';
|
|
13
|
-
|
|
14
|
-
export default ({ context, namespace }: { context: PluginContext; namespace: string }) =>
|
|
15
|
-
contributes(Capabilities.IntentResolver, [
|
|
16
|
-
createResolver({
|
|
17
|
-
intent: IntentAction.Track,
|
|
18
|
-
resolve: (intent) => {
|
|
19
|
-
log.info('intent', { intent });
|
|
20
|
-
},
|
|
21
|
-
}),
|
|
22
|
-
createResolver({
|
|
23
|
-
intent: ObservabilityAction.Toggle,
|
|
24
|
-
resolve: async ({ state }) => {
|
|
25
|
-
const client = context.getCapability(ClientCapability);
|
|
26
|
-
const observability = context.getCapability(ObservabilityCapabilities.Observability);
|
|
27
|
-
const settings = context
|
|
28
|
-
.getCapability(Capabilities.SettingsStore)
|
|
29
|
-
.getStore<ObservabilitySettingsProps>(OBSERVABILITY_PLUGIN)!.value;
|
|
30
|
-
settings.enabled = state ?? !settings.enabled;
|
|
31
|
-
observability.track({
|
|
32
|
-
...getTelemetryIdentity(client),
|
|
33
|
-
action: 'observability.toggle',
|
|
34
|
-
properties: {
|
|
35
|
-
enabled: settings.enabled,
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
observability.setMode(settings.enabled ? 'basic' : 'disabled');
|
|
39
|
-
await storeObservabilityDisabled(namespace, !settings.enabled);
|
|
40
|
-
return { data: settings.enabled };
|
|
41
|
-
},
|
|
42
|
-
}),
|
|
43
|
-
createResolver({
|
|
44
|
-
intent: ObservabilityAction.SendEvent,
|
|
45
|
-
resolve: (data) => {
|
|
46
|
-
const client = context.getCapability(ClientCapability);
|
|
47
|
-
const properties = 'properties' in data ? data.properties : {};
|
|
48
|
-
|
|
49
|
-
// NOTE: This is to ensure that events fired before observability is ready are still sent.
|
|
50
|
-
// TODO(wittjosiah): If the intent dispatcher supports concurrent actions in the future,
|
|
51
|
-
// then this could be awaited still rather than voiding.
|
|
52
|
-
void context.waitForCapability(ObservabilityCapabilities.Observability).then((observability) => {
|
|
53
|
-
observability.track({
|
|
54
|
-
...getTelemetryIdentity(client),
|
|
55
|
-
action: data.name,
|
|
56
|
-
properties,
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
},
|
|
60
|
-
}),
|
|
61
|
-
createResolver({
|
|
62
|
-
intent: ObservabilityAction.CaptureUserFeedback,
|
|
63
|
-
resolve: async (data) => {
|
|
64
|
-
const observability = context.getCapability(ObservabilityCapabilities.Observability);
|
|
65
|
-
observability.captureUserFeedback(data.message);
|
|
66
|
-
},
|
|
67
|
-
}),
|
|
68
|
-
]);
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { contributes, Capabilities, createSurface } from '@dxos/app-framework';
|
|
8
|
-
import { SettingsStore } from '@dxos/local-storage';
|
|
9
|
-
|
|
10
|
-
import { HelpContainer, ObservabilitySettings, type ObservabilitySettingsProps } from '../components';
|
|
11
|
-
import { OBSERVABILITY_PLUGIN } from '../meta';
|
|
12
|
-
|
|
13
|
-
export default () =>
|
|
14
|
-
contributes(Capabilities.ReactSurface, [
|
|
15
|
-
createSurface({
|
|
16
|
-
id: OBSERVABILITY_PLUGIN,
|
|
17
|
-
role: 'article',
|
|
18
|
-
filter: (data): data is { subject: SettingsStore<ObservabilitySettingsProps> } =>
|
|
19
|
-
data.subject instanceof SettingsStore && data.subject.prefix === OBSERVABILITY_PLUGIN,
|
|
20
|
-
component: ({ data: { subject } }) => <ObservabilitySettings settings={subject.value} />,
|
|
21
|
-
}),
|
|
22
|
-
createSurface({
|
|
23
|
-
id: `${OBSERVABILITY_PLUGIN}/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,21 +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 { ObservabilityCapabilities } from './capabilities';
|
|
10
|
-
import { OBSERVABILITY_PLUGIN } from '../meta';
|
|
11
|
-
|
|
12
|
-
export default async ({ namespace }: { namespace: string }) => {
|
|
13
|
-
const state = new LocalStorageStore<ObservabilityCapabilities.State>(OBSERVABILITY_PLUGIN);
|
|
14
|
-
|
|
15
|
-
state.prop({ key: 'notified', type: LocalStorageStore.bool({ allowUndefined: true }) });
|
|
16
|
-
|
|
17
|
-
// NOTE: This is not stored in local storage such that it can be accessed by workers.
|
|
18
|
-
state.values.group = await getObservabilityGroup(namespace);
|
|
19
|
-
|
|
20
|
-
return contributes(ObservabilityCapabilities.State, state.values, () => state.close());
|
|
21
|
-
};
|
package/src/events.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { defineEvent, Events } from '@dxos/app-framework';
|
|
6
|
-
|
|
7
|
-
import { OBSERVABILITY_PLUGIN } from './meta';
|
|
8
|
-
|
|
9
|
-
export namespace ObservabilityEvents {
|
|
10
|
-
export const StateReady = Events.createStateEvent(OBSERVABILITY_PLUGIN);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// NOTE: This is cloned from the client plugin to avoid circular dependencies.
|
|
14
|
-
export const ClientReadyEvent = defineEvent('dxos.org/plugin/client/event/client-ready');
|