@rigkit/sdk 0.2.9 → 0.2.11
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 +21 -0
- package/package.json +4 -3
- package/src/index.test.ts +1 -1
- package/src/runtime/operations.ts +26 -0
- package/src/runtime/version.ts +1 -1
- package/src/version.ts +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rigkit contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rigkit/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
4
|
+
"license": "MIT",
|
|
4
5
|
"type": "module",
|
|
5
6
|
"repository": {
|
|
6
7
|
"type": "git",
|
|
@@ -23,8 +24,8 @@
|
|
|
23
24
|
"@effect/platform": "0.96.1",
|
|
24
25
|
"@effect/platform-bun": "0.89.0",
|
|
25
26
|
"effect": "^3.21.2",
|
|
26
|
-
"@rigkit/engine": "0.2.
|
|
27
|
-
"@rigkit/runtime-client": "0.2.
|
|
27
|
+
"@rigkit/engine": "0.2.11",
|
|
28
|
+
"@rigkit/runtime-client": "0.2.11"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"@types/bun": "latest",
|
package/src/index.test.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { defineHostCapabilities, defineHostCapability } from "./host.ts";
|
|
|
16
16
|
|
|
17
17
|
describe("@rigkit/sdk package boundary", () => {
|
|
18
18
|
test("exports authoring API and project runtime entrypoints", () => {
|
|
19
|
-
expect(RIGKIT_SDK_VERSION).toBe("0.2.
|
|
19
|
+
expect(RIGKIT_SDK_VERSION).toBe("0.2.11");
|
|
20
20
|
expect(env).toBeTypeOf("function");
|
|
21
21
|
expect(env.secret).toBeTypeOf("function");
|
|
22
22
|
expect(defineConfig).toBeTypeOf("function");
|
|
@@ -92,6 +92,32 @@ async function executeOperation(run: RunRecord, store: RunStore, options: Engine
|
|
|
92
92
|
open: async (target) => {
|
|
93
93
|
await requestHost(store, run, "open.external", { target, kind: guessExternalKind(target) });
|
|
94
94
|
},
|
|
95
|
+
prompt: {
|
|
96
|
+
message: async (request) => {
|
|
97
|
+
await requestHost(store, run, "message.show", request);
|
|
98
|
+
},
|
|
99
|
+
text: async (request) => {
|
|
100
|
+
const result = await requestHost(store, run, "prompt.text", request);
|
|
101
|
+
if (typeof result !== "string") {
|
|
102
|
+
throw new Error("Host text prompt returned a non-string result");
|
|
103
|
+
}
|
|
104
|
+
return result;
|
|
105
|
+
},
|
|
106
|
+
confirm: async (request) => {
|
|
107
|
+
const result = await requestHost(store, run, "prompt.confirm", request);
|
|
108
|
+
if (typeof result !== "boolean") {
|
|
109
|
+
throw new Error("Host confirm prompt returned a non-boolean result");
|
|
110
|
+
}
|
|
111
|
+
return result;
|
|
112
|
+
},
|
|
113
|
+
select: async (request) => {
|
|
114
|
+
const result = await requestHost(store, run, "prompt.select", request);
|
|
115
|
+
if (typeof result !== "string") {
|
|
116
|
+
throw new Error("Host select prompt returned a non-string result");
|
|
117
|
+
}
|
|
118
|
+
return result;
|
|
119
|
+
},
|
|
120
|
+
},
|
|
95
121
|
command: async (command) => {
|
|
96
122
|
const result = await requestHost(store, run, "host.command.run", command);
|
|
97
123
|
return HostCommandResultSchema.parse(result);
|
package/src/runtime/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const RIGKIT_RUNTIME_VERSION = "0.2.
|
|
1
|
+
export const RIGKIT_RUNTIME_VERSION = "0.2.11";
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const RIGKIT_SDK_VERSION = "0.2.
|
|
1
|
+
export const RIGKIT_SDK_VERSION = "0.2.11";
|