@yaklabs-ai/plugin-sdk 0.11.0 → 0.12.2
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 +1 -1
- package/THIRD-PARTY-INVENTORY.json +13 -20
- package/THIRD-PARTY-NOTICES.md +12 -36
- package/dist/disclosure.d.ts +511 -27
- package/dist/disclosure.js +27 -0
- package/dist/jev.d.ts +145 -18
- package/dist/jev.js +14 -0
- package/dist/kay-agent-testing.d.ts +511 -43
- package/dist/kay-agent-testing.js +14 -0
- package/dist/kay-agent.d.ts +605 -42
- package/dist/kay-agent.js +52 -0
- package/dist/kay-app.d.ts +653 -75
- package/dist/kay-app.js +126 -0
- package/dist/signals.d.ts +113 -18
- package/dist/signals.js +4 -0
- package/package.json +2 -3
|
@@ -126,11 +126,22 @@ function unwired(name) {
|
|
|
126
126
|
throw new Error(`${name} is not wired in this test double; pass your own handle to exercise it`);
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
+
var NOT_WIRED = async () => ({ ok: false, reason: "unavailable", message: "not wired" });
|
|
130
|
+
var UNWIRED_SURFACE = {
|
|
131
|
+
isAvailable: async () => false,
|
|
132
|
+
targets: NOT_WIRED,
|
|
133
|
+
observe: NOT_WIRED,
|
|
134
|
+
act: NOT_WIRED,
|
|
135
|
+
screenshot: NOT_WIRED,
|
|
136
|
+
open: NOT_WIRED
|
|
137
|
+
};
|
|
129
138
|
function fauxKayAgentCapabilities() {
|
|
130
139
|
return {
|
|
131
140
|
filesystem: {
|
|
132
141
|
readText: unwired("filesystem.readText"),
|
|
133
142
|
writeText: unwired("filesystem.writeText"),
|
|
143
|
+
readBytes: unwired("filesystem.readBytes"),
|
|
144
|
+
writeBytes: unwired("filesystem.writeBytes"),
|
|
134
145
|
mkdir: unwired("filesystem.mkdir"),
|
|
135
146
|
readDir: unwired("filesystem.readDir"),
|
|
136
147
|
stat: unwired("filesystem.stat"),
|
|
@@ -161,6 +172,9 @@ function fauxKayAgentCapabilities() {
|
|
|
161
172
|
remove: unwired("whiteboard.remove")
|
|
162
173
|
})
|
|
163
174
|
},
|
|
175
|
+
// Answers `unavailable` rather than rejecting: the real surfaces report an unavailable
|
|
176
|
+
// surface as `{ ok: false }`, never a throw. A test driving one overrides this handle.
|
|
177
|
+
interaction: { browserPane: UNWIRED_SURFACE, desktop: UNWIRED_SURFACE },
|
|
164
178
|
interceptToolCall: () => void 0,
|
|
165
179
|
// The one handle that does NOT refuse on use. `withJev`'s contract is that it always produces
|
|
166
180
|
// the baseline, so a rejecting double would make a plugin's Jev path untestable and teach the
|