@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,40 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { OnDelete } from "./OnDelete";
|
|
3
|
+
import type { VirtChunk } from "./VirtChunk";
|
|
4
|
+
import type { VirtTextPos } from "./VirtTextPos";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* One mark of a [`LineDraw`], positioned on that line.
|
|
8
|
+
*/
|
|
9
|
+
export type MarkDraw = {
|
|
10
|
+
/**
|
|
11
|
+
* UTF-8 byte offset into the line's text, as every column on this wire is.
|
|
12
|
+
*/
|
|
13
|
+
col: number;
|
|
14
|
+
/**
|
|
15
|
+
* End column for a ranged highlight, as a UTF-8 byte offset. `None` means a point mark.
|
|
16
|
+
*/
|
|
17
|
+
end_col?: number | null;
|
|
18
|
+
hl_group?: string | null;
|
|
19
|
+
/**
|
|
20
|
+
* A background for the whole rendered row, not just the bytes the mark covers.
|
|
21
|
+
*
|
|
22
|
+
* The distinction is the difference between a diff line that is green and a diff line whose
|
|
23
|
+
* *text* is green: the band has to reach the right edge of the window to read as one line, and
|
|
24
|
+
* how wide the window is is not known where the row is written. So the group is carried and
|
|
25
|
+
* the frontend fills to its own edge — which is also what makes the band survive a resize.
|
|
26
|
+
*
|
|
27
|
+
* It sits *under* every ranged `hl_group` on the row rather than competing with them, so a
|
|
28
|
+
* syntax colour on top keeps its foreground and inherits this background. Nothing else in the
|
|
29
|
+
* mark vocabulary composes; this one has to, because "which line changed" and "what does this
|
|
30
|
+
* word mean" are two facts about the same character.
|
|
31
|
+
*/
|
|
32
|
+
line_hl_group?: string | null;
|
|
33
|
+
virt_text?: Array<VirtChunk>;
|
|
34
|
+
virt_text_pos: VirtTextPos;
|
|
35
|
+
on_delete: OnDelete;
|
|
36
|
+
/**
|
|
37
|
+
* Higher priority draws over lower when marks overlap.
|
|
38
|
+
*/
|
|
39
|
+
priority: number;
|
|
40
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { ContentBlock } from "./ContentBlock";
|
|
3
|
+
import type { Role } from "./Role";
|
|
4
|
+
|
|
5
|
+
export type Message = { role: Role; content: Array<ContentBlock> };
|
|
@@ -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
|
+
import type { ProviderOptionDescriptor } from "./ProviderOptionDescriptor";
|
|
3
|
+
|
|
4
|
+
export type ModelCapabilities = {
|
|
5
|
+
tools: boolean;
|
|
6
|
+
vision: boolean;
|
|
7
|
+
streaming: boolean;
|
|
8
|
+
thinking: boolean;
|
|
9
|
+
prompt_caching: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Knobs this specific model exposes. See [`ProviderOptionDescriptor`].
|
|
12
|
+
*/
|
|
13
|
+
option_descriptors?: Array<ProviderOptionDescriptor>;
|
|
14
|
+
};
|
|
@@ -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
|
+
import type { InstanceId } from "./InstanceId";
|
|
3
|
+
import type { ModelInfo } from "./ModelInfo";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A model together with the instance that serves it.
|
|
7
|
+
*
|
|
8
|
+
* The pairing is not decoration. A model id is unique per instance, not globally — two instances
|
|
9
|
+
* can both serve `gpt-4o`, and one of them may be a local endpoint. A picker that returned bare
|
|
10
|
+
* [`ModelInfo`] would have to guess the owner, and guessing wrong sends the conversation to the
|
|
11
|
+
* wrong endpoint with no visible error.
|
|
12
|
+
*/
|
|
13
|
+
export type ModelEntry = { instance: InstanceId; model: ModelInfo };
|
|
@@ -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 { ModelCapabilities } from "./ModelCapabilities";
|
|
3
|
+
import type { ModelId } from "./ModelId";
|
|
4
|
+
import type { ModelTier } from "./ModelTier";
|
|
5
|
+
import type { Pricing } from "./Pricing";
|
|
6
|
+
|
|
7
|
+
export type ModelInfo = {
|
|
8
|
+
id: ModelId;
|
|
9
|
+
display_name: string;
|
|
10
|
+
context_window?: number | null;
|
|
11
|
+
max_output_tokens?: number | null;
|
|
12
|
+
capabilities: ModelCapabilities;
|
|
13
|
+
pricing?: Pricing | null;
|
|
14
|
+
/**
|
|
15
|
+
* The lineup: `"opus"`, `"sonnet"`, `"gpt-5"`. Models sharing a family are the same product at
|
|
16
|
+
* different versions, which is what "the best one in that line" means.
|
|
17
|
+
*/
|
|
18
|
+
family?: string | null;
|
|
19
|
+
tier?: ModelTier | null;
|
|
20
|
+
/**
|
|
21
|
+
* Superseded, but still reachable. Folded away in a picker rather than removed, because the
|
|
22
|
+
* reason you go looking for last year's model is usually that you need to reproduce something.
|
|
23
|
+
*/
|
|
24
|
+
legacy: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* One line on what it is for. `"Most capable for complex work"`, not `"128k context"` — the
|
|
27
|
+
* numbers are already columns.
|
|
28
|
+
*/
|
|
29
|
+
tagline?: string | null;
|
|
30
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { InstanceId } from "./InstanceId";
|
|
3
|
+
import type { ModelId } from "./ModelId";
|
|
4
|
+
import type { OptionSelection } from "./OptionSelection";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A model, qualified by the instance that serves it, plus the option values in effect.
|
|
8
|
+
*
|
|
9
|
+
* Hot-swappable mid-session: the next turn uses whatever this says.
|
|
10
|
+
*/
|
|
11
|
+
export type ModelSelection = {
|
|
12
|
+
instance: InstanceId;
|
|
13
|
+
model: ModelId;
|
|
14
|
+
options?: Array<OptionSelection>;
|
|
15
|
+
};
|
|
@@ -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
|
+
* Where a model sits on the capability ladder.
|
|
5
|
+
*
|
|
6
|
+
* Three rungs, because every lineup worth switching between has three: Opus/Sonnet/Haiku,
|
|
7
|
+
* gpt-5/mini/nano, Pro/Flash/Flash-Lite. This is what makes "give me the next one down" a question
|
|
8
|
+
* with an answer, across catalogues that share no naming convention at all.
|
|
9
|
+
*
|
|
10
|
+
* It is a *statement about the model*, supplied by whoever describes it — a catalogue entry, a
|
|
11
|
+
* discovery response, a provider plugin. Nothing infers it from an id, because id conventions are
|
|
12
|
+
* exactly the thing that differs.
|
|
13
|
+
*/
|
|
14
|
+
export type ModelTier = "fast" | "balanced" | "frontier";
|
|
@@ -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 { RemoteProject } from "./RemoteProject";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* What a node is willing to have done to it.
|
|
6
|
+
*
|
|
7
|
+
* Sent in the handshake, so a board can grey out a verb rather than offering one that will be
|
|
8
|
+
* refused. Advisory to the *caller*; the owner enforces regardless, because a capability list is
|
|
9
|
+
* something the other side could have lied about.
|
|
10
|
+
*/
|
|
11
|
+
export type NodeCapabilities = {
|
|
12
|
+
/**
|
|
13
|
+
* Whether [`AgentCommand::Send`] and friends are accepted at all. `false` makes this node
|
|
14
|
+
* visible but read-only — a perfectly reasonable thing for a build machine to be.
|
|
15
|
+
*/
|
|
16
|
+
accepts_commands: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Whether [`AgentCommand::Approve`] is accepted. Separate from `accepts_commands` because it
|
|
19
|
+
* is a different kind of trust: steering an agent is a message, approving one is a write.
|
|
20
|
+
*/
|
|
21
|
+
accepts_approvals: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Whether [`AscpMessage::Subscribe`] will produce anything.
|
|
24
|
+
*/
|
|
25
|
+
streams: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The checkouts this node has, for starting something on it.
|
|
28
|
+
*/
|
|
29
|
+
projects: Array<RemoteProject>;
|
|
30
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
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 node's public identity: the hex ed25519 public key.
|
|
5
|
+
*
|
|
6
|
+
* The key *is* the name. There is no registry, no certificate authority and nothing to revoke
|
|
7
|
+
* centrally — you authorise a peer by putting its id in your own list, and you de-authorise it by
|
|
8
|
+
* taking it out. For a workspace that is one person's several computers, a CA would be
|
|
9
|
+
* infrastructure to run in exchange for nothing.
|
|
10
|
+
*/
|
|
11
|
+
export type NodeId = string;
|
|
@@ -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
|
+
import type { NodeId } from "./NodeId";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* What a node says about itself.
|
|
6
|
+
*/
|
|
7
|
+
export type NodeInfo = {
|
|
8
|
+
id: NodeId;
|
|
9
|
+
/**
|
|
10
|
+
* What to call it on screen — the hostname unless the user chose something.
|
|
11
|
+
*
|
|
12
|
+
* Advisory, and not unique: two machines may both be called `laptop`. Anything that has to be
|
|
13
|
+
* right uses [`NodeId`].
|
|
14
|
+
*/
|
|
15
|
+
name: string;
|
|
16
|
+
/**
|
|
17
|
+
* `macos`, `linux`, `windows`. For the icon and for "why is that one behaving differently".
|
|
18
|
+
*/
|
|
19
|
+
os: string;
|
|
20
|
+
/**
|
|
21
|
+
* The neosh version, so a board can say which machine is behind.
|
|
22
|
+
*/
|
|
23
|
+
version: string;
|
|
24
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
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 kind of thing a message is, which is a different question from how bad it is.
|
|
5
|
+
*
|
|
6
|
+
* [`MessageLevel`] says how bad and therefore what colour; this says whether you asked for it,
|
|
7
|
+
* and therefore where it goes and how long it lives. Every message used to be the same kind of
|
|
8
|
+
* thing — a row in a six-second stack — so a pull's progress, the echo of a key you just pressed
|
|
9
|
+
* and a node dropping off the swarm were one channel with one lifetime.
|
|
10
|
+
*/
|
|
11
|
+
export type NoticeKind = "reply" | "progress" | "alert";
|
|
@@ -0,0 +1,7 @@
|
|
|
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 cell offset from the anchor point. May be negative to place a float above or left of its
|
|
5
|
+
* anchor.
|
|
6
|
+
*/
|
|
7
|
+
export type Offset = { row: number; col: number };
|
|
@@ -0,0 +1,7 @@
|
|
|
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 happens to a mark when the text it sits on is replaced by content that has no
|
|
5
|
+
* corresponding line.
|
|
6
|
+
*/
|
|
7
|
+
export type OnDelete = "clamp" | "invalidate";
|
|
@@ -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 { OptionType } from "./OptionType";
|
|
3
|
+
import type { OptionValue } from "./OptionValue";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A declared option with its current value, as listed.
|
|
7
|
+
*/
|
|
8
|
+
export type OptionEntry = {
|
|
9
|
+
name: string;
|
|
10
|
+
type: OptionType;
|
|
11
|
+
value: OptionValue;
|
|
12
|
+
default: OptionValue;
|
|
13
|
+
description?: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Who declared it. `neosh` for built-ins; otherwise the plugin id.
|
|
16
|
+
*/
|
|
17
|
+
owner: string;
|
|
18
|
+
/**
|
|
19
|
+
* False while the option still holds its default, so a settings UI can show what the user
|
|
20
|
+
* actually changed and a `:set` persister knows what is worth writing down.
|
|
21
|
+
*/
|
|
22
|
+
modified: boolean;
|
|
23
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { OptionType } from "./OptionType";
|
|
3
|
+
import type { OptionValue } from "./OptionValue";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* What a declaration says.
|
|
7
|
+
*/
|
|
8
|
+
export type OptionSpec = {
|
|
9
|
+
/**
|
|
10
|
+
* Dotted, lowercase: `agent.model`, `myplugin.enabled`. Validated at declaration so the name
|
|
11
|
+
* space stays greppable and a future `:set` grammar has something regular to parse.
|
|
12
|
+
*/
|
|
13
|
+
name: string;
|
|
14
|
+
type: OptionType;
|
|
15
|
+
default: OptionValue;
|
|
16
|
+
description?: string | null;
|
|
17
|
+
};
|
|
@@ -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
|
+
* What an option accepts.
|
|
5
|
+
*
|
|
6
|
+
* The constraint travels with the declaration rather than living in the setter, so a settings UI
|
|
7
|
+
* can render a correct control for an option it has never heard of.
|
|
8
|
+
*/
|
|
9
|
+
export type OptionType =
|
|
10
|
+
| { "type": "bool" }
|
|
11
|
+
| { "type": "int"; min?: number | null; max?: number | null }
|
|
12
|
+
| { "type": "float" }
|
|
13
|
+
| { "type": "str" }
|
|
14
|
+
| { "type": "enum"; values: Array<string> }
|
|
15
|
+
| { "type": "list" }
|
|
16
|
+
| { "type": "json" };
|
|
@@ -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
|
+
* An option's value.
|
|
5
|
+
*
|
|
6
|
+
* Untagged on purpose: a config file says `border = "rounded"`, not
|
|
7
|
+
* `border = { kind = "str", value = "rounded" }`. Deserialization tries the variants in
|
|
8
|
+
* declaration order, so `true` is a `Bool` and `3` is an `Int` rather than both landing in
|
|
9
|
+
* `Json`. Type checking happens against the declaration, which is where the type actually is.
|
|
10
|
+
*/
|
|
11
|
+
export type OptionValue = boolean | number | number | string | Array<string> | {
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
};
|
|
@@ -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
|
+
import type { PermissionOptionKind } from "./PermissionOptionKind";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* One answer a permission request offers.
|
|
6
|
+
*
|
|
7
|
+
* Agent drivers word their own options — "Yes, and don't ask again for `cargo test`" is a
|
|
8
|
+
* sentence only the agent that ran it can write. neosh's own tools offer none, and the prompt
|
|
9
|
+
* falls back to yes and no.
|
|
10
|
+
*/
|
|
11
|
+
export type PermissionOption = {
|
|
12
|
+
/**
|
|
13
|
+
* Opaque, and handed straight back to whoever asked. Never parsed.
|
|
14
|
+
*/
|
|
15
|
+
id: string;
|
|
16
|
+
/**
|
|
17
|
+
* What the option says, in the asker's own words.
|
|
18
|
+
*/
|
|
19
|
+
label: string;
|
|
20
|
+
kind: PermissionOptionKind;
|
|
21
|
+
};
|
|
@@ -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
|
+
* What taking an option would mean, independent of how it is worded.
|
|
5
|
+
*
|
|
6
|
+
* The wording is the agent's and is shown; this is what lets a UI sort the safe answer to the top,
|
|
7
|
+
* colour the dangerous one, and pick a default without reading English.
|
|
8
|
+
*/
|
|
9
|
+
export type PermissionOptionKind =
|
|
10
|
+
| "allow_once"
|
|
11
|
+
| "allow_always"
|
|
12
|
+
| "reject_once"
|
|
13
|
+
| "reject_always";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { PlanState } from "./PlanState";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* One line of the agent's own checklist.
|
|
6
|
+
*/
|
|
7
|
+
export type PlanStep = { text: string; state: PlanState };
|
|
@@ -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
|
+
* The triggers that wake a lazily loaded plugin. See [`PluginManifest::activation`].
|
|
5
|
+
*/
|
|
6
|
+
export type PluginActivation = {
|
|
7
|
+
on_command?: Array<string>;
|
|
8
|
+
on_event?: Array<string>;
|
|
9
|
+
on_kind?: Array<string>;
|
|
10
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { Activity } from "./Activity";
|
|
3
|
+
import type { BufferId } from "./BufferId";
|
|
4
|
+
import type { HookName } from "./HookName";
|
|
5
|
+
import type { HookPayload } from "./HookPayload";
|
|
6
|
+
import type { KeyContext } from "./KeyContext";
|
|
7
|
+
import type { ModelSelection } from "./ModelSelection";
|
|
8
|
+
import type { NodeId } from "./NodeId";
|
|
9
|
+
import type { OptionValue } from "./OptionValue";
|
|
10
|
+
import type { QuotaSnapshot } from "./QuotaSnapshot";
|
|
11
|
+
import type { SessionId } from "./SessionId";
|
|
12
|
+
import type { StopReason } from "./StopReason";
|
|
13
|
+
import type { StreamEvent } from "./StreamEvent";
|
|
14
|
+
import type { StreamId } from "./StreamId";
|
|
15
|
+
import type { ToolCall } from "./ToolCall";
|
|
16
|
+
import type { ToolResult } from "./ToolResult";
|
|
17
|
+
import type { TurnId } from "./TurnId";
|
|
18
|
+
import type { Usage } from "./Usage";
|
|
19
|
+
import type { VarScope } from "./VarScope";
|
|
20
|
+
import type { ViewId } from "./ViewId";
|
|
21
|
+
import type { WindowId } from "./WindowId";
|
|
22
|
+
|
|
23
|
+
export type PluginEvent =
|
|
24
|
+
| {
|
|
25
|
+
"type": "command_invoked";
|
|
26
|
+
name: string;
|
|
27
|
+
args?: Array<string>;
|
|
28
|
+
key?: KeyContext | null;
|
|
29
|
+
}
|
|
30
|
+
| { "type": "view_attached"; view: ViewId }
|
|
31
|
+
| { "type": "view_closed"; view: ViewId }
|
|
32
|
+
| {
|
|
33
|
+
"type": "buffer_changed";
|
|
34
|
+
buf: BufferId;
|
|
35
|
+
start: number;
|
|
36
|
+
old_end: number;
|
|
37
|
+
new_end: number;
|
|
38
|
+
}
|
|
39
|
+
| { "type": "turn_started"; session: SessionId; turn: TurnId }
|
|
40
|
+
| { "type": "token"; session: SessionId; turn: TurnId; text: string }
|
|
41
|
+
| { "type": "thinking_token"; session: SessionId; turn: TurnId; text: string }
|
|
42
|
+
| { "type": "tool_started"; session: SessionId; turn: TurnId; call: ToolCall }
|
|
43
|
+
| {
|
|
44
|
+
"type": "tool_finished";
|
|
45
|
+
session: SessionId;
|
|
46
|
+
turn: TurnId;
|
|
47
|
+
call: ToolCall;
|
|
48
|
+
result: ToolResult;
|
|
49
|
+
}
|
|
50
|
+
| {
|
|
51
|
+
"type": "turn_ended";
|
|
52
|
+
session: SessionId;
|
|
53
|
+
turn: TurnId;
|
|
54
|
+
stop_reason: StopReason;
|
|
55
|
+
usage: Usage;
|
|
56
|
+
}
|
|
57
|
+
| { "type": "hook_observed"; hook: HookName; payload: HookPayload }
|
|
58
|
+
| { "type": "focus_changed"; win?: WindowId | null }
|
|
59
|
+
| { "type": "option_changed"; name: string; value: OptionValue }
|
|
60
|
+
| { "type": "session_changed"; session: SessionId; view: ViewId }
|
|
61
|
+
| { "type": "selection_changed"; selection: ModelSelection }
|
|
62
|
+
| { "type": "activity"; session: SessionId; turn: TurnId; activity: Activity }
|
|
63
|
+
| { "type": "composer_changed"; text: string }
|
|
64
|
+
| { "type": "event"; name: string; data?: unknown; from: string }
|
|
65
|
+
| { "type": "var_changed"; scope: VarScope; key: string; value?: unknown }
|
|
66
|
+
| { "type": "highlight_changed"; names: Array<string> }
|
|
67
|
+
| { "type": "contributions_changed"; point: string }
|
|
68
|
+
| { "type": "swarm_changed" }
|
|
69
|
+
| {
|
|
70
|
+
"type": "swarm_stream";
|
|
71
|
+
node: NodeId;
|
|
72
|
+
session: SessionId;
|
|
73
|
+
event: StreamEvent;
|
|
74
|
+
}
|
|
75
|
+
| { "type": "quota"; snapshot: QuotaSnapshot }
|
|
76
|
+
| { "type": "provider_cancel"; stream: StreamId }
|
|
77
|
+
| { "type": "shutdown" };
|
|
@@ -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
|
+
import type { ApiResponse } from "./ApiResponse";
|
|
3
|
+
import type { PluginEvent } from "./PluginEvent";
|
|
4
|
+
import type { PluginRequest } from "./PluginRequest";
|
|
5
|
+
import type { RequestId } from "./RequestId";
|
|
6
|
+
|
|
7
|
+
export type PluginInbound =
|
|
8
|
+
| { "type": "response"; id: RequestId; response: ApiResponse }
|
|
9
|
+
| { "type": "request"; id: RequestId; request: PluginRequest }
|
|
10
|
+
| { "type": "event"; event: PluginEvent };
|
|
@@ -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
|
+
import type { PluginManifest } from "./PluginManifest";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* One plugin as [`ApiCall::PluginList`] reports it.
|
|
6
|
+
*/
|
|
7
|
+
export type PluginInfo = {
|
|
8
|
+
name: string;
|
|
9
|
+
manifest: PluginManifest;
|
|
10
|
+
/**
|
|
11
|
+
* Ships inside the binary.
|
|
12
|
+
*/
|
|
13
|
+
bundled: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* `loaded`, `held` (lazy, waiting for a trigger), or `failed` with the reason in `error`.
|
|
16
|
+
*/
|
|
17
|
+
state: string;
|
|
18
|
+
error?: string | null;
|
|
19
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { PluginActivation } from "./PluginActivation";
|
|
3
|
+
import type { PluginPermission } from "./PluginPermission";
|
|
4
|
+
import type { PluginProvides } from "./PluginProvides";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* `plugin.toml`, next to the plugin's entry point.
|
|
8
|
+
*/
|
|
9
|
+
export type PluginManifest = {
|
|
10
|
+
name: string;
|
|
11
|
+
version: string;
|
|
12
|
+
/**
|
|
13
|
+
* Entry module, relative to the plugin directory.
|
|
14
|
+
*/
|
|
15
|
+
entry: string;
|
|
16
|
+
description?: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Protocol major this plugin was built against. Checked at load.
|
|
19
|
+
*/
|
|
20
|
+
api_version: number;
|
|
21
|
+
permissions?: Array<PluginPermission>;
|
|
22
|
+
/**
|
|
23
|
+
* Plugins this one cannot run without.
|
|
24
|
+
*
|
|
25
|
+
* Each is loaded and activated first, `import ... from "plugin:<name>"` resolves to its entry
|
|
26
|
+
* module, and a name nothing provides is an error with the name in it rather than an
|
|
27
|
+
* `undefined` three calls later. A cycle is reported and neither side loads. Load order used
|
|
28
|
+
* to be a filesystem sort that the code leaned on; this is the same order, said out loud.
|
|
29
|
+
*/
|
|
30
|
+
requires?: Array<string>;
|
|
31
|
+
/**
|
|
32
|
+
* Plugins to load after if they are present, without needing them.
|
|
33
|
+
*
|
|
34
|
+
* For "my section goes under theirs" and "my default key should lose to theirs": a soft
|
|
35
|
+
* ordering, satisfied by an absent plugin, that does not make the other plugin a dependency.
|
|
36
|
+
*/
|
|
37
|
+
after?: Array<string>;
|
|
38
|
+
/**
|
|
39
|
+
* What this plugin offers for others to build on — the contribution points it reads, the
|
|
40
|
+
* buffer kinds it publishes, the shared vars it writes. Declared so they can be listed, and
|
|
41
|
+
* so a contribution to a point nobody reads can be reported instead of silently ignored.
|
|
42
|
+
*/
|
|
43
|
+
provides?: PluginProvides;
|
|
44
|
+
/**
|
|
45
|
+
* When to load, for a plugin that need not be there from the start.
|
|
46
|
+
*
|
|
47
|
+
* Absent means at startup, as every plugin always has. Present, the plugin is held until one
|
|
48
|
+
* of its triggers fires: one of `on_command` is run (the name is registered on its behalf
|
|
49
|
+
* and the press replayed once it is up), one of `on_event` is emitted, or a buffer of one of
|
|
50
|
+
* `on_kind` appears. lazy.nvim's `cmd`/`event`/`ft`. A plugin something eager `requires` is
|
|
51
|
+
* loaded eagerly whatever this says.
|
|
52
|
+
*/
|
|
53
|
+
activation?: PluginActivation;
|
|
54
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { ApiCall } from "./ApiCall";
|
|
3
|
+
import type { PluginResponse } from "./PluginResponse";
|
|
4
|
+
import type { RequestId } from "./RequestId";
|
|
5
|
+
import type { ViewId } from "./ViewId";
|
|
6
|
+
|
|
7
|
+
export type PluginOutbound =
|
|
8
|
+
| { "type": "ready"; protocol_version: number }
|
|
9
|
+
| { "type": "call"; id: RequestId; call: ApiCall; view?: ViewId | null }
|
|
10
|
+
| { "type": "notify"; call: ApiCall; view?: ViewId | null }
|
|
11
|
+
| { "type": "response"; id: RequestId; response: PluginResponse };
|
|
@@ -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
|
+
* What a plugin declares it needs.
|
|
5
|
+
*
|
|
6
|
+
* Phase 0 records and reports these; enforcement lands with the sandboxing work. Declaring them
|
|
7
|
+
* now means the manifest format does not change when enforcement arrives.
|
|
8
|
+
*/
|
|
9
|
+
export type PluginPermission =
|
|
10
|
+
| "tools"
|
|
11
|
+
| "hooks_blocking"
|
|
12
|
+
| "providers"
|
|
13
|
+
| "fs_read"
|
|
14
|
+
| "fs_write"
|
|
15
|
+
| "network"
|
|
16
|
+
| "raw_cells"
|
|
17
|
+
| "vcs_write"
|
|
18
|
+
| "notify";
|