@ignite-ember/extension-bridge 0.0.0-stage → 0.2.0
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/LICENSE +202 -0
- package/NOTICE +5 -0
- package/README.md +303 -2
- package/dist/bridge.d.ts +33 -0
- package/dist/bridge.d.ts.map +1 -0
- package/dist/bridge.js +92 -0
- package/dist/bridge.js.map +1 -0
- package/dist/channel.d.ts +26 -0
- package/dist/channel.d.ts.map +1 -0
- package/dist/channel.js +36 -0
- package/dist/channel.js.map +1 -0
- package/dist/contract.d.ts +110 -0
- package/dist/contract.d.ts.map +1 -0
- package/dist/contract.js +9 -0
- package/dist/contract.js.map +1 -0
- package/dist/correlator.d.ts +37 -0
- package/dist/correlator.d.ts.map +1 -0
- package/dist/correlator.js +67 -0
- package/dist/correlator.js.map +1 -0
- package/dist/guestBridge.d.ts +63 -0
- package/dist/guestBridge.d.ts.map +1 -0
- package/dist/guestBridge.js +156 -0
- package/dist/guestBridge.js.map +1 -0
- package/dist/hostModel.d.ts +155 -0
- package/dist/hostModel.d.ts.map +1 -0
- package/dist/hostModel.generated.d.ts +1870 -0
- package/dist/hostModel.generated.d.ts.map +1 -0
- package/dist/hostModel.generated.js +1241 -0
- package/dist/hostModel.generated.js.map +1 -0
- package/dist/hostModel.js +168 -0
- package/dist/hostModel.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/protocol.d.ts +338 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +135 -0
- package/dist/protocol.js.map +1 -0
- package/dist/service.d.ts +143 -0
- package/dist/service.d.ts.map +1 -0
- package/dist/service.js +179 -0
- package/dist/service.js.map +1 -0
- package/dist/signals.d.ts +21 -0
- package/dist/signals.d.ts.map +1 -0
- package/dist/signals.js +52 -0
- package/dist/signals.js.map +1 -0
- package/dist/tokens.d.ts +95 -0
- package/dist/tokens.d.ts.map +1 -0
- package/dist/tokens.js +158 -0
- package/dist/tokens.js.map +1 -0
- package/dist/watchers.d.ts +12 -0
- package/dist/watchers.d.ts.map +1 -0
- package/dist/watchers.js +18 -0
- package/dist/watchers.js.map +1 -0
- package/package.json +53 -4
- package/src/bridge.ts +112 -0
- package/src/channel.ts +48 -0
- package/src/contract.ts +130 -0
- package/src/correlator.ts +81 -0
- package/src/guestBridge.ts +261 -0
- package/src/hostModel.generated.ts +2649 -0
- package/src/hostModel.ts +209 -0
- package/src/index.ts +11 -0
- package/src/protocol.ts +475 -0
- package/src/service.ts +253 -0
- package/src/signals.ts +65 -0
- package/src/tokens.ts +165 -0
- package/src/watchers.ts +18 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/NOTICE
ADDED
package/README.md
CHANGED
|
@@ -1,3 +1,304 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@ignite-ember/extension-bridge`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Full documentation:** [ignite-ember.sh/docs/sdk/extension-bridge](https://ignite-ember.sh/docs/sdk/extension-bridge) — guides and the complete API reference, a page per topic.
|
|
4
|
+
|
|
5
|
+
The guest half of the bridge between an igni extension's page and igni:
|
|
6
|
+
`connect()`, RPC to the extension's tools, navigation, and the theme. The
|
|
7
|
+
host imports the same `protocol`, so there is one description of the wire.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { connect } from "@ignite-ember/extension-bridge";
|
|
11
|
+
|
|
12
|
+
const bridge = await connect(); // igni has said hello; the theme is applied
|
|
13
|
+
bridge.onParams((params) => render(params));
|
|
14
|
+
const found = await bridge.rpc("ext.example.teamnotes.search", { query: "" });
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Writing a page for the first time? [Your first extension](https://github.com/ignite-ember/igni-sdk/blob/main/docs/YOUR_FIRST_EXTENSION.md)
|
|
18
|
+
builds one end to end. A page needs no build step at all to start: it can
|
|
19
|
+
post the wire messages itself (`igni ext init` writes one that does);
|
|
20
|
+
this package is that, with types.
|
|
21
|
+
|
|
22
|
+
`connect()` resolves once igni has told the page which extension it is,
|
|
23
|
+
its launch params and the theme. Subpaths: `@ignite-ember/extension-bridge/protocol`
|
|
24
|
+
(the wire format) and `@ignite-ember/extension-bridge/tokens` (the design tokens).
|
|
25
|
+
|
|
26
|
+
## Quick start
|
|
27
|
+
|
|
28
|
+
A page is an ordinary web page that igni frames. It gets a bridge, and
|
|
29
|
+
the bridge is the only thing it needs from igni.
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install @ignite-ember/extension-bridge @ignite-ember/ui-css
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import { connect } from "@ignite-ember/extension-bridge";
|
|
37
|
+
import "@ignite-ember/ui-css";
|
|
38
|
+
|
|
39
|
+
async function main() {
|
|
40
|
+
const bridge = await connect();
|
|
41
|
+
|
|
42
|
+
// The theme is already applied: igni pushed its live values.
|
|
43
|
+
document.body.classList.add("igni-root");
|
|
44
|
+
|
|
45
|
+
// The launch parameters: what the link carried.
|
|
46
|
+
bridge.onParams((params) => {
|
|
47
|
+
document.title = String(params.title ?? "Extension");
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// The extension's own backend, as the person signed in to igni.
|
|
51
|
+
const notes = await bridge.rpc("ext.example.teamnotes.search", { query: "" });
|
|
52
|
+
|
|
53
|
+
render(notes);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
main().catch((error) => {
|
|
57
|
+
console.error(error);
|
|
58
|
+
});
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Three things to know before you write more:
|
|
62
|
+
|
|
63
|
+
- **Every call is a round trip.** `bridge.rpc()` is a request to the host
|
|
64
|
+
and back. It is fast, but it is not free, and it can time out.
|
|
65
|
+
- **Nothing here carries authority.** The host checks every grant. The
|
|
66
|
+
bridge is a message pipe with types on it, not a key.
|
|
67
|
+
- **The page runs on its own origin.** It may not read igni's stylesheet,
|
|
68
|
+
its storage or its scripts. What it may use is pushed over the bridge.
|
|
69
|
+
|
|
70
|
+
## The life of a page
|
|
71
|
+
|
|
72
|
+
Between the frame being created and the first paint, four things happen.
|
|
73
|
+
Knowing which is which saves an afternoon.
|
|
74
|
+
|
|
75
|
+
1. **The frame loads.** Your page is served from your own origin, under
|
|
76
|
+
`default-src 'self'`. It may not fetch igni's stylesheet, scripts or
|
|
77
|
+
fonts. The refusal is deliberate: a page that could read the app's
|
|
78
|
+
origin could read the app.
|
|
79
|
+
2. **igni says hello.** The host posts a `hello` message carrying a
|
|
80
|
+
nonce. `connect()` is waiting for exactly that message, from exactly
|
|
81
|
+
that parent window; a message from anywhere else is ignored.
|
|
82
|
+
3. **The theme arrives.** The host computes the *live* token values and
|
|
83
|
+
pushes them, and the bridge writes them onto `:root` before it
|
|
84
|
+
resolves. Your stylesheet's fallbacks are what a reader sees outside
|
|
85
|
+
igni; inside igni the live values apply.
|
|
86
|
+
4. **The params arrive.** `bridge.params` holds them, and `onParams`
|
|
87
|
+
fires when they change — a link resolved after the frame was already
|
|
88
|
+
mounted, say.
|
|
89
|
+
|
|
90
|
+
If the host never says hello, `connect()` rejects after thirty seconds;
|
|
91
|
+
`connect({ timeoutMs })` changes that. If the page is not framed at all —
|
|
92
|
+
opened in a browser tab — it rejects at once, saying that it is not
|
|
93
|
+
framed by a host.
|
|
94
|
+
|
|
95
|
+
## The host: `bridge.host`
|
|
96
|
+
|
|
97
|
+
`bridge.host` is igni as the page sees it — the **host object model**
|
|
98
|
+
(`docs/HOST_OBJECT_MODEL.md` in igni), the same model the extension's
|
|
99
|
+
process reaches as `ext.host`. Names are the schema's, as in Python.
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
const busy = await bridge.host.chat.processing.get(); // a property
|
|
103
|
+
await bridge.host.chat.post("Two issues in auth.py."); // a method
|
|
104
|
+
await bridge.host.ui.navigate("plugins"); // this page's window
|
|
105
|
+
const off = bridge.on(bridge.host.chat.run_completed, (run) => {
|
|
106
|
+
if (run.changed_files.length) render(run.changed_files);
|
|
107
|
+
});
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Every object needs its grant in the manifest's `permissions.host`; one
|
|
111
|
+
that is not granted rejects with a `HostError` whose `code` is
|
|
112
|
+
`not_granted`, and its signals never arrive. A page's `host.ui` is the
|
|
113
|
+
window it is framed in. The types (`Run`, `SessionChange`, …) are
|
|
114
|
+
exported from the package; `hostModel.generated.ts` is generated from
|
|
115
|
+
igni's host schema and `SCHEMA_VERSION` says which version.
|
|
116
|
+
|
|
117
|
+
A page observes; it cannot answer a hook. Being asked before something
|
|
118
|
+
happens (igni's hook events, `@ext.hook` in `igni-extension`) is the
|
|
119
|
+
extension's process's, because igni would otherwise wait on whatever tab
|
|
120
|
+
happens to be open.
|
|
121
|
+
|
|
122
|
+
## Its own service: `bridge.service`
|
|
123
|
+
|
|
124
|
+
The page talks to the service that shipped the extension directly, as
|
|
125
|
+
the signed-in person. igni fetches a ten-minute token for it — the same
|
|
126
|
+
exchange as the process's `ext.service`, audience that service and no
|
|
127
|
+
other — keeps it and renews it before it expires.
|
|
128
|
+
|
|
129
|
+
```ts
|
|
130
|
+
bridge.service.url; // null when it has none (below)
|
|
131
|
+
const res = await bridge.service.fetch("/v1/notes"); // Authorization: Bearer …
|
|
132
|
+
const socket = await bridge.service.websocket("/v1/rooms/a");
|
|
133
|
+
socket.addEventListener("message", (e) => render(JSON.parse(e.data)));
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
`url` is `null` when the extension has no service a page may reach, and
|
|
137
|
+
then `fetch` and `websocket` reject with `no_service`. An extension igni
|
|
138
|
+
distributed always has one: the service that shipped it. A development
|
|
139
|
+
install has one only when its manifest declares a `serviceUrl` setting
|
|
140
|
+
(`contributes.settings`) and it is set; a plain-`http` URL counts only for
|
|
141
|
+
this machine (`localhost`, `127.0.0.1`, `::1`) and only with
|
|
142
|
+
`IGNI_DEV_EXTENSIONS=1`, so a service on another host must be `https`.
|
|
143
|
+
|
|
144
|
+
`websocket` resolves once the socket is open and has sent
|
|
145
|
+
`{"type": "auth", "token": …}` as its first frame (a browser socket
|
|
146
|
+
cannot set a header); pass `{ authFrame: (token) => … }` for a service
|
|
147
|
+
that reads something else. `fetch` retries once with a new token after
|
|
148
|
+
a `401`. Both refuse a path on any other origin with a `ServiceError`
|
|
149
|
+
(`other_origin`): the token goes to the service only. No
|
|
150
|
+
`permissions.host` grant is needed. The frame's CSP admits the
|
|
151
|
+
service's origin over `https`/`wss` and the hosts declared in
|
|
152
|
+
`permissions.egress`, nothing else. `fetch` sends the token and never
|
|
153
|
+
cookies (`credentials: "omit"`); a service on igni-service answers it
|
|
154
|
+
cross-origin with nothing to configure (`igni.install(app)`).
|
|
155
|
+
|
|
156
|
+
## Calling your extension's tools
|
|
157
|
+
|
|
158
|
+
`bridge.rpc(method, args?, timeoutMs?)` calls a method of the
|
|
159
|
+
extension's own service — the same namespace the agent calls.
|
|
160
|
+
|
|
161
|
+
```ts
|
|
162
|
+
const found = await bridge.rpc("ext.example.teamnotes.search", { query: "auth" });
|
|
163
|
+
const one = await bridge.rpc<Note>("ext.example.teamnotes.get", { id: "n1" });
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
- **The name** is `ext.<your-extension-id>.<your-method>`. The namespace
|
|
167
|
+
is authorised against your manifest's `permissions.rpc`, and the call
|
|
168
|
+
reaches your service as an MCP tool call.
|
|
169
|
+
- **The arguments** are a plain record of strings and JSON values, sent
|
|
170
|
+
as they are.
|
|
171
|
+
- **The answer** is whatever the service returned, parsed as JSON. Give
|
|
172
|
+
the call its type — `rpc<Note>(...)` — and the compiler will hold you
|
|
173
|
+
to it; nothing checks it at runtime.
|
|
174
|
+
- **The deadline** is thirty seconds. `timeoutMs` overrides it. The host
|
|
175
|
+
has a timeout of its own, and the shorter of the two is the one that
|
|
176
|
+
fires.
|
|
177
|
+
|
|
178
|
+
A refusal is an error, not a value: the promise rejects with the host's
|
|
179
|
+
own sentence, or with "the host refused the call without saying why" if
|
|
180
|
+
it gave none. A method the service does not have, one the manifest does
|
|
181
|
+
not permit, and one the service answered with an error all reject the
|
|
182
|
+
same way.
|
|
183
|
+
|
|
184
|
+
## Following the host
|
|
185
|
+
|
|
186
|
+
A page watches; it does not poll. Three subscriptions, each returning an
|
|
187
|
+
unsubscribe:
|
|
188
|
+
|
|
189
|
+
```ts
|
|
190
|
+
const offParams = bridge.onParams((params) => render(params));
|
|
191
|
+
const offTheme = bridge.onTheme((theme) => setMode(theme));
|
|
192
|
+
const offRun = bridge.on(bridge.host.chat.run_completed, (run) => render(run));
|
|
193
|
+
|
|
194
|
+
offParams();
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
`onParams` fires only on a *change*; read `bridge.params` for the value
|
|
198
|
+
you were given to start with. `onTheme` fires when the person's theme
|
|
199
|
+
changes — the same change that moves the live token values. `on` follows
|
|
200
|
+
one of the host's signals.
|
|
201
|
+
|
|
202
|
+
`bridge.on(signal, fn, onRefused?)` takes a third argument, and it
|
|
203
|
+
matters: a signal whose object is **not granted** never arrives, and
|
|
204
|
+
without `onRefused` that refusal is silent — your handler simply never
|
|
205
|
+
runs, and there is nothing in the console to say why. With it, the
|
|
206
|
+
refusal arrives as a `HostError` you can show. Without it, it goes to
|
|
207
|
+
the console, so it is never *completely* silent.
|
|
208
|
+
|
|
209
|
+
The first handler of a signal subscribes to it; removing the last one
|
|
210
|
+
unsubscribes.
|
|
211
|
+
|
|
212
|
+
## Where the page is
|
|
213
|
+
|
|
214
|
+
`bridge.setLocation(state)` says where inside your extension the person
|
|
215
|
+
now is. It is not a navigation — `bridge.navigate(to)` is that — and it
|
|
216
|
+
is how an extension can be linked to or restored: the frame cannot write
|
|
217
|
+
the address bar, and its `localStorage` dies with the ephemeral port it
|
|
218
|
+
was served from. The host folds the state into its own URL and replays
|
|
219
|
+
it in the next `hello`.
|
|
220
|
+
|
|
221
|
+
Keep the state small and keep it strings: it ends up in the host's URL.
|
|
222
|
+
Call it when the person lands somewhere worth returning to, not on every
|
|
223
|
+
keystroke.
|
|
224
|
+
|
|
225
|
+
`bridge.close()` tells the host this surface is finished. `bridge.navigate(to)`
|
|
226
|
+
asks the host app to navigate; it decides whether to.
|
|
227
|
+
|
|
228
|
+
## The floor
|
|
229
|
+
|
|
230
|
+
Everything this package exports is under igni's **compatibility floor**:
|
|
231
|
+
removing a name, renaming it, or changing the meaning of one of its
|
|
232
|
+
members is a breaking change under `docs/EXTENSIBILITY.md` §8.
|
|
233
|
+
|
|
234
|
+
Two versions of that floor are worth knowing about:
|
|
235
|
+
|
|
236
|
+
- **`BRIDGE_VERSION`** (on the `protocol` subpath) is the version of the
|
|
237
|
+
wire this package speaks. Every message carries it, and a message
|
|
238
|
+
whose version is not the one this package speaks is not read at all —
|
|
239
|
+
it is bumped only for a change the other side cannot ignore.
|
|
240
|
+
- **`SCHEMA_VERSION`** (exported from the package) is the version of
|
|
241
|
+
igni's host schema the generated host model was made from. It moves
|
|
242
|
+
when igni's host model moves.
|
|
243
|
+
|
|
244
|
+
The host model itself is generated from igni's own schema, so a new igni
|
|
245
|
+
can carry objects this package has never heard of. That is not a
|
|
246
|
+
version skew to worry about: an object the package does not know is not
|
|
247
|
+
reachable from `bridge.host`, and the page simply does not use it.
|
|
248
|
+
|
|
249
|
+
## Changed since 0.1.0, on purpose
|
|
250
|
+
|
|
251
|
+
- `connect<P, S>()` and `Bridge<P, S>` take the extension's own launch
|
|
252
|
+
params and settings as type arguments. Without them, `params` and
|
|
253
|
+
`settings` are readonly records (`LaunchParams`, `ExtensionSettings`),
|
|
254
|
+
so writing into one no longer compiles; `rpc`'s args (`RpcArgs`) and
|
|
255
|
+
`setLocation`'s state (`LocationState`) are readonly too. The four
|
|
256
|
+
types are new on the `protocol` subpath, and the wire messages use them.
|
|
257
|
+
- `bridge.on(signal, fn, onRefused?)`: a refused or unanswered
|
|
258
|
+
subscription goes to `onRefused` (a `HostError`), or to the console
|
|
259
|
+
(`igni bridge: subscribing to <signal> failed: …`) when there is none.
|
|
260
|
+
In 0.1.0 it was dropped without a word. A refused unsubscribe is said
|
|
261
|
+
on the console only (`igni bridge: unsubscribing from <signal> failed: …`).
|
|
262
|
+
|
|
263
|
+
## Installing
|
|
264
|
+
|
|
265
|
+
> **Until it is on npm: install it from a checkout.** The package is not
|
|
266
|
+
> published yet, so `npm install @ignite-ember/extension-bridge` finds
|
|
267
|
+
> nothing. Pack it from an igni-sdk checkout and install the tarball:
|
|
268
|
+
>
|
|
269
|
+
> ```bash
|
|
270
|
+
> git clone https://github.com/ignite-ember/igni-sdk.git
|
|
271
|
+
> npm pack --pack-destination ./sdk-packages ./igni-sdk/packages/extension-bridge
|
|
272
|
+
> npm install ./sdk-packages/ignite-ember-extension-bridge-0.2.0.tgz
|
|
273
|
+
> ```
|
|
274
|
+
>
|
|
275
|
+
> (`mkdir sdk-packages` first.) It ships TypeScript source and a compiled
|
|
276
|
+
> build beside it (*The source, and a build beside it*, below), so the
|
|
277
|
+
> tarball is all there is.
|
|
278
|
+
|
|
279
|
+
Once published, from npm:
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
npm install @ignite-ember/extension-bridge
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
Each release's tarballs are also attached to igni-sdk's GitHub release
|
|
286
|
+
(`sdk-v<version>`), for a build that cannot reach npmjs. Versions are in
|
|
287
|
+
igni-sdk's `docs/PUBLISHING_THE_SDKS.md`.
|
|
288
|
+
|
|
289
|
+
## The source, and a build beside it
|
|
290
|
+
|
|
291
|
+
This package ships its TypeScript source, and a compiled build beside it.
|
|
292
|
+
|
|
293
|
+
A bundler that compiles TypeScript (Vite, esbuild, Rollup with a TS
|
|
294
|
+
plugin) takes the source and compiles it as it compiles the rest of
|
|
295
|
+
your extension. A consumer that does not compile `node_modules` — Node
|
|
296
|
+
itself, a test runner that is not told to transform it, a tool that
|
|
297
|
+
reads the types — takes the build: plain JavaScript, and the
|
|
298
|
+
declarations that go with it.
|
|
299
|
+
|
|
300
|
+
The build is ES2022 modules, with source maps back to the TypeScript.
|
|
301
|
+
`exports` points at it for `node`, and the `types` condition points at
|
|
302
|
+
its declarations for everyone, so `import { connect } from
|
|
303
|
+
"@ignite-ember/extension-bridge"` names the same things in a bundler
|
|
304
|
+
and in Node, and `tsc` finds them under `moduleResolution: node16`.
|
package/dist/bridge.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The guest half: what an extension's page imports to reach igni.
|
|
3
|
+
*
|
|
4
|
+
* This is the file that becomes a published package. Nothing in it
|
|
5
|
+
* imports from the rest of the app, and nothing in it is trusted by
|
|
6
|
+
* the host — every check is on the other side. What it owes an
|
|
7
|
+
* extension author is an object that behaves like the client they
|
|
8
|
+
* would have had if their panel were part of the app, so that porting
|
|
9
|
+
* one is not a rewrite.
|
|
10
|
+
*
|
|
11
|
+
* The shape it presents is `rpc(method, args, timeoutMs)`, which is
|
|
12
|
+
* the whole surface the first panel ported behind it used. Everything else here —
|
|
13
|
+
* navigate, close, theme, params — is what a panel needed from the
|
|
14
|
+
* app around it and used to get by being inside it.
|
|
15
|
+
*/
|
|
16
|
+
import type { Bridge } from "./contract.js";
|
|
17
|
+
import { type ExtensionSettings, type LaunchParams } from "./protocol.js";
|
|
18
|
+
/**
|
|
19
|
+
* Wait for the host's `hello`, then hand back the bridge.
|
|
20
|
+
*
|
|
21
|
+
* Connecting is asynchronous because the host issues the nonce, and
|
|
22
|
+
* without one there is nothing to say. An extension that renders
|
|
23
|
+
* before awaiting this is rendering before it knows which extension
|
|
24
|
+
* it is.
|
|
25
|
+
*
|
|
26
|
+
* `P` and `S` name the extension's own launch parameters and settings;
|
|
27
|
+
* the bridge passes on what the host sent without checking it against
|
|
28
|
+
* them.
|
|
29
|
+
*/
|
|
30
|
+
export declare function connect<P extends LaunchParams = LaunchParams, S extends ExtensionSettings = ExtensionSettings>(options?: {
|
|
31
|
+
timeoutMs?: number;
|
|
32
|
+
}): Promise<Bridge<P, S>>;
|
|
33
|
+
//# sourceMappingURL=bridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../src/bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAGlB,MAAM,eAAe,CAAC;AAEvB;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CACrB,CAAC,SAAS,YAAY,GAAG,YAAY,EACrC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB,EAC/C,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAmC7D"}
|
package/dist/bridge.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The guest half: what an extension's page imports to reach igni.
|
|
3
|
+
*
|
|
4
|
+
* This is the file that becomes a published package. Nothing in it
|
|
5
|
+
* imports from the rest of the app, and nothing in it is trusted by
|
|
6
|
+
* the host — every check is on the other side. What it owes an
|
|
7
|
+
* extension author is an object that behaves like the client they
|
|
8
|
+
* would have had if their panel were part of the app, so that porting
|
|
9
|
+
* one is not a rewrite.
|
|
10
|
+
*
|
|
11
|
+
* The shape it presents is `rpc(method, args, timeoutMs)`, which is
|
|
12
|
+
* the whole surface the first panel ported behind it used. Everything else here —
|
|
13
|
+
* navigate, close, theme, params — is what a panel needed from the
|
|
14
|
+
* app around it and used to get by being inside it.
|
|
15
|
+
*/
|
|
16
|
+
import { HostChannel } from "./channel.js";
|
|
17
|
+
import { DEFAULT_TIMEOUT_MS, GuestBridge } from "./guestBridge.js";
|
|
18
|
+
import { isHostMessage, } from "./protocol.js";
|
|
19
|
+
/**
|
|
20
|
+
* Wait for the host's `hello`, then hand back the bridge.
|
|
21
|
+
*
|
|
22
|
+
* Connecting is asynchronous because the host issues the nonce, and
|
|
23
|
+
* without one there is nothing to say. An extension that renders
|
|
24
|
+
* before awaiting this is rendering before it knows which extension
|
|
25
|
+
* it is.
|
|
26
|
+
*
|
|
27
|
+
* `P` and `S` name the extension's own launch parameters and settings;
|
|
28
|
+
* the bridge passes on what the host sent without checking it against
|
|
29
|
+
* them.
|
|
30
|
+
*/
|
|
31
|
+
export function connect(options = {}) {
|
|
32
|
+
const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
33
|
+
const host = window.parent;
|
|
34
|
+
if (host === window) {
|
|
35
|
+
return Promise.reject(new Error("igni bridge: this page is not framed by a host, so there is nothing to connect to"));
|
|
36
|
+
}
|
|
37
|
+
return new Promise((resolve, reject) => {
|
|
38
|
+
const timer = setTimeout(() => {
|
|
39
|
+
window.removeEventListener("message", onHello);
|
|
40
|
+
reject(new Error(`igni bridge: no hello from the host within ${timeoutMs}ms`));
|
|
41
|
+
}, timeoutMs);
|
|
42
|
+
function onHello(event) {
|
|
43
|
+
if (event.source !== host)
|
|
44
|
+
return;
|
|
45
|
+
if (!isHostMessage(event.data) || event.data.kind !== "hello")
|
|
46
|
+
return;
|
|
47
|
+
clearTimeout(timer);
|
|
48
|
+
window.removeEventListener("message", onHello);
|
|
49
|
+
const channel = new HostChannel(host, event.data.nonce);
|
|
50
|
+
const bridge = new GuestBridge(channel, event.data);
|
|
51
|
+
window.addEventListener("message", (message) => {
|
|
52
|
+
if (!channel.isFrom(message) || !isHostMessage(message.data))
|
|
53
|
+
return;
|
|
54
|
+
bridge.receive(message.data);
|
|
55
|
+
});
|
|
56
|
+
resolve(expose(bridge));
|
|
57
|
+
}
|
|
58
|
+
window.addEventListener("message", onHello);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The bridge as the page holds it: a plain object whose members close
|
|
63
|
+
* over the one that does the work. So `const { rpc } = bridge`,
|
|
64
|
+
* `onClick={bridge.close}` and `{ ...bridge }` behave as they did before
|
|
65
|
+
* the bridge was a class, and nothing the page did not ask for — the
|
|
66
|
+
* nonce, the requests in flight — is one of its properties.
|
|
67
|
+
*/
|
|
68
|
+
function expose(bridge) {
|
|
69
|
+
return {
|
|
70
|
+
extensionId: bridge.extensionId,
|
|
71
|
+
host: bridge.host,
|
|
72
|
+
service: bridge.service,
|
|
73
|
+
on: (signal, fn, onRefused) => bridge.on(signal, fn, onRefused),
|
|
74
|
+
get params() {
|
|
75
|
+
return bridge.params;
|
|
76
|
+
},
|
|
77
|
+
settings: bridge.settings,
|
|
78
|
+
get theme() {
|
|
79
|
+
return bridge.theme;
|
|
80
|
+
},
|
|
81
|
+
get tokens() {
|
|
82
|
+
return bridge.tokens;
|
|
83
|
+
},
|
|
84
|
+
rpc: (method, args, timeoutMs) => bridge.rpc(method, args, timeoutMs),
|
|
85
|
+
navigate: (to) => bridge.navigate(to),
|
|
86
|
+
close: () => bridge.close(),
|
|
87
|
+
onTheme: (fn) => bridge.onTheme(fn),
|
|
88
|
+
onParams: (fn) => bridge.onParams(fn),
|
|
89
|
+
setLocation: (state) => bridge.setLocation(state),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=bridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridge.js","sourceRoot":"","sources":["../src/bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,WAAW,EAA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