@botharness/core 1.4.0 → 1.4.1
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 +51 -1
- package/CHANGELOG.zh.md +51 -1
- package/cli/index.mjs +3241 -256
- package/dist/index.d.mts +199 -41
- package/dist/index.mjs +4818 -329
- package/package.json +3 -1
package/dist/index.d.mts
CHANGED
|
@@ -1321,6 +1321,98 @@ interface ModelCatalog {
|
|
|
1321
1321
|
defaultRoute?(): ModelRoute | undefined;
|
|
1322
1322
|
}
|
|
1323
1323
|
//#endregion
|
|
1324
|
+
//#region packages/core/src/sessions/source.d.ts
|
|
1325
|
+
interface DshSessionEvent {
|
|
1326
|
+
type: string;
|
|
1327
|
+
seq?: number;
|
|
1328
|
+
surfaceOp?: unknown;
|
|
1329
|
+
time: number;
|
|
1330
|
+
data: unknown;
|
|
1331
|
+
}
|
|
1332
|
+
interface DshSessionHeader {
|
|
1333
|
+
cwd?: string;
|
|
1334
|
+
createdAt: number;
|
|
1335
|
+
parentSession?: string;
|
|
1336
|
+
origin?: 'subagent';
|
|
1337
|
+
}
|
|
1338
|
+
interface DshSession {
|
|
1339
|
+
id: string;
|
|
1340
|
+
header: DshSessionHeader;
|
|
1341
|
+
snapshotEvents(): readonly DshSessionEvent[];
|
|
1342
|
+
}
|
|
1343
|
+
interface DshSessionStore {
|
|
1344
|
+
get(sessionId: string): DshSession | undefined;
|
|
1345
|
+
list(): readonly DshSession[];
|
|
1346
|
+
}
|
|
1347
|
+
//#endregion
|
|
1348
|
+
//#region packages/core/src/runtime/idle-compaction-settings.d.ts
|
|
1349
|
+
interface IdleCompactionRoute {
|
|
1350
|
+
provider: string;
|
|
1351
|
+
model: string;
|
|
1352
|
+
}
|
|
1353
|
+
interface IdleCompactionSettingsValue {
|
|
1354
|
+
enabled: boolean;
|
|
1355
|
+
cacheLifetimes: Record<string, number>;
|
|
1356
|
+
}
|
|
1357
|
+
interface RouteCacheObservation {
|
|
1358
|
+
warmGapMs?: number;
|
|
1359
|
+
coldGapMs?: number;
|
|
1360
|
+
samples: number;
|
|
1361
|
+
}
|
|
1362
|
+
interface IdleCompactionSettings {
|
|
1363
|
+
read(): IdleCompactionSettingsValue | 'invalid';
|
|
1364
|
+
setEnabled(enabled: boolean): IdleCompactionSettingsValue;
|
|
1365
|
+
setCacheLifetime(route: IdleCompactionRoute, seconds: number | null): IdleCompactionSettingsValue;
|
|
1366
|
+
observations(): Record<string, RouteCacheObservation>;
|
|
1367
|
+
saveObservation(key: string, observation: RouteCacheObservation): void;
|
|
1368
|
+
}
|
|
1369
|
+
//#endregion
|
|
1370
|
+
//#region packages/core/src/runtime/idle-compaction.d.ts
|
|
1371
|
+
type CacheLifetimeSource = 'setting' | 'catalog' | 'observed' | 'default' | 'unknown';
|
|
1372
|
+
type IdleCompactionOutcome = 'compacted' | 'nothing' | 'failed';
|
|
1373
|
+
interface IdleCompactionRecord {
|
|
1374
|
+
botSlug: string;
|
|
1375
|
+
at: string;
|
|
1376
|
+
provider: string;
|
|
1377
|
+
model: string;
|
|
1378
|
+
idleGapMs: number;
|
|
1379
|
+
cacheLifetimeMs: number;
|
|
1380
|
+
cacheLifetimeSource: CacheLifetimeSource;
|
|
1381
|
+
tokensBefore: number;
|
|
1382
|
+
tokensAfter: number | null;
|
|
1383
|
+
outcome: IdleCompactionOutcome;
|
|
1384
|
+
error?: string;
|
|
1385
|
+
inputTokens: number | null;
|
|
1386
|
+
cacheReadTokens: number | null;
|
|
1387
|
+
outputTokens: number | null;
|
|
1388
|
+
}
|
|
1389
|
+
interface IdleCompactionRouteView {
|
|
1390
|
+
provider: string;
|
|
1391
|
+
model: string;
|
|
1392
|
+
cacheLifetimeSeconds: number | null;
|
|
1393
|
+
source: CacheLifetimeSource;
|
|
1394
|
+
compactAfterSeconds: number | null;
|
|
1395
|
+
overrideSeconds: number | null;
|
|
1396
|
+
observedWarmGapSeconds: number | null;
|
|
1397
|
+
observedColdGapSeconds: number | null;
|
|
1398
|
+
}
|
|
1399
|
+
type ManualCompactionOutcome = 'compacted' | 'nothing' | 'busy' | 'not-loaded';
|
|
1400
|
+
interface ManualCompactionResult {
|
|
1401
|
+
outcome: ManualCompactionOutcome;
|
|
1402
|
+
tokensBefore: number | null;
|
|
1403
|
+
tokensAfter: number | null;
|
|
1404
|
+
}
|
|
1405
|
+
interface IdleCompaction {
|
|
1406
|
+
compactNow(sessionId: string): Promise<ManualCompactionResult>;
|
|
1407
|
+
observeEvent(sessionId: string, event: DshSessionEvent): void;
|
|
1408
|
+
agentStatus(sessionId: string, status: string): void;
|
|
1409
|
+
rescan(sessionIds: readonly string[]): void;
|
|
1410
|
+
forget(sessionId: string): void;
|
|
1411
|
+
describe(routes: readonly IdleCompactionRoute[]): IdleCompactionRouteView[];
|
|
1412
|
+
scheduled(): number;
|
|
1413
|
+
close(): void;
|
|
1414
|
+
}
|
|
1415
|
+
//#endregion
|
|
1324
1416
|
//#region packages/core/src/messaging/im-commands.d.ts
|
|
1325
1417
|
interface ImCommandServices {
|
|
1326
1418
|
botDisplayName(botSlug: string): string | undefined;
|
|
@@ -1333,6 +1425,7 @@ interface ImCommandServices {
|
|
|
1333
1425
|
} | undefined>;
|
|
1334
1426
|
startFreshOrchestrator(botSlug: string, assertCurrent?: () => void): Promise<'started' | 'busy'>;
|
|
1335
1427
|
turnRunning(botSlug: string): boolean;
|
|
1428
|
+
compact(botSlug: string): Promise<ManualCompactionResult>;
|
|
1336
1429
|
}
|
|
1337
1430
|
//#endregion
|
|
1338
1431
|
//#region node_modules/.pnpm/@deepseek-ai+dsh-brand@0.2.1-rc.2_@deepseek-ai+cordis@4.0.5/node_modules/@deepseek-ai/dsh-brand/lib/types/index.d.ts
|
|
@@ -4564,6 +4657,7 @@ interface ChannelStore {
|
|
|
4564
4657
|
}): ChannelMessage | undefined;
|
|
4565
4658
|
rename(id: string, name: string): ChannelRecord | undefined;
|
|
4566
4659
|
previewAllBotMention(id: string): AllBotPreview;
|
|
4660
|
+
grantRequestResolution?(channelId: string, requestMessageId: string): ChannelMessage | undefined;
|
|
4567
4661
|
appendMessageOnce(id: string, message: ChannelMessage, preview?: AllBotPreview, origin?: ChannelMessageOrigin, canCommit?: (database?: DatabaseSync) => boolean): Promise<ChannelAppendOnceResult>;
|
|
4568
4662
|
readPosition(id: string): ChannelReadPosition | undefined;
|
|
4569
4663
|
markRead(id: string, messageId: string): Promise<ChannelReadPosition | undefined>;
|
|
@@ -4664,7 +4758,7 @@ interface SessionOwnership {
|
|
|
4664
4758
|
export declare function createSessionOwnership(database: OperationalDatabaseModulePort): SessionOwnership;
|
|
4665
4759
|
//#endregion
|
|
4666
4760
|
//#region packages/core/src/workspaces/tool-approval-rules.d.ts
|
|
4667
|
-
type ToolRuleKind = 'exact' | 'all-opaque' | 'secret-cli';
|
|
4761
|
+
type ToolRuleKind = 'exact' | 'tool' | 'all-opaque' | 'secret-cli';
|
|
4668
4762
|
interface ToolApprovalRule {
|
|
4669
4763
|
id: string;
|
|
4670
4764
|
botSlug: string;
|
|
@@ -4764,6 +4858,7 @@ interface ToolApprovalRequestCard {
|
|
|
4764
4858
|
input: string;
|
|
4765
4859
|
externalDecision?: 'operation' | 'web-only' | 'each-use';
|
|
4766
4860
|
botCreatePreview?: BotCreatePreview;
|
|
4861
|
+
allowAlways?: boolean;
|
|
4767
4862
|
}
|
|
4768
4863
|
interface ToolApprovalNotice extends ToolApprovalRequestCard {
|
|
4769
4864
|
botSlug: string;
|
|
@@ -4775,7 +4870,7 @@ interface ToolApprovalNotice extends ToolApprovalRequestCard {
|
|
|
4775
4870
|
interface ToolApprovalDecision {
|
|
4776
4871
|
requestMessageId: string;
|
|
4777
4872
|
actor?: ToolApprovalActor;
|
|
4778
|
-
outcome: 'allowed-once' | 'allowed-always-exact' | 'allowed-always-all' | 'rejected';
|
|
4873
|
+
outcome: 'allowed-once' | 'allowed-always-tool' | 'allowed-always-exact' | 'allowed-always-all' | 'rejected';
|
|
4779
4874
|
}
|
|
4780
4875
|
interface ToolAutoApproval {
|
|
4781
4876
|
template(botSlug: string): {
|
|
@@ -4808,7 +4903,7 @@ declare class ChannelToolApproval {
|
|
|
4808
4903
|
constructor(channels: ChannelStore, ownership: SessionOwnership, rules?: ToolApprovalRuleStore, scope?: (agent: Agent, owner: SessionOwnershipRecord) => string | undefined, attention?: {
|
|
4809
4904
|
changed(slug: string, count: number): void;
|
|
4810
4905
|
warn(message: string): void;
|
|
4811
|
-
}, beginWait?: (sessionId: string, callId: string, signal: AbortSignal) => AssignmentApprovalWaitLease | undefined, askChannel?: (sessionId: string) => string | undefined, autoApproval?: ToolAutoApproval);
|
|
4906
|
+
}, beginWait?: (sessionId: string, callId: string, signal: AbortSignal) => AssignmentApprovalWaitLease | undefined, askChannel?: (sessionId: string) => string | undefined, autoApproval?: ToolAutoApproval, fullAccess?: (sessionId: string) => boolean);
|
|
4812
4907
|
track(execution: ToolExecution, externalDecision?: 'operation' | 'web-only' | 'each-use', rememberable?: boolean, device?: 'computer' | 'browser', botCreatePreview?: BotCreatePreview, options?: {
|
|
4813
4908
|
requireHumanReview?: boolean;
|
|
4814
4909
|
}): (() => void) | undefined;
|
|
@@ -9171,6 +9266,7 @@ interface ChannelMessage {
|
|
|
9171
9266
|
toolAutoApprovalOverride?: ChannelToolAutoApprovalOverride;
|
|
9172
9267
|
botCausation?: BotMessageCausation;
|
|
9173
9268
|
grantRequest?: true;
|
|
9269
|
+
grantRequestOwner?: string;
|
|
9174
9270
|
grantRequestResolved?: boolean;
|
|
9175
9271
|
assignmentReply?: {
|
|
9176
9272
|
sessionId: string;
|
|
@@ -10765,6 +10861,10 @@ interface WorkspaceGrantStore {
|
|
|
10765
10861
|
revoke(botSlug: string, grantId: string): WorkspaceGrant;
|
|
10766
10862
|
requireActive(botSlug: string, grantId: string): WorkspaceGrant;
|
|
10767
10863
|
setOrchestratorWrite(botSlug: string, grantId: string, enabled: boolean): WorkspaceGrant;
|
|
10864
|
+
prepareWrite?(botSlug: string, workspaceId: string, validate: () => void): Promise<{
|
|
10865
|
+
grant: WorkspaceGrant;
|
|
10866
|
+
commit(database?: DatabaseSync): boolean;
|
|
10867
|
+
}>;
|
|
10768
10868
|
availableWorkspaces(): {
|
|
10769
10869
|
id: string;
|
|
10770
10870
|
path: string;
|
|
@@ -11416,6 +11516,36 @@ declare function createMemoryFiles(registry: PersonaBotRegistry): {
|
|
|
11416
11516
|
};
|
|
11417
11517
|
};
|
|
11418
11518
|
//#endregion
|
|
11519
|
+
//#region packages/core/src/media/image-format.d.ts
|
|
11520
|
+
type ImageMime = 'image/png' | 'image/jpeg' | 'image/gif' | 'image/webp' | 'image/svg+xml';
|
|
11521
|
+
//#endregion
|
|
11522
|
+
//#region packages/core/src/memory/image.d.ts
|
|
11523
|
+
interface MemoryImage {
|
|
11524
|
+
mime?: ImageMime;
|
|
11525
|
+
source: string;
|
|
11526
|
+
status: 'ready' | 'missing' | 'unsupported' | 'too-large' | 'stale';
|
|
11527
|
+
revision?: string;
|
|
11528
|
+
size?: number;
|
|
11529
|
+
width?: number;
|
|
11530
|
+
height?: number;
|
|
11531
|
+
}
|
|
11532
|
+
interface MemoryImageComparison {
|
|
11533
|
+
before?: MemoryImage;
|
|
11534
|
+
after?: MemoryImage;
|
|
11535
|
+
}
|
|
11536
|
+
//#endregion
|
|
11537
|
+
//#region packages/core/src/memory/markdown.d.ts
|
|
11538
|
+
interface MemoryMarkdown {
|
|
11539
|
+
source: string;
|
|
11540
|
+
status: 'ready' | 'missing' | 'unsupported' | 'too-large' | 'stale';
|
|
11541
|
+
revision?: string;
|
|
11542
|
+
body: string;
|
|
11543
|
+
}
|
|
11544
|
+
interface MemoryMarkdownComparison {
|
|
11545
|
+
before?: MemoryMarkdown;
|
|
11546
|
+
after?: MemoryMarkdown;
|
|
11547
|
+
}
|
|
11548
|
+
//#endregion
|
|
11419
11549
|
//#region packages/core/src/memory/recovery.d.ts
|
|
11420
11550
|
type MemoryCheckpointOrigin = 'host-observation' | 'agent-session' | 'human-command';
|
|
11421
11551
|
interface MemoryRecoveryCheckpoint {
|
|
@@ -11513,6 +11643,8 @@ interface MemoryGitCommitDiff {
|
|
|
11513
11643
|
files: {
|
|
11514
11644
|
path: string;
|
|
11515
11645
|
status: string;
|
|
11646
|
+
images?: MemoryImageComparison;
|
|
11647
|
+
markdown?: MemoryMarkdownComparison;
|
|
11516
11648
|
}[];
|
|
11517
11649
|
diff: string;
|
|
11518
11650
|
}
|
|
@@ -11523,6 +11655,8 @@ interface MemoryWorkingChange {
|
|
|
11523
11655
|
status: string;
|
|
11524
11656
|
}
|
|
11525
11657
|
interface MemoryWorkingDiff extends MemoryWorkingChange {
|
|
11658
|
+
images?: MemoryImageComparison;
|
|
11659
|
+
markdown?: MemoryMarkdownComparison;
|
|
11526
11660
|
diff: string;
|
|
11527
11661
|
binary: boolean;
|
|
11528
11662
|
}
|
|
@@ -11573,7 +11707,11 @@ interface MemoryAcceptance {
|
|
|
11573
11707
|
body: string;
|
|
11574
11708
|
head: string;
|
|
11575
11709
|
binary?: boolean;
|
|
11710
|
+
image?: MemoryImage;
|
|
11711
|
+
markdown?: MemoryMarkdown;
|
|
11576
11712
|
} | undefined;
|
|
11713
|
+
markdownImageFile(botSlug: string, path: string, source: string, revision: string, reference: string): Buffer;
|
|
11714
|
+
imageFile(botSlug: string, path: string, source: string, revision: string): Buffer;
|
|
11577
11715
|
history(botSlug: string, limit?: number): MemoryAcceptedCommit[];
|
|
11578
11716
|
diff(botSlug: string, sha: string): {
|
|
11579
11717
|
sha: string;
|
|
@@ -11756,30 +11894,6 @@ interface MemoryService extends MemoryAcceptance, ReturnType<typeof createMemory
|
|
|
11756
11894
|
}
|
|
11757
11895
|
export declare function createMemoryService(options: MemoryServiceOptions): MemoryService;
|
|
11758
11896
|
//#endregion
|
|
11759
|
-
//#region packages/core/src/sessions/source.d.ts
|
|
11760
|
-
interface DshSessionEvent {
|
|
11761
|
-
type: string;
|
|
11762
|
-
seq?: number;
|
|
11763
|
-
surfaceOp?: unknown;
|
|
11764
|
-
time: number;
|
|
11765
|
-
data: unknown;
|
|
11766
|
-
}
|
|
11767
|
-
interface DshSessionHeader {
|
|
11768
|
-
cwd?: string;
|
|
11769
|
-
createdAt: number;
|
|
11770
|
-
parentSession?: string;
|
|
11771
|
-
origin?: 'subagent';
|
|
11772
|
-
}
|
|
11773
|
-
interface DshSession {
|
|
11774
|
-
id: string;
|
|
11775
|
-
header: DshSessionHeader;
|
|
11776
|
-
snapshotEvents(): readonly DshSessionEvent[];
|
|
11777
|
-
}
|
|
11778
|
-
interface DshSessionStore {
|
|
11779
|
-
get(sessionId: string): DshSession | undefined;
|
|
11780
|
-
list(): readonly DshSession[];
|
|
11781
|
-
}
|
|
11782
|
-
//#endregion
|
|
11783
11897
|
//#region packages/core/src/usage/message-perf.d.ts
|
|
11784
11898
|
interface MessagePerfTracker {
|
|
11785
11899
|
observeSessionEvent(sessionId: string, event: DshSessionEvent): void;
|
|
@@ -12274,7 +12388,7 @@ interface OrchestratorChannelAccess {
|
|
|
12274
12388
|
ref: ChannelAttachmentRef;
|
|
12275
12389
|
data: Uint8Array;
|
|
12276
12390
|
}>;
|
|
12277
|
-
requestGrant(reason: string): Promise<ChannelMessage>;
|
|
12391
|
+
requestGrant(reason: string, channelId?: string): Promise<ChannelMessage>;
|
|
12278
12392
|
contacts(input?: BotContactQuery): BotContactPage;
|
|
12279
12393
|
createGroup(name: string): ChannelRecord;
|
|
12280
12394
|
inviteGroup(input: {
|
|
@@ -12443,6 +12557,7 @@ interface BotRuntime {
|
|
|
12443
12557
|
replaceOrchestrator?<T>(botSlug: string, body: () => T): Promise<OrchestratorReplacement<T>>;
|
|
12444
12558
|
startFreshOrchestrator?(botSlug: string, assertCurrent?: () => void): Promise<'started' | 'busy'>;
|
|
12445
12559
|
turnRunning?(botSlug: string): boolean;
|
|
12560
|
+
hasPendingInbox?(botSlug: string): boolean;
|
|
12446
12561
|
directBotTools?(): DirectBotToolSpec[];
|
|
12447
12562
|
directBotToolCalls?(botSlug: string): readonly DirectBotToolCall[];
|
|
12448
12563
|
runDirectBotTool?(botSlug: string, tool: string, args: Record<string, unknown>, signal: AbortSignal): Promise<{
|
|
@@ -12626,6 +12741,8 @@ type RosterLiveFrame = {
|
|
|
12626
12741
|
placements: PurgedPlacement[];
|
|
12627
12742
|
} | {
|
|
12628
12743
|
type: 'changed';
|
|
12744
|
+
} | {
|
|
12745
|
+
type: 'attention';
|
|
12629
12746
|
} | {
|
|
12630
12747
|
type: 'latest';
|
|
12631
12748
|
channelId: string;
|
|
@@ -13426,6 +13543,14 @@ interface HumanAttentionPage {
|
|
|
13426
13543
|
items: HumanAttentionItem[];
|
|
13427
13544
|
nextCursor?: string;
|
|
13428
13545
|
}
|
|
13546
|
+
interface HumanAttentionStatus {
|
|
13547
|
+
unreadCount: number;
|
|
13548
|
+
hasAction: boolean;
|
|
13549
|
+
messageCounts?: {
|
|
13550
|
+
replies: number;
|
|
13551
|
+
other: number;
|
|
13552
|
+
};
|
|
13553
|
+
}
|
|
13429
13554
|
interface HumanAttentionQuery {
|
|
13430
13555
|
item(id: string, sourceKey?: string): HumanAttentionItem | undefined;
|
|
13431
13556
|
assignmentContext(botSlug: string, sessionId: string, sourceEventId: string): HumanAssignmentContext | undefined;
|
|
@@ -13443,14 +13568,12 @@ interface HumanAttentionQuery {
|
|
|
13443
13568
|
cursor?: string;
|
|
13444
13569
|
limit?: number;
|
|
13445
13570
|
}): HumanAttentionPage;
|
|
13446
|
-
status():
|
|
13447
|
-
unreadCount: number;
|
|
13448
|
-
hasAction: boolean;
|
|
13449
|
-
};
|
|
13571
|
+
status(messageCounts?: boolean): HumanAttentionStatus;
|
|
13450
13572
|
unreadByChannel(): Array<{
|
|
13451
13573
|
channelId: string;
|
|
13452
13574
|
unreadCount: number;
|
|
13453
13575
|
}>;
|
|
13576
|
+
dmReplies(limit: number): HumanAttentionItem[];
|
|
13454
13577
|
durableAttention(): Array<{
|
|
13455
13578
|
botSlug: string;
|
|
13456
13579
|
waitingHumanCount: number;
|
|
@@ -13593,6 +13716,8 @@ interface UsageProjection {
|
|
|
13593
13716
|
sessionSummary(botSlug: string, sessionId: string, sinceIso: string, readLog: DshUsageSessionLogReader): Promise<SessionUsageSummary>;
|
|
13594
13717
|
overview(period: UsageOverviewPeriod, after?: string): UsageOverviewResult;
|
|
13595
13718
|
purgeBot(botSlug: string, removeFiles?: () => void): void;
|
|
13719
|
+
recordIdleCompaction(record: IdleCompactionRecord): void;
|
|
13720
|
+
idleCompactions(botSlug: string, sinceIso: string): IdleCompactionRecord[];
|
|
13596
13721
|
}
|
|
13597
13722
|
//#endregion
|
|
13598
13723
|
//#region packages/core/src/plugin.d.ts
|
|
@@ -13967,6 +14092,12 @@ export declare class ProfileBackupError extends Error {
|
|
|
13967
14092
|
//#region packages/core/src/portability/cli.d.ts
|
|
13968
14093
|
export declare function runProfileRestoreCli(argv: readonly string[]): Promise<void>;
|
|
13969
14094
|
//#endregion
|
|
14095
|
+
//#region packages/core/src/workspaces/grant-requests.d.ts
|
|
14096
|
+
interface GrantRequestApprovalResult {
|
|
14097
|
+
grant: WorkspaceGrant;
|
|
14098
|
+
message: ChannelMessage;
|
|
14099
|
+
}
|
|
14100
|
+
//#endregion
|
|
13970
14101
|
//#region packages/core/src/cloud/management.d.ts
|
|
13971
14102
|
type CloudManagementInput = {
|
|
13972
14103
|
operation: 'list';
|
|
@@ -14511,12 +14642,14 @@ interface BridgeMethods {
|
|
|
14511
14642
|
onboardingModel(payload: unknown): Promise<BridgeResult<{
|
|
14512
14643
|
revision: number;
|
|
14513
14644
|
}>>;
|
|
14645
|
+
introEvent(payload: unknown): BridgeResult<null>;
|
|
14514
14646
|
channelRetry(payload: unknown): Promise<BridgeResult<{
|
|
14515
14647
|
accepted: true;
|
|
14516
14648
|
}>>;
|
|
14517
14649
|
botNewSession(payload: unknown): Promise<BridgeResult<{
|
|
14518
14650
|
started: true;
|
|
14519
14651
|
}>>;
|
|
14652
|
+
botCompact(payload: unknown): Promise<BridgeResult<ManualCompactionResult>>;
|
|
14520
14653
|
channelBotStop(payload: unknown): Promise<BridgeResult<{
|
|
14521
14654
|
stopped: {
|
|
14522
14655
|
botSlug: string;
|
|
@@ -14780,10 +14913,7 @@ interface BridgeMethods {
|
|
|
14780
14913
|
humanAssignmentContext(payload: unknown): BridgeResult<{
|
|
14781
14914
|
context: HumanAssignmentContext;
|
|
14782
14915
|
}>;
|
|
14783
|
-
humanAttentionStatus(payload: unknown): BridgeResult<
|
|
14784
|
-
unreadCount: number;
|
|
14785
|
-
hasAction: boolean;
|
|
14786
|
-
}>;
|
|
14916
|
+
humanAttentionStatus(payload: unknown): BridgeResult<HumanAttentionStatus>;
|
|
14787
14917
|
channelUnreadCounts(payload: unknown): BridgeResult<{
|
|
14788
14918
|
channels: Array<{
|
|
14789
14919
|
channelId: string;
|
|
@@ -14832,6 +14962,7 @@ interface BridgeMethods {
|
|
|
14832
14962
|
grantRevoke(payload: unknown): BridgeResult<{
|
|
14833
14963
|
grant: WorkspaceGrant;
|
|
14834
14964
|
}>;
|
|
14965
|
+
grantRequestApprove(payload: unknown): Promise<BridgeResult<GrantRequestApprovalResult>>;
|
|
14835
14966
|
grantWriteSet(payload: unknown): BridgeResult<{
|
|
14836
14967
|
grant: WorkspaceGrant;
|
|
14837
14968
|
}>;
|
|
@@ -14920,6 +15051,9 @@ interface BridgeMethods {
|
|
|
14920
15051
|
path: string;
|
|
14921
15052
|
body: string;
|
|
14922
15053
|
head: string;
|
|
15054
|
+
binary?: boolean;
|
|
15055
|
+
image?: MemoryImage;
|
|
15056
|
+
markdown?: MemoryMarkdown;
|
|
14923
15057
|
};
|
|
14924
15058
|
}>;
|
|
14925
15059
|
memoryHistory(payload: unknown): BridgeResult<{
|
|
@@ -15029,6 +15163,9 @@ interface BridgeMethods {
|
|
|
15029
15163
|
}>;
|
|
15030
15164
|
approvalReviewerModel(payload?: unknown): Promise<BridgeResult<ApprovalReviewerModelView>>;
|
|
15031
15165
|
approvalReviewerModelSet(payload: unknown): Promise<BridgeResult<ApprovalReviewerModelView>>;
|
|
15166
|
+
idleCompaction(payload?: unknown): BridgeResult<IdleCompactionView>;
|
|
15167
|
+
idleCompactionSet(payload: unknown): BridgeResult<IdleCompactionView>;
|
|
15168
|
+
idleCompactionCacheLifetimeSet(payload: unknown): BridgeResult<IdleCompactionView>;
|
|
15032
15169
|
standingLimitsSet(payload: unknown): BridgeResult<{
|
|
15033
15170
|
bot: PersonaBotDetail;
|
|
15034
15171
|
}>;
|
|
@@ -15116,7 +15253,22 @@ interface ApprovalReviewerModelView {
|
|
|
15116
15253
|
available?: boolean;
|
|
15117
15254
|
unavailableReason?: string;
|
|
15118
15255
|
}
|
|
15256
|
+
interface IdleCompactionView {
|
|
15257
|
+
enabled: boolean;
|
|
15258
|
+
settingReadable: boolean;
|
|
15259
|
+
minimumIdleSeconds: number;
|
|
15260
|
+
scheduled: number;
|
|
15261
|
+
routes: IdleCompactionRouteView[];
|
|
15262
|
+
}
|
|
15263
|
+
interface IdleCompactionDeps {
|
|
15264
|
+
settings: IdleCompactionSettings;
|
|
15265
|
+
scheduler: Pick<IdleCompaction, 'describe' | 'scheduled'>;
|
|
15266
|
+
routes(): IdleCompactionRoute[];
|
|
15267
|
+
rescan(): void;
|
|
15268
|
+
compactBot?(slug: string): Promise<ManualCompactionResult>;
|
|
15269
|
+
}
|
|
15119
15270
|
interface BridgeMethodsDeps {
|
|
15271
|
+
idleCompaction?: IdleCompactionDeps;
|
|
15120
15272
|
cloudConnections?: CloudConnections;
|
|
15121
15273
|
cloudWork?: CloudWork;
|
|
15122
15274
|
approvalReviewer?: ApprovalReviewerSettings;
|
|
@@ -15447,6 +15599,7 @@ export declare class BotharnessBridgeService extends TypertRemoteService {
|
|
|
15447
15599
|
onboardingModel(slug: string | undefined, expectedRevision: number, route: ModelRoute, globalDefault: boolean, expectedDefaultRevision?: number): Promise<{
|
|
15448
15600
|
revision: number;
|
|
15449
15601
|
}>;
|
|
15602
|
+
introEvent(event: string, properties?: Record<string, string | boolean>): null;
|
|
15450
15603
|
modelPlanInherit(slug: string, expectedRevision: number): {
|
|
15451
15604
|
revision: number;
|
|
15452
15605
|
};
|
|
@@ -15456,6 +15609,7 @@ export declare class BotharnessBridgeService extends TypertRemoteService {
|
|
|
15456
15609
|
botNewSession(slug: string): Promise<{
|
|
15457
15610
|
started: true;
|
|
15458
15611
|
}>;
|
|
15612
|
+
botCompact(slug: string): Promise<ManualCompactionResult>;
|
|
15459
15613
|
channelBotStop(channelId: string, botSlug: string): Promise<{
|
|
15460
15614
|
stopped: {
|
|
15461
15615
|
botSlug: string;
|
|
@@ -15562,6 +15716,9 @@ export declare class BotharnessBridgeService extends TypertRemoteService {
|
|
|
15562
15716
|
};
|
|
15563
15717
|
approvalReviewerModel(): Promise<ApprovalReviewerModelView>;
|
|
15564
15718
|
approvalReviewerModelSet(model: ModelRoute | null): Promise<ApprovalReviewerModelView>;
|
|
15719
|
+
idleCompaction(): IdleCompactionView;
|
|
15720
|
+
idleCompactionSet(enabled: boolean): IdleCompactionView;
|
|
15721
|
+
idleCompactionCacheLifetimeSet(provider: string, model: string, seconds: number | null): IdleCompactionView;
|
|
15565
15722
|
standingLimitsSet(slug: string, soul: number, coreMemory: number): {
|
|
15566
15723
|
bot: PersonaBotDetail;
|
|
15567
15724
|
};
|
|
@@ -15701,10 +15858,7 @@ export declare class BotharnessBridgeService extends TypertRemoteService {
|
|
|
15701
15858
|
channelActivityToday(): ChannelActivityToday;
|
|
15702
15859
|
activityOverview(): ActivityOverview;
|
|
15703
15860
|
humanAttention(category?: HumanAttentionCategory, botSlug?: string, channelId?: string, limit?: number, cursor?: string, sort?: 'newest' | 'oldest' | 'mentions-first', snoozed?: boolean, kind?: 'auto-rejection', search?: string, unreadOnly?: boolean, queryVersion?: number): HumanAttentionPage;
|
|
15704
|
-
humanAttentionStatus():
|
|
15705
|
-
unreadCount: number;
|
|
15706
|
-
hasAction: boolean;
|
|
15707
|
-
};
|
|
15861
|
+
humanAttentionStatus(messageCounts?: boolean): HumanAttentionStatus;
|
|
15708
15862
|
channelUnreadCounts(): {
|
|
15709
15863
|
channels: Array<{
|
|
15710
15864
|
channelId: string;
|
|
@@ -15768,6 +15922,7 @@ export declare class BotharnessBridgeService extends TypertRemoteService {
|
|
|
15768
15922
|
grantRevoke(slug: string, grantId: string): {
|
|
15769
15923
|
grant: WorkspaceGrant;
|
|
15770
15924
|
};
|
|
15925
|
+
grantRequestApprove(slug: string, channelId: string, requestMessageId: string, workspaceId: string, acknowledgeReadWrite: boolean): Promise<GrantRequestApprovalResult>;
|
|
15771
15926
|
grantWriteSet(slug: string, grantId: string, enabled: boolean): {
|
|
15772
15927
|
grant: WorkspaceGrant;
|
|
15773
15928
|
};
|
|
@@ -15787,7 +15942,7 @@ export declare class BotharnessBridgeService extends TypertRemoteService {
|
|
|
15787
15942
|
status: 'pending' | 'expired';
|
|
15788
15943
|
execution?: 'waiting-human' | 'waiting-capacity' | 'running' | 'settled' | 'needs-repair';
|
|
15789
15944
|
};
|
|
15790
|
-
toolApprovalDecide(channelId: string, messageId: string, outcome: 'allowed-once' | 'allowed-always-exact' | 'allowed-always-all' | 'rejected'): Promise<{
|
|
15945
|
+
toolApprovalDecide(channelId: string, messageId: string, outcome: 'allowed-once' | 'allowed-always-tool' | 'allowed-always-exact' | 'allowed-always-all' | 'rejected'): Promise<{
|
|
15791
15946
|
accepted: boolean;
|
|
15792
15947
|
}>;
|
|
15793
15948
|
toolAutoRejectionOverride(itemId: string): Promise<{
|
|
@@ -15855,6 +16010,9 @@ export declare class BotharnessBridgeService extends TypertRemoteService {
|
|
|
15855
16010
|
path: string;
|
|
15856
16011
|
body: string;
|
|
15857
16012
|
head: string;
|
|
16013
|
+
binary?: boolean;
|
|
16014
|
+
image?: MemoryImage;
|
|
16015
|
+
markdown?: MemoryMarkdown;
|
|
15858
16016
|
};
|
|
15859
16017
|
};
|
|
15860
16018
|
memoryHistory(channelId: string): {
|