@codingame/monaco-vscode-xterm-common 30.0.1 → 31.0.1

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.
Files changed (30) hide show
  1. package/package.json +4 -4
  2. package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.d.ts +990 -0
  3. package/vscode/src/vs/platform/agentHost/common/state/protocol/actions.js +56 -0
  4. package/vscode/src/vs/platform/agentHost/common/state/protocol/notifications.d.ts +179 -0
  5. package/vscode/src/vs/platform/agentHost/common/state/protocol/notifications.js +16 -0
  6. package/vscode/src/vs/platform/agentHost/common/state/protocol/state.d.ts +1418 -0
  7. package/vscode/src/vs/platform/agentHost/common/state/protocol/state.js +118 -0
  8. package/vscode/src/vs/platform/agentHost/common/state/sessionState.d.ts +76 -0
  9. package/vscode/src/vs/platform/agentHost/common/state/sessionState.js +20 -0
  10. package/vscode/src/vs/workbench/contrib/terminal/browser/agentHostPty.d.ts +106 -0
  11. package/vscode/src/vs/workbench/contrib/terminal/browser/agentHostPty.js +276 -0
  12. package/vscode/src/vs/workbench/contrib/terminal/browser/agentHostTerminalService.d.ts +56 -0
  13. package/vscode/src/vs/workbench/contrib/terminal/browser/agentHostTerminalService.js +237 -0
  14. package/vscode/src/vs/workbench/contrib/terminal/browser/ahpTerminalCommandSource.d.ts +111 -0
  15. package/vscode/src/vs/workbench/contrib/terminal/browser/ahpTerminalCommandSource.js +138 -0
  16. package/vscode/src/vs/workbench/contrib/terminal/browser/environmentVariableInfo.js +5 -5
  17. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalActions.js +61 -61
  18. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.d.ts +9 -2
  19. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalInstance.js +79 -40
  20. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessManager.js +8 -4
  21. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTabsList.js +5 -5
  22. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalTooltip.js +3 -3
  23. package/vscode/src/vs/workbench/contrib/terminal/common/basePty.d.ts +38 -0
  24. package/vscode/src/vs/workbench/contrib/terminal/common/basePty.js +127 -0
  25. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollColorRegistry.js +3 -3
  26. package/vscode/src/vs/workbench/contrib/terminalContrib/stickyScroll/browser/terminalStickyScrollOverlay.js +3 -3
  27. package/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.d.ts +0 -38
  28. package/vscode/src/vs/workbench/contrib/terminal/common/terminalEnvironment.js +0 -321
  29. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.d.ts +0 -59
  30. package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChat.js +0 -70
