@clawscarf/cli 0.1.0-alpha.1
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/README.md +3 -0
- package/THIRD_PARTY_NOTICES.md +102 -0
- package/deploy/execution/browser/LICENSE.playwright +202 -0
- package/deploy/execution/browser/seccomp.json +640 -0
- package/deploy/execution/browser-node/configuration.js +85 -0
- package/deploy/execution/browser-node/operator.js +167 -0
- package/deploy/execution/network/node-ingress.cfg +35 -0
- package/deploy/models/catalog.json +275 -0
- package/deploy/openshell/policy.yaml +24 -0
- package/generated/http/LICENSE.md +21 -0
- package/generated/http/client/client.gen.d.ts +2 -0
- package/generated/http/client/client.gen.js +216 -0
- package/generated/http/client/index.d.ts +10 -0
- package/generated/http/client/index.js +6 -0
- package/generated/http/client/types.gen.d.ts +120 -0
- package/generated/http/client/types.gen.js +2 -0
- package/generated/http/client/utils.gen.d.ts +37 -0
- package/generated/http/client/utils.gen.js +228 -0
- package/generated/http/core/auth.gen.d.ts +25 -0
- package/generated/http/core/auth.gen.js +14 -0
- package/generated/http/core/bodySerializer.gen.d.ts +25 -0
- package/generated/http/core/bodySerializer.gen.js +57 -0
- package/generated/http/core/params.gen.d.ts +43 -0
- package/generated/http/core/params.gen.js +109 -0
- package/generated/http/core/pathSerializer.gen.d.ts +33 -0
- package/generated/http/core/pathSerializer.gen.js +106 -0
- package/generated/http/core/queryKeySerializer.gen.d.ts +18 -0
- package/generated/http/core/queryKeySerializer.gen.js +92 -0
- package/generated/http/core/serverSentEvents.gen.d.ts +71 -0
- package/generated/http/core/serverSentEvents.gen.js +132 -0
- package/generated/http/core/types.gen.d.ts +83 -0
- package/generated/http/core/types.gen.js +2 -0
- package/generated/http/core/utils.gen.d.ts +19 -0
- package/generated/http/core/utils.gen.js +87 -0
- package/package.json +37 -0
- package/packs/README.md +130 -0
- package/packs/research-team/pack.json +20 -0
- package/packs/research-team/researcher/CLAW.md +19 -0
- package/packs/research-team/researcher/package.json +8 -0
- package/packs/research-team/researcher/profiles/openclaw.yml +6 -0
- package/packs/research-team/reviewer/CLAW.md +19 -0
- package/packs/research-team/reviewer/package.json +8 -0
- package/packs/research-team/reviewer/profiles/openclaw.yml +6 -0
- package/pnpm-lock.yaml +7158 -0
- package/recipes/README.md +37 -0
- package/recipes/team-server/recipe.json +28 -0
- package/release/README.md +137 -0
- package/release/components.json +29 -0
- package/release/operator.md +63 -0
- package/runtime/configuration.js +135 -0
- package/runtime/connections-configuration.js +70 -0
- package/runtime/model-contract.js +92 -0
- package/runtime/releases/0.1.0-alpha.1.json +37 -0
- package/scripts/clawscarf.js +92 -0
- package/scripts/cloud/login.js +134 -0
- package/scripts/cloud/registration.js +232 -0
- package/scripts/cloud/url.js +9 -0
- package/scripts/connections.js +193 -0
- package/scripts/controller.js +143 -0
- package/scripts/deployment/browser-node-compose.js +81 -0
- package/scripts/deployment/browser-node-helper.js +9 -0
- package/scripts/deployment/browser-node-pairing.js +165 -0
- package/scripts/deployment/browser-node.js +154 -0
- package/scripts/deployment/browser.js +143 -0
- package/scripts/deployment/certificates.js +76 -0
- package/scripts/deployment/compose.js +191 -0
- package/scripts/deployment/configuration.js +275 -0
- package/scripts/deployment/connection-policy.js +80 -0
- package/scripts/deployment/connection-settings.js +60 -0
- package/scripts/deployment/connections-runtime.js +31 -0
- package/scripts/deployment/connections.js +213 -0
- package/scripts/deployment/controller-compose.js +59 -0
- package/scripts/deployment/database.js +199 -0
- package/scripts/deployment/entrypoint.js +7 -0
- package/scripts/deployment/images.js +17 -0
- package/scripts/deployment/initial-services.js +53 -0
- package/scripts/deployment/launch.js +177 -0
- package/scripts/deployment/logs.js +15 -0
- package/scripts/deployment/model-gateway-compose.js +74 -0
- package/scripts/deployment/model-gateway.js +125 -0
- package/scripts/deployment/models.js +82 -0
- package/scripts/deployment/networks.js +354 -0
- package/scripts/deployment/policy.js +56 -0
- package/scripts/deployment/preflight.js +124 -0
- package/scripts/deployment/prepare.js +205 -0
- package/scripts/deployment/process.js +70 -0
- package/scripts/deployment/relay.js +58 -0
- package/scripts/deployment/runtime-binding.js +100 -0
- package/scripts/deployment/runtime.js +232 -0
- package/scripts/deployment/state.js +154 -0
- package/scripts/deployment/team.js +76 -0
- package/scripts/deployment/upgrade-rpc.py +148 -0
- package/scripts/deployment/upgrade-state.js +47 -0
- package/scripts/deployment/upgrade.js +298 -0
- package/scripts/deployment/volumes.js +24 -0
- package/scripts/errors.js +9 -0
- package/scripts/installation/administrator.js +23 -0
- package/scripts/installation/command.js +176 -0
- package/scripts/installation/configuration.js +104 -0
- package/scripts/installation/configure.js +122 -0
- package/scripts/installation/delete.js +111 -0
- package/scripts/installation/doctor.js +8 -0
- package/scripts/installation/errors.js +8 -0
- package/scripts/installation/files.js +51 -0
- package/scripts/installation/installer/cloud.js +22 -0
- package/scripts/installation/installer/collect.js +245 -0
- package/scripts/installation/installer/inputs.js +59 -0
- package/scripts/installation/installer/menu.js +49 -0
- package/scripts/installation/installer/prompts.js +139 -0
- package/scripts/installation/installer/run.js +251 -0
- package/scripts/installation/installer/secrets.js +16 -0
- package/scripts/installation/installer/sections/access.js +69 -0
- package/scripts/installation/installer/sections/certificates.js +18 -0
- package/scripts/installation/installer/sections/connections.js +4 -0
- package/scripts/installation/installer/sections/external-models.js +35 -0
- package/scripts/installation/installer/sections/models.js +119 -0
- package/scripts/installation/installer/sections/packs.js +82 -0
- package/scripts/installation/installer/sections/resources.js +10 -0
- package/scripts/installation/installer/settings.js +192 -0
- package/scripts/installation/installer/summary.js +44 -0
- package/scripts/installation/lifecycle.js +127 -0
- package/scripts/installation/location.js +3 -0
- package/scripts/installation/models.js +42 -0
- package/scripts/installation/options.js +360 -0
- package/scripts/installation/packs.js +150 -0
- package/scripts/installation/plan.js +121 -0
- package/scripts/installation/prerequisites.js +170 -0
- package/scripts/installation/recipes/catalog.js +55 -0
- package/scripts/installation/recipes/definition.js +32 -0
- package/scripts/installation/reconfigure.js +255 -0
- package/scripts/installation/requirements.js +23 -0
- package/scripts/installation/resolve.js +217 -0
- package/scripts/installation/runtime.js +87 -0
- package/scripts/installation/save.js +95 -0
- package/scripts/installation/setup.js +91 -0
- package/scripts/models/catalog.js +9 -0
- package/scripts/models/configuration.js +184 -0
- package/scripts/models/credentials.js +132 -0
- package/scripts/models/runtime.js +87 -0
- package/scripts/output.js +34 -0
- package/scripts/packs/connections.js +95 -0
- package/scripts/packs/lifecycle.js +125 -0
- package/scripts/packs/model.js +66 -0
- package/scripts/packs/native.js +69 -0
- package/scripts/packs/openshell.js +148 -0
- package/scripts/packs/policy.js +189 -0
- package/scripts/packs/requirements.in +1 -0
- package/scripts/packs/requirements.js +11 -0
- package/scripts/packs/requirements.txt +116 -0
- package/scripts/packs/source.js +90 -0
- package/scripts/packs/transport.py +68 -0
- package/scripts/people.js +52 -0
- package/scripts/release/create.js +62 -0
- package/scripts/release/definition.js +51 -0
- package/scripts/session.js +27 -0
- package/services/access/generated/client.gen.d.ts +12 -0
- package/services/access/generated/client.gen.js +3 -0
- package/services/access/generated/fastify.gen.d.ts +49 -0
- package/services/access/generated/fastify.gen.js +2 -0
- package/services/access/generated/index.d.ts +2 -0
- package/services/access/generated/index.js +2 -0
- package/services/access/generated/sdk.gen.d.ts +28 -0
- package/services/access/generated/sdk.gen.js +107 -0
- package/services/access/generated/types.gen.d.ts +349 -0
- package/services/access/generated/types.gen.js +2 -0
- package/services/access/migrations/001_access.sql +39 -0
- package/services/access/migrations/002_administrator_setup.sql +16 -0
- package/services/access/migrations/003_local_login_completion.sql +5 -0
- package/services/access/migrations/004_invitations.sql +21 -0
- package/services/access/repo/postgres.js +341 -0
- package/services/access/repo/session-logout.js +28 -0
- package/services/access/types/credential.js +2 -0
- package/services/access/types/errors.js +7 -0
- package/services/access/types/ingress.js +1 -0
- package/services/access/types/model.js +1 -0
- package/services/access/types/native-errors.js +7 -0
- package/services/access/types/native.js +1 -0
- package/services/cloud/generated/client.gen.d.ts +12 -0
- package/services/cloud/generated/client.gen.js +3 -0
- package/services/cloud/generated/index.d.ts +2 -0
- package/services/cloud/generated/index.js +2 -0
- package/services/cloud/generated/sdk.gen.d.ts +145 -0
- package/services/cloud/generated/sdk.gen.js +488 -0
- package/services/cloud/generated/types.gen.d.ts +2034 -0
- package/services/cloud/generated/types.gen.js +2 -0
- package/services/connections/cloud/generated/client.gen.d.ts +12 -0
- package/services/connections/cloud/generated/client.gen.js +3 -0
- package/services/connections/cloud/generated/fastify.gen.d.ts +68 -0
- package/services/connections/cloud/generated/fastify.gen.js +2 -0
- package/services/connections/cloud/generated/index.d.ts +2 -0
- package/services/connections/cloud/generated/index.js +2 -0
- package/services/connections/cloud/generated/sdk.gen.d.ts +95 -0
- package/services/connections/cloud/generated/sdk.gen.js +210 -0
- package/services/connections/cloud/generated/types.gen.d.ts +1044 -0
- package/services/connections/cloud/generated/types.gen.js +2 -0
- package/services/connections/migrations/001_connections.sql +220 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { Auth, AuthToken } from './auth.gen.js';
|
|
2
|
+
import type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.js';
|
|
3
|
+
export type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
|
|
4
|
+
export type Client<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
|
|
5
|
+
/**
|
|
6
|
+
* Returns the final request URL.
|
|
7
|
+
*/
|
|
8
|
+
buildUrl: BuildUrlFn;
|
|
9
|
+
getConfig: () => Config;
|
|
10
|
+
request: RequestFn;
|
|
11
|
+
setConfig: (config: Config) => Config;
|
|
12
|
+
} & {
|
|
13
|
+
[K in HttpMethod]: MethodFn;
|
|
14
|
+
} & ([SseFn] extends [never] ? {
|
|
15
|
+
sse?: never;
|
|
16
|
+
} : {
|
|
17
|
+
sse: {
|
|
18
|
+
[K in HttpMethod]: SseFn;
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
export interface Config {
|
|
22
|
+
/**
|
|
23
|
+
* Auth token or a function returning auth token. The resolved value will be
|
|
24
|
+
* added to the request payload as defined by its `security` array.
|
|
25
|
+
*/
|
|
26
|
+
auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
|
|
27
|
+
/**
|
|
28
|
+
* A function for serializing request body parameter. By default,
|
|
29
|
+
* {@link JSON.stringify()} will be used.
|
|
30
|
+
*/
|
|
31
|
+
bodySerializer?: BodySerializer | null;
|
|
32
|
+
/**
|
|
33
|
+
* An object containing any HTTP headers that you want to pre-populate your
|
|
34
|
+
* `Headers` object with.
|
|
35
|
+
*
|
|
36
|
+
* {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
|
|
37
|
+
*/
|
|
38
|
+
headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
|
|
39
|
+
/**
|
|
40
|
+
* The request method.
|
|
41
|
+
*
|
|
42
|
+
* {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
|
|
43
|
+
*/
|
|
44
|
+
method?: Uppercase<HttpMethod>;
|
|
45
|
+
/**
|
|
46
|
+
* A function for serializing request query parameters. By default, arrays
|
|
47
|
+
* will be exploded in form style, objects will be exploded in deepObject
|
|
48
|
+
* style, and reserved characters are percent-encoded.
|
|
49
|
+
*
|
|
50
|
+
* This method will have no effect if the native `paramsSerializer()` Axios
|
|
51
|
+
* API function is used.
|
|
52
|
+
*
|
|
53
|
+
* {@link https://swagger.io/docs/specification/serialization/#query View examples}
|
|
54
|
+
*/
|
|
55
|
+
querySerializer?: QuerySerializer | QuerySerializerOptions;
|
|
56
|
+
/**
|
|
57
|
+
* A function validating request data. This is useful if you want to ensure
|
|
58
|
+
* the request conforms to the desired shape, so it can be safely sent to
|
|
59
|
+
* the server.
|
|
60
|
+
*/
|
|
61
|
+
requestValidator?: (data: unknown) => Promise<unknown>;
|
|
62
|
+
/**
|
|
63
|
+
* A function transforming response data before it's returned. This is useful
|
|
64
|
+
* for post-processing data, e.g., converting ISO strings into Date objects.
|
|
65
|
+
*/
|
|
66
|
+
responseTransformer?: (data: unknown) => Promise<unknown>;
|
|
67
|
+
/**
|
|
68
|
+
* A function validating response data. This is useful if you want to ensure
|
|
69
|
+
* the response conforms to the desired shape, so it can be safely passed to
|
|
70
|
+
* the transformers and returned to the user.
|
|
71
|
+
*/
|
|
72
|
+
responseValidator?: (data: unknown) => Promise<unknown>;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Arbitrary metadata passed through the `meta` request option.
|
|
76
|
+
*/
|
|
77
|
+
export interface ClientMeta {
|
|
78
|
+
}
|
|
79
|
+
type IsExactlyNeverOrNeverUndefined<T> = [T] extends [never] ? true : [T] extends [never | undefined] ? [undefined] extends [T] ? false : true : false;
|
|
80
|
+
export type OmitNever<T extends Record<string, unknown>> = {
|
|
81
|
+
[K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];
|
|
82
|
+
};
|
|
83
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { BodySerializer, QuerySerializer } from './bodySerializer.gen.js';
|
|
2
|
+
export interface PathSerializer {
|
|
3
|
+
path: Record<string, unknown>;
|
|
4
|
+
url: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const PATH_PARAM_RE: RegExp;
|
|
7
|
+
export declare const defaultPathSerializer: ({ path, url: _url }: PathSerializer) => string;
|
|
8
|
+
export declare const getUrl: ({ baseUrl, path, query, querySerializer, url: _url, }: {
|
|
9
|
+
baseUrl?: string;
|
|
10
|
+
path?: Record<string, unknown>;
|
|
11
|
+
query?: Record<string, unknown>;
|
|
12
|
+
querySerializer: QuerySerializer;
|
|
13
|
+
url: string;
|
|
14
|
+
}) => string;
|
|
15
|
+
export declare function getValidRequestBody(options: {
|
|
16
|
+
body?: unknown;
|
|
17
|
+
bodySerializer?: BodySerializer | null;
|
|
18
|
+
serializedBody?: unknown;
|
|
19
|
+
}): unknown;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam, } from './pathSerializer.gen.js';
|
|
3
|
+
export const PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
4
|
+
export const defaultPathSerializer = ({ path, url: _url }) => {
|
|
5
|
+
let url = _url;
|
|
6
|
+
const matches = _url.match(PATH_PARAM_RE);
|
|
7
|
+
if (matches) {
|
|
8
|
+
for (const match of matches) {
|
|
9
|
+
let explode = false;
|
|
10
|
+
let name = match.substring(1, match.length - 1);
|
|
11
|
+
let style = 'simple';
|
|
12
|
+
if (name.endsWith('*')) {
|
|
13
|
+
explode = true;
|
|
14
|
+
name = name.substring(0, name.length - 1);
|
|
15
|
+
}
|
|
16
|
+
if (name.startsWith('.')) {
|
|
17
|
+
name = name.substring(1);
|
|
18
|
+
style = 'label';
|
|
19
|
+
}
|
|
20
|
+
else if (name.startsWith(';')) {
|
|
21
|
+
name = name.substring(1);
|
|
22
|
+
style = 'matrix';
|
|
23
|
+
}
|
|
24
|
+
const value = path[name];
|
|
25
|
+
if (value === undefined || value === null) {
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
if (Array.isArray(value)) {
|
|
29
|
+
url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
if (typeof value === 'object') {
|
|
33
|
+
url = url.replace(match, serializeObjectParam({
|
|
34
|
+
explode,
|
|
35
|
+
name,
|
|
36
|
+
style,
|
|
37
|
+
value: value,
|
|
38
|
+
valueOnly: true,
|
|
39
|
+
}));
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
if (style === 'matrix') {
|
|
43
|
+
url = url.replace(match, `;${serializePrimitiveParam({
|
|
44
|
+
name,
|
|
45
|
+
value: value,
|
|
46
|
+
})}`);
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const replaceValue = encodeURIComponent(style === 'label' ? `.${value}` : value);
|
|
50
|
+
url = url.replace(match, replaceValue);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return url;
|
|
54
|
+
};
|
|
55
|
+
export const getUrl = ({ baseUrl, path, query, querySerializer, url: _url, }) => {
|
|
56
|
+
const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;
|
|
57
|
+
let url = (baseUrl ?? '') + pathUrl;
|
|
58
|
+
if (path) {
|
|
59
|
+
url = defaultPathSerializer({ path, url });
|
|
60
|
+
}
|
|
61
|
+
let search = query ? querySerializer(query) : '';
|
|
62
|
+
if (search.startsWith('?')) {
|
|
63
|
+
search = search.substring(1);
|
|
64
|
+
}
|
|
65
|
+
if (search) {
|
|
66
|
+
url += `?${search}`;
|
|
67
|
+
}
|
|
68
|
+
return url;
|
|
69
|
+
};
|
|
70
|
+
export function getValidRequestBody(options) {
|
|
71
|
+
const hasBody = options.body !== undefined;
|
|
72
|
+
const isSerializedBody = hasBody && options.bodySerializer;
|
|
73
|
+
if (isSerializedBody) {
|
|
74
|
+
if ('serializedBody' in options) {
|
|
75
|
+
const hasSerializedBody = options.serializedBody !== undefined && options.serializedBody !== '';
|
|
76
|
+
return hasSerializedBody ? options.serializedBody : null;
|
|
77
|
+
}
|
|
78
|
+
// not all clients implement a serializedBody property (i.e., client-axios)
|
|
79
|
+
return options.body !== '' ? options.body : null;
|
|
80
|
+
}
|
|
81
|
+
// plain/text body
|
|
82
|
+
if (hasBody) {
|
|
83
|
+
return options.body;
|
|
84
|
+
}
|
|
85
|
+
// no body was provided
|
|
86
|
+
return undefined;
|
|
87
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.1.0-alpha.1",
|
|
3
|
+
"engines": {
|
|
4
|
+
"node": ">=24.16.0 <25 || >=26.1.0"
|
|
5
|
+
},
|
|
6
|
+
"packageManager": "pnpm@10.33.0",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@clack/prompts": "1.8.1",
|
|
9
|
+
"commander": "^15.0.0",
|
|
10
|
+
"ipaddr.js": "2.5.0",
|
|
11
|
+
"node-pg-migrate": "9.0.0",
|
|
12
|
+
"openid-client": "6.8.8",
|
|
13
|
+
"pg": "8.23.0",
|
|
14
|
+
"proper-lockfile": "4.1.2",
|
|
15
|
+
"undici": "8.10.2",
|
|
16
|
+
"yaml": "2.9.1",
|
|
17
|
+
"zod": "4.6.5"
|
|
18
|
+
},
|
|
19
|
+
"name": "@clawscarf/cli",
|
|
20
|
+
"private": false,
|
|
21
|
+
"bin": {
|
|
22
|
+
"clawscarf": "scripts/clawscarf.js"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"clawscarf": "node scripts/clawscarf.js",
|
|
26
|
+
"controller": "node scripts/controller.js"
|
|
27
|
+
},
|
|
28
|
+
"type": "module",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "git+https://github.com/clawscarf/clawscarf.git"
|
|
33
|
+
},
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
}
|
|
37
|
+
}
|
package/packs/README.md
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Optional packs
|
|
2
|
+
|
|
3
|
+
A ClawScarf pack groups native OpenClaw Claws. Each member is a normal
|
|
4
|
+
[CLAW.md](research-team/researcher/CLAW.md) package with an optional [OpenClaw profile](research-team/researcher/profiles/openclaw.yml). OpenClaw owns its agents,
|
|
5
|
+
workspace files, skills, plugins, MCP definitions, workflows and ownership records.
|
|
6
|
+
ClawScarf's small group manifest adds compatibility and prerequisite bindings; it
|
|
7
|
+
has no pack database or alternate installer for native resources.
|
|
8
|
+
Recipes can select pack IDs and members from the [CLI package](../release/README.md).
|
|
9
|
+
The CLI package carries the native files. Preparation records their content digests
|
|
10
|
+
and collects required operator/account inputs. No separate pack registry is involved.
|
|
11
|
+
|
|
12
|
+
The [research-team pack](research-team/pack.json) contains a researcher and reviewer
|
|
13
|
+
with workspace-only file tools. It requires the configured default model; it does
|
|
14
|
+
not install network tools, accounts or a provider. Its agents remain independent;
|
|
15
|
+
a person supplies material and transfers a draft for review.
|
|
16
|
+
|
|
17
|
+
## Select and change packs
|
|
18
|
+
|
|
19
|
+
Use `clawscarf configure --directory /path/to/team` to select bundled packs and
|
|
20
|
+
members. Noninteractive callers use `--pack <id:member,member>` and optional
|
|
21
|
+
`--pack-bindings <id=file>`. `--no-packs` removes all selected members. Changes
|
|
22
|
+
are reviewed before the server stops; native application finishes at startup.
|
|
23
|
+
|
|
24
|
+
The installation operator calls OpenClaw's native Claws preview/apply operations.
|
|
25
|
+
It preserves edited and unmanaged files, checks plan integrity and does not replay
|
|
26
|
+
uncertain mutations. Removing an agent remains destructive. Native monitor cleanup
|
|
27
|
+
uses OpenClaw's direct-local password authentication supplied by the
|
|
28
|
+
[runtime launcher](../runtime/README.md); trusted-proxy login remains in place for
|
|
29
|
+
people. Retained installations need the updated runtime image and a Gateway restart.
|
|
30
|
+
|
|
31
|
+
The private runtime helper only inspects packaged source. Individual portable Claws
|
|
32
|
+
can be built with native `openclaw claws build <member-directory> --out <artifact.tgz>`.
|
|
33
|
+
|
|
34
|
+
## Requirements and bindings
|
|
35
|
+
|
|
36
|
+
The manifest records model readiness, connection slots, binaries, execution location
|
|
37
|
+
and network requirements. `configured-default` checks native model configuration
|
|
38
|
+
and credential readiness, not a successful inference. It never sets a provider or
|
|
39
|
+
copies keys. Required binaries, network policy, native Claws commands, model readiness and
|
|
40
|
+
owned files are checked on the same protected team runtime.
|
|
41
|
+
The operator uses the official OpenShell SDK through its [transport](../scripts/packs/transport.py),
|
|
42
|
+
with the controller's existing TLS credentials. Supply its Python environment using
|
|
43
|
+
`--pack-python`; dependencies are pinned in [requirements.txt](../scripts/packs/requirements.txt).
|
|
44
|
+
Operations target the recorded runtime UUID, so replacing a sandbox under the same
|
|
45
|
+
name cannot redirect a mutation. Browser/controller credentials remain outside it.
|
|
46
|
+
|
|
47
|
+
A binding file contains:
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"origin": "https://team.example.com",
|
|
52
|
+
"brokerUrl": "https://team.example.com/_clawscarf/connections",
|
|
53
|
+
"sessionFile": "/private/current-session",
|
|
54
|
+
"connections": { "documents": "00000000-0000-4000-8000-000000000001" }
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Keep both files outside the pack. The generated REST client verifies the exact
|
|
59
|
+
account ID/type, current account state and grant for the target agent using the
|
|
60
|
+
administrator's current session. Missing selected-agent grants block preview;
|
|
61
|
+
never widen access automatically. Initial installation can use an existing account
|
|
62
|
+
already available to all agents. Once the pack exists, restrict that account to its
|
|
63
|
+
agent and reconfigure the pack. An account restricted to a not-yet-created agent needs
|
|
64
|
+
an explicit two-stage setup; this command does not invent pre-admission grants. The target plugin's configured broker must match the explicit `brokerUrl`. `origin`
|
|
65
|
+
is the administrator-facing management origin; these may differ in a local
|
|
66
|
+
composition (for example, localhost versus a private runtime hostname). This is
|
|
67
|
+
operator-owned deployment mapping, not discovery or cryptographic server identity.
|
|
68
|
+
All selected accounts must belong to the same server and their server IDs are
|
|
69
|
+
recorded in the reviewed plan. Public URL
|
|
70
|
+
matching does not prove runtime-credential validity: the broker still checks that
|
|
71
|
+
credential and current grants on each tool call.
|
|
72
|
+
|
|
73
|
+
A connection-dependent member declares `connectionFile`, for example accounts.json.
|
|
74
|
+
Its native [CLAW.md](research-team/researcher/CLAW.md) must explicitly include that file in `workspace.files`; the
|
|
75
|
+
pack's instructions must tell its agent to read it. ClawScarf renders only that
|
|
76
|
+
JSON file with schema version 1 and a `connections` array of slot, connectionId,
|
|
77
|
+
name and connectorId. It performs no prompt templating and copies no credential.
|
|
78
|
+
Native Claws previews and owns the file, including update/removal and preservation
|
|
79
|
+
of user edits. An account slot is therefore concrete agent-readable configuration,
|
|
80
|
+
not merely a successful prerequisite check.
|
|
81
|
+
|
|
82
|
+
Preview uploads a fresh private source directory; it does not overwrite earlier
|
|
83
|
+
staging directories or agent workspaces. Apply rechecks local/target digests, native
|
|
84
|
+
plan integrity, account revisions/grants and policy before mutation. A changed
|
|
85
|
+
account or source needs a new preview. No mutation is replayed automatically after
|
|
86
|
+
an uncertain result. Staged source directories remain available for native ownership
|
|
87
|
+
records and reviewed plans; deleting them invalidates those plans.
|
|
88
|
+
|
|
89
|
+
Network requirements are explicit objects with `binary` (canonical absolute target
|
|
90
|
+
path), `host` (exact DNS name), `port` and `protocol: "tcp"`. The operator checks the
|
|
91
|
+
runtime sandbox's effective policy against its acknowledged loaded revision, records exact
|
|
92
|
+
hash/version/config revision and rechecks for changes. Only unconditional exact
|
|
93
|
+
executable/TCP grants are supported. Global/provider-composed mismatches, wildcard,
|
|
94
|
+
audit and conditional/L7 policies fail closed. Omitted native protocol means proxy
|
|
95
|
+
passthrough, not transparent TCP, and does not satisfy a TCP requirement. This checks
|
|
96
|
+
loaded policy coverage, not DNS/reachability, successful account operations or
|
|
97
|
+
per-agent isolation when agents share an executable. It never changes policy.
|
|
98
|
+
|
|
99
|
+
## Verification
|
|
100
|
+
|
|
101
|
+
[Lifecycle checks](../tests/packs/lifecycle.test.ts) cover source changes, model
|
|
102
|
+
readiness changes and source-link rejection. The [native test](../tests/packs/native.test.ts)
|
|
103
|
+
uses vanilla OpenClaw with trusted-proxy auth and its local CLI password. It covers
|
|
104
|
+
both an ordinary pack member and one with an owned automation, including removal
|
|
105
|
+
after a Gateway restart, preservation of edited files and rejection of forwarded
|
|
106
|
+
password authentication. The copied fixture omits the model prerequisite; no model
|
|
107
|
+
inference is purchased. Set `CLAWSCARF_TEST_NATIVE_PACKS=1` to run it, optionally
|
|
108
|
+
with `CLAWSCARF_TEST_OPENCLAW` pointing at the packaged runtime launcher. The same
|
|
109
|
+
fixture has passed inside a disposable OpenShell runtime using the pinned upstream
|
|
110
|
+
image plus the updated launcher.
|
|
111
|
+
[Operator binding checks](../tests/packs/connections.test.ts) cover current session,
|
|
112
|
+
exact grants and revision drift. [Transport checks](../tests/packs/transport.test.ts)
|
|
113
|
+
cover UUID dispatch and uncertain failure without replay. The optional
|
|
114
|
+
[OpenShell binding test](../tests/packs/openshell.test.ts) uses controlled account HTTP
|
|
115
|
+
with real SDK/native package ownership on one runtime. It requires
|
|
116
|
+
`CLAWSCARF_TEST_PACK_SANDBOX`, the controller/SDK settings and an already-running
|
|
117
|
+
Gateway with native CLI authentication. Its token-authenticated fixture does not
|
|
118
|
+
qualify trusted-proxy removal, external OAuth or connector execution.
|
|
119
|
+
[Policy checks](../tests/packs/policy.test.ts) cover loaded acknowledgment and drift.
|
|
120
|
+
[Execution-target checks](../tests/packs/execution-target.test.ts) use controlled operator
|
|
121
|
+
processes to verify unified runtime dispatch, missing binaries, denied policy
|
|
122
|
+
and runtime replacement. They do not replace live OpenShell qualification.
|
|
123
|
+
A disposable runtime with the image's nftables 1.1.3/libnftnl 1.2.9 dependencies
|
|
124
|
+
loaded an explicit TCP policy: verification accepted its exact process/host/port
|
|
125
|
+
and rejected a different port. This qualifies policy observation and matching;
|
|
126
|
+
it does not establish a successful connector request or application execution.
|
|
127
|
+
|
|
128
|
+
Run `CLAWSCARF_TEST_NATIVE_PACKS=1 pnpm exec tsx --test tests/packs/native.test.ts`
|
|
129
|
+
for the disposable native test. It writes isolated temporary state and uses the
|
|
130
|
+
pinned OpenClaw dependency installed for the Connections plugin.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "research-team",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"openclaw": "2026.9.4",
|
|
6
|
+
"description": "A researcher and a reviewer for evidence-based team briefs.",
|
|
7
|
+
"members": [
|
|
8
|
+
{
|
|
9
|
+
"id": "researcher",
|
|
10
|
+
"source": "researcher",
|
|
11
|
+
"requirements": { "model": "configured-default", "connections": [] }
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"id": "reviewer",
|
|
15
|
+
"source": "reviewer",
|
|
16
|
+
"requirements": { "model": "configured-default", "connections": [] }
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"execution": { "location": "native-tools", "binaries": [], "network": [] }
|
|
20
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
schemaVersion: 1
|
|
3
|
+
agent:
|
|
4
|
+
id: researcher
|
|
5
|
+
name: Researcher
|
|
6
|
+
workspace:
|
|
7
|
+
bootstrapFiles: {}
|
|
8
|
+
packages: []
|
|
9
|
+
mcpServers: {}
|
|
10
|
+
cronJobs: []
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Researcher
|
|
14
|
+
|
|
15
|
+
Prepare concise briefs from the material the team supplies. Separate evidence,
|
|
16
|
+
inference and unanswered questions. Cite the supplied source for every material
|
|
17
|
+
claim. Ask for missing source material instead of inventing it. Write drafts only
|
|
18
|
+
inside your workspace. Hand the draft to a human for review; never publish or send
|
|
19
|
+
messages on the team's behalf without explicit authorization.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
schemaVersion: 1
|
|
3
|
+
agent:
|
|
4
|
+
id: reviewer
|
|
5
|
+
name: Reviewer
|
|
6
|
+
workspace:
|
|
7
|
+
bootstrapFiles: {}
|
|
8
|
+
packages: []
|
|
9
|
+
mcpServers: {}
|
|
10
|
+
cronJobs: []
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Reviewer
|
|
14
|
+
|
|
15
|
+
Review briefs supplied by the team. Identify unsupported claims, missing context,
|
|
16
|
+
contradictions and decisions that need a human. Distinguish blocking findings from
|
|
17
|
+
optional wording improvements. Preserve source quotations and provide concise,
|
|
18
|
+
actionable review notes. Write only inside your workspace. Do not access another
|
|
19
|
+
agent's files or publish material unless a human explicitly supplies and authorizes it.
|