forge-openclaw-plugin 0.2.44 → 0.2.47
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/dist/assets/index-BejDHw1R.js +91 -0
- package/dist/assets/index-BejDHw1R.js.map +1 -0
- package/dist/index.html +1 -1
- package/dist/openclaw/api-client.d.ts +1 -0
- package/dist/openclaw/plugin-entry-shared.js +13 -0
- package/dist/openclaw/session-bootstrap.d.ts +11 -0
- package/dist/openclaw/session-bootstrap.js +151 -13
- package/dist/server/server/migrations/050_agent_token_bootstrap_policy.sql +2 -0
- package/dist/server/server/migrations/051_agent_token_scope_policy.sql +2 -0
- package/dist/server/server/src/app.js +193 -43
- package/dist/server/server/src/managers/platform/authentication-manager.js +5 -0
- package/dist/server/server/src/managers/platform/session-manager.js +5 -0
- package/dist/server/server/src/openapi.js +59 -0
- package/dist/server/server/src/repositories/settings.js +26 -6
- package/dist/server/server/src/types.js +83 -1
- package/dist/server/src/lib/schemas.js +16 -1
- package/openclaw.plugin.json +10 -1
- package/package.json +1 -1
- package/server/migrations/050_agent_token_bootstrap_policy.sql +2 -0
- package/server/migrations/051_agent_token_scope_policy.sql +2 -0
- package/dist/assets/index-s24CefIb.js +0 -91
- package/dist/assets/index-s24CefIb.js.map +0 -1
|
@@ -213,6 +213,77 @@ export const approvalModeSchema = z.enum([
|
|
|
213
213
|
"high_impact_only",
|
|
214
214
|
"none"
|
|
215
215
|
]);
|
|
216
|
+
export const agentBootstrapModeSchema = z.enum([
|
|
217
|
+
"disabled",
|
|
218
|
+
"active_only",
|
|
219
|
+
"scoped",
|
|
220
|
+
"full"
|
|
221
|
+
]);
|
|
222
|
+
export const defaultAgentBootstrapPolicy = {
|
|
223
|
+
mode: "active_only",
|
|
224
|
+
goalsLimit: 5,
|
|
225
|
+
projectsLimit: 8,
|
|
226
|
+
tasksLimit: 10,
|
|
227
|
+
habitsLimit: 6,
|
|
228
|
+
strategiesLimit: 4,
|
|
229
|
+
peoplePageLimit: 4,
|
|
230
|
+
includePeoplePages: true
|
|
231
|
+
};
|
|
232
|
+
export const legacyAgentBootstrapPolicy = {
|
|
233
|
+
mode: "full",
|
|
234
|
+
goalsLimit: 25,
|
|
235
|
+
projectsLimit: 25,
|
|
236
|
+
tasksLimit: 25,
|
|
237
|
+
habitsLimit: 20,
|
|
238
|
+
strategiesLimit: 20,
|
|
239
|
+
peoplePageLimit: 12,
|
|
240
|
+
includePeoplePages: true
|
|
241
|
+
};
|
|
242
|
+
export const agentBootstrapPolicySchema = z.object({
|
|
243
|
+
mode: agentBootstrapModeSchema.default(defaultAgentBootstrapPolicy.mode),
|
|
244
|
+
goalsLimit: z.coerce
|
|
245
|
+
.number()
|
|
246
|
+
.int()
|
|
247
|
+
.min(0)
|
|
248
|
+
.max(100)
|
|
249
|
+
.default(defaultAgentBootstrapPolicy.goalsLimit),
|
|
250
|
+
projectsLimit: z.coerce
|
|
251
|
+
.number()
|
|
252
|
+
.int()
|
|
253
|
+
.min(0)
|
|
254
|
+
.max(100)
|
|
255
|
+
.default(defaultAgentBootstrapPolicy.projectsLimit),
|
|
256
|
+
tasksLimit: z.coerce
|
|
257
|
+
.number()
|
|
258
|
+
.int()
|
|
259
|
+
.min(0)
|
|
260
|
+
.max(100)
|
|
261
|
+
.default(defaultAgentBootstrapPolicy.tasksLimit),
|
|
262
|
+
habitsLimit: z.coerce
|
|
263
|
+
.number()
|
|
264
|
+
.int()
|
|
265
|
+
.min(0)
|
|
266
|
+
.max(100)
|
|
267
|
+
.default(defaultAgentBootstrapPolicy.habitsLimit),
|
|
268
|
+
strategiesLimit: z.coerce
|
|
269
|
+
.number()
|
|
270
|
+
.int()
|
|
271
|
+
.min(0)
|
|
272
|
+
.max(100)
|
|
273
|
+
.default(defaultAgentBootstrapPolicy.strategiesLimit),
|
|
274
|
+
peoplePageLimit: z.coerce
|
|
275
|
+
.number()
|
|
276
|
+
.int()
|
|
277
|
+
.min(0)
|
|
278
|
+
.max(50)
|
|
279
|
+
.default(defaultAgentBootstrapPolicy.peoplePageLimit),
|
|
280
|
+
includePeoplePages: z.boolean().default(defaultAgentBootstrapPolicy.includePeoplePages)
|
|
281
|
+
});
|
|
282
|
+
export const defaultAgentScopePolicy = {
|
|
283
|
+
userIds: [],
|
|
284
|
+
projectIds: [],
|
|
285
|
+
tagIds: []
|
|
286
|
+
};
|
|
216
287
|
export const agentRuntimeProviderSchema = z.enum([
|
|
217
288
|
"openclaw",
|
|
218
289
|
"hermes",
|
|
@@ -393,6 +464,13 @@ const uniqueStringArraySchema = z
|
|
|
393
464
|
seen.add(value);
|
|
394
465
|
});
|
|
395
466
|
});
|
|
467
|
+
export const agentScopePolicySchema = z.object({
|
|
468
|
+
userIds: uniqueStringArraySchema.default(() => [...defaultAgentScopePolicy.userIds]),
|
|
469
|
+
projectIds: uniqueStringArraySchema.default(() => [
|
|
470
|
+
...defaultAgentScopePolicy.projectIds
|
|
471
|
+
]),
|
|
472
|
+
tagIds: uniqueStringArraySchema.default(() => [...defaultAgentScopePolicy.tagIds])
|
|
473
|
+
});
|
|
396
474
|
const integerMinuteSchema = z
|
|
397
475
|
.number()
|
|
398
476
|
.int()
|
|
@@ -2013,6 +2091,8 @@ export const agentTokenSummarySchema = z.object({
|
|
|
2013
2091
|
autonomyMode: autonomyModeSchema,
|
|
2014
2092
|
approvalMode: approvalModeSchema,
|
|
2015
2093
|
description: z.string(),
|
|
2094
|
+
bootstrapPolicy: agentBootstrapPolicySchema,
|
|
2095
|
+
scopePolicy: agentScopePolicySchema,
|
|
2016
2096
|
lastUsedAt: z.string().nullable(),
|
|
2017
2097
|
revokedAt: z.string().nullable(),
|
|
2018
2098
|
createdAt: z.string(),
|
|
@@ -3522,7 +3602,9 @@ export const createAgentTokenSchema = z.object({
|
|
|
3522
3602
|
trustLevel: agentTrustLevelSchema.default("standard"),
|
|
3523
3603
|
autonomyMode: autonomyModeSchema.default("approval_required"),
|
|
3524
3604
|
approvalMode: approvalModeSchema.default("approval_by_default"),
|
|
3525
|
-
scopes: uniqueStringArraySchema.default(["read", "write", "insights"])
|
|
3605
|
+
scopes: uniqueStringArraySchema.default(["read", "write", "insights"]),
|
|
3606
|
+
bootstrapPolicy: agentBootstrapPolicySchema.default(defaultAgentBootstrapPolicy),
|
|
3607
|
+
scopePolicy: agentScopePolicySchema.default(defaultAgentScopePolicy)
|
|
3526
3608
|
});
|
|
3527
3609
|
export const activityArchiveQuerySchema = activityListQuerySchema.extend({
|
|
3528
3610
|
groupBy: z.enum(["day", "entity"]).optional(),
|
|
@@ -138,7 +138,22 @@ export const createAgentTokenSchema = z.object({
|
|
|
138
138
|
trustLevel: z.enum(["standard", "trusted", "autonomous"]),
|
|
139
139
|
autonomyMode: z.enum(["approval_required", "scoped_write", "autonomous"]),
|
|
140
140
|
approvalMode: z.enum(["approval_by_default", "high_impact_only", "none"]),
|
|
141
|
-
scopes: z.array(z.string().trim().min(1)).min(1)
|
|
141
|
+
scopes: z.array(z.string().trim().min(1)).min(1),
|
|
142
|
+
bootstrapPolicy: z.object({
|
|
143
|
+
mode: z.enum(["disabled", "active_only", "scoped", "full"]),
|
|
144
|
+
goalsLimit: z.coerce.number().int().min(0).max(100),
|
|
145
|
+
projectsLimit: z.coerce.number().int().min(0).max(100),
|
|
146
|
+
tasksLimit: z.coerce.number().int().min(0).max(100),
|
|
147
|
+
habitsLimit: z.coerce.number().int().min(0).max(100),
|
|
148
|
+
strategiesLimit: z.coerce.number().int().min(0).max(100),
|
|
149
|
+
peoplePageLimit: z.coerce.number().int().min(0).max(50),
|
|
150
|
+
includePeoplePages: z.boolean()
|
|
151
|
+
}),
|
|
152
|
+
scopePolicy: z.object({
|
|
153
|
+
userIds: z.array(z.string().trim().min(1)),
|
|
154
|
+
projectIds: z.array(z.string().trim().min(1)),
|
|
155
|
+
tagIds: z.array(z.string().trim().min(1))
|
|
156
|
+
})
|
|
142
157
|
});
|
|
143
158
|
export const createInsightSchema = z.object({
|
|
144
159
|
originType: z.enum(["system", "user", "agent"]),
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "forge-openclaw-plugin",
|
|
3
3
|
"name": "Forge",
|
|
4
4
|
"description": "Curated OpenClaw adapter for the Forge collaboration API, UI entrypoint, and localhost auto-start runtime.",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.47",
|
|
6
6
|
"skills": [
|
|
7
7
|
"./skills"
|
|
8
8
|
],
|
|
@@ -34,6 +34,10 @@
|
|
|
34
34
|
"help": "Optional acting user label for provenance. Leave blank to inherit the local operator session label, or set one when a child agent should announce itself under a specific user.",
|
|
35
35
|
"placeholder": "Inherited from Forge operator session"
|
|
36
36
|
},
|
|
37
|
+
"injectBootstrapContext": {
|
|
38
|
+
"label": "Inject Bootstrap Context",
|
|
39
|
+
"help": "Enabled by default. Turn this off when you want OpenClaw sessions to start without a preseeded Forge BOOTSTRAP.md context file to conserve token budget."
|
|
40
|
+
},
|
|
37
41
|
"timeoutMs": {
|
|
38
42
|
"label": "Request Timeout (ms)",
|
|
39
43
|
"help": "Maximum time to wait before the plugin aborts an upstream Forge request.",
|
|
@@ -71,6 +75,11 @@
|
|
|
71
75
|
"default": "",
|
|
72
76
|
"description": "Optional acting user label recorded in Forge provenance headers. Leave blank to inherit the local operator session label automatically."
|
|
73
77
|
},
|
|
78
|
+
"injectBootstrapContext": {
|
|
79
|
+
"type": "boolean",
|
|
80
|
+
"default": true,
|
|
81
|
+
"description": "Whether OpenClaw should inject a preseeded Forge BOOTSTRAP.md file into new agent sessions. Disable this to conserve context or model-token budget."
|
|
82
|
+
},
|
|
74
83
|
"timeoutMs": {
|
|
75
84
|
"type": "integer",
|
|
76
85
|
"default": 15000,
|
package/package.json
CHANGED