@grackle-ai/ahp 0.131.0
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/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/vendor/ahp/action-origin.generated.d.ts +33 -0
- package/dist/vendor/ahp/action-origin.generated.d.ts.map +1 -0
- package/dist/vendor/ahp/action-origin.generated.js +71 -0
- package/dist/vendor/ahp/action-origin.generated.js.map +1 -0
- package/dist/vendor/ahp/actions.d.ts +14 -0
- package/dist/vendor/ahp/actions.d.ts.map +1 -0
- package/dist/vendor/ahp/actions.js +15 -0
- package/dist/vendor/ahp/actions.js.map +1 -0
- package/dist/vendor/ahp/channels-changeset/actions.d.ts +87 -0
- package/dist/vendor/ahp/channels-changeset/actions.d.ts.map +1 -0
- package/dist/vendor/ahp/channels-changeset/actions.js +9 -0
- package/dist/vendor/ahp/channels-changeset/actions.js.map +1 -0
- package/dist/vendor/ahp/channels-changeset/commands.d.ts +103 -0
- package/dist/vendor/ahp/channels-changeset/commands.d.ts.map +1 -0
- package/dist/vendor/ahp/channels-changeset/commands.js +22 -0
- package/dist/vendor/ahp/channels-changeset/commands.js.map +1 -0
- package/dist/vendor/ahp/channels-changeset/reducer.d.ts +18 -0
- package/dist/vendor/ahp/channels-changeset/reducer.d.ts.map +1 -0
- package/dist/vendor/ahp/channels-changeset/reducer.js +65 -0
- package/dist/vendor/ahp/channels-changeset/reducer.js.map +1 -0
- package/dist/vendor/ahp/channels-changeset/state.d.ts +155 -0
- package/dist/vendor/ahp/channels-changeset/state.d.ts.map +1 -0
- package/dist/vendor/ahp/channels-changeset/state.js +39 -0
- package/dist/vendor/ahp/channels-changeset/state.js.map +1 -0
- package/dist/vendor/ahp/channels-otlp/notifications.d.ts +121 -0
- package/dist/vendor/ahp/channels-otlp/notifications.d.ts.map +1 -0
- package/dist/vendor/ahp/channels-otlp/notifications.js +11 -0
- package/dist/vendor/ahp/channels-otlp/notifications.js.map +1 -0
- package/dist/vendor/ahp/channels-otlp/state.d.ts +65 -0
- package/dist/vendor/ahp/channels-otlp/state.d.ts.map +1 -0
- package/dist/vendor/ahp/channels-otlp/state.js +10 -0
- package/dist/vendor/ahp/channels-otlp/state.js.map +1 -0
- package/dist/vendor/ahp/channels-root/actions.d.ts +62 -0
- package/dist/vendor/ahp/channels-root/actions.d.ts.map +1 -0
- package/dist/vendor/ahp/channels-root/actions.js +8 -0
- package/dist/vendor/ahp/channels-root/actions.js.map +1 -0
- package/dist/vendor/ahp/channels-root/commands.d.ts +172 -0
- package/dist/vendor/ahp/channels-root/commands.d.ts.map +1 -0
- package/dist/vendor/ahp/channels-root/commands.js +10 -0
- package/dist/vendor/ahp/channels-root/commands.js.map +1 -0
- package/dist/vendor/ahp/channels-root/notifications.d.ts +136 -0
- package/dist/vendor/ahp/channels-root/notifications.d.ts.map +1 -0
- package/dist/vendor/ahp/channels-root/notifications.js +9 -0
- package/dist/vendor/ahp/channels-root/notifications.js.map +1 -0
- package/dist/vendor/ahp/channels-root/reducer.d.ts +12 -0
- package/dist/vendor/ahp/channels-root/reducer.d.ts.map +1 -0
- package/dist/vendor/ahp/channels-root/reducer.js +36 -0
- package/dist/vendor/ahp/channels-root/reducer.js.map +1 -0
- package/dist/vendor/ahp/channels-root/state.d.ts +123 -0
- package/dist/vendor/ahp/channels-root/state.d.ts.map +1 -0
- package/dist/vendor/ahp/channels-root/state.js +19 -0
- package/dist/vendor/ahp/channels-root/state.js.map +1 -0
- package/dist/vendor/ahp/channels-session/actions.d.ts +736 -0
- package/dist/vendor/ahp/channels-session/actions.d.ts.map +1 -0
- package/dist/vendor/ahp/channels-session/actions.js +8 -0
- package/dist/vendor/ahp/channels-session/actions.js.map +1 -0
- package/dist/vendor/ahp/channels-session/commands.d.ts +261 -0
- package/dist/vendor/ahp/channels-session/commands.d.ts.map +1 -0
- package/dist/vendor/ahp/channels-session/commands.js +23 -0
- package/dist/vendor/ahp/channels-session/commands.js.map +1 -0
- package/dist/vendor/ahp/channels-session/reducer.d.ts +14 -0
- package/dist/vendor/ahp/channels-session/reducer.d.ts.map +1 -0
- package/dist/vendor/ahp/channels-session/reducer.js +703 -0
- package/dist/vendor/ahp/channels-session/reducer.js.map +1 -0
- package/dist/vendor/ahp/channels-session/state.d.ts +1217 -0
- package/dist/vendor/ahp/channels-session/state.d.ts.map +1 -0
- package/dist/vendor/ahp/channels-session/state.js +229 -0
- package/dist/vendor/ahp/channels-session/state.js.map +1 -0
- package/dist/vendor/ahp/channels-terminal/actions.d.ts +185 -0
- package/dist/vendor/ahp/channels-terminal/actions.d.ts.map +1 -0
- package/dist/vendor/ahp/channels-terminal/actions.js +8 -0
- package/dist/vendor/ahp/channels-terminal/actions.js.map +1 -0
- package/dist/vendor/ahp/channels-terminal/commands.d.ts +50 -0
- package/dist/vendor/ahp/channels-terminal/commands.d.ts.map +1 -0
- package/dist/vendor/ahp/channels-terminal/commands.js +8 -0
- package/dist/vendor/ahp/channels-terminal/commands.js.map +1 -0
- package/dist/vendor/ahp/channels-terminal/reducer.d.ts +12 -0
- package/dist/vendor/ahp/channels-terminal/reducer.d.ts.map +1 -0
- package/dist/vendor/ahp/channels-terminal/reducer.js +80 -0
- package/dist/vendor/ahp/channels-terminal/reducer.js.map +1 -0
- package/dist/vendor/ahp/channels-terminal/state.d.ts +151 -0
- package/dist/vendor/ahp/channels-terminal/state.d.ts.map +1 -0
- package/dist/vendor/ahp/channels-terminal/state.js +18 -0
- package/dist/vendor/ahp/channels-terminal/state.js.map +1 -0
- package/dist/vendor/ahp/commands.d.ts +14 -0
- package/dist/vendor/ahp/commands.d.ts.map +1 -0
- package/dist/vendor/ahp/commands.js +15 -0
- package/dist/vendor/ahp/commands.js.map +1 -0
- package/dist/vendor/ahp/common/actions.d.ts +107 -0
- package/dist/vendor/ahp/common/actions.d.ts.map +1 -0
- package/dist/vendor/ahp/common/actions.js +77 -0
- package/dist/vendor/ahp/common/actions.js.map +1 -0
- package/dist/vendor/ahp/common/commands.d.ts +594 -0
- package/dist/vendor/ahp/common/commands.d.ts.map +1 -0
- package/dist/vendor/ahp/common/commands.js +32 -0
- package/dist/vendor/ahp/common/commands.js.map +1 -0
- package/dist/vendor/ahp/common/errors.d.ts +184 -0
- package/dist/vendor/ahp/common/errors.d.ts.map +1 -0
- package/dist/vendor/ahp/common/errors.js +82 -0
- package/dist/vendor/ahp/common/errors.js.map +1 -0
- package/dist/vendor/ahp/common/messages.d.ts +330 -0
- package/dist/vendor/ahp/common/messages.d.ts.map +1 -0
- package/dist/vendor/ahp/common/messages.js +11 -0
- package/dist/vendor/ahp/common/messages.js.map +1 -0
- package/dist/vendor/ahp/common/notifications.d.ts +58 -0
- package/dist/vendor/ahp/common/notifications.d.ts.map +1 -0
- package/dist/vendor/ahp/common/notifications.js +20 -0
- package/dist/vendor/ahp/common/notifications.js.map +1 -0
- package/dist/vendor/ahp/common/reducer-helpers.d.ts +24 -0
- package/dist/vendor/ahp/common/reducer-helpers.d.ts.map +1 -0
- package/dist/vendor/ahp/common/reducer-helpers.js +31 -0
- package/dist/vendor/ahp/common/reducer-helpers.js.map +1 -0
- package/dist/vendor/ahp/common/state.d.ts +286 -0
- package/dist/vendor/ahp/common/state.d.ts.map +1 -0
- package/dist/vendor/ahp/common/state.js +11 -0
- package/dist/vendor/ahp/common/state.js.map +1 -0
- package/dist/vendor/ahp/errors.d.ts +8 -0
- package/dist/vendor/ahp/errors.d.ts.map +1 -0
- package/dist/vendor/ahp/errors.js +9 -0
- package/dist/vendor/ahp/errors.js.map +1 -0
- package/dist/vendor/ahp/index.d.ts +24 -0
- package/dist/vendor/ahp/index.d.ts.map +1 -0
- package/dist/vendor/ahp/index.js +21 -0
- package/dist/vendor/ahp/index.js.map +1 -0
- package/dist/vendor/ahp/messages.d.ts +8 -0
- package/dist/vendor/ahp/messages.d.ts.map +1 -0
- package/dist/vendor/ahp/messages.js +9 -0
- package/dist/vendor/ahp/messages.js.map +1 -0
- package/dist/vendor/ahp/notifications.d.ts +11 -0
- package/dist/vendor/ahp/notifications.d.ts.map +1 -0
- package/dist/vendor/ahp/notifications.js +12 -0
- package/dist/vendor/ahp/notifications.js.map +1 -0
- package/dist/vendor/ahp/reducers.d.ts +12 -0
- package/dist/vendor/ahp/reducers.d.ts.map +1 -0
- package/dist/vendor/ahp/reducers.js +13 -0
- package/dist/vendor/ahp/reducers.js.map +1 -0
- package/dist/vendor/ahp/state.d.ts +15 -0
- package/dist/vendor/ahp/state.d.ts.map +1 -0
- package/dist/vendor/ahp/state.js +16 -0
- package/dist/vendor/ahp/state.js.map +1 -0
- package/dist/vendor/ahp/version/message-checks.d.ts +15 -0
- package/dist/vendor/ahp/version/message-checks.d.ts.map +1 -0
- package/dist/vendor/ahp/version/message-checks.js +16 -0
- package/dist/vendor/ahp/version/message-checks.js.map +1 -0
- package/dist/vendor/ahp/version/registry.d.ts +56 -0
- package/dist/vendor/ahp/version/registry.d.ts.map +1 -0
- package/dist/vendor/ahp/version/registry.js +138 -0
- package/dist/vendor/ahp/version/registry.js.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Changeset State Types — Catalogue and per-changeset state for file-change
|
|
3
|
+
* views exposed on the `ahp-changeset:` channel.
|
|
4
|
+
*
|
|
5
|
+
* @module channels-changeset/state
|
|
6
|
+
*/
|
|
7
|
+
import type { StringOrMarkdown, FileEdit, ErrorInfo } from '../common/state.js';
|
|
8
|
+
/**
|
|
9
|
+
* Catalogue entry describing one changeset the server can produce for a
|
|
10
|
+
* session.
|
|
11
|
+
*
|
|
12
|
+
* Catalogue entries are intentionally lightweight — just enough to render a
|
|
13
|
+
* chip or list row without subscribing. Full per-changeset detail
|
|
14
|
+
* ({@link ChangesetState}) lives on the subscribable URI obtained by
|
|
15
|
+
* expanding {@link uriTemplate}.
|
|
16
|
+
*
|
|
17
|
+
* @category Changesets
|
|
18
|
+
*/
|
|
19
|
+
export interface ChangesetSummary {
|
|
20
|
+
/** Human-readable label, e.g. `"Uncommitted Changes"`. */
|
|
21
|
+
label: string;
|
|
22
|
+
/**
|
|
23
|
+
* RFC 6570 URI template. Clients parse the variables directly out of the
|
|
24
|
+
* template using the standard `{name}` syntax — they are not redeclared
|
|
25
|
+
* here.
|
|
26
|
+
*
|
|
27
|
+
* Only the following template shapes are defined by this protocol; any
|
|
28
|
+
* other variable name MUST be ignored by clients (there is no
|
|
29
|
+
* protocol-defined way to obtain values for unknown variables):
|
|
30
|
+
*
|
|
31
|
+
* | Variables in template | Meaning |
|
|
32
|
+
* | ------------------------------------------- | ------------------------------------------------------------------------------------ |
|
|
33
|
+
* | _(none)_ | A static, session-wide changeset. The template is itself a subscribable URI. |
|
|
34
|
+
* | `{turnId}` | Per-turn slice. Expand with a `Turn.id` from the session. |
|
|
35
|
+
* | `{originalTurnId}` and `{modifiedTurnId}` | Diff between two turns. Both variables MUST be present. |
|
|
36
|
+
*
|
|
37
|
+
* Future protocol versions MAY add new well-known variables.
|
|
38
|
+
*/
|
|
39
|
+
uriTemplate: string;
|
|
40
|
+
/** Optional longer description. */
|
|
41
|
+
description?: string;
|
|
42
|
+
/** Aggregate line additions across the changeset, when known. */
|
|
43
|
+
additions?: number;
|
|
44
|
+
/** Aggregate line deletions across the changeset, when known. */
|
|
45
|
+
deletions?: number;
|
|
46
|
+
/** Number of files in the changeset, when known. */
|
|
47
|
+
files?: number;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Computation lifecycle of a {@link ChangesetState}.
|
|
51
|
+
*
|
|
52
|
+
* @category Changesets
|
|
53
|
+
*/
|
|
54
|
+
export declare enum ChangesetStatus {
|
|
55
|
+
/** The server is still computing the contents of this changeset. */
|
|
56
|
+
Computing = "computing",
|
|
57
|
+
/** The changeset has been fully computed and is up-to-date. */
|
|
58
|
+
Ready = "ready",
|
|
59
|
+
/**
|
|
60
|
+
* Computation failed. The cause is described by
|
|
61
|
+
* {@link ChangesetState.error}.
|
|
62
|
+
*/
|
|
63
|
+
Error = "error"
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Full state for a single changeset, returned when a client subscribes to
|
|
67
|
+
* an expanded changeset URI.
|
|
68
|
+
*
|
|
69
|
+
* The client already knows the URI it subscribed to, so this state does
|
|
70
|
+
* not redundantly carry it (or the catalogue's `id`, `label`, etc.).
|
|
71
|
+
* Aggregate counts (`additions`, `deletions`, `files`) are likewise
|
|
72
|
+
* omitted: clients trivially compute them from `files[].edit.diff`.
|
|
73
|
+
*
|
|
74
|
+
* @category Changesets
|
|
75
|
+
*/
|
|
76
|
+
export interface ChangesetState {
|
|
77
|
+
/** Computation lifecycle. */
|
|
78
|
+
status: ChangesetStatus;
|
|
79
|
+
/** Present iff `status === ChangesetStatus.Error`. */
|
|
80
|
+
error?: ErrorInfo;
|
|
81
|
+
/** Files in this changeset, keyed by {@link ChangesetFile.id}. */
|
|
82
|
+
files: ChangesetFile[];
|
|
83
|
+
/**
|
|
84
|
+
* Operations the client may invoke against this changeset. Omit when no
|
|
85
|
+
* operations are available.
|
|
86
|
+
*/
|
|
87
|
+
operations?: ChangesetOperation[];
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* One file entry within a {@link ChangesetState}.
|
|
91
|
+
*
|
|
92
|
+
* @category Changesets
|
|
93
|
+
*/
|
|
94
|
+
export interface ChangesetFile {
|
|
95
|
+
/**
|
|
96
|
+
* Stable identifier within the changeset. Typically `after.uri`
|
|
97
|
+
* (or `before.uri` for deletions).
|
|
98
|
+
*/
|
|
99
|
+
id: string;
|
|
100
|
+
/**
|
|
101
|
+
* Reuses the existing {@link FileEdit} shape. Clients derive line
|
|
102
|
+
* additions, deletions, and rename/create/delete semantics from this.
|
|
103
|
+
*/
|
|
104
|
+
edit: FileEdit;
|
|
105
|
+
/**
|
|
106
|
+
* Server-defined opaque metadata, surfaced to operations and tooling
|
|
107
|
+
* but not interpreted by the protocol.
|
|
108
|
+
*/
|
|
109
|
+
_meta?: Record<string, unknown>;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Where a {@link ChangesetOperation} can be invoked.
|
|
113
|
+
*
|
|
114
|
+
* @category Changesets
|
|
115
|
+
*/
|
|
116
|
+
export declare enum ChangesetOperationScope {
|
|
117
|
+
/** Applies to the whole changeset. */
|
|
118
|
+
Changeset = "changeset",
|
|
119
|
+
/** Applies to a single file within the changeset. */
|
|
120
|
+
Resource = "resource",
|
|
121
|
+
/** Applies to a line range within a single file. */
|
|
122
|
+
Range = "range"
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* A server-declared invokable verb the client can run against a
|
|
126
|
+
* changeset, a file, or a range — `"stage"`, `"revert"`, `"create-pr"`,
|
|
127
|
+
* and so on.
|
|
128
|
+
*
|
|
129
|
+
* The term "operation" is used deliberately to avoid colliding with the
|
|
130
|
+
* protocol-level [Actions](/guide/actions) that mutate state.
|
|
131
|
+
*
|
|
132
|
+
* @category Changesets
|
|
133
|
+
*/
|
|
134
|
+
export interface ChangesetOperation {
|
|
135
|
+
/** Stable identifier, unique within this changeset. */
|
|
136
|
+
id: string;
|
|
137
|
+
/** Human-readable button/menu label. */
|
|
138
|
+
label: string;
|
|
139
|
+
/** Optional longer description shown on hover or in tooltips. */
|
|
140
|
+
description?: string;
|
|
141
|
+
/** Where this operation can be invoked. */
|
|
142
|
+
scopes: ChangesetOperationScope[];
|
|
143
|
+
/**
|
|
144
|
+
* Optional confirmation prompt to show before invoking. When present,
|
|
145
|
+
* the client MUST display this message to the user (typically in a
|
|
146
|
+
* confirmation dialog) and only invoke the operation after the user
|
|
147
|
+
* accepts. The presence of this field also signals that the operation
|
|
148
|
+
* is destructive — clients SHOULD style the affirmative button
|
|
149
|
+
* accordingly (e.g. with a warning colour).
|
|
150
|
+
*/
|
|
151
|
+
confirmation?: StringOrMarkdown;
|
|
152
|
+
/** Optional generic icon hint, e.g. `"check"`, `"trash"`. */
|
|
153
|
+
icon?: string;
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/vendor/ahp/channels-changeset/state.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAIhF;;;;;;;;;;GAUG;AACH,MAAM,WAAW,gBAAgB;IAC/B,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;;;;;;;;;OAgBG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,oBAAY,eAAe;IACzB,oEAAoE;IACpE,SAAS,cAAc;IACvB,+DAA+D;IAC/D,KAAK,UAAU;IACf;;;OAGG;IACH,KAAK,UAAU;CAChB;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,cAAc;IAC7B,6BAA6B;IAC7B,MAAM,EAAE,eAAe,CAAC;IACxB,sDAAsD;IACtD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kEAAkE;IAClE,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB;;;OAGG;IACH,UAAU,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACnC;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,IAAI,EAAE,QAAQ,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED;;;;GAIG;AACH,oBAAY,uBAAuB;IACjC,sCAAsC;IACtC,SAAS,cAAc;IACvB,qDAAqD;IACrD,QAAQ,aAAa;IACrB,oDAAoD;IACpD,KAAK,UAAU;CAChB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,kBAAkB;IACjC,uDAAuD;IACvD,EAAE,EAAE,MAAM,CAAC;IACX,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,MAAM,EAAE,uBAAuB,EAAE,CAAC;IAClC;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* eslint-disable -- vendored third-party code, see SOURCE.md */
|
|
2
|
+
/**
|
|
3
|
+
* Changeset State Types — Catalogue and per-changeset state for file-change
|
|
4
|
+
* views exposed on the `ahp-changeset:` channel.
|
|
5
|
+
*
|
|
6
|
+
* @module channels-changeset/state
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Computation lifecycle of a {@link ChangesetState}.
|
|
10
|
+
*
|
|
11
|
+
* @category Changesets
|
|
12
|
+
*/
|
|
13
|
+
export var ChangesetStatus;
|
|
14
|
+
(function (ChangesetStatus) {
|
|
15
|
+
/** The server is still computing the contents of this changeset. */
|
|
16
|
+
ChangesetStatus["Computing"] = "computing";
|
|
17
|
+
/** The changeset has been fully computed and is up-to-date. */
|
|
18
|
+
ChangesetStatus["Ready"] = "ready";
|
|
19
|
+
/**
|
|
20
|
+
* Computation failed. The cause is described by
|
|
21
|
+
* {@link ChangesetState.error}.
|
|
22
|
+
*/
|
|
23
|
+
ChangesetStatus["Error"] = "error";
|
|
24
|
+
})(ChangesetStatus || (ChangesetStatus = {}));
|
|
25
|
+
/**
|
|
26
|
+
* Where a {@link ChangesetOperation} can be invoked.
|
|
27
|
+
*
|
|
28
|
+
* @category Changesets
|
|
29
|
+
*/
|
|
30
|
+
export var ChangesetOperationScope;
|
|
31
|
+
(function (ChangesetOperationScope) {
|
|
32
|
+
/** Applies to the whole changeset. */
|
|
33
|
+
ChangesetOperationScope["Changeset"] = "changeset";
|
|
34
|
+
/** Applies to a single file within the changeset. */
|
|
35
|
+
ChangesetOperationScope["Resource"] = "resource";
|
|
36
|
+
/** Applies to a line range within a single file. */
|
|
37
|
+
ChangesetOperationScope["Range"] = "range";
|
|
38
|
+
})(ChangesetOperationScope || (ChangesetOperationScope = {}));
|
|
39
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../src/vendor/ahp/channels-changeset/state.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE;;;;;GAKG;AAgDH;;;;GAIG;AACH,MAAM,CAAN,IAAY,eAUX;AAVD,WAAY,eAAe;IACzB,oEAAoE;IACpE,0CAAuB,CAAA;IACvB,+DAA+D;IAC/D,kCAAe,CAAA;IACf;;;OAGG;IACH,kCAAe,CAAA;AACjB,CAAC,EAVW,eAAe,KAAf,eAAe,QAU1B;AAkDD;;;;GAIG;AACH,MAAM,CAAN,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,sCAAsC;IACtC,kDAAuB,CAAA;IACvB,qDAAqD;IACrD,gDAAqB,CAAA;IACrB,oDAAoD;IACpD,0CAAe,CAAA;AACjB,CAAC,EAPW,uBAAuB,KAAvB,uBAAuB,QAOlC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OTLP Channel Notifications — Server → client push of OpenTelemetry data
|
|
3
|
+
* over AHP. One notification method per OTLP signal kind; the params'
|
|
4
|
+
* `payload` field carries an OTLP/JSON `ExportXxxServiceRequest` value
|
|
5
|
+
* verbatim.
|
|
6
|
+
*
|
|
7
|
+
* @module channels-otlp/notifications
|
|
8
|
+
*/
|
|
9
|
+
import type { URI } from '../common/state.js';
|
|
10
|
+
/**
|
|
11
|
+
* Delivers a batch of OTLP log records to a client subscribed to the host's
|
|
12
|
+
* logs channel (advertised on `TelemetryCapabilities.logs`).
|
|
13
|
+
*
|
|
14
|
+
* The `payload` field is an OTLP/JSON `ExportLogsServiceRequest` value
|
|
15
|
+
* verbatim — i.e. an object of shape `{ resourceLogs: ResourceLogs[] }` as
|
|
16
|
+
* defined by [opentelemetry-proto](https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/collector/logs/v1/logs_service.proto).
|
|
17
|
+
* AHP does not redeclare the OTLP type system; clients SHOULD use an
|
|
18
|
+
* OpenTelemetry SDK or schema to parse it.
|
|
19
|
+
*
|
|
20
|
+
* Like all stateless-channel notifications, this is ephemeral: it is not
|
|
21
|
+
* replayed on reconnect. Subscribers receive only batches emitted after
|
|
22
|
+
* their `subscribe` succeeds.
|
|
23
|
+
*
|
|
24
|
+
* @category Telemetry Notifications
|
|
25
|
+
* @method otlp/exportLogs
|
|
26
|
+
* @direction Server → Client
|
|
27
|
+
* @messageType Notification
|
|
28
|
+
* @version 1
|
|
29
|
+
* @example
|
|
30
|
+
* ```json
|
|
31
|
+
* {
|
|
32
|
+
* "jsonrpc": "2.0",
|
|
33
|
+
* "method": "otlp/exportLogs",
|
|
34
|
+
* "params": {
|
|
35
|
+
* "channel": "ahp-otlp://logs",
|
|
36
|
+
* "payload": { "resourceLogs": [ /* OTLP/JSON ResourceLogs * / ] }
|
|
37
|
+
* }
|
|
38
|
+
* }
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export interface OtlpExportLogsParams {
|
|
42
|
+
/** Channel URI this notification belongs to (an `ahp-otlp:` URI advertised on `TelemetryCapabilities.logs`). */
|
|
43
|
+
channel: URI;
|
|
44
|
+
/**
|
|
45
|
+
* OTLP/JSON `ExportLogsServiceRequest` value. The top-level field is
|
|
46
|
+
* `resourceLogs: ResourceLogs[]`; nested shapes are defined by
|
|
47
|
+
* opentelemetry-proto and are not redeclared here.
|
|
48
|
+
*/
|
|
49
|
+
payload: Record<string, unknown>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Delivers a batch of OTLP spans to a client subscribed to the host's
|
|
53
|
+
* traces channel (advertised on `TelemetryCapabilities.traces`).
|
|
54
|
+
*
|
|
55
|
+
* The `payload` field is an OTLP/JSON `ExportTraceServiceRequest` value
|
|
56
|
+
* verbatim — i.e. an object of shape `{ resourceSpans: ResourceSpans[] }`
|
|
57
|
+
* as defined by [opentelemetry-proto](https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/collector/trace/v1/trace_service.proto).
|
|
58
|
+
*
|
|
59
|
+
* @category Telemetry Notifications
|
|
60
|
+
* @method otlp/exportTraces
|
|
61
|
+
* @direction Server → Client
|
|
62
|
+
* @messageType Notification
|
|
63
|
+
* @version 1
|
|
64
|
+
* @example
|
|
65
|
+
* ```json
|
|
66
|
+
* {
|
|
67
|
+
* "jsonrpc": "2.0",
|
|
68
|
+
* "method": "otlp/exportTraces",
|
|
69
|
+
* "params": {
|
|
70
|
+
* "channel": "ahp-otlp://traces",
|
|
71
|
+
* "payload": { "resourceSpans": [ /* OTLP/JSON ResourceSpans * / ] }
|
|
72
|
+
* }
|
|
73
|
+
* }
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
export interface OtlpExportTracesParams {
|
|
77
|
+
/** Channel URI this notification belongs to (an `ahp-otlp:` URI advertised on `TelemetryCapabilities.traces`). */
|
|
78
|
+
channel: URI;
|
|
79
|
+
/**
|
|
80
|
+
* OTLP/JSON `ExportTraceServiceRequest` value. The top-level field is
|
|
81
|
+
* `resourceSpans: ResourceSpans[]`; nested shapes are defined by
|
|
82
|
+
* opentelemetry-proto and are not redeclared here.
|
|
83
|
+
*/
|
|
84
|
+
payload: Record<string, unknown>;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Delivers a batch of OTLP metric data points to a client subscribed to
|
|
88
|
+
* the host's metrics channel (advertised on `TelemetryCapabilities.metrics`).
|
|
89
|
+
*
|
|
90
|
+
* The `payload` field is an OTLP/JSON `ExportMetricsServiceRequest` value
|
|
91
|
+
* verbatim — i.e. an object of shape `{ resourceMetrics: ResourceMetrics[] }`
|
|
92
|
+
* as defined by [opentelemetry-proto](https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/collector/metrics/v1/metrics_service.proto).
|
|
93
|
+
*
|
|
94
|
+
* @category Telemetry Notifications
|
|
95
|
+
* @method otlp/exportMetrics
|
|
96
|
+
* @direction Server → Client
|
|
97
|
+
* @messageType Notification
|
|
98
|
+
* @version 1
|
|
99
|
+
* @example
|
|
100
|
+
* ```json
|
|
101
|
+
* {
|
|
102
|
+
* "jsonrpc": "2.0",
|
|
103
|
+
* "method": "otlp/exportMetrics",
|
|
104
|
+
* "params": {
|
|
105
|
+
* "channel": "ahp-otlp://metrics",
|
|
106
|
+
* "payload": { "resourceMetrics": [ /* OTLP/JSON ResourceMetrics * / ] }
|
|
107
|
+
* }
|
|
108
|
+
* }
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
export interface OtlpExportMetricsParams {
|
|
112
|
+
/** Channel URI this notification belongs to (an `ahp-otlp:` URI advertised on `TelemetryCapabilities.metrics`). */
|
|
113
|
+
channel: URI;
|
|
114
|
+
/**
|
|
115
|
+
* OTLP/JSON `ExportMetricsServiceRequest` value. The top-level field is
|
|
116
|
+
* `resourceMetrics: ResourceMetrics[]`; nested shapes are defined by
|
|
117
|
+
* opentelemetry-proto and are not redeclared here.
|
|
118
|
+
*/
|
|
119
|
+
payload: Record<string, unknown>;
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=notifications.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../../../../src/vendor/ahp/channels-otlp/notifications.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAI9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,WAAW,oBAAoB;IACnC,gHAAgH;IAChH,OAAO,EAAE,GAAG,CAAC;IACb;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAID;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,sBAAsB;IACrC,kHAAkH;IAClH,OAAO,EAAE,GAAG,CAAC;IACb;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAID;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,uBAAuB;IACtC,mHAAmH;IACnH,OAAO,EAAE,GAAG,CAAC;IACb;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* eslint-disable -- vendored third-party code, see SOURCE.md */
|
|
2
|
+
/**
|
|
3
|
+
* OTLP Channel Notifications — Server → client push of OpenTelemetry data
|
|
4
|
+
* over AHP. One notification method per OTLP signal kind; the params'
|
|
5
|
+
* `payload` field carries an OTLP/JSON `ExportXxxServiceRequest` value
|
|
6
|
+
* verbatim.
|
|
7
|
+
*
|
|
8
|
+
* @module channels-otlp/notifications
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=notifications.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notifications.js","sourceRoot":"","sources":["../../../../src/vendor/ahp/channels-otlp/notifications.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE;;;;;;;GAOG"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OTLP Channel State Types — Capability descriptor advertised by the agent
|
|
3
|
+
* host on the root channel so clients can discover the URIs of any
|
|
4
|
+
* OpenTelemetry signal channels (`ahp-otlp:` scheme) the host emits.
|
|
5
|
+
*
|
|
6
|
+
* @module channels-otlp/state
|
|
7
|
+
*/
|
|
8
|
+
import type { URI } from '../common/state.js';
|
|
9
|
+
/**
|
|
10
|
+
* OTLP telemetry channels the agent host emits.
|
|
11
|
+
*
|
|
12
|
+
* Each field, when present, is either a literal channel URI or an
|
|
13
|
+
* [RFC 6570](https://datatracker.ietf.org/doc/html/rfc6570) URI template
|
|
14
|
+
* a client expands and then subscribes to. Absent fields indicate the host
|
|
15
|
+
* does not emit that signal.
|
|
16
|
+
*
|
|
17
|
+
* Channel URIs use the `ahp-otlp:` scheme. The scheme identifies the
|
|
18
|
+
* protocol (OpenTelemetry over AHP) so clients can recognise the channel
|
|
19
|
+
* type by URI alone; the host is free to choose any authority/path that
|
|
20
|
+
* makes sense for its implementation. Clients MUST treat the URI as
|
|
21
|
+
* opaque (apart from expanding any well-known template variables defined
|
|
22
|
+
* below) and subscribe with the resulting concrete URI.
|
|
23
|
+
*
|
|
24
|
+
* Payloads delivered on these channels are OTLP/JSON values — see
|
|
25
|
+
* [opentelemetry-proto](https://github.com/open-telemetry/opentelemetry-proto)
|
|
26
|
+
* for the wire shapes (`ExportLogsServiceRequest`,
|
|
27
|
+
* `ExportTraceServiceRequest`, `ExportMetricsServiceRequest`).
|
|
28
|
+
*
|
|
29
|
+
* @category Telemetry
|
|
30
|
+
*/
|
|
31
|
+
export interface TelemetryCapabilities {
|
|
32
|
+
/**
|
|
33
|
+
* Channel URI (or RFC 6570 URI template) for OTLP log records
|
|
34
|
+
* (`otlp/exportLogs` notifications).
|
|
35
|
+
*
|
|
36
|
+
* The following template variables are defined by this protocol; any
|
|
37
|
+
* other variable name MUST be ignored by clients (there is no
|
|
38
|
+
* protocol-defined way to obtain values for unknown variables):
|
|
39
|
+
*
|
|
40
|
+
* | Variables in template | Meaning |
|
|
41
|
+
* | --------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
42
|
+
* | _(none)_ | The host does not support subscriber-side severity filtering. The template is itself a subscribable URI. |
|
|
43
|
+
* | `{level}` | Minimum OTLP severity to deliver. Expand to one of the [OTLP `SeverityNumber`](https://opentelemetry.io/docs/specs/otel/logs/data-model/#field-severitynumber) short names (case-insensitive): `trace`, `debug`, `info`, `warn`, `error`, `fatal`. The server delivers log records whose `severityNumber` falls in the corresponding band or above. |
|
|
44
|
+
*
|
|
45
|
+
* Hosts SHOULD honour the expanded `{level}`; clients MUST still filter
|
|
46
|
+
* defensively in case a host ignores the parameter. Hosts that do not
|
|
47
|
+
* advertise `{level}` deliver all severities.
|
|
48
|
+
*
|
|
49
|
+
* Future protocol versions MAY add new well-known variables (e.g. scope
|
|
50
|
+
* or attribute filters).
|
|
51
|
+
*/
|
|
52
|
+
logs?: URI;
|
|
53
|
+
/**
|
|
54
|
+
* Channel URI for OTLP spans (`otlp/exportTraces` notifications). No
|
|
55
|
+
* template variables are defined by this protocol version.
|
|
56
|
+
*/
|
|
57
|
+
traces?: URI;
|
|
58
|
+
/**
|
|
59
|
+
* Channel URI for OTLP metric data points (`otlp/exportMetrics`
|
|
60
|
+
* notifications). No template variables are defined by this protocol
|
|
61
|
+
* version.
|
|
62
|
+
*/
|
|
63
|
+
metrics?: URI;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/vendor/ahp/channels-otlp/state.ts"],"names":[],"mappings":"AACA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAI9C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,CAAC,EAAE,GAAG,CAAC;IACX;;;OAGG;IACH,MAAM,CAAC,EAAE,GAAG,CAAC;IACb;;;;OAIG;IACH,OAAO,CAAC,EAAE,GAAG,CAAC;CACf"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable -- vendored third-party code, see SOURCE.md */
|
|
2
|
+
/**
|
|
3
|
+
* OTLP Channel State Types — Capability descriptor advertised by the agent
|
|
4
|
+
* host on the root channel so clients can discover the URIs of any
|
|
5
|
+
* OpenTelemetry signal channels (`ahp-otlp:` scheme) the host emits.
|
|
6
|
+
*
|
|
7
|
+
* @module channels-otlp/state
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../src/vendor/ahp/channels-otlp/state.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE;;;;;;GAMG"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Root Channel Actions — Mutations of the `ahp-root://` state.
|
|
3
|
+
*
|
|
4
|
+
* @module channels-root/actions
|
|
5
|
+
*/
|
|
6
|
+
import type { AgentInfo } from './state.js';
|
|
7
|
+
import type { TerminalInfo } from '../channels-terminal/state.js';
|
|
8
|
+
import { ActionType } from '../common/actions.js';
|
|
9
|
+
/**
|
|
10
|
+
* Fired when available agent backends or their models change.
|
|
11
|
+
*
|
|
12
|
+
* @category Root Actions
|
|
13
|
+
* @version 1
|
|
14
|
+
*/
|
|
15
|
+
export interface RootAgentsChangedAction {
|
|
16
|
+
type: ActionType.RootAgentsChanged;
|
|
17
|
+
/** Updated agent list */
|
|
18
|
+
agents: AgentInfo[];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Fired when the number of active sessions changes.
|
|
22
|
+
*
|
|
23
|
+
* @category Root Actions
|
|
24
|
+
* @version 1
|
|
25
|
+
*/
|
|
26
|
+
export interface RootActiveSessionsChangedAction {
|
|
27
|
+
type: ActionType.RootActiveSessionsChanged;
|
|
28
|
+
/** Current count of active sessions */
|
|
29
|
+
activeSessions: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Fired when the list of known terminals changes.
|
|
33
|
+
*
|
|
34
|
+
* Full-replacement semantics: the `terminals` array replaces the previous
|
|
35
|
+
* `terminals` entirely.
|
|
36
|
+
*
|
|
37
|
+
* @category Root Actions
|
|
38
|
+
* @version 1
|
|
39
|
+
*/
|
|
40
|
+
export interface RootTerminalsChangedAction {
|
|
41
|
+
type: ActionType.RootTerminalsChanged;
|
|
42
|
+
/** Updated terminal list (full replacement) */
|
|
43
|
+
terminals: TerminalInfo[];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Fired when agent-host configuration values change.
|
|
47
|
+
*
|
|
48
|
+
* By default, the reducer merges the new values into `state.config.values`.
|
|
49
|
+
* Set `replace` to `true` to replace all values instead of merging.
|
|
50
|
+
*
|
|
51
|
+
* @category Root Actions
|
|
52
|
+
* @version 1
|
|
53
|
+
* @clientDispatchable
|
|
54
|
+
*/
|
|
55
|
+
export interface RootConfigChangedAction {
|
|
56
|
+
type: ActionType.RootConfigChanged;
|
|
57
|
+
/** Updated config values */
|
|
58
|
+
config: Record<string, unknown>;
|
|
59
|
+
/** When `true`, replaces all config values instead of merging */
|
|
60
|
+
replace?: boolean;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/vendor/ahp/channels-root/actions.ts"],"names":[],"mappings":"AACA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAIlD;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,UAAU,CAAC,iBAAiB,CAAC;IACnC,yBAAyB;IACzB,MAAM,EAAE,SAAS,EAAE,CAAC;CACrB;AAED;;;;;GAKG;AACH,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,UAAU,CAAC,yBAAyB,CAAC;IAC3C,uCAAuC;IACvC,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,UAAU,CAAC,oBAAoB,CAAC;IACtC,+CAA+C;IAC/C,SAAS,EAAE,YAAY,EAAE,CAAC;CAC3B;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,UAAU,CAAC,iBAAiB,CAAC;IACnC,4BAA4B;IAC5B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,iEAAiE;IACjE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../../src/vendor/ahp/channels-root/actions.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE;;;;GAIG"}
|