@get-bb/plugin-sdk 0.6.90 → 0.6.99
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 +312 -173
- package/bundled-types/bb-plugin-sdk-host.d.ts +64 -64
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +18 -8
- package/bundled-types/bb-plugin-sdk-internal-plugin-app-collector.d.ts +15 -3
- package/bundled-types/bb-plugin-sdk-internal-rpc-query-host.d.ts +7 -7
- package/bundled-types/bb-plugin-sdk-internal-rpc-tags.d.ts +1 -1
- package/bundled-types/bb-plugin-sdk-provider-bridge-acp-next.d.ts +4 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge-acp.d.ts +4 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge-testing.d.ts +2 -0
- package/bundled-types/bb-plugin-sdk-provider-bridge.d.ts +12 -1
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +20 -2
- package/bundled-types/bb-plugin-sdk-testing.d.ts +11 -8
- package/bundled-types/bb-plugin-sdk.d.ts +386 -235
- package/dist/app.js +8 -0
- package/dist/host.js +93 -1
- package/dist/internal/host-policy.js +1 -3
- package/dist/internal/plugin-app-collector.js +47 -10
- package/dist/internal/rpc-query-host.js +73 -51
- package/dist/process.js +100 -3
- package/dist/provider-bridge-acp-next.js +2275 -2034
- package/dist/provider-bridge-acp.js +2275 -2034
- package/dist/provider-bridge-testing.js +207 -132
- package/dist/provider-bridge-worker-entry.mjs +93 -1
- package/dist/provider-bridge.js +702 -596
- package/dist/testing/app.js +131 -64
- package/dist/testing/index.js +5 -4
- package/package.json +3 -3
package/dist/provider-bridge.js
CHANGED
|
@@ -1030,7 +1030,7 @@ function withoutBridgeRuntimeEnv(env) {
|
|
|
1030
1030
|
}
|
|
1031
1031
|
|
|
1032
1032
|
// ../provider-bridge-protocol/src/bridge-kit/bridge-tool-calls.ts
|
|
1033
|
-
import { z as
|
|
1033
|
+
import { z as z25 } from "zod";
|
|
1034
1034
|
|
|
1035
1035
|
// ../domain/src/context-snapshot.ts
|
|
1036
1036
|
import { z as z3 } from "zod";
|
|
@@ -1397,7 +1397,7 @@ var sessionOptionSelectionsSchema = z5.record(
|
|
|
1397
1397
|
var runtimeThreadExecutionBaseOptionsSchema = z5.object({
|
|
1398
1398
|
model: z5.string().min(1),
|
|
1399
1399
|
serviceTier: serviceTierSchema,
|
|
1400
|
-
reasoningLevel: reasoningLevelSchema,
|
|
1400
|
+
reasoningLevel: reasoningLevelSchema.optional(),
|
|
1401
1401
|
promptMode: promptModeSchema.optional(),
|
|
1402
1402
|
sessionOptions: sessionOptionSelectionsSchema.optional(),
|
|
1403
1403
|
providerOptions: jsonObjectSchema
|
|
@@ -2006,7 +2006,7 @@ var approvalPendingInteractionPayloadSchema = z14.object({
|
|
|
2006
2006
|
reason: z14.string().nullable(),
|
|
2007
2007
|
availableDecisions: z14.array(pendingInteractionApprovalDecisionSchema).min(1)
|
|
2008
2008
|
});
|
|
2009
|
-
var USER_QUESTION_MAX_QUESTIONS =
|
|
2009
|
+
var USER_QUESTION_MAX_QUESTIONS = 10;
|
|
2010
2010
|
var USER_QUESTION_MAX_OPTIONS = 4;
|
|
2011
2011
|
var USER_QUESTION_MAX_SELECTED = 4;
|
|
2012
2012
|
var USER_QUESTION_MAX_FREE_TEXT_LENGTH = 4096;
|
|
@@ -2048,7 +2048,8 @@ var pendingInteractionUserQuestionQuestionSchema = z14.object({
|
|
|
2048
2048
|
USER_QUESTION_MAX_OPTIONS,
|
|
2049
2049
|
`User questions cannot include more than ${USER_QUESTION_MAX_OPTIONS} options`
|
|
2050
2050
|
).optional(),
|
|
2051
|
-
allowFreeText: z14.boolean()
|
|
2051
|
+
allowFreeText: z14.boolean(),
|
|
2052
|
+
required: z14.boolean().default(true)
|
|
2052
2053
|
}).superRefine((question, context) => {
|
|
2053
2054
|
const optionValues = /* @__PURE__ */ new Set();
|
|
2054
2055
|
question.options?.forEach((option, index) => {
|
|
@@ -3307,17 +3308,13 @@ var threadEventSchema = z19.union([providerEventSchema, systemEventSchema]).supe
|
|
|
3307
3308
|
});
|
|
3308
3309
|
|
|
3309
3310
|
// ../domain/src/thread-provider-state.ts
|
|
3311
|
+
import { z as z22 } from "zod";
|
|
3312
|
+
|
|
3313
|
+
// ../domain/src/provider-types.ts
|
|
3314
|
+
import { z as z21 } from "zod";
|
|
3315
|
+
|
|
3316
|
+
// ../domain/src/thread-session-option.ts
|
|
3310
3317
|
import { z as z20 } from "zod";
|
|
3311
|
-
var THREAD_PROVIDER_COMMANDS_STATE_KIND = "bb/provider-commands";
|
|
3312
|
-
var THREAD_SESSION_OPTIONS_STATE_KIND = "bb/session-options";
|
|
3313
|
-
var threadProviderCommandSchema = z20.object({
|
|
3314
|
-
name: z20.string().min(1),
|
|
3315
|
-
description: z20.string(),
|
|
3316
|
-
inputHint: z20.string().min(1).optional()
|
|
3317
|
-
});
|
|
3318
|
-
var threadProviderCommandsStateSchema = z20.object({
|
|
3319
|
-
commands: z20.array(threadProviderCommandSchema).max(500)
|
|
3320
|
-
});
|
|
3321
3318
|
var threadSessionOptionValueSchema = z20.object({
|
|
3322
3319
|
id: z20.string().min(1),
|
|
3323
3320
|
label: z20.string().min(1),
|
|
@@ -3344,117 +3341,102 @@ var threadSessionOptionSchema = z20.discriminatedUnion("type", [
|
|
|
3344
3341
|
fixed: z20.boolean().optional()
|
|
3345
3342
|
})
|
|
3346
3343
|
]);
|
|
3347
|
-
var threadSessionOptionsStateSchema = z20.object({
|
|
3348
|
-
options: z20.array(threadSessionOptionSchema).max(64)
|
|
3349
|
-
});
|
|
3350
|
-
var threadSessionOptionSelectionsStateSchema = z20.object({
|
|
3351
|
-
selections: sessionOptionSelectionsSchema
|
|
3352
|
-
});
|
|
3353
|
-
var CORE_THREAD_STATE_SCHEMAS = {
|
|
3354
|
-
[THREAD_PROVIDER_COMMANDS_STATE_KIND]: threadProviderCommandsStateSchema,
|
|
3355
|
-
[THREAD_SESSION_OPTIONS_STATE_KIND]: threadSessionOptionsStateSchema
|
|
3356
|
-
};
|
|
3357
|
-
|
|
3358
|
-
// ../domain/src/provider-fork.ts
|
|
3359
|
-
import { z as z21 } from "zod";
|
|
3360
|
-
var PROVIDER_FORK_VALUES = ["none", "tip", "checkpoint"];
|
|
3361
|
-
var providerForkSchema = z21.enum(PROVIDER_FORK_VALUES);
|
|
3362
3344
|
|
|
3363
3345
|
// ../domain/src/provider-types.ts
|
|
3364
|
-
|
|
3365
|
-
var modelReasoningEffortSchema = z22.object({
|
|
3346
|
+
var modelReasoningEffortSchema = z21.object({
|
|
3366
3347
|
reasoningEffort: reasoningLevelSchema,
|
|
3367
|
-
label:
|
|
3368
|
-
description:
|
|
3348
|
+
label: z21.string().min(1).optional(),
|
|
3349
|
+
description: z21.string()
|
|
3369
3350
|
});
|
|
3370
|
-
var modelServiceTierSchema =
|
|
3351
|
+
var modelServiceTierSchema = z21.object({
|
|
3371
3352
|
id: serviceTierSchema,
|
|
3372
|
-
label:
|
|
3373
|
-
description:
|
|
3374
|
-
});
|
|
3375
|
-
var availableModelSchema =
|
|
3376
|
-
id:
|
|
3377
|
-
model:
|
|
3378
|
-
displayName:
|
|
3379
|
-
routeProviderId:
|
|
3380
|
-
description:
|
|
3381
|
-
|
|
3353
|
+
label: z21.string().min(1).optional(),
|
|
3354
|
+
description: z21.string().min(1).optional()
|
|
3355
|
+
});
|
|
3356
|
+
var availableModelSchema = z21.object({
|
|
3357
|
+
id: z21.string(),
|
|
3358
|
+
model: z21.string(),
|
|
3359
|
+
displayName: z21.string(),
|
|
3360
|
+
routeProviderId: z21.string().min(1).optional(),
|
|
3361
|
+
description: z21.string(),
|
|
3362
|
+
reasoningDiscovery: z21.enum(["unknown", "known"]).default("known"),
|
|
3363
|
+
supportedReasoningEfforts: z21.array(modelReasoningEffortSchema),
|
|
3382
3364
|
defaultReasoningEffort: reasoningLevelSchema,
|
|
3383
|
-
supportedServiceTiers:
|
|
3384
|
-
sessionOptions:
|
|
3385
|
-
isDefault:
|
|
3386
|
-
});
|
|
3387
|
-
var providerModelCatalogScopeSchema =
|
|
3388
|
-
var providerCapabilitiesSchema =
|
|
3389
|
-
supportsThreadArchive:
|
|
3390
|
-
supportsThreadRename:
|
|
3391
|
-
supportsServiceTier:
|
|
3392
|
-
supportsNativeUserQuestion:
|
|
3393
|
-
supportsFork:
|
|
3394
|
-
supportsSessionRewind:
|
|
3395
|
-
permissionModes:
|
|
3365
|
+
supportedServiceTiers: z21.array(modelServiceTierSchema).optional(),
|
|
3366
|
+
sessionOptions: z21.array(threadSessionOptionSchema).max(64).optional(),
|
|
3367
|
+
isDefault: z21.boolean()
|
|
3368
|
+
});
|
|
3369
|
+
var providerModelCatalogScopeSchema = z21.enum(["host", "workspace"]);
|
|
3370
|
+
var providerCapabilitiesSchema = z21.object({
|
|
3371
|
+
supportsThreadArchive: z21.boolean(),
|
|
3372
|
+
supportsThreadRename: z21.boolean(),
|
|
3373
|
+
supportsServiceTier: z21.boolean(),
|
|
3374
|
+
supportsNativeUserQuestion: z21.boolean(),
|
|
3375
|
+
supportsFork: z21.boolean(),
|
|
3376
|
+
supportsSessionRewind: z21.boolean(),
|
|
3377
|
+
permissionModes: z21.array(permissionModeSchema).min(1),
|
|
3396
3378
|
modelCatalogScope: providerModelCatalogScopeSchema
|
|
3397
3379
|
});
|
|
3398
|
-
var providerComposerCommandSchema =
|
|
3380
|
+
var providerComposerCommandSchema = z21.object({
|
|
3399
3381
|
trigger: promptMentionCommandTriggerSchema,
|
|
3400
|
-
name:
|
|
3401
|
-
trailingText:
|
|
3382
|
+
name: z21.string().min(1).regex(/^[^\s/$]+$/u),
|
|
3383
|
+
trailingText: z21.string().regex(/^\s*$/u)
|
|
3402
3384
|
});
|
|
3403
|
-
var providerComposerActionSchema =
|
|
3404
|
-
|
|
3405
|
-
kind:
|
|
3385
|
+
var providerComposerActionSchema = z21.discriminatedUnion("kind", [
|
|
3386
|
+
z21.object({
|
|
3387
|
+
kind: z21.literal("skills"),
|
|
3406
3388
|
trigger: promptMentionCommandTriggerSchema
|
|
3407
3389
|
}),
|
|
3408
|
-
|
|
3409
|
-
kind:
|
|
3390
|
+
z21.object({
|
|
3391
|
+
kind: z21.literal("plan"),
|
|
3410
3392
|
command: providerComposerCommandSchema
|
|
3411
3393
|
}),
|
|
3412
|
-
|
|
3413
|
-
kind:
|
|
3394
|
+
z21.object({
|
|
3395
|
+
kind: z21.literal("goal"),
|
|
3414
3396
|
command: providerComposerCommandSchema
|
|
3415
3397
|
})
|
|
3416
3398
|
]);
|
|
3417
|
-
var providerStringsSchema =
|
|
3418
|
-
signInHint:
|
|
3419
|
-
expiredHint:
|
|
3420
|
-
installUrl:
|
|
3421
|
-
brandPrefix:
|
|
3422
|
-
planModeCopy:
|
|
3423
|
-
iconTint:
|
|
3424
|
-
});
|
|
3425
|
-
var providerOptionDescriptorSchema =
|
|
3426
|
-
id:
|
|
3427
|
-
label:
|
|
3428
|
-
description:
|
|
3429
|
-
icon:
|
|
3430
|
-
});
|
|
3431
|
-
var providerExtensionKindInfoSchema =
|
|
3432
|
-
item:
|
|
3433
|
-
state:
|
|
3434
|
-
});
|
|
3435
|
-
var providerExtensionKindsSchema =
|
|
3399
|
+
var providerStringsSchema = z21.object({
|
|
3400
|
+
signInHint: z21.string().min(1),
|
|
3401
|
+
expiredHint: z21.string().min(1),
|
|
3402
|
+
installUrl: z21.string().min(1),
|
|
3403
|
+
brandPrefix: z21.string().min(1).optional(),
|
|
3404
|
+
planModeCopy: z21.string().min(1).optional(),
|
|
3405
|
+
iconTint: z21.object({ light: z21.string().min(1), dark: z21.string().min(1) }).optional()
|
|
3406
|
+
});
|
|
3407
|
+
var providerOptionDescriptorSchema = z21.object({
|
|
3408
|
+
id: z21.string().min(1),
|
|
3409
|
+
label: z21.string().min(1),
|
|
3410
|
+
description: z21.string().min(1).optional(),
|
|
3411
|
+
icon: z21.string().min(1).optional()
|
|
3412
|
+
});
|
|
3413
|
+
var providerExtensionKindInfoSchema = z21.object({
|
|
3414
|
+
item: z21.boolean(),
|
|
3415
|
+
state: z21.boolean()
|
|
3416
|
+
});
|
|
3417
|
+
var providerExtensionKindsSchema = z21.record(
|
|
3436
3418
|
extensionKindSchema,
|
|
3437
3419
|
providerExtensionKindInfoSchema
|
|
3438
3420
|
);
|
|
3439
|
-
var providerInfoSchema =
|
|
3440
|
-
id:
|
|
3441
|
-
pluginId:
|
|
3442
|
-
displayName:
|
|
3443
|
-
family:
|
|
3444
|
-
icon:
|
|
3445
|
-
logoUrl:
|
|
3446
|
-
maintenance:
|
|
3447
|
-
health:
|
|
3448
|
-
usage:
|
|
3449
|
-
installation:
|
|
3421
|
+
var providerInfoSchema = z21.object({
|
|
3422
|
+
id: z21.string(),
|
|
3423
|
+
pluginId: z21.string().min(1),
|
|
3424
|
+
displayName: z21.string(),
|
|
3425
|
+
family: z21.string().min(1).optional(),
|
|
3426
|
+
icon: z21.object({ glyph: z21.string().min(1) }).optional(),
|
|
3427
|
+
logoUrl: z21.string().min(1).nullable(),
|
|
3428
|
+
maintenance: z21.object({
|
|
3429
|
+
health: z21.boolean(),
|
|
3430
|
+
usage: z21.boolean(),
|
|
3431
|
+
installation: z21.boolean()
|
|
3450
3432
|
}),
|
|
3451
3433
|
capabilities: providerCapabilitiesSchema,
|
|
3452
|
-
composerActions:
|
|
3434
|
+
composerActions: z21.array(providerComposerActionSchema),
|
|
3453
3435
|
completedTurnDisplay: completedTurnDisplaySchema,
|
|
3454
|
-
available:
|
|
3436
|
+
available: z21.boolean(),
|
|
3455
3437
|
strings: providerStringsSchema.optional(),
|
|
3456
|
-
serviceTiers:
|
|
3457
|
-
reasoningLevels:
|
|
3438
|
+
serviceTiers: z21.array(providerOptionDescriptorSchema).optional(),
|
|
3439
|
+
reasoningLevels: z21.array(providerOptionDescriptorSchema).optional(),
|
|
3458
3440
|
extensionKinds: providerExtensionKindsSchema.optional()
|
|
3459
3441
|
});
|
|
3460
3442
|
var providerRecoveryKindValues = [
|
|
@@ -3464,37 +3446,70 @@ var providerRecoveryKindValues = [
|
|
|
3464
3446
|
"staleTurn",
|
|
3465
3447
|
"rateLimited"
|
|
3466
3448
|
];
|
|
3467
|
-
var providerRecoveryKindSchema =
|
|
3468
|
-
var toolCallOutputItemSchema =
|
|
3469
|
-
|
|
3470
|
-
type:
|
|
3471
|
-
text:
|
|
3449
|
+
var providerRecoveryKindSchema = z21.enum(providerRecoveryKindValues);
|
|
3450
|
+
var toolCallOutputItemSchema = z21.discriminatedUnion("type", [
|
|
3451
|
+
z21.object({
|
|
3452
|
+
type: z21.literal("inputText"),
|
|
3453
|
+
text: z21.string()
|
|
3472
3454
|
}),
|
|
3473
|
-
|
|
3474
|
-
type:
|
|
3475
|
-
imageUrl:
|
|
3455
|
+
z21.object({
|
|
3456
|
+
type: z21.literal("inputImage"),
|
|
3457
|
+
imageUrl: z21.string()
|
|
3476
3458
|
})
|
|
3477
3459
|
]);
|
|
3478
|
-
var toolCallRequestSchema =
|
|
3479
|
-
requestId:
|
|
3480
|
-
threadId:
|
|
3481
|
-
providerThreadId:
|
|
3482
|
-
turnId:
|
|
3483
|
-
callId:
|
|
3484
|
-
tool:
|
|
3485
|
-
arguments:
|
|
3486
|
-
});
|
|
3487
|
-
var toolCallResponseSchema =
|
|
3488
|
-
contentItems:
|
|
3489
|
-
success:
|
|
3490
|
-
});
|
|
3491
|
-
var dynamicToolSchema =
|
|
3492
|
-
name:
|
|
3493
|
-
description:
|
|
3494
|
-
inputSchema:
|
|
3460
|
+
var toolCallRequestSchema = z21.object({
|
|
3461
|
+
requestId: z21.union([z21.string().min(1), z21.number()]),
|
|
3462
|
+
threadId: z21.string().min(1),
|
|
3463
|
+
providerThreadId: z21.string().min(1),
|
|
3464
|
+
turnId: z21.string().min(1),
|
|
3465
|
+
callId: z21.string().min(1),
|
|
3466
|
+
tool: z21.string().min(1),
|
|
3467
|
+
arguments: z21.unknown().optional()
|
|
3468
|
+
});
|
|
3469
|
+
var toolCallResponseSchema = z21.object({
|
|
3470
|
+
contentItems: z21.array(toolCallOutputItemSchema),
|
|
3471
|
+
success: z21.boolean()
|
|
3472
|
+
});
|
|
3473
|
+
var dynamicToolSchema = z21.object({
|
|
3474
|
+
name: z21.string(),
|
|
3475
|
+
description: z21.string(),
|
|
3476
|
+
inputSchema: z21.unknown(),
|
|
3495
3477
|
presentation: threadEventItemPresentationSchema.optional()
|
|
3496
3478
|
});
|
|
3497
3479
|
|
|
3480
|
+
// ../domain/src/thread-provider-state.ts
|
|
3481
|
+
var THREAD_PROVIDER_COMMANDS_STATE_KIND = "bb/provider-commands";
|
|
3482
|
+
var THREAD_SESSION_OPTIONS_STATE_KIND = "bb/session-options";
|
|
3483
|
+
var THREAD_PROVIDER_MODEL_CATALOG_STATE_KIND = "bb/provider-model-catalog";
|
|
3484
|
+
var threadProviderModelCatalogStateSchema = z22.object({
|
|
3485
|
+
models: z22.array(availableModelSchema).max(1e3),
|
|
3486
|
+
selectedOnlyModels: z22.array(availableModelSchema).max(1e3)
|
|
3487
|
+
});
|
|
3488
|
+
var threadProviderCommandSchema = z22.object({
|
|
3489
|
+
name: z22.string().min(1),
|
|
3490
|
+
description: z22.string(),
|
|
3491
|
+
inputHint: z22.string().min(1).optional()
|
|
3492
|
+
});
|
|
3493
|
+
var threadProviderCommandsStateSchema = z22.object({
|
|
3494
|
+
commands: z22.array(threadProviderCommandSchema).max(500)
|
|
3495
|
+
});
|
|
3496
|
+
var threadSessionOptionsStateSchema = z22.object({
|
|
3497
|
+
options: z22.array(threadSessionOptionSchema).max(64)
|
|
3498
|
+
});
|
|
3499
|
+
var threadSessionOptionSelectionsStateSchema = z22.object({
|
|
3500
|
+
selections: sessionOptionSelectionsSchema
|
|
3501
|
+
});
|
|
3502
|
+
var CORE_THREAD_STATE_SCHEMAS = {
|
|
3503
|
+
[THREAD_PROVIDER_MODEL_CATALOG_STATE_KIND]: threadProviderModelCatalogStateSchema,
|
|
3504
|
+
[THREAD_PROVIDER_COMMANDS_STATE_KIND]: threadProviderCommandsStateSchema,
|
|
3505
|
+
[THREAD_SESSION_OPTIONS_STATE_KIND]: threadSessionOptionsStateSchema
|
|
3506
|
+
};
|
|
3507
|
+
|
|
3508
|
+
// ../domain/src/provider-fork.ts
|
|
3509
|
+
import { z as z23 } from "zod";
|
|
3510
|
+
var PROVIDER_FORK_VALUES = ["none", "tip", "checkpoint"];
|
|
3511
|
+
var providerForkSchema = z23.enum(PROVIDER_FORK_VALUES);
|
|
3512
|
+
|
|
3498
3513
|
// ../domain/src/reasoning-efforts.ts
|
|
3499
3514
|
var NONE_REASONING_EFFORT = {
|
|
3500
3515
|
reasoningEffort: "none",
|
|
@@ -3545,60 +3560,58 @@ function reasoningEffortsForLevels(levels) {
|
|
|
3545
3560
|
}
|
|
3546
3561
|
|
|
3547
3562
|
// ../provider-bridge-protocol/src/bridge-requests.ts
|
|
3548
|
-
import { z as
|
|
3563
|
+
import { z as z24 } from "zod";
|
|
3549
3564
|
var BRIDGE_INBOUND_REQUEST_METHODS = {
|
|
3550
3565
|
toolCall: "item/tool/call",
|
|
3551
3566
|
interactionRequest: "interaction/request"
|
|
3552
3567
|
};
|
|
3553
|
-
var toolCallRequestParamsSchema =
|
|
3554
|
-
providerThreadId:
|
|
3555
|
-
threadId:
|
|
3556
|
-
turnId:
|
|
3557
|
-
callId:
|
|
3558
|
-
tool:
|
|
3559
|
-
arguments:
|
|
3560
|
-
providerNativeIds: z23.boolean().optional()
|
|
3568
|
+
var toolCallRequestParamsSchema = z24.object({
|
|
3569
|
+
providerThreadId: z24.string().min(1),
|
|
3570
|
+
threadId: z24.string().min(1).optional(),
|
|
3571
|
+
turnId: z24.union([z24.string().min(1), z24.null()]),
|
|
3572
|
+
callId: z24.string().min(1),
|
|
3573
|
+
tool: z24.string().min(1),
|
|
3574
|
+
arguments: z24.unknown()
|
|
3561
3575
|
}).passthrough();
|
|
3562
|
-
var toolCallResultSchema =
|
|
3563
|
-
success:
|
|
3564
|
-
contentItems:
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
type:
|
|
3569
|
-
imageUrl:
|
|
3576
|
+
var toolCallResultSchema = z24.object({
|
|
3577
|
+
success: z24.boolean(),
|
|
3578
|
+
contentItems: z24.array(
|
|
3579
|
+
z24.discriminatedUnion("type", [
|
|
3580
|
+
z24.object({ type: z24.literal("inputText"), text: z24.string() }),
|
|
3581
|
+
z24.object({
|
|
3582
|
+
type: z24.literal("inputImage"),
|
|
3583
|
+
imageUrl: z24.string().min(1)
|
|
3570
3584
|
})
|
|
3571
3585
|
])
|
|
3572
3586
|
)
|
|
3573
3587
|
}).passthrough();
|
|
3574
|
-
var interactionRequestParamsSchema =
|
|
3575
|
-
providerThreadId:
|
|
3576
|
-
threadId:
|
|
3577
|
-
turnId:
|
|
3578
|
-
payload: pendingInteractionPayloadSchema
|
|
3579
|
-
providerNativeIds: z23.boolean().optional()
|
|
3588
|
+
var interactionRequestParamsSchema = z24.object({
|
|
3589
|
+
providerThreadId: z24.string().min(1),
|
|
3590
|
+
threadId: z24.string().min(1).optional(),
|
|
3591
|
+
turnId: z24.union([z24.string().min(1), z24.null()]),
|
|
3592
|
+
payload: pendingInteractionPayloadSchema
|
|
3580
3593
|
}).passthrough();
|
|
3581
3594
|
|
|
3582
3595
|
// ../provider-bridge-protocol/src/bridge-kit/bridge-tool-calls.ts
|
|
3583
|
-
var bridgeRequestEnvelopeSchema =
|
|
3584
|
-
jsonrpc:
|
|
3585
|
-
id:
|
|
3586
|
-
method:
|
|
3587
|
-
params:
|
|
3588
|
-
});
|
|
3589
|
-
var jsonRpcErrorSchema =
|
|
3590
|
-
code:
|
|
3591
|
-
message:
|
|
3592
|
-
data:
|
|
3593
|
-
});
|
|
3594
|
-
var jsonRpcSuccessResponseSchema =
|
|
3595
|
-
jsonrpc:
|
|
3596
|
-
id:
|
|
3597
|
-
result:
|
|
3598
|
-
});
|
|
3599
|
-
var jsonRpcErrorResponseSchema =
|
|
3600
|
-
jsonrpc:
|
|
3601
|
-
id:
|
|
3596
|
+
var bridgeRequestEnvelopeSchema = z25.object({
|
|
3597
|
+
jsonrpc: z25.literal("2.0"),
|
|
3598
|
+
id: z25.union([z25.string(), z25.number()]),
|
|
3599
|
+
method: z25.string(),
|
|
3600
|
+
params: z25.record(z25.string(), z25.unknown()).optional()
|
|
3601
|
+
});
|
|
3602
|
+
var jsonRpcErrorSchema = z25.object({
|
|
3603
|
+
code: z25.number(),
|
|
3604
|
+
message: z25.string().optional(),
|
|
3605
|
+
data: z25.unknown().optional()
|
|
3606
|
+
});
|
|
3607
|
+
var jsonRpcSuccessResponseSchema = z25.object({
|
|
3608
|
+
jsonrpc: z25.literal("2.0"),
|
|
3609
|
+
id: z25.union([z25.string(), z25.number()]),
|
|
3610
|
+
result: z25.unknown()
|
|
3611
|
+
});
|
|
3612
|
+
var jsonRpcErrorResponseSchema = z25.object({
|
|
3613
|
+
jsonrpc: z25.literal("2.0"),
|
|
3614
|
+
id: z25.union([z25.string(), z25.number()]),
|
|
3602
3615
|
error: jsonRpcErrorSchema
|
|
3603
3616
|
});
|
|
3604
3617
|
function isJsonRpcRequest(input) {
|
|
@@ -3686,47 +3699,47 @@ function buildBridgeToolCallContent(result) {
|
|
|
3686
3699
|
}
|
|
3687
3700
|
|
|
3688
3701
|
// ../provider-bridge-protocol/src/bridge-kit/json-rpc-envelope.ts
|
|
3689
|
-
import { z as
|
|
3690
|
-
var recordSchema =
|
|
3691
|
-
var jsonRpcEnvelopeSchema =
|
|
3692
|
-
jsonrpc:
|
|
3693
|
-
method:
|
|
3702
|
+
import { z as z26 } from "zod";
|
|
3703
|
+
var recordSchema = z26.record(z26.string(), z26.unknown());
|
|
3704
|
+
var jsonRpcEnvelopeSchema = z26.object({
|
|
3705
|
+
jsonrpc: z26.literal("2.0"),
|
|
3706
|
+
method: z26.string(),
|
|
3694
3707
|
params: recordSchema.optional()
|
|
3695
3708
|
}).passthrough();
|
|
3696
|
-
var sdkMessageEnvelopeSchema =
|
|
3697
|
-
jsonrpc:
|
|
3698
|
-
method:
|
|
3699
|
-
params:
|
|
3700
|
-
message:
|
|
3701
|
-
threadId:
|
|
3702
|
-
parent_tool_use_id:
|
|
3709
|
+
var sdkMessageEnvelopeSchema = z26.object({
|
|
3710
|
+
jsonrpc: z26.literal("2.0"),
|
|
3711
|
+
method: z26.literal("sdk/message"),
|
|
3712
|
+
params: z26.object({
|
|
3713
|
+
message: z26.unknown(),
|
|
3714
|
+
threadId: z26.string().optional(),
|
|
3715
|
+
parent_tool_use_id: z26.string().optional()
|
|
3703
3716
|
}).passthrough()
|
|
3704
3717
|
}).passthrough();
|
|
3705
|
-
var threadIdentityEnvelopeSchema =
|
|
3706
|
-
jsonrpc:
|
|
3707
|
-
method:
|
|
3708
|
-
params:
|
|
3709
|
-
threadId:
|
|
3710
|
-
providerThreadId:
|
|
3718
|
+
var threadIdentityEnvelopeSchema = z26.object({
|
|
3719
|
+
jsonrpc: z26.literal("2.0"),
|
|
3720
|
+
method: z26.literal("thread/identity"),
|
|
3721
|
+
params: z26.object({
|
|
3722
|
+
threadId: z26.string().optional(),
|
|
3723
|
+
providerThreadId: z26.string().optional()
|
|
3711
3724
|
}).passthrough()
|
|
3712
3725
|
}).passthrough();
|
|
3713
|
-
var threadContextWindowUsageEnvelopeSchema =
|
|
3714
|
-
jsonrpc:
|
|
3715
|
-
method:
|
|
3716
|
-
params:
|
|
3717
|
-
threadId:
|
|
3718
|
-
contextWindowUsage:
|
|
3719
|
-
usedTokens:
|
|
3720
|
-
modelContextWindow:
|
|
3721
|
-
estimated:
|
|
3726
|
+
var threadContextWindowUsageEnvelopeSchema = z26.object({
|
|
3727
|
+
jsonrpc: z26.literal("2.0"),
|
|
3728
|
+
method: z26.literal("thread/contextWindowUsage/updated"),
|
|
3729
|
+
params: z26.object({
|
|
3730
|
+
threadId: z26.string().optional(),
|
|
3731
|
+
contextWindowUsage: z26.object({
|
|
3732
|
+
usedTokens: z26.number().nullable(),
|
|
3733
|
+
modelContextWindow: z26.number().nullable(),
|
|
3734
|
+
estimated: z26.boolean()
|
|
3722
3735
|
})
|
|
3723
3736
|
}).passthrough()
|
|
3724
3737
|
}).passthrough();
|
|
3725
|
-
var errorEnvelopeSchema =
|
|
3726
|
-
jsonrpc:
|
|
3727
|
-
method:
|
|
3728
|
-
params:
|
|
3729
|
-
message:
|
|
3738
|
+
var errorEnvelopeSchema = z26.object({
|
|
3739
|
+
jsonrpc: z26.literal("2.0"),
|
|
3740
|
+
method: z26.literal("error"),
|
|
3741
|
+
params: z26.object({
|
|
3742
|
+
message: z26.string().optional()
|
|
3730
3743
|
}).passthrough().optional()
|
|
3731
3744
|
}).passthrough();
|
|
3732
3745
|
|
|
@@ -4037,6 +4050,97 @@ function whichCommandSync(command, options = {}) {
|
|
|
4037
4050
|
return void 0;
|
|
4038
4051
|
}
|
|
4039
4052
|
|
|
4053
|
+
// ../process-utils/src/node-network.ts
|
|
4054
|
+
var NODE_NETWORK_FLAGS = {
|
|
4055
|
+
"--use-system-ca": "NODE_USE_SYSTEM_CA",
|
|
4056
|
+
"--use-env-proxy": "NODE_USE_ENV_PROXY"
|
|
4057
|
+
};
|
|
4058
|
+
var ENV_PROXY_FLAG = "--use-env-proxy";
|
|
4059
|
+
var PROXY_KEYS = /* @__PURE__ */ new Set(["HTTP_PROXY", "HTTPS_PROXY"]);
|
|
4060
|
+
var NO_PROXY_KEY = "NO_PROXY";
|
|
4061
|
+
var LOOPBACK_HOSTS = ["localhost", "127.0.0.1", "::1", "[::1]"];
|
|
4062
|
+
function isNodeNetworkFlag(arg) {
|
|
4063
|
+
return Object.hasOwn(NODE_NETWORK_FLAGS, arg);
|
|
4064
|
+
}
|
|
4065
|
+
function isHttpProxyUrl(value) {
|
|
4066
|
+
if (/[\r\n]/u.test(value)) return false;
|
|
4067
|
+
try {
|
|
4068
|
+
const url = new URL(value);
|
|
4069
|
+
return (url.protocol === "http:" || url.protocol === "https:") && url.hostname !== "";
|
|
4070
|
+
} catch {
|
|
4071
|
+
return false;
|
|
4072
|
+
}
|
|
4073
|
+
}
|
|
4074
|
+
function proxyEntries(env) {
|
|
4075
|
+
return Object.entries(env).filter(
|
|
4076
|
+
(entry) => PROXY_KEYS.has(entry[0].toUpperCase()) && entry[1] !== void 0 && entry[1] !== ""
|
|
4077
|
+
);
|
|
4078
|
+
}
|
|
4079
|
+
function appendLoopback(value) {
|
|
4080
|
+
const entries = value.split(/[\s,]+/u).filter(Boolean);
|
|
4081
|
+
if (entries.includes("*")) return value;
|
|
4082
|
+
const present = new Set(entries.map((entry) => entry.toLowerCase()));
|
|
4083
|
+
return [
|
|
4084
|
+
...entries,
|
|
4085
|
+
...LOOPBACK_HOSTS.filter((host) => !present.has(host))
|
|
4086
|
+
].join(",");
|
|
4087
|
+
}
|
|
4088
|
+
function withLoopbackNoProxy(env) {
|
|
4089
|
+
const result = { ...env };
|
|
4090
|
+
const keys = Object.keys(result).filter(
|
|
4091
|
+
(key) => key.toUpperCase() === NO_PROXY_KEY && result[key] !== void 0
|
|
4092
|
+
);
|
|
4093
|
+
for (const key of keys.length > 0 ? keys : [NO_PROXY_KEY])
|
|
4094
|
+
result[key] = appendLoopback(result[key] ?? "");
|
|
4095
|
+
return result;
|
|
4096
|
+
}
|
|
4097
|
+
function nodeNetworkLaunch(nodeArgs, env) {
|
|
4098
|
+
const enabled = nodeArgs.filter(
|
|
4099
|
+
(arg) => !isNodeNetworkFlag(arg) || env[NODE_NETWORK_FLAGS[arg]] !== "0"
|
|
4100
|
+
);
|
|
4101
|
+
if (!enabled.includes(ENV_PROXY_FLAG))
|
|
4102
|
+
return { nodeArgs: enabled, env, rejectedProxyKeys: [] };
|
|
4103
|
+
const proxies = proxyEntries(env);
|
|
4104
|
+
const rejectedProxyKeys = proxies.filter(([, value]) => !isHttpProxyUrl(value)).map(([key]) => key);
|
|
4105
|
+
if (rejectedProxyKeys.length > 0)
|
|
4106
|
+
return {
|
|
4107
|
+
nodeArgs: enabled.filter((arg) => arg !== ENV_PROXY_FLAG),
|
|
4108
|
+
env,
|
|
4109
|
+
rejectedProxyKeys
|
|
4110
|
+
};
|
|
4111
|
+
return {
|
|
4112
|
+
nodeArgs: enabled,
|
|
4113
|
+
env: proxies.length > 0 ? withLoopbackNoProxy(env) : env,
|
|
4114
|
+
rejectedProxyKeys: []
|
|
4115
|
+
};
|
|
4116
|
+
}
|
|
4117
|
+
var warnedProxyKeys = /* @__PURE__ */ new Set();
|
|
4118
|
+
function prepareNodeNetworkLaunch(nodeArgs, env) {
|
|
4119
|
+
const launch = nodeNetworkLaunch(nodeArgs, env);
|
|
4120
|
+
const unwarned = launch.rejectedProxyKeys.filter(
|
|
4121
|
+
(key) => !warnedProxyKeys.has(key)
|
|
4122
|
+
);
|
|
4123
|
+
if (unwarned.length > 0) {
|
|
4124
|
+
for (const key of unwarned) warnedProxyKeys.add(key);
|
|
4125
|
+
process.emitWarning(
|
|
4126
|
+
`bb started a Node process without --use-env-proxy because ${unwarned.join(", ")} is not an http:// or https:// URL. Add the scheme, for example http://proxy.example:3128, so bb uses the proxy.`,
|
|
4127
|
+
{ code: "BB_INVALID_PROXY_ENV" }
|
|
4128
|
+
);
|
|
4129
|
+
}
|
|
4130
|
+
return { nodeArgs: launch.nodeArgs, env: launch.env };
|
|
4131
|
+
}
|
|
4132
|
+
function prepareNodeNetworkCommand(args, env) {
|
|
4133
|
+
const scriptIndex = args.findIndex(
|
|
4134
|
+
(arg) => arg === "--" || !arg.startsWith("-")
|
|
4135
|
+
);
|
|
4136
|
+
const optionCount = scriptIndex < 0 ? args.length : scriptIndex;
|
|
4137
|
+
const launch = prepareNodeNetworkLaunch(args.slice(0, optionCount), env);
|
|
4138
|
+
return {
|
|
4139
|
+
args: [...launch.nodeArgs, ...args.slice(optionCount)],
|
|
4140
|
+
env: launch.env
|
|
4141
|
+
};
|
|
4142
|
+
}
|
|
4143
|
+
|
|
4040
4144
|
// ../process-utils/src/host-toolchain.ts
|
|
4041
4145
|
var NETWORK_KEYS = [
|
|
4042
4146
|
"HTTP_PROXY",
|
|
@@ -4397,7 +4501,8 @@ var HostToolchain = class {
|
|
|
4397
4501
|
if (/(?:^|[\\/])(?:npm|npx)-cli\.js$/u.test(args[0] ?? "")) {
|
|
4398
4502
|
env.PATH = mergePath(dirname(file), env.PATH);
|
|
4399
4503
|
}
|
|
4400
|
-
|
|
4504
|
+
const network = prepareNodeNetworkCommand(args, env);
|
|
4505
|
+
return { command: file, args: network.args, env: network.env };
|
|
4401
4506
|
}
|
|
4402
4507
|
};
|
|
4403
4508
|
var toolchainKey = /* @__PURE__ */ Symbol.for("@bb/process-utils/host-toolchain");
|
|
@@ -11730,7 +11835,7 @@ function sanitizeInheritedChildProcessEnv(args) {
|
|
|
11730
11835
|
var import_compare = __toESM(require_compare(), 1);
|
|
11731
11836
|
var import_valid = __toESM(require_valid(), 1);
|
|
11732
11837
|
import path8 from "node:path";
|
|
11733
|
-
import { z as
|
|
11838
|
+
import { z as z27 } from "zod";
|
|
11734
11839
|
var CLI_PROBE_TIMEOUT_MS = 5e3;
|
|
11735
11840
|
var INSTALLATION_CHECK_TIMEOUT_MS = 15e3;
|
|
11736
11841
|
async function resolveExecutablePath(command) {
|
|
@@ -11807,8 +11912,8 @@ function firstLine(value) {
|
|
|
11807
11912
|
function npmGlobalPackageVersion(value, npmPackage) {
|
|
11808
11913
|
if (value === null) return null;
|
|
11809
11914
|
try {
|
|
11810
|
-
const parsed =
|
|
11811
|
-
dependencies:
|
|
11915
|
+
const parsed = z27.object({
|
|
11916
|
+
dependencies: z27.record(z27.string(), z27.object({ version: z27.string().min(1) })).default({})
|
|
11812
11917
|
}).safeParse(JSON.parse(value));
|
|
11813
11918
|
return parsed.success ? parsed.data.dependencies[npmPackage]?.version ?? null : null;
|
|
11814
11919
|
} catch {
|
|
@@ -11859,9 +11964,9 @@ function clampPercent(value) {
|
|
|
11859
11964
|
}
|
|
11860
11965
|
|
|
11861
11966
|
// ../provider-bridge-protocol/src/bridge-kit/provider-tool-call-contract.ts
|
|
11862
|
-
import { z as
|
|
11863
|
-
var providerToolCallCancellationSchema =
|
|
11864
|
-
requestId:
|
|
11967
|
+
import { z as z28 } from "zod";
|
|
11968
|
+
var providerToolCallCancellationSchema = z28.object({
|
|
11969
|
+
requestId: z28.union([z28.string(), z28.number().int()])
|
|
11865
11970
|
});
|
|
11866
11971
|
|
|
11867
11972
|
// ../provider-bridge-protocol/src/bridge-kit/provider-visibility.ts
|
|
@@ -11876,10 +11981,10 @@ function createProviderVisibilityMetadata(args) {
|
|
|
11876
11981
|
}
|
|
11877
11982
|
|
|
11878
11983
|
// ../provider-bridge-protocol/src/bridge-kit/runtime-json-rpc.ts
|
|
11879
|
-
import { z as
|
|
11984
|
+
import { z as z30 } from "zod";
|
|
11880
11985
|
|
|
11881
11986
|
// ../provider-bridge-protocol/src/errors.ts
|
|
11882
|
-
import { z as
|
|
11987
|
+
import { z as z29 } from "zod";
|
|
11883
11988
|
var BRIDGE_JSON_RPC_ERRORS = {
|
|
11884
11989
|
INVALID_PARAMS: -32602,
|
|
11885
11990
|
METHOD_NOT_FOUND: -32601,
|
|
@@ -11889,12 +11994,12 @@ var BRIDGE_JSON_RPC_ERRORS = {
|
|
|
11889
11994
|
FORK_CHECKPOINT_UNSUPPORTED: -32003,
|
|
11890
11995
|
MISSING_EXECUTABLE: -32004
|
|
11891
11996
|
};
|
|
11892
|
-
var providerRecoveryHintSchema =
|
|
11997
|
+
var providerRecoveryHintSchema = z29.object({
|
|
11893
11998
|
kind: providerRecoveryKindSchema,
|
|
11894
|
-
message:
|
|
11895
|
-
retryable:
|
|
11999
|
+
message: z29.string().min(1),
|
|
12000
|
+
retryable: z29.boolean()
|
|
11896
12001
|
});
|
|
11897
|
-
var bridgeErrorDataSchema =
|
|
12002
|
+
var bridgeErrorDataSchema = z29.object({ recovery: providerRecoveryHintSchema.optional() }).passthrough();
|
|
11898
12003
|
|
|
11899
12004
|
// ../provider-bridge-protocol/src/bridge-kit/runtime-json-rpc.ts
|
|
11900
12005
|
var JSON_RPC_INVALID_PARAMS_CODE = -32602;
|
|
@@ -11912,7 +12017,7 @@ var ProviderResponseEncodeError = class extends Error {
|
|
|
11912
12017
|
this.name = "ProviderResponseEncodeError";
|
|
11913
12018
|
}
|
|
11914
12019
|
};
|
|
11915
|
-
var ignoredJsonRpcResultSchema =
|
|
12020
|
+
var ignoredJsonRpcResultSchema = z30.unknown();
|
|
11916
12021
|
|
|
11917
12022
|
// ../provider-bridge-protocol/src/version.ts
|
|
11918
12023
|
var PROVIDER_BRIDGE_PROTOCOL_VERSION = 2;
|
|
@@ -11920,69 +12025,69 @@ var THREAD_DELTA_GRAMMAR_V2 = PROVIDER_BRIDGE_PROTOCOL_VERSION;
|
|
|
11920
12025
|
var THREAD_DELTA_GRAMMAR_V3 = 3;
|
|
11921
12026
|
|
|
11922
12027
|
// ../provider-bridge-protocol/src/handshake.ts
|
|
11923
|
-
import { z as
|
|
11924
|
-
var bridgeGrammarVersionsSchema =
|
|
12028
|
+
import { z as z31 } from "zod";
|
|
12029
|
+
var bridgeGrammarVersionsSchema = z31.tuple([z31.number().int().positive(), z31.number().int().positive()]).refine(([min, max]) => min <= max, {
|
|
11925
12030
|
message: "grammarVersions must be an ascending [min, max] range"
|
|
11926
12031
|
});
|
|
11927
|
-
var bridgeSteerModeSchema =
|
|
11928
|
-
var bridgeCapabilitiesSchema =
|
|
11929
|
-
sessionRestore:
|
|
11930
|
-
threadArchive:
|
|
11931
|
-
threadRename:
|
|
11932
|
-
threadGoalClear:
|
|
12032
|
+
var bridgeSteerModeSchema = z31.enum(["inject", "queue"]);
|
|
12033
|
+
var bridgeCapabilitiesSchema = z31.object({
|
|
12034
|
+
sessionRestore: z31.boolean().default(false),
|
|
12035
|
+
threadArchive: z31.boolean().default(false),
|
|
12036
|
+
threadRename: z31.boolean().default(false),
|
|
12037
|
+
threadGoalClear: z31.boolean().default(false),
|
|
11933
12038
|
fork: providerForkSchema.default("none"),
|
|
11934
|
-
approvalEnforcedBy:
|
|
12039
|
+
approvalEnforcedBy: z31.enum(["runtime", "provider"]).default("runtime"),
|
|
11935
12040
|
grammarVersions: bridgeGrammarVersionsSchema.default([
|
|
11936
12041
|
PROVIDER_BRIDGE_PROTOCOL_VERSION,
|
|
11937
12042
|
PROVIDER_BRIDGE_PROTOCOL_VERSION
|
|
11938
12043
|
]),
|
|
11939
12044
|
steerMode: bridgeSteerModeSchema.default("queue"),
|
|
11940
|
-
skills:
|
|
11941
|
-
commands:
|
|
12045
|
+
skills: z31.object({ configure: z31.boolean().default(false) }).default({ configure: false }),
|
|
12046
|
+
commands: z31.object({ list: z31.boolean().default(false) }).default({ list: false })
|
|
11942
12047
|
}).passthrough();
|
|
11943
|
-
var initializeParamsSchema =
|
|
11944
|
-
protocolVersion:
|
|
11945
|
-
client:
|
|
12048
|
+
var initializeParamsSchema = z31.object({
|
|
12049
|
+
protocolVersion: z31.number().int().positive(),
|
|
12050
|
+
client: z31.object({ name: z31.string().min(1), version: z31.string().min(1) }),
|
|
11946
12051
|
grammarVersions: bridgeGrammarVersionsSchema.default([
|
|
11947
12052
|
PROVIDER_BRIDGE_PROTOCOL_VERSION,
|
|
11948
12053
|
PROVIDER_BRIDGE_PROTOCOL_VERSION
|
|
11949
12054
|
])
|
|
11950
12055
|
}).passthrough();
|
|
11951
|
-
var initializeResultSchema =
|
|
11952
|
-
protocolVersion:
|
|
11953
|
-
capabilities:
|
|
12056
|
+
var initializeResultSchema = z31.object({
|
|
12057
|
+
protocolVersion: z31.number().int().positive(),
|
|
12058
|
+
capabilities: z31.preprocess(
|
|
11954
12059
|
(value) => value ?? {},
|
|
11955
12060
|
bridgeCapabilitiesSchema
|
|
11956
12061
|
)
|
|
11957
12062
|
}).passthrough();
|
|
11958
12063
|
|
|
11959
12064
|
// ../provider-bridge-protocol/src/execution-options.ts
|
|
11960
|
-
import { z as
|
|
11961
|
-
var bridgeExecutionOptionsSchema =
|
|
11962
|
-
model:
|
|
12065
|
+
import { z as z32 } from "zod";
|
|
12066
|
+
var bridgeExecutionOptionsSchema = z32.object({
|
|
12067
|
+
model: z32.string().min(1).optional(),
|
|
11963
12068
|
serviceTier: serviceTierSchema.optional(),
|
|
11964
12069
|
reasoningLevel: reasoningLevelSchema.optional(),
|
|
11965
12070
|
promptMode: promptModeSchema.optional(),
|
|
11966
12071
|
sessionOptions: sessionOptionSelectionsSchema.optional(),
|
|
11967
|
-
instructions:
|
|
11968
|
-
envVars:
|
|
11969
|
-
providerOptions:
|
|
12072
|
+
instructions: z32.string().optional(),
|
|
12073
|
+
envVars: z32.record(z32.string(), z32.string()).optional(),
|
|
12074
|
+
providerOptions: z32.record(z32.string(), z32.unknown()).optional()
|
|
11970
12075
|
}).and(runtimePermissionPolicySchema);
|
|
11971
12076
|
|
|
11972
12077
|
// ../provider-bridge-protocol/src/provider-maintenance.ts
|
|
11973
|
-
import { z as
|
|
11974
|
-
var providerMaintenanceParamsSchema =
|
|
11975
|
-
providerId:
|
|
11976
|
-
cwd:
|
|
11977
|
-
providerOptions:
|
|
12078
|
+
import { z as z33 } from "zod";
|
|
12079
|
+
var providerMaintenanceParamsSchema = z33.object({
|
|
12080
|
+
providerId: z33.string().min(1),
|
|
12081
|
+
cwd: z33.string().min(1).optional(),
|
|
12082
|
+
providerOptions: z33.record(z33.string(), z33.unknown()).optional()
|
|
11978
12083
|
}).passthrough();
|
|
11979
|
-
var providerInstallationRequirementSchema =
|
|
12084
|
+
var providerInstallationRequirementSchema = z33.enum(["thread_rewind"]);
|
|
11980
12085
|
var providerInstallationStatusParamsSchema = providerMaintenanceParamsSchema.extend({
|
|
11981
12086
|
requirement: providerInstallationRequirementSchema.optional(),
|
|
11982
|
-
checkUpdates:
|
|
12087
|
+
checkUpdates: z33.boolean().default(true)
|
|
11983
12088
|
});
|
|
11984
|
-
var providerHealthSchema =
|
|
11985
|
-
status:
|
|
12089
|
+
var providerHealthSchema = z33.object({
|
|
12090
|
+
status: z33.enum([
|
|
11986
12091
|
"ready",
|
|
11987
12092
|
"not_installed",
|
|
11988
12093
|
"unauthenticated",
|
|
@@ -11990,115 +12095,115 @@ var providerHealthSchema = z32.object({
|
|
|
11990
12095
|
"unsupported_version",
|
|
11991
12096
|
"unknown"
|
|
11992
12097
|
]),
|
|
11993
|
-
statusMessage:
|
|
11994
|
-
accountEmail:
|
|
11995
|
-
planLabel:
|
|
11996
|
-
installedVersion:
|
|
11997
|
-
minimumSupportedVersion:
|
|
11998
|
-
canInstall:
|
|
11999
|
-
canUpdate:
|
|
12000
|
-
loginCommand:
|
|
12001
|
-
localLoginCommand:
|
|
12098
|
+
statusMessage: z33.string().min(1).nullable(),
|
|
12099
|
+
accountEmail: z33.string().nullable(),
|
|
12100
|
+
planLabel: z33.string().min(1).nullable(),
|
|
12101
|
+
installedVersion: z33.string().min(1).nullable(),
|
|
12102
|
+
minimumSupportedVersion: z33.string().min(1).nullable(),
|
|
12103
|
+
canInstall: z33.boolean(),
|
|
12104
|
+
canUpdate: z33.boolean(),
|
|
12105
|
+
loginCommand: z33.string().min(1).nullable(),
|
|
12106
|
+
localLoginCommand: z33.string().min(1).nullable().optional()
|
|
12002
12107
|
}).passthrough();
|
|
12003
|
-
var providerUsageWindowSchema =
|
|
12004
|
-
label:
|
|
12005
|
-
usedPercent:
|
|
12006
|
-
resetsAt:
|
|
12007
|
-
cost:
|
|
12008
|
-
usedUsdCents:
|
|
12009
|
-
limitUsdCents:
|
|
12108
|
+
var providerUsageWindowSchema = z33.object({
|
|
12109
|
+
label: z33.string().min(1),
|
|
12110
|
+
usedPercent: z33.number().min(0).max(100),
|
|
12111
|
+
resetsAt: z33.string().min(1).nullable(),
|
|
12112
|
+
cost: z33.object({
|
|
12113
|
+
usedUsdCents: z33.number().int().nonnegative(),
|
|
12114
|
+
limitUsdCents: z33.number().int().positive()
|
|
12010
12115
|
}).optional()
|
|
12011
12116
|
}).passthrough();
|
|
12012
|
-
var providerUsageSchema =
|
|
12013
|
-
|
|
12014
|
-
status:
|
|
12015
|
-
accountEmail:
|
|
12016
|
-
planLabel:
|
|
12017
|
-
windows:
|
|
12117
|
+
var providerUsageSchema = z33.discriminatedUnion("status", [
|
|
12118
|
+
z33.object({
|
|
12119
|
+
status: z33.literal("ok"),
|
|
12120
|
+
accountEmail: z33.string().email().nullable(),
|
|
12121
|
+
planLabel: z33.string().min(1).nullable(),
|
|
12122
|
+
windows: z33.array(providerUsageWindowSchema)
|
|
12018
12123
|
}).passthrough(),
|
|
12019
|
-
|
|
12020
|
-
|
|
12021
|
-
|
|
12022
|
-
|
|
12023
|
-
status:
|
|
12024
|
-
message:
|
|
12025
|
-
planLabel:
|
|
12026
|
-
accountEmail:
|
|
12124
|
+
z33.object({ status: z33.literal("not_installed") }).passthrough(),
|
|
12125
|
+
z33.object({ status: z33.literal("unauthenticated") }).passthrough(),
|
|
12126
|
+
z33.object({ status: z33.literal("expired") }).passthrough(),
|
|
12127
|
+
z33.object({
|
|
12128
|
+
status: z33.literal("error"),
|
|
12129
|
+
message: z33.string().min(1),
|
|
12130
|
+
planLabel: z33.string().min(1).nullable().default(null),
|
|
12131
|
+
accountEmail: z33.string().nullable().default(null)
|
|
12027
12132
|
}).passthrough()
|
|
12028
12133
|
]);
|
|
12029
|
-
var providerHealthResultSchema =
|
|
12030
|
-
|
|
12031
|
-
|
|
12032
|
-
supported:
|
|
12134
|
+
var providerHealthResultSchema = z33.discriminatedUnion("supported", [
|
|
12135
|
+
z33.object({ supported: z33.literal(false) }).passthrough(),
|
|
12136
|
+
z33.object({
|
|
12137
|
+
supported: z33.literal(true),
|
|
12033
12138
|
health: providerHealthSchema
|
|
12034
12139
|
}).passthrough()
|
|
12035
12140
|
]);
|
|
12036
|
-
var providerUsageResultSchema =
|
|
12037
|
-
|
|
12038
|
-
|
|
12039
|
-
supported:
|
|
12141
|
+
var providerUsageResultSchema = z33.discriminatedUnion("supported", [
|
|
12142
|
+
z33.object({ supported: z33.literal(false) }).passthrough(),
|
|
12143
|
+
z33.object({
|
|
12144
|
+
supported: z33.literal(true),
|
|
12040
12145
|
usage: providerUsageSchema
|
|
12041
12146
|
}).passthrough()
|
|
12042
12147
|
]);
|
|
12043
|
-
var providerInstallationActionKindSchema =
|
|
12148
|
+
var providerInstallationActionKindSchema = z33.enum([
|
|
12044
12149
|
"install",
|
|
12045
12150
|
"update"
|
|
12046
12151
|
]);
|
|
12047
|
-
var providerInstallationActionSchema =
|
|
12152
|
+
var providerInstallationActionSchema = z33.object({
|
|
12048
12153
|
kind: providerInstallationActionKindSchema,
|
|
12049
|
-
label:
|
|
12050
|
-
command:
|
|
12154
|
+
label: z33.enum(["Install", "Update"]),
|
|
12155
|
+
command: z33.string().min(1)
|
|
12051
12156
|
}).passthrough();
|
|
12052
|
-
var providerInstallationSourceSchema =
|
|
12157
|
+
var providerInstallationSourceSchema = z33.enum([
|
|
12053
12158
|
"notInstalled",
|
|
12054
12159
|
"npmGlobal",
|
|
12055
12160
|
"external"
|
|
12056
12161
|
]);
|
|
12057
|
-
var providerInstallationStatusSchema =
|
|
12058
|
-
executableName:
|
|
12059
|
-
executablePath:
|
|
12060
|
-
installed:
|
|
12162
|
+
var providerInstallationStatusSchema = z33.object({
|
|
12163
|
+
executableName: z33.string().min(1),
|
|
12164
|
+
executablePath: z33.string().min(1).nullable(),
|
|
12165
|
+
installed: z33.boolean(),
|
|
12061
12166
|
installSource: providerInstallationSourceSchema,
|
|
12062
|
-
currentVersion:
|
|
12063
|
-
latestVersion:
|
|
12064
|
-
minimumSupportedVersion:
|
|
12065
|
-
npmPackageName:
|
|
12066
|
-
npmGlobalPackageVersion:
|
|
12167
|
+
currentVersion: z33.string().min(1).nullable(),
|
|
12168
|
+
latestVersion: z33.string().min(1).nullable(),
|
|
12169
|
+
minimumSupportedVersion: z33.string().min(1).nullable(),
|
|
12170
|
+
npmPackageName: z33.string().min(1).nullable(),
|
|
12171
|
+
npmGlobalPackageVersion: z33.string().min(1).nullable(),
|
|
12067
12172
|
installAction: providerInstallationActionSchema.nullable(),
|
|
12068
|
-
needsUpdate:
|
|
12069
|
-
versionUnsupported:
|
|
12173
|
+
needsUpdate: z33.boolean(),
|
|
12174
|
+
versionUnsupported: z33.boolean()
|
|
12070
12175
|
}).passthrough();
|
|
12071
12176
|
var providerInstallationRunParamsSchema = providerMaintenanceParamsSchema.extend({
|
|
12072
12177
|
action: providerInstallationActionKindSchema
|
|
12073
12178
|
});
|
|
12074
|
-
var providerInstallationCommandSchema =
|
|
12075
|
-
command:
|
|
12076
|
-
args:
|
|
12077
|
-
displayCommand:
|
|
12179
|
+
var providerInstallationCommandSchema = z33.object({
|
|
12180
|
+
command: z33.string().min(1),
|
|
12181
|
+
args: z33.array(z33.string()).max(64),
|
|
12182
|
+
displayCommand: z33.string().min(1)
|
|
12078
12183
|
}).passthrough();
|
|
12079
|
-
var providerInstallationVerificationSchema =
|
|
12184
|
+
var providerInstallationVerificationSchema = z33.discriminatedUnion(
|
|
12080
12185
|
"kind",
|
|
12081
12186
|
[
|
|
12082
|
-
|
|
12083
|
-
|
|
12084
|
-
kind:
|
|
12085
|
-
previousVersion:
|
|
12187
|
+
z33.object({ kind: z33.literal("installed") }).passthrough(),
|
|
12188
|
+
z33.object({
|
|
12189
|
+
kind: z33.literal("version_changed"),
|
|
12190
|
+
previousVersion: z33.string().min(1)
|
|
12086
12191
|
}).passthrough(),
|
|
12087
|
-
|
|
12088
|
-
kind:
|
|
12089
|
-
version:
|
|
12192
|
+
z33.object({
|
|
12193
|
+
kind: z33.literal("version_at_least"),
|
|
12194
|
+
version: z33.string().min(1)
|
|
12090
12195
|
}).passthrough()
|
|
12091
12196
|
]
|
|
12092
12197
|
);
|
|
12093
|
-
var providerInstallationRunResultSchema =
|
|
12198
|
+
var providerInstallationRunResultSchema = z33.discriminatedUnion(
|
|
12094
12199
|
"available",
|
|
12095
12200
|
[
|
|
12096
|
-
|
|
12097
|
-
available:
|
|
12098
|
-
message:
|
|
12201
|
+
z33.object({
|
|
12202
|
+
available: z33.literal(false),
|
|
12203
|
+
message: z33.string().min(1)
|
|
12099
12204
|
}).passthrough(),
|
|
12100
|
-
|
|
12101
|
-
available:
|
|
12205
|
+
z33.object({
|
|
12206
|
+
available: z33.literal(true),
|
|
12102
12207
|
command: providerInstallationCommandSchema,
|
|
12103
12208
|
verification: providerInstallationVerificationSchema
|
|
12104
12209
|
}).passthrough()
|
|
@@ -12106,7 +12211,7 @@ var providerInstallationRunResultSchema = z32.discriminatedUnion(
|
|
|
12106
12211
|
);
|
|
12107
12212
|
|
|
12108
12213
|
// ../provider-bridge-protocol/src/requests.ts
|
|
12109
|
-
import { z as
|
|
12214
|
+
import { z as z34 } from "zod";
|
|
12110
12215
|
var BRIDGE_REQUEST_METHODS = {
|
|
12111
12216
|
initialize: "initialize",
|
|
12112
12217
|
modelList: "model/list",
|
|
@@ -12129,83 +12234,84 @@ var BRIDGE_REQUEST_METHODS = {
|
|
|
12129
12234
|
skillsConfigure: "skills/configure"
|
|
12130
12235
|
};
|
|
12131
12236
|
var sessionConstructionFields = {
|
|
12132
|
-
threadId:
|
|
12133
|
-
cwd:
|
|
12237
|
+
threadId: z34.string().min(1),
|
|
12238
|
+
cwd: z34.string().min(1),
|
|
12134
12239
|
options: bridgeExecutionOptionsSchema,
|
|
12135
|
-
dynamicTools:
|
|
12136
|
-
disallowedTools:
|
|
12240
|
+
dynamicTools: z34.array(dynamicToolSchema).optional(),
|
|
12241
|
+
disallowedTools: z34.array(z34.string().min(1)).optional(),
|
|
12137
12242
|
instructionMode: instructionModeSchema
|
|
12138
12243
|
};
|
|
12139
|
-
var modelListParamsSchema =
|
|
12140
|
-
cwd:
|
|
12141
|
-
envVars:
|
|
12244
|
+
var modelListParamsSchema = z34.object({
|
|
12245
|
+
cwd: z34.string().min(1).optional(),
|
|
12246
|
+
envVars: z34.record(z34.string(), z34.string()).optional(),
|
|
12247
|
+
selectedModel: z34.string().min(1).optional()
|
|
12142
12248
|
}).passthrough();
|
|
12143
|
-
var commandListParamsSchema =
|
|
12249
|
+
var commandListParamsSchema = z34.object({ cwd: z34.string().min(1) }).passthrough();
|
|
12144
12250
|
var commandListResultSchema = threadProviderCommandsStateSchema;
|
|
12145
|
-
var threadStartParamsSchema =
|
|
12251
|
+
var threadStartParamsSchema = z34.object({
|
|
12146
12252
|
...sessionConstructionFields,
|
|
12147
|
-
input:
|
|
12253
|
+
input: z34.array(promptInputSchema).optional()
|
|
12148
12254
|
}).passthrough();
|
|
12149
|
-
var threadResumeParamsSchema =
|
|
12255
|
+
var threadResumeParamsSchema = z34.object({
|
|
12150
12256
|
...sessionConstructionFields,
|
|
12151
|
-
providerThreadId:
|
|
12257
|
+
providerThreadId: z34.string().min(1)
|
|
12152
12258
|
}).passthrough();
|
|
12153
|
-
var threadForkParamsSchema =
|
|
12259
|
+
var threadForkParamsSchema = z34.object({
|
|
12154
12260
|
...sessionConstructionFields,
|
|
12155
|
-
sourceProviderThreadId:
|
|
12156
|
-
sourceProviderCheckpointId:
|
|
12261
|
+
sourceProviderThreadId: z34.string().min(1),
|
|
12262
|
+
sourceProviderCheckpointId: z34.string().min(1).optional()
|
|
12157
12263
|
}).passthrough();
|
|
12158
|
-
var threadStopParamsSchema =
|
|
12159
|
-
threadId:
|
|
12160
|
-
providerThreadId:
|
|
12161
|
-
intent:
|
|
12162
|
-
activeTurnId:
|
|
12264
|
+
var threadStopParamsSchema = z34.object({
|
|
12265
|
+
threadId: z34.string().min(1),
|
|
12266
|
+
providerThreadId: z34.string().min(1),
|
|
12267
|
+
intent: z34.enum(["interrupt", "release"]),
|
|
12268
|
+
activeTurnId: z34.string().min(1).nullable()
|
|
12163
12269
|
}).passthrough();
|
|
12164
|
-
var threadRefParams =
|
|
12165
|
-
threadId:
|
|
12166
|
-
providerThreadId:
|
|
12270
|
+
var threadRefParams = z34.object({
|
|
12271
|
+
threadId: z34.string().min(1),
|
|
12272
|
+
providerThreadId: z34.string().min(1)
|
|
12167
12273
|
}).passthrough();
|
|
12168
12274
|
var threadDiscardParamsSchema = threadRefParams;
|
|
12169
12275
|
var threadArchiveParamsSchema = threadRefParams;
|
|
12170
12276
|
var threadUnarchiveParamsSchema = threadRefParams;
|
|
12171
12277
|
var threadGoalClearParamsSchema = threadRefParams;
|
|
12172
|
-
var threadNameSetParamsSchema =
|
|
12173
|
-
threadId:
|
|
12174
|
-
providerThreadId:
|
|
12175
|
-
title:
|
|
12278
|
+
var threadNameSetParamsSchema = z34.object({
|
|
12279
|
+
threadId: z34.string().min(1),
|
|
12280
|
+
providerThreadId: z34.string().min(1),
|
|
12281
|
+
title: z34.string().min(1)
|
|
12176
12282
|
}).passthrough();
|
|
12177
12283
|
var turnInputFields = {
|
|
12178
|
-
threadId:
|
|
12179
|
-
providerThreadId:
|
|
12180
|
-
input:
|
|
12284
|
+
threadId: z34.string().min(1),
|
|
12285
|
+
providerThreadId: z34.string().min(1),
|
|
12286
|
+
input: z34.array(promptInputSchema),
|
|
12181
12287
|
clientRequestId: clientTurnRequestIdSchema,
|
|
12182
12288
|
options: bridgeExecutionOptionsSchema
|
|
12183
12289
|
};
|
|
12184
|
-
var turnStartParamsSchema =
|
|
12185
|
-
var turnSteerParamsSchema =
|
|
12290
|
+
var turnStartParamsSchema = z34.object(turnInputFields).passthrough();
|
|
12291
|
+
var turnSteerParamsSchema = z34.object({
|
|
12186
12292
|
...turnInputFields,
|
|
12187
|
-
expectedTurnId:
|
|
12293
|
+
expectedTurnId: z34.string().min(1)
|
|
12188
12294
|
}).passthrough();
|
|
12189
|
-
var skillsConfigureRootSchema =
|
|
12190
|
-
id:
|
|
12191
|
-
path:
|
|
12192
|
-
skills:
|
|
12193
|
-
|
|
12194
|
-
name:
|
|
12195
|
-
description:
|
|
12295
|
+
var skillsConfigureRootSchema = z34.object({
|
|
12296
|
+
id: z34.string().min(1),
|
|
12297
|
+
path: z34.string().min(1),
|
|
12298
|
+
skills: z34.array(
|
|
12299
|
+
z34.object({
|
|
12300
|
+
name: z34.string().min(1),
|
|
12301
|
+
description: z34.string()
|
|
12196
12302
|
}).passthrough()
|
|
12197
12303
|
)
|
|
12198
12304
|
}).passthrough();
|
|
12199
|
-
var skillsConfigureParamsSchema =
|
|
12200
|
-
roots:
|
|
12305
|
+
var skillsConfigureParamsSchema = z34.object({
|
|
12306
|
+
roots: z34.array(skillsConfigureRootSchema)
|
|
12201
12307
|
}).passthrough();
|
|
12202
|
-
var threadIdentityResultSchema =
|
|
12203
|
-
providerThreadId:
|
|
12204
|
-
sessionRestorable:
|
|
12308
|
+
var threadIdentityResultSchema = z34.object({
|
|
12309
|
+
providerThreadId: z34.string().min(1),
|
|
12310
|
+
sessionRestorable: z34.boolean().optional()
|
|
12205
12311
|
}).passthrough();
|
|
12206
12312
|
|
|
12207
12313
|
// ../provider-bridge-protocol/src/notifications.ts
|
|
12208
|
-
import { z as
|
|
12314
|
+
import { z as z35 } from "zod";
|
|
12209
12315
|
var BRIDGE_NOTIFICATION_METHODS = {
|
|
12210
12316
|
threadIdentity: "thread/identity",
|
|
12211
12317
|
sessionReplaced: "session/replaced",
|
|
@@ -12213,143 +12319,143 @@ var BRIDGE_NOTIFICATION_METHODS = {
|
|
|
12213
12319
|
providerRecovery: "provider/recovery",
|
|
12214
12320
|
error: "error"
|
|
12215
12321
|
};
|
|
12216
|
-
var threadIdentityNotificationSchema =
|
|
12217
|
-
threadId:
|
|
12218
|
-
providerThreadId:
|
|
12219
|
-
sessionRestorable:
|
|
12322
|
+
var threadIdentityNotificationSchema = z35.object({
|
|
12323
|
+
threadId: z35.string().min(1),
|
|
12324
|
+
providerThreadId: z35.string().min(1),
|
|
12325
|
+
sessionRestorable: z35.boolean().optional()
|
|
12220
12326
|
}).passthrough();
|
|
12221
|
-
var sessionReplacedNotificationSchema =
|
|
12222
|
-
threadId:
|
|
12223
|
-
providerThreadId:
|
|
12224
|
-
reason:
|
|
12225
|
-
contextLost:
|
|
12226
|
-
showRuntimeNote:
|
|
12327
|
+
var sessionReplacedNotificationSchema = z35.object({
|
|
12328
|
+
threadId: z35.string().min(1),
|
|
12329
|
+
providerThreadId: z35.string().min(1).nullable(),
|
|
12330
|
+
reason: z35.string().min(1),
|
|
12331
|
+
contextLost: z35.boolean().default(false),
|
|
12332
|
+
showRuntimeNote: z35.boolean().default(false)
|
|
12227
12333
|
}).passthrough();
|
|
12228
|
-
var providerRecoveryNotificationSchema =
|
|
12229
|
-
threadId:
|
|
12334
|
+
var providerRecoveryNotificationSchema = z35.object({
|
|
12335
|
+
threadId: z35.string().min(1).optional(),
|
|
12230
12336
|
...providerRecoveryHintSchema.shape
|
|
12231
12337
|
}).passthrough();
|
|
12232
|
-
var errorNotificationSchema =
|
|
12233
|
-
threadId:
|
|
12234
|
-
providerThreadId:
|
|
12235
|
-
message:
|
|
12338
|
+
var errorNotificationSchema = z35.object({
|
|
12339
|
+
threadId: z35.string().min(1).optional(),
|
|
12340
|
+
providerThreadId: z35.string().min(1).optional(),
|
|
12341
|
+
message: z35.string().min(1)
|
|
12236
12342
|
}).passthrough();
|
|
12237
12343
|
|
|
12238
12344
|
// ../provider-bridge-protocol/src/thread-delta.ts
|
|
12239
|
-
import { z as
|
|
12345
|
+
import { z as z36 } from "zod";
|
|
12240
12346
|
var THREAD_DELTA_NOTIFICATION_METHOD = "thread/delta";
|
|
12241
12347
|
var deltaPresentationSchema = threadEventItemPresentationSchema;
|
|
12242
12348
|
var THREAD_DELTA_KEY_SEPARATOR = "";
|
|
12243
|
-
var deltaKeyPartSchema =
|
|
12349
|
+
var deltaKeyPartSchema = z36.string().min(1).refine((value) => !value.includes(THREAD_DELTA_KEY_SEPARATOR), {
|
|
12244
12350
|
message: "provider keys must not contain the internal key separator (\\u001f)"
|
|
12245
12351
|
});
|
|
12246
|
-
var deltaItemKeySchema =
|
|
12352
|
+
var deltaItemKeySchema = z36.object({
|
|
12247
12353
|
providerItemId: deltaKeyPartSchema.optional(),
|
|
12248
12354
|
channel: deltaKeyPartSchema.optional(),
|
|
12249
12355
|
parentRef: deltaKeyPartSchema.optional()
|
|
12250
12356
|
});
|
|
12251
12357
|
var providerTurnIdSchema = deltaKeyPartSchema;
|
|
12252
|
-
var deltaFileChangeSchema =
|
|
12253
|
-
path:
|
|
12254
|
-
kind:
|
|
12255
|
-
movePath:
|
|
12256
|
-
diff:
|
|
12257
|
-
oldText:
|
|
12258
|
-
newText:
|
|
12259
|
-
});
|
|
12260
|
-
var deltaBackgroundTaskShapeSchema =
|
|
12261
|
-
type:
|
|
12262
|
-
familyId:
|
|
12263
|
-
taskType:
|
|
12264
|
-
description:
|
|
12358
|
+
var deltaFileChangeSchema = z36.object({
|
|
12359
|
+
path: z36.string(),
|
|
12360
|
+
kind: z36.enum(["add", "update", "delete"]),
|
|
12361
|
+
movePath: z36.string().optional(),
|
|
12362
|
+
diff: z36.string().optional(),
|
|
12363
|
+
oldText: z36.string().optional(),
|
|
12364
|
+
newText: z36.string().optional()
|
|
12365
|
+
});
|
|
12366
|
+
var deltaBackgroundTaskShapeSchema = z36.object({
|
|
12367
|
+
type: z36.literal("backgroundTask"),
|
|
12368
|
+
familyId: z36.string().min(1),
|
|
12369
|
+
taskType: z36.string(),
|
|
12370
|
+
description: z36.string(),
|
|
12265
12371
|
status: threadEventItemStatusSchema,
|
|
12266
12372
|
taskStatus: backgroundTaskStatusSchema,
|
|
12267
|
-
skipTranscript:
|
|
12268
|
-
foreground:
|
|
12269
|
-
workflowName:
|
|
12373
|
+
skipTranscript: z36.boolean(),
|
|
12374
|
+
foreground: z36.boolean().optional(),
|
|
12375
|
+
workflowName: z36.string().optional(),
|
|
12270
12376
|
workflow: workflowProgressSnapshotSchema.optional(),
|
|
12271
12377
|
usage: backgroundTaskUsageSchema.optional(),
|
|
12272
|
-
summary:
|
|
12273
|
-
error:
|
|
12274
|
-
outputFile:
|
|
12378
|
+
summary: z36.string().optional(),
|
|
12379
|
+
error: z36.string().optional(),
|
|
12380
|
+
outputFile: z36.string().optional()
|
|
12275
12381
|
});
|
|
12276
|
-
var deltaFileReadShapeSchema =
|
|
12277
|
-
type:
|
|
12278
|
-
path:
|
|
12279
|
-
cmd:
|
|
12382
|
+
var deltaFileReadShapeSchema = z36.object({
|
|
12383
|
+
type: z36.literal("fileRead"),
|
|
12384
|
+
path: z36.string(),
|
|
12385
|
+
cmd: z36.string().optional()
|
|
12280
12386
|
});
|
|
12281
|
-
var deltaSearchShapeSchema =
|
|
12282
|
-
type:
|
|
12387
|
+
var deltaSearchShapeSchema = z36.object({
|
|
12388
|
+
type: z36.literal("search"),
|
|
12283
12389
|
mode: threadEventSearchModeSchema,
|
|
12284
|
-
query:
|
|
12285
|
-
path:
|
|
12286
|
-
cmd:
|
|
12390
|
+
query: z36.string(),
|
|
12391
|
+
path: z36.string().optional(),
|
|
12392
|
+
cmd: z36.string().optional()
|
|
12287
12393
|
});
|
|
12288
|
-
var deltaDelegationShapeSchema =
|
|
12289
|
-
type:
|
|
12394
|
+
var deltaDelegationShapeSchema = z36.object({
|
|
12395
|
+
type: z36.literal("delegation"),
|
|
12290
12396
|
childRef: deltaKeyPartSchema,
|
|
12291
|
-
label:
|
|
12292
|
-
background:
|
|
12293
|
-
summary:
|
|
12397
|
+
label: z36.string(),
|
|
12398
|
+
background: z36.boolean(),
|
|
12399
|
+
summary: z36.string().optional()
|
|
12294
12400
|
});
|
|
12295
|
-
var deltaPlanStepsShapeSchema =
|
|
12296
|
-
type:
|
|
12297
|
-
steps:
|
|
12298
|
-
explanation:
|
|
12401
|
+
var deltaPlanStepsShapeSchema = z36.object({
|
|
12402
|
+
type: z36.literal("planSteps"),
|
|
12403
|
+
steps: z36.array(threadEventPlanStepSchema),
|
|
12404
|
+
explanation: z36.string().optional()
|
|
12299
12405
|
});
|
|
12300
|
-
var deltaExtensionShapeSchema =
|
|
12301
|
-
type:
|
|
12406
|
+
var deltaExtensionShapeSchema = z36.object({
|
|
12407
|
+
type: z36.literal("extension"),
|
|
12302
12408
|
kind: extensionKindSchema,
|
|
12303
12409
|
payload: jsonValueSchema
|
|
12304
12410
|
});
|
|
12305
|
-
var deltaItemShapeSchema =
|
|
12306
|
-
|
|
12307
|
-
type:
|
|
12308
|
-
command:
|
|
12309
|
-
cwd:
|
|
12310
|
-
aggregatedOutput:
|
|
12311
|
-
exitCode:
|
|
12312
|
-
durationMs:
|
|
12411
|
+
var deltaItemShapeSchema = z36.discriminatedUnion("type", [
|
|
12412
|
+
z36.object({
|
|
12413
|
+
type: z36.literal("command"),
|
|
12414
|
+
command: z36.string(),
|
|
12415
|
+
cwd: z36.string(),
|
|
12416
|
+
aggregatedOutput: z36.string().optional(),
|
|
12417
|
+
exitCode: z36.number().optional(),
|
|
12418
|
+
durationMs: z36.number().optional()
|
|
12313
12419
|
}),
|
|
12314
|
-
|
|
12315
|
-
type:
|
|
12316
|
-
changes:
|
|
12420
|
+
z36.object({
|
|
12421
|
+
type: z36.literal("fileChange"),
|
|
12422
|
+
changes: z36.array(deltaFileChangeSchema)
|
|
12317
12423
|
}),
|
|
12318
|
-
|
|
12319
|
-
type:
|
|
12320
|
-
tool:
|
|
12321
|
-
server:
|
|
12322
|
-
args:
|
|
12323
|
-
result:
|
|
12324
|
-
error:
|
|
12325
|
-
durationMs:
|
|
12424
|
+
z36.object({
|
|
12425
|
+
type: z36.literal("tool"),
|
|
12426
|
+
tool: z36.string(),
|
|
12427
|
+
server: z36.string().optional(),
|
|
12428
|
+
args: z36.unknown().optional(),
|
|
12429
|
+
result: z36.unknown().optional(),
|
|
12430
|
+
error: z36.string().optional(),
|
|
12431
|
+
durationMs: z36.number().optional()
|
|
12326
12432
|
}),
|
|
12327
|
-
|
|
12328
|
-
|
|
12329
|
-
|
|
12330
|
-
type:
|
|
12331
|
-
summary:
|
|
12332
|
-
content:
|
|
12433
|
+
z36.object({ type: z36.literal("compaction") }),
|
|
12434
|
+
z36.object({ type: z36.literal("agentMessage"), text: z36.string() }),
|
|
12435
|
+
z36.object({
|
|
12436
|
+
type: z36.literal("reasoning"),
|
|
12437
|
+
summary: z36.array(z36.string()),
|
|
12438
|
+
content: z36.array(z36.string())
|
|
12333
12439
|
}),
|
|
12334
|
-
|
|
12335
|
-
|
|
12336
|
-
type:
|
|
12337
|
-
queries:
|
|
12440
|
+
z36.object({ type: z36.literal("plan"), text: z36.string() }),
|
|
12441
|
+
z36.object({
|
|
12442
|
+
type: z36.literal("webSearch"),
|
|
12443
|
+
queries: z36.array(z36.string()).min(1)
|
|
12338
12444
|
}),
|
|
12339
|
-
|
|
12340
|
-
type:
|
|
12341
|
-
url:
|
|
12342
|
-
prompt:
|
|
12343
|
-
pattern:
|
|
12445
|
+
z36.object({
|
|
12446
|
+
type: z36.literal("webFetch"),
|
|
12447
|
+
url: z36.string(),
|
|
12448
|
+
prompt: z36.string().nullable().optional(),
|
|
12449
|
+
pattern: z36.string().nullable()
|
|
12344
12450
|
}),
|
|
12345
|
-
|
|
12346
|
-
|
|
12347
|
-
type:
|
|
12348
|
-
prompt:
|
|
12349
|
-
path:
|
|
12350
|
-
result:
|
|
12351
|
-
error:
|
|
12352
|
-
transparentBackground:
|
|
12451
|
+
z36.object({ type: z36.literal("imageView"), path: z36.string() }),
|
|
12452
|
+
z36.object({
|
|
12453
|
+
type: z36.literal("imageGeneration"),
|
|
12454
|
+
prompt: z36.string().nullable(),
|
|
12455
|
+
path: z36.string().nullable(),
|
|
12456
|
+
result: z36.string().optional(),
|
|
12457
|
+
error: z36.string().nullable(),
|
|
12458
|
+
transparentBackground: z36.boolean()
|
|
12353
12459
|
}),
|
|
12354
12460
|
deltaBackgroundTaskShapeSchema,
|
|
12355
12461
|
deltaFileReadShapeSchema,
|
|
@@ -12358,22 +12464,22 @@ var deltaItemShapeSchema = z35.discriminatedUnion("type", [
|
|
|
12358
12464
|
deltaPlanStepsShapeSchema,
|
|
12359
12465
|
deltaExtensionShapeSchema
|
|
12360
12466
|
]);
|
|
12361
|
-
var deltaProgressSnapshotSchema =
|
|
12467
|
+
var deltaProgressSnapshotSchema = z36.discriminatedUnion("type", [
|
|
12362
12468
|
deltaBackgroundTaskShapeSchema,
|
|
12363
12469
|
deltaDelegationShapeSchema
|
|
12364
12470
|
]);
|
|
12365
|
-
var deltaTextChannelSchema =
|
|
12471
|
+
var deltaTextChannelSchema = z36.enum([
|
|
12366
12472
|
"agentMessage",
|
|
12367
12473
|
"reasoningSummary",
|
|
12368
12474
|
"reasoningText",
|
|
12369
12475
|
"plan"
|
|
12370
12476
|
]);
|
|
12371
|
-
var deltaOutputChannelSchema =
|
|
12372
|
-
var deltaErrorSchema =
|
|
12373
|
-
var deltaAttachSchema =
|
|
12374
|
-
var deltaNoTurnFallbackSchema =
|
|
12477
|
+
var deltaOutputChannelSchema = z36.enum(["command", "fileChange"]);
|
|
12478
|
+
var deltaErrorSchema = z36.object({ message: z36.string() });
|
|
12479
|
+
var deltaAttachSchema = z36.enum(["open", "currentOrLast"]);
|
|
12480
|
+
var deltaNoTurnFallbackSchema = z36.object({
|
|
12375
12481
|
raw: providerRawEventSchema,
|
|
12376
|
-
rawType:
|
|
12482
|
+
rawType: z36.string()
|
|
12377
12483
|
});
|
|
12378
12484
|
function requireExtensionPresentation(delta, ctx) {
|
|
12379
12485
|
if (delta.item.type === "extension" && delta.presentation === void 0) {
|
|
@@ -12384,36 +12490,36 @@ function requireExtensionPresentation(delta, ctx) {
|
|
|
12384
12490
|
});
|
|
12385
12491
|
}
|
|
12386
12492
|
}
|
|
12387
|
-
var threadDeltaSchema =
|
|
12388
|
-
|
|
12389
|
-
kind:
|
|
12493
|
+
var threadDeltaSchema = z36.discriminatedUnion("kind", [
|
|
12494
|
+
z36.object({
|
|
12495
|
+
kind: z36.literal("input.accepted"),
|
|
12390
12496
|
clientRequestId: clientTurnRequestIdSchema,
|
|
12391
12497
|
providerTurnId: providerTurnIdSchema.optional()
|
|
12392
12498
|
}),
|
|
12393
|
-
|
|
12394
|
-
kind:
|
|
12395
|
-
text:
|
|
12499
|
+
z36.object({
|
|
12500
|
+
kind: z36.literal("input.provider"),
|
|
12501
|
+
text: z36.string().min(1),
|
|
12396
12502
|
parentRef: deltaKeyPartSchema.optional()
|
|
12397
12503
|
}),
|
|
12398
|
-
|
|
12399
|
-
kind:
|
|
12504
|
+
z36.object({
|
|
12505
|
+
kind: z36.literal("turn.open"),
|
|
12400
12506
|
providerTurnId: providerTurnIdSchema.optional(),
|
|
12401
12507
|
parentRef: deltaKeyPartSchema.optional()
|
|
12402
12508
|
}),
|
|
12403
|
-
|
|
12404
|
-
kind:
|
|
12405
|
-
state:
|
|
12509
|
+
z36.object({
|
|
12510
|
+
kind: z36.literal("turn.mainRun"),
|
|
12511
|
+
state: z36.enum(["idle", "running"])
|
|
12406
12512
|
}),
|
|
12407
|
-
|
|
12408
|
-
kind:
|
|
12513
|
+
z36.object({
|
|
12514
|
+
kind: z36.literal("turn.boundary"),
|
|
12409
12515
|
status: threadEventTurnStatusSchema,
|
|
12410
12516
|
error: deltaErrorSchema.optional(),
|
|
12411
|
-
providerCheckpointId:
|
|
12412
|
-
claimIfIdle:
|
|
12517
|
+
providerCheckpointId: z36.string().min(1).optional(),
|
|
12518
|
+
claimIfIdle: z36.boolean().optional(),
|
|
12413
12519
|
providerTurnId: providerTurnIdSchema.optional()
|
|
12414
12520
|
}),
|
|
12415
|
-
|
|
12416
|
-
kind:
|
|
12521
|
+
z36.object({
|
|
12522
|
+
kind: z36.literal("item.open"),
|
|
12417
12523
|
key: deltaItemKeySchema,
|
|
12418
12524
|
item: deltaItemShapeSchema,
|
|
12419
12525
|
presentation: deltaPresentationSchema.optional(),
|
|
@@ -12421,153 +12527,153 @@ var threadDeltaSchema = z35.discriminatedUnion("kind", [
|
|
|
12421
12527
|
providerTurnId: providerTurnIdSchema.optional(),
|
|
12422
12528
|
noTurnFallback: deltaNoTurnFallbackSchema.optional()
|
|
12423
12529
|
}).superRefine(requireExtensionPresentation),
|
|
12424
|
-
|
|
12425
|
-
kind:
|
|
12530
|
+
z36.object({
|
|
12531
|
+
kind: z36.literal("item.close"),
|
|
12426
12532
|
key: deltaItemKeySchema,
|
|
12427
12533
|
status: threadEventItemStatusSchema,
|
|
12428
|
-
resultText:
|
|
12429
|
-
exitCode:
|
|
12430
|
-
aggregatedOutput:
|
|
12431
|
-
approvalStatus:
|
|
12534
|
+
resultText: z36.string().optional(),
|
|
12535
|
+
exitCode: z36.number().optional(),
|
|
12536
|
+
aggregatedOutput: z36.string().optional(),
|
|
12537
|
+
approvalStatus: z36.literal("denied").optional(),
|
|
12432
12538
|
item: deltaItemShapeSchema,
|
|
12433
12539
|
presentation: deltaPresentationSchema.optional(),
|
|
12434
12540
|
providerTurnId: providerTurnIdSchema.optional(),
|
|
12435
12541
|
noTurnFallback: deltaNoTurnFallbackSchema.optional()
|
|
12436
12542
|
}).superRefine(requireExtensionPresentation),
|
|
12437
|
-
|
|
12438
|
-
kind:
|
|
12543
|
+
z36.object({
|
|
12544
|
+
kind: z36.literal("item.progress"),
|
|
12439
12545
|
key: deltaItemKeySchema,
|
|
12440
|
-
message:
|
|
12546
|
+
message: z36.string().optional(),
|
|
12441
12547
|
snapshot: deltaProgressSnapshotSchema.optional(),
|
|
12442
|
-
flush:
|
|
12548
|
+
flush: z36.boolean().optional(),
|
|
12443
12549
|
providerTurnId: providerTurnIdSchema.optional(),
|
|
12444
12550
|
noTurnFallback: deltaNoTurnFallbackSchema.optional()
|
|
12445
12551
|
}),
|
|
12446
|
-
|
|
12447
|
-
kind:
|
|
12552
|
+
z36.object({
|
|
12553
|
+
kind: z36.literal("item.textDelta"),
|
|
12448
12554
|
key: deltaItemKeySchema,
|
|
12449
12555
|
channel: deltaTextChannelSchema,
|
|
12450
|
-
text:
|
|
12556
|
+
text: z36.string(),
|
|
12451
12557
|
providerTurnId: providerTurnIdSchema.optional(),
|
|
12452
12558
|
noTurnFallback: deltaNoTurnFallbackSchema.optional()
|
|
12453
12559
|
}),
|
|
12454
|
-
|
|
12455
|
-
kind:
|
|
12560
|
+
z36.object({
|
|
12561
|
+
kind: z36.literal("item.textClose"),
|
|
12456
12562
|
key: deltaItemKeySchema,
|
|
12457
12563
|
channel: deltaTextChannelSchema,
|
|
12458
|
-
text:
|
|
12564
|
+
text: z36.string().optional(),
|
|
12459
12565
|
providerTurnId: providerTurnIdSchema.optional(),
|
|
12460
12566
|
noTurnFallback: deltaNoTurnFallbackSchema.optional()
|
|
12461
12567
|
}),
|
|
12462
|
-
|
|
12463
|
-
kind:
|
|
12568
|
+
z36.object({
|
|
12569
|
+
kind: z36.literal("item.outputDelta"),
|
|
12464
12570
|
key: deltaItemKeySchema,
|
|
12465
12571
|
channel: deltaOutputChannelSchema,
|
|
12466
|
-
text:
|
|
12572
|
+
text: z36.string(),
|
|
12467
12573
|
providerTurnId: providerTurnIdSchema.optional(),
|
|
12468
12574
|
noTurnFallback: deltaNoTurnFallbackSchema.optional()
|
|
12469
12575
|
}),
|
|
12470
|
-
|
|
12471
|
-
kind:
|
|
12576
|
+
z36.object({
|
|
12577
|
+
kind: z36.literal("command.outputSnapshot"),
|
|
12472
12578
|
key: deltaItemKeySchema,
|
|
12473
|
-
text:
|
|
12579
|
+
text: z36.string(),
|
|
12474
12580
|
noTurnFallback: deltaNoTurnFallbackSchema.optional()
|
|
12475
12581
|
}),
|
|
12476
|
-
|
|
12477
|
-
kind:
|
|
12582
|
+
z36.object({
|
|
12583
|
+
kind: z36.literal("usage"),
|
|
12478
12584
|
total: threadEventTokenUsageBreakdownSchema,
|
|
12479
12585
|
last: threadEventTokenUsageBreakdownSchema,
|
|
12480
|
-
modelContextWindow:
|
|
12586
|
+
modelContextWindow: z36.number().nullable(),
|
|
12481
12587
|
promptCacheTtlMs: promptCacheTtlMsSchema.optional(),
|
|
12482
12588
|
providerTurnId: providerTurnIdSchema.optional()
|
|
12483
12589
|
}),
|
|
12484
|
-
|
|
12485
|
-
kind:
|
|
12590
|
+
z36.object({
|
|
12591
|
+
kind: z36.literal("contextWindow"),
|
|
12486
12592
|
snapshot: contextSnapshotSchema.optional(),
|
|
12487
|
-
used:
|
|
12488
|
-
size:
|
|
12489
|
-
estimated:
|
|
12593
|
+
used: z36.number().nullable(),
|
|
12594
|
+
size: z36.number().nullable().optional(),
|
|
12595
|
+
estimated: z36.boolean(),
|
|
12490
12596
|
cost: threadUsageCostSchema.optional(),
|
|
12491
12597
|
attach: deltaAttachSchema,
|
|
12492
12598
|
providerTurnId: providerTurnIdSchema.optional()
|
|
12493
12599
|
}),
|
|
12494
|
-
|
|
12495
|
-
kind:
|
|
12600
|
+
z36.object({
|
|
12601
|
+
kind: z36.literal("context.compacted"),
|
|
12496
12602
|
providerTurnId: providerTurnIdSchema.optional(),
|
|
12497
12603
|
noTurnFallback: deltaNoTurnFallbackSchema.optional()
|
|
12498
12604
|
}),
|
|
12499
|
-
|
|
12500
|
-
|
|
12501
|
-
kind:
|
|
12502
|
-
diff:
|
|
12605
|
+
z36.object({ kind: z36.literal("context.cleared") }),
|
|
12606
|
+
z36.object({
|
|
12607
|
+
kind: z36.literal("turn.diff"),
|
|
12608
|
+
diff: z36.string(),
|
|
12503
12609
|
providerTurnId: providerTurnIdSchema.optional()
|
|
12504
12610
|
}),
|
|
12505
|
-
|
|
12506
|
-
|
|
12507
|
-
kind:
|
|
12508
|
-
providerThreadId:
|
|
12611
|
+
z36.object({ kind: z36.literal("thread.started") }),
|
|
12612
|
+
z36.object({
|
|
12613
|
+
kind: z36.literal("thread.identity"),
|
|
12614
|
+
providerThreadId: z36.string().min(1)
|
|
12509
12615
|
}),
|
|
12510
|
-
|
|
12511
|
-
kind:
|
|
12512
|
-
name:
|
|
12513
|
-
source:
|
|
12616
|
+
z36.object({
|
|
12617
|
+
kind: z36.literal("thread.name"),
|
|
12618
|
+
name: z36.string().min(1),
|
|
12619
|
+
source: z36.literal("agent").optional()
|
|
12514
12620
|
}),
|
|
12515
|
-
|
|
12516
|
-
kind:
|
|
12621
|
+
z36.object({
|
|
12622
|
+
kind: z36.literal("extension.state"),
|
|
12517
12623
|
extensionKind: extensionKindSchema,
|
|
12518
12624
|
payload: jsonValueSchema
|
|
12519
12625
|
}),
|
|
12520
|
-
|
|
12521
|
-
kind:
|
|
12626
|
+
z36.object({
|
|
12627
|
+
kind: z36.literal("provider.rateLimits"),
|
|
12522
12628
|
rateLimits: providerRateLimitStateSchema
|
|
12523
12629
|
}),
|
|
12524
|
-
|
|
12525
|
-
kind:
|
|
12526
|
-
message:
|
|
12527
|
-
detail:
|
|
12528
|
-
willRetry:
|
|
12630
|
+
z36.object({
|
|
12631
|
+
kind: z36.literal("provider.error"),
|
|
12632
|
+
message: z36.string(),
|
|
12633
|
+
detail: z36.string().optional(),
|
|
12634
|
+
willRetry: z36.boolean().optional(),
|
|
12529
12635
|
category: providerErrorCategorySchema.optional(),
|
|
12530
12636
|
errorInfo: providerErrorInfoSchema.optional(),
|
|
12531
|
-
settlesTurn:
|
|
12637
|
+
settlesTurn: z36.boolean().optional(),
|
|
12532
12638
|
providerTurnId: providerTurnIdSchema.optional(),
|
|
12533
|
-
threadScoped:
|
|
12639
|
+
threadScoped: z36.boolean().optional()
|
|
12534
12640
|
}),
|
|
12535
|
-
|
|
12536
|
-
kind:
|
|
12537
|
-
originalModel:
|
|
12538
|
-
fallbackModel:
|
|
12539
|
-
reason:
|
|
12540
|
-
message:
|
|
12641
|
+
z36.object({
|
|
12642
|
+
kind: z36.literal("provider.modelFallback"),
|
|
12643
|
+
originalModel: z36.string().min(1),
|
|
12644
|
+
fallbackModel: z36.string().min(1),
|
|
12645
|
+
reason: z36.enum(["refusal", "provider"]),
|
|
12646
|
+
message: z36.string()
|
|
12541
12647
|
}),
|
|
12542
|
-
|
|
12543
|
-
kind:
|
|
12544
|
-
summary:
|
|
12545
|
-
details:
|
|
12648
|
+
z36.object({
|
|
12649
|
+
kind: z36.literal("provider.warning"),
|
|
12650
|
+
summary: z36.string().optional(),
|
|
12651
|
+
details: z36.string().optional(),
|
|
12546
12652
|
category: threadEventWarningCategorySchema.optional(),
|
|
12547
|
-
vouchedTurn:
|
|
12653
|
+
vouchedTurn: z36.boolean().optional()
|
|
12548
12654
|
}),
|
|
12549
|
-
|
|
12550
|
-
kind:
|
|
12655
|
+
z36.object({
|
|
12656
|
+
kind: z36.literal("unhandled"),
|
|
12551
12657
|
raw: providerRawEventSchema,
|
|
12552
|
-
rawType:
|
|
12553
|
-
vouchedTurn:
|
|
12554
|
-
onlyIfNoTurn:
|
|
12658
|
+
rawType: z36.string(),
|
|
12659
|
+
vouchedTurn: z36.boolean(),
|
|
12660
|
+
onlyIfNoTurn: z36.boolean().optional(),
|
|
12555
12661
|
parentRef: deltaKeyPartSchema.optional(),
|
|
12556
12662
|
providerTurnId: providerTurnIdSchema.optional()
|
|
12557
12663
|
}),
|
|
12558
|
-
|
|
12559
|
-
|
|
12664
|
+
z36.object({ kind: z36.literal("session.ended") }),
|
|
12665
|
+
z36.object({ kind: z36.literal("session.reset") })
|
|
12560
12666
|
]);
|
|
12561
|
-
var threadDeltaNotificationParamsSchema =
|
|
12562
|
-
threadId:
|
|
12563
|
-
deltas:
|
|
12667
|
+
var threadDeltaNotificationParamsSchema = z36.object({
|
|
12668
|
+
threadId: z36.string().min(1),
|
|
12669
|
+
deltas: z36.array(threadDeltaSchema)
|
|
12564
12670
|
}).passthrough();
|
|
12565
12671
|
|
|
12566
12672
|
// ../provider-bridge-acp/src/launch-spec.ts
|
|
12567
|
-
import { z as
|
|
12568
|
-
var acpNativeSkillRootsSchema =
|
|
12569
|
-
user:
|
|
12570
|
-
project:
|
|
12673
|
+
import { z as z37 } from "zod";
|
|
12674
|
+
var acpNativeSkillRootsSchema = z37.object({
|
|
12675
|
+
user: z37.array(providerNativeRootInputSchema).default([]),
|
|
12676
|
+
project: z37.array(providerNativeRootInputSchema).default([])
|
|
12571
12677
|
}).strict().superRefine((roots, context) => {
|
|
12572
12678
|
const normalized = providerNativeRootsSchema.safeParse(
|
|
12573
12679
|
normalizeProviderNativeRoots(roots)
|
|
@@ -12583,16 +12689,16 @@ var acpNativeSkillRootsSchema = z36.object({
|
|
|
12583
12689
|
});
|
|
12584
12690
|
}
|
|
12585
12691
|
});
|
|
12586
|
-
var acpLaunchSpecSchema =
|
|
12587
|
-
displayName:
|
|
12588
|
-
command:
|
|
12589
|
-
args:
|
|
12590
|
-
env:
|
|
12591
|
-
cwd:
|
|
12592
|
-
modelCli:
|
|
12593
|
-
listArgs:
|
|
12594
|
-
selectFlag:
|
|
12595
|
-
primaryModels:
|
|
12692
|
+
var acpLaunchSpecSchema = z37.object({
|
|
12693
|
+
displayName: z37.string().min(1),
|
|
12694
|
+
command: z37.string().min(1),
|
|
12695
|
+
args: z37.array(z37.string()),
|
|
12696
|
+
env: z37.record(z37.string().min(1), z37.string()),
|
|
12697
|
+
cwd: z37.string().min(1).optional(),
|
|
12698
|
+
modelCli: z37.object({
|
|
12699
|
+
listArgs: z37.array(z37.string()),
|
|
12700
|
+
selectFlag: z37.string().min(1).optional(),
|
|
12701
|
+
primaryModels: z37.array(z37.string())
|
|
12596
12702
|
}).strict().transform(
|
|
12597
12703
|
(modelCli) => modelCli.listArgs.length > 0 ? modelCli : void 0
|
|
12598
12704
|
).optional(),
|
|
@@ -12630,35 +12736,35 @@ function normalizeAcpLaunchSpec(spec) {
|
|
|
12630
12736
|
}
|
|
12631
12737
|
|
|
12632
12738
|
// src/claude-task-tools.ts
|
|
12633
|
-
import { z as
|
|
12634
|
-
var claudeTaskToolNameSchema =
|
|
12739
|
+
import { z as z38 } from "zod";
|
|
12740
|
+
var claudeTaskToolNameSchema = z38.enum([
|
|
12635
12741
|
"TaskCreate",
|
|
12636
12742
|
"TaskGet",
|
|
12637
12743
|
"TaskList",
|
|
12638
12744
|
"TaskUpdate"
|
|
12639
12745
|
]);
|
|
12640
|
-
var claudeTaskStatusSchema =
|
|
12641
|
-
var claudeTaskCreateOutputSchema =
|
|
12642
|
-
task:
|
|
12643
|
-
id:
|
|
12644
|
-
subject:
|
|
12746
|
+
var claudeTaskStatusSchema = z38.enum(["pending", "in_progress", "completed"]);
|
|
12747
|
+
var claudeTaskCreateOutputSchema = z38.object({
|
|
12748
|
+
task: z38.object({
|
|
12749
|
+
id: z38.string(),
|
|
12750
|
+
subject: z38.string()
|
|
12645
12751
|
}).passthrough()
|
|
12646
12752
|
}).passthrough();
|
|
12647
|
-
var claudeTaskGetOutputSchema =
|
|
12648
|
-
task:
|
|
12649
|
-
id:
|
|
12753
|
+
var claudeTaskGetOutputSchema = z38.object({
|
|
12754
|
+
task: z38.object({
|
|
12755
|
+
id: z38.string(),
|
|
12650
12756
|
status: claudeTaskStatusSchema,
|
|
12651
|
-
subject:
|
|
12757
|
+
subject: z38.string()
|
|
12652
12758
|
}).passthrough().nullable()
|
|
12653
12759
|
}).passthrough();
|
|
12654
|
-
var claudeTaskUpdateOutputSchema =
|
|
12655
|
-
success:
|
|
12656
|
-
taskId:
|
|
12760
|
+
var claudeTaskUpdateOutputSchema = z38.object({
|
|
12761
|
+
success: z38.boolean(),
|
|
12762
|
+
taskId: z38.string()
|
|
12657
12763
|
}).passthrough();
|
|
12658
|
-
var claudeTaskListOutputSchema =
|
|
12659
|
-
tasks:
|
|
12764
|
+
var claudeTaskListOutputSchema = z38.object({
|
|
12765
|
+
tasks: z38.array(z38.unknown())
|
|
12660
12766
|
}).passthrough();
|
|
12661
|
-
var claudeTaskToolOutputSchema =
|
|
12767
|
+
var claudeTaskToolOutputSchema = z38.union([
|
|
12662
12768
|
claudeTaskCreateOutputSchema,
|
|
12663
12769
|
claudeTaskGetOutputSchema,
|
|
12664
12770
|
claudeTaskListOutputSchema,
|