@botharness/core 1.5.2 → 1.6.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/CHANGELOG.md +495 -1
- package/CHANGELOG.zh.md +495 -1
- package/cli/index.mjs +71086 -67555
- package/dist/folder-browse-worker-BfVjXz4j.d.mts +41 -0
- package/dist/folder-browse-worker.d.mts +2 -0
- package/dist/folder-browse-worker.mjs +102 -0
- package/dist/index.d.mts +1643 -62
- package/dist/index.mjs +104809 -96423
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ToolCallKind, ToolCallView, ToolDefinition, ToolExecution } from "@deepseek-ai/dsh-tools";
|
|
2
2
|
import { parseArgs } from "node:util";
|
|
3
3
|
import { DatabaseSync } from "node:sqlite";
|
|
4
|
-
import { BlockAssembler, ContextFormed, ToolCallId } from "@deepseek-ai/dsh-llm";
|
|
4
|
+
import { BlockAssembler, ContextFormed, HarnessError, ToolCallId } from "@deepseek-ai/dsh-llm";
|
|
5
5
|
import { Session, SessionId } from "@deepseek-ai/dsh-session";
|
|
6
6
|
import { Scoped } from "@deepseek-ai/dsh-scope";
|
|
7
7
|
import { Agent, AgentHandle, AssistantStreamFrame, CreateAgentOptions, ModelSelection, ResumeAgentOptions } from "@deepseek-ai/dsh-agent";
|
|
@@ -1216,6 +1216,7 @@ interface OperationalDatabaseDiagnostics {
|
|
|
1216
1216
|
databasePath: string;
|
|
1217
1217
|
generation?: number;
|
|
1218
1218
|
recovery?: OperationalDatabaseErrorDetails;
|
|
1219
|
+
foreignKeyOrphans?: string;
|
|
1219
1220
|
leaseHolder?: ProfileWriterLeaseMetadata;
|
|
1220
1221
|
databaseBytes: number;
|
|
1221
1222
|
walBytes: number;
|
|
@@ -1232,6 +1233,7 @@ interface OperationalDatabaseOwner {
|
|
|
1232
1233
|
readonly databasePath: string;
|
|
1233
1234
|
readonly generation: number | undefined;
|
|
1234
1235
|
readonly recovery: OperationalDatabaseErrorDetails | undefined;
|
|
1236
|
+
readonly foreignKeyOrphans?: string | undefined;
|
|
1235
1237
|
subscribe(listener: (notification: PostCommitNotification) => unknown): () => void;
|
|
1236
1238
|
diagnostics(): OperationalDatabaseDiagnostics;
|
|
1237
1239
|
close(): void;
|
|
@@ -1351,6 +1353,8 @@ interface IdleCompactionRoute {
|
|
|
1351
1353
|
interface IdleCompactionSettingsValue {
|
|
1352
1354
|
enabled: boolean;
|
|
1353
1355
|
cacheLifetimes: Record<string, number>;
|
|
1356
|
+
thresholdRatio?: number;
|
|
1357
|
+
headroomTokens?: number;
|
|
1354
1358
|
}
|
|
1355
1359
|
interface RouteCacheObservation {
|
|
1356
1360
|
warmGapMs?: number;
|
|
@@ -1361,6 +1365,10 @@ interface IdleCompactionSettings {
|
|
|
1361
1365
|
read(): IdleCompactionSettingsValue | 'invalid';
|
|
1362
1366
|
setEnabled(enabled: boolean): IdleCompactionSettingsValue;
|
|
1363
1367
|
setCacheLifetime(route: IdleCompactionRoute, seconds: number | null): IdleCompactionSettingsValue;
|
|
1368
|
+
setThreshold(threshold: {
|
|
1369
|
+
thresholdRatio?: number | null;
|
|
1370
|
+
headroomTokens?: number | null;
|
|
1371
|
+
}): IdleCompactionSettingsValue;
|
|
1364
1372
|
observations(): Record<string, RouteCacheObservation>;
|
|
1365
1373
|
saveObservation(key: string, observation: RouteCacheObservation): void;
|
|
1366
1374
|
}
|
|
@@ -1401,7 +1409,7 @@ interface ManualCompactionResult {
|
|
|
1401
1409
|
tokensAfter: number | null;
|
|
1402
1410
|
}
|
|
1403
1411
|
interface IdleCompaction {
|
|
1404
|
-
compactNow(sessionId: string): Promise<ManualCompactionResult>;
|
|
1412
|
+
compactNow(sessionId: string, runtimeReserved?: boolean): Promise<ManualCompactionResult>;
|
|
1405
1413
|
observeEvent(sessionId: string, event: DshSessionEvent): void;
|
|
1406
1414
|
agentStatus(sessionId: string, status: string): void;
|
|
1407
1415
|
rescan(sessionIds: readonly string[]): void;
|
|
@@ -1813,6 +1821,12 @@ type MemoryCloneResult = {
|
|
|
1813
1821
|
ok: false;
|
|
1814
1822
|
code: MemoryCloneFailureCode;
|
|
1815
1823
|
};
|
|
1824
|
+
declare function cloneMemoryRepository(input: {
|
|
1825
|
+
url: string;
|
|
1826
|
+
destination: string;
|
|
1827
|
+
timeoutMs?: number;
|
|
1828
|
+
probe?: () => GitAvailability;
|
|
1829
|
+
}): Promise<MemoryCloneResult>;
|
|
1816
1830
|
type MemoryRepositoryPreview = {
|
|
1817
1831
|
ok: true;
|
|
1818
1832
|
gitUrl: string;
|
|
@@ -2264,6 +2278,206 @@ type BotPrimaryColor = {
|
|
|
2264
2278
|
retained?: string;
|
|
2265
2279
|
};
|
|
2266
2280
|
//#endregion
|
|
2281
|
+
//#region packages/core/src/prompts/prompt-limits.d.ts
|
|
2282
|
+
declare const PROMPT_LIMITS: readonly [{
|
|
2283
|
+
readonly id: 'group-context-chars';
|
|
2284
|
+
readonly group: 'inbox';
|
|
2285
|
+
readonly defaultValue: 24000;
|
|
2286
|
+
readonly min: 2000;
|
|
2287
|
+
readonly max: 200000;
|
|
2288
|
+
}, {
|
|
2289
|
+
readonly id: 'dm-context-chars';
|
|
2290
|
+
readonly group: 'inbox';
|
|
2291
|
+
readonly defaultValue: 8000;
|
|
2292
|
+
readonly min: 1000;
|
|
2293
|
+
readonly max: 100000;
|
|
2294
|
+
}, {
|
|
2295
|
+
readonly id: 'context-message-chars';
|
|
2296
|
+
readonly group: 'inbox';
|
|
2297
|
+
readonly defaultValue: 1000;
|
|
2298
|
+
readonly min: 200;
|
|
2299
|
+
readonly max: 20000;
|
|
2300
|
+
}, {
|
|
2301
|
+
readonly id: 'review-timeout-seconds';
|
|
2302
|
+
readonly group: 'review';
|
|
2303
|
+
readonly defaultValue: 60;
|
|
2304
|
+
readonly min: 10;
|
|
2305
|
+
readonly max: 600;
|
|
2306
|
+
}, {
|
|
2307
|
+
readonly id: 'review-human-messages';
|
|
2308
|
+
readonly group: 'review';
|
|
2309
|
+
readonly defaultValue: 8;
|
|
2310
|
+
readonly min: 1;
|
|
2311
|
+
readonly max: 50;
|
|
2312
|
+
}, {
|
|
2313
|
+
readonly id: 'review-human-message-chars';
|
|
2314
|
+
readonly group: 'review';
|
|
2315
|
+
readonly defaultValue: 1500;
|
|
2316
|
+
readonly min: 200;
|
|
2317
|
+
readonly max: 20000;
|
|
2318
|
+
}, {
|
|
2319
|
+
readonly id: 'review-tool-calls';
|
|
2320
|
+
readonly group: 'review';
|
|
2321
|
+
readonly defaultValue: 12;
|
|
2322
|
+
readonly min: 1;
|
|
2323
|
+
readonly max: 100;
|
|
2324
|
+
}];
|
|
2325
|
+
type PromptLimitId = (typeof PROMPT_LIMITS)[number]['id'];
|
|
2326
|
+
type PromptLimitValues = Partial<Record<PromptLimitId, number>>;
|
|
2327
|
+
type PromptLimits = Record<PromptLimitId, number>;
|
|
2328
|
+
type PromptLimitEdits = Partial<Record<PromptLimitId, number | null>>;
|
|
2329
|
+
//#endregion
|
|
2330
|
+
//#region packages/core/src/prompts/prompt-parts.d.ts
|
|
2331
|
+
declare const PROMPT_PARTS: readonly [{
|
|
2332
|
+
readonly id: 'coordination';
|
|
2333
|
+
readonly kind: 'system';
|
|
2334
|
+
readonly section: 'botharness:orchestrator-role';
|
|
2335
|
+
readonly defaultText: 'You can orchestrate and coordinate a lot of work: answer yourself, ask or hand off to a person or Bot colleague, fold an item into an Assignment already serving the same goal, or open a new Assignment. Not everything needs an Assignment; a question, a memory update or a reply stays with you. Items belong together when they serve the same goal or deliverable, such as the same PR or the same feature, whoever sent them. Each turn, triage what is new and decide what each item needs.';
|
|
2336
|
+
}, {
|
|
2337
|
+
readonly id: 'progress-reporting';
|
|
2338
|
+
readonly kind: 'system';
|
|
2339
|
+
readonly section: 'botharness:orchestrator-role';
|
|
2340
|
+
readonly defaultText: 'Keep whoever asked able to tell where their request stands, from receipt to result:\n- Quick tasks: just answer; the answer is the acknowledgment.\n- Longer work (several tool calls, file edits, an Assignment, or waiting on someone): make your first call a short receipt with bot_send_message in that conversation, before any other tool, saying you saw it, what you will do and what comes next. One line is enough; a reaction through channel_action fits when no plan needs saying.\n- While it runs, report at real milestones: each phase or step the asker named once it is done (one line with its result), a useful partial result, a changed plan or expectation, a blocker or a question. Do not go silent from the receipt to the end or promise to report only once everything is done; do not narrate every tool call or post on a fixed cadence either.\n- Finish with the result or an explicit status: done, failed with why, or waiting on what. Never stop with work half done and no status. If the turn must end early (an approval is pending, a tool failed or timed out, a colleague did not wake, a limit was reached), say what is done, what is not, and what is needed to continue.';
|
|
2341
|
+
}, {
|
|
2342
|
+
readonly id: 'attention';
|
|
2343
|
+
readonly kind: 'system';
|
|
2344
|
+
readonly section: 'botharness:orchestrator-role';
|
|
2345
|
+
readonly defaultText: 'A Group mention draws your attention but does not require a public acknowledgment. An FYI about coworkers or the company can be useful context even when no reply or action is requested; finish such a turn without a Channel reply and resolve it as done.';
|
|
2346
|
+
}, {
|
|
2347
|
+
readonly id: 'file-placement';
|
|
2348
|
+
readonly kind: 'system';
|
|
2349
|
+
readonly section: 'botharness:orchestrator-role';
|
|
2350
|
+
readonly defaultText: "Unless the Human names a destination, never put scratch or generated files directly in the root of a Grant or in the Human's home directory; edit existing project files in place and add requested project files where the project expects them. Edit existing project files in place and create requested project files where the project expects them; put new scratch, logs, bundles and other generated artifacts under <workspacePath>/.botharness/<short-task-slug>/ (create it if missing), or the system temp directory for throwaway data; create a new top-level folder for these artifacts only when the Human names it. Keep Memory for distilled knowledge, not scratch.";
|
|
2351
|
+
}, {
|
|
2352
|
+
readonly id: 'asking-humans';
|
|
2353
|
+
readonly kind: 'system';
|
|
2354
|
+
readonly section: 'botharness:orchestrator-role';
|
|
2355
|
+
readonly defaultText: 'Ask like a colleague would. When an approval card needs context the Human does not already have, explain the action and why approval is needed using bot_send_message in the originating conversation. Decide whether that explanation is useful; an approval card does not require a separate acknowledgment or repeated notice. Write the reason of request_workspace_grant and the text of ask_user_question the same way, as you would say it to a colleague. If the answer is no or the ask expires, say so in that Channel and offer a next step. Ask only for what you cannot find out or decide yourself; when a missing detail is simple, ask it in plain words in the Channel instead of a card. Explain why you need the call and wait for the decision.';
|
|
2356
|
+
}, {
|
|
2357
|
+
readonly id: 'assignment-acceptance';
|
|
2358
|
+
readonly kind: 'system';
|
|
2359
|
+
readonly section: 'botharness:orchestrator-role';
|
|
2360
|
+
readonly defaultText: 'You delegated the Assignment, so you accept its result: when it reports completed, check the result against what you asked for; if it falls short, send it back with send_assignment_request saying what is missing and keep the item open, and resolve the item only once the result meets the ask. Report the outcome to a Human when the original request asked for a report or the Human is waiting on it. While a Human waits on delegated work, relay meaningful progress (a phase done, a blocker, a changed plan) in the conversation it came from rather than every report.';
|
|
2361
|
+
}, {
|
|
2362
|
+
readonly id: 'group-mentions';
|
|
2363
|
+
readonly kind: 'system';
|
|
2364
|
+
readonly section: 'botharness:orchestrator-role';
|
|
2365
|
+
readonly defaultText: 'A colleague may wake only on mentions, so mention it whenever you hand work over, send work back for another round, or report a result it is waiting for; every @ wakes it again, and a name without @ wakes no one. If bot_send_message returns notWoken, that colleague did not wake: tell the Humans where the work stands and what is needed instead of waiting silently.';
|
|
2366
|
+
}, {
|
|
2367
|
+
readonly id: 'schedule-confirmation';
|
|
2368
|
+
readonly kind: 'system';
|
|
2369
|
+
readonly section: 'botharness:orchestrator-role';
|
|
2370
|
+
readonly defaultText: 'Keep the confirmation concise, using the destination’s Human-facing name; omit internal IDs, Tool details and duplicate UTC timestamps unless requested. Briefly explain that the app running the Bot must stay running and firing may use the model.';
|
|
2371
|
+
}, {
|
|
2372
|
+
readonly id: 'silence';
|
|
2373
|
+
readonly kind: 'system';
|
|
2374
|
+
readonly section: 'botharness:reply-delivery';
|
|
2375
|
+
readonly defaultText: 'If no reply is wanted, remain silent. A cancellation ends the task: drop a held draft silently, without an acknowledgement unless requested.';
|
|
2376
|
+
}, {
|
|
2377
|
+
readonly id: 'peer-replies';
|
|
2378
|
+
readonly kind: 'system';
|
|
2379
|
+
readonly section: 'botharness:reply-delivery';
|
|
2380
|
+
readonly defaultText: 'These are internal decisions. Do not publish "nothing to add", an agreement, recap, promise, or an explanation of yielding or task ownership. 中文:没有新增内容就不发消息;无 held 草稿时直接结清已完成的 Inbox,有 held 草稿时才 drop。If a missing fact, independent evidence, correction, requested second opinion or new direct Human question still needs your answer, send that useful content without narrating this decision process. Repeated words do not make a new question already answered. A conditional "add anything missing" asks you to check, not acknowledge. Preserve explicit Human corrections and required constraints; do not turn them into speculative alternatives or confirmation questions unless supplied facts conflict. FYI needs no acknowledgment unless asked. Keep unfinished Inbox work open.';
|
|
2381
|
+
}, {
|
|
2382
|
+
readonly id: 'reply-reminder';
|
|
2383
|
+
readonly kind: 'turn';
|
|
2384
|
+
readonly section: 'turn';
|
|
2385
|
+
readonly defaultText: 'Use bot_send_message with a trusted reply source or explicit destination. Report only if useful. Assistant text is private.';
|
|
2386
|
+
}, {
|
|
2387
|
+
readonly id: 'group-mention-hint';
|
|
2388
|
+
readonly kind: 'turn';
|
|
2389
|
+
readonly section: 'turn';
|
|
2390
|
+
readonly defaultText: 'Decide whether a reply would be useful. You may finish without replying; if you speak in this Group Channel, use bot_send_message with the trusted source_event_id.';
|
|
2391
|
+
}, {
|
|
2392
|
+
readonly id: 'bot-dm-hint';
|
|
2393
|
+
readonly kind: 'turn';
|
|
2394
|
+
readonly section: 'turn';
|
|
2395
|
+
readonly defaultText: 'Decide whether a reply would be useful. You may finish without replying; if you speak in this Bot DM, use bot_send_message with this source_event_id.';
|
|
2396
|
+
}, {
|
|
2397
|
+
readonly id: 'digest-hint';
|
|
2398
|
+
readonly kind: 'turn';
|
|
2399
|
+
readonly section: 'turn';
|
|
2400
|
+
readonly defaultText: 'Review them and respond only if useful; no acknowledgment is required.';
|
|
2401
|
+
}, {
|
|
2402
|
+
readonly id: 'triage';
|
|
2403
|
+
readonly kind: 'turn';
|
|
2404
|
+
readonly section: 'turn';
|
|
2405
|
+
readonly defaultText: 'Give each one a destination: act on it now, resolve it with inbox_resolve once it is done or needs nothing more, snooze it with inbox_snooze when it waits on someone or a later time, or ignore noise. Check a completed Assignment report against what you asked for before resolving it. You are woken again while open items remain, unless a round leaves the open count unchanged.';
|
|
2406
|
+
}, {
|
|
2407
|
+
readonly id: 'external-bot-sender';
|
|
2408
|
+
readonly kind: 'turn';
|
|
2409
|
+
readonly section: 'turn';
|
|
2410
|
+
readonly defaultText: 'The sender is another Bot, not a Human: answer only when it moves the work forward, never just to acknowledge or thank it.';
|
|
2411
|
+
}];
|
|
2412
|
+
type PromptPartId = (typeof PROMPT_PARTS)[number]['id'];
|
|
2413
|
+
type PromptText = (id: PromptPartId) => string;
|
|
2414
|
+
type PromptPartTexts = Partial<Record<PromptPartId, string>>;
|
|
2415
|
+
//#endregion
|
|
2416
|
+
//#region packages/core/src/prompts/prompt-presets.d.ts
|
|
2417
|
+
interface PromptPartOverride {
|
|
2418
|
+
text: string;
|
|
2419
|
+
base: string;
|
|
2420
|
+
}
|
|
2421
|
+
type PromptPartOverrides = Partial<Record<PromptPartId, PromptPartOverride>>;
|
|
2422
|
+
interface PromptPreset {
|
|
2423
|
+
id: string;
|
|
2424
|
+
name: string;
|
|
2425
|
+
revision: number;
|
|
2426
|
+
parts: PromptPartOverrides;
|
|
2427
|
+
limits: PromptLimitValues;
|
|
2428
|
+
updatedAt: string;
|
|
2429
|
+
}
|
|
2430
|
+
type PromptPartSource = 'built-in' | 'global' | 'preset' | 'bot';
|
|
2431
|
+
interface ResolvedPromptPart {
|
|
2432
|
+
id: PromptPartId;
|
|
2433
|
+
kind: 'system' | 'turn';
|
|
2434
|
+
section: string;
|
|
2435
|
+
text: string;
|
|
2436
|
+
source: PromptPartSource;
|
|
2437
|
+
defaultText: string;
|
|
2438
|
+
defaultChanged: boolean;
|
|
2439
|
+
}
|
|
2440
|
+
type PromptPresetFailure = 'invalid-input' | 'not-found' | 'stale-revision' | 'duplicate-name' | 'unavailable';
|
|
2441
|
+
type PromptPresetResult<T> = {
|
|
2442
|
+
ok: true;
|
|
2443
|
+
value: T;
|
|
2444
|
+
} | {
|
|
2445
|
+
ok: false;
|
|
2446
|
+
reason: PromptPresetFailure;
|
|
2447
|
+
};
|
|
2448
|
+
type PromptPartEdits = Partial<Record<PromptPartId, string | null>>;
|
|
2449
|
+
interface PromptPresetLibrary {
|
|
2450
|
+
list(): PromptPreset[];
|
|
2451
|
+
get(id: string): PromptPreset | undefined;
|
|
2452
|
+
create(input: {
|
|
2453
|
+
name: string;
|
|
2454
|
+
parts?: PromptPartEdits;
|
|
2455
|
+
limits?: PromptLimitEdits;
|
|
2456
|
+
}): PromptPresetResult<PromptPreset>;
|
|
2457
|
+
update(id: string, input: {
|
|
2458
|
+
name?: string;
|
|
2459
|
+
parts?: PromptPartEdits;
|
|
2460
|
+
limits?: PromptLimitEdits;
|
|
2461
|
+
expectedRevision?: number;
|
|
2462
|
+
}): PromptPresetResult<PromptPreset>;
|
|
2463
|
+
delete(id: string): PromptPresetResult<{
|
|
2464
|
+
id: string;
|
|
2465
|
+
}>;
|
|
2466
|
+
globalPresetId(): string | undefined;
|
|
2467
|
+
setGlobalPresetId(id: string | undefined): PromptPresetResult<{
|
|
2468
|
+
presetId: string | null;
|
|
2469
|
+
}>;
|
|
2470
|
+
}
|
|
2471
|
+
interface ResolvedPromptLimit {
|
|
2472
|
+
id: PromptLimitId;
|
|
2473
|
+
group: 'inbox' | 'review';
|
|
2474
|
+
value: number;
|
|
2475
|
+
source: PromptPartSource;
|
|
2476
|
+
defaultValue: number;
|
|
2477
|
+
min: number;
|
|
2478
|
+
max: number;
|
|
2479
|
+
}
|
|
2480
|
+
//#endregion
|
|
2267
2481
|
//#region packages/core/src/bots/persona-bot.d.ts
|
|
2268
2482
|
interface PersonaBotRecord {
|
|
2269
2483
|
slug: string;
|
|
@@ -2291,6 +2505,14 @@ interface PersonaBotRecord {
|
|
|
2291
2505
|
browserProfile?: string;
|
|
2292
2506
|
approvalTemplate?: string;
|
|
2293
2507
|
standingLimits?: StandingLimits;
|
|
2508
|
+
marketplaceListing?: MarketplaceListingRef;
|
|
2509
|
+
promptPreset?: string;
|
|
2510
|
+
promptOverrides?: PromptPartOverrides;
|
|
2511
|
+
promptLimits?: PromptLimitValues;
|
|
2512
|
+
}
|
|
2513
|
+
interface MarketplaceListingRef {
|
|
2514
|
+
id: string;
|
|
2515
|
+
pushedAt: string;
|
|
2294
2516
|
}
|
|
2295
2517
|
interface CreatePersonaBotInput {
|
|
2296
2518
|
slug: string;
|
|
@@ -2345,9 +2567,358 @@ interface ZipEntry {
|
|
|
2345
2567
|
data: Buffer;
|
|
2346
2568
|
}
|
|
2347
2569
|
//#endregion
|
|
2570
|
+
//#region packages/core/src/telemetry/events.d.ts
|
|
2571
|
+
declare const TELEMETRY_SURFACES: readonly ['desktop_app', 'browser', 'mobile_remote', 'cli', 'bot_tool', 'im'];
|
|
2572
|
+
type TelemetrySurface = (typeof TELEMETRY_SURFACES)[number];
|
|
2573
|
+
declare const TELEMETRY_EVENTS: {
|
|
2574
|
+
readonly 'app:host_start': {
|
|
2575
|
+
readonly origin: 'host';
|
|
2576
|
+
readonly description: 'The Host process started with telemetry enabled.';
|
|
2577
|
+
readonly properties: {};
|
|
2578
|
+
};
|
|
2579
|
+
readonly 'app:usage_report': {
|
|
2580
|
+
readonly origin: 'host';
|
|
2581
|
+
readonly description: 'At most once per 24 hours: Bot count and Sessions and messages since the last report.';
|
|
2582
|
+
readonly properties: {
|
|
2583
|
+
readonly persona_bot_count: 'count';
|
|
2584
|
+
readonly session_count: 'count';
|
|
2585
|
+
readonly message_count: 'count';
|
|
2586
|
+
readonly window_hours: 'count';
|
|
2587
|
+
};
|
|
2588
|
+
};
|
|
2589
|
+
readonly 'app:active_day_start': {
|
|
2590
|
+
readonly origin: 'host';
|
|
2591
|
+
readonly description: 'First Human activity of the Host-local calendar day: entering Bot mode, a Human message or an IM message. Basis of DAU, WAU and MAU.';
|
|
2592
|
+
readonly properties: {
|
|
2593
|
+
readonly trigger: readonly ["bot_mode_enter", "message", "im_message"];
|
|
2594
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2595
|
+
};
|
|
2596
|
+
};
|
|
2597
|
+
readonly 'app:bot_mode_enter': {
|
|
2598
|
+
readonly origin: 'client';
|
|
2599
|
+
readonly description: 'The Web Client entered Bot mode, with the layout mode it opened in.';
|
|
2600
|
+
readonly properties: {
|
|
2601
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2602
|
+
readonly layout: readonly ["simple", "advanced"];
|
|
2603
|
+
};
|
|
2604
|
+
};
|
|
2605
|
+
readonly 'search:switcher_open': {
|
|
2606
|
+
readonly origin: 'client';
|
|
2607
|
+
readonly description: 'The quick switcher (search Channels, messages and settings) opened.';
|
|
2608
|
+
readonly properties: {
|
|
2609
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2610
|
+
};
|
|
2611
|
+
};
|
|
2612
|
+
readonly 'search:result_open': {
|
|
2613
|
+
readonly origin: 'client';
|
|
2614
|
+
readonly description: 'A quick switcher result was opened.';
|
|
2615
|
+
readonly properties: {
|
|
2616
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2617
|
+
readonly kind: readonly ["channel", "message", "setting"];
|
|
2618
|
+
};
|
|
2619
|
+
};
|
|
2620
|
+
readonly 'layout:mode_select': {
|
|
2621
|
+
readonly origin: 'client';
|
|
2622
|
+
readonly description: 'The Human chose Simple or Advanced layout mode in settings.';
|
|
2623
|
+
readonly properties: {
|
|
2624
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2625
|
+
readonly mode: readonly ["simple", "advanced"];
|
|
2626
|
+
};
|
|
2627
|
+
};
|
|
2628
|
+
readonly 'viewer:subpanel_open': {
|
|
2629
|
+
readonly origin: 'client';
|
|
2630
|
+
readonly description: "A PersonaBot's Browser or Computer viewer opened.";
|
|
2631
|
+
readonly properties: {
|
|
2632
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2633
|
+
readonly panel: readonly ["browser", "computer"];
|
|
2634
|
+
};
|
|
2635
|
+
};
|
|
2636
|
+
readonly 'activity:inbox_open': {
|
|
2637
|
+
readonly origin: 'client';
|
|
2638
|
+
readonly description: 'Activity Center (the Human Inbox) opened.';
|
|
2639
|
+
readonly properties: {
|
|
2640
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2641
|
+
};
|
|
2642
|
+
};
|
|
2643
|
+
readonly 'activity:approval_submit': {
|
|
2644
|
+
readonly origin: 'client';
|
|
2645
|
+
readonly description: 'The Human answered a tool approval.';
|
|
2646
|
+
readonly properties: {
|
|
2647
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2648
|
+
readonly decision: readonly ["allow_once", "allow_always", "reject"];
|
|
2649
|
+
};
|
|
2650
|
+
};
|
|
2651
|
+
readonly 'activity:question_submit': {
|
|
2652
|
+
readonly origin: 'client';
|
|
2653
|
+
readonly description: "The Human answered a Bot's question card.";
|
|
2654
|
+
readonly properties: {
|
|
2655
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2656
|
+
};
|
|
2657
|
+
};
|
|
2658
|
+
readonly 'activity:grant_request_submit': {
|
|
2659
|
+
readonly origin: 'client';
|
|
2660
|
+
readonly description: 'The Human granted a requested Workspace folder.';
|
|
2661
|
+
readonly properties: {
|
|
2662
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2663
|
+
};
|
|
2664
|
+
};
|
|
2665
|
+
readonly 'activity:inbox_reply_send': {
|
|
2666
|
+
readonly origin: 'client';
|
|
2667
|
+
readonly description: 'The Human replied to a message from Activity Center.';
|
|
2668
|
+
readonly properties: {
|
|
2669
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2670
|
+
readonly target: readonly ["message", "assignment"];
|
|
2671
|
+
};
|
|
2672
|
+
};
|
|
2673
|
+
readonly 'activity:inbox_item_dismiss': {
|
|
2674
|
+
readonly origin: 'client';
|
|
2675
|
+
readonly description: 'The Human dismissed an Activity Center item.';
|
|
2676
|
+
readonly properties: {
|
|
2677
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2678
|
+
};
|
|
2679
|
+
};
|
|
2680
|
+
readonly 'activity:inbox_item_snooze': {
|
|
2681
|
+
readonly origin: 'client';
|
|
2682
|
+
readonly description: 'The Human snoozed an Activity Center item.';
|
|
2683
|
+
readonly properties: {
|
|
2684
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2685
|
+
};
|
|
2686
|
+
};
|
|
2687
|
+
readonly 'model:plan_update': {
|
|
2688
|
+
readonly origin: 'client';
|
|
2689
|
+
readonly description: "A PersonaBot's model plan changed.";
|
|
2690
|
+
readonly properties: {
|
|
2691
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2692
|
+
readonly via: readonly ["preset", "custom", "assignments", "plan", "inherit"];
|
|
2693
|
+
};
|
|
2694
|
+
};
|
|
2695
|
+
readonly 'remote_host:host_pair_complete': {
|
|
2696
|
+
readonly origin: 'client';
|
|
2697
|
+
readonly description: 'The Web Client finished pairing with a Remote Host.';
|
|
2698
|
+
readonly properties: {
|
|
2699
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2700
|
+
readonly outcome: readonly ["success", "refused", "failed"];
|
|
2701
|
+
};
|
|
2702
|
+
};
|
|
2703
|
+
readonly 'remote_host:conversation_open': {
|
|
2704
|
+
readonly origin: 'client';
|
|
2705
|
+
readonly description: 'A conversation on a Remote Host opened in the Web Client.';
|
|
2706
|
+
readonly properties: {
|
|
2707
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2708
|
+
};
|
|
2709
|
+
};
|
|
2710
|
+
readonly 'connect:sign_in_start': {
|
|
2711
|
+
readonly origin: 'host';
|
|
2712
|
+
readonly description: 'Connect account sign-in started.';
|
|
2713
|
+
readonly properties: {};
|
|
2714
|
+
};
|
|
2715
|
+
readonly 'connect:sign_in_complete': {
|
|
2716
|
+
readonly origin: 'host';
|
|
2717
|
+
readonly description: 'Connect account sign-in finished.';
|
|
2718
|
+
readonly properties: {
|
|
2719
|
+
readonly outcome: readonly ["success", "denied", "expired"];
|
|
2720
|
+
};
|
|
2721
|
+
};
|
|
2722
|
+
readonly 'tob:delegation_send': {
|
|
2723
|
+
readonly origin: 'host';
|
|
2724
|
+
readonly description: 'Tob sent a message to a colleague PersonaBot (Tob Delegation).';
|
|
2725
|
+
readonly properties: {
|
|
2726
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2727
|
+
};
|
|
2728
|
+
};
|
|
2729
|
+
readonly 'bot_library:bot_create': {
|
|
2730
|
+
readonly origin: 'host';
|
|
2731
|
+
readonly description: 'A PersonaBot was created (blank, Git, Zip or Marketplace).';
|
|
2732
|
+
readonly properties: {};
|
|
2733
|
+
};
|
|
2734
|
+
readonly 'bot_library:bot_archive': {
|
|
2735
|
+
readonly origin: 'host';
|
|
2736
|
+
readonly description: 'A PersonaBot was paused (archived).';
|
|
2737
|
+
readonly properties: {};
|
|
2738
|
+
};
|
|
2739
|
+
readonly 'bot_library:bot_delete': {
|
|
2740
|
+
readonly origin: 'host';
|
|
2741
|
+
readonly description: 'A PersonaBot deletion started.';
|
|
2742
|
+
readonly properties: {};
|
|
2743
|
+
};
|
|
2744
|
+
readonly 'bot_profile:avatar_update': {
|
|
2745
|
+
readonly origin: 'host';
|
|
2746
|
+
readonly description: "A PersonaBot's avatar changed.";
|
|
2747
|
+
readonly properties: {};
|
|
2748
|
+
};
|
|
2749
|
+
readonly 'bot_profile:banner_update': {
|
|
2750
|
+
readonly origin: 'host';
|
|
2751
|
+
readonly description: "A PersonaBot's banner changed.";
|
|
2752
|
+
readonly properties: {};
|
|
2753
|
+
};
|
|
2754
|
+
readonly 'im:connector_enable': {
|
|
2755
|
+
readonly origin: 'host';
|
|
2756
|
+
readonly description: 'An IM connector was enabled for the first time.';
|
|
2757
|
+
readonly properties: {
|
|
2758
|
+
readonly type: readonly ["feishu", "lark", "slack", "discord", "weixin", "other"];
|
|
2759
|
+
};
|
|
2760
|
+
};
|
|
2761
|
+
readonly 'onboarding:tutorial_start': {
|
|
2762
|
+
readonly origin: 'host';
|
|
2763
|
+
readonly description: 'The getting-started tutorial started.';
|
|
2764
|
+
readonly properties: {};
|
|
2765
|
+
};
|
|
2766
|
+
readonly 'onboarding:tutorial_pause': {
|
|
2767
|
+
readonly origin: 'host';
|
|
2768
|
+
readonly description: 'The tutorial was paused.';
|
|
2769
|
+
readonly properties: {};
|
|
2770
|
+
};
|
|
2771
|
+
readonly 'onboarding:tutorial_skip': {
|
|
2772
|
+
readonly origin: 'host';
|
|
2773
|
+
readonly description: 'The tutorial was skipped.';
|
|
2774
|
+
readonly properties: {};
|
|
2775
|
+
};
|
|
2776
|
+
readonly 'onboarding:tutorial_resume': {
|
|
2777
|
+
readonly origin: 'host';
|
|
2778
|
+
readonly description: 'A paused tutorial continued.';
|
|
2779
|
+
readonly properties: {};
|
|
2780
|
+
};
|
|
2781
|
+
readonly 'onboarding:tutorial_restart': {
|
|
2782
|
+
readonly origin: 'host';
|
|
2783
|
+
readonly description: 'The tutorial restarted from the beginning.';
|
|
2784
|
+
readonly properties: {};
|
|
2785
|
+
};
|
|
2786
|
+
readonly 'onboarding:tutorial_complete': {
|
|
2787
|
+
readonly origin: 'host';
|
|
2788
|
+
readonly description: 'The tutorial finished.';
|
|
2789
|
+
readonly properties: {};
|
|
2790
|
+
};
|
|
2791
|
+
readonly 'onboarding:intro_view': {
|
|
2792
|
+
readonly origin: 'client';
|
|
2793
|
+
readonly description: 'The first-entry intro opened.';
|
|
2794
|
+
readonly properties: {
|
|
2795
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2796
|
+
};
|
|
2797
|
+
};
|
|
2798
|
+
readonly 'onboarding:intro_step_view': {
|
|
2799
|
+
readonly origin: 'client';
|
|
2800
|
+
readonly description: 'An intro step became visible.';
|
|
2801
|
+
readonly properties: {
|
|
2802
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2803
|
+
readonly step: readonly ["welcome", "theme", "model", "community", "start"];
|
|
2804
|
+
};
|
|
2805
|
+
};
|
|
2806
|
+
readonly 'onboarding:intro_dismiss': {
|
|
2807
|
+
readonly origin: 'client';
|
|
2808
|
+
readonly description: 'The intro closed before its last step.';
|
|
2809
|
+
readonly properties: {
|
|
2810
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2811
|
+
readonly step: readonly ["welcome", "theme", "model", "community", "start"];
|
|
2812
|
+
readonly via: readonly ["skip", "close"];
|
|
2813
|
+
};
|
|
2814
|
+
};
|
|
2815
|
+
readonly 'onboarding:intro_complete': {
|
|
2816
|
+
readonly origin: 'client';
|
|
2817
|
+
readonly description: 'The intro finished with a chosen starter.';
|
|
2818
|
+
readonly properties: {
|
|
2819
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2820
|
+
readonly starter: readonly ["botPrompt", "firstRequest", "exampleRequest", "own", "persona", "interview"];
|
|
2821
|
+
readonly persona: readonly ["engineer", "creator", "operator", "learner"];
|
|
2822
|
+
readonly feature: readonly ["bot", "group", "schedule", "browser", "memory", "im"];
|
|
2823
|
+
readonly is_engineer: 'boolean';
|
|
2824
|
+
readonly is_creator: 'boolean';
|
|
2825
|
+
readonly is_operator: 'boolean';
|
|
2826
|
+
readonly is_learner: 'boolean';
|
|
2827
|
+
readonly has_detail: 'boolean';
|
|
2828
|
+
};
|
|
2829
|
+
};
|
|
2830
|
+
readonly 'onboarding:persona_select': {
|
|
2831
|
+
readonly origin: 'client';
|
|
2832
|
+
readonly description: 'A starting persona was picked on the last intro step.';
|
|
2833
|
+
readonly properties: {
|
|
2834
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2835
|
+
readonly persona: readonly ["engineer", "creator", "operator", "learner"];
|
|
2836
|
+
};
|
|
2837
|
+
};
|
|
2838
|
+
readonly 'onboarding:persona_detail_select': {
|
|
2839
|
+
readonly origin: 'client';
|
|
2840
|
+
readonly description: 'A focus under a starting persona was picked on the last intro step.';
|
|
2841
|
+
readonly properties: {
|
|
2842
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2843
|
+
readonly persona: readonly ["engineer", "creator", "operator", "learner"];
|
|
2844
|
+
readonly detail: readonly ["frontend", "backend", "fullstack", "mobile", "data_ai", "devops", "video", "writing", "live", "marketing", "pm", "user_ops", "growth", "project", "founder", "student", "researcher", "exam", "career_switch"];
|
|
2845
|
+
};
|
|
2846
|
+
};
|
|
2847
|
+
readonly 'onboarding:theme_update': {
|
|
2848
|
+
readonly origin: 'client';
|
|
2849
|
+
readonly description: 'A theme setting changed in the intro.';
|
|
2850
|
+
readonly properties: {
|
|
2851
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2852
|
+
readonly setting: readonly ["scheme", "preset", "layout", "wallpaper"];
|
|
2853
|
+
};
|
|
2854
|
+
};
|
|
2855
|
+
readonly 'onboarding:model_save': {
|
|
2856
|
+
readonly origin: 'client';
|
|
2857
|
+
readonly description: 'The intro saved a model choice.';
|
|
2858
|
+
readonly properties: {
|
|
2859
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2860
|
+
readonly is_advanced: 'boolean';
|
|
2861
|
+
};
|
|
2862
|
+
};
|
|
2863
|
+
readonly 'onboarding:community_link_click': {
|
|
2864
|
+
readonly origin: 'client';
|
|
2865
|
+
readonly description: 'A community link was opened from the intro.';
|
|
2866
|
+
readonly properties: {
|
|
2867
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2868
|
+
readonly target: readonly ["github", "discord", "qq"];
|
|
2869
|
+
};
|
|
2870
|
+
};
|
|
2871
|
+
readonly 'marketplace:bot_install': {
|
|
2872
|
+
readonly origin: 'host';
|
|
2873
|
+
readonly description: 'A Marketplace Bot was installed.';
|
|
2874
|
+
readonly properties: {
|
|
2875
|
+
readonly entry: readonly ["list", "hot", "new", "rising", "digest"];
|
|
2876
|
+
};
|
|
2877
|
+
};
|
|
2878
|
+
readonly 'marketplace:section_view': {
|
|
2879
|
+
readonly origin: 'client';
|
|
2880
|
+
readonly description: 'The Hot, New and Rising rows were shown.';
|
|
2881
|
+
readonly properties: {
|
|
2882
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2883
|
+
};
|
|
2884
|
+
};
|
|
2885
|
+
readonly 'marketplace:bot_open': {
|
|
2886
|
+
readonly origin: 'client';
|
|
2887
|
+
readonly description: 'A Marketplace Bot was opened from a list, row or Digest.';
|
|
2888
|
+
readonly properties: {
|
|
2889
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2890
|
+
readonly entry: readonly ["list", "hot", "new", "rising", "digest"];
|
|
2891
|
+
readonly step: readonly ["detail", "install"];
|
|
2892
|
+
};
|
|
2893
|
+
};
|
|
2894
|
+
readonly 'marketplace:digest_view': {
|
|
2895
|
+
readonly origin: 'client';
|
|
2896
|
+
readonly description: 'The daily Digest hero card was shown.';
|
|
2897
|
+
readonly properties: {
|
|
2898
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2899
|
+
};
|
|
2900
|
+
};
|
|
2901
|
+
readonly 'marketplace:digest_open': {
|
|
2902
|
+
readonly origin: 'client';
|
|
2903
|
+
readonly description: 'A Digest article was opened.';
|
|
2904
|
+
readonly properties: {
|
|
2905
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2906
|
+
readonly entry: readonly ["hero", "archive"];
|
|
2907
|
+
};
|
|
2908
|
+
};
|
|
2909
|
+
readonly 'marketplace:digest_archive_open': {
|
|
2910
|
+
readonly origin: 'client';
|
|
2911
|
+
readonly description: 'The past Digests list was opened.';
|
|
2912
|
+
readonly properties: {
|
|
2913
|
+
readonly surface: readonly ["desktop_app", "browser", "mobile_remote", "cli", "bot_tool", "im"];
|
|
2914
|
+
};
|
|
2915
|
+
};
|
|
2916
|
+
};
|
|
2917
|
+
type TelemetryEventName = keyof typeof TELEMETRY_EVENTS;
|
|
2918
|
+
//#endregion
|
|
2348
2919
|
//#region packages/core/src/telemetry/service.d.ts
|
|
2349
2920
|
type TelemetryValue = string | number | boolean;
|
|
2350
|
-
type TelemetryCapture = (event:
|
|
2921
|
+
type TelemetryCapture = (event: TelemetryEventName, properties?: Record<string, TelemetryValue>) => void;
|
|
2351
2922
|
type TelemetryLock = 'config' | 'DO_NOT_TRACK' | 'BOTHARNESS_TELEMETRY';
|
|
2352
2923
|
interface TelemetryStatus {
|
|
2353
2924
|
enabled: boolean;
|
|
@@ -2411,6 +2982,12 @@ interface PersonaBotRegistry {
|
|
|
2411
2982
|
setBrowserAccess(slug: string, enabled: boolean): UpdatePersonaBotResult;
|
|
2412
2983
|
setBrowserProfile(slug: string, profile: string): UpdatePersonaBotResult;
|
|
2413
2984
|
setApprovalTemplate(slug: string, template: string | undefined): UpdatePersonaBotResult;
|
|
2985
|
+
setMarketplaceListing(slug: string, listing: MarketplaceListingRef): UpdatePersonaBotResult;
|
|
2986
|
+
setPromptSettings(slug: string, settings: {
|
|
2987
|
+
preset?: string | null;
|
|
2988
|
+
overrides?: PromptPartOverrides;
|
|
2989
|
+
limits?: PromptLimitValues;
|
|
2990
|
+
}): UpdatePersonaBotResult;
|
|
2414
2991
|
setStandingLimits(slug: string, limits: StandingLimits): UpdatePersonaBotResult;
|
|
2415
2992
|
inheritModel(slug: string, expectedRevision: number): UpdatePersonaBotResult;
|
|
2416
2993
|
applyModelPreset(slug: string, preset: ModelPreset): UpdatePersonaBotResult;
|
|
@@ -2545,7 +3122,7 @@ interface MessagingInboundEvent {
|
|
|
2545
3122
|
eventId: string;
|
|
2546
3123
|
messageId: string;
|
|
2547
3124
|
actor: {
|
|
2548
|
-
kind: 'user' | 'agent';
|
|
3125
|
+
kind: 'user' | 'agent' | 'bot';
|
|
2549
3126
|
id: string;
|
|
2550
3127
|
name?: string;
|
|
2551
3128
|
};
|
|
@@ -4425,6 +5002,25 @@ declare class ApprovalService extends Service {
|
|
|
4425
5002
|
private decide;
|
|
4426
5003
|
}
|
|
4427
5004
|
//#endregion
|
|
5005
|
+
//#region packages/core/src/channels/approval-history.d.ts
|
|
5006
|
+
interface ToolApprovalHistoryEntry {
|
|
5007
|
+
channelId: string;
|
|
5008
|
+
requestMessageId: string;
|
|
5009
|
+
decisionMessageId: string;
|
|
5010
|
+
requestedAt: string;
|
|
5011
|
+
decidedAt: string;
|
|
5012
|
+
toolName: string;
|
|
5013
|
+
role: 'orchestrator' | 'assignment';
|
|
5014
|
+
cwd: string;
|
|
5015
|
+
input: string;
|
|
5016
|
+
outcome: ToolApprovalDecision['outcome'];
|
|
5017
|
+
actor?: ToolApprovalActor;
|
|
5018
|
+
}
|
|
5019
|
+
interface ToolApprovalHistoryPosition {
|
|
5020
|
+
decidedAt: string;
|
|
5021
|
+
decisionMessageId: string;
|
|
5022
|
+
}
|
|
5023
|
+
//#endregion
|
|
4428
5024
|
//#region packages/core/src/channels/all-bot-mention.d.ts
|
|
4429
5025
|
interface AllBotPreview {
|
|
4430
5026
|
revision: string;
|
|
@@ -4535,10 +5131,17 @@ interface ChannelMessageOrigin {
|
|
|
4535
5131
|
sessionId: string;
|
|
4536
5132
|
sourceEventId?: string;
|
|
4537
5133
|
}
|
|
5134
|
+
interface ChannelRequestProgress {
|
|
5135
|
+
state: 'working' | 'completed' | 'failed' | 'unknown';
|
|
5136
|
+
terminal: boolean;
|
|
5137
|
+
updatedAt: string;
|
|
5138
|
+
}
|
|
4538
5139
|
interface ChannelSendStatus {
|
|
4539
5140
|
sourceEventId: string;
|
|
4540
5141
|
state: string;
|
|
5142
|
+
progress: ChannelRequestProgress;
|
|
4541
5143
|
replies: ChannelMessage[];
|
|
5144
|
+
assignmentId?: string;
|
|
4542
5145
|
}
|
|
4543
5146
|
interface ChannelMessageCommit {
|
|
4544
5147
|
channelId: string;
|
|
@@ -4581,6 +5184,21 @@ interface ChannelMessageQueryPage {
|
|
|
4581
5184
|
messages: ChannelMessage[];
|
|
4582
5185
|
nextCursor?: string;
|
|
4583
5186
|
}
|
|
5187
|
+
interface HumanMessageSearchRequest {
|
|
5188
|
+
text: string;
|
|
5189
|
+
limit: number;
|
|
5190
|
+
cursor?: string;
|
|
5191
|
+
excludeChannelIds?: readonly string[];
|
|
5192
|
+
}
|
|
5193
|
+
interface HumanMessageSearchHit {
|
|
5194
|
+
channelId: string;
|
|
5195
|
+
message: ChannelMessage;
|
|
5196
|
+
snippet: string;
|
|
5197
|
+
}
|
|
5198
|
+
interface HumanMessageSearchPage {
|
|
5199
|
+
hits: HumanMessageSearchHit[];
|
|
5200
|
+
nextCursor?: string;
|
|
5201
|
+
}
|
|
4584
5202
|
interface CreateChannelGroupInput {
|
|
4585
5203
|
id?: string;
|
|
4586
5204
|
name: string;
|
|
@@ -4687,6 +5305,7 @@ interface ChannelStore {
|
|
|
4687
5305
|
readMessages(id: string, options?: ChannelReadOptions): ChannelMessage[];
|
|
4688
5306
|
queryMessages(id: string, options?: ChannelMessageQueryOptions): ChannelMessageQueryPage;
|
|
4689
5307
|
searchHumanMessages?(id: string, options: Pick<ChannelMessageQueryOptions, 'text' | 'cursor' | 'limit'>): ChannelMessageQueryPage | undefined;
|
|
5308
|
+
searchAllHumanMessages?(request: HumanMessageSearchRequest): HumanMessageSearchPage;
|
|
4690
5309
|
readTimeline(id: string, request?: ChannelTimelineRequest): ChannelTimelinePage | undefined;
|
|
4691
5310
|
readHumanTimeline(id: string, request?: ChannelTimelineRequest): ChannelTimelinePage | undefined;
|
|
4692
5311
|
readHumanJournalPage(id: string, request: ChannelJournalRequest): ChannelJournalPage | undefined;
|
|
@@ -4703,6 +5322,10 @@ interface ChannelStore {
|
|
|
4703
5322
|
at: string;
|
|
4704
5323
|
reason: string;
|
|
4705
5324
|
}>;
|
|
5325
|
+
toolApprovalHistory?(botSlug: string, page: {
|
|
5326
|
+
after?: ToolApprovalHistoryPosition;
|
|
5327
|
+
limit: number;
|
|
5328
|
+
}): ToolApprovalHistoryEntry[];
|
|
4706
5329
|
}
|
|
4707
5330
|
interface ChannelOutputObservation {
|
|
4708
5331
|
position?: number;
|
|
@@ -4768,11 +5391,14 @@ interface SessionOwnership {
|
|
|
4768
5391
|
resolve(sessionId: string): SessionOwnershipRecord | undefined;
|
|
4769
5392
|
rootsFor(botSlug: string, rootRole?: SessionRootRole): SessionOwnershipRecord[];
|
|
4770
5393
|
descendantsOf(sessionId: string): SessionOwnershipRecord[];
|
|
5394
|
+
subagentCounts(sessionIds: readonly string[]): Map<string, number>;
|
|
4771
5395
|
repair(input: SessionOwnershipRepair): SessionOwnershipRecord;
|
|
4772
5396
|
repairRevision(sessionId: string): number;
|
|
4773
5397
|
personaSnapshot(sessionId: string): SessionPersonaSnapshot | undefined;
|
|
4774
5398
|
recordPersonaSnapshot(sessionId: string, body: string, at: string): SessionPersonaSnapshot;
|
|
4775
5399
|
refreshPersonaSnapshot(sessionId: string, body: string, at: string): SessionPersonaSnapshot;
|
|
5400
|
+
promptSnapshot(sessionId: string): string | undefined;
|
|
5401
|
+
writePromptSnapshot(sessionId: string, body: string, replace: boolean): string;
|
|
4776
5402
|
list(): SessionOwnershipRecord[];
|
|
4777
5403
|
}
|
|
4778
5404
|
export declare function createSessionOwnership(database: OperationalDatabaseModulePort): SessionOwnership;
|
|
@@ -4790,6 +5416,7 @@ interface ToolApprovalRule {
|
|
|
4790
5416
|
createdAt: string;
|
|
4791
5417
|
revokedAt?: string;
|
|
4792
5418
|
externalCreator?: ToolApprovalActor;
|
|
5419
|
+
autoApprovedCount: number;
|
|
4793
5420
|
}
|
|
4794
5421
|
interface ToolApprovalRuleStore {
|
|
4795
5422
|
list(botSlug: string): ToolApprovalRule[];
|
|
@@ -4797,6 +5424,7 @@ interface ToolApprovalRuleStore {
|
|
|
4797
5424
|
externalDecision?: 'operation' | 'web-only' | 'each-use';
|
|
4798
5425
|
explicitOnly?: boolean;
|
|
4799
5426
|
}): ToolApprovalRule | undefined;
|
|
5427
|
+
recordAutoApproval(botSlug: string, id: string): void;
|
|
4800
5428
|
createPending(input: Pick<ToolApprovalRule, 'botSlug' | 'role' | 'scopeKey' | 'kind' | 'toolName' | 'input' | 'externalCreator'>): ToolApprovalRule;
|
|
4801
5429
|
activate(botSlug: string, id: string): void;
|
|
4802
5430
|
revoke(botSlug: string, id: string): ToolApprovalRule | undefined;
|
|
@@ -4862,6 +5490,11 @@ interface ApprovalSessionExcerpt {
|
|
|
4862
5490
|
input: string;
|
|
4863
5491
|
}[];
|
|
4864
5492
|
}
|
|
5493
|
+
interface ApprovalExcerptLimits {
|
|
5494
|
+
humanMessages: number;
|
|
5495
|
+
humanMessageChars: number;
|
|
5496
|
+
toolCalls: number;
|
|
5497
|
+
}
|
|
4865
5498
|
//#endregion
|
|
4866
5499
|
//#region packages/core/src/workspaces/tool-approval.d.ts
|
|
4867
5500
|
interface BotCreatePreview {
|
|
@@ -4900,6 +5533,7 @@ interface ToolAutoApproval {
|
|
|
4900
5533
|
} | undefined;
|
|
4901
5534
|
templateInUse?(template: string): boolean;
|
|
4902
5535
|
review(request: ApprovalReviewRequest): Promise<ApprovalReviewResult>;
|
|
5536
|
+
excerptLimits?(botSlug: string): ApprovalExcerptLimits;
|
|
4903
5537
|
log(entry: {
|
|
4904
5538
|
botSlug: string;
|
|
4905
5539
|
template: string;
|
|
@@ -4939,6 +5573,7 @@ declare class ChannelToolApproval {
|
|
|
4939
5573
|
validAfterDecision(agent: Agent, callId: string): boolean;
|
|
4940
5574
|
approvedExecutionGuard(agent: Agent, callId: string): ((name: string, args: unknown) => boolean) | undefined;
|
|
4941
5575
|
usesStandingRule(agent: Agent, callId: string): boolean;
|
|
5576
|
+
cancelChannel(channelId: string): void;
|
|
4942
5577
|
cancelInvalid(): void;
|
|
4943
5578
|
subscribe(listener: (notice: ToolApprovalNotice, status: 'pending' | ApprovalOutcome) => void): () => void;
|
|
4944
5579
|
remembered(agent: Agent, callId: string): boolean;
|
|
@@ -5170,6 +5805,7 @@ declare class ChannelUserQuestions {
|
|
|
5170
5805
|
reconcileSession(sessionId: string): Promise<void>;
|
|
5171
5806
|
discardReply(sessionId: string, callId: string): void;
|
|
5172
5807
|
close(): void;
|
|
5808
|
+
cancelChannel(channelId: string): void;
|
|
5173
5809
|
}
|
|
5174
5810
|
declare namespace json_schema_d_exports {
|
|
5175
5811
|
export { ArraySchema, BaseSchema, BooleanSchema, IntegerSchema, JSONSchema, NullSchema, NumberSchema, ObjectSchema, Schema, StringSchema, _JSONSchema };
|
|
@@ -11093,6 +11729,7 @@ interface TobSettingsProvider {
|
|
|
11093
11729
|
interface TobService {
|
|
11094
11730
|
ensure(): Promise<TobHome>;
|
|
11095
11731
|
isTob(slug: string): boolean;
|
|
11732
|
+
slug(): string | undefined;
|
|
11096
11733
|
readSetting(): TobSetting;
|
|
11097
11734
|
writeSetting(value: number, expectedRevision: number, authorize: () => void): Promise<TobSetting>;
|
|
11098
11735
|
}
|
|
@@ -11287,6 +11924,11 @@ interface TextCleanupResult {
|
|
|
11287
11924
|
freedBytes: number;
|
|
11288
11925
|
cleanupPending?: number;
|
|
11289
11926
|
}
|
|
11927
|
+
interface GroupDisbandResult {
|
|
11928
|
+
messages: number;
|
|
11929
|
+
cleanupPending?: number;
|
|
11930
|
+
retained?: number;
|
|
11931
|
+
}
|
|
11290
11932
|
interface ContentPurge {
|
|
11291
11933
|
redactions(): PurgedPlacement[];
|
|
11292
11934
|
history(): ChannelHistoryItem[];
|
|
@@ -11301,6 +11943,7 @@ interface ContentPurge {
|
|
|
11301
11943
|
};
|
|
11302
11944
|
textPreview(scope: TextCleanupScope): TextCleanupPreview;
|
|
11303
11945
|
textConfirm(scope: TextCleanupScope, token: string): TextCleanupResult;
|
|
11946
|
+
disband(channelId: string): GroupDisbandResult;
|
|
11304
11947
|
checkpoint(): PurgeCheckpoint;
|
|
11305
11948
|
withCheckpoint<T>(exportSnapshot: (checkpoint: PurgeCheckpoint) => T): T;
|
|
11306
11949
|
close(): void;
|
|
@@ -11494,6 +12137,9 @@ declare class GroupSendReview {
|
|
|
11494
12137
|
}): SendReviewOutcome | undefined;
|
|
11495
12138
|
}
|
|
11496
12139
|
//#endregion
|
|
12140
|
+
//#region packages/core/src/runtime/session-recovery.d.ts
|
|
12141
|
+
type SessionRecoveryAction = 'compact' | 'new-session';
|
|
12142
|
+
//#endregion
|
|
11497
12143
|
//#region packages/core/src/runtime/assignment-wait.d.ts
|
|
11498
12144
|
interface AssignmentWaitOutcome {
|
|
11499
12145
|
outcome: 'report' | 'settled' | 'timeout';
|
|
@@ -11548,7 +12194,7 @@ interface BotAttentionItem {
|
|
|
11548
12194
|
sourceChannelName?: string;
|
|
11549
12195
|
sourceMessageId?: string;
|
|
11550
12196
|
assignmentSessionId?: string;
|
|
11551
|
-
|
|
12197
|
+
assignmentTitle?: string;
|
|
11552
12198
|
assignmentReportState?: 'progress' | 'completed' | 'blocked' | 'waiting-human' | 'failed';
|
|
11553
12199
|
assignmentTurn?: number;
|
|
11554
12200
|
relatedReportSourceEventId?: string;
|
|
@@ -11948,7 +12594,7 @@ interface MemoryAcceptance {
|
|
|
11948
12594
|
sha: string;
|
|
11949
12595
|
diff: string;
|
|
11950
12596
|
};
|
|
11951
|
-
gitGraph(botSlug: string, offset?: number): MemoryGitGraph;
|
|
12597
|
+
gitGraph(botSlug: string, offset?: number, path?: string): MemoryGitGraph;
|
|
11952
12598
|
gitCommitDiff(botSlug: string, sha: string): MemoryGitCommitDiff;
|
|
11953
12599
|
workingChanges(botSlug: string): MemoryWorkingChange[];
|
|
11954
12600
|
workingDiff(botSlug: string, path: string, kind: MemoryWorkingKind): MemoryWorkingDiff;
|
|
@@ -12116,6 +12762,7 @@ interface MemoryService extends MemoryAcceptance, ReturnType<typeof createMemory
|
|
|
12116
12762
|
refreshPersonaAfterCompaction(botSlug: string, sessionId: string): {
|
|
12117
12763
|
refreshed: boolean;
|
|
12118
12764
|
};
|
|
12765
|
+
personaPending?(sessionId: string): boolean;
|
|
12119
12766
|
memoryDirFor(sessionId: string | undefined): string | undefined;
|
|
12120
12767
|
repositoryFor(sessionId: string | undefined): MemoryRepositoryInspection | undefined;
|
|
12121
12768
|
overviewActivity?(after?: string): Promise<OverviewMemory>;
|
|
@@ -12259,7 +12906,8 @@ interface AssignmentOpenAsk {
|
|
|
12259
12906
|
}
|
|
12260
12907
|
interface AssignmentSummary {
|
|
12261
12908
|
sessionId: string;
|
|
12262
|
-
|
|
12909
|
+
title: string;
|
|
12910
|
+
description: string;
|
|
12263
12911
|
activity: AssignmentActivity;
|
|
12264
12912
|
executionWait?: AssignmentExecutionWait;
|
|
12265
12913
|
latestReport?: AssignmentReport;
|
|
@@ -12306,9 +12954,12 @@ interface NativeSessionArchive {
|
|
|
12306
12954
|
interface ChannelAssignmentSummary {
|
|
12307
12955
|
sessionId: string;
|
|
12308
12956
|
botSlug: string;
|
|
12309
|
-
|
|
12957
|
+
title: string;
|
|
12958
|
+
description: string;
|
|
12310
12959
|
activity: AssignmentActivity;
|
|
12311
12960
|
latestReport?: AssignmentReport;
|
|
12961
|
+
modelRoute?: ModelRoute;
|
|
12962
|
+
subagentCount?: number;
|
|
12312
12963
|
createdAt: string;
|
|
12313
12964
|
updatedAt: string;
|
|
12314
12965
|
}
|
|
@@ -12358,7 +13009,9 @@ type AssignmentRequestOutcome = {
|
|
|
12358
13009
|
interface OrchestratorAssignmentAccess {
|
|
12359
13010
|
wait?(sessionId: string, signal: AbortSignal, timeoutMs?: number): Promise<AssignmentWaitOutcome>;
|
|
12360
13011
|
create(input: {
|
|
12361
|
-
|
|
13012
|
+
title: string;
|
|
13013
|
+
description: string;
|
|
13014
|
+
instructions?: string;
|
|
12362
13015
|
key?: string;
|
|
12363
13016
|
grantId: string;
|
|
12364
13017
|
model?: ModelRoute;
|
|
@@ -12489,7 +13142,7 @@ interface AssignmentAgentRun {
|
|
|
12489
13142
|
requireContent?(): void;
|
|
12490
13143
|
sessionId: string;
|
|
12491
13144
|
bot: PersonaBotRecord;
|
|
12492
|
-
|
|
13145
|
+
text: string;
|
|
12493
13146
|
resume?: boolean;
|
|
12494
13147
|
permission: AssignmentPermissionSnapshot;
|
|
12495
13148
|
modelRoute?: ModelRoute;
|
|
@@ -12741,6 +13394,7 @@ interface DirectBotToolCall {
|
|
|
12741
13394
|
}
|
|
12742
13395
|
interface BotAgentAdapter {
|
|
12743
13396
|
runOrchestrator(run: OrchestratorAgentRun): Promise<void>;
|
|
13397
|
+
loadOrchestrator?(run: OrchestratorAgentRun): Promise<void>;
|
|
12744
13398
|
steerOrchestrator?(botSlug: string, text: string): boolean;
|
|
12745
13399
|
stopOrchestratorTurn?(botSlug: string): string | undefined;
|
|
12746
13400
|
runAssignment(run: AssignmentAgentRun): Promise<void>;
|
|
@@ -12788,6 +13442,13 @@ interface BotRuntime {
|
|
|
12788
13442
|
originalAttachmentRoot?(sessionId: string, path: string, kind: 'read' | 'write', shell?: boolean): string | undefined;
|
|
12789
13443
|
reconcileMemoryChangesOnStartup?(): void;
|
|
12790
13444
|
retryDmMessage?(channelId: string, messageId: string): Promise<void>;
|
|
13445
|
+
recoverDmMessage?(input: {
|
|
13446
|
+
channelId: string;
|
|
13447
|
+
failureMessageId: string;
|
|
13448
|
+
action: SessionRecoveryAction;
|
|
13449
|
+
compact(sessionId: string): Promise<boolean>;
|
|
13450
|
+
}): Promise<void>;
|
|
13451
|
+
compactOrchestrator?<T>(botSlug: string, compact: (sessionId: string) => Promise<T>): Promise<T>;
|
|
12791
13452
|
admitDmMessage(input: HandleDmMessageInput): DmMessageAdmission;
|
|
12792
13453
|
admitGroupMessage(channelId: string, messageId: string): void;
|
|
12793
13454
|
retryGroupMessageAdmission?(channelId: string, messageId: string): void;
|
|
@@ -12804,7 +13465,7 @@ interface BotRuntime {
|
|
|
12804
13465
|
hasPendingInbox?(botSlug: string): boolean;
|
|
12805
13466
|
directBotTools?(): DirectBotToolSpec[];
|
|
12806
13467
|
directBotToolCalls?(botSlug: string): readonly DirectBotToolCall[];
|
|
12807
|
-
runDirectBotTool?(botSlug: string, tool: string, args: Record<string, unknown>, signal: AbortSignal): Promise<{
|
|
13468
|
+
runDirectBotTool?(botSlug: string, tool: string, args: Record<string, unknown>, signal: AbortSignal, parentSessionId?: string): Promise<{
|
|
12808
13469
|
tool: string;
|
|
12809
13470
|
sessionId: 'direct';
|
|
12810
13471
|
result: unknown;
|
|
@@ -12823,10 +13484,14 @@ interface BotRuntime {
|
|
|
12823
13484
|
stopTurn?(botSlug: string): Promise<{
|
|
12824
13485
|
sessionId: string;
|
|
12825
13486
|
} | undefined>;
|
|
13487
|
+
endGroup?(channelId: string): Promise<void>;
|
|
12826
13488
|
whenIdle(): Promise<void>;
|
|
12827
13489
|
close(): Promise<void>;
|
|
12828
13490
|
}
|
|
12829
13491
|
interface BotRuntimeOptions {
|
|
13492
|
+
onTobDelegation?: () => void;
|
|
13493
|
+
promptText?: (botSlug: string) => PromptText;
|
|
13494
|
+
promptLimits?: (botSlug: string) => PromptLimits;
|
|
12830
13495
|
tob?: TobService;
|
|
12831
13496
|
inboxHistory?: InboxHistoryQuery;
|
|
12832
13497
|
triageContinuation?: boolean;
|
|
@@ -12892,9 +13557,15 @@ interface DshBotAgentAdapterOptions {
|
|
|
12892
13557
|
ensureWorkspace?: (path: string) => void;
|
|
12893
13558
|
publishDraft?: (event: ChannelDraftEvent) => void;
|
|
12894
13559
|
authorizeBorrow?: (agent: Agent, role: 'orchestrator' | 'assignment') => void;
|
|
13560
|
+
admitSession?: (agent: Agent) => void;
|
|
12895
13561
|
onOrchestratorFileSetup?: (agentCtx: Context, agent: Agent) => Promise<() => Promise<void>>;
|
|
12896
13562
|
onAgentSetup?: (agentCtx: Context, agent: Agent, info: BotAgentSetupInfo) => void;
|
|
12897
13563
|
observeTurnFailure?: (provider: string, code: string) => void;
|
|
13564
|
+
turnRefusal?: (sessionId: string) => string | undefined;
|
|
13565
|
+
promptText?: (sessionId: string) => PromptText;
|
|
13566
|
+
preparationTimeoutMs?: number;
|
|
13567
|
+
preparationVisibleMs?: number;
|
|
13568
|
+
observePreparation?: (botSlug: string, sessionId: string, preparing: boolean) => void;
|
|
12898
13569
|
}
|
|
12899
13570
|
interface BotAgentSetupInfo {
|
|
12900
13571
|
readonly botSlug: string;
|
|
@@ -12905,6 +13576,8 @@ interface DshDefaultModelHost {
|
|
|
12905
13576
|
}
|
|
12906
13577
|
export declare function createDshBotAgentAdapter(options: DshBotAgentAdapterOptions): BotAgentAdapter & {
|
|
12907
13578
|
acceptAssistantStream(sessionId: string, frame: AssistantStreamFrame): void;
|
|
13579
|
+
forgetAgent(agent: Agent): void;
|
|
13580
|
+
modelSelection(sessionId: string): ModelSelection | undefined;
|
|
12908
13581
|
};
|
|
12909
13582
|
//#endregion
|
|
12910
13583
|
//#region packages/core/src/bots/deletion.d.ts
|
|
@@ -13710,6 +14383,7 @@ export declare class RosterStore {
|
|
|
13710
14383
|
sectionRename(sectionId: string, name: string): Promise<RosterSection>;
|
|
13711
14384
|
sectionRemove(sectionId: string): Promise<boolean>;
|
|
13712
14385
|
channelAssign(channelId: string, sectionId: string | undefined, index?: number): Promise<void>;
|
|
14386
|
+
channelForget(channelId: string): Promise<void>;
|
|
13713
14387
|
sectionReorder(order: readonly string[]): Promise<string[]>;
|
|
13714
14388
|
topReorder(order: readonly TopOrderEntry[]): Promise<TopOrderEntry[]>;
|
|
13715
14389
|
applyBatch(change: RosterBatchChange, resolvePin?: (pin: string) => string): Promise<RosterSnapshot>;
|
|
@@ -13738,6 +14412,8 @@ interface HumanAssignmentReport {
|
|
|
13738
14412
|
interface HumanAssignmentContext {
|
|
13739
14413
|
botSlug: string;
|
|
13740
14414
|
sessionId: string;
|
|
14415
|
+
title: string;
|
|
14416
|
+
description: string;
|
|
13741
14417
|
purpose: string;
|
|
13742
14418
|
sourceEventId: string;
|
|
13743
14419
|
reports: HumanAssignmentReport[];
|
|
@@ -13958,6 +14634,11 @@ interface SessionUsageSummary {
|
|
|
13958
14634
|
interface UsageProjection {
|
|
13959
14635
|
handleSessionEvent(sessionId: string, event: DshSessionEvent): void;
|
|
13960
14636
|
primeSession(sessionId: string, events: readonly DshSessionEvent[]): void;
|
|
14637
|
+
latestRoute(sessionId: string): {
|
|
14638
|
+
provider: string;
|
|
14639
|
+
model: string;
|
|
14640
|
+
reasoningEffort?: string;
|
|
14641
|
+
} | undefined;
|
|
13961
14642
|
rebuild(sessionIds: readonly string[], readLog: DshUsageSessionLogReader): Promise<UsageRebuildReport>;
|
|
13962
14643
|
activity(botSlug: string, sinceIso: string): UsageDayRow[];
|
|
13963
14644
|
query(botSlug: string, filter: UsageFilter): UsageQueryResult;
|
|
@@ -13979,6 +14660,20 @@ interface BotSubagentPresetConfig {
|
|
|
13979
14660
|
allowedAgentPresets?: string[] | undefined;
|
|
13980
14661
|
}
|
|
13981
14662
|
//#endregion
|
|
14663
|
+
//#region packages/core/src/prompts/prompt-settings.d.ts
|
|
14664
|
+
interface PromptSettings {
|
|
14665
|
+
library: PromptPresetLibrary;
|
|
14666
|
+
resolved(botSlug: string): ResolvedPromptPart[];
|
|
14667
|
+
resolvedLimits(botSlug: string): ResolvedPromptLimit[];
|
|
14668
|
+
limits(botSlug: string): PromptLimits;
|
|
14669
|
+
textForSession(sessionId: string): PromptText;
|
|
14670
|
+
snapshotTexts(sessionId: string): PromptPartTexts | undefined;
|
|
14671
|
+
refreshAfterCompaction(sessionId: string): {
|
|
14672
|
+
refreshed: boolean;
|
|
14673
|
+
};
|
|
14674
|
+
pending(botSlug: string, sessionId: string | undefined): boolean;
|
|
14675
|
+
}
|
|
14676
|
+
//#endregion
|
|
13982
14677
|
//#region packages/core/src/plugin.d.ts
|
|
13983
14678
|
export declare const name = "botharness-core";
|
|
13984
14679
|
export declare const inject: string[];
|
|
@@ -13996,6 +14691,7 @@ interface BotHarnessConfig {
|
|
|
13996
14691
|
export declare const DEFAULT_CONFIG: BotHarnessConfig;
|
|
13997
14692
|
export declare const Config: Schema$1<BotHarnessConfig>;
|
|
13998
14693
|
interface BotHarnessCore {
|
|
14694
|
+
prompts: PromptSettings;
|
|
13999
14695
|
profileRecovery: ProfileRecovery;
|
|
14000
14696
|
rootDir: string;
|
|
14001
14697
|
onboarding: BotOnboarding;
|
|
@@ -14078,16 +14774,82 @@ declare module '@deepseek-ai/cordis' {
|
|
|
14078
14774
|
}
|
|
14079
14775
|
//#endregion
|
|
14080
14776
|
//#region packages/core/src/portability/package.d.ts
|
|
14081
|
-
declare const manifestSchema: ZodObject<{
|
|
14777
|
+
declare const manifestSchema: ZodDiscriminatedUnion<[ZodObject<{
|
|
14082
14778
|
format: ZodLiteral<"botharness-backup">;
|
|
14083
|
-
version: ZodLiteral<1>;
|
|
14084
14779
|
id: ZodUUID;
|
|
14085
14780
|
createdAt: ZodISODateTime;
|
|
14086
14781
|
schemaGeneration: ZodNumber;
|
|
14782
|
+
sessions: ZodObject<{
|
|
14783
|
+
status: ZodLiteral<"unsupported">;
|
|
14784
|
+
count: ZodNumber;
|
|
14785
|
+
reason: ZodLiteral<"No portable Session Persistence adapter">;
|
|
14786
|
+
}, $strict>;
|
|
14787
|
+
memories: ZodArray<ZodObject<{
|
|
14788
|
+
slug: ZodString;
|
|
14789
|
+
repository: ZodString;
|
|
14790
|
+
disposition: ZodEnum<{
|
|
14791
|
+
erased: "erased";
|
|
14792
|
+
retained: "retained";
|
|
14793
|
+
}>;
|
|
14794
|
+
}, $strict>>;
|
|
14795
|
+
dependencies: ZodArray<ZodObject<{
|
|
14796
|
+
kind: ZodString;
|
|
14797
|
+
scope: ZodString;
|
|
14798
|
+
reference: ZodString;
|
|
14799
|
+
required: ZodBoolean;
|
|
14800
|
+
contract: ZodString;
|
|
14801
|
+
}, $strict>>;
|
|
14802
|
+
purge: ZodObject<{
|
|
14803
|
+
format: ZodLiteral<"botharness-purge">;
|
|
14804
|
+
version: ZodUnion<readonly [ZodLiteral<1>, ZodLiteral<2>]>;
|
|
14805
|
+
facts: ZodArray<ZodObject<{
|
|
14806
|
+
sourceEventId: ZodString;
|
|
14807
|
+
channelId: ZodString;
|
|
14808
|
+
messageId: ZodString;
|
|
14809
|
+
eventAt: ZodISODateTime;
|
|
14810
|
+
author: ZodDiscriminatedUnion<[ZodObject<{
|
|
14811
|
+
kind: ZodLiteral<"human">;
|
|
14812
|
+
}, $strict>, ZodObject<{
|
|
14813
|
+
kind: ZodLiteral<"bot">;
|
|
14814
|
+
slug: ZodString;
|
|
14815
|
+
}, $strict>, ZodObject<{
|
|
14816
|
+
kind: ZodLiteral<"bridged">;
|
|
14817
|
+
source: ZodString;
|
|
14818
|
+
}, $strict>, ZodObject<{
|
|
14819
|
+
kind: ZodLiteral<"system">;
|
|
14820
|
+
}, $strict>], "kind">;
|
|
14821
|
+
replyTo: ZodOptional<ZodString>;
|
|
14822
|
+
causation: ZodOptional<ZodObject<{
|
|
14823
|
+
rootSourceEventId: ZodString;
|
|
14824
|
+
parentSourceEventId: ZodString;
|
|
14825
|
+
hop: ZodNumber;
|
|
14826
|
+
}, $strict>>;
|
|
14827
|
+
acceptedAt: ZodISODateTime;
|
|
14828
|
+
actor: ZodLiteral<"local-human">;
|
|
14829
|
+
reason: ZodLiteral<"human-request">;
|
|
14830
|
+
managedFiles: ZodOptional<ZodArray<ZodString>>;
|
|
14831
|
+
}, $strict>>;
|
|
14832
|
+
}, $strict>;
|
|
14833
|
+
files: ZodArray<ZodObject<{
|
|
14834
|
+
path: ZodString;
|
|
14835
|
+
bytes: ZodNumber;
|
|
14836
|
+
sha256: ZodString;
|
|
14837
|
+
}, $strict>>;
|
|
14838
|
+
counts: ZodObject<{
|
|
14839
|
+
bots: ZodNumber;
|
|
14840
|
+
files: ZodNumber;
|
|
14841
|
+
bytes: ZodNumber;
|
|
14842
|
+
}, $strict>;
|
|
14843
|
+
version: ZodLiteral<1>;
|
|
14087
14844
|
producer: ZodObject<{
|
|
14088
14845
|
botharness: ZodString;
|
|
14089
|
-
dsh:
|
|
14846
|
+
dsh: ZodString;
|
|
14090
14847
|
}, $strict>;
|
|
14848
|
+
}, $strict>, ZodObject<{
|
|
14849
|
+
format: ZodLiteral<"botharness-backup">;
|
|
14850
|
+
id: ZodUUID;
|
|
14851
|
+
createdAt: ZodISODateTime;
|
|
14852
|
+
schemaGeneration: ZodNumber;
|
|
14091
14853
|
sessions: ZodObject<{
|
|
14092
14854
|
status: ZodLiteral<"unsupported">;
|
|
14093
14855
|
count: ZodNumber;
|
|
@@ -14102,12 +14864,7 @@ declare const manifestSchema: ZodObject<{
|
|
|
14102
14864
|
}>;
|
|
14103
14865
|
}, $strict>>;
|
|
14104
14866
|
dependencies: ZodArray<ZodObject<{
|
|
14105
|
-
kind:
|
|
14106
|
-
model: "model";
|
|
14107
|
-
provider: "provider";
|
|
14108
|
-
runtime: "runtime";
|
|
14109
|
-
workspace: "workspace";
|
|
14110
|
-
}>;
|
|
14867
|
+
kind: ZodString;
|
|
14111
14868
|
scope: ZodString;
|
|
14112
14869
|
reference: ZodString;
|
|
14113
14870
|
required: ZodBoolean;
|
|
@@ -14154,7 +14911,13 @@ declare const manifestSchema: ZodObject<{
|
|
|
14154
14911
|
files: ZodNumber;
|
|
14155
14912
|
bytes: ZodNumber;
|
|
14156
14913
|
}, $strict>;
|
|
14157
|
-
|
|
14914
|
+
version: ZodLiteral<2>;
|
|
14915
|
+
producer: ZodObject<{
|
|
14916
|
+
botharness: ZodString;
|
|
14917
|
+
dsh: ZodNullable<ZodString>;
|
|
14918
|
+
dshTools: ZodNullable<ZodString>;
|
|
14919
|
+
}, $strict>;
|
|
14920
|
+
}, $strict>], "version">;
|
|
14158
14921
|
type ProfileBackupManifest = output<typeof manifestSchema>;
|
|
14159
14922
|
interface ProfileBackupSource {
|
|
14160
14923
|
database: OperationalDatabaseOwner;
|
|
@@ -14163,7 +14926,10 @@ interface ProfileBackupSource {
|
|
|
14163
14926
|
attachments: AttachmentStore;
|
|
14164
14927
|
purge: ContentPurge;
|
|
14165
14928
|
version: string;
|
|
14166
|
-
|
|
14929
|
+
runtimeVersions(): Promise<{
|
|
14930
|
+
host: string | null;
|
|
14931
|
+
tools: string | null;
|
|
14932
|
+
}>;
|
|
14167
14933
|
sessionCount(): number;
|
|
14168
14934
|
log?(message: string): void;
|
|
14169
14935
|
}
|
|
@@ -14196,14 +14962,9 @@ export declare function exportProfileBackup(source: ProfileBackupSource, destina
|
|
|
14196
14962
|
sha256: string;
|
|
14197
14963
|
manifest: {
|
|
14198
14964
|
format: "botharness-backup";
|
|
14199
|
-
version: 1;
|
|
14200
14965
|
id: string;
|
|
14201
14966
|
createdAt: string;
|
|
14202
14967
|
schemaGeneration: number;
|
|
14203
|
-
producer: {
|
|
14204
|
-
botharness: string;
|
|
14205
|
-
dsh: "0.2.0-rc.1";
|
|
14206
|
-
};
|
|
14207
14968
|
sessions: {
|
|
14208
14969
|
status: "unsupported";
|
|
14209
14970
|
count: number;
|
|
@@ -14215,7 +14976,7 @@ export declare function exportProfileBackup(source: ProfileBackupSource, destina
|
|
|
14215
14976
|
disposition: "erased" | "retained";
|
|
14216
14977
|
}[];
|
|
14217
14978
|
dependencies: {
|
|
14218
|
-
kind:
|
|
14979
|
+
kind: string;
|
|
14219
14980
|
scope: string;
|
|
14220
14981
|
reference: string;
|
|
14221
14982
|
required: boolean;
|
|
@@ -14262,26 +15023,16 @@ export declare function exportProfileBackup(source: ProfileBackupSource, destina
|
|
|
14262
15023
|
files: number;
|
|
14263
15024
|
bytes: number;
|
|
14264
15025
|
};
|
|
14265
|
-
};
|
|
14266
|
-
}>;
|
|
14267
|
-
export declare function restoreProfileBackup(archive: Buffer, destinationHome: string, options?: {
|
|
14268
|
-
signal?: AbortSignal;
|
|
14269
|
-
availableBytes?: (path: string) => number;
|
|
14270
|
-
beforeCommit?: () => void;
|
|
14271
|
-
}): Promise<{
|
|
14272
|
-
id: string;
|
|
14273
|
-
destinationHome: string;
|
|
14274
|
-
mode: 'disaster-restore';
|
|
14275
|
-
manifest: {
|
|
14276
|
-
format: "botharness-backup";
|
|
14277
15026
|
version: 1;
|
|
14278
|
-
id: string;
|
|
14279
|
-
createdAt: string;
|
|
14280
|
-
schemaGeneration: number;
|
|
14281
15027
|
producer: {
|
|
14282
15028
|
botharness: string;
|
|
14283
|
-
dsh:
|
|
15029
|
+
dsh: string;
|
|
14284
15030
|
};
|
|
15031
|
+
} | {
|
|
15032
|
+
format: "botharness-backup";
|
|
15033
|
+
id: string;
|
|
15034
|
+
createdAt: string;
|
|
15035
|
+
schemaGeneration: number;
|
|
14285
15036
|
sessions: {
|
|
14286
15037
|
status: "unsupported";
|
|
14287
15038
|
count: number;
|
|
@@ -14293,7 +15044,7 @@ export declare function restoreProfileBackup(archive: Buffer, destinationHome: s
|
|
|
14293
15044
|
disposition: "erased" | "retained";
|
|
14294
15045
|
}[];
|
|
14295
15046
|
dependencies: {
|
|
14296
|
-
kind:
|
|
15047
|
+
kind: string;
|
|
14297
15048
|
scope: string;
|
|
14298
15049
|
reference: string;
|
|
14299
15050
|
required: boolean;
|
|
@@ -14340,11 +15091,164 @@ export declare function restoreProfileBackup(archive: Buffer, destinationHome: s
|
|
|
14340
15091
|
files: number;
|
|
14341
15092
|
bytes: number;
|
|
14342
15093
|
};
|
|
15094
|
+
version: 2;
|
|
15095
|
+
producer: {
|
|
15096
|
+
botharness: string;
|
|
15097
|
+
dsh: string | null;
|
|
15098
|
+
dshTools: string | null;
|
|
15099
|
+
};
|
|
14343
15100
|
};
|
|
14344
15101
|
}>;
|
|
14345
|
-
|
|
14346
|
-
|
|
14347
|
-
|
|
15102
|
+
export declare function restoreProfileBackup(archive: Buffer, destinationHome: string, options?: {
|
|
15103
|
+
signal?: AbortSignal;
|
|
15104
|
+
availableBytes?: (path: string) => number;
|
|
15105
|
+
beforeCommit?: () => void;
|
|
15106
|
+
}): Promise<{
|
|
15107
|
+
id: string;
|
|
15108
|
+
destinationHome: string;
|
|
15109
|
+
mode: 'disaster-restore';
|
|
15110
|
+
manifest: {
|
|
15111
|
+
format: "botharness-backup";
|
|
15112
|
+
id: string;
|
|
15113
|
+
createdAt: string;
|
|
15114
|
+
schemaGeneration: number;
|
|
15115
|
+
sessions: {
|
|
15116
|
+
status: "unsupported";
|
|
15117
|
+
count: number;
|
|
15118
|
+
reason: "No portable Session Persistence adapter";
|
|
15119
|
+
};
|
|
15120
|
+
memories: {
|
|
15121
|
+
slug: string;
|
|
15122
|
+
repository: string;
|
|
15123
|
+
disposition: "erased" | "retained";
|
|
15124
|
+
}[];
|
|
15125
|
+
dependencies: {
|
|
15126
|
+
kind: string;
|
|
15127
|
+
scope: string;
|
|
15128
|
+
reference: string;
|
|
15129
|
+
required: boolean;
|
|
15130
|
+
contract: string;
|
|
15131
|
+
}[];
|
|
15132
|
+
purge: {
|
|
15133
|
+
format: "botharness-purge";
|
|
15134
|
+
version: 1 | 2;
|
|
15135
|
+
facts: {
|
|
15136
|
+
sourceEventId: string;
|
|
15137
|
+
channelId: string;
|
|
15138
|
+
messageId: string;
|
|
15139
|
+
eventAt: string;
|
|
15140
|
+
author: {
|
|
15141
|
+
kind: "human";
|
|
15142
|
+
} | {
|
|
15143
|
+
kind: "bot";
|
|
15144
|
+
slug: string;
|
|
15145
|
+
} | {
|
|
15146
|
+
kind: "bridged";
|
|
15147
|
+
source: string;
|
|
15148
|
+
} | {
|
|
15149
|
+
kind: "system";
|
|
15150
|
+
};
|
|
15151
|
+
replyTo?: string | undefined;
|
|
15152
|
+
causation?: {
|
|
15153
|
+
rootSourceEventId: string;
|
|
15154
|
+
parentSourceEventId: string;
|
|
15155
|
+
hop: number;
|
|
15156
|
+
} | undefined;
|
|
15157
|
+
acceptedAt: string;
|
|
15158
|
+
actor: "local-human";
|
|
15159
|
+
reason: "human-request";
|
|
15160
|
+
managedFiles?: string[] | undefined;
|
|
15161
|
+
}[];
|
|
15162
|
+
};
|
|
15163
|
+
files: {
|
|
15164
|
+
path: string;
|
|
15165
|
+
bytes: number;
|
|
15166
|
+
sha256: string;
|
|
15167
|
+
}[];
|
|
15168
|
+
counts: {
|
|
15169
|
+
bots: number;
|
|
15170
|
+
files: number;
|
|
15171
|
+
bytes: number;
|
|
15172
|
+
};
|
|
15173
|
+
version: 1;
|
|
15174
|
+
producer: {
|
|
15175
|
+
botharness: string;
|
|
15176
|
+
dsh: string;
|
|
15177
|
+
};
|
|
15178
|
+
} | {
|
|
15179
|
+
format: "botharness-backup";
|
|
15180
|
+
id: string;
|
|
15181
|
+
createdAt: string;
|
|
15182
|
+
schemaGeneration: number;
|
|
15183
|
+
sessions: {
|
|
15184
|
+
status: "unsupported";
|
|
15185
|
+
count: number;
|
|
15186
|
+
reason: "No portable Session Persistence adapter";
|
|
15187
|
+
};
|
|
15188
|
+
memories: {
|
|
15189
|
+
slug: string;
|
|
15190
|
+
repository: string;
|
|
15191
|
+
disposition: "erased" | "retained";
|
|
15192
|
+
}[];
|
|
15193
|
+
dependencies: {
|
|
15194
|
+
kind: string;
|
|
15195
|
+
scope: string;
|
|
15196
|
+
reference: string;
|
|
15197
|
+
required: boolean;
|
|
15198
|
+
contract: string;
|
|
15199
|
+
}[];
|
|
15200
|
+
purge: {
|
|
15201
|
+
format: "botharness-purge";
|
|
15202
|
+
version: 1 | 2;
|
|
15203
|
+
facts: {
|
|
15204
|
+
sourceEventId: string;
|
|
15205
|
+
channelId: string;
|
|
15206
|
+
messageId: string;
|
|
15207
|
+
eventAt: string;
|
|
15208
|
+
author: {
|
|
15209
|
+
kind: "human";
|
|
15210
|
+
} | {
|
|
15211
|
+
kind: "bot";
|
|
15212
|
+
slug: string;
|
|
15213
|
+
} | {
|
|
15214
|
+
kind: "bridged";
|
|
15215
|
+
source: string;
|
|
15216
|
+
} | {
|
|
15217
|
+
kind: "system";
|
|
15218
|
+
};
|
|
15219
|
+
replyTo?: string | undefined;
|
|
15220
|
+
causation?: {
|
|
15221
|
+
rootSourceEventId: string;
|
|
15222
|
+
parentSourceEventId: string;
|
|
15223
|
+
hop: number;
|
|
15224
|
+
} | undefined;
|
|
15225
|
+
acceptedAt: string;
|
|
15226
|
+
actor: "local-human";
|
|
15227
|
+
reason: "human-request";
|
|
15228
|
+
managedFiles?: string[] | undefined;
|
|
15229
|
+
}[];
|
|
15230
|
+
};
|
|
15231
|
+
files: {
|
|
15232
|
+
path: string;
|
|
15233
|
+
bytes: number;
|
|
15234
|
+
sha256: string;
|
|
15235
|
+
}[];
|
|
15236
|
+
counts: {
|
|
15237
|
+
bots: number;
|
|
15238
|
+
files: number;
|
|
15239
|
+
bytes: number;
|
|
15240
|
+
};
|
|
15241
|
+
version: 2;
|
|
15242
|
+
producer: {
|
|
15243
|
+
botharness: string;
|
|
15244
|
+
dsh: string | null;
|
|
15245
|
+
dshTools: string | null;
|
|
15246
|
+
};
|
|
15247
|
+
};
|
|
15248
|
+
}>;
|
|
15249
|
+
//#endregion
|
|
15250
|
+
//#region packages/core/src/portability/files.d.ts
|
|
15251
|
+
export declare class ProfileBackupError extends Error {
|
|
14348
15252
|
readonly code: string;
|
|
14349
15253
|
constructor(code: string, message: string, options?: ErrorOptions);
|
|
14350
15254
|
}
|
|
@@ -14352,6 +15256,44 @@ export declare class ProfileBackupError extends Error {
|
|
|
14352
15256
|
//#region packages/core/src/portability/cli.d.ts
|
|
14353
15257
|
export declare function runProfileRestoreCli(argv: readonly string[]): Promise<void>;
|
|
14354
15258
|
//#endregion
|
|
15259
|
+
//#region packages/core/src/runtime/context-window.d.ts
|
|
15260
|
+
interface BotContextWindow {
|
|
15261
|
+
sessionId: string | null;
|
|
15262
|
+
usedTokens: number | null;
|
|
15263
|
+
contextWindow: number;
|
|
15264
|
+
capacitySource: 'model' | 'estimate';
|
|
15265
|
+
thresholdTokens: number;
|
|
15266
|
+
}
|
|
15267
|
+
//#endregion
|
|
15268
|
+
//#region packages/core/src/runtime/prompt-inspection.d.ts
|
|
15269
|
+
interface PromptSectionView {
|
|
15270
|
+
name: string;
|
|
15271
|
+
text: string;
|
|
15272
|
+
}
|
|
15273
|
+
interface BotSystemPromptView {
|
|
15274
|
+
sessionId: string | null;
|
|
15275
|
+
loaded: boolean;
|
|
15276
|
+
effectiveText: string | null;
|
|
15277
|
+
effectiveSource: 'session' | 'log' | 'none';
|
|
15278
|
+
next: {
|
|
15279
|
+
text: string;
|
|
15280
|
+
sections: PromptSectionView[];
|
|
15281
|
+
contexts: PromptSectionView[];
|
|
15282
|
+
} | null;
|
|
15283
|
+
pending: boolean;
|
|
15284
|
+
}
|
|
15285
|
+
interface TurnInputMessage {
|
|
15286
|
+
step: number;
|
|
15287
|
+
source: string;
|
|
15288
|
+
at: string;
|
|
15289
|
+
text: string;
|
|
15290
|
+
}
|
|
15291
|
+
interface TurnInputView {
|
|
15292
|
+
turn: number;
|
|
15293
|
+
startedAt?: string;
|
|
15294
|
+
messages: TurnInputMessage[];
|
|
15295
|
+
}
|
|
15296
|
+
//#endregion
|
|
14355
15297
|
//#region packages/core/src/workspaces/grant-requests.d.ts
|
|
14356
15298
|
interface GrantRequestApprovalResult {
|
|
14357
15299
|
grant: WorkspaceGrant;
|
|
@@ -14484,6 +15426,11 @@ type MarketplaceBanner = {
|
|
|
14484
15426
|
} | {
|
|
14485
15427
|
image: string;
|
|
14486
15428
|
};
|
|
15429
|
+
type MarketplaceAvatar = {
|
|
15430
|
+
recipe: AvatarRecipe;
|
|
15431
|
+
} | {
|
|
15432
|
+
image: string;
|
|
15433
|
+
};
|
|
14487
15434
|
interface MarketplaceEntry {
|
|
14488
15435
|
id: string;
|
|
14489
15436
|
owner: string;
|
|
@@ -14494,8 +15441,10 @@ interface MarketplaceEntry {
|
|
|
14494
15441
|
description: string | null;
|
|
14495
15442
|
descriptionGenerated: boolean;
|
|
14496
15443
|
banner: MarketplaceBanner | null;
|
|
15444
|
+
avatar: MarketplaceAvatar | null;
|
|
14497
15445
|
topics: string[];
|
|
14498
15446
|
stars: number;
|
|
15447
|
+
installs: number;
|
|
14499
15448
|
pushedAt: string;
|
|
14500
15449
|
createdAt?: string;
|
|
14501
15450
|
htmlUrl: string;
|
|
@@ -14505,18 +15454,104 @@ interface MarketplaceEntry {
|
|
|
14505
15454
|
sha: string;
|
|
14506
15455
|
committedAt: string;
|
|
14507
15456
|
} | null;
|
|
15457
|
+
source: MarketplaceSource;
|
|
15458
|
+
author: MarketplaceAuthor | null;
|
|
15459
|
+
installed?: MarketplaceInstalled;
|
|
15460
|
+
}
|
|
15461
|
+
interface MarketplaceInstalled {
|
|
15462
|
+
bots: string[];
|
|
15463
|
+
authorUpdated: boolean;
|
|
15464
|
+
}
|
|
15465
|
+
type MarketplaceSource = 'github' | 'upload';
|
|
15466
|
+
interface MarketplaceAuthor {
|
|
15467
|
+
name: string;
|
|
15468
|
+
id: string;
|
|
15469
|
+
avatar: string | null;
|
|
15470
|
+
}
|
|
15471
|
+
interface MarketplaceAuthorAccount extends MarketplaceAuthor {
|
|
15472
|
+
termsAcceptedAt: string | null;
|
|
15473
|
+
}
|
|
15474
|
+
type MarketplaceFileKind = 'text' | 'script' | 'image';
|
|
15475
|
+
interface MarketplaceFile {
|
|
15476
|
+
path: string;
|
|
15477
|
+
size: number;
|
|
15478
|
+
kind: MarketplaceFileKind;
|
|
15479
|
+
}
|
|
15480
|
+
type MarketplaceFileType = 'markdown' | 'text' | 'data' | 'script' | 'image';
|
|
15481
|
+
interface MarketplaceFileSummary {
|
|
15482
|
+
count: number;
|
|
15483
|
+
size: number;
|
|
15484
|
+
types: Array<{
|
|
15485
|
+
type: MarketplaceFileType;
|
|
15486
|
+
count: number;
|
|
15487
|
+
size: number;
|
|
15488
|
+
}>;
|
|
15489
|
+
}
|
|
15490
|
+
interface MarketplaceFileView {
|
|
15491
|
+
path: string;
|
|
15492
|
+
size: number;
|
|
15493
|
+
type: Exclude<MarketplaceFileType, 'image'>;
|
|
15494
|
+
text: string;
|
|
15495
|
+
}
|
|
15496
|
+
interface MarketplaceUploadInput {
|
|
15497
|
+
displayName: string;
|
|
15498
|
+
bio?: string;
|
|
15499
|
+
tags?: string[];
|
|
15500
|
+
replaces?: string;
|
|
15501
|
+
files: Array<{
|
|
15502
|
+
path: string;
|
|
15503
|
+
size: number;
|
|
15504
|
+
sha256: string;
|
|
15505
|
+
}>;
|
|
15506
|
+
}
|
|
15507
|
+
interface MarketplaceAuthoredBot {
|
|
15508
|
+
bot: MarketplaceEntry;
|
|
15509
|
+
files: number;
|
|
15510
|
+
bytes: number;
|
|
15511
|
+
blocked: boolean;
|
|
14508
15512
|
}
|
|
14509
15513
|
interface MarketplacePage {
|
|
14510
15514
|
bots: MarketplaceEntry[];
|
|
14511
15515
|
nextCursor?: string;
|
|
14512
15516
|
}
|
|
14513
15517
|
type MarketplaceSort = 'updated' | 'created' | 'stars';
|
|
15518
|
+
declare const MARKETPLACE_SECTIONS: readonly ['hot', 'new', 'rising'];
|
|
15519
|
+
type MarketplaceSectionName = (typeof MARKETPLACE_SECTIONS)[number];
|
|
15520
|
+
interface MarketplaceDigestPick {
|
|
15521
|
+
id: string;
|
|
15522
|
+
displayName: string | null;
|
|
15523
|
+
banner: MarketplaceBanner | null;
|
|
15524
|
+
avatar: MarketplaceAvatar | null;
|
|
15525
|
+
}
|
|
15526
|
+
interface MarketplaceDigestSummary {
|
|
15527
|
+
day: string;
|
|
15528
|
+
lang: MarketplaceLanguage;
|
|
15529
|
+
title: string;
|
|
15530
|
+
lede: string;
|
|
15531
|
+
picks: MarketplaceDigestPick[];
|
|
15532
|
+
}
|
|
15533
|
+
interface MarketplaceDigest extends MarketplaceDigestSummary {
|
|
15534
|
+
sections: Array<{
|
|
15535
|
+
heading: string;
|
|
15536
|
+
body: string;
|
|
15537
|
+
bot: MarketplaceEntry | null;
|
|
15538
|
+
}>;
|
|
15539
|
+
}
|
|
15540
|
+
interface MarketplaceSection {
|
|
15541
|
+
section: MarketplaceSectionName;
|
|
15542
|
+
day: string | null;
|
|
15543
|
+
entries: Array<{
|
|
15544
|
+
bot: MarketplaceEntry;
|
|
15545
|
+
score: number;
|
|
15546
|
+
}>;
|
|
15547
|
+
}
|
|
14514
15548
|
interface MarketplaceQuery {
|
|
14515
15549
|
cursor?: string;
|
|
14516
15550
|
sort?: MarketplaceSort;
|
|
14517
15551
|
q?: string;
|
|
14518
15552
|
topic?: string;
|
|
14519
15553
|
lang?: MarketplaceLanguage;
|
|
15554
|
+
includeUploads?: boolean;
|
|
14520
15555
|
}
|
|
14521
15556
|
interface MarketplaceTopic {
|
|
14522
15557
|
topic: string;
|
|
@@ -14527,6 +15562,8 @@ interface MarketplaceDetail {
|
|
|
14527
15562
|
readme: string | null;
|
|
14528
15563
|
readmeLanguage: MarketplaceLanguage | null;
|
|
14529
15564
|
commitSha: string | null;
|
|
15565
|
+
files?: MarketplaceFile[];
|
|
15566
|
+
fileSummary?: MarketplaceFileSummary;
|
|
14530
15567
|
}
|
|
14531
15568
|
type MarketplaceResult<T> = {
|
|
14532
15569
|
ok: true;
|
|
@@ -14534,10 +15571,14 @@ type MarketplaceResult<T> = {
|
|
|
14534
15571
|
} | {
|
|
14535
15572
|
ok: false;
|
|
14536
15573
|
code: string;
|
|
15574
|
+
path?: string;
|
|
14537
15575
|
};
|
|
14538
15576
|
interface MarketplaceClient {
|
|
14539
15577
|
list(query: MarketplaceQuery): Promise<MarketplaceResult<MarketplacePage>>;
|
|
14540
15578
|
topics(): Promise<MarketplaceResult<MarketplaceTopic[]>>;
|
|
15579
|
+
section(name: MarketplaceSectionName, lang?: MarketplaceLanguage): Promise<MarketplaceResult<MarketplaceSection>>;
|
|
15580
|
+
digests(lang?: MarketplaceLanguage): Promise<MarketplaceResult<MarketplaceDigestSummary[]>>;
|
|
15581
|
+
digest(day: string, lang?: MarketplaceLanguage): Promise<MarketplaceResult<MarketplaceDigest>>;
|
|
14541
15582
|
detail(id: string, lang?: MarketplaceLanguage): Promise<MarketplaceResult<MarketplaceDetail>>;
|
|
14542
15583
|
challenge(): Promise<MarketplaceResult<AltchaChallenge>>;
|
|
14543
15584
|
submit(url: string, altcha: string): Promise<MarketplaceResult<{
|
|
@@ -14549,6 +15590,255 @@ interface MarketplaceClient {
|
|
|
14549
15590
|
}): Promise<MarketplaceResult<{
|
|
14550
15591
|
received: true;
|
|
14551
15592
|
}>>;
|
|
15593
|
+
author(token: string): Promise<MarketplaceResult<MarketplaceAuthorAccount | null>>;
|
|
15594
|
+
saveAuthor(token: string, input: {
|
|
15595
|
+
displayName: string;
|
|
15596
|
+
acceptTerms: boolean;
|
|
15597
|
+
}): Promise<MarketplaceResult<MarketplaceAuthorAccount>>;
|
|
15598
|
+
saveAuthorAvatar(token: string, avatar: Uint8Array | null): Promise<MarketplaceResult<MarketplaceAuthorAccount>>;
|
|
15599
|
+
beginUpload(token: string, input: MarketplaceUploadInput): Promise<MarketplaceResult<{
|
|
15600
|
+
id: string;
|
|
15601
|
+
botId: string;
|
|
15602
|
+
}>>;
|
|
15603
|
+
putUploadFile(token: string, uploadId: string, path: string, bytes: Uint8Array): Promise<MarketplaceResult<true>>;
|
|
15604
|
+
publishUpload(token: string, uploadId: string): Promise<MarketplaceResult<MarketplaceEntry>>;
|
|
15605
|
+
authored(token: string, lang?: MarketplaceLanguage): Promise<MarketplaceResult<MarketplaceAuthoredBot[]>>;
|
|
15606
|
+
deleteUpload(token: string, id: string): Promise<MarketplaceResult<{
|
|
15607
|
+
deleted: true;
|
|
15608
|
+
}>>;
|
|
15609
|
+
file(id: string, path: string): Promise<MarketplaceResult<Uint8Array>>;
|
|
15610
|
+
installReceipt(id: string, hostId: string): Promise<MarketplaceResult<{
|
|
15611
|
+
counted: boolean;
|
|
15612
|
+
installs: number;
|
|
15613
|
+
}>>;
|
|
15614
|
+
fileView(id: string, path: string): Promise<MarketplaceResult<MarketplaceFileView>>;
|
|
15615
|
+
}
|
|
15616
|
+
//#endregion
|
|
15617
|
+
//#region packages/market/src/upload-files.d.ts
|
|
15618
|
+
type UploadFileKind = 'text' | 'script' | 'image';
|
|
15619
|
+
//#endregion
|
|
15620
|
+
//#region packages/core/src/marketplace/share-draft.d.ts
|
|
15621
|
+
type ShareDraftFileStatus = 'pending' | 'kept' | 'rewritten' | 'dropped';
|
|
15622
|
+
type ShareDraftFlag = 'secret' | 'email' | 'phone' | 'url-credential' | 'private-key';
|
|
15623
|
+
interface ShareDraftFile {
|
|
15624
|
+
path: string;
|
|
15625
|
+
size: number;
|
|
15626
|
+
kind: UploadFileKind;
|
|
15627
|
+
status: ShareDraftFileStatus;
|
|
15628
|
+
flags: ShareDraftFlag[];
|
|
15629
|
+
}
|
|
15630
|
+
interface ShareDraft {
|
|
15631
|
+
slug: string;
|
|
15632
|
+
id: string;
|
|
15633
|
+
state: 'reviewing' | 'ready';
|
|
15634
|
+
createdAt: string;
|
|
15635
|
+
updatedAt: string;
|
|
15636
|
+
files: ShareDraftFile[];
|
|
15637
|
+
skipped: UploadPlan['skipped'];
|
|
15638
|
+
}
|
|
15639
|
+
interface ShareDraftSummary {
|
|
15640
|
+
slug: string;
|
|
15641
|
+
id: string;
|
|
15642
|
+
state: ShareDraft['state'];
|
|
15643
|
+
total: number;
|
|
15644
|
+
pending: number;
|
|
15645
|
+
kept: number;
|
|
15646
|
+
rewritten: number;
|
|
15647
|
+
dropped: number;
|
|
15648
|
+
flagged: number;
|
|
15649
|
+
updatedAt: string;
|
|
15650
|
+
}
|
|
15651
|
+
type ShareDraftView = ShareDraft & {
|
|
15652
|
+
summary: ShareDraftSummary;
|
|
15653
|
+
};
|
|
15654
|
+
type ShareDraftDecision = {
|
|
15655
|
+
keep: true;
|
|
15656
|
+
} | {
|
|
15657
|
+
drop: true;
|
|
15658
|
+
} | {
|
|
15659
|
+
rewrite: string;
|
|
15660
|
+
};
|
|
15661
|
+
type Refusal$1 = {
|
|
15662
|
+
ok: false;
|
|
15663
|
+
code: string;
|
|
15664
|
+
path?: string;
|
|
15665
|
+
};
|
|
15666
|
+
type Result$3<T> = {
|
|
15667
|
+
ok: true;
|
|
15668
|
+
value: T;
|
|
15669
|
+
} | Refusal$1;
|
|
15670
|
+
declare function createShareDrafts(deps: {
|
|
15671
|
+
root: string;
|
|
15672
|
+
memoryDir: (slug: string) => string | undefined;
|
|
15673
|
+
now?: () => Date;
|
|
15674
|
+
log?: (event: Record<string, string | number>) => void;
|
|
15675
|
+
}): {
|
|
15676
|
+
root: string;
|
|
15677
|
+
start(slug: string): Result$3<ShareDraft>;
|
|
15678
|
+
get(slug: string): Result$3<ShareDraft>;
|
|
15679
|
+
read(slug: string, path: string): Result$3<{
|
|
15680
|
+
path: string;
|
|
15681
|
+
kind: UploadFileKind;
|
|
15682
|
+
text?: string;
|
|
15683
|
+
}>;
|
|
15684
|
+
decide(slug: string, path: string, decision: ShareDraftDecision): Result$3<ShareDraft>;
|
|
15685
|
+
finish(slug: string): Result$3<ShareDraft>;
|
|
15686
|
+
discard(slug: string): Result$3<{
|
|
15687
|
+
discarded: boolean;
|
|
15688
|
+
}>;
|
|
15689
|
+
source(slug: string): Result$3<{
|
|
15690
|
+
dir: string;
|
|
15691
|
+
plan: UploadPlan;
|
|
15692
|
+
draft: ShareDraft;
|
|
15693
|
+
}>;
|
|
15694
|
+
exportTo(slug: string, target: string): Result$3<{
|
|
15695
|
+
path: string;
|
|
15696
|
+
files: number;
|
|
15697
|
+
}>;
|
|
15698
|
+
};
|
|
15699
|
+
type ShareDrafts = ReturnType<typeof createShareDrafts>;
|
|
15700
|
+
//#endregion
|
|
15701
|
+
//#region packages/core/src/marketplace/uploaded-bots.d.ts
|
|
15702
|
+
type UploadSkipReason = 'file-type-refused' | 'file-too-large' | 'invalid-path';
|
|
15703
|
+
interface UploadPlan {
|
|
15704
|
+
files: MarketplaceFile[];
|
|
15705
|
+
skipped: Array<{
|
|
15706
|
+
path: string;
|
|
15707
|
+
reason: UploadSkipReason;
|
|
15708
|
+
}>;
|
|
15709
|
+
totalBytes: number;
|
|
15710
|
+
}
|
|
15711
|
+
interface MarketplaceAccount {
|
|
15712
|
+
signedIn: boolean;
|
|
15713
|
+
email?: string;
|
|
15714
|
+
author: MarketplaceAuthorAccount | null;
|
|
15715
|
+
}
|
|
15716
|
+
interface UploadPresentation {
|
|
15717
|
+
displayName: string;
|
|
15718
|
+
bio?: string;
|
|
15719
|
+
tags?: string[];
|
|
15720
|
+
replaces?: string;
|
|
15721
|
+
}
|
|
15722
|
+
type Refusal = {
|
|
15723
|
+
ok: false;
|
|
15724
|
+
code: string;
|
|
15725
|
+
path?: string;
|
|
15726
|
+
};
|
|
15727
|
+
type Result$2<T> = {
|
|
15728
|
+
ok: true;
|
|
15729
|
+
value: T;
|
|
15730
|
+
} | Refusal;
|
|
15731
|
+
declare function createMarketplaceUploads(deps: {
|
|
15732
|
+
client: MarketplaceClient;
|
|
15733
|
+
account: () => {
|
|
15734
|
+
status(): {
|
|
15735
|
+
state: string;
|
|
15736
|
+
email?: string;
|
|
15737
|
+
};
|
|
15738
|
+
accessToken(options?: {
|
|
15739
|
+
fresh?: boolean;
|
|
15740
|
+
}): Promise<string | undefined>;
|
|
15741
|
+
} | undefined;
|
|
15742
|
+
drafts: ShareDrafts;
|
|
15743
|
+
log?: (event: Record<string, string | number>) => void;
|
|
15744
|
+
}): {
|
|
15745
|
+
account(): Promise<Result$2<MarketplaceAccount>>;
|
|
15746
|
+
saveAuthor(input: {
|
|
15747
|
+
displayName: string;
|
|
15748
|
+
acceptTerms: boolean;
|
|
15749
|
+
}): Promise<Result$2<MarketplaceAuthorAccount>>;
|
|
15750
|
+
saveAuthorAvatar(avatar: Uint8Array | null): Promise<Result$2<MarketplaceAuthorAccount>>;
|
|
15751
|
+
mine(lang?: MarketplaceLanguage): Promise<Result$2<MarketplaceAuthoredBot[]>>;
|
|
15752
|
+
remove(id: string): Promise<Result$2<{
|
|
15753
|
+
deleted: true;
|
|
15754
|
+
}>>;
|
|
15755
|
+
plan(slug: string): Result$2<UploadPlan>;
|
|
15756
|
+
upload(slug: string, presentation: UploadPresentation): Promise<Result$2<{
|
|
15757
|
+
bot: MarketplaceEntry;
|
|
15758
|
+
skipped: UploadPlan['skipped'];
|
|
15759
|
+
}>>;
|
|
15760
|
+
installInput(id: string): Promise<Result$2<{
|
|
15761
|
+
entry: MarketplaceEntry;
|
|
15762
|
+
input: BotImportInput;
|
|
15763
|
+
}>>;
|
|
15764
|
+
};
|
|
15765
|
+
type MarketplaceUploads = ReturnType<typeof createMarketplaceUploads>;
|
|
15766
|
+
//#endregion
|
|
15767
|
+
//#region packages/core/src/marketplace/install-review.d.ts
|
|
15768
|
+
type InstallFindingKind = 'prompt-injection' | 'exfiltration' | 'script';
|
|
15769
|
+
interface InstallFinding {
|
|
15770
|
+
kind: InstallFindingKind;
|
|
15771
|
+
path: string;
|
|
15772
|
+
note?: string;
|
|
15773
|
+
}
|
|
15774
|
+
type InstallReviewFailure = 'no-model' | 'model-unavailable' | 'settings-invalid' | 'llm-unavailable' | 'timeout' | 'model-error' | 'unparseable';
|
|
15775
|
+
type InstallReview = {
|
|
15776
|
+
status: 'reviewed';
|
|
15777
|
+
findings: InstallFinding[];
|
|
15778
|
+
files: number;
|
|
15779
|
+
read: number;
|
|
15780
|
+
partial: boolean;
|
|
15781
|
+
model?: string;
|
|
15782
|
+
} | {
|
|
15783
|
+
status: 'unavailable';
|
|
15784
|
+
reason: InstallReviewFailure;
|
|
15785
|
+
findings: InstallFinding[];
|
|
15786
|
+
files: number;
|
|
15787
|
+
};
|
|
15788
|
+
interface InstallReviewResult {
|
|
15789
|
+
reviewId: string;
|
|
15790
|
+
listing: MarketplaceEntry;
|
|
15791
|
+
review: InstallReview;
|
|
15792
|
+
}
|
|
15793
|
+
interface StagedFile {
|
|
15794
|
+
path: string;
|
|
15795
|
+
data: Buffer;
|
|
15796
|
+
}
|
|
15797
|
+
type InstallReviewLanguage = 'en' | 'zh';
|
|
15798
|
+
interface InstallReviewer {
|
|
15799
|
+
(prompt: string, botName: string): Promise<{
|
|
15800
|
+
text: string;
|
|
15801
|
+
model?: string;
|
|
15802
|
+
}>;
|
|
15803
|
+
}
|
|
15804
|
+
declare function stageGitRepository(input: {
|
|
15805
|
+
gitUrl: string;
|
|
15806
|
+
commit: string;
|
|
15807
|
+
clone?: typeof cloneMemoryRepository;
|
|
15808
|
+
}): Promise<{
|
|
15809
|
+
ok: true;
|
|
15810
|
+
gitUrl: string;
|
|
15811
|
+
files: StagedFile[];
|
|
15812
|
+
} | {
|
|
15813
|
+
ok: false;
|
|
15814
|
+
code: string;
|
|
15815
|
+
}>;
|
|
15816
|
+
type Result$1<T> = {
|
|
15817
|
+
ok: true;
|
|
15818
|
+
value: T;
|
|
15819
|
+
} | {
|
|
15820
|
+
ok: false;
|
|
15821
|
+
code: string;
|
|
15822
|
+
path?: string;
|
|
15823
|
+
};
|
|
15824
|
+
declare function createMarketplaceInstallReviews(deps: {
|
|
15825
|
+
uploads: Pick<MarketplaceUploads, 'installInput'>;
|
|
15826
|
+
reviewer: InstallReviewer;
|
|
15827
|
+
stageGit?: typeof stageGitRepository;
|
|
15828
|
+
now?: () => number;
|
|
15829
|
+
log?: (event: Record<string, string | number>) => void;
|
|
15830
|
+
}): {
|
|
15831
|
+
review(id: string, lang?: InstallReviewLanguage): Promise<Result$1<InstallReviewResult>>;
|
|
15832
|
+
staged(id: string, reviewId: string): Result$1<{
|
|
15833
|
+
listing: MarketplaceEntry;
|
|
15834
|
+
input: BotImportInput;
|
|
15835
|
+
}>;
|
|
15836
|
+
};
|
|
15837
|
+
type MarketplaceInstallReviews = ReturnType<typeof createMarketplaceInstallReviews>;
|
|
15838
|
+
//#endregion
|
|
15839
|
+
//#region packages/core/src/marketplace/install-receipts.d.ts
|
|
15840
|
+
interface InstallReceipts {
|
|
15841
|
+
send(listingId: string): Promise<void>;
|
|
14552
15842
|
}
|
|
14553
15843
|
//#endregion
|
|
14554
15844
|
//#region packages/core/src/release/compatibility.d.ts
|
|
@@ -14731,6 +16021,46 @@ interface PluginUpdateService {
|
|
|
14731
16021
|
restart(beforeEffect?: (pending: string[]) => void): Promise<PluginRestart>;
|
|
14732
16022
|
}
|
|
14733
16023
|
//#endregion
|
|
16024
|
+
//#region packages/core/src/telemetry/active-day.d.ts
|
|
16025
|
+
type ActiveDayTrigger = 'bot_mode_enter' | 'message' | 'im_message';
|
|
16026
|
+
interface ActiveDay {
|
|
16027
|
+
mark(trigger: ActiveDayTrigger, surface?: TelemetrySurface): void;
|
|
16028
|
+
}
|
|
16029
|
+
//#endregion
|
|
16030
|
+
//#region packages/core/src/runtime/assignment-timeline.d.ts
|
|
16031
|
+
type AssignmentTimelineStatus = 'running' | 'done' | 'failed' | 'denied' | 'cancelled';
|
|
16032
|
+
interface AssignmentTimelineEntry {
|
|
16033
|
+
status: AssignmentTimelineStatus;
|
|
16034
|
+
kind: ToolCallKind;
|
|
16035
|
+
tool: string;
|
|
16036
|
+
detail?: string;
|
|
16037
|
+
at: string;
|
|
16038
|
+
round?: number;
|
|
16039
|
+
}
|
|
16040
|
+
interface TimelineModelRoute {
|
|
16041
|
+
provider: string;
|
|
16042
|
+
model: string;
|
|
16043
|
+
reasoningEffort?: string;
|
|
16044
|
+
}
|
|
16045
|
+
type AssignmentTimelineLaneState = 'running' | 'done' | 'failed' | 'cancelled' | 'idle';
|
|
16046
|
+
interface AssignmentTimelineLane {
|
|
16047
|
+
role: 'main' | 'subagent';
|
|
16048
|
+
index: number;
|
|
16049
|
+
sessionId: string;
|
|
16050
|
+
title?: string;
|
|
16051
|
+
route?: TimelineModelRoute;
|
|
16052
|
+
state: AssignmentTimelineLaneState;
|
|
16053
|
+
startedAt?: string;
|
|
16054
|
+
updatedAt?: string;
|
|
16055
|
+
round?: number;
|
|
16056
|
+
entries: AssignmentTimelineEntry[];
|
|
16057
|
+
omitted: number;
|
|
16058
|
+
}
|
|
16059
|
+
interface PublicToolCall {
|
|
16060
|
+
kind: ToolCallKind;
|
|
16061
|
+
detail?: string;
|
|
16062
|
+
}
|
|
16063
|
+
//#endregion
|
|
14734
16064
|
//#region packages/core/src/bots/banner-http.d.ts
|
|
14735
16065
|
type BotBannerSummary = Extract<BotBanner, {
|
|
14736
16066
|
recipe: unknown;
|
|
@@ -14849,10 +16179,13 @@ interface FolderListing {
|
|
|
14849
16179
|
crumbs: BrowsedFolder[];
|
|
14850
16180
|
entries: BrowsedFolder[];
|
|
14851
16181
|
truncated: boolean;
|
|
16182
|
+
nextOffset?: number;
|
|
14852
16183
|
roots: BrowsedFolder[];
|
|
16184
|
+
nativePicker?: boolean;
|
|
14853
16185
|
}
|
|
14854
16186
|
interface FolderBrowser {
|
|
14855
|
-
list(path?: string): FolderListing
|
|
16187
|
+
list(path?: string, offset?: number): Promise<FolderListing>;
|
|
16188
|
+
close(): void;
|
|
14856
16189
|
}
|
|
14857
16190
|
//#endregion
|
|
14858
16191
|
//#region packages/core/src/memory/managed-git.d.ts
|
|
@@ -14934,7 +16267,8 @@ interface ActivityOverview {
|
|
|
14934
16267
|
sessionId: string;
|
|
14935
16268
|
role: SessionRootRole;
|
|
14936
16269
|
state: 'thinking' | 'working';
|
|
14937
|
-
|
|
16270
|
+
title?: string;
|
|
16271
|
+
description?: string;
|
|
14938
16272
|
}>;
|
|
14939
16273
|
}>;
|
|
14940
16274
|
}
|
|
@@ -15047,9 +16381,13 @@ interface OwnedSessionSummary {
|
|
|
15047
16381
|
assignmentReportState?: AssignmentReportState;
|
|
15048
16382
|
assignmentExecutionWait?: AssignmentExecutionWait;
|
|
15049
16383
|
assignmentArchived?: true;
|
|
15050
|
-
|
|
16384
|
+
assignmentTitle?: string;
|
|
16385
|
+
assignmentDescription?: string;
|
|
16386
|
+
assignmentModelRoute?: ModelRoute;
|
|
16387
|
+
modelRoute?: ModelRoute;
|
|
15051
16388
|
currentOrchestrator?: boolean;
|
|
15052
16389
|
triageOpenCount?: number;
|
|
16390
|
+
subagentCount?: number;
|
|
15053
16391
|
}
|
|
15054
16392
|
interface OwnedSessionBot {
|
|
15055
16393
|
botSlug: string;
|
|
@@ -15091,7 +16429,7 @@ interface BridgeMethods {
|
|
|
15091
16429
|
onboardingModel(payload: unknown): Promise<BridgeResult<{
|
|
15092
16430
|
revision: number;
|
|
15093
16431
|
}>>;
|
|
15094
|
-
|
|
16432
|
+
telemetryEvent(payload: unknown): BridgeResult<null>;
|
|
15095
16433
|
channelRetry(payload: unknown): Promise<BridgeResult<{
|
|
15096
16434
|
accepted: true;
|
|
15097
16435
|
}>>;
|
|
@@ -15099,6 +16437,8 @@ interface BridgeMethods {
|
|
|
15099
16437
|
started: true;
|
|
15100
16438
|
}>>;
|
|
15101
16439
|
botCompact(payload: unknown): Promise<BridgeResult<ManualCompactionResult>>;
|
|
16440
|
+
botContext(payload: unknown): Promise<BridgeResult<BotContextWindow>>;
|
|
16441
|
+
botSystemPrompt(payload: unknown): Promise<BridgeResult<BotSystemPromptView>>;
|
|
15102
16442
|
channelBotStop(payload: unknown): Promise<BridgeResult<{
|
|
15103
16443
|
stopped: {
|
|
15104
16444
|
botSlug: string;
|
|
@@ -15330,7 +16670,7 @@ interface BridgeMethods {
|
|
|
15330
16670
|
}>;
|
|
15331
16671
|
channelGroupDelete(payload: unknown): BridgeResult<{
|
|
15332
16672
|
deleted: boolean;
|
|
15333
|
-
}>;
|
|
16673
|
+
} & GroupDisbandResult>;
|
|
15334
16674
|
channelHistory(payload: unknown): BridgeResult<{
|
|
15335
16675
|
channels: ChannelHistoryItem[];
|
|
15336
16676
|
}>;
|
|
@@ -15368,6 +16708,7 @@ interface BridgeMethods {
|
|
|
15368
16708
|
messages: ChannelMessage[];
|
|
15369
16709
|
nextCursor?: string;
|
|
15370
16710
|
}>;
|
|
16711
|
+
messageSearch(payload: unknown): BridgeResult<HumanMessageSearchPage>;
|
|
15371
16712
|
channelMessages(payload: unknown): BridgeResult<{
|
|
15372
16713
|
messages: ChannelMessage[];
|
|
15373
16714
|
revision: number;
|
|
@@ -15421,6 +16762,17 @@ interface BridgeMethods {
|
|
|
15421
16762
|
assignment(payload: unknown): BridgeResult<{
|
|
15422
16763
|
assignment: AssignmentDetail;
|
|
15423
16764
|
}>;
|
|
16765
|
+
assignmentTimeline(payload: unknown): Promise<BridgeResult<{
|
|
16766
|
+
assignment: AssignmentDetail;
|
|
16767
|
+
lanes: AssignmentTimelineLane[];
|
|
16768
|
+
omittedSubagents: number;
|
|
16769
|
+
}>>;
|
|
16770
|
+
sessionSubagents(payload: unknown): Promise<BridgeResult<{
|
|
16771
|
+
sessionId: string;
|
|
16772
|
+
role: SessionRootRole;
|
|
16773
|
+
lanes: AssignmentTimelineLane[];
|
|
16774
|
+
omittedSubagents: number;
|
|
16775
|
+
}>>;
|
|
15424
16776
|
workspaceOptions(payload: unknown): BridgeResult<{
|
|
15425
16777
|
workspaces: {
|
|
15426
16778
|
id: string;
|
|
@@ -15435,7 +16787,7 @@ interface BridgeMethods {
|
|
|
15435
16787
|
kind: 'directory';
|
|
15436
16788
|
};
|
|
15437
16789
|
}>;
|
|
15438
|
-
folderBrowse(payload: unknown): BridgeResult<FolderListing
|
|
16790
|
+
folderBrowse(payload: unknown): Promise<BridgeResult<FolderListing>>;
|
|
15439
16791
|
grants(payload: unknown): BridgeResult<{
|
|
15440
16792
|
grants: WorkspaceGrant[];
|
|
15441
16793
|
}>;
|
|
@@ -15462,6 +16814,10 @@ interface BridgeMethods {
|
|
|
15462
16814
|
toolApprovalRuleRevoke(payload: unknown): BridgeResult<{
|
|
15463
16815
|
rule: ToolApprovalRule;
|
|
15464
16816
|
}>;
|
|
16817
|
+
toolApprovalHistory(payload: unknown): BridgeResult<{
|
|
16818
|
+
entries: ToolApprovalHistoryEntry[];
|
|
16819
|
+
nextCursor?: string;
|
|
16820
|
+
}>;
|
|
15465
16821
|
toolApprovalStatus(payload: unknown): BridgeResult<{
|
|
15466
16822
|
status: 'pending' | 'expired';
|
|
15467
16823
|
expiresAt?: string;
|
|
@@ -15489,6 +16845,11 @@ interface BridgeMethods {
|
|
|
15489
16845
|
sessionId: string;
|
|
15490
16846
|
turns: TurnTrace[];
|
|
15491
16847
|
}>>;
|
|
16848
|
+
botTurnInput(payload: unknown): Promise<BridgeResult<{
|
|
16849
|
+
slug: string;
|
|
16850
|
+
sessionId: string;
|
|
16851
|
+
turns: TurnInputView[];
|
|
16852
|
+
}>>;
|
|
15492
16853
|
botTools(payload: unknown): BridgeResult<{
|
|
15493
16854
|
sessionId: 'direct';
|
|
15494
16855
|
tools: DirectBotToolSpec[];
|
|
@@ -15636,6 +16997,29 @@ interface BridgeMethods {
|
|
|
15636
16997
|
approvalTemplateUpdate(payload: unknown): BridgeResult<{
|
|
15637
16998
|
template: ApprovalTemplateEntry;
|
|
15638
16999
|
}>;
|
|
17000
|
+
promptParts(payload: unknown): BridgeResult<{
|
|
17001
|
+
parts: PromptPartView[];
|
|
17002
|
+
limits: PromptLimitView[];
|
|
17003
|
+
}>;
|
|
17004
|
+
promptPresets(payload: unknown): BridgeResult<{
|
|
17005
|
+
presets: PromptPreset[];
|
|
17006
|
+
globalPresetId: string | null;
|
|
17007
|
+
}>;
|
|
17008
|
+
promptPresetCreate(payload: unknown): BridgeResult<{
|
|
17009
|
+
preset: PromptPreset;
|
|
17010
|
+
}>;
|
|
17011
|
+
promptPresetUpdate(payload: unknown): BridgeResult<{
|
|
17012
|
+
preset: PromptPreset;
|
|
17013
|
+
}>;
|
|
17014
|
+
promptPresetDelete(payload: unknown): BridgeResult<{
|
|
17015
|
+
id: string;
|
|
17016
|
+
clearedBots: string[];
|
|
17017
|
+
}>;
|
|
17018
|
+
promptGlobalSet(payload: unknown): BridgeResult<{
|
|
17019
|
+
presetId: string | null;
|
|
17020
|
+
}>;
|
|
17021
|
+
botPrompt(payload: unknown): BridgeResult<BotPromptView>;
|
|
17022
|
+
botPromptSet(payload: unknown): BridgeResult<BotPromptView>;
|
|
15639
17023
|
approvalTemplateDelete(payload: unknown): BridgeResult<{
|
|
15640
17024
|
template: {
|
|
15641
17025
|
name: string;
|
|
@@ -15650,6 +17034,7 @@ interface BridgeMethods {
|
|
|
15650
17034
|
idleCompaction(payload?: unknown): BridgeResult<IdleCompactionView>;
|
|
15651
17035
|
idleCompactionSet(payload: unknown): BridgeResult<IdleCompactionView>;
|
|
15652
17036
|
idleCompactionCacheLifetimeSet(payload: unknown): BridgeResult<IdleCompactionView>;
|
|
17037
|
+
compactionThresholdSet(payload: unknown): BridgeResult<IdleCompactionView>;
|
|
15653
17038
|
standingLimitsSet(payload: unknown): BridgeResult<{
|
|
15654
17039
|
bot: PersonaBotDetail;
|
|
15655
17040
|
}>;
|
|
@@ -15696,11 +17081,58 @@ interface BridgeMethods {
|
|
|
15696
17081
|
bot: MarketplaceEntry;
|
|
15697
17082
|
}>>;
|
|
15698
17083
|
marketplaceTopics(): Promise<BridgeResult<MarketplaceTopic[]>>;
|
|
17084
|
+
marketplaceSections(payload: unknown): Promise<BridgeResult<{
|
|
17085
|
+
sections: MarketplaceSection[];
|
|
17086
|
+
}>>;
|
|
17087
|
+
marketplaceDigests(payload: unknown): Promise<BridgeResult<{
|
|
17088
|
+
digests: MarketplaceDigestSummary[];
|
|
17089
|
+
}>>;
|
|
17090
|
+
marketplaceDigest(payload: unknown): Promise<BridgeResult<{
|
|
17091
|
+
digest: MarketplaceDigest;
|
|
17092
|
+
}>>;
|
|
15699
17093
|
marketplaceDetail(payload: unknown): Promise<BridgeResult<MarketplaceDetail>>;
|
|
17094
|
+
marketplaceFileView(payload: unknown): Promise<BridgeResult<MarketplaceFileView>>;
|
|
15700
17095
|
marketplaceChallenge(): Promise<BridgeResult<AltchaChallenge>>;
|
|
15701
17096
|
marketplaceReport(payload: unknown): Promise<BridgeResult<{
|
|
15702
17097
|
received: true;
|
|
15703
17098
|
}>>;
|
|
17099
|
+
marketplaceAccount(): Promise<BridgeResult<MarketplaceAccount>>;
|
|
17100
|
+
marketplaceAuthorSave(payload: unknown): Promise<BridgeResult<MarketplaceAuthorAccount>>;
|
|
17101
|
+
marketplaceAuthorAvatarSet(payload: unknown): Promise<BridgeResult<MarketplaceAuthorAccount>>;
|
|
17102
|
+
marketplaceUploadPlan(payload: unknown): BridgeResult<UploadPlan>;
|
|
17103
|
+
marketplaceUpload(payload: unknown): Promise<BridgeResult<{
|
|
17104
|
+
bot: MarketplaceEntry;
|
|
17105
|
+
skipped: UploadPlan['skipped'];
|
|
17106
|
+
}>>;
|
|
17107
|
+
marketplaceInstallReview(payload: unknown): Promise<BridgeResult<InstallReviewResult>>;
|
|
17108
|
+
marketplaceMine(payload: unknown): Promise<BridgeResult<{
|
|
17109
|
+
bots: MarketplaceAuthoredBot[];
|
|
17110
|
+
}>>;
|
|
17111
|
+
marketplaceDelete(payload: unknown): Promise<BridgeResult<{
|
|
17112
|
+
deleted: true;
|
|
17113
|
+
}>>;
|
|
17114
|
+
shareDraftStart(payload: unknown): BridgeResult<ShareDraftView>;
|
|
17115
|
+
shareDraftGet(payload: unknown): BridgeResult<ShareDraftView>;
|
|
17116
|
+
shareDraftFile(payload: unknown): BridgeResult<{
|
|
17117
|
+
path: string;
|
|
17118
|
+
kind: UploadFileKind;
|
|
17119
|
+
text?: string;
|
|
17120
|
+
}>;
|
|
17121
|
+
shareDraftDecide(payload: unknown): BridgeResult<ShareDraftView>;
|
|
17122
|
+
shareDraftFinish(payload: unknown): BridgeResult<ShareDraftView>;
|
|
17123
|
+
shareDraftDiscard(payload: unknown): BridgeResult<{
|
|
17124
|
+
discarded: boolean;
|
|
17125
|
+
}>;
|
|
17126
|
+
shareDraftExport(payload: unknown): Promise<BridgeResult<{
|
|
17127
|
+
path: string;
|
|
17128
|
+
files: number;
|
|
17129
|
+
}>>;
|
|
17130
|
+
marketplaceInstall(payload: unknown): Promise<BridgeResult<{
|
|
17131
|
+
bot: PersonaBotDetail;
|
|
17132
|
+
channelId: string;
|
|
17133
|
+
receipt?: BotCreationReceipt;
|
|
17134
|
+
listing: MarketplaceEntry;
|
|
17135
|
+
}>>;
|
|
15704
17136
|
releaseInfo(payload: unknown): BridgeResult<ReleaseInfo>;
|
|
15705
17137
|
releaseUpdate(payload?: unknown): Promise<BridgeResult<ReleaseUpdate>>;
|
|
15706
17138
|
releaseInstall(payload: unknown): Promise<BridgeResult<ReleaseInstall>>;
|
|
@@ -15746,15 +17178,36 @@ interface IdleCompactionView {
|
|
|
15746
17178
|
minimumIdleSeconds: number;
|
|
15747
17179
|
scheduled: number;
|
|
15748
17180
|
routes: IdleCompactionRouteView[];
|
|
17181
|
+
threshold: {
|
|
17182
|
+
ratio: number;
|
|
17183
|
+
headroomTokens: number;
|
|
17184
|
+
ratioSet: boolean;
|
|
17185
|
+
headroomSet: boolean;
|
|
17186
|
+
ratioRange: {
|
|
17187
|
+
defaultValue: number;
|
|
17188
|
+
min: number;
|
|
17189
|
+
max: number;
|
|
17190
|
+
};
|
|
17191
|
+
headroomRange: {
|
|
17192
|
+
defaultValue: number;
|
|
17193
|
+
min: number;
|
|
17194
|
+
max: number;
|
|
17195
|
+
};
|
|
17196
|
+
};
|
|
15749
17197
|
}
|
|
15750
17198
|
interface IdleCompactionDeps {
|
|
15751
17199
|
settings: IdleCompactionSettings;
|
|
15752
17200
|
scheduler: Pick<IdleCompaction, 'describe' | 'scheduled'>;
|
|
15753
17201
|
routes(): IdleCompactionRoute[];
|
|
15754
17202
|
rescan(): void;
|
|
17203
|
+
applyThreshold?(): void;
|
|
15755
17204
|
compactBot?(slug: string): Promise<ManualCompactionResult>;
|
|
17205
|
+
compactReservedSession?(sessionId: string): Promise<ManualCompactionResult>;
|
|
15756
17206
|
}
|
|
15757
17207
|
interface BridgeMethodsDeps {
|
|
17208
|
+
botContext?(slug: string): Promise<BotContextWindow>;
|
|
17209
|
+
botSystemPrompt?(slug: string): Promise<BotSystemPromptView>;
|
|
17210
|
+
prompts?: PromptSettings;
|
|
15758
17211
|
idleCompaction?: IdleCompactionDeps;
|
|
15759
17212
|
cloudConnections?: CloudConnections;
|
|
15760
17213
|
cloudWork?: CloudWork;
|
|
@@ -15800,6 +17253,7 @@ interface BridgeMethodsDeps {
|
|
|
15800
17253
|
memory?: MemoryService;
|
|
15801
17254
|
usage?: UsageProjection;
|
|
15802
17255
|
readUsageSessionLog?: DshUsageSessionLogReader;
|
|
17256
|
+
describeToolCall?(sessionId: string, name: string, args: unknown): PublicToolCall | undefined;
|
|
15803
17257
|
roster: RosterStore;
|
|
15804
17258
|
runtime?: BotRuntime;
|
|
15805
17259
|
attention?: BotAttentionQuery;
|
|
@@ -15828,6 +17282,10 @@ interface BridgeMethodsDeps {
|
|
|
15828
17282
|
};
|
|
15829
17283
|
createBotId?: () => string;
|
|
15830
17284
|
marketplace?: MarketplaceClient;
|
|
17285
|
+
marketplaceUploads?: MarketplaceUploads;
|
|
17286
|
+
marketplaceInstallReviews?: MarketplaceInstallReviews;
|
|
17287
|
+
shareDrafts?: ShareDrafts;
|
|
17288
|
+
marketplaceReceipts?: InstallReceipts;
|
|
15831
17289
|
release?: ReleaseService;
|
|
15832
17290
|
plugins?: PluginUpdateService;
|
|
15833
17291
|
telemetry?: {
|
|
@@ -15835,8 +17293,32 @@ interface BridgeMethodsDeps {
|
|
|
15835
17293
|
setPreference(enabled: boolean): TelemetryStatus;
|
|
15836
17294
|
capture?: TelemetryCapture;
|
|
15837
17295
|
};
|
|
17296
|
+
activeDay?: ActiveDay;
|
|
15838
17297
|
git?: Pick<GitService, 'status' | 'install'>;
|
|
15839
17298
|
}
|
|
17299
|
+
interface PromptPartView {
|
|
17300
|
+
id: PromptPartId;
|
|
17301
|
+
kind: 'system' | 'turn';
|
|
17302
|
+
section: string;
|
|
17303
|
+
defaultText: string;
|
|
17304
|
+
defaultHash: string;
|
|
17305
|
+
}
|
|
17306
|
+
interface BotPromptView {
|
|
17307
|
+
slug: string;
|
|
17308
|
+
presetId: string | null;
|
|
17309
|
+
globalPresetId: string | null;
|
|
17310
|
+
sessionId: string | null;
|
|
17311
|
+
pending: boolean;
|
|
17312
|
+
parts: ResolvedPromptPart[];
|
|
17313
|
+
limits: ResolvedPromptLimit[];
|
|
17314
|
+
}
|
|
17315
|
+
interface PromptLimitView {
|
|
17316
|
+
id: (typeof PROMPT_LIMITS)[number]['id'];
|
|
17317
|
+
group: 'inbox' | 'review';
|
|
17318
|
+
defaultValue: number;
|
|
17319
|
+
min: number;
|
|
17320
|
+
max: number;
|
|
17321
|
+
}
|
|
15840
17322
|
export declare function createBridgeMethods(deps: BridgeMethodsDeps): BridgeMethods;
|
|
15841
17323
|
//#endregion
|
|
15842
17324
|
//#region packages/core/src/companions/live.d.ts
|
|
@@ -16092,17 +17574,24 @@ export declare class BotharnessBridgeService extends TypertRemoteService {
|
|
|
16092
17574
|
onboardingModel(slug: string | undefined, expectedRevision: number, route: ModelRoute, globalDefault: boolean, expectedDefaultRevision?: number): Promise<{
|
|
16093
17575
|
revision: number;
|
|
16094
17576
|
}>;
|
|
16095
|
-
|
|
17577
|
+
telemetryEvent(event: string, properties?: Record<string, string | boolean>): null;
|
|
16096
17578
|
modelPlanInherit(slug: string, expectedRevision: number): {
|
|
16097
17579
|
revision: number;
|
|
16098
17580
|
};
|
|
16099
|
-
channelRetry(channelId: string, messageId: string): Promise<{
|
|
17581
|
+
channelRetry(channelId: string, messageId: string, recovery?: 'compact' | 'new-session', failureMessageId?: string): Promise<{
|
|
16100
17582
|
accepted: true;
|
|
16101
17583
|
}>;
|
|
16102
17584
|
botNewSession(slug: string): Promise<{
|
|
16103
17585
|
started: true;
|
|
16104
17586
|
}>;
|
|
16105
17587
|
botCompact(slug: string): Promise<ManualCompactionResult>;
|
|
17588
|
+
botContext(slug: string): Promise<BotContextWindow>;
|
|
17589
|
+
botSystemPrompt(slug: string): Promise<BotSystemPromptView>;
|
|
17590
|
+
botTurnInput(slug: string, sessionId?: string, turns?: number): Promise<{
|
|
17591
|
+
slug: string;
|
|
17592
|
+
sessionId: string;
|
|
17593
|
+
turns: TurnInputView[];
|
|
17594
|
+
}>;
|
|
16106
17595
|
channelBotStop(channelId: string, botSlug: string): Promise<{
|
|
16107
17596
|
stopped: {
|
|
16108
17597
|
botSlug: string;
|
|
@@ -16168,7 +17657,7 @@ export declare class BotharnessBridgeService extends TypertRemoteService {
|
|
|
16168
17657
|
channelId: string;
|
|
16169
17658
|
receipt?: BotCreationReceipt;
|
|
16170
17659
|
}>;
|
|
16171
|
-
createFromGit(displayName: string, gitUrl: string, roles?: string[], description?: string, origin?: 'marketplace', operationKey?: string, expectedCommit?: string): Promise<{
|
|
17660
|
+
createFromGit(displayName: string, gitUrl: string, roles?: string[], description?: string, origin?: 'marketplace', operationKey?: string, expectedCommit?: string, listingId?: string): Promise<{
|
|
16172
17661
|
bot: PersonaBotDetail;
|
|
16173
17662
|
httpsFallback?: HttpsFallback;
|
|
16174
17663
|
receipt?: BotCreationReceipt;
|
|
@@ -16224,6 +17713,29 @@ export declare class BotharnessBridgeService extends TypertRemoteService {
|
|
|
16224
17713
|
approvalTemplateUpdate(name: string, text: string): {
|
|
16225
17714
|
template: ApprovalTemplateEntry;
|
|
16226
17715
|
};
|
|
17716
|
+
promptParts(): {
|
|
17717
|
+
parts: PromptPartView[];
|
|
17718
|
+
limits: PromptLimitView[];
|
|
17719
|
+
};
|
|
17720
|
+
promptPresets(): {
|
|
17721
|
+
presets: PromptPreset[];
|
|
17722
|
+
globalPresetId: string | null;
|
|
17723
|
+
};
|
|
17724
|
+
promptPresetCreate(name: string, parts?: Record<string, unknown>, limits?: Record<string, unknown>): {
|
|
17725
|
+
preset: PromptPreset;
|
|
17726
|
+
};
|
|
17727
|
+
promptPresetUpdate(id: string, name?: string, parts?: Record<string, unknown>, expectedRevision?: number, limits?: Record<string, unknown>): {
|
|
17728
|
+
preset: PromptPreset;
|
|
17729
|
+
};
|
|
17730
|
+
promptPresetDelete(id: string): {
|
|
17731
|
+
id: string;
|
|
17732
|
+
clearedBots: string[];
|
|
17733
|
+
};
|
|
17734
|
+
promptGlobalSet(presetId: string | null): {
|
|
17735
|
+
presetId: string | null;
|
|
17736
|
+
};
|
|
17737
|
+
botPrompt(slug: string): BotPromptView;
|
|
17738
|
+
botPromptSet(slug: string, presetId?: string | null, parts?: Record<string, unknown>, limits?: Record<string, unknown>): BotPromptView;
|
|
16227
17739
|
approvalTemplateDelete(name: string): {
|
|
16228
17740
|
template: {
|
|
16229
17741
|
name: string;
|
|
@@ -16237,6 +17749,7 @@ export declare class BotharnessBridgeService extends TypertRemoteService {
|
|
|
16237
17749
|
approvalReviewerModelSet(model: ModelRoute | null): Promise<ApprovalReviewerModelView>;
|
|
16238
17750
|
idleCompaction(): IdleCompactionView;
|
|
16239
17751
|
idleCompactionSet(enabled: boolean): IdleCompactionView;
|
|
17752
|
+
compactionThresholdSet(thresholdRatio?: number | null, headroomTokens?: number | null): IdleCompactionView;
|
|
16240
17753
|
idleCompactionCacheLifetimeSet(provider: string, model: string, seconds: number | null): IdleCompactionView;
|
|
16241
17754
|
standingLimitsSet(slug: string, soul: number, coreMemory: number): {
|
|
16242
17755
|
bot: PersonaBotDetail;
|
|
@@ -16323,7 +17836,7 @@ export declare class BotharnessBridgeService extends TypertRemoteService {
|
|
|
16323
17836
|
humanNameSet(displayName: string | null): LocalHumanIdentity;
|
|
16324
17837
|
channelGroupDelete(channelId: string): {
|
|
16325
17838
|
deleted: boolean;
|
|
16326
|
-
};
|
|
17839
|
+
} & GroupDisbandResult;
|
|
16327
17840
|
channelHistory(): {
|
|
16328
17841
|
channels: ChannelHistoryItem[];
|
|
16329
17842
|
};
|
|
@@ -16364,6 +17877,7 @@ export declare class BotharnessBridgeService extends TypertRemoteService {
|
|
|
16364
17877
|
messages: ChannelMessage[];
|
|
16365
17878
|
nextCursor?: string;
|
|
16366
17879
|
};
|
|
17880
|
+
messageSearch(text: string, cursor?: string, limit?: number): HumanMessageSearchPage;
|
|
16367
17881
|
channelAllBotPreview(channelId: string): AllBotPreview;
|
|
16368
17882
|
channelSendStatus(channelId: string, messageId: string): ChannelSendStatus;
|
|
16369
17883
|
channelSend(channelId: string, body: string, replyTo?: string, attachments?: ChannelAttachmentRef[], messageId?: string, memorySwitchTarget?: string, mentions?: ChannelMessage['mentions'], channelRefs?: ChannelMessage['channelRefs'], grantRequestResolution?: ChannelMessage['grantRequestResolution'], assignmentReply?: ChannelMessage['assignmentReply'], allBotMention?: AllBotMention): Promise<{
|
|
@@ -16404,8 +17918,9 @@ export declare class BotharnessBridgeService extends TypertRemoteService {
|
|
|
16404
17918
|
humanAttentionSnooze(itemId: string, sourceKey: string, until: string | null): {
|
|
16405
17919
|
accepted: boolean;
|
|
16406
17920
|
};
|
|
16407
|
-
assignments(slug: string): {
|
|
17921
|
+
assignments(slug: string, query?: string, activity?: AssignmentActivity[], includeArchived?: boolean, limit?: number, cursor?: string): {
|
|
16408
17922
|
assignments: AssignmentSummary[];
|
|
17923
|
+
nextCursor?: string;
|
|
16409
17924
|
};
|
|
16410
17925
|
channelAssignments(channelId: string): {
|
|
16411
17926
|
assignments: ChannelAssignmentSummary[];
|
|
@@ -16413,6 +17928,17 @@ export declare class BotharnessBridgeService extends TypertRemoteService {
|
|
|
16413
17928
|
assignment(slug: string, sessionId: string): {
|
|
16414
17929
|
assignment: AssignmentDetail;
|
|
16415
17930
|
};
|
|
17931
|
+
assignmentTimeline(slug: string, sessionId: string): Promise<{
|
|
17932
|
+
assignment: AssignmentDetail;
|
|
17933
|
+
lanes: AssignmentTimelineLane[];
|
|
17934
|
+
omittedSubagents: number;
|
|
17935
|
+
}>;
|
|
17936
|
+
sessionSubagents(slug: string, sessionId: string): Promise<{
|
|
17937
|
+
sessionId: string;
|
|
17938
|
+
role: SessionRootRole;
|
|
17939
|
+
lanes: AssignmentTimelineLane[];
|
|
17940
|
+
omittedSubagents: number;
|
|
17941
|
+
}>;
|
|
16416
17942
|
workspaceOptions(): {
|
|
16417
17943
|
workspaces: {
|
|
16418
17944
|
id: string;
|
|
@@ -16426,7 +17952,7 @@ export declare class BotharnessBridgeService extends TypertRemoteService {
|
|
|
16426
17952
|
messageAttachmentTarget(channelId: string, messageId: string, fileId: string): {
|
|
16427
17953
|
target: MemoryFileTarget;
|
|
16428
17954
|
};
|
|
16429
|
-
folderBrowse(path?: string): FolderListing
|
|
17955
|
+
folderBrowse(path?: string, offset?: number): Promise<FolderListing>;
|
|
16430
17956
|
workspaceFileTarget(slug: string, grantId: string): {
|
|
16431
17957
|
target: {
|
|
16432
17958
|
path: string;
|
|
@@ -16466,6 +17992,13 @@ export declare class BotharnessBridgeService extends TypertRemoteService {
|
|
|
16466
17992
|
toolApprovalRuleRevoke(slug: string, id: string): {
|
|
16467
17993
|
rule: ToolApprovalRule;
|
|
16468
17994
|
};
|
|
17995
|
+
toolApprovalHistory(slug: string, page?: {
|
|
17996
|
+
cursor?: string;
|
|
17997
|
+
limit?: number;
|
|
17998
|
+
}): {
|
|
17999
|
+
entries: ToolApprovalHistoryEntry[];
|
|
18000
|
+
nextCursor?: string;
|
|
18001
|
+
};
|
|
16469
18002
|
toolApprovalStatus(channelId: string, messageId: string): {
|
|
16470
18003
|
status: 'pending' | 'expired';
|
|
16471
18004
|
execution?: 'waiting-human' | 'waiting-capacity' | 'running' | 'settled' | 'needs-repair';
|
|
@@ -16502,7 +18035,7 @@ export declare class BotharnessBridgeService extends TypertRemoteService {
|
|
|
16502
18035
|
sessionId: 'direct';
|
|
16503
18036
|
tools: DirectBotToolSpec[];
|
|
16504
18037
|
};
|
|
16505
|
-
botToolRun(slug: string, tool: string, args?: Record<string, unknown
|
|
18038
|
+
botToolRun(slug: string, tool: string, args?: Record<string, unknown>, sessionId?: string): Promise<{
|
|
16506
18039
|
slug: string;
|
|
16507
18040
|
tool: string;
|
|
16508
18041
|
sessionId: 'direct';
|
|
@@ -16629,7 +18162,54 @@ export declare class BotharnessBridgeService extends TypertRemoteService {
|
|
|
16629
18162
|
received: true;
|
|
16630
18163
|
}>;
|
|
16631
18164
|
marketplaceTopics(): Promise<MarketplaceTopic[]>;
|
|
18165
|
+
marketplaceSections(lang?: MarketplaceLanguage): Promise<{
|
|
18166
|
+
sections: MarketplaceSection[];
|
|
18167
|
+
}>;
|
|
18168
|
+
marketplaceDigests(lang?: MarketplaceLanguage): Promise<{
|
|
18169
|
+
digests: MarketplaceDigestSummary[];
|
|
18170
|
+
}>;
|
|
18171
|
+
marketplaceDigest(day?: string, lang?: MarketplaceLanguage): Promise<{
|
|
18172
|
+
digest: MarketplaceDigest;
|
|
18173
|
+
}>;
|
|
16632
18174
|
marketplaceDetail(id: string, lang?: MarketplaceLanguage): Promise<MarketplaceDetail>;
|
|
18175
|
+
marketplaceFileView(id: string, path: string): Promise<MarketplaceFileView>;
|
|
18176
|
+
marketplaceAccount(): Promise<MarketplaceAccount>;
|
|
18177
|
+
marketplaceAuthorSave(displayName: string, acceptTerms?: boolean): Promise<MarketplaceAuthorAccount>;
|
|
18178
|
+
marketplaceAuthorAvatarSet(avatar: string | null): Promise<MarketplaceAuthorAccount>;
|
|
18179
|
+
marketplaceUploadPlan(slug: string): UploadPlan;
|
|
18180
|
+
marketplaceUpload(slug: string, displayName: string, bio?: string, tags?: string[], replaces?: string): Promise<{
|
|
18181
|
+
bot: MarketplaceEntry;
|
|
18182
|
+
skipped: UploadPlan['skipped'];
|
|
18183
|
+
}>;
|
|
18184
|
+
marketplaceMine(lang?: MarketplaceLanguage): Promise<{
|
|
18185
|
+
bots: MarketplaceAuthoredBot[];
|
|
18186
|
+
}>;
|
|
18187
|
+
marketplaceDelete(id: string): Promise<{
|
|
18188
|
+
deleted: true;
|
|
18189
|
+
}>;
|
|
18190
|
+
marketplaceInstallReview(id: string, lang?: 'en' | 'zh'): Promise<InstallReviewResult>;
|
|
18191
|
+
shareDraftStart(slug: string): ShareDraftView;
|
|
18192
|
+
shareDraftGet(slug: string): ShareDraftView;
|
|
18193
|
+
shareDraftFile(slug: string, path: string): {
|
|
18194
|
+
path: string;
|
|
18195
|
+
kind: string;
|
|
18196
|
+
text?: string;
|
|
18197
|
+
};
|
|
18198
|
+
shareDraftDecide(slug: string, path: string, decision: 'keep' | 'drop' | 'rewrite', text?: string): ShareDraftView;
|
|
18199
|
+
shareDraftFinish(slug: string): ShareDraftView;
|
|
18200
|
+
shareDraftDiscard(slug: string): {
|
|
18201
|
+
discarded: boolean;
|
|
18202
|
+
};
|
|
18203
|
+
shareDraftExport(slug: string): Promise<{
|
|
18204
|
+
path: string;
|
|
18205
|
+
files: number;
|
|
18206
|
+
}>;
|
|
18207
|
+
marketplaceInstall(id: string, reviewId: string, operationKey?: string): Promise<{
|
|
18208
|
+
bot: PersonaBotDetail;
|
|
18209
|
+
channelId: string;
|
|
18210
|
+
receipt?: BotCreationReceipt;
|
|
18211
|
+
listing: MarketplaceEntry;
|
|
18212
|
+
}>;
|
|
16633
18213
|
releaseInfo(since?: string): Promise<ReleaseInfo>;
|
|
16634
18214
|
releaseUpdate(force?: boolean): Promise<ReleaseUpdate>;
|
|
16635
18215
|
releaseInstall(version: string): Promise<ReleaseInstall>;
|
|
@@ -16707,7 +18287,7 @@ interface BotCreateFailure {
|
|
|
16707
18287
|
name: string;
|
|
16708
18288
|
};
|
|
16709
18289
|
}
|
|
16710
|
-
export declare const BOT_CREATE_HELP = "tobs: manage your Bots\n\nUsage:\n tobs ssh-tunnel <alias> --pairing-file <private-file> --out <new-private-file>\n --local-port <port> --remote-port <port> [--ssh-config <absolute-file>]\n tobs create --name <name> [--persona <text> | --persona-stdin]\n [--core-memory <text> | --core-memory-stdin]\n [--description <text>] [--role <tag> ...] [--avatar-file <image>]\n [--preset <model-preset-id>] [--memory-location <absolute-dir>]\n [--home <dsh-home>] [--operation-key <stable-key> (online blank creation)]\n tobs create --name <name> --from-git <url | owner/repo> [...]\n tobs create [--name <name>] --from-zip <file> [...]\n tobs create [--name <name>] --from-dir <directory> [...]\n tobs bot-import-preview --from-git <url | owner/repo> --host <url>\n tobs create-status --name <name> --operation-key <stable-key> [same blank or pinned Git input] --host <url>\n tobs list [--home <dsh-home>]\n tobs bot-zip-upload --from-zip <file> --upload-key <key> --host <url>\n tobs bot-zip-preview --upload-key <key> --archive-sha256 <hash> --archive-size <bytes> --host <url>\n tobs bot-zip-import --upload-key <key> --archive-sha256 <hash> --archive-size <bytes> --operation-key <key> --name <name> --host <url>\n tobs bot-zip-import-status --archive-sha256 <hash> --operation-key <key> --name <name> --host <url>\n tobs show <id> [--home <dsh-home>]\n tobs model-presets [--home <dsh-home>]\n tobs model-preset-create --name <preset> --orchestrator-provider <p> --orchestrator-model <m>\n [--orchestrator-effort <e>] --assignment-provider <p>\n --assignment-model <m> [--assignment-effort <e>] [--home <dsh-home>]\n [--plan-stdin (online Host only)]\n tobs model-preset-apply <id> --preset <preset-id> [--expected-revision <n>] [--preset-revision <n>] [--home <dsh-home>]\n tobs model-plan <id> [--home <dsh-home>]\n tobs pause <id> [--home <dsh-home>]\n tobs resume <id> [--home <dsh-home>]\n tobs update <id> [--name <name>] [--description <text>] [--role <tag> ...] [--home <dsh-home>]\n tobs human-name-set (--name <text> | --clear) [--home <dsh-home>]\n tobs channel-human-name-set <channel> (--nickname <text> | --clear) [--home <dsh-home>]\n tobs memory-snapshot <id> [--home <dsh-home>]\n tobs memory-file <id> --path <file> [--home <dsh-home>]\n tobs memory-history <id> [--limit <n>] [--home <dsh-home>]\n tobs memory-diff <id> --sha <commit> [--home <dsh-home>]\n tobs memory-save <id> --path <file> (--body <text> | --body-stdin)\n [--expected-head <sha>] [--edit-id <id>] [--home <dsh-home>]\n tobs channels [--home <dsh-home>]\n tobs channel-messages <channel> [--limit <n>] [--before <id>] [--home <dsh-home>]\n tobs channel-media-target <channel> --source-event <id> --attachment <id>\n tobs channel-media-download <channel> --source-event <id> --attachment <id> --out <path>\n tobs grants <id> [--home <dsh-home>]\n tobs grant-revoke <id> --grant <grant> [--home <dsh-home>] online: add --confirm\n tobs grant-write-set <id> --grant <grant> (--enabled | --disabled) [--home <dsh-home>]\n tobs schedules <id> [--home <dsh-home>]\n tobs schedule-create <id> --title <t> --prompt <p> (--every <s> | --daily <HH:MM> |\n --weekly <HH:MM> --weekdays <0-6,..> | --once-date <d> --once-time <t> |\n --cron <expr>) [--timezone <tz>] [--enabled|--disabled] [--locked] [--home <dsh-home>]\n tobs schedule-update <id> --sid <schedule> [--title ...] [--prompt ...] [trigger ...] [--home <dsh-home>]\n tobs schedule-delete <id> --sid <schedule> [--confirm] [--home <dsh-home>]\n tobs schedule-history <id> --sid <schedule> [--home <dsh-home>]\n tobs schedule-run-now <id> --sid <schedule> [--home <dsh-home>]\n tobs schedule-preview (--every <s> | --daily ... | ...) [--home <dsh-home>]\n tobs pairings <id> [--home <dsh-home>]\n tobs secret-put <NAME> [--home <dsh-home>] secret value arrives on stdin only\n tobs secret-list [--home <dsh-home>] names, sources, writability; never values\n tobs secret-unset <NAME> [--home <dsh-home>]\n tobs search <words> find commands by words\n tobs send <id> (--body <text> | --body-stdin) [--message-id human-<UUID>] [--timeout <seconds>]\n tobs send-status <id> --message-id <Human-message-id>\n tobs tool-approval-status <channel> --message-id <card-id>\n tobs tool-approval-decide <channel> --message-id <card-id> --outcome allowed-once|rejected\n tobs user-question-status <channel> --message-id <card-id>\n tobs user-question-answer <channel> --message-id <card-id> --answer-stdin\n tobs ask-secret-status <channel> --message-id <card-id>\n tobs ask-secret-submit <channel> --message-id <card-id> --values-stdin\n tobs ask-secret-cancel <channel> --message-id <card-id>\n tobs ask-secret-account-status <channel> --message-id <configured-card-id>\n tobs ask-secret-replace <channel> --message-id <configured-card-id>\n tobs ask-secret-revoke <channel> --message-id <configured-card-id>\n tobs ask-secret-accounts <id>\n tobs release-info [--since <version>]\n tobs release-check\n tobs release-install <version> --confirm\n tobs release-restart --confirm\n tobs plugin-check [--force]\n tobs plugin-install <package> <version> --confirm\n tobs plugin-restart --confirm\n tobs marketplace-list [--query <words>] [--topic <topic>] [--sort updated|created|stars] [--cursor <c>]\n tobs marketplace-topics\n tobs marketplace-detail <owner/repo>\n tobs marketplace-submit <github-repo-url>\n tobs marketplace-report <owner/repo> [--reason <text>]\n tobs data-reset-preview\n tobs data-reset-confirm --confirmation-stdin --confirm\n tobs telemetry-status\n tobs telemetry-set (--enabled | --disabled)\n tobs git-status\n tobs git-install\n tobs pairing-list <id>\n tobs pairing-review <id> <pairing-id> --decision approve|reject|revoke [--role <role-id> | --capability <c> ...] [--confirm]\n tobs workspace-options\n tobs grant-create <id> --workspace <workspace-id>\n tobs browser-access-set <id> (--enabled | --disabled)\n tobs computer-access-set <id> (--enabled | --disabled)\n tobs access <id>\n tobs access-set <id> --mode workspace-write|danger-full-access [--scope chat|assignments] [--acknowledge-risk]\n tobs settings <namespace>\n tobs settings-set <namespace> --patch-stdin [--expected-revision <n> --previous-value <json>]\n tobs workspace-create <absolute-path>\n tobs channel <channel-id>\n tobs group-create <name> [--member <bot-id> ...] [--operation-key <key>]\n tobs group-invite <channel-id> --bot <bot-id> [--operation-key <key>] [--expected-channel <fingerprint>]\n tobs group-invite-cancel <channel-id> --invitation <invitation-id> [--expected-channel <fingerprint>]\n tobs group-join-decide <channel-id> --request <join-request-id> (--accept | --decline) [--expected-channel <fingerprint>]\n tobs channel-rename <channel-id> --name <name> [--expected-channel <fingerprint>]\n tobs group-avatar-set <channel-id> (--avatar-file <path> | --clear) [--expected-channel <fingerprint>]\n tobs group-wake-policies <channel-id>\n tobs group-wake-set <channel-id> --bot <bot-id> (--mode all|mentions|digest|silent | --inherit) [--count <n>] [--interval <seconds>] [--expected-channel <fingerprint>]\n tobs group-member-remove <channel-id> --bot <bot-id> [--expected-channel <fingerprint>]\n tobs im-app-add <discord|slack|qq|dingtalk|wecom|matrix> --credentials-stdin\n tobs im-app-status <platform>\n tobs im-app-remove <platform> --app <app-id>\n tobs im-bind <id> --app <app-id>\n tobs im-unbind <id> --app <app-id>\n tobs im-status <id>\n tobs channel-connect <channel> --bot <id> --conversation <external-id> [--app <app-id>]\n tobs channel-ingests <channel>\n tobs browser-open <id>\n tobs browser-frame <id> --out <absolute-file>\n tobs browser-takeover <id> (--enabled | --disabled)\n tobs browser-input <id> --args-stdin\n tobs browser-stop <id>\n tobs computer-start [--target local|container]\n tobs computer-status\n tobs computer-stop\n tobs browser-tools\n tobs browser-tool <id> <tool> [--args-stdin] [--out <absolute-file>]\n tobs memory-file-target|memory-graph|memory-commit-diff|memory-changes <id> [...]\n tobs memory-working-diff <id> --path <file> --kind staged|unstaged|untracked|current\n tobs memory-checkpoints|memory-versions <id>\n tobs memory-restore <id> --checkpoint <id> --expected-current <id>\n tobs memory-restore-commit <id> --sha <commit> --expected-head <commit> [--name <version>]\n tobs memory-version-name <id> --sha <commit> --name <version>\n tobs memory-version-unname <id> --tag <version>\n tobs memory-repair <id> --expected-head <commit>\n tobs memory-move <id> (--memory-location <absolute-dir> | --default-location)\n tobs model-catalog\n tobs model-plan-set <id> --plan-stdin [--expected-revision <n>]\n tobs model-plan-customize <id> --orchestrator-provider <p> --orchestrator-model <m> [--orchestrator-effort <e>]\n tobs model-plan-inherit <id> [--expected-revision <n>]\n tobs model-plan-assignments-set <id> --plan-stdin [--expected-revision <n>]\n tobs model-preset-update <preset-id> [--name <n>] [--orchestrator-provider/-model/-effort ...]\n [--assignment-provider/-model/-effort ...] [--plan-stdin] [--expected-revision <n>]\n tobs overview-usage [--period today|week|month|quarter] [--after <bot-cursor>]\n tobs overview-memory [--after <bot-cursor>]\n tobs activity-overview\n tobs channel-activity-today\n tobs bot-usage <id> --start <YYYY-MM-DD> --end <YYYY-MM-DD> [--model <m>] [--provider <p>]\n [--purpose orchestrator|assignment|subagent]\n tobs bot-session-usage <id>\n tobs bot-activity-history <id> [--before <YYYY-MM-DD>] [--weeks <1-104>]\n tobs group-activity <channel>\n tobs bot-trace <id> [--turns <1-20>] [--session <session-id>|direct]\n tobs bot-tools\n tobs bot-tool <id> <tool> [--args-stdin]\n tobs computer-tools\n tobs computer-tool <id> <tool> [--args-stdin] [--out <absolute-file>]\n tobs todos\n tobs todo-add --title <text>\n tobs todo-update <todo-id> [--title <text>] [--done | --not-done]\n tobs todo-remove <todo-id>\n tobs todo-tools\n tobs todo-tool <id> <tool> [--args-stdin]\n tobs bot-attention <id> [--limit <1-100>] [--cursor <source-id>] [--state <state>]\n tobs bot-sessions <id> [--limit <1-100>]\n tobs bot-activity <id> [--limit <1-100>]\n tobs inbox [--category action|info|unread|replies|handled] [--bot <id>] [--channel <id>]\n [--limit <1-100>] [--cursor <cursor>] [--sort newest|oldest]\n [--snoozed | --dismissed] [--kind auto-rejection]\n tobs inbox-status\n tobs inbox-dismiss <item-id> [--source-key <source-event-id>]\n tobs inbox-restore <item-id> [--source-key <source-event-id>]\n tobs inbox-allow-once <autoreject:item-id>\n tobs inbox-snooze <item-id> [--source-key <source-event-id>] (--until <ISO time> | --clear)\n tobs inbox-ignore <source-event-id>\n tobs assignment-context <id> --session <session-id> --source <source-event-id>\n tobs channel-assignments <group-channel>\n tobs channel-assign <channel> (--section <section-id> | --unsectioned) [--index <n>]\n tobs session-ids\n tobs session-owner <session-id>\n tobs session-archive-set <id> --session <session-id> (--archived | --unarchived)\n tobs tool-approval-rules <id>\n tobs tool-approval-rule-revoke <id> --rule <rule-id> --confirm\n tobs private-mcp-set <id> --server <name> (--enabled | --disabled)\n tobs private-mcp-remove <id> --server <name> --confirm\n tobs bot-delete-preview <id>\n tobs bot-delete-memory-folder <id>\n tobs bot-delete-confirm <id> --confirmation-stdin --confirm [--erase-memory]\n tobs bot-delete-retry <id> --confirm\n tobs bot-avatar-set|bot-banner-set <id> (--file <image> | --clear)\n tobs bot-banner-set|bot-appearance-set <id> --recipe-stdin\n tobs bot-primary-color-set <id> (--color <#rrggbb> | --automatic)\n tobs bot-source-policies <id>\n tobs bot-source-policy-set <id> --source-class <class> [--wake <w>] [--delivery steer|turn]\n [--digest-count <n> --digest-interval <seconds>]\n tobs bot-source-policy-reset <id> --source-class <class>\n tobs bot-standing-limits-set <id> --soul <n> --core-memory <n>\n tobs developer-mode-set (--enabled | --disabled)\n tobs roster | human-identity | part-library\n tobs roster-batch pin|unpin|hide|move <channel>... [--section <section-id>]\n tobs roster-pins-set|roster-hidden-set [<channel>...]\n tobs roster-section-create <name>\n tobs roster-section-rename <section-id> --name <text>\n tobs roster-section-remove <section-id> --confirm\n tobs roster-section-reorder <section-id>...\n tobs roster-top-reorder section:<id>|channel:<id>...\n tobs part-library-add --part-stdin [--name <text>] [--parent <part-id>]\n tobs part-library-import --file <png|zip>\n tobs part-library-import-image --file <png> --slot <slot> --colors <n> [--name <text>]\n tobs part-library-export --out <absolute-file> [--part-id <id> | --part-stdin]\n tobs im-apps\n tobs im-authorize <feishu|weixin>\n tobs im-credentials <attempt-id> --credentials-stdin\n tobs im-verify <attempt-id> --verification-stdin\n tobs pairing-status <attempt-id> [--wait] [--timeout <seconds>]\n tobs im-cancel <attempt-id>\n tobs --help | tobs create --help\n\nOutput:\n stdout carries JSON, pretty by default; --compact condenses it to one line\n for agents. Human-readable lines go to stderr only.\n\nSources (exactly one per create):\n (none) blank bot; --preset applies a model preset, otherwise the model\n step reports no-model-yet and activation stays a Settings task\n --from-git clone a Git repository as Memory (HTTPS, SSH, or owner/repo\n shorthand for https://github.com/owner/repo.git)\n --from-zip import a bot bundle zip (same shape as the bot-zip export)\n --from-dir import a bot bundle directory (same shape as the bot-zip export;\n a .git subtree is skipped as files but packed as history)\n\nMachine contract:\n stdout carries exactly one JSON document. Success exits 0 with the bot id,\n DM channel, data directory, per-step statuses, and next actions. Failure\n exits non-zero with {\"error\": {\"code\", \"message\"}} using a stable code\n (usage, secret-in-argv, bad-zip, bad-bundle, bad-ref, unknown-preset,\n unknown-bot, unknown-channel, duplicate-preset, git-not-found, git-clone-failed, git-clone-timeout,\n memory-unavailable, lease-unavailable, bad-credentials, invalid-input, invalid-avatar,\n file-unreadable). Human-readable lines go to stderr only.\n Stop the Host before offline database commands: the writer lease is exclusive.\n\nLive Host:\n Require --host <loopback-origin|tailnet-HTTPS-origin> or DEEPSEEKBOT_HOST.\n Auth: DEEPSEEKBOT_HOST_TOKEN or --token-file <private-file>, never a token in argv.\n Login is fresh per call; cookies stay in memory. --timeout defaults to 120 seconds (max 600).\n send returns its receipt and exact committed replies. Inspect send-status on timeout\n before retrying; send never automatically resubmits. channel-messages also accepts --host.\n create (blank, Git, Zip and directory), list/show, model-presets/create/apply/plan,\n channels and the schedule* commands use the Host when --host or DEEPSEEKBOT_HOST is set. Do not combine\n --home with an online target; failures never fall back to local database access.\n Zip/directory uploads contain local bytes; Git cloning uses the Host environment.\n Creation errors retain known bot/steps; outcome unknown means inspect before retrying.\n Bot diagnostics are bounded summaries, not full execution logs or live streams.\n grant-revoke and grant-write-set use the Host when it is targeted; revokes and removals\n (grant, tool approval rule, private MCP server) need --confirm, like the Web UI.\n Deletion requires preview then stdin {\"token\":\"<preview.token>\"}; Memory is retained.\n Question stdin: {\"answers\":[{\"id\":\"question-id\",\"selected\":[\"option\"],\"custom\":\"optional\"}]}\n Private input stdin: {\"field_id\":\"confidential value\",...}; only declared fields.\n Private input commands return status/acceptance only and never retry a submission.\n\nModels:\n model-presets lists the profile presets; model-preset-create mints one from\n explicit provider/model routes; model-preset-apply and model-plan read and\n write through the Host when selected, otherwise directly offline. Routes are shape-checked plus\n provider-existence-checked offline; catalog liveness and readiness\n inspection stay Host-side, and model-plan reports readiness deferred.\n\nMemory:\n memory-snapshot/file/history/diff read the bot memory store; memory-save\n writes one file and commits it. --expected-head defaults to the current\n HEAD (pass it explicitly for compare-and-swap); --edit-id defaults to a\n fresh UUID and makes repeat submissions idempotent. Conflicts, missing\n files, and bad shas fail coded (memory-conflict, not-found,\n memory-unknown-commit).\n\nIdentity:\n The bot name is a label. Every create mints a new bot id, so reusing a name\n always returns a second bot and still exits 0.\n\nSecrets:\n Never pass secrets as arguments: any --api-key/--token/--secret/--password\n style flag is a hard error (secret-in-argv). Model keys and tokens travel in\n the environment (for example DEEPSEEK_API_KEY, GITHUB_TOKEN) or a stdin pipe\n (--persona-stdin); result JSON never contains secret values.\n\nHome:\n --home points at the target DSH_HOME (a fresh directory works with zero\n clicks); without it, DSH_HOME from the environment is used.\n";
|
|
18290
|
+
export declare const BOT_CREATE_HELP = "tobs: manage your Bots\n\nUsage:\n tobs ssh-tunnel <alias> --pairing-file <private-file> --out <new-private-file>\n --local-port <port> --remote-port <port> [--ssh-config <absolute-file>]\n tobs create --name <name> [--persona <text> | --persona-stdin]\n [--core-memory <text> | --core-memory-stdin]\n [--description <text>] [--role <tag> ...] [--avatar-file <image>]\n [--preset <model-preset-id>] [--memory-location <absolute-dir>]\n [--home <dsh-home>] [--operation-key <stable-key> (online blank creation)]\n tobs create --name <name> --from-git <url | owner/repo> [...]\n tobs create [--name <name>] --from-zip <file> [...]\n tobs create [--name <name>] --from-dir <directory> [...]\n tobs bot-import-preview --from-git <url | owner/repo> --host <url>\n tobs create-status --name <name> --operation-key <stable-key> [same blank or pinned Git input] --host <url>\n tobs list [--home <dsh-home>]\n tobs bot-zip-upload --from-zip <file> --upload-key <key> --host <url>\n tobs bot-zip-preview --upload-key <key> --archive-sha256 <hash> --archive-size <bytes> --host <url>\n tobs bot-zip-import --upload-key <key> --archive-sha256 <hash> --archive-size <bytes> --operation-key <key> --name <name> --host <url>\n tobs bot-zip-import-status --archive-sha256 <hash> --operation-key <key> --name <name> --host <url>\n tobs show <id> [--home <dsh-home>]\n tobs model-presets [--home <dsh-home>]\n tobs model-preset-create --name <preset> --orchestrator-provider <p> --orchestrator-model <m>\n [--orchestrator-effort <e>] --assignment-provider <p>\n --assignment-model <m> [--assignment-effort <e>] [--home <dsh-home>]\n [--plan-stdin (online Host only)]\n tobs model-preset-apply <id> --preset <preset-id> [--expected-revision <n>] [--preset-revision <n>] [--home <dsh-home>]\n tobs model-plan <id> [--home <dsh-home>]\n tobs pause <id> [--home <dsh-home>]\n tobs resume <id> [--home <dsh-home>]\n tobs update <id> [--name <name>] [--description <text>] [--role <tag> ...] [--home <dsh-home>]\n tobs human-name-set (--name <text> | --clear) [--home <dsh-home>]\n tobs channel-human-name-set <channel> (--nickname <text> | --clear) [--home <dsh-home>]\n tobs memory-snapshot <id> [--home <dsh-home>]\n tobs memory-file <id> --path <file> [--home <dsh-home>]\n tobs memory-history <id> [--limit <n>] [--home <dsh-home>]\n tobs memory-diff <id> --sha <commit> [--home <dsh-home>]\n tobs memory-save <id> --path <file> (--body <text> | --body-stdin)\n [--expected-head <sha>] [--edit-id <id>] [--home <dsh-home>]\n tobs channels [--home <dsh-home>]\n tobs channel-messages <channel> [--limit <n>] [--before <id>] [--home <dsh-home>]\n tobs channel-media-target <channel> --source-event <id> --attachment <id>\n tobs channel-media-download <channel> --source-event <id> --attachment <id> --out <path>\n tobs grants <id> [--home <dsh-home>]\n tobs grant-revoke <id> --grant <grant> [--home <dsh-home>] online: add --confirm\n tobs grant-write-set <id> --grant <grant> (--enabled | --disabled) [--home <dsh-home>]\n tobs schedules <id> [--home <dsh-home>]\n tobs schedule-create <id> --title <t> --prompt <p> (--every <s> | --daily <HH:MM> |\n --weekly <HH:MM> --weekdays <0-6,..> | --once-date <d> --once-time <t> |\n --cron <expr>) [--timezone <tz>] [--enabled|--disabled] [--locked] [--home <dsh-home>]\n tobs schedule-update <id> --sid <schedule> [--title ...] [--prompt ...] [trigger ...] [--home <dsh-home>]\n tobs schedule-delete <id> --sid <schedule> [--confirm] [--home <dsh-home>]\n tobs schedule-history <id> --sid <schedule> [--home <dsh-home>]\n tobs schedule-run-now <id> --sid <schedule> [--home <dsh-home>]\n tobs schedule-preview (--every <s> | --daily ... | ...) [--home <dsh-home>]\n tobs pairings <id> [--home <dsh-home>]\n tobs secret-put <NAME> [--home <dsh-home>] secret value arrives on stdin only\n tobs secret-list [--home <dsh-home>] names, sources, writability; never values\n tobs secret-unset <NAME> [--home <dsh-home>]\n tobs search <words> find commands by words\n tobs send <id> (--body <text> | --body-stdin) [--message-id human-<UUID>] [--timeout <seconds>]\n tobs send-status <id> --message-id <Human-message-id>\n tobs tool-approval-status <channel> --message-id <card-id>\n tobs tool-approval-decide <channel> --message-id <card-id> --outcome allowed-once|rejected\n tobs user-question-status <channel> --message-id <card-id>\n tobs user-question-answer <channel> --message-id <card-id> --answer-stdin\n tobs ask-secret-status <channel> --message-id <card-id>\n tobs ask-secret-submit <channel> --message-id <card-id> --values-stdin\n tobs ask-secret-cancel <channel> --message-id <card-id>\n tobs ask-secret-account-status <channel> --message-id <configured-card-id>\n tobs ask-secret-replace <channel> --message-id <configured-card-id>\n tobs ask-secret-revoke <channel> --message-id <configured-card-id>\n tobs ask-secret-accounts <id>\n tobs release-info [--since <version>]\n tobs release-check\n tobs release-install <version> --confirm\n tobs release-restart --confirm\n tobs plugin-check [--force]\n tobs plugin-install <package> <version> --confirm\n tobs plugin-restart --confirm\n tobs marketplace-list [--query <words>] [--topic <topic>] [--sort updated|created|stars] [--cursor <c>] [--include-uploads]\n tobs marketplace-topics\n tobs marketplace-sections [--lang zh|en]\n tobs marketplace-digest [--day YYYY-MM-DD] [--lang zh|en]\n tobs marketplace-digests [--lang zh|en]\n tobs marketplace-detail <owner/repo>\n tobs marketplace-file <listing-id> <path>\n tobs marketplace-submit <github-repo-url>\n tobs marketplace-report <owner/repo> [--reason <text>]\n tobs marketplace-account\n tobs marketplace-author --name <display name> [--accept-terms]\n tobs marketplace-upload-plan <bot-id>\n tobs marketplace-upload <bot-id> --name <name> [--description <bio>] [--role <tag> ...] [--replaces <listing-id>] --confirm\n tobs marketplace-mine [--lang zh|en]\n tobs marketplace-delete <listing-id> --confirm\n tobs marketplace-install <listing-id> [--lang zh|en]\n tobs marketplace-install <listing-id> --review <review-id> --confirm [--operation-key <key>]\n tobs share-draft-start <bot-id>\n tobs share-draft-show <bot-id>\n tobs share-draft-file <bot-id> --path <file>\n tobs share-draft-decide <bot-id> --path <file> (--keep | --drop | --rewrite-stdin)\n tobs share-draft-finish <bot-id>\n tobs share-draft-export <bot-id>\n tobs share-draft-discard <bot-id>\n tobs data-reset-preview\n tobs data-reset-confirm --confirmation-stdin --confirm\n tobs telemetry-status\n tobs telemetry-set (--enabled | --disabled)\n tobs git-status\n tobs git-install\n tobs pairing-list <id>\n tobs pairing-review <id> <pairing-id> --decision approve|reject|revoke [--role <role-id> | --capability <c> ...] [--confirm]\n tobs workspace-options\n tobs grant-create <id> --workspace <workspace-id>\n tobs browser-access-set <id> (--enabled | --disabled)\n tobs computer-access-set <id> (--enabled | --disabled)\n tobs access <id>\n tobs access-set <id> --mode workspace-write|danger-full-access [--scope chat|assignments] [--acknowledge-risk]\n tobs settings <namespace>\n tobs settings-set <namespace> --patch-stdin [--expected-revision <n> --previous-value <json>]\n tobs workspace-create <absolute-path>\n tobs channel <channel-id>\n tobs group-create <name> [--member <bot-id> ...] [--operation-key <key>]\n tobs group-invite <channel-id> --bot <bot-id> [--operation-key <key>] [--expected-channel <fingerprint>]\n tobs group-invite-cancel <channel-id> --invitation <invitation-id> [--expected-channel <fingerprint>]\n tobs group-join-decide <channel-id> --request <join-request-id> (--accept | --decline) [--expected-channel <fingerprint>]\n tobs channel-rename <channel-id> --name <name> [--expected-channel <fingerprint>]\n tobs group-avatar-set <channel-id> (--avatar-file <path> | --clear) [--expected-channel <fingerprint>]\n tobs group-wake-policies <channel-id>\n tobs group-wake-set <channel-id> --bot <bot-id> (--mode all|mentions|digest|silent | --inherit) [--count <n>] [--interval <seconds>] [--expected-channel <fingerprint>]\n tobs group-member-remove <channel-id> --bot <bot-id> [--expected-channel <fingerprint>]\n tobs im-app-add <discord|slack|qq|dingtalk|wecom|matrix> --credentials-stdin\n tobs im-app-status <platform>\n tobs im-app-remove <platform> --app <app-id>\n tobs im-bind <id> --app <app-id>\n tobs im-unbind <id> --app <app-id>\n tobs im-status <id>\n tobs channel-connect <channel> --bot <id> --conversation <external-id> [--app <app-id>]\n tobs channel-ingests <channel>\n tobs browser-open <id>\n tobs browser-frame <id> --out <absolute-file>\n tobs browser-takeover <id> (--enabled | --disabled)\n tobs browser-input <id> --args-stdin\n tobs browser-stop <id>\n tobs computer-start [--target local|container]\n tobs computer-status\n tobs computer-stop\n tobs browser-tools\n tobs browser-tool <id> <tool> [--args-stdin] [--out <absolute-file>]\n tobs memory-file-target|memory-graph|memory-commit-diff|memory-changes <id> [...]\n tobs memory-working-diff <id> --path <file> --kind staged|unstaged|untracked|current\n tobs memory-checkpoints|memory-versions <id>\n tobs memory-restore <id> --checkpoint <id> --expected-current <id>\n tobs memory-restore-commit <id> --sha <commit> --expected-head <commit> [--name <version>]\n tobs memory-version-name <id> --sha <commit> --name <version>\n tobs memory-version-unname <id> --tag <version>\n tobs memory-repair <id> --expected-head <commit>\n tobs memory-move <id> (--memory-location <absolute-dir> | --default-location)\n tobs model-catalog\n tobs model-plan-set <id> --plan-stdin [--expected-revision <n>]\n tobs model-plan-customize <id> --orchestrator-provider <p> --orchestrator-model <m> [--orchestrator-effort <e>]\n tobs model-plan-inherit <id> [--expected-revision <n>]\n tobs model-plan-assignments-set <id> --plan-stdin [--expected-revision <n>]\n tobs model-preset-update <preset-id> [--name <n>] [--orchestrator-provider/-model/-effort ...]\n [--assignment-provider/-model/-effort ...] [--plan-stdin] [--expected-revision <n>]\n tobs overview-usage [--period today|week|month|quarter] [--after <bot-cursor>]\n tobs overview-memory [--after <bot-cursor>]\n tobs activity-overview\n tobs channel-activity-today\n tobs bot-usage <id> --start <YYYY-MM-DD> --end <YYYY-MM-DD> [--model <m>] [--provider <p>]\n [--purpose orchestrator|assignment|subagent]\n tobs bot-session-usage <id>\n tobs bot-activity-history <id> [--before <YYYY-MM-DD>] [--weeks <1-104>]\n tobs group-activity <channel>\n tobs bot-trace <id> [--turns <1-20>] [--session <session-id>|direct]\n tobs bot-tools\n tobs bot-tool <id> <tool> [--args-stdin] [--session <assignment-session-id>]\n tobs computer-tools\n tobs computer-tool <id> <tool> [--args-stdin] [--out <absolute-file>]\n tobs todos\n tobs todo-add --title <text>\n tobs todo-update <todo-id> [--title <text>] [--done | --not-done]\n tobs todo-remove <todo-id>\n tobs todo-tools\n tobs todo-tool <id> <tool> [--args-stdin]\n tobs bot-attention <id> [--limit <1-100>] [--cursor <source-id>] [--state <state>]\n tobs bot-sessions <id> [--limit <1-100>]\n tobs bot-activity <id> [--limit <1-100>]\n tobs inbox [--category action|info|unread|replies|handled] [--bot <id>] [--channel <id>]\n [--limit <1-100>] [--cursor <cursor>] [--sort newest|oldest]\n [--snoozed | --dismissed] [--kind auto-rejection]\n tobs inbox-status\n tobs inbox-dismiss <item-id> [--source-key <source-event-id>]\n tobs inbox-restore <item-id> [--source-key <source-event-id>]\n tobs inbox-allow-once <autoreject:item-id>\n tobs inbox-snooze <item-id> [--source-key <source-event-id>] (--until <ISO time> | --clear)\n tobs inbox-ignore <source-event-id>\n tobs assignment-context <id> --session <session-id> --source <source-event-id>\n tobs channel-assignments <group-channel>\n tobs channel-assign <channel> (--section <section-id> | --unsectioned) [--index <n>]\n tobs session-ids\n tobs session-owner <session-id>\n tobs session-archive-set <id> --session <session-id> (--archived | --unarchived)\n tobs tool-approval-rules <id>\n tobs tool-approval-history <id> [--limit <1-100>] [--cursor <cursor>]\n tobs tool-approval-rule-revoke <id> --rule <rule-id> --confirm\n tobs private-mcp-set <id> --server <name> (--enabled | --disabled)\n tobs private-mcp-remove <id> --server <name> --confirm\n tobs bot-delete-preview <id>\n tobs bot-delete-memory-folder <id>\n tobs bot-delete-confirm <id> --confirmation-stdin --confirm [--erase-memory]\n tobs bot-delete-retry <id> --confirm\n tobs bot-avatar-set|bot-banner-set <id> (--file <image> | --clear)\n tobs bot-banner-set|bot-appearance-set <id> --recipe-stdin\n tobs bot-primary-color-set <id> (--color <#rrggbb> | --automatic)\n tobs bot-source-policies <id>\n tobs bot-source-policy-set <id> --source-class <class> [--wake <w>] [--delivery steer|turn]\n [--digest-count <n> --digest-interval <seconds>]\n tobs bot-source-policy-reset <id> --source-class <class>\n tobs bot-standing-limits-set <id> --soul <n> --core-memory <n>\n tobs developer-mode-set (--enabled | --disabled)\n tobs roster | human-identity | part-library\n tobs roster-batch pin|unpin|hide|move <channel>... [--section <section-id>]\n tobs roster-pins-set|roster-hidden-set [<channel>...]\n tobs roster-section-create <name>\n tobs roster-section-rename <section-id> --name <text>\n tobs roster-section-remove <section-id> --confirm\n tobs roster-section-reorder <section-id>...\n tobs roster-top-reorder section:<id>|channel:<id>...\n tobs part-library-add --part-stdin [--name <text>] [--parent <part-id>]\n tobs part-library-import --file <png|zip>\n tobs part-library-import-image --file <png> --slot <slot> --colors <n> [--name <text>]\n tobs part-library-export --out <absolute-file> [--part-id <id> | --part-stdin]\n tobs im-apps\n tobs im-authorize <feishu|weixin>\n tobs im-credentials <attempt-id> --credentials-stdin\n tobs im-verify <attempt-id> --verification-stdin\n tobs pairing-status <attempt-id> [--wait] [--timeout <seconds>]\n tobs im-cancel <attempt-id>\n tobs --help | tobs create --help\n\nOutput:\n stdout carries JSON, pretty by default; --compact condenses it to one line\n for agents. Human-readable lines go to stderr only.\n\nSources (exactly one per create):\n (none) blank bot; --preset applies a model preset, otherwise the model\n step reports no-model-yet and activation stays a Settings task\n --from-git clone a Git repository as Memory (HTTPS, SSH, or owner/repo\n shorthand for https://github.com/owner/repo.git)\n --from-zip import a bot bundle zip (same shape as the bot-zip export)\n --from-dir import a bot bundle directory (same shape as the bot-zip export;\n a .git subtree is skipped as files but packed as history)\n\nMachine contract:\n stdout carries exactly one JSON document. Success exits 0 with the bot id,\n DM channel, data directory, per-step statuses, and next actions. Failure\n exits non-zero with {\"error\": {\"code\", \"message\"}} using a stable code\n (usage, secret-in-argv, bad-zip, bad-bundle, bad-ref, unknown-preset,\n unknown-bot, unknown-channel, duplicate-preset, git-not-found, git-clone-failed, git-clone-timeout,\n memory-unavailable, lease-unavailable, bad-credentials, invalid-input, invalid-avatar,\n file-unreadable). Human-readable lines go to stderr only.\n Stop the Host before offline database commands: the writer lease is exclusive.\n\nLive Host:\n Require --host <loopback-origin|tailnet-HTTPS-origin> or DEEPSEEKBOT_HOST.\n Auth: DEEPSEEKBOT_HOST_TOKEN or --token-file <private-file>, never a token in argv.\n Login is fresh per call; cookies stay in memory. --timeout defaults to 120 seconds (max 600).\n send returns its receipt and exact committed replies. Inspect send-status on timeout\n before retrying; send never automatically resubmits. channel-messages also accepts --host.\n create (blank, Git, Zip and directory), list/show, model-presets/create/apply/plan,\n channels and the schedule* commands use the Host when --host or DEEPSEEKBOT_HOST is set. Do not combine\n --home with an online target; failures never fall back to local database access.\n Zip/directory uploads contain local bytes; Git cloning uses the Host environment.\n Creation errors retain known bot/steps; outcome unknown means inspect before retrying.\n Bot diagnostics are bounded summaries, not full execution logs or live streams.\n grant-revoke and grant-write-set use the Host when it is targeted; revokes and removals\n (grant, tool approval rule, private MCP server) need --confirm, like the Web UI.\n Deletion requires preview then stdin {\"token\":\"<preview.token>\"}; Memory is retained.\n Question stdin: {\"answers\":[{\"id\":\"question-id\",\"selected\":[\"option\"],\"custom\":\"optional\"}]}\n Private input stdin: {\"field_id\":\"confidential value\",...}; only declared fields.\n Private input commands return status/acceptance only and never retry a submission.\n\nModels:\n model-presets lists the profile presets; model-preset-create mints one from\n explicit provider/model routes; model-preset-apply and model-plan read and\n write through the Host when selected, otherwise directly offline. Routes are shape-checked plus\n provider-existence-checked offline; catalog liveness and readiness\n inspection stay Host-side, and model-plan reports readiness deferred.\n\nMemory:\n memory-snapshot/file/history/diff read the bot memory store; memory-save\n writes one file and commits it. --expected-head defaults to the current\n HEAD (pass it explicitly for compare-and-swap); --edit-id defaults to a\n fresh UUID and makes repeat submissions idempotent. Conflicts, missing\n files, and bad shas fail coded (memory-conflict, not-found,\n memory-unknown-commit).\n\nIdentity:\n The bot name is a label. Every create mints a new bot id, so reusing a name\n always returns a second bot and still exits 0.\n\nSecrets:\n Never pass secrets as arguments: any --api-key/--token/--secret/--password\n style flag is a hard error (secret-in-argv). Model keys and tokens travel in\n the environment (for example DEEPSEEK_API_KEY, GITHUB_TOKEN) or a stdin pipe\n (--persona-stdin); result JSON never contains secret values.\n\nHome:\n --home points at the target DSH_HOME (a fresh directory works with zero\n clicks); without it, DSH_HOME from the environment is used.\n";
|
|
16711
18291
|
export declare function runBotCreateCli(argv: readonly string[], io: BotCreateCliIo): Promise<number>;
|
|
16712
18292
|
//#endregion
|
|
16713
18293
|
//#region packages/core/src/bots/slug.d.ts
|
|
@@ -16964,6 +18544,7 @@ interface DshImOutboundService {
|
|
|
16964
18544
|
sourceVideos?: boolean;
|
|
16965
18545
|
sourceQuotes?: boolean;
|
|
16966
18546
|
ordinaryText?: boolean;
|
|
18547
|
+
directMessages?: boolean;
|
|
16967
18548
|
onAction?(event: unknown, context: {
|
|
16968
18549
|
signal: AbortSignal;
|
|
16969
18550
|
}): Promise<MessagingApprovalAck>;
|