clawchef 0.1.5 → 0.1.7
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 +24 -16
- package/dist/api.d.ts +3 -1
- package/dist/api.js +10 -1
- package/dist/cli.js +37 -6
- package/dist/env.js +1 -1
- package/dist/openclaw/command-provider.d.ts +1 -1
- package/dist/openclaw/command-provider.js +31 -23
- package/dist/openclaw/mock-provider.d.ts +1 -1
- package/dist/openclaw/mock-provider.js +1 -1
- package/dist/openclaw/provider.d.ts +1 -1
- package/dist/openclaw/remote-provider.d.ts +1 -1
- package/dist/openclaw/remote-provider.js +1 -1
- package/dist/orchestrator.js +74 -50
- package/dist/recipe.js +57 -24
- package/dist/schema.d.ts +72 -107
- package/dist/schema.js +15 -21
- package/dist/types.d.ts +6 -11
- package/package.json +1 -1
- package/recipes/content-from-sample.yaml +13 -9
- package/recipes/openclaw-from-zero.yaml +2 -2
- package/recipes/openclaw-local.yaml +8 -10
- package/recipes/openclaw-remote-http.yaml +6 -8
- package/recipes/sample.yaml +6 -8
- package/recipes/snippets/readme-template.md +3 -1
- package/src/api.ts +13 -2
- package/src/cli.ts +39 -7
- package/src/env.ts +1 -1
- package/src/openclaw/command-provider.ts +34 -24
- package/src/openclaw/mock-provider.ts +1 -1
- package/src/openclaw/provider.ts +1 -1
- package/src/openclaw/remote-provider.ts +1 -1
- package/src/orchestrator.ts +74 -49
- package/src/recipe.ts +63 -24
- package/src/schema.ts +17 -22
- package/src/types.ts +6 -11
package/src/schema.ts
CHANGED
|
@@ -39,13 +39,7 @@ const openClawBootstrapSchema = z
|
|
|
39
39
|
skip_ui: z.boolean().optional(),
|
|
40
40
|
skip_daemon: z.boolean().optional(),
|
|
41
41
|
install_daemon: z.boolean().optional(),
|
|
42
|
-
|
|
43
|
-
anthropic_api_key: z.string().optional(),
|
|
44
|
-
openrouter_api_key: z.string().optional(),
|
|
45
|
-
xai_api_key: z.string().optional(),
|
|
46
|
-
gemini_api_key: z.string().optional(),
|
|
47
|
-
ai_gateway_api_key: z.string().optional(),
|
|
48
|
-
cloudflare_ai_gateway_api_key: z.string().optional(),
|
|
42
|
+
llm_api_key: z.string().optional(),
|
|
49
43
|
cloudflare_ai_gateway_account_id: z.string().optional(),
|
|
50
44
|
cloudflare_ai_gateway_gateway_id: z.string().optional(),
|
|
51
45
|
token: z.string().optional(),
|
|
@@ -70,6 +64,22 @@ const workspaceSchema = z
|
|
|
70
64
|
name: z.string().min(1),
|
|
71
65
|
path: z.string().min(1).optional(),
|
|
72
66
|
assets: z.string().min(1).optional(),
|
|
67
|
+
files: z
|
|
68
|
+
.array(
|
|
69
|
+
z
|
|
70
|
+
.object({
|
|
71
|
+
path: z.string().min(1),
|
|
72
|
+
content: z.string().optional(),
|
|
73
|
+
content_from: z.string().min(1).optional(),
|
|
74
|
+
source: z.string().optional(),
|
|
75
|
+
overwrite: z.boolean().optional(),
|
|
76
|
+
})
|
|
77
|
+
.strict()
|
|
78
|
+
.refine((v) => [v.content, v.content_from, v.source].filter((item) => item !== undefined).length === 1, {
|
|
79
|
+
message: "workspaces[].files[] requires exactly one of content, content_from, or source",
|
|
80
|
+
}),
|
|
81
|
+
)
|
|
82
|
+
.optional(),
|
|
73
83
|
})
|
|
74
84
|
.strict();
|
|
75
85
|
|
|
@@ -104,20 +114,6 @@ const agentSchema = z
|
|
|
104
114
|
})
|
|
105
115
|
.strict();
|
|
106
116
|
|
|
107
|
-
const fileSchema = z
|
|
108
|
-
.object({
|
|
109
|
-
workspace: z.string().min(1),
|
|
110
|
-
path: z.string().min(1),
|
|
111
|
-
content: z.string().optional(),
|
|
112
|
-
content_from: z.string().min(1).optional(),
|
|
113
|
-
source: z.string().optional(),
|
|
114
|
-
overwrite: z.boolean().optional(),
|
|
115
|
-
})
|
|
116
|
-
.strict()
|
|
117
|
-
.refine((v) => [v.content, v.content_from, v.source].filter((item) => item !== undefined).length === 1, {
|
|
118
|
-
message: "files[] requires exactly one of content, content_from, or source",
|
|
119
|
-
});
|
|
120
|
-
|
|
121
117
|
const conversationExpectSchema = z
|
|
122
118
|
.object({
|
|
123
119
|
contains: z.array(z.string()).optional(),
|
|
@@ -152,7 +148,6 @@ export const recipeSchema = z
|
|
|
152
148
|
workspaces: z.array(workspaceSchema).optional(),
|
|
153
149
|
channels: z.array(channelSchema).optional(),
|
|
154
150
|
agents: z.array(agentSchema).optional(),
|
|
155
|
-
files: z.array(fileSchema).optional(),
|
|
156
151
|
conversations: z.array(conversationSchema).optional(),
|
|
157
152
|
})
|
|
158
153
|
.strict();
|
package/src/types.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type InstallPolicy = "auto" | "always" | "never";
|
|
2
2
|
export type OpenClawProvider = "command" | "mock" | "remote";
|
|
3
|
+
export type RunScope = "full" | "files" | "workspace";
|
|
3
4
|
|
|
4
5
|
export interface OpenClawRemoteConfig {
|
|
5
6
|
base_url: string;
|
|
@@ -46,13 +47,7 @@ export interface OpenClawBootstrap {
|
|
|
46
47
|
skip_ui?: boolean;
|
|
47
48
|
skip_daemon?: boolean;
|
|
48
49
|
install_daemon?: boolean;
|
|
49
|
-
|
|
50
|
-
anthropic_api_key?: string;
|
|
51
|
-
openrouter_api_key?: string;
|
|
52
|
-
xai_api_key?: string;
|
|
53
|
-
gemini_api_key?: string;
|
|
54
|
-
ai_gateway_api_key?: string;
|
|
55
|
-
cloudflare_ai_gateway_api_key?: string;
|
|
50
|
+
llm_api_key?: string;
|
|
56
51
|
cloudflare_ai_gateway_account_id?: string;
|
|
57
52
|
cloudflare_ai_gateway_gateway_id?: string;
|
|
58
53
|
token?: string;
|
|
@@ -73,6 +68,7 @@ export interface WorkspaceDef {
|
|
|
73
68
|
name: string;
|
|
74
69
|
path?: string;
|
|
75
70
|
assets?: string;
|
|
71
|
+
files?: WorkspaceFileDef[];
|
|
76
72
|
}
|
|
77
73
|
|
|
78
74
|
export interface ChannelDef {
|
|
@@ -102,8 +98,7 @@ export interface AgentDef {
|
|
|
102
98
|
skills?: string[];
|
|
103
99
|
}
|
|
104
100
|
|
|
105
|
-
export interface
|
|
106
|
-
workspace: string;
|
|
101
|
+
export interface WorkspaceFileDef {
|
|
107
102
|
path: string;
|
|
108
103
|
content?: string;
|
|
109
104
|
content_from?: string;
|
|
@@ -138,18 +133,18 @@ export interface Recipe {
|
|
|
138
133
|
workspaces?: WorkspaceDef[];
|
|
139
134
|
channels?: ChannelDef[];
|
|
140
135
|
agents?: AgentDef[];
|
|
141
|
-
files?: FileDef[];
|
|
142
136
|
conversations?: ConversationDef[];
|
|
143
137
|
}
|
|
144
138
|
|
|
145
139
|
export interface RunOptions {
|
|
146
140
|
vars: Record<string, string>;
|
|
147
141
|
plugins: string[];
|
|
142
|
+
scope: RunScope;
|
|
143
|
+
workspaceName?: string;
|
|
148
144
|
dryRun: boolean;
|
|
149
145
|
allowMissing: boolean;
|
|
150
146
|
verbose: boolean;
|
|
151
147
|
silent: boolean;
|
|
152
|
-
keepOpenClawState: boolean;
|
|
153
148
|
provider: OpenClawProvider;
|
|
154
149
|
remote: Partial<OpenClawRemoteConfig>;
|
|
155
150
|
}
|