@volter/supercode-frontend-vscode 0.1.11
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/NOTICE.md +19 -0
- package/README.md +293 -0
- package/dist/bindings.d.ts +7 -0
- package/dist/bindings.js +5 -0
- package/dist/client.d.ts +11 -0
- package/dist/client.js +5 -0
- package/dist/context.d.ts +6 -0
- package/dist/context.js +14 -0
- package/dist/credential.d.ts +17 -0
- package/dist/credential.js +53 -0
- package/dist/extension.d.ts +39 -0
- package/dist/extension.js +1131 -0
- package/dist/host-controls.d.ts +58 -0
- package/dist/host-controls.js +66 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +5 -0
- package/dist/native-session.d.ts +6 -0
- package/dist/native-session.js +41 -0
- package/dist/proposals.d.ts +24 -0
- package/dist/proposals.js +54 -0
- package/dist/session.d.ts +154 -0
- package/dist/session.js +431 -0
- package/dist/view.d.ts +176 -0
- package/dist/view.js +717 -0
- package/media/anthropic.svg +1 -0
- package/media/google.svg +1 -0
- package/media/icon.png +0 -0
- package/media/openai.svg +1 -0
- package/package.json +200 -0
- package/scripts/pack-extension.mjs +63 -0
- package/vendor/supercode-frontend/README.md +22 -0
- package/vendor/supercode-frontend/client.d.mts +106 -0
- package/vendor/supercode-frontend/client.mjs +300 -0
- package/vendor/supercode-frontend/contract.json +289 -0
- package/vendor/supercode-frontend/generated-client.d.mts +18 -0
- package/vendor/supercode-frontend/generated-client.mjs +20 -0
- package/vendor/supercode-frontend/generated.d.mts +146 -0
- package/vendor/supercode-frontend/generated.mjs +19 -0
- package/vendor/supercode-frontend/package.json +20 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
// @generated by sdk/frontend/generate.mjs from contract.json. Do not edit.
|
|
2
|
+
export type JsonPrimitive = string | number | boolean | null;
|
|
3
|
+
export type JsonValue = JsonPrimitive | JsonValue[] | { [key: string]: JsonValue };
|
|
4
|
+
export type Empty = Record<string, never>;
|
|
5
|
+
export type ChatRole = "system" | "user" | "assistant" | "tool";
|
|
6
|
+
export interface FunctionCall {
|
|
7
|
+
name: string;
|
|
8
|
+
arguments: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ToolCall {
|
|
11
|
+
id: string;
|
|
12
|
+
type: string;
|
|
13
|
+
function: FunctionCall;
|
|
14
|
+
}
|
|
15
|
+
export interface ChatMessage {
|
|
16
|
+
role: ChatRole;
|
|
17
|
+
content?: string | JsonValue[];
|
|
18
|
+
tool_calls?: ToolCall[];
|
|
19
|
+
tool_call_id?: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface FrontendActions {
|
|
23
|
+
submit: boolean;
|
|
24
|
+
interrupt: boolean;
|
|
25
|
+
steer: boolean;
|
|
26
|
+
respond: boolean;
|
|
27
|
+
detach: boolean;
|
|
28
|
+
close: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface FrontendCommandDescriptor {
|
|
31
|
+
name: string;
|
|
32
|
+
description: string | null;
|
|
33
|
+
argument_hint?: string | null;
|
|
34
|
+
}
|
|
35
|
+
export type FrontendOperationKind = "prompt" | "file" | "model" | "session" | "subagent" | "image" | "reduction";
|
|
36
|
+
export interface FrontendOperationDescriptor {
|
|
37
|
+
id: string;
|
|
38
|
+
kind: FrontendOperationKind;
|
|
39
|
+
command: FrontendCommandDescriptor | null;
|
|
40
|
+
}
|
|
41
|
+
export interface FrontendDisplayCapabilities {
|
|
42
|
+
event_kinds: string[];
|
|
43
|
+
opaque_fallback: boolean;
|
|
44
|
+
}
|
|
45
|
+
export type FrontendTurnState = "idle" | "busy";
|
|
46
|
+
export type FrontendConnectionState = "connected" | "shutting_down";
|
|
47
|
+
export interface FrontendRuntimeDescriptor {
|
|
48
|
+
schema_version: 2;
|
|
49
|
+
session_id: string;
|
|
50
|
+
source_harness: string | null;
|
|
51
|
+
emulation_profile: string | null;
|
|
52
|
+
active_modules: string[];
|
|
53
|
+
commands: FrontendCommandDescriptor[];
|
|
54
|
+
operations: FrontendOperationDescriptor[];
|
|
55
|
+
actions: FrontendActions;
|
|
56
|
+
display: FrontendDisplayCapabilities;
|
|
57
|
+
model: string;
|
|
58
|
+
turn_state: FrontendTurnState;
|
|
59
|
+
connection_state: FrontendConnectionState;
|
|
60
|
+
extensions?: Record<string, JsonValue>;
|
|
61
|
+
}
|
|
62
|
+
export type FrontendRequestKind = "approval" | "elicitation" | "other";
|
|
63
|
+
export interface FrontendRequest {
|
|
64
|
+
id: number;
|
|
65
|
+
kind: FrontendRequestKind;
|
|
66
|
+
payload: JsonValue;
|
|
67
|
+
}
|
|
68
|
+
export interface FrontendRequestEventPayload {
|
|
69
|
+
type: "request";
|
|
70
|
+
request: FrontendRequest;
|
|
71
|
+
}
|
|
72
|
+
export type FrontendEventPayload = FrontendRequestEventPayload | JsonValue;
|
|
73
|
+
export interface FrontendEvent {
|
|
74
|
+
sequence: number;
|
|
75
|
+
kind: string;
|
|
76
|
+
payload: FrontendEventPayload;
|
|
77
|
+
}
|
|
78
|
+
export interface FrontendAttachSnapshot {
|
|
79
|
+
descriptor: FrontendRuntimeDescriptor;
|
|
80
|
+
history: ChatMessage[];
|
|
81
|
+
history_cursor: number;
|
|
82
|
+
replay: FrontendEvent[];
|
|
83
|
+
}
|
|
84
|
+
export type FrontendApprovalDecision = "deny" | "allow" | "allow_for_session";
|
|
85
|
+
export type FrontendElicitationAction = "accept" | "decline" | "cancel";
|
|
86
|
+
export type FrontendResponse = { kind: "approval"; request_id: number; decision: FrontendApprovalDecision } | { kind: "elicitation"; request_id: number; action: FrontendElicitationAction; content?: JsonValue | null } | { kind: "other"; request_id: number; action: FrontendElicitationAction; content?: JsonValue | null };
|
|
87
|
+
export type FrontendOperationInvocation = { kind: "prompt"; operation_id: string; arguments: string };
|
|
88
|
+
export type FrontendOperationResult = { kind: "prompt"; reply: string };
|
|
89
|
+
export interface RuntimeControllerLease {
|
|
90
|
+
client_id: string;
|
|
91
|
+
expires_at_ms: number;
|
|
92
|
+
}
|
|
93
|
+
export interface RuntimeObserverLease {
|
|
94
|
+
client_id: string;
|
|
95
|
+
last_seen_ms: number;
|
|
96
|
+
}
|
|
97
|
+
export interface RuntimeLeaseSnapshot {
|
|
98
|
+
controller: RuntimeControllerLease | null;
|
|
99
|
+
observers: RuntimeObserverLease[];
|
|
100
|
+
lease_ttl_ms: number;
|
|
101
|
+
}
|
|
102
|
+
export type FrontendErrorName = "unauthenticated" | "unauthorized" | "controller_required" | "lease_expired" | "invalid_argument" | "not_found" | "busy" | "unsupported_action" | "execution" | "transport";
|
|
103
|
+
export interface FrontendError {
|
|
104
|
+
name: FrontendErrorName;
|
|
105
|
+
message: string;
|
|
106
|
+
code?: number;
|
|
107
|
+
operation?: string;
|
|
108
|
+
permission?: string;
|
|
109
|
+
holder?: string | null;
|
|
110
|
+
expiresAtMs?: number | null;
|
|
111
|
+
extensions?: Record<string, JsonValue>;
|
|
112
|
+
}
|
|
113
|
+
export interface AttachParams {
|
|
114
|
+
limit: number;
|
|
115
|
+
after_sequence?: number;
|
|
116
|
+
}
|
|
117
|
+
export interface PromptParams {
|
|
118
|
+
prompt: string;
|
|
119
|
+
}
|
|
120
|
+
export interface MultimodalPromptParams {
|
|
121
|
+
prompt: string;
|
|
122
|
+
image_urls?: string[];
|
|
123
|
+
}
|
|
124
|
+
export interface RespondParams {
|
|
125
|
+
response: FrontendResponse;
|
|
126
|
+
}
|
|
127
|
+
export interface InvokeParams {
|
|
128
|
+
operation: FrontendOperationInvocation;
|
|
129
|
+
}
|
|
130
|
+
export interface Accepted {
|
|
131
|
+
accepted: boolean;
|
|
132
|
+
}
|
|
133
|
+
export interface Reply {
|
|
134
|
+
reply: string;
|
|
135
|
+
}
|
|
136
|
+
export interface Interrupted {
|
|
137
|
+
interrupted: boolean;
|
|
138
|
+
}
|
|
139
|
+
export interface Queued {
|
|
140
|
+
queued: boolean;
|
|
141
|
+
}
|
|
142
|
+
export interface Closed {
|
|
143
|
+
closed: boolean;
|
|
144
|
+
}
|
|
145
|
+
export type FrontendMethodId = 'describe' | 'attach' | 'send_input' | 'submit' | 'interrupt' | 'steer' | 'respond' | 'invoke' | 'lease' | 'acquire_control' | 'take_control' | 'heartbeat' | 'detach' | 'close';
|
|
146
|
+
export type FrontendWireMethod = 'frontend.v2.describe' | 'frontend.v2.attach' | 'frontend.v2.send_input' | 'frontend.v2.submit' | 'frontend.v2.interrupt' | 'frontend.v2.steer' | 'frontend.v2.respond' | 'frontend.v2.invoke' | 'frontend.v2.lease' | 'frontend.v2.acquire_control' | 'frontend.v2.take_control' | 'frontend.v2.heartbeat' | 'frontend.v2.detach' | 'frontend.v2.close';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// @generated by sdk/frontend/generate.mjs from contract.json. Do not edit.
|
|
2
|
+
export const FRONTEND_SCHEMA = 'supercode.frontend.contract.v2';
|
|
3
|
+
export const FRONTEND_METHODS = Object.freeze({
|
|
4
|
+
"describe": "frontend.v2.describe",
|
|
5
|
+
"attach": "frontend.v2.attach",
|
|
6
|
+
"send_input": "frontend.v2.send_input",
|
|
7
|
+
"submit": "frontend.v2.submit",
|
|
8
|
+
"interrupt": "frontend.v2.interrupt",
|
|
9
|
+
"steer": "frontend.v2.steer",
|
|
10
|
+
"respond": "frontend.v2.respond",
|
|
11
|
+
"invoke": "frontend.v2.invoke",
|
|
12
|
+
"lease": "frontend.v2.lease",
|
|
13
|
+
"acquire_control": "frontend.v2.acquire_control",
|
|
14
|
+
"take_control": "frontend.v2.take_control",
|
|
15
|
+
"heartbeat": "frontend.v2.heartbeat",
|
|
16
|
+
"detach": "frontend.v2.detach",
|
|
17
|
+
"close": "frontend.v2.close"
|
|
18
|
+
});
|
|
19
|
+
export const FRONTEND_EVENT_METHOD = 'frontend.v2.event';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@volter/supercode-frontend",
|
|
3
|
+
"version": "0.2.4",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Generated language-neutral attachment client for Volter Harness SDK runtimes",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {"types": "./index.d.ts", "import": "./client.mjs"},
|
|
8
|
+
"./generated": {"types": "./generated.d.mts", "import": "./generated.mjs"},
|
|
9
|
+
"./contract.json": "./contract.json"
|
|
10
|
+
},
|
|
11
|
+
"types": "./index.d.ts",
|
|
12
|
+
"files": ["client.mjs", "index.d.ts", "generated.mjs", "generated.d.mts", "generated-client.mjs", "generated-client.d.mts", "contract.json", "test/fixtures/conformance.json", "README.md"],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"generate": "node generate.mjs",
|
|
15
|
+
"check": "node generate.mjs --check",
|
|
16
|
+
"test": "node --test test/*.test.mjs"
|
|
17
|
+
},
|
|
18
|
+
"engines": {"node": ">=20"},
|
|
19
|
+
"license": "MIT OR Apache-2.0"
|
|
20
|
+
}
|