Skip to content

Commit d21af41

Browse files
committed
fix: repair CI workspace and sandbox checks
1 parent 4ca1846 commit d21af41

6 files changed

Lines changed: 175 additions & 91 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
summary: "Agent identity record"
3+
title: "IDENTITY template"
4+
read_when:
5+
- Bootstrapping a workspace manually
6+
---
7+
8+
# IDENTITY.md - Who Am I?
9+
10+
_Fill this in during your first conversation. Make it yours._
11+
12+
- **Name:**
13+
_(pick something you like)_
14+
- **Creature:**
15+
_(AI? robot? familiar? ghost in the machine? something weirder?)_
16+
- **Vibe:**
17+
_(how do you come across? sharp? warm? chaotic? calm?)_
18+
- **Emoji:**
19+
_(your signature — pick one that feels right)_
20+
- **Avatar:**
21+
_(workspace-relative path, http(s) URL, or data URI)_
22+
23+
---
24+
25+
This isn't just metadata. It's the start of figuring out who you are.
26+
27+
Notes:
28+
29+
- Save this file at the workspace root as `IDENTITY.md`.
30+
- For avatars, use a workspace-relative path like `avatars/openclaw.png`.
31+
32+
## Related
33+
34+
- [Agent workspace](/concepts/agent-workspace)

docs/reference/templates/USER.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
summary: "User profile record"
3+
title: "USER template"
4+
read_when:
5+
- Bootstrapping a workspace manually
6+
---
7+
8+
# USER.md - About Your Human
9+
10+
_Learn about the person you're helping. Update this as you go._
11+
12+
- **Name:**
13+
- **What to call them:**
14+
- **Pronouns:** _(optional)_
15+
- **Timezone:**
16+
- **Notes:**
17+
18+
## Context
19+
20+
_(What do they care about? What projects are they working on? What annoys them? What makes them laugh? Build this over time.)_
21+
22+
---
23+
24+
The more you know, the better you can help. But remember — you're learning about a person, not building a dossier. Respect the difference.
25+
26+
## Related
27+
28+
- [Agent workspace](/concepts/agent-workspace)

extensions/browser/src/browser/pw-tools-core.interactions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ export async function clickCoordsViaPlaywright(opts: {
619619
delay: resolveBoundedDelayMs(opts.delayMs, "clickCoords delayMs", ACT_MAX_CLICK_DELAY_MS),
620620
});
621621
} finally {
622-
for (const modifier of [...modifiers].reverse()) {
622+
for (const modifier of modifiers.toReversed()) {
623623
await page.keyboard.up(modifier);
624624
}
625625
}
@@ -749,7 +749,7 @@ export async function pressKeyViaPlaywright(opts: {
749749
delay: Math.max(0, Math.floor(opts.delayMs ?? 0)),
750750
});
751751
} finally {
752-
for (const modifier of [...modifiers].reverse()) {
752+
for (const modifier of modifiers.toReversed()) {
753753
await page.keyboard.up(modifier);
754754
}
755755
}

src/local-kernel/hard-egress-firewall.ts

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,20 @@ import { spawnSync } from "node:child_process";
22
import net from "node:net";
33
import { resolveNetworkPolicyProxyRef } from "./network-policy.js";
44
import type {
5+
BuiltinFirewallCommand,
6+
BuiltinFirewallPlatform,
7+
BuiltinFirewallScope,
58
HardEgressEnforcementSnapshot,
69
SandboxBackendKind,
710
SandboxPolicySnapshot,
8-
} from "./sandbox-broker.js";
9-
10-
export type BuiltinFirewallPlatform = "linux_iptables" | "darwin_pf" | "windows_advfirewall";
11-
12-
export type BuiltinFirewallScope =
13-
| { kind: "uid"; value: string }
14-
| { kind: "gid"; value: string }
15-
| { kind: "program"; value: string }
16-
| { kind: "sid"; value: string };
17-
18-
export type SandboxWorkerIdentitySnapshot = {
19-
id: string;
20-
source: "managed_pool";
21-
uid?: number;
22-
gid?: number;
23-
sid?: string;
24-
scope: BuiltinFirewallScope;
25-
};
26-
27-
export type BuiltinFirewallCommand = {
28-
command: string;
29-
args: string[];
30-
};
11+
SandboxWorkerIdentitySnapshot,
12+
} from "./sandbox-contracts.js";
13+
export type {
14+
BuiltinFirewallCommand,
15+
BuiltinFirewallPlatform,
16+
BuiltinFirewallScope,
17+
SandboxWorkerIdentitySnapshot,
18+
} from "./sandbox-contracts.js";
3119

