@get-bb/plugin-sdk 0.6.133 → 0.6.138
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/bundled-types/bb-plugin-sdk-app.d.ts +278 -9
- package/bundled-types/bb-plugin-sdk.d.ts +278 -9
- package/dist/internal/host-policy.js +39 -37
- package/dist/internal/rpc-query-host.js +2 -1
- package/dist/provider-bridge-acp-next.js +44 -15
- package/dist/provider-bridge-acp.js +44 -15
- package/dist/testing/app.js +2 -1
- package/dist/testing/index.js +39 -37
- package/package.json +3 -2
|
@@ -581,6 +581,7 @@ declare const changedMessageSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
|
581
581
|
changes: z$1.ZodReadonly<z$1.ZodArray<z$1.ZodEnum<{
|
|
582
582
|
"host-connected": "host-connected";
|
|
583
583
|
"host-disconnected": "host-disconnected";
|
|
584
|
+
"provider-cli-install-jobs-changed": "provider-cli-install-jobs-changed";
|
|
584
585
|
"provider-cli-status-changed": "provider-cli-status-changed";
|
|
585
586
|
"provider-commands-changed": "provider-commands-changed";
|
|
586
587
|
"provider-model-catalog-changed": "provider-model-catalog-changed";
|
|
@@ -698,9 +699,9 @@ declare const environmentSchema: z$1.ZodObject<{
|
|
|
698
699
|
type Environment = z$1.infer<typeof environmentSchema>;
|
|
699
700
|
|
|
700
701
|
declare const experimentsSchema: z$1.ZodRecord<z$1.ZodEnum<{
|
|
702
|
+
agentCpuPriority: "agentCpuPriority";
|
|
701
703
|
compactExpiredCache: "compactExpiredCache";
|
|
702
704
|
dismissReadNotifications: "dismissReadNotifications";
|
|
703
|
-
narrowPluginCss: "narrowPluginCss";
|
|
704
705
|
performanceDiagnostics: "performanceDiagnostics";
|
|
705
706
|
pluginUpdates: "pluginUpdates";
|
|
706
707
|
resumeThreadsAfterRestart: "resumeThreadsAfterRestart";
|
|
@@ -709,12 +710,13 @@ declare const experimentsSchema: z$1.ZodRecord<z$1.ZodEnum<{
|
|
|
709
710
|
threadContextCard: "threadContextCard";
|
|
710
711
|
threadRowMetadata: "threadRowMetadata";
|
|
711
712
|
updateWhenIdle: "updateWhenIdle";
|
|
713
|
+
walCheckpointWorker: "walCheckpointWorker";
|
|
712
714
|
}>, z$1.ZodBoolean>;
|
|
713
715
|
type Experiments = z$1.infer<typeof experimentsSchema>;
|
|
714
716
|
declare const experimentUpdatesSchema: z$1.ZodRecord<z$1.ZodEnum<{
|
|
717
|
+
agentCpuPriority: "agentCpuPriority";
|
|
715
718
|
compactExpiredCache: "compactExpiredCache";
|
|
716
719
|
dismissReadNotifications: "dismissReadNotifications";
|
|
717
|
-
narrowPluginCss: "narrowPluginCss";
|
|
718
720
|
performanceDiagnostics: "performanceDiagnostics";
|
|
719
721
|
pluginUpdates: "pluginUpdates";
|
|
720
722
|
resumeThreadsAfterRestart: "resumeThreadsAfterRestart";
|
|
@@ -723,6 +725,7 @@ declare const experimentUpdatesSchema: z$1.ZodRecord<z$1.ZodEnum<{
|
|
|
723
725
|
threadContextCard: "threadContextCard";
|
|
724
726
|
threadRowMetadata: "threadRowMetadata";
|
|
725
727
|
updateWhenIdle: "updateWhenIdle";
|
|
728
|
+
walCheckpointWorker: "walCheckpointWorker";
|
|
726
729
|
}> & z$1.core.$partial, z$1.ZodBoolean>;
|
|
727
730
|
type ExperimentUpdates = z$1.infer<typeof experimentUpdatesSchema>;
|
|
728
731
|
|
|
@@ -8917,6 +8920,64 @@ type HostPickFolderResponse = PickFolderResponse;
|
|
|
8917
8920
|
type HostProviderCliStatusResponse = ProviderCliStatusResponse;
|
|
8918
8921
|
type HostProviderCliInstallRequest = ProviderCliInstallRequest;
|
|
8919
8922
|
type HostProviderCliInstallEvent = ProviderCliInstallEvent;
|
|
8923
|
+
declare const hostProviderCliInstallJobSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
8924
|
+
actionKind: z$1.ZodEnum<{
|
|
8925
|
+
install: "install";
|
|
8926
|
+
update: "update";
|
|
8927
|
+
}>;
|
|
8928
|
+
hostId: z$1.ZodString;
|
|
8929
|
+
id: z$1.ZodString;
|
|
8930
|
+
provider: z$1.ZodString;
|
|
8931
|
+
startedAt: z$1.ZodNumber;
|
|
8932
|
+
state: z$1.ZodLiteral<"running">;
|
|
8933
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
8934
|
+
actionKind: z$1.ZodEnum<{
|
|
8935
|
+
install: "install";
|
|
8936
|
+
update: "update";
|
|
8937
|
+
}>;
|
|
8938
|
+
events: z$1.ZodArray<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
8939
|
+
command: z$1.ZodString;
|
|
8940
|
+
provider: z$1.ZodString;
|
|
8941
|
+
type: z$1.ZodLiteral<"started">;
|
|
8942
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
8943
|
+
provider: z$1.ZodString;
|
|
8944
|
+
stream: z$1.ZodEnum<{
|
|
8945
|
+
stderr: "stderr";
|
|
8946
|
+
stdout: "stdout";
|
|
8947
|
+
}>;
|
|
8948
|
+
text: z$1.ZodString;
|
|
8949
|
+
type: z$1.ZodLiteral<"output">;
|
|
8950
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
8951
|
+
exitCode: z$1.ZodNullable<z$1.ZodNumber>;
|
|
8952
|
+
provider: z$1.ZodString;
|
|
8953
|
+
signal: z$1.ZodNullable<z$1.ZodString>;
|
|
8954
|
+
success: z$1.ZodBoolean;
|
|
8955
|
+
type: z$1.ZodLiteral<"completed">;
|
|
8956
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
8957
|
+
message: z$1.ZodString;
|
|
8958
|
+
provider: z$1.ZodString;
|
|
8959
|
+
type: z$1.ZodLiteral<"error">;
|
|
8960
|
+
}, z$1.core.$strip>], "type">>;
|
|
8961
|
+
finishedAt: z$1.ZodNumber;
|
|
8962
|
+
hostId: z$1.ZodString;
|
|
8963
|
+
id: z$1.ZodString;
|
|
8964
|
+
provider: z$1.ZodString;
|
|
8965
|
+
startedAt: z$1.ZodNumber;
|
|
8966
|
+
state: z$1.ZodLiteral<"completed">;
|
|
8967
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
8968
|
+
actionKind: z$1.ZodEnum<{
|
|
8969
|
+
install: "install";
|
|
8970
|
+
update: "update";
|
|
8971
|
+
}>;
|
|
8972
|
+
error: z$1.ZodString;
|
|
8973
|
+
finishedAt: z$1.ZodNumber;
|
|
8974
|
+
hostId: z$1.ZodString;
|
|
8975
|
+
id: z$1.ZodString;
|
|
8976
|
+
provider: z$1.ZodString;
|
|
8977
|
+
startedAt: z$1.ZodNumber;
|
|
8978
|
+
state: z$1.ZodLiteral<"failed">;
|
|
8979
|
+
}, z$1.core.$strip>], "state">;
|
|
8980
|
+
type HostProviderCliInstallJob = z$1.infer<typeof hostProviderCliInstallJobSchema>;
|
|
8920
8981
|
|
|
8921
8982
|
declare const pluginUpdateCheckEntrySchema: z$1.ZodObject<{
|
|
8922
8983
|
blocked: z$1.ZodOptional<z$1.ZodObject<{
|
|
@@ -8944,6 +9005,21 @@ declare const pluginUpdateCheckEntrySchema: z$1.ZodObject<{
|
|
|
8944
9005
|
pinned: "pinned";
|
|
8945
9006
|
unavailable: "unavailable";
|
|
8946
9007
|
}>;
|
|
9008
|
+
rangeUpgrade: z$1.ZodOptional<z$1.ZodObject<{
|
|
9009
|
+
basis: z$1.ZodEnum<{
|
|
9010
|
+
catalog: "catalog";
|
|
9011
|
+
release: "release";
|
|
9012
|
+
}>;
|
|
9013
|
+
breaking: z$1.ZodBoolean;
|
|
9014
|
+
candidate: z$1.ZodObject<{
|
|
9015
|
+
display: z$1.ZodString;
|
|
9016
|
+
label: z$1.ZodString;
|
|
9017
|
+
version: z$1.ZodString;
|
|
9018
|
+
}, z$1.core.$strip>;
|
|
9019
|
+
currentRange: z$1.ZodString;
|
|
9020
|
+
range: z$1.ZodString;
|
|
9021
|
+
reasons: z$1.ZodArray<z$1.ZodString>;
|
|
9022
|
+
}, z$1.core.$strip>>;
|
|
8947
9023
|
}, z$1.core.$strip>;
|
|
8948
9024
|
type PluginUpdateCheckEntry = z$1.infer<typeof pluginUpdateCheckEntrySchema>;
|
|
8949
9025
|
declare const pluginApplyUpdateResultSchema: z$1.ZodObject<{
|
|
@@ -9153,6 +9229,21 @@ declare const installedPluginSchema: z$1.ZodObject<{
|
|
|
9153
9229
|
pinned: "pinned";
|
|
9154
9230
|
unavailable: "unavailable";
|
|
9155
9231
|
}>>;
|
|
9232
|
+
rangeUpgrade: z$1.ZodOptional<z$1.ZodObject<{
|
|
9233
|
+
basis: z$1.ZodEnum<{
|
|
9234
|
+
catalog: "catalog";
|
|
9235
|
+
release: "release";
|
|
9236
|
+
}>;
|
|
9237
|
+
breaking: z$1.ZodBoolean;
|
|
9238
|
+
candidate: z$1.ZodObject<{
|
|
9239
|
+
display: z$1.ZodString;
|
|
9240
|
+
label: z$1.ZodString;
|
|
9241
|
+
version: z$1.ZodString;
|
|
9242
|
+
}, z$1.core.$strip>;
|
|
9243
|
+
currentRange: z$1.ZodString;
|
|
9244
|
+
range: z$1.ZodString;
|
|
9245
|
+
reasons: z$1.ZodArray<z$1.ZodString>;
|
|
9246
|
+
}, z$1.core.$strip>>;
|
|
9156
9247
|
}, z$1.core.$strip>;
|
|
9157
9248
|
updatedAt: z$1.ZodOptional<z$1.ZodISODateTime>;
|
|
9158
9249
|
version: z$1.ZodString;
|
|
@@ -9278,6 +9369,21 @@ declare const pluginListResponseSchema: z$1.ZodObject<{
|
|
|
9278
9369
|
pinned: "pinned";
|
|
9279
9370
|
unavailable: "unavailable";
|
|
9280
9371
|
}>>;
|
|
9372
|
+
rangeUpgrade: z$1.ZodOptional<z$1.ZodObject<{
|
|
9373
|
+
basis: z$1.ZodEnum<{
|
|
9374
|
+
catalog: "catalog";
|
|
9375
|
+
release: "release";
|
|
9376
|
+
}>;
|
|
9377
|
+
breaking: z$1.ZodBoolean;
|
|
9378
|
+
candidate: z$1.ZodObject<{
|
|
9379
|
+
display: z$1.ZodString;
|
|
9380
|
+
label: z$1.ZodString;
|
|
9381
|
+
version: z$1.ZodString;
|
|
9382
|
+
}, z$1.core.$strip>;
|
|
9383
|
+
currentRange: z$1.ZodString;
|
|
9384
|
+
range: z$1.ZodString;
|
|
9385
|
+
reasons: z$1.ZodArray<z$1.ZodString>;
|
|
9386
|
+
}, z$1.core.$strip>>;
|
|
9281
9387
|
}, z$1.core.$strip>;
|
|
9282
9388
|
updatedAt: z$1.ZodOptional<z$1.ZodISODateTime>;
|
|
9283
9389
|
version: z$1.ZodString;
|
|
@@ -9469,6 +9575,21 @@ declare const pluginInstallJobSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
|
9469
9575
|
pinned: "pinned";
|
|
9470
9576
|
unavailable: "unavailable";
|
|
9471
9577
|
}>>;
|
|
9578
|
+
rangeUpgrade: z$1.ZodOptional<z$1.ZodObject<{
|
|
9579
|
+
basis: z$1.ZodEnum<{
|
|
9580
|
+
catalog: "catalog";
|
|
9581
|
+
release: "release";
|
|
9582
|
+
}>;
|
|
9583
|
+
breaking: z$1.ZodBoolean;
|
|
9584
|
+
candidate: z$1.ZodObject<{
|
|
9585
|
+
display: z$1.ZodString;
|
|
9586
|
+
label: z$1.ZodString;
|
|
9587
|
+
version: z$1.ZodString;
|
|
9588
|
+
}, z$1.core.$strip>;
|
|
9589
|
+
currentRange: z$1.ZodString;
|
|
9590
|
+
range: z$1.ZodString;
|
|
9591
|
+
reasons: z$1.ZodArray<z$1.ZodString>;
|
|
9592
|
+
}, z$1.core.$strip>>;
|
|
9472
9593
|
}, z$1.core.$strip>;
|
|
9473
9594
|
updatedAt: z$1.ZodOptional<z$1.ZodISODateTime>;
|
|
9474
9595
|
version: z$1.ZodString;
|
|
@@ -9657,6 +9778,21 @@ declare const pluginReloadResponseSchema: z$1.ZodObject<{
|
|
|
9657
9778
|
pinned: "pinned";
|
|
9658
9779
|
unavailable: "unavailable";
|
|
9659
9780
|
}>>;
|
|
9781
|
+
rangeUpgrade: z$1.ZodOptional<z$1.ZodObject<{
|
|
9782
|
+
basis: z$1.ZodEnum<{
|
|
9783
|
+
catalog: "catalog";
|
|
9784
|
+
release: "release";
|
|
9785
|
+
}>;
|
|
9786
|
+
breaking: z$1.ZodBoolean;
|
|
9787
|
+
candidate: z$1.ZodObject<{
|
|
9788
|
+
display: z$1.ZodString;
|
|
9789
|
+
label: z$1.ZodString;
|
|
9790
|
+
version: z$1.ZodString;
|
|
9791
|
+
}, z$1.core.$strip>;
|
|
9792
|
+
currentRange: z$1.ZodString;
|
|
9793
|
+
range: z$1.ZodString;
|
|
9794
|
+
reasons: z$1.ZodArray<z$1.ZodString>;
|
|
9795
|
+
}, z$1.core.$strip>>;
|
|
9660
9796
|
}, z$1.core.$strip>;
|
|
9661
9797
|
updatedAt: z$1.ZodOptional<z$1.ZodISODateTime>;
|
|
9662
9798
|
version: z$1.ZodString;
|
|
@@ -10730,9 +10866,9 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
|
|
|
10730
10866
|
}, z$1.core.$strict>;
|
|
10731
10867
|
}, z$1.core.$strict>>;
|
|
10732
10868
|
experiments: z$1.ZodRecord<z$1.ZodEnum<{
|
|
10869
|
+
agentCpuPriority: "agentCpuPriority";
|
|
10733
10870
|
compactExpiredCache: "compactExpiredCache";
|
|
10734
10871
|
dismissReadNotifications: "dismissReadNotifications";
|
|
10735
|
-
narrowPluginCss: "narrowPluginCss";
|
|
10736
10872
|
performanceDiagnostics: "performanceDiagnostics";
|
|
10737
10873
|
pluginUpdates: "pluginUpdates";
|
|
10738
10874
|
resumeThreadsAfterRestart: "resumeThreadsAfterRestart";
|
|
@@ -10741,6 +10877,7 @@ declare const systemConfigResponseSchema: z$1.ZodObject<{
|
|
|
10741
10877
|
threadContextCard: "threadContextCard";
|
|
10742
10878
|
threadRowMetadata: "threadRowMetadata";
|
|
10743
10879
|
updateWhenIdle: "updateWhenIdle";
|
|
10880
|
+
walCheckpointWorker: "walCheckpointWorker";
|
|
10744
10881
|
}>, z$1.ZodBoolean>;
|
|
10745
10882
|
featureFlags: z$1.ZodObject<{
|
|
10746
10883
|
initiatorTelemetry: z$1.ZodDefault<z$1.ZodBoolean>;
|
|
@@ -15421,10 +15558,6 @@ declare const threadTimelineQuerySchema: z$1.ZodObject<{
|
|
|
15421
15558
|
true: "true";
|
|
15422
15559
|
}>>;
|
|
15423
15560
|
segmentLimit: z$1.ZodOptional<z$1.ZodString>;
|
|
15424
|
-
summaryOnly: z$1.ZodOptional<z$1.ZodEnum<{
|
|
15425
|
-
false: "false";
|
|
15426
|
-
true: "true";
|
|
15427
|
-
}>>;
|
|
15428
15561
|
}, z$1.core.$strip>;
|
|
15429
15562
|
type ThreadTimelineQuery = z$1.infer<typeof threadTimelineQuerySchema>;
|
|
15430
15563
|
declare const timelineTurnSummaryDetailsQuerySchema: z$1.ZodObject<{
|
|
@@ -17035,6 +17168,112 @@ declare const threadTimelineReadResponseSchema: z$1.ZodUnion<readonly [z$1.ZodOb
|
|
|
17035
17168
|
}, z$1.core.$strict>;
|
|
17036
17169
|
}, z$1.core.$strip>]>;
|
|
17037
17170
|
type ThreadTimelineReadResponse = z$1.infer<typeof threadTimelineReadResponseSchema>;
|
|
17171
|
+
declare const threadHeadStateResponseSchema: z$1.ZodObject<{
|
|
17172
|
+
activePromptMode: z$1.ZodNullable<z$1.ZodObject<{
|
|
17173
|
+
mode: z$1.ZodLiteral<"plan">;
|
|
17174
|
+
prompt: z$1.ZodString;
|
|
17175
|
+
providerId: z$1.ZodString;
|
|
17176
|
+
}, z$1.core.$strict>>;
|
|
17177
|
+
contextWindowUsage: z$1.ZodNullable<z$1.ZodObject<{
|
|
17178
|
+
compactionOfferAt: z$1.ZodOptional<z$1.ZodISODateTime>;
|
|
17179
|
+
cost: z$1.ZodOptional<z$1.ZodObject<{
|
|
17180
|
+
amount: z$1.ZodNumber;
|
|
17181
|
+
currency: z$1.ZodString;
|
|
17182
|
+
}, z$1.core.$strip>>;
|
|
17183
|
+
estimated: z$1.ZodBoolean;
|
|
17184
|
+
modelContextWindow: z$1.ZodNumber;
|
|
17185
|
+
snapshot: z$1.ZodOptional<z$1.ZodObject<{
|
|
17186
|
+
autoCompactAtTokens: z$1.ZodNullable<z$1.ZodNumber>;
|
|
17187
|
+
capturedAt: z$1.ZodISODateTime;
|
|
17188
|
+
categories: z$1.ZodArray<z$1.ZodObject<{
|
|
17189
|
+
entries: z$1.ZodArray<z$1.ZodObject<{
|
|
17190
|
+
id: z$1.ZodString;
|
|
17191
|
+
label: z$1.ZodString;
|
|
17192
|
+
tokens: z$1.ZodNumber;
|
|
17193
|
+
}, z$1.core.$strip>>;
|
|
17194
|
+
id: z$1.ZodString;
|
|
17195
|
+
kind: z$1.ZodEnum<{
|
|
17196
|
+
deferred: "deferred";
|
|
17197
|
+
free: "free";
|
|
17198
|
+
reserved: "reserved";
|
|
17199
|
+
used: "used";
|
|
17200
|
+
}>;
|
|
17201
|
+
label: z$1.ZodString;
|
|
17202
|
+
tokens: z$1.ZodNumber;
|
|
17203
|
+
}, z$1.core.$strip>>;
|
|
17204
|
+
contextWindowTokens: z$1.ZodNumber;
|
|
17205
|
+
estimated: z$1.ZodBoolean;
|
|
17206
|
+
model: z$1.ZodString;
|
|
17207
|
+
providerSessionId: z$1.ZodString;
|
|
17208
|
+
providerTurnId: z$1.ZodNullable<z$1.ZodString>;
|
|
17209
|
+
usedTokens: z$1.ZodNumber;
|
|
17210
|
+
}, z$1.core.$strip>>;
|
|
17211
|
+
usedTokens: z$1.ZodNumber;
|
|
17212
|
+
}, z$1.core.$strip>>;
|
|
17213
|
+
extensionStates: z$1.ZodRecord<z$1.ZodString, z$1.ZodType<JsonValue$1, unknown, z$1.core.$ZodTypeInternals<JsonValue$1, unknown>>>;
|
|
17214
|
+
modelFallback: z$1.ZodNullable<z$1.ZodObject<{
|
|
17215
|
+
detectedAt: z$1.ZodNumber;
|
|
17216
|
+
fallbackModel: z$1.ZodString;
|
|
17217
|
+
message: z$1.ZodString;
|
|
17218
|
+
originalModel: z$1.ZodString;
|
|
17219
|
+
reason: z$1.ZodEnum<{
|
|
17220
|
+
provider: "provider";
|
|
17221
|
+
refusal: "refusal";
|
|
17222
|
+
}>;
|
|
17223
|
+
sourceSeq: z$1.ZodNumber;
|
|
17224
|
+
}, z$1.core.$strip>>;
|
|
17225
|
+
pendingTodos: z$1.ZodNullable<z$1.ZodObject<{
|
|
17226
|
+
items: z$1.ZodArray<z$1.ZodObject<{
|
|
17227
|
+
id: z$1.ZodString;
|
|
17228
|
+
status: z$1.ZodEnum<{
|
|
17229
|
+
completed: "completed";
|
|
17230
|
+
in_progress: "in_progress";
|
|
17231
|
+
pending: "pending";
|
|
17232
|
+
}>;
|
|
17233
|
+
text: z$1.ZodString;
|
|
17234
|
+
}, z$1.core.$strip>>;
|
|
17235
|
+
sourceSeq: z$1.ZodNumber;
|
|
17236
|
+
updatedAt: z$1.ZodNumber;
|
|
17237
|
+
}, z$1.core.$strip>>;
|
|
17238
|
+
providerCommands: z$1.ZodNullable<z$1.ZodArray<z$1.ZodObject<{
|
|
17239
|
+
argumentHint: z$1.ZodNullable<z$1.ZodString>;
|
|
17240
|
+
description: z$1.ZodNullable<z$1.ZodString>;
|
|
17241
|
+
name: z$1.ZodString;
|
|
17242
|
+
origin: z$1.ZodEnum<{
|
|
17243
|
+
builtin: "builtin";
|
|
17244
|
+
project: "project";
|
|
17245
|
+
user: "user";
|
|
17246
|
+
}>;
|
|
17247
|
+
source: z$1.ZodEnum<{
|
|
17248
|
+
command: "command";
|
|
17249
|
+
skill: "skill";
|
|
17250
|
+
}>;
|
|
17251
|
+
}, z$1.core.$strip>>>;
|
|
17252
|
+
sessionOptions: z$1.ZodNullable<z$1.ZodArray<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
17253
|
+
category: z$1.ZodNullable<z$1.ZodString>;
|
|
17254
|
+
description: z$1.ZodNullable<z$1.ZodString>;
|
|
17255
|
+
id: z$1.ZodString;
|
|
17256
|
+
label: z$1.ZodString;
|
|
17257
|
+
pendingValue: z$1.ZodNullable<z$1.ZodString>;
|
|
17258
|
+
type: z$1.ZodLiteral<"select">;
|
|
17259
|
+
value: z$1.ZodString;
|
|
17260
|
+
values: z$1.ZodArray<z$1.ZodObject<{
|
|
17261
|
+
description: z$1.ZodNullable<z$1.ZodString>;
|
|
17262
|
+
group: z$1.ZodNullable<z$1.ZodString>;
|
|
17263
|
+
id: z$1.ZodString;
|
|
17264
|
+
label: z$1.ZodString;
|
|
17265
|
+
}, z$1.core.$strip>>;
|
|
17266
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
17267
|
+
category: z$1.ZodNullable<z$1.ZodString>;
|
|
17268
|
+
description: z$1.ZodNullable<z$1.ZodString>;
|
|
17269
|
+
id: z$1.ZodString;
|
|
17270
|
+
label: z$1.ZodString;
|
|
17271
|
+
pendingValue: z$1.ZodNullable<z$1.ZodBoolean>;
|
|
17272
|
+
type: z$1.ZodLiteral<"boolean">;
|
|
17273
|
+
value: z$1.ZodBoolean;
|
|
17274
|
+
}, z$1.core.$strip>], "type">>>;
|
|
17275
|
+
}, z$1.core.$strip>;
|
|
17276
|
+
type ThreadHeadStateResponse = z$1.infer<typeof threadHeadStateResponseSchema>;
|
|
17038
17277
|
declare const threadConversationOutlineQuerySchema: z$1.ZodObject<{
|
|
17039
17278
|
role: z$1.ZodOptional<z$1.ZodEnum<{
|
|
17040
17279
|
assistant: "assistant";
|
|
@@ -17928,6 +18167,20 @@ interface HostPickFolderArgs extends HostPickFolderRequest {
|
|
|
17928
18167
|
}
|
|
17929
18168
|
interface HostProviderCliInstallArgs extends HostProviderCliInstallRequest {
|
|
17930
18169
|
hostId: string;
|
|
18170
|
+
signal?: AbortSignal;
|
|
18171
|
+
}
|
|
18172
|
+
interface HostProviderCliInstallJobArgs {
|
|
18173
|
+
hostId: string;
|
|
18174
|
+
jobId: string;
|
|
18175
|
+
signal?: AbortSignal;
|
|
18176
|
+
}
|
|
18177
|
+
interface HostProviderCliInstallJobWaitArgs extends HostProviderCliInstallJobArgs {
|
|
18178
|
+
onJob?: (job: HostProviderCliInstallJob) => void;
|
|
18179
|
+
}
|
|
18180
|
+
interface HostProviderCliInstallJobsArea {
|
|
18181
|
+
list(args: HostGetArgs): Promise<HostProviderCliInstallJob[]>;
|
|
18182
|
+
get(args: HostProviderCliInstallJobArgs): Promise<HostProviderCliInstallJob>;
|
|
18183
|
+
wait(args: HostProviderCliInstallJobWaitArgs): Promise<HostProviderCliInstallJob>;
|
|
17931
18184
|
}
|
|
17932
18185
|
interface HostListArgs {
|
|
17933
18186
|
includeCreating?: boolean;
|
|
@@ -17976,6 +18229,8 @@ interface HostsArea {
|
|
|
17976
18229
|
get(args: HostGetArgs): Promise<HostGetResult>;
|
|
17977
18230
|
cloneDefaultPath(args: HostCloneDefaultPathArgs): Promise<HostCloneDefaultPathResult>;
|
|
17978
18231
|
installProviderCli(args: HostProviderCliInstallArgs): Promise<HostProviderCliInstallResult>;
|
|
18232
|
+
experimental_startProviderCliInstall(args: HostProviderCliInstallArgs): Promise<HostProviderCliInstallJob>;
|
|
18233
|
+
experimental_providerCliInstallJobs: HostProviderCliInstallJobsArea;
|
|
17979
18234
|
list(args?: HostListArgs): Promise<HostListResult>;
|
|
17980
18235
|
experimental_listProviders(args?: MachineProviderListArgs): Promise<MachineProviderListResult>;
|
|
17981
18236
|
pathsExist(args: HostPathsExistArgs): Promise<HostPathsExistResult>;
|
|
@@ -18228,6 +18483,10 @@ interface ProvidersArea {
|
|
|
18228
18483
|
interface PluginIdArgs {
|
|
18229
18484
|
pluginId: string;
|
|
18230
18485
|
}
|
|
18486
|
+
interface PluginApplyUpdateArgs extends PluginIdArgs {
|
|
18487
|
+
range?: string;
|
|
18488
|
+
expectedVersion?: string;
|
|
18489
|
+
}
|
|
18231
18490
|
interface PluginInstallArgs {
|
|
18232
18491
|
source: string;
|
|
18233
18492
|
subdirectory?: string;
|
|
@@ -18370,8 +18629,8 @@ interface PluginsArea {
|
|
|
18370
18629
|
experimental_getSafeMode(args?: PluginGetSafeModeArgs): Promise<PluginSafeModeResult>;
|
|
18371
18630
|
experimental_setSafeMode(args: PluginSetSafeModeArgs): Promise<PluginSetSafeModeResult>;
|
|
18372
18631
|
experimental_pruneCache(args?: PluginPruneCacheArgs): Promise<PluginPruneCacheResult>;
|
|
18373
|
-
applyUpdate(args:
|
|
18374
|
-
experimental_startUpdate(args:
|
|
18632
|
+
applyUpdate(args: PluginApplyUpdateArgs): Promise<PluginApplyUpdateResult>;
|
|
18633
|
+
experimental_startUpdate(args: PluginApplyUpdateArgs): Promise<PluginUpdateJob>;
|
|
18375
18634
|
experimental_updateJobs: PluginUpdateJobsArea;
|
|
18376
18635
|
callRpc<TOutput>(args: PluginRpcArgs<TOutput>): Promise<TOutput>;
|
|
18377
18636
|
checkUpdates(args?: PluginCheckUpdatesArgs): Promise<PluginCheckUpdatesResult>;
|
|
@@ -18910,6 +19169,7 @@ type ThreadInteractionCancelResult = PendingInteraction;
|
|
|
18910
19169
|
type ThreadEventsListResult = ThreadEventRow[];
|
|
18911
19170
|
type ThreadEventWaitResult = ThreadEventRow | null;
|
|
18912
19171
|
type ThreadContextResult = ThreadContextResponse;
|
|
19172
|
+
type ThreadHeadStateResult = ThreadHeadStateResponse;
|
|
18913
19173
|
type ThreadTimelineResult = ThreadTimelineResponse;
|
|
18914
19174
|
type ThreadTimelineReadResult = ThreadTimelineReadResponse;
|
|
18915
19175
|
type ThreadArchiveResult = ThreadArchiveAllResponse;
|
|
@@ -19330,6 +19590,15 @@ interface ThreadsArea {
|
|
|
19330
19590
|
stop(args: ThreadActionArgs): Promise<ThreadStopResult>;
|
|
19331
19591
|
tabs: ThreadTabsArea;
|
|
19332
19592
|
context(args: ThreadStatusArgs): Promise<ThreadContextResult>;
|
|
19593
|
+
/**
|
|
19594
|
+
* The thread's head state: to-dos, provider slash commands, session options,
|
|
19595
|
+
* extension states, plan prompt mode, model fallback, and context usage, as
|
|
19596
|
+
* of its latest event. Read from the latest stored state events without
|
|
19597
|
+
* building a timeline window; the latest timeline page embeds the same
|
|
19598
|
+
* values. `pendingTodos` and `activePromptMode` are null unless the thread
|
|
19599
|
+
* is active. Experimental: see docs/api_to_audit.md.
|
|
19600
|
+
*/
|
|
19601
|
+
experimental_headState(args: ThreadStatusArgs): Promise<ThreadHeadStateResult>;
|
|
19333
19602
|
timeline(args: ThreadTimelineArgs & {
|
|
19334
19603
|
afterTag?: undefined;
|
|
19335
19604
|
}): Promise<ThreadTimelineResult>;
|
|
@@ -2774,59 +2774,61 @@ async function validateRpcValue(schema, value, phase, fail) {
|
|
|
2774
2774
|
}
|
|
2775
2775
|
function normalizeRpcJsonResult(value, fail) {
|
|
2776
2776
|
const ancestors = /* @__PURE__ */ new Set();
|
|
2777
|
-
|
|
2777
|
+
const pathSegments = [];
|
|
2778
|
+
function failAt(problem) {
|
|
2779
|
+
let path = "$result";
|
|
2780
|
+
for (const segment of pathSegments) {
|
|
2781
|
+
path += typeof segment === "number" ? `[${segment}]` : `.${segment}`;
|
|
2782
|
+
}
|
|
2783
|
+
return fail({
|
|
2784
|
+
code: "non_json_result",
|
|
2785
|
+
message: `rpc result at ${path} ${problem}`
|
|
2786
|
+
});
|
|
2787
|
+
}
|
|
2788
|
+
function visit(current) {
|
|
2778
2789
|
if (current === null || typeof current === "string" || typeof current === "boolean") {
|
|
2779
2790
|
return current;
|
|
2780
2791
|
}
|
|
2781
2792
|
if (typeof current === "number") {
|
|
2782
2793
|
if (!Number.isFinite(current)) {
|
|
2783
|
-
return
|
|
2784
|
-
code: "non_json_result",
|
|
2785
|
-
message: `rpc result at ${path} contains a non-finite number`
|
|
2786
|
-
});
|
|
2794
|
+
return failAt("contains a non-finite number");
|
|
2787
2795
|
}
|
|
2788
2796
|
return current;
|
|
2789
2797
|
}
|
|
2790
2798
|
if (typeof current !== "object") {
|
|
2791
|
-
return
|
|
2792
|
-
code: "non_json_result",
|
|
2793
|
-
message: `rpc result at ${path} is not a JSON value (${typeof current})`
|
|
2794
|
-
});
|
|
2799
|
+
return failAt(`is not a JSON value (${typeof current})`);
|
|
2795
2800
|
}
|
|
2796
2801
|
if (ancestors.has(current)) {
|
|
2797
|
-
return
|
|
2798
|
-
code: "non_json_result",
|
|
2799
|
-
message: `rpc result at ${path} is cyclic`
|
|
2800
|
-
});
|
|
2802
|
+
return failAt("is cyclic");
|
|
2801
2803
|
}
|
|
2802
2804
|
ancestors.add(current);
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
code: "non_json_result",
|
|
2811
|
-
message: `rpc result at ${path} must be a plain JSON object`
|
|
2812
|
-
});
|
|
2813
|
-
}
|
|
2814
|
-
if (Reflect.ownKeys(current).some((key) => typeof key === "symbol")) {
|
|
2815
|
-
return fail({
|
|
2816
|
-
code: "non_json_result",
|
|
2817
|
-
message: `rpc result at ${path} contains a symbol key`
|
|
2818
|
-
});
|
|
2819
|
-
}
|
|
2820
|
-
const normalized = {};
|
|
2821
|
-
for (const [key, child] of Object.entries(current)) {
|
|
2822
|
-
normalized[key] = visit(child, `${path}.${key}`);
|
|
2823
|
-
}
|
|
2824
|
-
return normalized;
|
|
2825
|
-
} finally {
|
|
2805
|
+
if (Array.isArray(current)) {
|
|
2806
|
+
const normalized2 = current.map((item, index) => {
|
|
2807
|
+
pathSegments.push(index);
|
|
2808
|
+
const child = visit(item);
|
|
2809
|
+
pathSegments.pop();
|
|
2810
|
+
return child;
|
|
2811
|
+
});
|
|
2826
2812
|
ancestors.delete(current);
|
|
2813
|
+
return normalized2;
|
|
2814
|
+
}
|
|
2815
|
+
const prototype = Object.getPrototypeOf(current);
|
|
2816
|
+
if (prototype !== Object.prototype && prototype !== null) {
|
|
2817
|
+
return failAt("must be a plain JSON object");
|
|
2818
|
+
}
|
|
2819
|
+
if (Object.getOwnPropertySymbols(current).length > 0) {
|
|
2820
|
+
return failAt("contains a symbol key");
|
|
2821
|
+
}
|
|
2822
|
+
const normalized = {};
|
|
2823
|
+
for (const key of Object.keys(current)) {
|
|
2824
|
+
pathSegments.push(key);
|
|
2825
|
+
normalized[key] = visit(Reflect.get(current, key));
|
|
2826
|
+
pathSegments.pop();
|
|
2827
2827
|
}
|
|
2828
|
+
ancestors.delete(current);
|
|
2829
|
+
return normalized;
|
|
2828
2830
|
}
|
|
2829
|
-
return visit(value
|
|
2831
|
+
return visit(value);
|
|
2830
2832
|
}
|
|
2831
2833
|
export {
|
|
2832
2834
|
ENVIRONMENT_PROVIDER_DESCRIPTION_MAX_CHARS,
|
|
@@ -2033,7 +2033,8 @@ var HOST_CHANGE_KINDS = [
|
|
|
2033
2033
|
"host-disconnected",
|
|
2034
2034
|
"provider-model-catalog-changed",
|
|
2035
2035
|
"provider-commands-changed",
|
|
2036
|
-
"provider-cli-status-changed"
|
|
2036
|
+
"provider-cli-status-changed",
|
|
2037
|
+
"provider-cli-install-jobs-changed"
|
|
2037
2038
|
];
|
|
2038
2039
|
var SYSTEM_CHANGE_KINDS = [
|
|
2039
2040
|
"config-changed",
|
|
@@ -22432,7 +22432,7 @@ async function loadDeclaredSessionOptions(agent, parameterizedModelPicker, diale
|
|
|
22432
22432
|
let timeout;
|
|
22433
22433
|
const timeoutReached = new Promise((_, reject) => {
|
|
22434
22434
|
timeout = setTimeout(() => {
|
|
22435
|
-
connection.kill();
|
|
22435
|
+
void connection.kill();
|
|
22436
22436
|
reject(
|
|
22437
22437
|
new Error(
|
|
22438
22438
|
`ACP option discovery timed out after ${MODEL_LIST_TIMEOUT_MS}ms`
|
|
@@ -22530,7 +22530,7 @@ async function loadSessionDiscoveredModels(agent, reasoningProbePriorityModelIds
|
|
|
22530
22530
|
let timeout;
|
|
22531
22531
|
const timeoutReached = new Promise((_, reject) => {
|
|
22532
22532
|
timeout = setTimeout(() => {
|
|
22533
|
-
connection.kill();
|
|
22533
|
+
void connection.kill();
|
|
22534
22534
|
reject(
|
|
22535
22535
|
new Error(
|
|
22536
22536
|
`The agent did not answer within ${MODEL_LIST_TIMEOUT_MS / 1e3} seconds while bb asked it for its models`
|
|
@@ -22666,7 +22666,7 @@ async function discoverAcpNativeModelSupport(args) {
|
|
|
22666
22666
|
const timeoutReached = new Promise((resolve5) => {
|
|
22667
22667
|
timeout = setTimeout(() => {
|
|
22668
22668
|
timedOut = true;
|
|
22669
|
-
args.connection.kill();
|
|
22669
|
+
void args.connection.kill();
|
|
22670
22670
|
resolve5(supportByModel);
|
|
22671
22671
|
}, ACP_NATIVE_REASONING_DISCOVERY_TIMEOUT_MS);
|
|
22672
22672
|
});
|
|
@@ -23503,13 +23503,18 @@ async function startAgentSession(request) {
|
|
|
23503
23503
|
let loadedConfigOptions;
|
|
23504
23504
|
let loadedModels;
|
|
23505
23505
|
let createdFreshSession = false;
|
|
23506
|
+
let forkHandoffProviderThreadId;
|
|
23506
23507
|
if (request.kind === "fork") {
|
|
23507
|
-
const
|
|
23508
|
+
const source = getSessionByProviderThreadId(
|
|
23509
|
+
request.sourceProviderThreadId
|
|
23510
|
+
);
|
|
23511
|
+
const handoffSource = source !== void 0 && !source.stopping && !source.connection.exited && source.capabilities?.session.fork === true && source.capabilities.session.close === true && (capabilities.session.resume || supportsLoadSession) ? source : void 0;
|
|
23512
|
+
const forkedSession = await (handoffSource?.connection ?? connection).request({
|
|
23508
23513
|
method: "session/fork",
|
|
23509
23514
|
params: {
|
|
23510
23515
|
sessionId: request.sourceProviderThreadId,
|
|
23511
23516
|
cwd: params.cwd,
|
|
23512
|
-
mcpServers,
|
|
23517
|
+
mcpServers: handoffSource === void 0 ? mcpServers : [],
|
|
23513
23518
|
...additionalSessionDirectories(params, capabilities)
|
|
23514
23519
|
},
|
|
23515
23520
|
resultSchema: acpSessionForkResultSchema,
|
|
@@ -23520,21 +23525,33 @@ async function startAgentSession(request) {
|
|
|
23520
23525
|
`ACP agent "${agentLabel}" returned an active session ID for session/fork.`
|
|
23521
23526
|
);
|
|
23522
23527
|
}
|
|
23523
|
-
sessionId = forkedSession.sessionId;
|
|
23524
23528
|
loadedConfigOptions = forkedSession.configOptions;
|
|
23525
23529
|
loadedModels = forkedSession.models;
|
|
23526
|
-
|
|
23527
|
-
|
|
23530
|
+
if (handoffSource === void 0) {
|
|
23531
|
+
sessionId = forkedSession.sessionId;
|
|
23532
|
+
rememberGrokContextWindow(session, forkedSession.models);
|
|
23533
|
+
} else {
|
|
23534
|
+
forkHandoffProviderThreadId = forkedSession.sessionId;
|
|
23535
|
+
await handoffSource.connection.request({
|
|
23536
|
+
method: "session/close",
|
|
23537
|
+
params: { sessionId: forkedSession.sessionId },
|
|
23538
|
+
resultSchema: z51.unknown(),
|
|
23539
|
+
timeoutMs: ACP_SESSION_SETUP_TIMEOUT_MS
|
|
23540
|
+
});
|
|
23541
|
+
}
|
|
23542
|
+
}
|
|
23543
|
+
const resumeProviderThreadId = request.kind === "resume" ? request.resumeProviderThreadId : forkHandoffProviderThreadId;
|
|
23544
|
+
if (resumeProviderThreadId !== void 0 && (capabilities.session.resume || supportsLoadSession)) {
|
|
23528
23545
|
const restoreMethod = capabilities.session.resume ? "session/resume" : "session/load";
|
|
23529
23546
|
session.loading = true;
|
|
23530
|
-
session.loadingSessionId =
|
|
23547
|
+
session.loadingSessionId = resumeProviderThreadId;
|
|
23531
23548
|
session.pendingLoadUsageUpdate = void 0;
|
|
23532
23549
|
session.model.beginReplay();
|
|
23533
23550
|
try {
|
|
23534
23551
|
const configState = await connection.request({
|
|
23535
23552
|
method: restoreMethod,
|
|
23536
23553
|
params: {
|
|
23537
|
-
sessionId:
|
|
23554
|
+
sessionId: resumeProviderThreadId,
|
|
23538
23555
|
cwd: params.cwd,
|
|
23539
23556
|
mcpServers,
|
|
23540
23557
|
...additionalSessionDirectories(params, capabilities)
|
|
@@ -23542,12 +23559,16 @@ async function startAgentSession(request) {
|
|
|
23542
23559
|
resultSchema: z51.union([acpConfigStateResultSchema, z51.null()]),
|
|
23543
23560
|
timeoutMs: ACP_SESSION_SETUP_TIMEOUT_MS
|
|
23544
23561
|
});
|
|
23545
|
-
|
|
23546
|
-
|
|
23562
|
+
if (configState?.configOptions !== void 0) {
|
|
23563
|
+
loadedConfigOptions = configState.configOptions;
|
|
23564
|
+
}
|
|
23565
|
+
if (configState?.models !== void 0) {
|
|
23566
|
+
loadedModels = configState.models;
|
|
23567
|
+
}
|
|
23547
23568
|
rememberGrokContextWindow(session, configState?.models);
|
|
23548
|
-
sessionId =
|
|
23569
|
+
sessionId = resumeProviderThreadId;
|
|
23549
23570
|
} catch (error) {
|
|
23550
|
-
if (isAcpAuthRequiredResponse(error)) {
|
|
23571
|
+
if (isAcpAuthRequiredResponse(error) || request.kind === "fork") {
|
|
23551
23572
|
throw error;
|
|
23552
23573
|
}
|
|
23553
23574
|
sessionId = void 0;
|
|
@@ -23872,6 +23893,9 @@ function noteAgentResponse(session, method, result) {
|
|
|
23872
23893
|
case "session/load":
|
|
23873
23894
|
case "session/resume":
|
|
23874
23895
|
case "session/fork":
|
|
23896
|
+
if (session.providerThreadId !== "") {
|
|
23897
|
+
return;
|
|
23898
|
+
}
|
|
23875
23899
|
publishSessionStateEvents(
|
|
23876
23900
|
session,
|
|
23877
23901
|
session.model.applySessionSetup(result)
|
|
@@ -24908,7 +24932,12 @@ async function probeAcpAgent(request) {
|
|
|
24908
24932
|
} catch (error) {
|
|
24909
24933
|
return { reachable: false, reason: describe(error) };
|
|
24910
24934
|
} finally {
|
|
24911
|
-
connected.kill()
|
|
24935
|
+
void connected.kill().catch((error) => {
|
|
24936
|
+
process.stderr.write(
|
|
24937
|
+
`acp probe: stopping "${request.command}" failed: ${describe(error)}
|
|
24938
|
+
`
|
|
24939
|
+
);
|
|
24940
|
+
});
|
|
24912
24941
|
}
|
|
24913
24942
|
}
|
|
24914
24943
|
var acpAgentProbeSchema = z52.union([
|