@neosh/api 0.1.0 → 0.2.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 +4 -2
- package/src/generated/AccountKind.ts +0 -0
- package/src/generated/Activity.ts +0 -0
- package/src/generated/AgentCommand.ts +0 -0
- package/src/generated/AgentState.ts +0 -0
- package/src/generated/AgentSummary.ts +0 -0
- package/src/generated/Anchor.ts +0 -0
- package/src/generated/Animation.ts +0 -0
- package/src/generated/ApiCall.ts +16 -0
- package/src/generated/ApiError.ts +0 -0
- package/src/generated/ApiOk.ts +5 -1
- package/src/generated/ApiResponse.ts +0 -0
- package/src/generated/AscpMessage.ts +0 -0
- package/src/generated/AttachmentInfo.ts +0 -0
- package/src/generated/Attrs.ts +0 -0
- package/src/generated/AuthRef.ts +0 -0
- package/src/generated/BackgroundTask.ts +0 -0
- package/src/generated/BlockStartKind.ts +0 -0
- package/src/generated/BorderStyle.ts +0 -0
- package/src/generated/BranchInfo.ts +0 -0
- package/src/generated/Brand.ts +0 -0
- package/src/generated/BufferId.ts +0 -0
- package/src/generated/BuildId.ts +0 -0
- package/src/generated/Capability.ts +0 -0
- package/src/generated/ClientMessage.ts +1 -0
- package/src/generated/Color.ts +0 -0
- package/src/generated/CommandEntry.ts +0 -0
- package/src/generated/CommitInfo.ts +0 -0
- package/src/generated/ContentBlock.ts +0 -0
- package/src/generated/Contribution.ts +0 -0
- package/src/generated/CostBasis.ts +0 -0
- package/src/generated/CredentialInfo.ts +0 -0
- package/src/generated/CredentialSource.ts +0 -0
- package/src/generated/CursorMotion.ts +0 -0
- package/src/generated/CursorShape.ts +0 -0
- package/src/generated/DetachReason.ts +0 -0
- package/src/generated/DiffTarget.ts +0 -0
- package/src/generated/Dock.ts +0 -0
- package/src/generated/DriverCommand.ts +0 -0
- package/src/generated/DriverKind.ts +0 -0
- package/src/generated/Extent.ts +0 -0
- package/src/generated/ExtmarkId.ts +0 -0
- package/src/generated/ExtmarkInfo.ts +0 -0
- package/src/generated/ExtmarkOpts.ts +0 -0
- package/src/generated/ExtmarkRender.ts +0 -0
- package/src/generated/FileChange.ts +0 -0
- package/src/generated/FileState.ts +0 -0
- package/src/generated/FloatConfig.ts +0 -0
- package/src/generated/FrameSet.ts +0 -0
- package/src/generated/Gravity.ts +0 -0
- package/src/generated/HighlightDef.ts +0 -0
- package/src/generated/HighlightEntry.ts +0 -0
- package/src/generated/HighlightSpec.ts +0 -0
- package/src/generated/Hint.ts +0 -0
- package/src/generated/HlTarget.ts +0 -0
- package/src/generated/HookInvocation.ts +0 -0
- package/src/generated/HookName.ts +0 -0
- package/src/generated/HookOutcome.ts +0 -0
- package/src/generated/HookPayload.ts +0 -0
- package/src/generated/InputEvent.ts +1 -0
- package/src/generated/InstallMethod.ts +15 -0
- package/src/generated/InstanceConfig.ts +0 -0
- package/src/generated/InstanceId.ts +0 -0
- package/src/generated/KeyCode.ts +0 -0
- package/src/generated/KeyContext.ts +0 -0
- package/src/generated/KeyMods.ts +0 -0
- package/src/generated/KeyPress.ts +0 -0
- package/src/generated/KeymapEntry.ts +0 -0
- package/src/generated/KeymapScope.ts +0 -0
- package/src/generated/LineDraw.ts +0 -0
- package/src/generated/LineRender.ts +0 -0
- package/src/generated/LinkState.ts +0 -0
- package/src/generated/MarkDraw.ts +0 -0
- package/src/generated/Message.ts +0 -0
- package/src/generated/MessageLevel.ts +0 -0
- package/src/generated/Mode.ts +0 -0
- package/src/generated/ModelCapabilities.ts +0 -0
- package/src/generated/ModelEntry.ts +0 -0
- package/src/generated/ModelId.ts +0 -0
- package/src/generated/ModelInfo.ts +0 -0
- package/src/generated/ModelSelection.ts +0 -0
- package/src/generated/ModelTier.ts +0 -0
- package/src/generated/NamespaceId.ts +0 -0
- package/src/generated/NodeCapabilities.ts +0 -0
- package/src/generated/NodeId.ts +0 -0
- package/src/generated/NodeInfo.ts +0 -0
- package/src/generated/NoticeKind.ts +0 -0
- package/src/generated/Offset.ts +0 -0
- package/src/generated/OnDelete.ts +0 -0
- package/src/generated/OptionChoice.ts +0 -0
- package/src/generated/OptionEntry.ts +0 -0
- package/src/generated/OptionSelection.ts +0 -0
- package/src/generated/OptionSpec.ts +0 -0
- package/src/generated/OptionType.ts +0 -0
- package/src/generated/OptionValue.ts +0 -0
- package/src/generated/PermissionDecision.ts +0 -0
- package/src/generated/PermissionMode.ts +0 -0
- package/src/generated/PermissionOption.ts +0 -0
- package/src/generated/PermissionOptionKind.ts +0 -0
- package/src/generated/PlanState.ts +0 -0
- package/src/generated/PlanStep.ts +0 -0
- package/src/generated/PluginActivation.ts +0 -0
- package/src/generated/PluginEvent.ts +0 -0
- package/src/generated/PluginId.ts +0 -0
- package/src/generated/PluginInbound.ts +0 -0
- package/src/generated/PluginInfo.ts +0 -0
- package/src/generated/PluginManifest.ts +0 -0
- package/src/generated/PluginOutbound.ts +0 -0
- package/src/generated/PluginPermission.ts +0 -0
- package/src/generated/PluginProvides.ts +0 -0
- package/src/generated/PluginRequest.ts +0 -0
- package/src/generated/PluginResponse.ts +0 -0
- package/src/generated/PointInfo.ts +0 -0
- package/src/generated/Pricing.ts +0 -0
- package/src/generated/ProjectKey.ts +0 -0
- package/src/generated/ProviderEmit.ts +0 -0
- package/src/generated/ProviderEvent.ts +0 -0
- package/src/generated/ProviderOptionDescriptor.ts +0 -0
- package/src/generated/ProviderOptionValue.ts +0 -0
- package/src/generated/QuestionAnswer.ts +0 -0
- package/src/generated/QuestionOption.ts +0 -0
- package/src/generated/QuotaCredits.ts +0 -0
- package/src/generated/QuotaSample.ts +0 -0
- package/src/generated/QuotaSeverity.ts +0 -0
- package/src/generated/QuotaSnapshot.ts +0 -0
- package/src/generated/QuotaSource.ts +0 -0
- package/src/generated/QuotaWindow.ts +0 -0
- package/src/generated/Rect.ts +0 -0
- package/src/generated/Refusal.ts +0 -0
- package/src/generated/RemoteProject.ts +0 -0
- package/src/generated/RepoInfo.ts +0 -0
- package/src/generated/RepoStatus.ts +0 -0
- package/src/generated/RequestId.ts +0 -0
- package/src/generated/RestartRefusal.ts +12 -0
- package/src/generated/Role.ts +0 -0
- package/src/generated/RunningTurn.ts +0 -0
- package/src/generated/SelectShape.ts +0 -0
- package/src/generated/ServerMessage.ts +0 -0
- package/src/generated/SessionId.ts +0 -0
- package/src/generated/SessionInfo.ts +0 -0
- package/src/generated/StatusAlign.ts +0 -0
- package/src/generated/StatusSegment.ts +0 -0
- package/src/generated/StopReason.ts +0 -0
- package/src/generated/StreamEvent.ts +0 -0
- package/src/generated/StreamId.ts +0 -0
- package/src/generated/SurfaceCell.ts +0 -0
- package/src/generated/SurfaceId.ts +0 -0
- package/src/generated/SwarmAgent.ts +0 -0
- package/src/generated/SwarmNode.ts +0 -0
- package/src/generated/SwarmStranger.ts +0 -0
- package/src/generated/TaskId.ts +0 -0
- package/src/generated/TaskStatus.ts +0 -0
- package/src/generated/TextEdit.ts +0 -0
- package/src/generated/ToolCall.ts +0 -0
- package/src/generated/ToolCallId.ts +0 -0
- package/src/generated/ToolDef.ts +0 -0
- package/src/generated/ToolInvocation.ts +0 -0
- package/src/generated/ToolResult.ts +0 -0
- package/src/generated/ToolSource.ts +0 -0
- package/src/generated/TurnId.ts +0 -0
- package/src/generated/TurnRequest.ts +0 -0
- package/src/generated/UiEvent.ts +0 -0
- package/src/generated/UpdateOutcome.ts +20 -0
- package/src/generated/UpdateStatus.ts +39 -0
- package/src/generated/Usage.ts +0 -0
- package/src/generated/UsageBucket.ts +0 -0
- package/src/generated/UsageHistory.ts +0 -0
- package/src/generated/UsageResolution.ts +0 -0
- package/src/generated/UsageScanSource.ts +0 -0
- package/src/generated/UsageScanStatus.ts +0 -0
- package/src/generated/UserQuestion.ts +0 -0
- package/src/generated/VarScope.ts +0 -0
- package/src/generated/ViewId.ts +0 -0
- package/src/generated/ViewInfo.ts +0 -0
- package/src/generated/Viewport.ts +0 -0
- package/src/generated/VirtChunk.ts +0 -0
- package/src/generated/VirtTextPos.ts +0 -0
- package/src/generated/WindowId.ts +0 -0
- package/src/generated/WindowInfo.ts +0 -0
- package/src/generated/WindowLayout.ts +0 -0
- package/src/generated/WorkspaceStatus.ts +0 -0
- package/src/generated/WorktreeInfo.ts +0 -0
- package/src/globals.d.ts +0 -0
- package/src/index.ts +56 -0
- package/src/ui.ts +0 -0
- package/tsconfig.json +0 -0
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neosh/api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "The neosh plugin API. Types are generated from the Rust side and drift-checked in CI.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "src/index.ts",
|
|
8
|
-
"exports": {
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./src/index.ts"
|
|
10
|
+
},
|
|
9
11
|
"keywords": [
|
|
10
12
|
"neosh",
|
|
11
13
|
"neosh-plugin",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/generated/Anchor.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/src/generated/ApiCall.ts
CHANGED
|
@@ -517,4 +517,20 @@ export type ApiCall =
|
|
|
517
517
|
* conversation is about the workspace, and is never on screen by definition.
|
|
518
518
|
*/
|
|
519
519
|
session?: SessionId | null;
|
|
520
|
+
}
|
|
521
|
+
| {
|
|
522
|
+
"call": "update_check";
|
|
523
|
+
/**
|
|
524
|
+
* Ask the network again rather than answering from the last check.
|
|
525
|
+
*/
|
|
526
|
+
force: boolean;
|
|
527
|
+
}
|
|
528
|
+
| { "call": "update_apply" }
|
|
529
|
+
| {
|
|
530
|
+
"call": "update_restart";
|
|
531
|
+
/**
|
|
532
|
+
* Restart even with turns running. Never a default; a caller sets it only after saying
|
|
533
|
+
* out loud what would be lost.
|
|
534
|
+
*/
|
|
535
|
+
force: boolean;
|
|
520
536
|
};
|
|
File without changes
|
package/src/generated/ApiOk.ts
CHANGED
|
@@ -35,6 +35,8 @@ import type { SwarmAgent } from "./SwarmAgent";
|
|
|
35
35
|
import type { SwarmNode } from "./SwarmNode";
|
|
36
36
|
import type { SwarmStranger } from "./SwarmStranger";
|
|
37
37
|
import type { ToolDef } from "./ToolDef";
|
|
38
|
+
import type { UpdateOutcome } from "./UpdateOutcome";
|
|
39
|
+
import type { UpdateStatus } from "./UpdateStatus";
|
|
38
40
|
import type { UsageHistory } from "./UsageHistory";
|
|
39
41
|
import type { ViewInfo } from "./ViewInfo";
|
|
40
42
|
import type { Viewport } from "./Viewport";
|
|
@@ -107,4 +109,6 @@ export type ApiOk =
|
|
|
107
109
|
| { "ok": "swarm_strangers"; strangers: Array<SwarmStranger> }
|
|
108
110
|
| { "ok": "quotas"; quotas: Array<QuotaSnapshot> }
|
|
109
111
|
| { "ok": "quota_history"; samples: Array<QuotaSample> }
|
|
110
|
-
| { "ok": "usage_history"; history: UsageHistory }
|
|
112
|
+
| { "ok": "usage_history"; history: UsageHistory }
|
|
113
|
+
| { "ok": "update"; update: UpdateStatus }
|
|
114
|
+
| { "ok": "update_applied"; outcome: UpdateOutcome };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/generated/Attrs.ts
CHANGED
|
File without changes
|
package/src/generated/AuthRef.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/generated/Brand.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/src/generated/BuildId.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/src/generated/Color.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/generated/Dock.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/generated/Extent.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/generated/Gravity.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/generated/Hint.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -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
|
+
|
|
3
|
+
/**
|
|
4
|
+
* How this neosh got onto the machine, which is what decides how it may be replaced.
|
|
5
|
+
*
|
|
6
|
+
* Detected from the path of the running executable and never configured: a setting would be a
|
|
7
|
+
* thing to get wrong, and getting it wrong means writing over a file some other program believes
|
|
8
|
+
* it owns.
|
|
9
|
+
*/
|
|
10
|
+
export type InstallMethod =
|
|
11
|
+
| "homebrew"
|
|
12
|
+
| "npm"
|
|
13
|
+
| "cargo"
|
|
14
|
+
| "standalone"
|
|
15
|
+
| "development";
|
|
File without changes
|
|
File without changes
|
package/src/generated/KeyCode.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/src/generated/KeyMods.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/generated/Message.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/src/generated/Mode.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/generated/ModelId.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/generated/NodeId.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/generated/Offset.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/generated/Pricing.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/generated/Rect.ts
CHANGED
|
File without changes
|
package/src/generated/Refusal.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
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 refused [`ApiCall::UpdateRestart`] was refused for.
|
|
5
|
+
*/
|
|
6
|
+
export type RestartRefusal = {
|
|
7
|
+
/**
|
|
8
|
+
* The conversations with a turn in flight, workspace-wide — not just the ones this view can
|
|
9
|
+
* see, because a restart ends every one of them.
|
|
10
|
+
*/
|
|
11
|
+
running: Array<string>;
|
|
12
|
+
};
|
package/src/generated/Role.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/generated/TaskId.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/generated/ToolDef.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/generated/TurnId.ts
CHANGED
|
File without changes
|
|
File without changes
|
package/src/generated/UiEvent.ts
CHANGED
|
File without changes
|
|
@@ -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
|
+
import type { InstallMethod } from "./InstallMethod";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* What [`ApiCall::UpdateApply`] did.
|
|
6
|
+
*/
|
|
7
|
+
export type UpdateOutcome = { "outcome": "up_to_date"; version: string } | {
|
|
8
|
+
"outcome": "applied";
|
|
9
|
+
version: string;
|
|
10
|
+
/**
|
|
11
|
+
* Always true today, and a field rather than an assumption: a workspace holds running
|
|
12
|
+
* turns, so what happens next is a question for whoever pressed the key.
|
|
13
|
+
*/
|
|
14
|
+
restart_required: boolean;
|
|
15
|
+
} | {
|
|
16
|
+
"outcome": "delegated";
|
|
17
|
+
version: string;
|
|
18
|
+
command: string;
|
|
19
|
+
method: InstallMethod;
|
|
20
|
+
} | { "outcome": "failed"; reason: string };
|
|
@@ -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 { InstallMethod } from "./InstallMethod";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* What an update would be, if there is one.
|
|
6
|
+
*/
|
|
7
|
+
export type UpdateStatus = {
|
|
8
|
+
/**
|
|
9
|
+
* The version running now.
|
|
10
|
+
*/
|
|
11
|
+
current: string;
|
|
12
|
+
/**
|
|
13
|
+
* The newest published version, or `None` when the check has not run or could not reach the
|
|
14
|
+
* network. Absent is *unknown* rather than up to date — a failed check that reads as "you are
|
|
15
|
+
* current" is a machine that never updates and never says why.
|
|
16
|
+
*/
|
|
17
|
+
latest?: string | null;
|
|
18
|
+
/**
|
|
19
|
+
* Whether `latest` is newer than `current`.
|
|
20
|
+
*/
|
|
21
|
+
behind: boolean;
|
|
22
|
+
method: InstallMethod;
|
|
23
|
+
/**
|
|
24
|
+
* Whether [`ApiCall::UpdateApply`] would replace the binary, rather than name a command.
|
|
25
|
+
*/
|
|
26
|
+
self_updatable: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The command to run by hand, when neosh will not do it itself.
|
|
29
|
+
*/
|
|
30
|
+
upgrade_command?: string | null;
|
|
31
|
+
/**
|
|
32
|
+
* Why the last check failed, when it did. Kept so the UI can say *unknown, and here is why*.
|
|
33
|
+
*/
|
|
34
|
+
error?: string | null;
|
|
35
|
+
/**
|
|
36
|
+
* Whether an update has been downloaded and is waiting for a restart.
|
|
37
|
+
*/
|
|
38
|
+
restart_pending: boolean;
|
|
39
|
+
};
|
package/src/generated/Usage.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/generated/ViewId.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/globals.d.ts
CHANGED
|
File without changes
|
package/src/index.ts
CHANGED
|
@@ -82,6 +82,9 @@ import type { QuotaCredits } from "./generated/QuotaCredits";
|
|
|
82
82
|
import type { QuotaSample } from "./generated/QuotaSample";
|
|
83
83
|
import type { QuotaSeverity } from "./generated/QuotaSeverity";
|
|
84
84
|
import type { QuotaSnapshot } from "./generated/QuotaSnapshot";
|
|
85
|
+
import type { InstallMethod } from "./generated/InstallMethod";
|
|
86
|
+
import type { UpdateOutcome } from "./generated/UpdateOutcome";
|
|
87
|
+
import type { UpdateStatus } from "./generated/UpdateStatus";
|
|
85
88
|
import type { QuotaSource } from "./generated/QuotaSource";
|
|
86
89
|
import type { QuotaWindow } from "./generated/QuotaWindow";
|
|
87
90
|
import type { UsageBucket } from "./generated/UsageBucket";
|
|
@@ -143,6 +146,7 @@ export type {
|
|
|
143
146
|
Message, PermissionDecision, PermissionMode, PermissionOption, PermissionOptionKind, PluginEvent, PluginInfo, PluginManifest, PointInfo, Pricing, ProviderEvent, ProviderOptionDescriptor,
|
|
144
147
|
QuestionAnswer, QuestionOption, UserQuestion,
|
|
145
148
|
CostBasis, QuotaCredits, QuotaSample, QuotaSeverity, QuotaSnapshot, QuotaSource, QuotaWindow,
|
|
149
|
+
InstallMethod, UpdateOutcome, UpdateStatus,
|
|
146
150
|
UsageBucket, UsageHistory, UsageResolution, UsageScanSource,
|
|
147
151
|
Rect, RepoInfo, RepoStatus, SelectShape, SessionId, SessionInfo, StatusAlign, StatusSegment, StopReason,
|
|
148
152
|
SurfaceCell, SurfaceId, TextEdit, ToolCall, ToolDef, ToolResult, TurnRequest, Usage,
|
|
@@ -406,6 +410,8 @@ export interface Neosh {
|
|
|
406
410
|
readonly event: EventApi;
|
|
407
411
|
readonly swarm: SwarmApi;
|
|
408
412
|
readonly quota: QuotaApi;
|
|
413
|
+
/** Whether there is a newer neosh, and becoming it. */
|
|
414
|
+
readonly update: UpdateApi;
|
|
409
415
|
readonly rtp: RuntimePathApi;
|
|
410
416
|
readonly path: PathApi;
|
|
411
417
|
readonly timer: TimerApi;
|
|
@@ -1482,6 +1488,45 @@ export interface EventApi {
|
|
|
1482
1488
|
* Everything here is data. Nothing in this API draws, which is what makes the bundled strip
|
|
1483
1489
|
* replaceable by a panel of your own that reads exactly the same calls.
|
|
1484
1490
|
*/
|
|
1491
|
+
/**
|
|
1492
|
+
* Finding out there is a newer neosh, and becoming it.
|
|
1493
|
+
*
|
|
1494
|
+
* The half that decides everything is not *is there something newer* but *may I replace this file*.
|
|
1495
|
+
* A binary under a Homebrew prefix belongs to Homebrew, and writing over it leaves `brew` describing
|
|
1496
|
+
* a version that is not on disk. So {@link UpdateStatus.method} is read off the running executable's
|
|
1497
|
+
* path, and only a `standalone` install is ever overwritten — everything else is handed the command
|
|
1498
|
+
* that would do it, for a person to run.
|
|
1499
|
+
*/
|
|
1500
|
+
export interface UpdateApi {
|
|
1501
|
+
/**
|
|
1502
|
+
* What is running, what is published, and what updating would mean on this machine.
|
|
1503
|
+
*
|
|
1504
|
+
* Answers from the last check unless `force`, so a panel row asking on every redraw costs
|
|
1505
|
+
* nothing. `latest` absent is *unknown* rather than up to date — a failed check that reads as
|
|
1506
|
+
* "you are current" is a machine that never updates and never says why, so draw
|
|
1507
|
+
* {@link UpdateStatus.error} when it is there.
|
|
1508
|
+
*/
|
|
1509
|
+
check(force?: boolean): Promise<UpdateStatus>;
|
|
1510
|
+
/**
|
|
1511
|
+
* Update, by whichever route this install takes.
|
|
1512
|
+
*
|
|
1513
|
+
* Never runs somebody's package manager for them: a managed install comes back as
|
|
1514
|
+
* `delegated` with the command on it. A `standalone` one is downloaded, checked against the
|
|
1515
|
+
* published sha256 and swapped in with a rename — which is atomic and is allowed while the old
|
|
1516
|
+
* binary is still executing, and is why the answer carries `restart_required` rather than the
|
|
1517
|
+
* new version simply being live.
|
|
1518
|
+
*/
|
|
1519
|
+
apply(): Promise<UpdateOutcome>;
|
|
1520
|
+
/**
|
|
1521
|
+
* Restart the workspace so a downloaded update takes effect.
|
|
1522
|
+
*
|
|
1523
|
+
* Rejects with `Busy`, naming them, while any turn is in flight in *any* conversation — a
|
|
1524
|
+
* restart ends turns belonging to terminals the caller cannot see. `force` goes ahead anyway,
|
|
1525
|
+
* and is for a caller that has said out loud what would be lost.
|
|
1526
|
+
*/
|
|
1527
|
+
restart(force?: boolean): Promise<void>;
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1485
1530
|
export interface QuotaApi {
|
|
1486
1531
|
/**
|
|
1487
1532
|
* The latest snapshot for every instance that has one, freshest observation first.
|
|
@@ -2036,6 +2081,17 @@ function build(
|
|
|
2036
2081
|
return listener(r.swarmStreamListeners, cb);
|
|
2037
2082
|
},
|
|
2038
2083
|
},
|
|
2084
|
+
update: {
|
|
2085
|
+
async check(force) {
|
|
2086
|
+
return expect(await c({ call: "update_check", force: force ?? false }), "update").update;
|
|
2087
|
+
},
|
|
2088
|
+
async apply() {
|
|
2089
|
+
return expect(await c({ call: "update_apply" }), "update_applied").outcome;
|
|
2090
|
+
},
|
|
2091
|
+
async restart(force) {
|
|
2092
|
+
await c({ call: "update_restart", force: force ?? false });
|
|
2093
|
+
},
|
|
2094
|
+
},
|
|
2039
2095
|
quota: {
|
|
2040
2096
|
async list() {
|
|
2041
2097
|
return expect(await c({ call: "quota_list" }), "quotas").quotas;
|
package/src/ui.ts
CHANGED
|
File without changes
|
package/tsconfig.json
CHANGED
|
File without changes
|