@cronch/kernel 0.0.0-stage → 0.12.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 +201 -0
- package/cbor.js +177 -0
- package/cli.js +197 -0
- package/examples/claude-code/agent.pata +31 -0
- package/examples/claude-code/brain.json +25 -0
- package/examples/claude-code/fs.json +10 -0
- package/examples/claude-code/mcp.json +25 -0
- package/examples/claude-code/net.json +56 -0
- package/examples/claude-code/session.json +1 -0
- package/examples/claude-code/shell.json +29 -0
- package/index.d.ts +813 -0
- package/index.js +96 -0
- package/kernel.sha256 +1 -0
- package/kernel.wasm +0 -0
- package/package.json +48 -4
- package/run.d.ts +67 -0
- package/run.js +145 -0
- package/README.md +0 -3
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"operations": {
|
|
3
|
+
"fetch": {
|
|
4
|
+
"input": { "Record": { "url": "String" } },
|
|
5
|
+
"output": "String",
|
|
6
|
+
"effect": true,
|
|
7
|
+
"pre": {
|
|
8
|
+
"e": "op",
|
|
9
|
+
"op": "contains",
|
|
10
|
+
"args": [
|
|
11
|
+
{ "e": "get", "of": { "e": "var", "name": "grant" }, "field": "netAllow" },
|
|
12
|
+
{ "e": "get", "of": { "e": "var", "name": "args" }, "field": "url" }
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"footprint": {
|
|
16
|
+
"e": "record",
|
|
17
|
+
"fields": {
|
|
18
|
+
"reaches": { "e": "get", "of": { "e": "var", "name": "args" }, "field": "url" }
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"ask": {
|
|
23
|
+
"input": { "Record": { "url": "String" } },
|
|
24
|
+
"output": "String",
|
|
25
|
+
"post": {
|
|
26
|
+
"e": "op",
|
|
27
|
+
"op": "contains",
|
|
28
|
+
"args": [{ "e": "lit", "v": ["allow", "deny"] }, { "e": "var", "name": "result" }]
|
|
29
|
+
},
|
|
30
|
+
"ret": { "e": "list", "items": [] },
|
|
31
|
+
"onResult": {
|
|
32
|
+
"e": "if",
|
|
33
|
+
"cond": {
|
|
34
|
+
"e": "op",
|
|
35
|
+
"op": "eq",
|
|
36
|
+
"args": [{ "e": "var", "name": "result" }, { "e": "lit", "v": "allow" }]
|
|
37
|
+
},
|
|
38
|
+
"then": {
|
|
39
|
+
"e": "record",
|
|
40
|
+
"fields": {
|
|
41
|
+
"netAllow": {
|
|
42
|
+
"e": "op",
|
|
43
|
+
"op": "append",
|
|
44
|
+
"args": [
|
|
45
|
+
{ "e": "get", "of": { "e": "var", "name": "grant" }, "field": "netAllow" },
|
|
46
|
+
{ "e": "get", "of": { "e": "var", "name": "args" }, "field": "url" }
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"else": { "e": "var", "name": "grant" }
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"grant": { "Record": { "netAllow": { "List": "String" } } }
|
|
56
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "channels": { "user": { "type": "String" } } }
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"operations": {
|
|
3
|
+
"run": {
|
|
4
|
+
"input": { "Record": { "command": "String" } },
|
|
5
|
+
"output": "String",
|
|
6
|
+
"effect": true
|
|
7
|
+
},
|
|
8
|
+
"online": {
|
|
9
|
+
"input": { "Record": { "command": "String", "url": "String" } },
|
|
10
|
+
"output": "String",
|
|
11
|
+
"effect": true,
|
|
12
|
+
"pre": {
|
|
13
|
+
"e": "op",
|
|
14
|
+
"op": "contains",
|
|
15
|
+
"args": [
|
|
16
|
+
{ "e": "get", "of": { "e": "var", "name": "grant" }, "field": "netAllow" },
|
|
17
|
+
{ "e": "get", "of": { "e": "var", "name": "args" }, "field": "url" }
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"footprint": {
|
|
21
|
+
"e": "record",
|
|
22
|
+
"fields": {
|
|
23
|
+
"reaches": { "e": "get", "of": { "e": "var", "name": "args" }, "field": "url" }
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"grant": { "Record": { "netAllow": { "List": "String" } } }
|
|
29
|
+
}
|