@@ -0,0 +1,56 @@
1
+
2
+
3
+ var ActionType;
4
+ (function (ActionType) {
5
+ ActionType["RootAgentsChanged"] = "root/agentsChanged";
6
+ ActionType["RootActiveSessionsChanged"] = "root/activeSessionsChanged";
7
+ ActionType["SessionReady"] = "session/ready";
8
+ ActionType["SessionCreationFailed"] = "session/creationFailed";
9
+ ActionType["SessionTurnStarted"] = "session/turnStarted";
10
+ ActionType["SessionDelta"] = "session/delta";
11
+ ActionType["SessionResponsePart"] = "session/responsePart";
12
+ ActionType["SessionToolCallStart"] = "session/toolCallStart";
13
+ ActionType["SessionToolCallDelta"] = "session/toolCallDelta";
14
+ ActionType["SessionToolCallReady"] = "session/toolCallReady";
15
+ ActionType["SessionToolCallConfirmed"] = "session/toolCallConfirmed";
16
+ ActionType["SessionToolCallComplete"] = "session/toolCallComplete";
17
+ ActionType["SessionToolCallResultConfirmed"] = "session/toolCallResultConfirmed";
18
+ ActionType["SessionToolCallContentChanged"] = "session/toolCallContentChanged";
19
+ ActionType["SessionTurnComplete"] = "session/turnComplete";
20
+ ActionType["SessionTurnCancelled"] = "session/turnCancelled";
21
+ ActionType["SessionError"] = "session/error";
22
+ ActionType["SessionTitleChanged"] = "session/titleChanged";
23
+ ActionType["SessionUsage"] = "session/usage";
24
+ ActionType["SessionReasoning"] = "session/reasoning";
25
+ ActionType["SessionModelChanged"] = "session/modelChanged";
26
+ ActionType["SessionServerToolsChanged"] = "session/serverToolsChanged";
27
+ ActionType["SessionActiveClientChanged"] = "session/activeClientChanged";
28
+ ActionType["SessionActiveClientToolsChanged"] = "session/activeClientToolsChanged";
29
+ ActionType["SessionPendingMessageSet"] = "session/pendingMessageSet";
30
+ ActionType["SessionPendingMessageRemoved"] = "session/pendingMessageRemoved";
31
+ ActionType["SessionQueuedMessagesReordered"] = "session/queuedMessagesReordered";
32
+ ActionType["SessionInputRequested"] = "session/inputRequested";
33
+ ActionType["SessionInputAnswerChanged"] = "session/inputAnswerChanged";
34
+ ActionType["SessionInputCompleted"] = "session/inputCompleted";
35
+ ActionType["SessionCustomizationsChanged"] = "session/customizationsChanged";
36
+ ActionType["SessionCustomizationToggled"] = "session/customizationToggled";
37
+ ActionType["SessionTruncated"] = "session/truncated";
38
+ ActionType["SessionIsReadChanged"] = "session/isReadChanged";
39
+ ActionType["SessionIsDoneChanged"] = "session/isDoneChanged";
40
+ ActionType["SessionDiffsChanged"] = "session/diffsChanged";
41
+ ActionType["SessionConfigChanged"] = "session/configChanged";
42
+ ActionType["RootTerminalsChanged"] = "root/terminalsChanged";
43
+ ActionType["TerminalData"] = "terminal/data";
44
+ ActionType["TerminalInput"] = "terminal/input";
45
+ ActionType["TerminalResized"] = "terminal/resized";
46
+ ActionType["TerminalClaimed"] = "terminal/claimed";
47
+ ActionType["TerminalTitleChanged"] = "terminal/titleChanged";
48
+ ActionType["TerminalCwdChanged"] = "terminal/cwdChanged";
49
+ ActionType["TerminalExited"] = "terminal/exited";
50
+ ActionType["TerminalCleared"] = "terminal/cleared";
51
+ ActionType["TerminalCommandDetectionAvailable"] = "terminal/commandDetectionAvailable";
52
+ ActionType["TerminalCommandExecuted"] = "terminal/commandExecuted";
53
+ ActionType["TerminalCommandFinished"] = "terminal/commandFinished";
54
+ })(ActionType || (ActionType = {}));
55
+
56
+ export { ActionType };
@@ -0,0 +1,179 @@
1
+ import type { URI, ISessionSummary } from "./state.js";
2
+ /**
3
+ * Reason why authentication is required.
4
+ *
5
+ * @category Protocol Notifications
6
+ */
7
+ export declare enum AuthRequiredReason {
8
+ /** The client has not yet authenticated for the resource */
9
+ Required = "required",
10
+ /** A previously valid token has expired or been revoked */
11
+ Expired = "expired"
12
+ }
13
+ /**
14
+ * Discriminant values for all protocol notifications.
15
+ *
16
+ * @category Protocol Notifications
17
+ */
18
+ export declare enum NotificationType {
19
+ SessionAdded = "notify/sessionAdded",
20
+ SessionRemoved = "notify/sessionRemoved",
21
+ SessionSummaryChanged = "notify/sessionSummaryChanged",
22
+ AuthRequired = "notify/authRequired"
23
+ }
24
+ /**
25
+ * Broadcast to all connected clients when a new session is created.
26
+ *
27
+ * @category Protocol Notifications
28
+ * @version 1
29
+ * @example
30
+ * ```json
31
+ * {
32
+ * "jsonrpc": "2.0",
33
+ * "method": "notification",
34
+ * "params": {
35
+ * "notification": {
36
+ * "type": "notify/sessionAdded",
37
+ * "summary": {
38
+ * "resource": "copilot:/<uuid>",
39
+ * "provider": "copilot",
40
+ * "title": "New Session",
41
+ * "status": 1,
42
+ * "createdAt": 1710000000000,
43
+ * "modifiedAt": 1710000000000
44
+ * }
45
+ * }
46
+ * }
47
+ * }
48
+ * ```
49
+ */
50
+ export interface ISessionAddedNotification {
51
+ type: NotificationType.SessionAdded;
52
+ /** Summary of the new session */
53
+ summary: ISessionSummary;
54
+ }
55
+ /**
56
+ * Broadcast to all connected clients when a session is disposed.
57
+ *
58
+ * @category Protocol Notifications
59
+ * @version 1
60
+ * @example
61
+ * ```json
62
+ * {
63
+ * "jsonrpc": "2.0",
64
+ * "method": "notification",
65
+ * "params": {
66
+ * "notification": {
67
+ * "type": "notify/sessionRemoved",
68
+ * "session": "copilot:/<uuid>"
69
+ * }
70
+ * }
71
+ * }
72
+ * ```
73
+ */
74
+ export interface ISessionRemovedNotification {
75
+ type: NotificationType.SessionRemoved;
76
+ /** URI of the removed session */
77
+ session: URI;
78
+ }
79
+ /**
80
+ * Broadcast to all connected clients when an existing session's summary
81
+ * changes (title, status, `modifiedAt`, model, working directory, read/done
82
+ * state, or diff statistics).
83
+ *
84
+ * This notification lets clients that maintain a cached session list — for
85
+ * example, the result of a previous `listSessions()` call — stay in sync with
86
+ * in-flight sessions without having to subscribe to every session URI
87
+ * individually. It is complementary to, not a replacement for,
88
+ * `notify/sessionAdded` and `notify/sessionRemoved`: those signal lifecycle
89
+ * (creation/disposal), while this signals summary-level mutations on an
90
+ * already-known session.
91
+ *
92
+ * Semantics:
93
+ *
94
+ * - Only fields present in `changes` have new values; omitted fields are
95
+ * unchanged on the client's cached summary.
96
+ * - Identity fields (`resource`, `provider`, `createdAt`) never change and
97
+ * are not carried.
98
+ * - Like all protocol notifications, this is ephemeral: it is **not**
99
+ * replayed on reconnect. On reconnect, clients should re-fetch the full
100
+ * catalog via `listSessions()` as usual.
101
+ * - The server SHOULD emit this notification whenever any mutable field on
102
+ * {@link ISessionSummary | `ISessionSummary`} changes for a session the
103
+ * server has surfaced via `listSessions()` or `notify/sessionAdded`.
104
+ * Servers MAY coalesce or debounce updates for noisy fields (for example,
105
+ * `modifiedAt` bumps while a turn is streaming, or rapidly changing
106
+ * `diffs`) at their discretion.
107
+ * - Clients that have no cached entry for `session` MAY ignore the
108
+ * notification; it is not a substitute for `notify/sessionAdded`.
109
+ *
110
+ * @category Protocol Notifications
111
+ * @version 1
112
+ * @example
113
+ * ```json
114
+ * {
115
+ * "jsonrpc": "2.0",
116
+ * "method": "notification",
117
+ * "params": {
118
+ * "notification": {
119
+ * "type": "notify/sessionSummaryChanged",
120
+ * "session": "copilot:/<uuid>",
121
+ * "changes": {
122
+ * "title": "Refactor auth middleware",
123
+ * "status": 8,
124
+ * "modifiedAt": 1710000123456
125
+ * }
126
+ * }
127
+ * }
128
+ * }
129
+ * ```
130
+ */
131
+ export interface ISessionSummaryChangedNotification {
132
+ type: NotificationType.SessionSummaryChanged;
133
+ /** URI of the session whose summary changed */
134
+ session: URI;
135
+ /**
136
+ * Mutable summary fields that changed; omitted fields are unchanged.
137
+ *
138
+ * Identity fields (`resource`, `provider`, `createdAt`) never change and
139
+ * MUST be omitted by senders; receivers SHOULD ignore them if present.
140
+ */
141
+ changes: Partial<ISessionSummary>;
142
+ }
143
+ /**
144
+ * Sent by the server when a protected resource requires (re-)authentication.
145
+ *
146
+ * This notification is sent when a previously valid token expires or is
147
+ * revoked, or when the server discovers a new authentication requirement.
148
+ * Clients should obtain a fresh token and push it via the `authenticate`
149
+ * command.
150
+ *
151
+ * @category Protocol Notifications
152
+ * @version 1
153
+ * @see {@link /specification/authentication | Authentication}
154
+ * @example
155
+ * ```json
156
+ * {
157
+ * "jsonrpc": "2.0",
158
+ * "method": "notification",
159
+ * "params": {
160
+ * "notification": {
161
+ * "type": "notify/authRequired",
162
+ * "resource": "https://api.github.com",
163
+ * "reason": "expired"
164
+ * }
165
+ * }
166
+ * }
167
+ * ```
168
+ */
169
+ export interface IAuthRequiredNotification {
170
+ type: NotificationType.AuthRequired;
171
+ /** The protected resource identifier that requires authentication */
172
+ resource: string;
173
+ /** Why authentication is required */
174
+ reason?: AuthRequiredReason;
175
+ }
176
+ /**
177
+ * Discriminated union of all protocol notifications.
178
+ */
179
+ export type IProtocolNotification = ISessionAddedNotification | ISessionRemovedNotification | ISessionSummaryChangedNotification | IAuthRequiredNotification;
@@ -0,0 +1,16 @@
1
+
2
+
3
+ var AuthRequiredReason;
4
+ (function (AuthRequiredReason) {
5
+ AuthRequiredReason["Required"] = "required";
6
+ AuthRequiredReason["Expired"] = "expired";
7
+ })(AuthRequiredReason || (AuthRequiredReason = {}));
8
+ var NotificationType;
9
+ (function (NotificationType) {
10
+ NotificationType["SessionAdded"] = "notify/sessionAdded";
11
+ NotificationType["SessionRemoved"] = "notify/sessionRemoved";
12
+ NotificationType["SessionSummaryChanged"] = "notify/sessionSummaryChanged";
13
+ NotificationType["AuthRequired"] = "notify/authRequired";
14
+ })(NotificationType || (NotificationType = {}));
15
+
16
+ export { AuthRequiredReason, NotificationType };