@alisio/sdk 0.1.0-alpha.15 → 0.1.0-alpha.16
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/dist/index.d.ts +79 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1154,9 +1154,21 @@ export type ServerFrame = {
|
|
|
1154
1154
|
sessionId?: string;
|
|
1155
1155
|
reason: "overflow" | "gap" | "server_restart";
|
|
1156
1156
|
};
|
|
1157
|
-
export type ApiErrorCode = "unauthorized" | "forbidden_origin" | "forbidden_host" | "validation_failed" | "not_found" | "unknown_command" | "session_busy" | "session_locked" | "workspace_limit"
|
|
1157
|
+
export type ApiErrorCode = "unauthorized" | "forbidden_origin" | "forbidden_host" | "validation_failed" | "not_found" | "unknown_command" | "session_busy" | "session_locked" | "workspace_limit"
|
|
1158
|
+
/** A known workspace whose folder was deleted, moved or is no longer accessible (404). */
|
|
1159
|
+
| "workspace_missing" | "payload_too_large" | "unsupported_media_type" | "path_outside_workspace" | "not_a_git_repo" | "approval_resolved" | "capability_ceiling" | "not_manageable" | "mcp_not_permitted" | "runs_active" | "provider_unavailable" | "protocol_mismatch" | "shutting_down"
|
|
1158
1160
|
/** Too many concurrent event streams (SSE) for this server. */
|
|
1159
|
-
| "stream_limit"
|
|
1161
|
+
| "stream_limit"
|
|
1162
|
+
/** The workspace is archived: unarchive it before starting new sessions (409). */
|
|
1163
|
+
| "workspace_archived"
|
|
1164
|
+
/** A native folder dialog is already open on the server machine (409). */
|
|
1165
|
+
| "picker_busy"
|
|
1166
|
+
/** No native folder dialog / folder browser on this server (remote bind, no desktop) (503). */
|
|
1167
|
+
| "picker_unavailable"
|
|
1168
|
+
/** The server user may not read that directory (403). */
|
|
1169
|
+
| "permission_denied"
|
|
1170
|
+
/** The request was cancelled before it finished, e.g. a `/btw` side question (409). */
|
|
1171
|
+
| "cancelled" | "internal";
|
|
1160
1172
|
/** `GET /api/health` (the only unauthenticated API route). */
|
|
1161
1173
|
export interface HealthInfo {
|
|
1162
1174
|
name: "alisio";
|
|
@@ -1172,8 +1184,45 @@ export interface HealthInfo {
|
|
|
1172
1184
|
automation: boolean;
|
|
1173
1185
|
/** The server listens on a non-loopback address (`--allow-remote`). */
|
|
1174
1186
|
remote: boolean;
|
|
1187
|
+
/**
|
|
1188
|
+
* `POST /api/workspaces/pick` can open a native folder dialog on this machine (loopback only,
|
|
1189
|
+
* with a desktop session and a dialog tool). Absent on older servers.
|
|
1190
|
+
*/
|
|
1191
|
+
nativePicker?: boolean;
|
|
1192
|
+
/** `GET /api/fs/dirs` lists directory names for the in-app folder browser (loopback only). */
|
|
1193
|
+
folderBrowser?: boolean;
|
|
1175
1194
|
};
|
|
1176
1195
|
}
|
|
1196
|
+
/** `POST /api/workspaces/pick`: the folder chosen in the native dialog, or a cancellation. */
|
|
1197
|
+
export type FolderPickResult = {
|
|
1198
|
+
path: string;
|
|
1199
|
+
} | {
|
|
1200
|
+
cancelled: true;
|
|
1201
|
+
};
|
|
1202
|
+
/** One page of the in-app folder browser (`GET /api/fs/dirs`): subdirectory names only. */
|
|
1203
|
+
export interface DirectoryListing {
|
|
1204
|
+
/** Absolute path listed (the server's own separators; `""` for the drive list on Windows). */
|
|
1205
|
+
path: string;
|
|
1206
|
+
/** Parent directory, absent at a filesystem root (and at the drive list). */
|
|
1207
|
+
parent?: string;
|
|
1208
|
+
/** Breadcrumbs from the root to `path`, built by the server (no separator assumptions). */
|
|
1209
|
+
segments: Array<{
|
|
1210
|
+
name: string;
|
|
1211
|
+
path: string;
|
|
1212
|
+
}>;
|
|
1213
|
+
/** Subdirectories (names and absolute paths; never files, never contents). */
|
|
1214
|
+
entries: Array<{
|
|
1215
|
+
name: string;
|
|
1216
|
+
path: string;
|
|
1217
|
+
hidden: boolean;
|
|
1218
|
+
}>;
|
|
1219
|
+
/** The server user's home directory (where browsing starts). */
|
|
1220
|
+
home: string;
|
|
1221
|
+
/** Path separator of the server platform. */
|
|
1222
|
+
separator: "/" | "\\";
|
|
1223
|
+
/** More than the listing cap: the rest is not shown. */
|
|
1224
|
+
truncated?: boolean;
|
|
1225
|
+
}
|
|
1177
1226
|
/** A workspace known to the server (`GET /api/workspaces`). */
|
|
1178
1227
|
export interface WorkspaceInfo {
|
|
1179
1228
|
/** Opaque, stable id: a short sha256 of the canonical path. */
|
|
@@ -1184,10 +1233,17 @@ export interface WorkspaceInfo {
|
|
|
1184
1233
|
pinned: boolean;
|
|
1185
1234
|
/** An `Application` is open for it in the server right now. */
|
|
1186
1235
|
open: boolean;
|
|
1236
|
+
/**
|
|
1237
|
+
* The folder is still an accessible directory. A workspace known from old sessions may have been
|
|
1238
|
+
* deleted or moved: its sessions stay readable, but it cannot be opened (`workspace_missing`).
|
|
1239
|
+
*/
|
|
1240
|
+
exists: boolean;
|
|
1187
1241
|
/** Project resources load (trusted from the terminal or by a launch flag). */
|
|
1188
1242
|
trusted: boolean;
|
|
1189
1243
|
/** The directory has project resources that are not trusted (shown as "untrusted"). */
|
|
1190
1244
|
untrustedResources: boolean;
|
|
1245
|
+
/** Archived: hidden from the default list; its sessions stay readable, new ones are refused. */
|
|
1246
|
+
archived: boolean;
|
|
1191
1247
|
lastOpenedAt?: number;
|
|
1192
1248
|
}
|
|
1193
1249
|
/** Permission presets of the web composer (RF-08). */
|
|
@@ -1252,6 +1308,27 @@ export interface CommandOutcome {
|
|
|
1252
1308
|
effects?: string[];
|
|
1253
1309
|
duplicate?: boolean;
|
|
1254
1310
|
}
|
|
1311
|
+
/**
|
|
1312
|
+
* One `/btw` side question: a tool-less question about a session answered outside its
|
|
1313
|
+
* conversation (never persisted as messages, events, runs or session usage). Answer of
|
|
1314
|
+
* `POST /api/sessions/:sid/btw`; `GET /api/sessions/:sid/btw` lists them, oldest first.
|
|
1315
|
+
*/
|
|
1316
|
+
export interface SideQuestionEntry {
|
|
1317
|
+
id: string;
|
|
1318
|
+
question: string;
|
|
1319
|
+
/** Markdown answer. */
|
|
1320
|
+
answer: string;
|
|
1321
|
+
/** Model that answered (the session's model at the time). */
|
|
1322
|
+
model: string;
|
|
1323
|
+
usage: {
|
|
1324
|
+
input: number;
|
|
1325
|
+
output: number;
|
|
1326
|
+
};
|
|
1327
|
+
/** Epoch milliseconds. */
|
|
1328
|
+
createdAt: number;
|
|
1329
|
+
/** The provider cut the answer at the output-token budget. */
|
|
1330
|
+
truncated?: boolean;
|
|
1331
|
+
}
|
|
1255
1332
|
/** `GET /api/sessions/:sid/models`: models of the session's provider (credential-free). */
|
|
1256
1333
|
export interface SessionModels {
|
|
1257
1334
|
provider: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alisio/sdk",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.16",
|
|
4
4
|
"description": "Typed plugin SDK for Alisio: the stable contract for tools, commands, context, compaction and session hooks, model completions and storage. Types only plus tiny helpers; zero runtime dependencies.",
|
|
5
5
|
"author": "Gustavo Gutiérrez",
|
|
6
6
|
"license": "MIT",
|