@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,32 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { CostBasis } from "./CostBasis";
|
|
3
|
+
import type { InstanceId } from "./InstanceId";
|
|
4
|
+
import type { Usage } from "./Usage";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* One `(bucket, instance, model)` cell of history.
|
|
8
|
+
*
|
|
9
|
+
* The cost is what these tokens *would* have cost at API rates. It is not money spent: a
|
|
10
|
+
* subscription bills separately and a plan turn costs nothing extra at all. It is here because it
|
|
11
|
+
* is the only common unit that lets Opus and Haiku appear on one axis.
|
|
12
|
+
*/
|
|
13
|
+
export type UsageBucket = {
|
|
14
|
+
/**
|
|
15
|
+
* Unix seconds at the start of the bucket, in the zone the request asked for.
|
|
16
|
+
*/
|
|
17
|
+
start: number;
|
|
18
|
+
instance: InstanceId;
|
|
19
|
+
model: string;
|
|
20
|
+
usage: Usage;
|
|
21
|
+
cost_usd: number;
|
|
22
|
+
/**
|
|
23
|
+
* What the cached input would have cost at full input rates, minus what it did cost. The
|
|
24
|
+
* difference between a conversation that is expensive and one that only looks it.
|
|
25
|
+
*/
|
|
26
|
+
cache_savings_usd: number;
|
|
27
|
+
basis: CostBasis;
|
|
28
|
+
/**
|
|
29
|
+
* Distinct assistant responses, after de-duplication.
|
|
30
|
+
*/
|
|
31
|
+
requests: number;
|
|
32
|
+
};
|
|
@@ -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 { UsageBucket } from "./UsageBucket";
|
|
3
|
+
import type { UsageResolution } from "./UsageResolution";
|
|
4
|
+
import type { UsageScanSource } from "./UsageScanSource";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A whole answer to "where did the week go".
|
|
8
|
+
*/
|
|
9
|
+
export type UsageHistory = {
|
|
10
|
+
buckets: Array<UsageBucket>;
|
|
11
|
+
sources: Array<UsageScanSource>;
|
|
12
|
+
resolution: UsageResolution;
|
|
13
|
+
since: number;
|
|
14
|
+
until: number;
|
|
15
|
+
/**
|
|
16
|
+
* Whether every model that appeared had a price. Drawn as a caveat on the cost axis.
|
|
17
|
+
*/
|
|
18
|
+
fully_priced: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Wall-clock cost of the scan, so a slow answer can be explained rather than guessed at.
|
|
21
|
+
*/
|
|
22
|
+
scanned_ms: number;
|
|
23
|
+
};
|
|
@@ -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 { InstanceId } from "./InstanceId";
|
|
3
|
+
import type { UsageScanStatus } from "./UsageScanStatus";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* What one transcript directory yielded, so a client can say what it could not read.
|
|
7
|
+
*
|
|
8
|
+
* A history with a hole in it and a history that is genuinely empty look identical in the buckets,
|
|
9
|
+
* and the difference matters: one means "you did not use it", the other means "we could not tell".
|
|
10
|
+
*/
|
|
11
|
+
export type UsageScanSource = {
|
|
12
|
+
instance: InstanceId;
|
|
13
|
+
/**
|
|
14
|
+
* The directory that was read, for a message that names a real path.
|
|
15
|
+
*/
|
|
16
|
+
path: string;
|
|
17
|
+
status: UsageScanStatus;
|
|
18
|
+
files: number;
|
|
19
|
+
/**
|
|
20
|
+
* Lines that parsed but carried nothing recognisable.
|
|
21
|
+
*/
|
|
22
|
+
malformed: number;
|
|
23
|
+
message?: string | null;
|
|
24
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { QuestionOption } from "./QuestionOption";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* One thing an agent wants to know before it carries on, and the answers it suggests.
|
|
6
|
+
*
|
|
7
|
+
* Deliberately not a [`PermissionOption`] list. A permission request asks *may this happen* and
|
|
8
|
+
* every answer to it is a yes or a no; this asks *which of these* — several times over, sometimes
|
|
9
|
+
* with more than one answer each, sometimes with an answer nobody listed. Squeezing it into the
|
|
10
|
+
* permission family would mean a prompt whose "options" are not decisions about the thing being
|
|
11
|
+
* asked, and a policy layer that could answer `full access` to a question about which database to
|
|
12
|
+
* use.
|
|
13
|
+
*/
|
|
14
|
+
export type UserQuestion = {
|
|
15
|
+
/**
|
|
16
|
+
* The question, and its identity.
|
|
17
|
+
*
|
|
18
|
+
* One field for both on purpose. The `claude` CLI looks an answer up *by the text of the
|
|
19
|
+
* question it answers* — the reply is a map keyed on this string — so a generated id would be
|
|
20
|
+
* an answer to a question that does not exist, and the turn would come back saying nobody
|
|
21
|
+
* answered. Whatever asks, the rule is the same: the question is the key.
|
|
22
|
+
*/
|
|
23
|
+
question: string;
|
|
24
|
+
/**
|
|
25
|
+
* Two or three words over the question — `Auth method`, `Library`, `Approach`. A chip rather
|
|
26
|
+
* than a sentence, and it is what a folded card says the question was about.
|
|
27
|
+
*/
|
|
28
|
+
header: string;
|
|
29
|
+
options: Array<QuestionOption>;
|
|
30
|
+
/**
|
|
31
|
+
* Whether more than one option may be taken.
|
|
32
|
+
*/
|
|
33
|
+
multi_select: boolean;
|
|
34
|
+
};
|
|
@@ -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
|
+
import type { BufferId } from "./BufferId";
|
|
3
|
+
import type { SessionId } from "./SessionId";
|
|
4
|
+
import type { WindowId } from "./WindowId";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* What a shared variable is *about*.
|
|
8
|
+
*
|
|
9
|
+
* Deliberately not a free-form string. A scope that was `"project:/home/me/x"` would be one typo
|
|
10
|
+
* away from a value nothing ever reads again, and the host is the only thing that can say whether a
|
|
11
|
+
* conversation still exists — which is what lets it throw away the vars of one that does not.
|
|
12
|
+
*/
|
|
13
|
+
export type VarScope =
|
|
14
|
+
| { "scope": "global" }
|
|
15
|
+
| { "scope": "session"; session: SessionId }
|
|
16
|
+
| { "scope": "project"; cwd: string }
|
|
17
|
+
| { "scope": "buffer"; buf: BufferId }
|
|
18
|
+
| { "scope": "window"; win: WindowId };
|
|
@@ -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 attached terminal.
|
|
5
|
+
*
|
|
6
|
+
* A workspace can have several, and they are not copies of each other: a window belongs to
|
|
7
|
+
* exactly one, so the conversation on screen, the scroll position, the composer and the
|
|
8
|
+
* panels open over it are all facts about a view rather than about the workspace. Buffers are
|
|
9
|
+
* not — what the agent produced is the workspace's, and a conversation shown in two terminals
|
|
10
|
+
* is one transcript with two cursors on it.
|
|
11
|
+
*
|
|
12
|
+
* On the wire because a plugin has to be able to say which terminal it is drawing into. It
|
|
13
|
+
* was kept out of the protocol deliberately at first, when every view saw the same frame and
|
|
14
|
+
* the number bought nothing; a float that must land in *this* terminal is what changed.
|
|
15
|
+
*/
|
|
16
|
+
export type ViewId = number;
|
|
@@ -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 { SessionId } from "./SessionId";
|
|
3
|
+
import type { ViewId } from "./ViewId";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* One terminal looking at this workspace.
|
|
7
|
+
*
|
|
8
|
+
* A view is a set of windows: the conversation on screen, how far up it you have read, the
|
|
9
|
+
* composer, the panels open over it. Buffers are not — what the agent produced is the workspace's
|
|
10
|
+
* — so a conversation open in two terminals is one conversation with two places to be in it.
|
|
11
|
+
*/
|
|
12
|
+
export type ViewInfo = {
|
|
13
|
+
view: ViewId;
|
|
14
|
+
/**
|
|
15
|
+
* The conversation on screen here.
|
|
16
|
+
*/
|
|
17
|
+
session: SessionId;
|
|
18
|
+
/**
|
|
19
|
+
* Whether this is the terminal being served — the one whose key press is running, or whose
|
|
20
|
+
* turn it is to be drawn into.
|
|
21
|
+
*/
|
|
22
|
+
current: boolean;
|
|
23
|
+
};
|
|
@@ -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
|
+
* A window's resolved geometry.
|
|
5
|
+
*/
|
|
6
|
+
export type Viewport = {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
top_line: number;
|
|
10
|
+
/**
|
|
11
|
+
* Buffer rows actually on the screen, which on a wrapping window is fewer than `height`.
|
|
12
|
+
*/
|
|
13
|
+
rows: number;
|
|
14
|
+
/**
|
|
15
|
+
* Lines in the buffer, so a caller can page without a second round trip.
|
|
16
|
+
*/
|
|
17
|
+
line_count: number;
|
|
18
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { BufferId } from "./BufferId";
|
|
3
|
+
import type { WindowId } from "./WindowId";
|
|
4
|
+
import type { WindowLayout } from "./WindowLayout";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A window as somebody else sees it.
|
|
8
|
+
*/
|
|
9
|
+
export type WindowInfo = {
|
|
10
|
+
win: WindowId;
|
|
11
|
+
buf: BufferId;
|
|
12
|
+
/**
|
|
13
|
+
* What the buffer in it declared itself to be, if anything.
|
|
14
|
+
*/
|
|
15
|
+
kind?: string | null;
|
|
16
|
+
name: string;
|
|
17
|
+
layout: WindowLayout;
|
|
18
|
+
/**
|
|
19
|
+
* Whether this is the window keys are going to.
|
|
20
|
+
*/
|
|
21
|
+
focused: boolean;
|
|
22
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
+
import type { Dock } from "./Dock";
|
|
3
|
+
import type { FloatConfig } from "./FloatConfig";
|
|
4
|
+
import type { Gravity } from "./Gravity";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Declarative placement for a window. The frontend turns this into a rectangle.
|
|
8
|
+
*/
|
|
9
|
+
export type WindowLayout = {
|
|
10
|
+
"kind": "docked";
|
|
11
|
+
dock: Dock;
|
|
12
|
+
/**
|
|
13
|
+
* Preferred extent along the dock's variable axis.
|
|
14
|
+
*/
|
|
15
|
+
size?: number | null;
|
|
16
|
+
/**
|
|
17
|
+
* Which end content settles against when there is not enough of it to fill the window.
|
|
18
|
+
*/
|
|
19
|
+
gravity: Gravity;
|
|
20
|
+
/**
|
|
21
|
+
* Whether long lines wrap rather than clip. The main dock always wraps; every other dock
|
|
22
|
+
* clips unless it says otherwise, because a text field is the only chrome whose content
|
|
23
|
+
* is prose. A bottom dock that wraps also grows to fit what wrapped, `size` becoming its
|
|
24
|
+
* floor — a field that wraps a long line and then hides the wrapped rows has clipped it
|
|
25
|
+
* with extra steps.
|
|
26
|
+
*/
|
|
27
|
+
wrap?: boolean | null;
|
|
28
|
+
} | { "kind": "float"; config: FloatConfig };
|
|
@@ -0,0 +1,28 @@
|
|
|
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 { RunningTurn } from "./RunningTurn";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* What a workspace is holding, for `neosh status`.
|
|
7
|
+
*/
|
|
8
|
+
export type WorkspaceStatus = {
|
|
9
|
+
/**
|
|
10
|
+
* Seconds since the workspace started.
|
|
11
|
+
*/
|
|
12
|
+
uptime_secs: number;
|
|
13
|
+
/**
|
|
14
|
+
* Seconds since a client was last attached, or 0 while one is.
|
|
15
|
+
*/
|
|
16
|
+
idle_secs: number;
|
|
17
|
+
attached: boolean;
|
|
18
|
+
conversations: number;
|
|
19
|
+
/**
|
|
20
|
+
* One line per conversation with a turn in flight: what it is called and what it is doing.
|
|
21
|
+
*/
|
|
22
|
+
running: Array<RunningTurn>;
|
|
23
|
+
/**
|
|
24
|
+
* The build the workspace is running, which is the one that started it however many times
|
|
25
|
+
* the binary has been replaced since.
|
|
26
|
+
*/
|
|
27
|
+
build: BuildId;
|
|
28
|
+
};
|
|
@@ -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
|
+
export type WorktreeInfo = {
|
|
4
|
+
path: string;
|
|
5
|
+
branch?: string | null;
|
|
6
|
+
head?: string | null;
|
|
7
|
+
/**
|
|
8
|
+
* The original checkout, as opposed to one `git worktree add` created.
|
|
9
|
+
*/
|
|
10
|
+
is_main: boolean;
|
|
11
|
+
locked: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* True for the worktree this neosh is running in.
|
|
14
|
+
*/
|
|
15
|
+
is_current: boolean;
|
|
16
|
+
};
|
package/src/globals.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Globals the neosh runtime installs.
|
|
3
|
+
*
|
|
4
|
+
* These are declared here rather than pulled in from `lib.dom` or `@types/node`, because neither is
|
|
5
|
+
* true: the runtime is a bare deno_core with no DOM, no filesystem and no network. Everything with
|
|
6
|
+
* an effect goes through `@neosh/api`, which is what makes hooks and permissions mean anything.
|
|
7
|
+
*
|
|
8
|
+
* Timer handles are opaque numbers. They are not Node's `Timeout` objects and have no `.unref()`.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/** Run `fn` once, no sooner than `ms` from now. */
|
|
12
|
+
declare function setTimeout<A extends unknown[]>(
|
|
13
|
+
fn: (...args: A) => unknown,
|
|
14
|
+
ms?: number,
|
|
15
|
+
...args: A
|
|
16
|
+
): number;
|
|
17
|
+
|
|
18
|
+
/** Run `fn` repeatedly. The next firing is scheduled when the previous one is dispatched, so a slow
|
|
19
|
+
* callback cannot build up a backlog. */
|
|
20
|
+
declare function setInterval<A extends unknown[]>(
|
|
21
|
+
fn: (...args: A) => unknown,
|
|
22
|
+
ms?: number,
|
|
23
|
+
...args: A
|
|
24
|
+
): number;
|
|
25
|
+
|
|
26
|
+
declare function clearTimeout(id: number | undefined): void;
|
|
27
|
+
declare function clearInterval(id: number | undefined): void;
|
|
28
|
+
|
|
29
|
+
/** Present, and the only console there is: it routes to neosh's log file, not to the terminal —
|
|
30
|
+
* stdout belongs to the UI protocol. Prefer `neosh.log`, which is attributed to your plugin. */
|
|
31
|
+
declare const console: {
|
|
32
|
+
log(...args: unknown[]): void;
|
|
33
|
+
info(...args: unknown[]): void;
|
|
34
|
+
warn(...args: unknown[]): void;
|
|
35
|
+
error(...args: unknown[]): void;
|
|
36
|
+
debug(...args: unknown[]): void;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
declare function queueMicrotask(fn: () => void): void;
|