3220
export type BuiltinFirewallEgressPlan = {
3321
platform: BuiltinFirewallPlatform;

src/local-kernel/sandbox-broker.ts

Lines changed: 15 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,25 @@ import type { LocalKernelDatabase } from "./database.js";
66
import {
77
isBuiltinFirewallHardEgressHelper,
88
runBuiltinFirewallHardEgressHelper,
9-
type BuiltinFirewallCommand,
10-
type BuiltinFirewallPlatform,
11-
type SandboxWorkerIdentitySnapshot,
129
} from "./hard-egress-firewall.js";
1310
import { resolveNetworkPolicyProxyRef } from "./network-policy.js";
11+
import type {
12+
DockerSandboxPolicy,
13+
HardEgressEnforcementSnapshot,
14+
SandboxBackendKind,
15+
SandboxIsolationProfileId,
16+
SandboxPolicySnapshot,
17+
SandboxWorkerIdentitySnapshot,
18+
} from "./sandbox-contracts.js";
1419
import type { SandboxAllocationRecord } from "./types.js";
1520

16-
export type SandboxBackendKind =
17-
| "local/no_isolation"
18-
| "docker"
19-
| "bwrap"
20-
| "minijail"
21-
| "ssh"
22-
| "openshell"
23-
| "vm"
24-
| "other";
25-
26-
export type SandboxIsolationProfileId =
27-
| "trusted_local"
28-
| "web_brokered"
29-
| "readonly_workspace"
30-
| "rw_workspace"
31-
| "code_execution"
32-
| "plugin_untrusted";
21+
export type {
22+
DockerSandboxPolicy,
23+
HardEgressEnforcementSnapshot,
24+
SandboxBackendKind,
25+
SandboxIsolationProfileId,
26+
SandboxPolicySnapshot,
27+
} from "./sandbox-contracts.js";
3328

3429
export type SandboxAllocationRequest = {
3530
taskId: string;
@@ -60,52 +55,6 @@ export type SandboxCommandRequest = {
6055
maxOutputBytes?: number;
6156
};
6257

63-
export type DockerSandboxPolicy = {
64-
networkMode: "none" | "bridge";
65-
proxyServer?: string;
66-
memoryMb?: number;
67-
pidsLimit?: number;
68-
readOnlyRoot?: boolean;
69-
tmpfs?: string[];
70-
};
71-
72-
export type SandboxPolicySnapshot = {
73-
trustZoneId: string;
74-
backend: SandboxBackendKind;
75-
isolationProfile?: SandboxIsolationProfileId;
76-
filesystemPolicy?: unknown;
77-
maxProcesses?: number;
78-
maxMemoryMb?: number;
79-
maxRuntimeSeconds?: number;
80-
networkPolicy?: {
81-
id: string;
82-
defaultAction: "allow" | "deny";
83-
allowPrivateNetwork: boolean;
84-
allowedHosts?: string[];
85-
deniedCidrs?: string[];
86-
proxyRef?: string;
87-
};
88-
docker?: DockerSandboxPolicy;
89-
};
90-
91-
export type HardEgressEnforcementSnapshot = {
92-
helper: string;
93-
enforcementId: string;
94-
boundary: "host_firewall" | "egress_proxy" | "vm_firewall" | "platform_enforcer";
95-
description?: string;
96-
firewall?: {
97-
platform: BuiltinFirewallPlatform | string;
98-
scope: string;
99-
allowedCidrs?: string[];
100-
proxyDelegatedHosts?: string[];
101-
protocolCoverage?: string;
102-
releaseCommands?: BuiltinFirewallCommand[];
103-
applied?: boolean;
104-
limitations?: string[];
105-
};
106-
workerIdentity?: SandboxWorkerIdentitySnapshot;
107-
};
108-
10958
export type SandboxCommandResult = {
11059
allocationId: string;
11160
exitCode: number | null;
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
export type SandboxBackendKind =
2+
| "local/no_isolation"
3+
| "docker"
4+
| "bwrap"
5+
| "minijail"
6+
| "ssh"
7+
| "openshell"
8+
| "vm"
9+
| "other";
10+
11+
export type SandboxIsolationProfileId =
12+
| "trusted_local"
13+
| "web_brokered"
14+
| "readonly_workspace"
15+
| "rw_workspace"
16+
| "code_execution"
17+
| "plugin_untrusted";
18+
19+
export type BuiltinFirewallPlatform = "linux_iptables" | "darwin_pf" | "windows_advfirewall";
20+
21+
export type BuiltinFirewallScope =
22+
| { kind: "uid"; value: string }
23+
| { kind: "gid"; value: string }
24+
| { kind: "program"; value: string }
25+
| { kind: "sid"; value: string };
26+
27+
export type SandboxWorkerIdentitySnapshot = {
28+
id: string;
29+
source: "managed_pool";
30+
uid?: number;
31+
gid?: number;
32+
sid?: string;
33+
scope: BuiltinFirewallScope;
34+
};
35+
36+
export type BuiltinFirewallCommand = {
37+
command: string;
38+
args: string[];
39+
};
40+
41+
export type DockerSandboxPolicy = {
42+
networkMode: "none" | "bridge";
43+
proxyServer?: string;
44+
memoryMb?: number;
45+
pidsLimit?: number;
46+
readOnlyRoot?: boolean;
47+
tmpfs?: string[];
48+
};
49+
50+
export type SandboxPolicySnapshot = {
51+
trustZoneId: string;
52+
backend: SandboxBackendKind;
53+
isolationProfile?: SandboxIsolationProfileId;
54+
filesystemPolicy?: unknown;
55+
maxProcesses?: number;
56+
maxMemoryMb?: number;
57+
maxRuntimeSeconds?: number;
58+
networkPolicy?: {
59+
id: string;
60+
defaultAction: "allow" | "deny";
61+
allowPrivateNetwork: boolean;
62+
allowedHosts?: string[];
63+
deniedCidrs?: string[];
64+
proxyRef?: string;
65+
};
66+
docker?: DockerSandboxPolicy;
67+
};
68+
69+
export type HardEgressEnforcementSnapshot = {
70+
helper: string;
71+
enforcementId: string;
72+
boundary: "host_firewall" | "egress_proxy" | "vm_firewall" | "platform_enforcer";
73+
description?: string;
74+
firewall?: {
75+
platform: BuiltinFirewallPlatform | string;
76+
scope: string;
77+
allowedCidrs?: string[];
78+
proxyDelegatedHosts?: string[];
79+
protocolCoverage?: string;
80+
releaseCommands?: BuiltinFirewallCommand[];
81+
applied?: boolean;
82+
limitations?: string[];
83+
};
84+
workerIdentity?: SandboxWorkerIdentitySnapshot;
85+
};

0 commit comments

Comments
 (0)