@get-bb/plugin-sdk 0.6.80 → 0.6.89
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 +26 -23
- package/bundled-types/bb-plugin-sdk-app.d.ts +1009 -896
- package/bundled-types/bb-plugin-sdk-internal-file-navigation-validation.d.ts +7 -0
- package/bundled-types/bb-plugin-sdk-process.d.ts +61 -0
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +40 -21
- package/bundled-types/bb-plugin-sdk-testing.d.ts +11 -0
- package/bundled-types/bb-plugin-sdk.d.ts +1006 -894
- package/dist/app.js +4 -0
- package/dist/host.js +557 -13
- package/dist/index.js +1 -1
- package/dist/internal/file-navigation-validation.js +14 -3
- package/dist/internal/host-policy.js +1 -1
- package/dist/internal/plugin-app-collector.js +11 -3
- package/dist/internal/rpc-query-host.js +333 -489
- package/dist/process.js +694 -0
- package/dist/provider-bridge-acp-next.js +724 -317
- package/dist/provider-bridge-acp.js +724 -317
- package/dist/provider-bridge-testing.js +677 -43
- package/dist/provider-bridge-worker-entry.mjs +534 -66
- package/dist/provider-bridge.js +604 -212
- package/dist/testing/app.js +563 -617
- package/dist/testing/index.js +126 -108
- package/package.json +7 -1
package/README.md
CHANGED
|
@@ -20,11 +20,15 @@ layout, run and submit state, writes, effects, and input locking. Selection is
|
|
|
20
20
|
reactive and is `null` for composers without pickers. Panels and pages that
|
|
21
21
|
write into a composer the user picks use `useComposers()`, one handle per
|
|
22
22
|
composer on screen.
|
|
23
|
-
Any mounted plugin component can
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
`
|
|
27
|
-
|
|
23
|
+
Any mounted plugin component can call `experimental_useAppPanel()` for the
|
|
24
|
+
side panel of the surface it renders in (a thread view, a plugin page, or the
|
|
25
|
+
New thread screen). `openTab({ tab, target?, params?, title? })` selects one of
|
|
26
|
+
the plugin's registered `experimental_tab` tabs; on the New thread screen a
|
|
27
|
+
thread-context action tab resolves against `experimental_newThreadPanelAction`
|
|
28
|
+
with the same id. `toggleTab(options)` closes the panel when that tab is
|
|
29
|
+
showing and otherwise opens it, and `close()` closes the panel. Commands,
|
|
30
|
+
thread actions, message actions and panel actions receive the same controller
|
|
31
|
+
as `experimental_panel`.
|
|
28
32
|
|
|
29
33
|
Use `UrlLink` for a real anchor that applies BB's current
|
|
30
34
|
in-app/external-browser preference on ordinary HTTP(S) activation, or
|
|
@@ -45,9 +49,13 @@ and ill-formed Unicode—have no active href and cannot record a preview in the
|
|
|
45
49
|
frontend harness. Buttons and menus can call
|
|
46
50
|
`experimental_openFilePreview({ target, location })` or
|
|
47
51
|
`experimental_openFileExternally({ target, location })`; both return whether
|
|
48
|
-
the current host accepted the intent.
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
the current host accepted the intent. The
|
|
53
|
+
`experimental_useCanOpenFileExternally(target)` hook reports whether the
|
|
54
|
+
external open can succeed now (false while loading) and re-renders the
|
|
55
|
+
component when that changes; use it to disable an Open externally control.
|
|
56
|
+
Targets never infer an ambient workspace.
|
|
57
|
+
The frontend harness records both methods and accepts `openFilePreview`,
|
|
58
|
+
`openFileExternally`, and `canOpenFileExternally` behavior options.
|
|
51
59
|
|
|
52
60
|
To show a terminal beside your UI, create it with `useSdk().terminals.create`
|
|
53
61
|
in the thread, environment, or host directory you want, then call
|
|
@@ -56,24 +64,19 @@ whether the current surface selected the terminal's tab; thread surfaces accept
|
|
|
56
64
|
only their own thread's terminals. The harness records the call and accepts an
|
|
57
65
|
`openTerminal` behavior option.
|
|
58
66
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
`experimental_useAppPanel().openFixedTab({ surface: { kind:
|
|
63
|
-
"current" }, tab, target })`, and read the in-memory state inside the tab with
|
|
64
|
-
`experimental_useFixedTabTarget(tab)`. The target survives tab, panel, and
|
|
67
|
+
Give a fixed tab (thread or nav-panel) an `experimental_target.validate` type
|
|
68
|
+
guard, call `experimental_useAppPanel().openTab({ tab, target })`, and read the
|
|
69
|
+
in-memory state inside the tab with `experimental_useFixedTabTarget(tab)`. The target survives tab, panel, and
|
|
65
70
|
route remounts for the current app session; call `clear()` when the tab returns
|
|
66
71
|
to its untargeted state. The host validates JSON before the owner's type guard,
|
|
67
72
|
persists only selection, and returns false for an unavailable tab or invalid
|
|
68
|
-
target. The frontend harness records
|
|
69
|
-
`
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
Every
|
|
73
|
-
`
|
|
74
|
-
|
|
75
|
-
accepted the open, false when it declined (non-JSON `params`, an unavailable
|
|
76
|
-
action id, or a surface with no side panel). A decline is a return value, never
|
|
73
|
+
target. The frontend harness records every controller call in
|
|
74
|
+
`experimental_panelCalls`, accepts an `experimental_panel` behavior, and can
|
|
75
|
+
seed `experimental_fixedTabTarget` state.
|
|
76
|
+
|
|
77
|
+
Every controller call reports the same way: `true` when the host accepted it,
|
|
78
|
+
`false` when it declined (non-JSON `target` or `params`, a tab the plugin did
|
|
79
|
+
not register for the surface, or a surface with no side panel). A decline is a return value, never
|
|
77
80
|
a thrown error, so a plugin registering several kinds of action can share one
|
|
78
81
|
open routine and branch on the result.
|
|
79
82
|
|