@h-rig/isolation-plugin 0.0.6-alpha.156
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 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +65 -0
- package/dist/src/plugin.d.ts +4 -0
- package/dist/src/plugin.js +60 -0
- package/dist/src/service.d.ts +14 -0
- package/dist/src/service.js +11 -0
- package/package.json +36 -0
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# @h-rig/isolation-plugin
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __returnValue = (v) => v;
|
|
4
|
+
function __exportSetter(name, newValue) {
|
|
5
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
6
|
+
}
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true,
|
|
12
|
+
configurable: true,
|
|
13
|
+
set: __exportSetter.bind(all, name)
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
17
|
+
|
|
18
|
+
// packages/isolation-plugin/src/service.ts
|
|
19
|
+
var exports_service = {};
|
|
20
|
+
__export(exports_service, {
|
|
21
|
+
worktreeIsolationBackend: () => worktreeIsolationBackend,
|
|
22
|
+
svc: () => svc
|
|
23
|
+
});
|
|
24
|
+
import { ensureAgentRuntime } from "@rig/runtime/control-plane/runtime/isolation";
|
|
25
|
+
var svc, worktreeIsolationBackend;
|
|
26
|
+
var init_service = __esm(() => {
|
|
27
|
+
svc = {
|
|
28
|
+
ensureAgentRuntime: (options) => ensureAgentRuntime(options)
|
|
29
|
+
};
|
|
30
|
+
worktreeIsolationBackend = svc;
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// packages/isolation-plugin/src/plugin.ts
|
|
34
|
+
import { definePlugin } from "@rig/core/config";
|
|
35
|
+
import { ISOLATION_BACKEND_CAPABILITY_ID } from "@rig/contracts";
|
|
36
|
+
var ISOLATION_PLUGIN_NAME = "@rig/isolation-plugin";
|
|
37
|
+
var isolationPlugin = definePlugin({
|
|
38
|
+
name: ISOLATION_PLUGIN_NAME,
|
|
39
|
+
version: "0.0.0-alpha.1",
|
|
40
|
+
contributes: {
|
|
41
|
+
capabilities: [
|
|
42
|
+
{
|
|
43
|
+
id: ISOLATION_BACKEND_CAPABILITY_ID,
|
|
44
|
+
title: "Worktree runtime isolation",
|
|
45
|
+
description: "Provision the isolated agent runtime (git worktree backend). Swappable for sandbox/container backends.",
|
|
46
|
+
run: async () => (await Promise.resolve().then(() => (init_service(), exports_service))).svc
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
function createIsolationPlugin() {
|
|
52
|
+
return isolationPlugin;
|
|
53
|
+
}
|
|
54
|
+
var plugin_default = isolationPlugin;
|
|
55
|
+
|
|
56
|
+
// packages/isolation-plugin/src/index.ts
|
|
57
|
+
init_service();
|
|
58
|
+
export {
|
|
59
|
+
worktreeIsolationBackend,
|
|
60
|
+
svc,
|
|
61
|
+
isolationPlugin,
|
|
62
|
+
plugin_default as default,
|
|
63
|
+
createIsolationPlugin,
|
|
64
|
+
ISOLATION_PLUGIN_NAME
|
|
65
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __returnValue = (v) => v;
|
|
4
|
+
function __exportSetter(name, newValue) {
|
|
5
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
6
|
+
}
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true,
|
|
12
|
+
configurable: true,
|
|
13
|
+
set: __exportSetter.bind(all, name)
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
17
|
+
|
|
18
|
+
// packages/isolation-plugin/src/service.ts
|
|
19
|
+
var exports_service = {};
|
|
20
|
+
__export(exports_service, {
|
|
21
|
+
worktreeIsolationBackend: () => worktreeIsolationBackend,
|
|
22
|
+
svc: () => svc
|
|
23
|
+
});
|
|
24
|
+
import { ensureAgentRuntime } from "@rig/runtime/control-plane/runtime/isolation";
|
|
25
|
+
var svc, worktreeIsolationBackend;
|
|
26
|
+
var init_service = __esm(() => {
|
|
27
|
+
svc = {
|
|
28
|
+
ensureAgentRuntime: (options) => ensureAgentRuntime(options)
|
|
29
|
+
};
|
|
30
|
+
worktreeIsolationBackend = svc;
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// packages/isolation-plugin/src/plugin.ts
|
|
34
|
+
import { definePlugin } from "@rig/core/config";
|
|
35
|
+
import { ISOLATION_BACKEND_CAPABILITY_ID } from "@rig/contracts";
|
|
36
|
+
var ISOLATION_PLUGIN_NAME = "@rig/isolation-plugin";
|
|
37
|
+
var isolationPlugin = definePlugin({
|
|
38
|
+
name: ISOLATION_PLUGIN_NAME,
|
|
39
|
+
version: "0.0.0-alpha.1",
|
|
40
|
+
contributes: {
|
|
41
|
+
capabilities: [
|
|
42
|
+
{
|
|
43
|
+
id: ISOLATION_BACKEND_CAPABILITY_ID,
|
|
44
|
+
title: "Worktree runtime isolation",
|
|
45
|
+
description: "Provision the isolated agent runtime (git worktree backend). Swappable for sandbox/container backends.",
|
|
46
|
+
run: async () => (await Promise.resolve().then(() => (init_service(), exports_service))).svc
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
function createIsolationPlugin() {
|
|
52
|
+
return isolationPlugin;
|
|
53
|
+
}
|
|
54
|
+
var plugin_default = isolationPlugin;
|
|
55
|
+
export {
|
|
56
|
+
isolationPlugin,
|
|
57
|
+
plugin_default as default,
|
|
58
|
+
createIsolationPlugin,
|
|
59
|
+
ISOLATION_PLUGIN_NAME
|
|
60
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* service.ts — the concrete worktree isolation backend the runtime port
|
|
3
|
+
* resolves and consumes.
|
|
4
|
+
*
|
|
5
|
+
* CONFIG-LIGHT: this module top-level-imports the in-runtime worktree
|
|
6
|
+
* provisioning primitive. It is loaded LAZILY by the capability `run()` in
|
|
7
|
+
* plugin.ts (`(await import("./service")).svc`), so merely evaluating
|
|
8
|
+
* rig.config.ts never drags the provisioning impl into scope.
|
|
9
|
+
*/
|
|
10
|
+
import type { IsolationBackend } from "@rig/runtime/control-plane/isolation-backend-port";
|
|
11
|
+
/** The concrete worktree isolation backend the runtime port resolves. */
|
|
12
|
+
export declare const svc: IsolationBackend;
|
|
13
|
+
/** Back-compat alias. */
|
|
14
|
+
export declare const worktreeIsolationBackend: IsolationBackend;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// packages/isolation-plugin/src/service.ts
|
|
3
|
+
import { ensureAgentRuntime } from "@rig/runtime/control-plane/runtime/isolation";
|
|
4
|
+
var svc = {
|
|
5
|
+
ensureAgentRuntime: (options) => ensureAgentRuntime(options)
|
|
6
|
+
};
|
|
7
|
+
var worktreeIsolationBackend = svc;
|
|
8
|
+
export {
|
|
9
|
+
worktreeIsolationBackend,
|
|
10
|
+
svc
|
|
11
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@h-rig/isolation-plugin",
|
|
3
|
+
"version": "0.0.6-alpha.156",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "First-party runtime-isolation backend capability plugin for Rig (swappable worktree/sandbox provisioning).",
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"README.md"
|
|
10
|
+
],
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/src/plugin.d.ts",
|
|
14
|
+
"import": "./dist/src/plugin.js"
|
|
15
|
+
},
|
|
16
|
+
"./plugin": {
|
|
17
|
+
"types": "./dist/src/plugin.d.ts",
|
|
18
|
+
"import": "./dist/src/plugin.js"
|
|
19
|
+
},
|
|
20
|
+
"./index": {
|
|
21
|
+
"types": "./dist/src/index.d.ts",
|
|
22
|
+
"import": "./dist/src/index.js"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"engines": {
|
|
26
|
+
"bun": ">=1.3.11"
|
|
27
|
+
},
|
|
28
|
+
"main": "./dist/src/index.js",
|
|
29
|
+
"module": "./dist/src/index.js",
|
|
30
|
+
"types": "./dist/src/index.d.ts",
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.156",
|
|
33
|
+
"@rig/core": "npm:@h-rig/core@0.0.6-alpha.156",
|
|
34
|
+
"@rig/runtime": "npm:@h-rig/runtime@0.0.6-alpha.156"
|
|
35
|
+
}
|
|
36
|
+
}
|