@neosh/api 0.1.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/package.json +31 -0
- package/src/generated/AccountKind.ts +9 -0
- package/src/generated/Activity.ts +85 -0
- package/src/generated/AgentCommand.ts +18 -0
- package/src/generated/AgentState.ts +6 -0
- package/src/generated/AgentSummary.ts +46 -0
- package/src/generated/Anchor.ts +12 -0
- package/src/generated/Animation.ts +40 -0
- package/src/generated/ApiCall.ts +520 -0
- package/src/generated/ApiError.ts +15 -0
- package/src/generated/ApiOk.ts +110 -0
- package/src/generated/ApiResponse.ts +8 -0
- package/src/generated/AscpMessage.ts +73 -0
- package/src/generated/AttachmentInfo.ts +25 -0
- package/src/generated/Attrs.ts +10 -0
- package/src/generated/AuthRef.ts +14 -0
- package/src/generated/BackgroundTask.ts +23 -0
- package/src/generated/BlockStartKind.ts +8 -0
- package/src/generated/BorderStyle.ts +3 -0
- package/src/generated/BranchInfo.ts +19 -0
- package/src/generated/Brand.ts +31 -0
- package/src/generated/BufferId.ts +6 -0
- package/src/generated/BuildId.ts +24 -0
- package/src/generated/Capability.ts +10 -0
- package/src/generated/ClientMessage.ts +67 -0
- package/src/generated/Color.ts +10 -0
- package/src/generated/CommandEntry.ts +13 -0
- package/src/generated/CommitInfo.ts +10 -0
- package/src/generated/ContentBlock.ts +39 -0
- package/src/generated/Contribution.ts +16 -0
- package/src/generated/CostBasis.ts +6 -0
- package/src/generated/CredentialInfo.ts +30 -0
- package/src/generated/CredentialSource.ts +18 -0
- package/src/generated/CursorMotion.ts +21 -0
- package/src/generated/CursorShape.ts +6 -0
- package/src/generated/DetachReason.ts +5 -0
- package/src/generated/DiffTarget.ts +10 -0
- package/src/generated/Dock.ts +9 -0
- package/src/generated/DriverCommand.ts +20 -0
- package/src/generated/DriverKind.ts +8 -0
- package/src/generated/Extent.ts +20 -0
- package/src/generated/ExtmarkId.ts +6 -0
- package/src/generated/ExtmarkInfo.ts +43 -0
- package/src/generated/ExtmarkOpts.ts +33 -0
- package/src/generated/ExtmarkRender.ts +44 -0
- package/src/generated/FileChange.ts +18 -0
- package/src/generated/FileState.ts +15 -0
- package/src/generated/FloatConfig.ts +63 -0
- package/src/generated/FrameSet.ts +9 -0
- package/src/generated/Gravity.ts +11 -0
- package/src/generated/HighlightDef.ts +13 -0
- package/src/generated/HighlightEntry.ts +14 -0
- package/src/generated/HighlightSpec.ts +19 -0
- package/src/generated/Hint.ts +18 -0
- package/src/generated/HlTarget.ts +10 -0
- package/src/generated/HookInvocation.ts +14 -0
- package/src/generated/HookName.ts +17 -0
- package/src/generated/HookOutcome.ts +14 -0
- package/src/generated/HookPayload.ts +95 -0
- package/src/generated/InputEvent.ts +31 -0
- package/src/generated/InstanceConfig.ts +26 -0
- package/src/generated/InstanceId.ts +6 -0
- package/src/generated/KeyCode.ts +20 -0
- package/src/generated/KeyContext.ts +24 -0
- package/src/generated/KeyMods.ts +8 -0
- package/src/generated/KeyPress.ts +5 -0
- package/src/generated/KeymapEntry.ts +11 -0
- package/src/generated/KeymapScope.ts +20 -0
- package/src/generated/LineDraw.ts +15 -0
- package/src/generated/LineRender.ts +9 -0
- package/src/generated/LinkState.ts +16 -0
- package/src/generated/MarkDraw.ts +40 -0
- package/src/generated/Message.ts +5 -0
- package/src/generated/MessageLevel.ts +3 -0
- package/src/generated/Mode.ts +6 -0
- package/src/generated/ModelCapabilities.ts +14 -0
- package/src/generated/ModelEntry.ts +13 -0
- package/src/generated/ModelId.ts +6 -0
- package/src/generated/ModelInfo.ts +30 -0
- package/src/generated/ModelSelection.ts +15 -0
- package/src/generated/ModelTier.ts +14 -0
- package/src/generated/NamespaceId.ts +6 -0
- package/src/generated/NodeCapabilities.ts +30 -0
- package/src/generated/NodeId.ts +11 -0
- package/src/generated/NodeInfo.ts +24 -0
- package/src/generated/NoticeKind.ts +11 -0
- package/src/generated/Offset.ts +7 -0
- package/src/generated/OnDelete.ts +7 -0
- package/src/generated/OptionChoice.ts +8 -0
- package/src/generated/OptionEntry.ts +23 -0
- package/src/generated/OptionSelection.ts +4 -0
- package/src/generated/OptionSpec.ts +17 -0
- package/src/generated/OptionType.ts +16 -0
- package/src/generated/OptionValue.ts +13 -0
- package/src/generated/PermissionDecision.ts +6 -0
- package/src/generated/PermissionMode.ts +3 -0
- package/src/generated/PermissionOption.ts +21 -0
- package/src/generated/PermissionOptionKind.ts +13 -0
- package/src/generated/PlanState.ts +6 -0
- package/src/generated/PlanStep.ts +7 -0
- package/src/generated/PluginActivation.ts +10 -0
- package/src/generated/PluginEvent.ts +77 -0
- package/src/generated/PluginId.ts +6 -0
- package/src/generated/PluginInbound.ts +10 -0
- package/src/generated/PluginInfo.ts +19 -0
- package/src/generated/PluginManifest.ts +54 -0
- package/src/generated/PluginOutbound.ts +11 -0
- package/src/generated/PluginPermission.ts +18 -0
- package/src/generated/PluginProvides.ts +19 -0
- package/src/generated/PluginRequest.ts +11 -0
- package/src/generated/PluginResponse.ts +10 -0
- package/src/generated/PointInfo.ts +16 -0
- package/src/generated/Pricing.ts +12 -0
- package/src/generated/ProjectKey.ts +21 -0
- package/src/generated/ProviderEmit.ts +11 -0
- package/src/generated/ProviderEvent.ts +32 -0
- package/src/generated/ProviderOptionDescriptor.ts +38 -0
- package/src/generated/ProviderOptionValue.ts +3 -0
- package/src/generated/QuestionAnswer.ts +24 -0
- package/src/generated/QuestionOption.ts +17 -0
- package/src/generated/QuotaCredits.ts +23 -0
- package/src/generated/QuotaSample.ts +19 -0
- package/src/generated/QuotaSeverity.ts +11 -0
- package/src/generated/QuotaSnapshot.ts +34 -0
- package/src/generated/QuotaSource.ts +6 -0
- package/src/generated/QuotaWindow.ts +40 -0
- package/src/generated/Rect.ts +7 -0
- package/src/generated/Refusal.ts +10 -0
- package/src/generated/RemoteProject.ts +19 -0
- package/src/generated/RepoInfo.ts +23 -0
- package/src/generated/RepoStatus.ts +5 -0
- package/src/generated/RequestId.ts +6 -0
- package/src/generated/Role.ts +3 -0
- package/src/generated/RunningTurn.ts +12 -0
- package/src/generated/SelectShape.ts +6 -0
- package/src/generated/ServerMessage.ts +15 -0
- package/src/generated/SessionId.ts +6 -0
- package/src/generated/SessionInfo.ts +171 -0
- package/src/generated/StatusAlign.ts +3 -0
- package/src/generated/StatusSegment.ts +49 -0
- package/src/generated/StopReason.ts +16 -0
- package/src/generated/StreamEvent.ts +26 -0
- package/src/generated/StreamId.ts +6 -0
- package/src/generated/SurfaceCell.ts +22 -0
- package/src/generated/SurfaceId.ts +6 -0
- package/src/generated/SwarmAgent.ts +11 -0
- package/src/generated/SwarmNode.ts +24 -0
- package/src/generated/SwarmStranger.ts +21 -0
- package/src/generated/TaskId.ts +11 -0
- package/src/generated/TaskStatus.ts +11 -0
- package/src/generated/TextEdit.ts +19 -0
- package/src/generated/ToolCall.ts +13 -0
- package/src/generated/ToolCallId.ts +6 -0
- package/src/generated/ToolDef.ts +12 -0
- package/src/generated/ToolInvocation.ts +11 -0
- package/src/generated/ToolResult.ts +3 -0
- package/src/generated/ToolSource.ts +12 -0
- package/src/generated/TurnId.ts +6 -0
- package/src/generated/TurnRequest.ts +56 -0
- package/src/generated/UiEvent.ts +80 -0
- package/src/generated/Usage.ts +15 -0
- package/src/generated/UsageBucket.ts +32 -0
- package/src/generated/UsageHistory.ts +23 -0
- package/src/generated/UsageResolution.ts +6 -0
- package/src/generated/UsageScanSource.ts +24 -0
- package/src/generated/UsageScanStatus.ts +3 -0
- package/src/generated/UserQuestion.ts +34 -0
- package/src/generated/VarScope.ts +18 -0
- package/src/generated/ViewId.ts +16 -0
- package/src/generated/ViewInfo.ts +23 -0
- package/src/generated/Viewport.ts +18 -0
- package/src/generated/VirtChunk.ts +6 -0
- package/src/generated/VirtTextPos.ts +6 -0
- package/src/generated/WindowId.ts +6 -0
- package/src/generated/WindowInfo.ts +22 -0
- package/src/generated/WindowLayout.ts +28 -0
- package/src/generated/WorkspaceStatus.ts +28 -0
- package/src/generated/WorktreeInfo.ts +16 -0
- package/src/globals.d.ts +39 -0
- package/src/index.ts +2961 -0
- package/src/ui.ts +3279 -0
- package/tsconfig.json +17 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { AgentCommand } from "./AgentCommand";
|
|
3
|
+
import type { AgentSummary } from "./AgentSummary";
|
|
4
|
+
import type { NodeCapabilities } from "./NodeCapabilities";
|
|
5
|
+
import type { NodeInfo } from "./NodeInfo";
|
|
6
|
+
import type { Refusal } from "./Refusal";
|
|
7
|
+
import type { SessionId } from "./SessionId";
|
|
8
|
+
import type { StreamEvent } from "./StreamEvent";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Everything that goes over the wire.
|
|
12
|
+
*
|
|
13
|
+
* One enum rather than a request and a response type, because the connection is symmetric: after
|
|
14
|
+
* the handshake either side may send any of these, and a node is a peer rather than a client or a
|
|
15
|
+
* server. Which side dialled is an accident of who booted first.
|
|
16
|
+
*/
|
|
17
|
+
export type AscpMessage =
|
|
18
|
+
| {
|
|
19
|
+
"type": "hello";
|
|
20
|
+
version: number;
|
|
21
|
+
node: NodeInfo;
|
|
22
|
+
capabilities: NodeCapabilities;
|
|
23
|
+
/**
|
|
24
|
+
* Hex, 32 bytes.
|
|
25
|
+
*/
|
|
26
|
+
nonce: string;
|
|
27
|
+
}
|
|
28
|
+
| {
|
|
29
|
+
"type": "welcome";
|
|
30
|
+
version: number;
|
|
31
|
+
node: NodeInfo;
|
|
32
|
+
capabilities: NodeCapabilities;
|
|
33
|
+
/**
|
|
34
|
+
* Hex ed25519 signature over the dialler's `nonce`.
|
|
35
|
+
*/
|
|
36
|
+
signature: string;
|
|
37
|
+
nonce: string;
|
|
38
|
+
}
|
|
39
|
+
| { "type": "proof"; signature: string }
|
|
40
|
+
| {
|
|
41
|
+
"type": "presence";
|
|
42
|
+
node: NodeInfo;
|
|
43
|
+
capabilities: NodeCapabilities;
|
|
44
|
+
/**
|
|
45
|
+
* Monotonic per node, so a board can drop a message that overtook another.
|
|
46
|
+
*
|
|
47
|
+
* Not a timestamp: clocks on different machines disagree by more than the interval
|
|
48
|
+
* between two of these, and "the newer one wins" decided by wall clock is how a stale
|
|
49
|
+
* inventory permanently wins over a fresh one.
|
|
50
|
+
*/
|
|
51
|
+
seq: bigint;
|
|
52
|
+
}
|
|
53
|
+
| {
|
|
54
|
+
"type": "inventory";
|
|
55
|
+
seq: bigint;
|
|
56
|
+
full: boolean;
|
|
57
|
+
agents: Array<AgentSummary>;
|
|
58
|
+
gone: Array<SessionId>;
|
|
59
|
+
}
|
|
60
|
+
| { "type": "subscribe"; session: SessionId }
|
|
61
|
+
| { "type": "unsubscribe"; session: SessionId }
|
|
62
|
+
| { "type": "stream"; session: SessionId; event: StreamEvent }
|
|
63
|
+
| { "type": "command"; id: string; session: SessionId; command: AgentCommand }
|
|
64
|
+
| {
|
|
65
|
+
"type": "ack";
|
|
66
|
+
id: string;
|
|
67
|
+
/**
|
|
68
|
+
* The conversation a [`AgentCommand::NewSession`] created, when that is what was asked.
|
|
69
|
+
*/
|
|
70
|
+
session?: SessionId | null;
|
|
71
|
+
}
|
|
72
|
+
| { "type": "refused"; id: string; refusal: Refusal }
|
|
73
|
+
| { "type": "goodbye"; message?: string | null };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* An image the composer is holding, as far as anything outside the host is concerned.
|
|
5
|
+
*
|
|
6
|
+
* The size is in here because it is the part you cannot see for yourself: an attachment is a row
|
|
7
|
+
* that says "png", and whether that row is forty kilobytes or four megabytes is the whole of what
|
|
8
|
+
* you would want to know before sending it.
|
|
9
|
+
*/
|
|
10
|
+
export type AttachmentInfo = {
|
|
11
|
+
/**
|
|
12
|
+
* Where the bytes are, in the workspace's directory.
|
|
13
|
+
*/
|
|
14
|
+
path: string;
|
|
15
|
+
/**
|
|
16
|
+
* `image/png`, `image/jpeg`, `image/gif` or `image/webp`, read off the bytes.
|
|
17
|
+
*/
|
|
18
|
+
media_type: string;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
/**
|
|
22
|
+
* On disk, after any shrinking.
|
|
23
|
+
*/
|
|
24
|
+
bytes: number;
|
|
25
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* How a driver authenticates. Never carries a secret value — only where to find one.
|
|
5
|
+
*
|
|
6
|
+
* Secrets are resolved at request time from the environment or an OS keychain and are structurally
|
|
7
|
+
* excluded from every type that crosses a process boundary.
|
|
8
|
+
*/
|
|
9
|
+
export type AuthRef =
|
|
10
|
+
| { "kind": "env"; var: string }
|
|
11
|
+
| { "kind": "command"; argv: Array<string> }
|
|
12
|
+
| { "kind": "cli"; program: string; login?: string | null }
|
|
13
|
+
| { "kind": "inherited" }
|
|
14
|
+
| { "kind": "none" };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { TaskId } from "./TaskId";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* One thing still running that no turn is waiting for.
|
|
6
|
+
*
|
|
7
|
+
* A *shell that was backgrounded*, a sub-agent that was let go of, a monitor left watching
|
|
8
|
+
* something — whatever the driver started and no longer holds the turn open for. What it is
|
|
9
|
+
* doing is the driver's business; that it is still doing it is the reader's.
|
|
10
|
+
*/
|
|
11
|
+
export type BackgroundTask = {
|
|
12
|
+
id: TaskId;
|
|
13
|
+
/**
|
|
14
|
+
* One line, in the driver's own words. Empty when it would not say.
|
|
15
|
+
*/
|
|
16
|
+
title: string;
|
|
17
|
+
/**
|
|
18
|
+
* Which sort of thing it is, verbatim from the driver — `claude` says `local_bash`,
|
|
19
|
+
* `local_agent`, `local_workflow`, `monitor_ws`. Not translated: a name we invented for a
|
|
20
|
+
* kind we have never seen is a name that is wrong on the install that has one.
|
|
21
|
+
*/
|
|
22
|
+
kind?: string | null;
|
|
23
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { ToolCallId } from "./ToolCallId";
|
|
3
|
+
|
|
4
|
+
export type BlockStartKind = { "kind": "text" } | { "kind": "thinking" } | {
|
|
5
|
+
"kind": "tool_use";
|
|
6
|
+
id: ToolCallId;
|
|
7
|
+
name: string;
|
|
8
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
export type BranchInfo = {
|
|
4
|
+
name: string;
|
|
5
|
+
is_head: boolean;
|
|
6
|
+
is_remote: boolean;
|
|
7
|
+
upstream?: string | null;
|
|
8
|
+
ahead: number;
|
|
9
|
+
behind: number;
|
|
10
|
+
/**
|
|
11
|
+
* Subject of the tip commit, for a picker that wants a second line.
|
|
12
|
+
*/
|
|
13
|
+
subject?: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Committer date of the tip, seconds since the epoch. Sorting a branch list by anything else
|
|
16
|
+
* puts the branch you were just on somewhere in the middle.
|
|
17
|
+
*/
|
|
18
|
+
committed_at: number;
|
|
19
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* How a provider is drawn: a mark, and a highlight group carrying its colour.
|
|
5
|
+
*
|
|
6
|
+
* Three marks rather than one because a terminal is not one thing. A Nerd Font has a real brand
|
|
7
|
+
* glyph; a bare Unicode terminal has geometry; `ui.ascii_only` has a letter. Choosing between them
|
|
8
|
+
* is the frontend's job, like every other display decision — this type only says what the choices
|
|
9
|
+
* are.
|
|
10
|
+
*
|
|
11
|
+
* The colour is a **highlight group name**, never a colour value, so a theme can restyle every
|
|
12
|
+
* provider mark without anything here changing and a 16-colour terminal still gets something.
|
|
13
|
+
*/
|
|
14
|
+
export type Brand = {
|
|
15
|
+
/**
|
|
16
|
+
* Nerd Font glyph, used when `ui.nerd_font` is on.
|
|
17
|
+
*/
|
|
18
|
+
nerd?: string | null;
|
|
19
|
+
/**
|
|
20
|
+
* Plain Unicode mark. Works in any terminal with a modern font.
|
|
21
|
+
*/
|
|
22
|
+
mark: string;
|
|
23
|
+
/**
|
|
24
|
+
* One or two ASCII characters, for `ui.ascii_only`.
|
|
25
|
+
*/
|
|
26
|
+
ascii: string;
|
|
27
|
+
/**
|
|
28
|
+
* Highlight group carrying the brand colour, e.g. `Brand.Anthropic`.
|
|
29
|
+
*/
|
|
30
|
+
hl: string;
|
|
31
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Which build of neosh a process is running.
|
|
5
|
+
*
|
|
6
|
+
* [`PROTOCOL_VERSION`] answers "can these two talk at all", and a mismatch there is refused. This
|
|
7
|
+
* answers the question underneath it, which has no wrong answer and therefore cannot be refused:
|
|
8
|
+
* *are they the same program*. A workspace outlives the terminals that look at it and outlives
|
|
9
|
+
* the file it was loaded from, so the ordinary way to develop neosh — change a plugin, rebuild,
|
|
10
|
+
* run it — produces two processes speaking one protocol, where the older one is the only one
|
|
11
|
+
* whose code is actually doing anything. Nothing about that is visible on screen without this.
|
|
12
|
+
*/
|
|
13
|
+
export type BuildId = {
|
|
14
|
+
/**
|
|
15
|
+
* What this build calls itself. Equal across every build of one release, so never enough on
|
|
16
|
+
* its own — during development it is the same string for months.
|
|
17
|
+
*/
|
|
18
|
+
version: string;
|
|
19
|
+
/**
|
|
20
|
+
* When the executable was written, in seconds since the epoch. Zero when it could not be
|
|
21
|
+
* read, which is *unknown* rather than old — see [`BuildId::behind`].
|
|
22
|
+
*/
|
|
23
|
+
written: number;
|
|
24
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* What an action wants to do. Checked before any filesystem, network or exec effect.
|
|
5
|
+
*/
|
|
6
|
+
export type Capability =
|
|
7
|
+
| { "kind": "read_file"; path: string }
|
|
8
|
+
| { "kind": "write_file"; path: string }
|
|
9
|
+
| { "kind": "exec"; command: string }
|
|
10
|
+
| { "kind": "network"; host: string };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { BuildId } from "./BuildId";
|
|
3
|
+
import type { KeyPress } from "./KeyPress";
|
|
4
|
+
import type { WindowId } from "./WindowId";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* What a client says to the workspace it has connected to.
|
|
8
|
+
*
|
|
9
|
+
* # Why this is a second envelope rather than raw [`InputEvent`]s
|
|
10
|
+
*
|
|
11
|
+
* [`InputEvent`] is what a *view* does — a key, a resize, a command. It has nothing to say about
|
|
12
|
+
* the connection carrying it, and it should not: the same events come from a terminal that owns
|
|
13
|
+
* the process, where there is no connection to talk about. Attaching, detaching and being told
|
|
14
|
+
* somebody else took over are facts about the wire, so they live on the wire's own type and the
|
|
15
|
+
* view protocol stays exactly what it was.
|
|
16
|
+
*/
|
|
17
|
+
export type ClientMessage =
|
|
18
|
+
| {
|
|
19
|
+
"kind": "attach";
|
|
20
|
+
/**
|
|
21
|
+
* Refused rather than negotiated. A client built against a different protocol is almost
|
|
22
|
+
* always a neosh that was upgraded while its workspace kept running, and rendering a
|
|
23
|
+
* partial UI is a worse answer than saying so.
|
|
24
|
+
*/
|
|
25
|
+
protocol_version: number;
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
/**
|
|
29
|
+
* Which build the terminal is, so the workspace's answer can be compared against it.
|
|
30
|
+
*
|
|
31
|
+
* Defaulted, because a client older than this field is one that cannot be told apart
|
|
32
|
+
* from the workspace anyway, and refusing it would be a worse answer than saying nothing.
|
|
33
|
+
*/
|
|
34
|
+
build: BuildId;
|
|
35
|
+
}
|
|
36
|
+
| { "kind": "input" }
|
|
37
|
+
& (
|
|
38
|
+
| { "type": "ready"; width: number; height: number }
|
|
39
|
+
| { "type": "attached"; width: number; height: number }
|
|
40
|
+
| { "type": "detached" }
|
|
41
|
+
| { "type": "key"; key: KeyPress }
|
|
42
|
+
| { "type": "paste"; text: string }
|
|
43
|
+
| { "type": "resize"; width: number; height: number }
|
|
44
|
+
| {
|
|
45
|
+
"type": "viewport_changed";
|
|
46
|
+
win: WindowId;
|
|
47
|
+
width: number;
|
|
48
|
+
height: number;
|
|
49
|
+
top_line: number;
|
|
50
|
+
/**
|
|
51
|
+
* How many *buffer* rows are on the screen, which on a wrapping window is not the height.
|
|
52
|
+
*
|
|
53
|
+
* The frontend is the only thing that can answer it, and everything that pages by a
|
|
54
|
+
* screenful needs it: a transcript of paragraphs draws six buffer rows in thirty cells of
|
|
55
|
+
* height, so half a screen counted as `height / 2` is four screens of scrolling and a
|
|
56
|
+
* cursor that lands somewhere nobody asked for.
|
|
57
|
+
*/
|
|
58
|
+
rows: number;
|
|
59
|
+
}
|
|
60
|
+
| { "type": "command"; name: string; args: Array<string> }
|
|
61
|
+
| { "type": "repaint" }
|
|
62
|
+
| { "type": "focus"; on: boolean }
|
|
63
|
+
| { "type": "disconnected" }
|
|
64
|
+
)
|
|
65
|
+
| { "kind": "detach" }
|
|
66
|
+
| { "kind": "stop" }
|
|
67
|
+
| { "kind": "status" };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A color as *declared*. Down-conversion to 256 or 16 colors happens at the terminal boundary, so
|
|
5
|
+
* plugins never think about terminal capability.
|
|
6
|
+
*/
|
|
7
|
+
export type Color = { "kind": "rgb"; r: number; g: number; b: number } | {
|
|
8
|
+
"kind": "indexed";
|
|
9
|
+
i: number;
|
|
10
|
+
} | { "kind": "default" };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A registered command, as listed for a palette or `:help`-style listing.
|
|
5
|
+
*/
|
|
6
|
+
export type CommandEntry = {
|
|
7
|
+
name: string;
|
|
8
|
+
desc?: string | null;
|
|
9
|
+
/**
|
|
10
|
+
* Which plugin owns it, so a palette can group or attribute entries.
|
|
11
|
+
*/
|
|
12
|
+
plugin: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { ToolCallId } from "./ToolCallId";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A piece of a message.
|
|
6
|
+
*
|
|
7
|
+
* `Thinking` is a first-class variant rather than something folded into `Text`, because a UI must
|
|
8
|
+
* be able to render or collapse reasoning independently, and because thinking blocks have to be
|
|
9
|
+
* replayed back to the provider unchanged on the next turn.
|
|
10
|
+
*/
|
|
11
|
+
export type ContentBlock =
|
|
12
|
+
| { "type": "text"; text: string }
|
|
13
|
+
| {
|
|
14
|
+
"type": "thinking";
|
|
15
|
+
text: string;
|
|
16
|
+
/**
|
|
17
|
+
* Opaque provider signature. Must be echoed back verbatim or the provider rejects the turn.
|
|
18
|
+
*/
|
|
19
|
+
signature?: string | null;
|
|
20
|
+
}
|
|
21
|
+
| { "type": "tool_use"; id: ToolCallId; name: string; input: unknown }
|
|
22
|
+
| {
|
|
23
|
+
"type": "tool_result";
|
|
24
|
+
tool_use_id: ToolCallId;
|
|
25
|
+
content: string;
|
|
26
|
+
is_error: boolean;
|
|
27
|
+
}
|
|
28
|
+
| {
|
|
29
|
+
"type": "image";
|
|
30
|
+
/**
|
|
31
|
+
* Where the bytes are, absolute. Written by the workspace, read by a driver.
|
|
32
|
+
*/
|
|
33
|
+
path: string;
|
|
34
|
+
/**
|
|
35
|
+
* `image/png`, `image/jpeg`, `image/gif` or `image/webp` — the four every provider we
|
|
36
|
+
* target accepts. Read off the bytes rather than off the file name, which is a claim.
|
|
37
|
+
*/
|
|
38
|
+
media_type: string;
|
|
39
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* One item somebody put on a contribution point.
|
|
5
|
+
*/
|
|
6
|
+
export type Contribution = {
|
|
7
|
+
point: string;
|
|
8
|
+
id: string;
|
|
9
|
+
/**
|
|
10
|
+
* Which plugin contributed it. Stamped by the host, so a row in a panel can always be traced
|
|
11
|
+
* to the thing that put it there — and so `plugins.disabled` takes its rows with it.
|
|
12
|
+
*/
|
|
13
|
+
plugin: string;
|
|
14
|
+
item: unknown;
|
|
15
|
+
priority: number;
|
|
16
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { AccountKind } from "./AccountKind";
|
|
3
|
+
import type { Brand } from "./Brand";
|
|
4
|
+
import type { CredentialSource } from "./CredentialSource";
|
|
5
|
+
import type { DriverKind } from "./DriverKind";
|
|
6
|
+
import type { InstanceId } from "./InstanceId";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* An instance and the state of its credential. **Never carries the secret itself.**
|
|
10
|
+
*/
|
|
11
|
+
export type CredentialInfo = {
|
|
12
|
+
instance: InstanceId;
|
|
13
|
+
display_name: string;
|
|
14
|
+
driver: DriverKind;
|
|
15
|
+
source: CredentialSource;
|
|
16
|
+
/**
|
|
17
|
+
* A plan, a key, or something local. What a picker groups by.
|
|
18
|
+
*/
|
|
19
|
+
account: AccountKind;
|
|
20
|
+
brand?: Brand | null;
|
|
21
|
+
/**
|
|
22
|
+
* Whether this instance's driver is registered, so the entry is worth offering at all.
|
|
23
|
+
*/
|
|
24
|
+
driver_available: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether a key can be typed in for it. False for a CLI login or a local endpoint, where
|
|
27
|
+
* asking for one would be asking for something that does nothing.
|
|
28
|
+
*/
|
|
29
|
+
accepts_key: boolean;
|
|
30
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Where the key for an instance is coming from.
|
|
5
|
+
*
|
|
6
|
+
* Reported so a settings list can say *why* something works, which is the difference between "it
|
|
7
|
+
* is signed in" and "it is signed in and will still be tomorrow".
|
|
8
|
+
*/
|
|
9
|
+
export type CredentialSource =
|
|
10
|
+
| { "kind": "plan"; via: string }
|
|
11
|
+
| { "kind": "plan_missing"; program: string; hint?: string | null }
|
|
12
|
+
| { "kind": "env"; var: string }
|
|
13
|
+
| { "kind": "keychain" }
|
|
14
|
+
| { "kind": "session" }
|
|
15
|
+
| { "kind": "command" }
|
|
16
|
+
| { "kind": "inherited" }
|
|
17
|
+
| { "kind": "not_needed" }
|
|
18
|
+
| { "kind": "missing" };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Where the cursor goes.
|
|
5
|
+
*
|
|
6
|
+
* Resolved against the *buffer*, never the screen: the core does not know how wide a pane is or
|
|
7
|
+
* how many columns a character occupies. `Up` and `Down` therefore remember a grapheme-cluster
|
|
8
|
+
* index rather than a display column, which is the closest thing to "the same place" that can be
|
|
9
|
+
* computed without measuring anything.
|
|
10
|
+
*/
|
|
11
|
+
export type CursorMotion =
|
|
12
|
+
| "left"
|
|
13
|
+
| "right"
|
|
14
|
+
| "up"
|
|
15
|
+
| "down"
|
|
16
|
+
| "line_start"
|
|
17
|
+
| "line_end"
|
|
18
|
+
| "word_left"
|
|
19
|
+
| "word_right"
|
|
20
|
+
| "buf_start"
|
|
21
|
+
| "buf_end";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* What to run `git diff` against.
|
|
5
|
+
*/
|
|
6
|
+
export type DiffTarget = { "kind": "unstaged" } | { "kind": "staged" } | {
|
|
7
|
+
"kind": "range";
|
|
8
|
+
base: string;
|
|
9
|
+
head: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Where a non-floating window sits.
|
|
5
|
+
*
|
|
6
|
+
* Deliberately *not* an arbitrary split tree: agent UIs do not need one, and a split tree creates
|
|
7
|
+
* layout ambiguity that every plugin then has to reason about.
|
|
8
|
+
*/
|
|
9
|
+
export type Dock = "left" | "right" | "bottom" | "main";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A command the driver itself accepts, as opposed to one neosh implements.
|
|
5
|
+
*
|
|
6
|
+
* Reported rather than configured. Which commands exist depends on the install — `claude` counts
|
|
7
|
+
* project `.claude/commands/`, plugins and MCP prompts among them — so any list written here
|
|
8
|
+
* would be wrong on the first machine that had one of its own.
|
|
9
|
+
*/
|
|
10
|
+
export type DriverCommand = {
|
|
11
|
+
/**
|
|
12
|
+
* Without the leading slash.
|
|
13
|
+
*/
|
|
14
|
+
name: string;
|
|
15
|
+
description?: string | null;
|
|
16
|
+
/**
|
|
17
|
+
* What to type after it, when the driver says — `"[message]"`, `"<branch>"`.
|
|
18
|
+
*/
|
|
19
|
+
argument_hint?: string | null;
|
|
20
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Names a driver implementation, e.g. `anthropic`, `openai-compat`, `claude-cli`.
|
|
5
|
+
*
|
|
6
|
+
* Intentionally open. See the module docs.
|
|
7
|
+
*/
|
|
8
|
+
export type DriverKind = string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A size request along one axis. Resolved by the frontend against the real viewport.
|
|
5
|
+
*
|
|
6
|
+
* # An extent measures content, not the box drawn around it
|
|
7
|
+
*
|
|
8
|
+
* Every variant here answers the same question — *how much room does what I am putting in it
|
|
9
|
+
* need* — and the border is chrome the frontend adds afterwards. `Auto` could not mean anything
|
|
10
|
+
* else, since the content is all it has to measure; the others follow it so that swapping one for
|
|
11
|
+
* another does not silently resize what you can see.
|
|
12
|
+
*
|
|
13
|
+
* The alternative, where `Fixed` names the outer box, means every caller subtracts two from every
|
|
14
|
+
* number it computes, and the day one of them forgets, the last line of a list is simply not
|
|
15
|
+
* drawn — with no error, because a rectangle that small is perfectly valid.
|
|
16
|
+
*/
|
|
17
|
+
export type Extent = { "kind": "fixed"; n: number } | { "kind": "auto" } | {
|
|
18
|
+
"kind": "max";
|
|
19
|
+
n: number;
|
|
20
|
+
} | { "kind": "fill" };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { ExtmarkId } from "./ExtmarkId";
|
|
3
|
+
import type { NamespaceId } from "./NamespaceId";
|
|
4
|
+
import type { OnDelete } from "./OnDelete";
|
|
5
|
+
import type { VirtChunk } from "./VirtChunk";
|
|
6
|
+
import type { VirtTextPos } from "./VirtTextPos";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A mark's current position, for `get`.
|
|
10
|
+
*/
|
|
11
|
+
export type ExtmarkInfo = {
|
|
12
|
+
id: ExtmarkId;
|
|
13
|
+
ns: NamespaceId;
|
|
14
|
+
row: number;
|
|
15
|
+
col: number;
|
|
16
|
+
invalid: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* End column for a ranged highlight, as a UTF-8 byte offset. `None` means a point mark.
|
|
19
|
+
*/
|
|
20
|
+
end_col?: number | null;
|
|
21
|
+
hl_group?: string | null;
|
|
22
|
+
/**
|
|
23
|
+
* A background for the whole rendered row, not just the bytes the mark covers.
|
|
24
|
+
*
|
|
25
|
+
* The distinction is the difference between a diff line that is green and a diff line whose
|
|
26
|
+
* *text* is green: the band has to reach the right edge of the window to read as one line, and
|
|
27
|
+
* how wide the window is is not known where the row is written. So the group is carried and
|
|
28
|
+
* the frontend fills to its own edge — which is also what makes the band survive a resize.
|
|
29
|
+
*
|
|
30
|
+
* It sits *under* every ranged `hl_group` on the row rather than competing with them, so a
|
|
31
|
+
* syntax colour on top keeps its foreground and inherits this background. Nothing else in the
|
|
32
|
+
* mark vocabulary composes; this one has to, because "which line changed" and "what does this
|
|
33
|
+
* word mean" are two facts about the same character.
|
|
34
|
+
*/
|
|
35
|
+
line_hl_group?: string | null;
|
|
36
|
+
virt_text?: Array<VirtChunk>;
|
|
37
|
+
virt_text_pos: VirtTextPos;
|
|
38
|
+
on_delete: OnDelete;
|
|
39
|
+
/**
|
|
40
|
+
* Higher priority draws over lower when marks overlap.
|
|
41
|
+
*/
|
|
42
|
+
priority: number;
|
|
43
|
+
};
|