@get-bb/plugin-sdk 0.4.9 → 0.4.10
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/README.md +43 -2
- package/bundled-types/bb-plugin-sdk-app.d.ts +158 -27
- package/bundled-types/bb-plugin-sdk-internal-file-navigation-validation.d.ts +42 -0
- package/bundled-types/bb-plugin-sdk-internal-host-policy.d.ts +45 -8
- package/bundled-types/bb-plugin-sdk-provider-bridge.d.ts +294 -2
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +33 -2
- package/bundled-types/bb-plugin-sdk.d.ts +934 -340
- package/dist/app.js +8 -0
- package/dist/internal/file-navigation-validation.js +135 -0
- package/dist/internal/host-policy.js +104 -0
- package/dist/internal/plugin-app-collector.js +22 -1
- package/dist/provider-bridge.js +1122 -966
- package/dist/testing/app.js +325 -1
- package/dist/testing/index.js +103 -0
- package/package.json +7 -1
|
@@ -1195,10 +1195,39 @@ declare const jsonRpcErrorResponseSchema: z.ZodObject<{
|
|
|
1195
1195
|
}, z.core.$strip>;
|
|
1196
1196
|
type BridgeJsonRpcResponse = z.infer<typeof jsonRpcSuccessResponseSchema> | z.infer<typeof jsonRpcErrorResponseSchema>;
|
|
1197
1197
|
declare function decodeBridgeJsonRpcResponse(input: unknown): BridgeJsonRpcResponse | null;
|
|
1198
|
+
/** An image on a tool call result, split out of an `inputImage` data URL. */
|
|
1199
|
+
interface BridgeToolCallImage {
|
|
1200
|
+
data: string;
|
|
1201
|
+
mimeType: string;
|
|
1202
|
+
}
|
|
1203
|
+
/**
|
|
1204
|
+
* A tool result block in the one shape every consumer already accepts: MCP's
|
|
1205
|
+
* `CallToolResult.content` (claude-code and acp) and pi's `AgentToolResult.content`
|
|
1206
|
+
* declare the same two members with the same field names.
|
|
1207
|
+
*/
|
|
1208
|
+
type BridgeToolCallContent = {
|
|
1209
|
+
type: "text";
|
|
1210
|
+
text: string;
|
|
1211
|
+
} | {
|
|
1212
|
+
type: "image";
|
|
1213
|
+
data: string;
|
|
1214
|
+
mimeType: string;
|
|
1215
|
+
};
|
|
1198
1216
|
declare function decodeToolCallResponsePayload(result: unknown): {
|
|
1199
1217
|
content: string;
|
|
1218
|
+
contentBlocks: BridgeToolCallContent[];
|
|
1219
|
+
images: BridgeToolCallImage[];
|
|
1200
1220
|
isError: boolean;
|
|
1201
1221
|
};
|
|
1222
|
+
/**
|
|
1223
|
+
* Renders a decoded payload as tool result blocks, dropping empty text so an
|
|
1224
|
+
* image-only result carries the image alone.
|
|
1225
|
+
*/
|
|
1226
|
+
declare function buildBridgeToolCallContent(result: {
|
|
1227
|
+
content: string;
|
|
1228
|
+
contentBlocks?: BridgeToolCallContent[];
|
|
1229
|
+
images?: BridgeToolCallImage[];
|
|
1230
|
+
}): BridgeToolCallContent[];
|
|
1202
1231
|
|
|
1203
1232
|
/**
|
|
1204
1233
|
* Structural contracts shared by the runtime's generic adapter and the bridge
|
|
@@ -1296,6 +1325,10 @@ declare function mimeTypeFromExtension(filePath: string): string;
|
|
|
1296
1325
|
|
|
1297
1326
|
interface BridgeToolCallResult {
|
|
1298
1327
|
content: string;
|
|
1328
|
+
/** Ordered provider result blocks; absent on local transport failures. */
|
|
1329
|
+
contentBlocks?: BridgeToolCallContent[];
|
|
1330
|
+
/** Absent on the failure paths below, which have no image to report. */
|
|
1331
|
+
images?: BridgeToolCallImage[];
|
|
1299
1332
|
isError?: boolean;
|
|
1300
1333
|
}
|
|
1301
1334
|
interface ForwardBridgeToolCallArgs {
|
|
@@ -1564,6 +1597,261 @@ declare const bridgeExecutionOptionsSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
1564
1597
|
}, z.core.$strip>], "permissionMode">>;
|
|
1565
1598
|
type BridgeExecutionOptions = z.infer<typeof bridgeExecutionOptionsSchema>;
|
|
1566
1599
|
|
|
1600
|
+
/**
|
|
1601
|
+
* Sessionless provider maintenance query. `providerOptions` carries the same
|
|
1602
|
+
* provider-scoped statics as model/list (notably an ACP launch spec), while
|
|
1603
|
+
* `providerId` lets one bridge implementation serve several provider ids.
|
|
1604
|
+
*/
|
|
1605
|
+
declare const experimental_providerMaintenanceParamsSchema: z.ZodObject<{
|
|
1606
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
1607
|
+
providerId: z.ZodString;
|
|
1608
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1609
|
+
}, z.core.$loose>;
|
|
1610
|
+
type ExperimentalProviderMaintenanceParams = z.infer<typeof experimental_providerMaintenanceParamsSchema>;
|
|
1611
|
+
declare const experimental_providerInstallationRequirementSchema: z.ZodEnum<{
|
|
1612
|
+
thread_rewind: "thread_rewind";
|
|
1613
|
+
}>;
|
|
1614
|
+
type ExperimentalProviderInstallationRequirement = z.infer<typeof experimental_providerInstallationRequirementSchema>;
|
|
1615
|
+
declare const experimental_providerInstallationStatusParamsSchema: z.ZodObject<{
|
|
1616
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
1617
|
+
providerId: z.ZodString;
|
|
1618
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1619
|
+
requirement: z.ZodOptional<z.ZodEnum<{
|
|
1620
|
+
thread_rewind: "thread_rewind";
|
|
1621
|
+
}>>;
|
|
1622
|
+
}, z.core.$loose>;
|
|
1623
|
+
type ExperimentalProviderInstallationStatusParams = z.infer<typeof experimental_providerInstallationStatusParamsSchema>;
|
|
1624
|
+
/**
|
|
1625
|
+
* Cheap, host-local readiness reported by a provider implementation. Network
|
|
1626
|
+
* usage and update checks deliberately live outside this result so choosing a
|
|
1627
|
+
* provider for the composer never waits on them.
|
|
1628
|
+
*/
|
|
1629
|
+
declare const experimental_providerHealthSchema: z.ZodObject<{
|
|
1630
|
+
accountEmail: z.ZodNullable<z.ZodString>;
|
|
1631
|
+
canInstall: z.ZodBoolean;
|
|
1632
|
+
canUpdate: z.ZodBoolean;
|
|
1633
|
+
installedVersion: z.ZodNullable<z.ZodString>;
|
|
1634
|
+
loginCommand: z.ZodNullable<z.ZodString>;
|
|
1635
|
+
minimumSupportedVersion: z.ZodNullable<z.ZodString>;
|
|
1636
|
+
planLabel: z.ZodNullable<z.ZodString>;
|
|
1637
|
+
status: z.ZodEnum<{
|
|
1638
|
+
expired: "expired";
|
|
1639
|
+
not_installed: "not_installed";
|
|
1640
|
+
ready: "ready";
|
|
1641
|
+
unauthenticated: "unauthenticated";
|
|
1642
|
+
unknown: "unknown";
|
|
1643
|
+
unsupported_version: "unsupported_version";
|
|
1644
|
+
}>;
|
|
1645
|
+
statusMessage: z.ZodNullable<z.ZodString>;
|
|
1646
|
+
}, z.core.$loose>;
|
|
1647
|
+
type ExperimentalProviderHealth = z.infer<typeof experimental_providerHealthSchema>;
|
|
1648
|
+
/** One usage window reported by a provider subscription. */
|
|
1649
|
+
declare const experimental_providerUsageWindowSchema: z.ZodObject<{
|
|
1650
|
+
cost: z.ZodOptional<z.ZodObject<{
|
|
1651
|
+
limitUsdCents: z.ZodNumber;
|
|
1652
|
+
usedUsdCents: z.ZodNumber;
|
|
1653
|
+
}, z.core.$strip>>;
|
|
1654
|
+
label: z.ZodString;
|
|
1655
|
+
resetsAt: z.ZodNullable<z.ZodString>;
|
|
1656
|
+
usedPercent: z.ZodNumber;
|
|
1657
|
+
}, z.core.$loose>;
|
|
1658
|
+
type ExperimentalProviderUsageWindow = z.infer<typeof experimental_providerUsageWindowSchema>;
|
|
1659
|
+
/** Live usage for one provider, normalized by that provider's bridge. */
|
|
1660
|
+
declare const experimental_providerUsageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1661
|
+
accountEmail: z.ZodNullable<z.ZodString>;
|
|
1662
|
+
planLabel: z.ZodNullable<z.ZodString>;
|
|
1663
|
+
status: z.ZodLiteral<"ok">;
|
|
1664
|
+
windows: z.ZodArray<z.ZodObject<{
|
|
1665
|
+
cost: z.ZodOptional<z.ZodObject<{
|
|
1666
|
+
limitUsdCents: z.ZodNumber;
|
|
1667
|
+
usedUsdCents: z.ZodNumber;
|
|
1668
|
+
}, z.core.$strip>>;
|
|
1669
|
+
label: z.ZodString;
|
|
1670
|
+
resetsAt: z.ZodNullable<z.ZodString>;
|
|
1671
|
+
usedPercent: z.ZodNumber;
|
|
1672
|
+
}, z.core.$loose>>;
|
|
1673
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
1674
|
+
status: z.ZodLiteral<"not_installed">;
|
|
1675
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
1676
|
+
status: z.ZodLiteral<"unauthenticated">;
|
|
1677
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
1678
|
+
status: z.ZodLiteral<"expired">;
|
|
1679
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
1680
|
+
accountEmail: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1681
|
+
message: z.ZodString;
|
|
1682
|
+
planLabel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1683
|
+
status: z.ZodLiteral<"error">;
|
|
1684
|
+
}, z.core.$loose>], "status">;
|
|
1685
|
+
type ExperimentalProviderUsage = z.infer<typeof experimental_providerUsageSchema>;
|
|
1686
|
+
declare const experimental_providerHealthResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1687
|
+
supported: z.ZodLiteral<false>;
|
|
1688
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
1689
|
+
health: z.ZodObject<{
|
|
1690
|
+
accountEmail: z.ZodNullable<z.ZodString>;
|
|
1691
|
+
canInstall: z.ZodBoolean;
|
|
1692
|
+
canUpdate: z.ZodBoolean;
|
|
1693
|
+
installedVersion: z.ZodNullable<z.ZodString>;
|
|
1694
|
+
loginCommand: z.ZodNullable<z.ZodString>;
|
|
1695
|
+
minimumSupportedVersion: z.ZodNullable<z.ZodString>;
|
|
1696
|
+
planLabel: z.ZodNullable<z.ZodString>;
|
|
1697
|
+
status: z.ZodEnum<{
|
|
1698
|
+
expired: "expired";
|
|
1699
|
+
not_installed: "not_installed";
|
|
1700
|
+
ready: "ready";
|
|
1701
|
+
unauthenticated: "unauthenticated";
|
|
1702
|
+
unknown: "unknown";
|
|
1703
|
+
unsupported_version: "unsupported_version";
|
|
1704
|
+
}>;
|
|
1705
|
+
statusMessage: z.ZodNullable<z.ZodString>;
|
|
1706
|
+
}, z.core.$loose>;
|
|
1707
|
+
supported: z.ZodLiteral<true>;
|
|
1708
|
+
}, z.core.$loose>], "supported">;
|
|
1709
|
+
type ExperimentalProviderHealthResult = z.infer<typeof experimental_providerHealthResultSchema>;
|
|
1710
|
+
declare const experimental_providerUsageResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1711
|
+
supported: z.ZodLiteral<false>;
|
|
1712
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
1713
|
+
supported: z.ZodLiteral<true>;
|
|
1714
|
+
usage: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1715
|
+
accountEmail: z.ZodNullable<z.ZodString>;
|
|
1716
|
+
planLabel: z.ZodNullable<z.ZodString>;
|
|
1717
|
+
status: z.ZodLiteral<"ok">;
|
|
1718
|
+
windows: z.ZodArray<z.ZodObject<{
|
|
1719
|
+
cost: z.ZodOptional<z.ZodObject<{
|
|
1720
|
+
limitUsdCents: z.ZodNumber;
|
|
1721
|
+
usedUsdCents: z.ZodNumber;
|
|
1722
|
+
}, z.core.$strip>>;
|
|
1723
|
+
label: z.ZodString;
|
|
1724
|
+
resetsAt: z.ZodNullable<z.ZodString>;
|
|
1725
|
+
usedPercent: z.ZodNumber;
|
|
1726
|
+
}, z.core.$loose>>;
|
|
1727
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
1728
|
+
status: z.ZodLiteral<"not_installed">;
|
|
1729
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
1730
|
+
status: z.ZodLiteral<"unauthenticated">;
|
|
1731
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
1732
|
+
status: z.ZodLiteral<"expired">;
|
|
1733
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
1734
|
+
accountEmail: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1735
|
+
message: z.ZodString;
|
|
1736
|
+
planLabel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
1737
|
+
status: z.ZodLiteral<"error">;
|
|
1738
|
+
}, z.core.$loose>], "status">;
|
|
1739
|
+
}, z.core.$loose>], "supported">;
|
|
1740
|
+
type ExperimentalProviderUsageResult = z.infer<typeof experimental_providerUsageResultSchema>;
|
|
1741
|
+
declare const experimental_providerInstallationActionKindSchema: z.ZodEnum<{
|
|
1742
|
+
install: "install";
|
|
1743
|
+
update: "update";
|
|
1744
|
+
}>;
|
|
1745
|
+
type ExperimentalProviderInstallationActionKind = z.infer<typeof experimental_providerInstallationActionKindSchema>;
|
|
1746
|
+
/**
|
|
1747
|
+
* An installation action that a provider currently knows how to perform.
|
|
1748
|
+
* Only the display command crosses the product boundary; the executable plan
|
|
1749
|
+
* is resolved afresh by `provider/installation/run` on the host.
|
|
1750
|
+
*/
|
|
1751
|
+
declare const experimental_providerInstallationActionSchema: z.ZodObject<{
|
|
1752
|
+
command: z.ZodString;
|
|
1753
|
+
kind: z.ZodEnum<{
|
|
1754
|
+
install: "install";
|
|
1755
|
+
update: "update";
|
|
1756
|
+
}>;
|
|
1757
|
+
label: z.ZodEnum<{
|
|
1758
|
+
Install: "Install";
|
|
1759
|
+
Update: "Update";
|
|
1760
|
+
}>;
|
|
1761
|
+
}, z.core.$loose>;
|
|
1762
|
+
type ExperimentalProviderInstallationAction = z.infer<typeof experimental_providerInstallationActionSchema>;
|
|
1763
|
+
declare const experimental_providerInstallationSourceSchema: z.ZodEnum<{
|
|
1764
|
+
external: "external";
|
|
1765
|
+
notInstalled: "notInstalled";
|
|
1766
|
+
npmGlobal: "npmGlobal";
|
|
1767
|
+
}>;
|
|
1768
|
+
type ExperimentalProviderInstallationSource = z.infer<typeof experimental_providerInstallationSourceSchema>;
|
|
1769
|
+
/** Provider-owned installation and update state for one host. */
|
|
1770
|
+
declare const experimental_providerInstallationStatusSchema: z.ZodObject<{
|
|
1771
|
+
currentVersion: z.ZodNullable<z.ZodString>;
|
|
1772
|
+
executableName: z.ZodString;
|
|
1773
|
+
executablePath: z.ZodNullable<z.ZodString>;
|
|
1774
|
+
installAction: z.ZodNullable<z.ZodObject<{
|
|
1775
|
+
command: z.ZodString;
|
|
1776
|
+
kind: z.ZodEnum<{
|
|
1777
|
+
install: "install";
|
|
1778
|
+
update: "update";
|
|
1779
|
+
}>;
|
|
1780
|
+
label: z.ZodEnum<{
|
|
1781
|
+
Install: "Install";
|
|
1782
|
+
Update: "Update";
|
|
1783
|
+
}>;
|
|
1784
|
+
}, z.core.$loose>>;
|
|
1785
|
+
installSource: z.ZodEnum<{
|
|
1786
|
+
external: "external";
|
|
1787
|
+
notInstalled: "notInstalled";
|
|
1788
|
+
npmGlobal: "npmGlobal";
|
|
1789
|
+
}>;
|
|
1790
|
+
installed: z.ZodBoolean;
|
|
1791
|
+
latestVersion: z.ZodNullable<z.ZodString>;
|
|
1792
|
+
minimumSupportedVersion: z.ZodNullable<z.ZodString>;
|
|
1793
|
+
needsUpdate: z.ZodBoolean;
|
|
1794
|
+
npmGlobalPackageVersion: z.ZodNullable<z.ZodString>;
|
|
1795
|
+
npmPackageName: z.ZodNullable<z.ZodString>;
|
|
1796
|
+
versionUnsupported: z.ZodBoolean;
|
|
1797
|
+
}, z.core.$loose>;
|
|
1798
|
+
type ExperimentalProviderInstallationStatus = z.infer<typeof experimental_providerInstallationStatusSchema>;
|
|
1799
|
+
declare const experimental_providerInstallationRunParamsSchema: z.ZodObject<{
|
|
1800
|
+
action: z.ZodEnum<{
|
|
1801
|
+
install: "install";
|
|
1802
|
+
update: "update";
|
|
1803
|
+
}>;
|
|
1804
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
1805
|
+
providerId: z.ZodString;
|
|
1806
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1807
|
+
}, z.core.$loose>;
|
|
1808
|
+
type ExperimentalProviderInstallationRunParams = z.infer<typeof experimental_providerInstallationRunParamsSchema>;
|
|
1809
|
+
/**
|
|
1810
|
+
* A typed process plan. The provider chooses the executable and arguments;
|
|
1811
|
+
* the daemon chooses the environment and cwd and owns process supervision.
|
|
1812
|
+
*/
|
|
1813
|
+
declare const experimental_providerInstallationCommandSchema: z.ZodObject<{
|
|
1814
|
+
args: z.ZodArray<z.ZodString>;
|
|
1815
|
+
command: z.ZodString;
|
|
1816
|
+
displayCommand: z.ZodString;
|
|
1817
|
+
}, z.core.$loose>;
|
|
1818
|
+
type ExperimentalProviderInstallationCommand = z.infer<typeof experimental_providerInstallationCommandSchema>;
|
|
1819
|
+
declare const experimental_providerInstallationVerificationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1820
|
+
kind: z.ZodLiteral<"installed">;
|
|
1821
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
1822
|
+
kind: z.ZodLiteral<"version_changed">;
|
|
1823
|
+
previousVersion: z.ZodString;
|
|
1824
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
1825
|
+
kind: z.ZodLiteral<"version_at_least">;
|
|
1826
|
+
version: z.ZodString;
|
|
1827
|
+
}, z.core.$loose>], "kind">;
|
|
1828
|
+
type ExperimentalProviderInstallationVerification = z.infer<typeof experimental_providerInstallationVerificationSchema>;
|
|
1829
|
+
/**
|
|
1830
|
+
* `available: false` handles a stale action safely: status may have changed
|
|
1831
|
+
* between rendering a button and the daemon resolving the execution plan.
|
|
1832
|
+
*/
|
|
1833
|
+
declare const experimental_providerInstallationRunResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1834
|
+
available: z.ZodLiteral<false>;
|
|
1835
|
+
message: z.ZodString;
|
|
1836
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
1837
|
+
available: z.ZodLiteral<true>;
|
|
1838
|
+
command: z.ZodObject<{
|
|
1839
|
+
args: z.ZodArray<z.ZodString>;
|
|
1840
|
+
command: z.ZodString;
|
|
1841
|
+
displayCommand: z.ZodString;
|
|
1842
|
+
}, z.core.$loose>;
|
|
1843
|
+
verification: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1844
|
+
kind: z.ZodLiteral<"installed">;
|
|
1845
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
1846
|
+
kind: z.ZodLiteral<"version_changed">;
|
|
1847
|
+
previousVersion: z.ZodString;
|
|
1848
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
1849
|
+
kind: z.ZodLiteral<"version_at_least">;
|
|
1850
|
+
version: z.ZodString;
|
|
1851
|
+
}, z.core.$loose>], "kind">;
|
|
1852
|
+
}, z.core.$loose>], "available">;
|
|
1853
|
+
type ExperimentalProviderInstallationRunResult = z.infer<typeof experimental_providerInstallationRunResultSchema>;
|
|
1854
|
+
|
|
1567
1855
|
/**
|
|
1568
1856
|
* Canonical runtime → bridge request methods. One vocabulary for every
|
|
1569
1857
|
* provider: a bridge maps these to its provider's native dialect internally
|
|
@@ -1574,6 +1862,10 @@ type BridgeExecutionOptions = z.infer<typeof bridgeExecutionOptionsSchema>;
|
|
|
1574
1862
|
declare const BRIDGE_REQUEST_METHODS: {
|
|
1575
1863
|
readonly initialize: "initialize";
|
|
1576
1864
|
readonly modelList: "model/list";
|
|
1865
|
+
readonly experimentalProviderHealth: "provider/health";
|
|
1866
|
+
readonly experimentalProviderUsage: "provider/usage";
|
|
1867
|
+
readonly experimentalProviderInstallationStatus: "provider/installation/status";
|
|
1868
|
+
readonly experimentalProviderInstallationRun: "provider/installation/run";
|
|
1577
1869
|
readonly threadStart: "thread/start";
|
|
1578
1870
|
readonly threadResume: "thread/resume";
|
|
1579
1871
|
readonly threadFork: "thread/fork";
|
|
@@ -4038,5 +4330,5 @@ declare const hostDaemonAcpLaunchSpecSchema: z.ZodObject<{
|
|
|
4038
4330
|
type HostDaemonAcpLaunchSpec = z.infer<typeof hostDaemonAcpLaunchSpecSchema>;
|
|
4039
4331
|
declare function normalizeHostDaemonAcpLaunchSpec(spec: HostDaemonAcpLaunchSpec): HostDaemonAcpLaunchSpec;
|
|
4040
4332
|
|
|
4041
|
-
export { BRIDGE_INBOUND_REQUEST_METHODS, BRIDGE_JSON_RPC_ERRORS, BRIDGE_NOTIFICATION_METHODS, BRIDGE_REQUEST_METHODS, HIGH_REASONING_EFFORT, LOCAL_BASH_TASK_TYPE, LOCAL_WORKFLOW_TASK_TYPE, LOW_REASONING_EFFORT, MAX_REASONING_EFFORT, MEDIUM_REASONING_EFFORT, PROVIDER_BRIDGE_EXPORT_NAME, PROVIDER_BRIDGE_PROTOCOL_VERSION, ProviderRequestDecodeError, ProviderResponseEncodeError, THREAD_DELTA_NOTIFICATION_METHOD, ULTRACODE_REASONING_EFFORT, USER_QUESTION_MAX_OPTIONS, USER_QUESTION_MAX_QUESTIONS, XHIGH_REASONING_EFFORT, acpNativeReasoningSchema, acpPermissionCliSchema, acpReasoningCliSchema, backgroundTaskItemStatus, bashArgsSchema, bridgeRequestEnvelopeSchema, buildShellEnvOverrides, claudeTaskToolNameSchema, claudeTaskToolOutputSchema, createBridgeIo, createBridgeLineHandler, createPendingToolCallTracker, createProviderVisibilityMetadata, decodeBridgeJsonRpcResponse, decodeToolCallResponsePayload, deltaBackgroundTaskShapeSchema, deltaFileChangeSchema, deltaItemKeySchema, deltaItemShapeSchema, deltaMessageChannelSchema, deltaNoTurnFallbackSchema, deltaOutputChannelSchema, deltaTextChannelSchema, dynamicToolSchema, errorEnvelopeSchema, experimental_defineProviderBridge, extractResultText, getRawSdkMessage, getRecordProperty, getStringProperty, hostDaemonAcpLaunchSpecSchema, initializeParamsSchema, instructionModeValues, isApprovalPendingInteractionPayload, isApprovalPendingInteractionResolution, isBackgroundAgentTaskType, isRecord, isSettledBackgroundTaskStatus, isStandaloneBuiltinCompactCommand, isUserQuestionPendingInteractionPayload, isUserQuestionPendingInteractionResolution, jsonRpcEnvelopeSchema, jsonValueSchema, mimeTypeFromExtension, modelListParamsSchema, normalizeHostDaemonAcpLaunchSpec, normalizeProviderCommandOutput, pendingInteractionCommandActionSchema, pendingInteractionFileSystemPermissionsSchema, pendingInteractionMacOsPermissionsSchema, pendingInteractionNetworkPermissionsSchema, pendingInteractionRequestedPermissionProfileSchema, pendingInteractionResolutionSchema, permissionEscalationValues, providerRawEventSchema, reasoningEffortsForLevels, reasoningLevelSchema, reasoningLevelValues, removeCommandMentionsFromPromptInput, runBridgeRequest, runtimePermissionScopeValues, sanitizeInheritedChildProcessEnv, sdkMessageEnvelopeSchema, shouldAutoDenyInteractiveRequest, skillsConfigureParamsSchema, textBlockSchema, threadArchiveParamsSchema, threadContextWindowUsageEnvelopeSchema, threadDeltaNotificationParamsSchema, threadDeltaSchema, threadDiscardParamsSchema, threadForkParamsSchema, threadGoalClearParamsSchema, threadIdentityEnvelopeSchema, threadNameSetParamsSchema, threadResumeParamsSchema, threadStartParamsSchema, threadStopParamsSchema, threadUnarchiveParamsSchema, toNonNegativeNumber, toOptionalRecord, toOptionalString, toPositiveNumber, turnStartParamsSchema, turnSteerParamsSchema, withoutBridgeRuntimeEnv };
|
|
4042
|
-
export type { ApprovalPendingInteractionPayload, AvailableModel, BackgroundTaskStatus, BackgroundTaskUsage, BridgeExecutionOptions, BridgeJsonRpcResponse, BridgeToolCallRequest, BuildInteractiveResponseArgs, ClaudeTaskToolOutput, ClientTurnRequestId, DecodedInteractiveRequest, DeltaBackgroundTaskShape, DeltaFileChange, DeltaItemKey, DeltaItemShape, DeltaMessageChannel, DeltaNoTurnFallback, DeltaOutputChannel, DeltaTextChannel, DynamicTool, HostDaemonAcpLaunchSpec, InitializeResult, InstructionMode, JsonObject, JsonRpcMessage, JsonValue, ModelReasoningEffort, PendingInteractionApprovalDecision, PendingInteractionApprovalSubject, PendingInteractionCommandAction, PendingInteractionGrantablePermissionProfile, PendingInteractionGrantedPermissionProfile, PendingInteractionPayload, PendingInteractionRequestedPermissionProfile, PendingInteractionResolution, PendingInteractionUserQuestionQuestion, PermissionEscalation, PermissionMode, PreparedProviderCommandDispatch, PromptInput, ProviderBridgeContext, ProviderBridgeDefinition, ProviderBridgeEntry, ProviderErrorCategory, ProviderErrorInfo, ProviderInboundRequest, ProviderPostInitializeRequest, ProviderRateLimitState, ProviderRateLimitStatus, ProviderRateLimitWindow, ProviderRawEvent, ProviderRawEventCoverage, ProviderRawEventDescription, ProviderRuntimeEvent, ProviderVisibilityMetadata, ReasoningLevel, RuntimePermissionPolicy, RuntimePermissionScope, ServiceTier, ThreadDelta, ThreadDeltaKind, ThreadDeltaNotificationParams, ThreadEventContextWindowUsage, ThreadEventItemStatus, ThreadEventPlanStep, ThreadEventTokenUsageBreakdown, ThreadEventTurnStatus, ThreadEventUserContent, UserQuestionPendingInteractionPayload, UserQuestionPendingInteractionResolution, WorkflowAgentSnapshot, WorkflowAgentState, WorkflowPhaseSnapshot, WorkflowProgressSnapshot };
|
|
4333
|
+
export { BRIDGE_INBOUND_REQUEST_METHODS, BRIDGE_JSON_RPC_ERRORS, BRIDGE_NOTIFICATION_METHODS, BRIDGE_REQUEST_METHODS, HIGH_REASONING_EFFORT, LOCAL_BASH_TASK_TYPE, LOCAL_WORKFLOW_TASK_TYPE, LOW_REASONING_EFFORT, MAX_REASONING_EFFORT, MEDIUM_REASONING_EFFORT, PROVIDER_BRIDGE_EXPORT_NAME, PROVIDER_BRIDGE_PROTOCOL_VERSION, ProviderRequestDecodeError, ProviderResponseEncodeError, THREAD_DELTA_NOTIFICATION_METHOD, ULTRACODE_REASONING_EFFORT, USER_QUESTION_MAX_OPTIONS, USER_QUESTION_MAX_QUESTIONS, XHIGH_REASONING_EFFORT, acpNativeReasoningSchema, acpPermissionCliSchema, acpReasoningCliSchema, backgroundTaskItemStatus, bashArgsSchema, bridgeRequestEnvelopeSchema, buildShellEnvOverrides, claudeTaskToolNameSchema, claudeTaskToolOutputSchema, createBridgeIo, createBridgeLineHandler, createPendingToolCallTracker, createProviderVisibilityMetadata, decodeBridgeJsonRpcResponse, decodeToolCallResponsePayload, deltaBackgroundTaskShapeSchema, deltaFileChangeSchema, deltaItemKeySchema, deltaItemShapeSchema, deltaMessageChannelSchema, deltaNoTurnFallbackSchema, deltaOutputChannelSchema, deltaTextChannelSchema, dynamicToolSchema, errorEnvelopeSchema, buildBridgeToolCallContent as experimental_buildBridgeToolCallContent, experimental_defineProviderBridge, experimental_providerHealthResultSchema, experimental_providerHealthSchema, experimental_providerInstallationActionKindSchema, experimental_providerInstallationActionSchema, experimental_providerInstallationCommandSchema, experimental_providerInstallationRequirementSchema, experimental_providerInstallationRunParamsSchema, experimental_providerInstallationRunResultSchema, experimental_providerInstallationSourceSchema, experimental_providerInstallationStatusParamsSchema, experimental_providerInstallationStatusSchema, experimental_providerInstallationVerificationSchema, experimental_providerMaintenanceParamsSchema, experimental_providerUsageResultSchema, experimental_providerUsageSchema, experimental_providerUsageWindowSchema, extractResultText, getRawSdkMessage, getRecordProperty, getStringProperty, hostDaemonAcpLaunchSpecSchema, initializeParamsSchema, instructionModeValues, isApprovalPendingInteractionPayload, isApprovalPendingInteractionResolution, isBackgroundAgentTaskType, isRecord, isSettledBackgroundTaskStatus, isStandaloneBuiltinCompactCommand, isUserQuestionPendingInteractionPayload, isUserQuestionPendingInteractionResolution, jsonRpcEnvelopeSchema, jsonValueSchema, mimeTypeFromExtension, modelListParamsSchema, normalizeHostDaemonAcpLaunchSpec, normalizeProviderCommandOutput, pendingInteractionCommandActionSchema, pendingInteractionFileSystemPermissionsSchema, pendingInteractionMacOsPermissionsSchema, pendingInteractionNetworkPermissionsSchema, pendingInteractionRequestedPermissionProfileSchema, pendingInteractionResolutionSchema, permissionEscalationValues, providerRawEventSchema, reasoningEffortsForLevels, reasoningLevelSchema, reasoningLevelValues, removeCommandMentionsFromPromptInput, runBridgeRequest, runtimePermissionScopeValues, sanitizeInheritedChildProcessEnv, sdkMessageEnvelopeSchema, shouldAutoDenyInteractiveRequest, skillsConfigureParamsSchema, textBlockSchema, threadArchiveParamsSchema, threadContextWindowUsageEnvelopeSchema, threadDeltaNotificationParamsSchema, threadDeltaSchema, threadDiscardParamsSchema, threadForkParamsSchema, threadGoalClearParamsSchema, threadIdentityEnvelopeSchema, threadNameSetParamsSchema, threadResumeParamsSchema, threadStartParamsSchema, threadStopParamsSchema, threadUnarchiveParamsSchema, toNonNegativeNumber, toOptionalRecord, toOptionalString, toPositiveNumber, turnStartParamsSchema, turnSteerParamsSchema, withoutBridgeRuntimeEnv };
|
|
4334
|
+
export type { ApprovalPendingInteractionPayload, AvailableModel, BackgroundTaskStatus, BackgroundTaskUsage, BridgeExecutionOptions, BridgeJsonRpcResponse, BridgeToolCallRequest, BuildInteractiveResponseArgs, ClaudeTaskToolOutput, ClientTurnRequestId, DecodedInteractiveRequest, DeltaBackgroundTaskShape, DeltaFileChange, DeltaItemKey, DeltaItemShape, DeltaMessageChannel, DeltaNoTurnFallback, DeltaOutputChannel, DeltaTextChannel, DynamicTool, ExperimentalProviderHealth, ExperimentalProviderHealthResult, ExperimentalProviderInstallationAction, ExperimentalProviderInstallationActionKind, ExperimentalProviderInstallationCommand, ExperimentalProviderInstallationRequirement, ExperimentalProviderInstallationRunParams, ExperimentalProviderInstallationRunResult, ExperimentalProviderInstallationSource, ExperimentalProviderInstallationStatus, ExperimentalProviderInstallationStatusParams, ExperimentalProviderInstallationVerification, ExperimentalProviderMaintenanceParams, ExperimentalProviderUsage, ExperimentalProviderUsageResult, ExperimentalProviderUsageWindow, HostDaemonAcpLaunchSpec, InitializeResult, InstructionMode, JsonObject, JsonRpcMessage, JsonValue, ModelReasoningEffort, PendingInteractionApprovalDecision, PendingInteractionApprovalSubject, PendingInteractionCommandAction, PendingInteractionGrantablePermissionProfile, PendingInteractionGrantedPermissionProfile, PendingInteractionPayload, PendingInteractionRequestedPermissionProfile, PendingInteractionResolution, PendingInteractionUserQuestionQuestion, PermissionEscalation, PermissionMode, PreparedProviderCommandDispatch, PromptInput, ProviderBridgeContext, ProviderBridgeDefinition, ProviderBridgeEntry, ProviderErrorCategory, ProviderErrorInfo, ProviderInboundRequest, ProviderPostInitializeRequest, ProviderRateLimitState, ProviderRateLimitStatus, ProviderRateLimitWindow, ProviderRawEvent, ProviderRawEventCoverage, ProviderRawEventDescription, ProviderRuntimeEvent, ProviderVisibilityMetadata, ReasoningLevel, RuntimePermissionPolicy, RuntimePermissionScope, ServiceTier, ThreadDelta, ThreadDeltaKind, ThreadDeltaNotificationParams, ThreadEventContextWindowUsage, ThreadEventItemStatus, ThreadEventPlanStep, ThreadEventTokenUsageBreakdown, ThreadEventTurnStatus, ThreadEventUserContent, UserQuestionPendingInteractionPayload, UserQuestionPendingInteractionResolution, WorkflowAgentSnapshot, WorkflowAgentState, WorkflowPhaseSnapshot, WorkflowProgressSnapshot };
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { ReactNode, ComponentType } from 'react';
|
|
9
9
|
import { RenderResult } from '@testing-library/react';
|
|
10
|
-
import { PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, PluginNavPanelRegistration, PluginThreadPanelActionRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, PluginThreadListRegistration, PluginThreadHeaderActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, PluginMessageActionRegistration, PluginProviderIconRegistration, PluginContentScriptRegistration, PluginComposerScope, PluginComposerTextEffect, PluginComposerMention, PluginComposerThreadRowStatus, BbNavigate, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginRealtimeConnectionState, PluginSidebarThreadsState, PluginSidebarPullRequest, PluginSidebarThreadActions } from '@get-bb/plugin-sdk';
|
|
10
|
+
import { PluginHomepageSectionRegistration, PluginSettingsSectionRegistration, PluginNavPanelRegistration, PluginThreadPanelActionRegistration, PluginNewThreadPanelActionRegistration, ComposerCustomization, PluginPendingInteractionRegistration, PluginSidebarFooterActionRegistration, PluginThreadListRegistration, PluginThreadHeaderActionRegistration, PluginFileOpenerRegistration, PluginSourceCodeRendererRegistration, PluginDiffRendererRegistration, PluginMessageDirectiveRegistration, PluginMessageActionRegistration, PluginProviderIconRegistration, PluginContentScriptRegistration, PluginComposerScope, PluginComposerTextEffect, PluginComposerMention, PluginComposerThreadRowStatus, ExperimentalOpenFixedTabOptions, JsonValue, BbNavigate, ExperimentalFileOpenOptions, PluginAppDefinition, PluginRpcContract, StandardSchemaV1InferInput, PluginRpcResult, PluginRealtimeConnectionState, PluginSidebarThreadsState, PluginSidebarPullRequest, PluginSidebarThreadActions } from '@get-bb/plugin-sdk';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* `@get-bb/plugin-sdk/testing/app` — the frontend plugin test harness. Tests a
|
|
@@ -59,7 +59,22 @@ type NavigateCall = {
|
|
|
59
59
|
} | {
|
|
60
60
|
method: "openThreadPanel";
|
|
61
61
|
options: Parameters<BbNavigate["openThreadPanel"]>[0];
|
|
62
|
+
} | {
|
|
63
|
+
method: "experimental_openUrl";
|
|
64
|
+
url: string;
|
|
65
|
+
} | {
|
|
66
|
+
method: "experimental_openFilePreview";
|
|
67
|
+
options: ExperimentalFileOpenOptions;
|
|
68
|
+
} | {
|
|
69
|
+
method: "experimental_openFileExternally";
|
|
70
|
+
options: ExperimentalFileOpenOptions;
|
|
62
71
|
};
|
|
72
|
+
interface ExperimentalFixedTabOpenCall {
|
|
73
|
+
surface: ExperimentalOpenFixedTabOptions<JsonValue>["surface"];
|
|
74
|
+
panelId: string;
|
|
75
|
+
tabId: string;
|
|
76
|
+
target?: JsonValue;
|
|
77
|
+
}
|
|
63
78
|
interface ComposerLog {
|
|
64
79
|
/** Latest plain text in this isolated composer scope. */
|
|
65
80
|
readonly text: string;
|
|
@@ -193,6 +208,20 @@ interface RenderSlotOptions<Contract extends PluginRpcContract = PluginRpcContra
|
|
|
193
208
|
sidebarPullRequests?: Record<string, PluginSidebarPullRequest>;
|
|
194
209
|
/** Host acceptance for `useBbNavigate().openThreadPanel`. */
|
|
195
210
|
openThreadPanel?: (options: Parameters<BbNavigate["openThreadPanel"]>[0]) => boolean;
|
|
211
|
+
/** Host acceptance for URL intents from the hook or `experimental_UrlLink`. */
|
|
212
|
+
openUrl?: (url: string) => boolean;
|
|
213
|
+
/** Host acceptance for preview intents from the hook or file link. */
|
|
214
|
+
openFilePreview?: (options: ExperimentalFileOpenOptions) => boolean;
|
|
215
|
+
/** Host acceptance for preferred-external file intents. */
|
|
216
|
+
openFileExternally?: (options: ExperimentalFileOpenOptions) => boolean;
|
|
217
|
+
/** Host acceptance for an owner-scoped fixed-tab selection. */
|
|
218
|
+
experimental_openFixedTab?: (call: ExperimentalFixedTabOpenCall) => boolean;
|
|
219
|
+
/** Initial session target visible to `experimental_useFixedTabTarget`. */
|
|
220
|
+
experimental_fixedTabTarget?: {
|
|
221
|
+
panelId: string;
|
|
222
|
+
tabId: string;
|
|
223
|
+
target: JsonValue;
|
|
224
|
+
};
|
|
196
225
|
}
|
|
197
226
|
/** Host-originated inputs a slot test can drive deterministically. */
|
|
198
227
|
interface RenderedSlotBehaviorDrivers {
|
|
@@ -214,6 +243,8 @@ interface RenderedSlotInspectionState {
|
|
|
214
243
|
readonly rpcCalls: RpcCall[];
|
|
215
244
|
/** Every `useBbNavigate()` call, in order. */
|
|
216
245
|
readonly navigateCalls: NavigateCall[];
|
|
246
|
+
/** Every validated `experimental_useAppPanel().openFixedTab` call. */
|
|
247
|
+
readonly experimental_fixedTabOpenCalls: ExperimentalFixedTabOpenCall[];
|
|
217
248
|
/** Every `experimental_useSidebarThreadActions()` call, in order. */
|
|
218
249
|
readonly sidebarActionCalls: SidebarActionCall[];
|
|
219
250
|
/** Everything written through `useComposer()`. */
|
|
@@ -238,4 +269,4 @@ declare function renderSlot<Props extends object, Contract extends PluginRpcCont
|
|
|
238
269
|
}, props: Props, options?: RenderSlotOptions<Contract>): RenderedSlot;
|
|
239
270
|
|
|
240
271
|
export { installTestPluginRuntime, loadPluginApp, mountPluginContentScripts, renderSlot };
|
|
241
|
-
export type { CapturedPluginApp, ComposerLog, ContentScriptTestMountOptions, ContentScriptThreadRowStatusCall, MountedPluginContentScripts, NavigateCall, PluginAppSource, PluginRpcTestHandlers, RenderSlotOptions, RenderedSlot, RenderedSlotBehaviorDrivers, RenderedSlotInspectionState, RenderedSlotLifecycleControls, RpcCall, SidebarActionCall };
|
|
272
|
+
export type { CapturedPluginApp, ComposerLog, ContentScriptTestMountOptions, ContentScriptThreadRowStatusCall, ExperimentalFixedTabOpenCall, MountedPluginContentScripts, NavigateCall, PluginAppSource, PluginRpcTestHandlers, RenderSlotOptions, RenderedSlot, RenderedSlotBehaviorDrivers, RenderedSlotInspectionState, RenderedSlotLifecycleControls, RpcCall, SidebarActionCall };
|