Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/viewer/src/editor/useEditorState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export function useEditorState() {
const def = emptyDefinition();
if (name) def.name = name;
def.places = ["start"];
def.transitions = [{ name: "doSomething", type: "automatic", inputs: ["start"], outputs: [], guard: null }];
def.transitions = [{ name: "doSomething", type: "automatic", inputs: ["start"], outputs: [] }];
def.initialMarking = { start: 1 };
setDefinition(def);
setPositions(computeLayout(def));
Expand Down Expand Up @@ -215,7 +215,7 @@ export function useEditorState() {
...d,
transitions: [
...d.transitions,
{ name, type: "automatic", inputs: [], outputs: [], guard: null },
{ name, type: "automatic", inputs: [], outputs: [] },
],
}));
const tid = `t:${name}`;
Expand Down
1 change: 0 additions & 1 deletion apps/viewer/src/hooks/useAnalysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export function useAnalysis(viewerNet: ViewerNet) {
transitions: viewerNet.net.transitions.map((t) => ({
...t,
type: "automatic",
guard: null as string | null,
})),
initialMarking: viewerNet.net.initialMarking,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "automatic",
inputs: ["idle"],
outputs: ["toolChoice"],
guard: null,
},

// Search tool — consumes budget, recirculates control
Expand All @@ -42,7 +41,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "http",
inputs: ["toolChoice", "toolBudget"],
outputs: ["toolChoice", "searchDone"],
guard: null,
},

// File tool — consumes budget, recirculates control
Expand All @@ -51,7 +49,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "http",
inputs: ["toolChoice", "toolBudget"],
outputs: ["toolChoice", "fileDone"],
guard: null,
},

// Privileged tool — requires privilege token (starts at 0, never produced)
Expand All @@ -60,7 +57,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "script",
inputs: ["toolChoice", "toolBudget", "privilegeToken"],
outputs: ["toolChoice", "privilegedDone"],
guard: null,
},

// Finish — when done choosing tools
Expand All @@ -69,7 +65,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "automatic",
inputs: ["toolChoice"],
outputs: ["responseGenerated"],
guard: null,
},
],
initialMarking: {
Expand Down
8 changes: 0 additions & 8 deletions comparisons/openclaw-safety/src/scenarios/message-gating.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "automatic",
inputs: ["inboundMessage"],
outputs: ["senderCheck"],
guard: null,
},

// Known sender → paired
Expand All @@ -62,7 +61,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "automatic",
inputs: ["unknownSender"],
outputs: ["pairingPrompted"],
guard: null,
},

// User submits pairing code
Expand All @@ -71,7 +69,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "manual",
inputs: ["pairingPrompted"],
outputs: ["pairingCodeReceived"],
guard: null,
},

// Valid code → paired
Expand All @@ -80,7 +77,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "automatic",
inputs: ["pairingCodeReceived"],
outputs: ["pairedSender"],
guard: null,
},

// Invalid code → rejected
Expand All @@ -89,7 +85,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "automatic",
inputs: ["pairingCodeReceived"],
outputs: ["rejected"],
guard: null,
},

// Reject unknown sender directly
Expand All @@ -98,7 +93,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "automatic",
inputs: ["unknownSender"],
outputs: ["rejected"],
guard: null,
},

// Paired sender proceeds to processing
Expand All @@ -107,7 +101,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "automatic",
inputs: ["pairedSender"],
outputs: ["processing"],
guard: null,
},

// Process and deliver
Expand All @@ -116,7 +109,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "ai",
inputs: ["processing"],
outputs: ["responseDelivered"],
guard: null,
},
],
initialMarking: {
Expand Down
23 changes: 0 additions & 23 deletions comparisons/openclaw-safety/src/scenarios/sandbox-isolation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "automatic",
inputs: ["agentIdle"],
outputs: ["sandboxReady"],
guard: null,
},

// Run command in sandbox (consumes budget)
Expand All @@ -48,7 +47,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "script",
inputs: ["sandboxReady", "budget"],
outputs: ["sandboxExecRunning"],
guard: null,
},

// Sandbox exec completes
Expand All @@ -57,7 +55,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "automatic",
inputs: ["sandboxExecRunning"],
outputs: ["sandboxExecDone"],
guard: null,
},

// Request elevation to escape sandbox (consumes budget at request time)
Expand All @@ -66,7 +63,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "automatic",
inputs: ["sandboxReady", "budget"],
outputs: ["elevationRequested"],
guard: null,
},

// Approve elevation (manual — human must approve)
Expand All @@ -75,7 +71,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "manual",
inputs: ["elevationRequested"],
outputs: ["elevationApproved"],
guard: null,
},

// Deny elevation (manual — returns to sandbox and refunds budget)
Expand All @@ -84,7 +79,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "manual",
inputs: ["elevationRequested"],
outputs: ["sandboxReady", "budget"],
guard: null,
},

// Run on host (requires elevation approval; budget already consumed at request)
Expand All @@ -93,7 +87,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "script",
inputs: ["elevationApproved"],
outputs: ["hostExecRunning"],
guard: null,
},

// Host exec completes
Expand All @@ -102,7 +95,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "automatic",
inputs: ["hostExecRunning"],
outputs: ["hostExecDone"],
guard: null,
},

// Collect results (from either sandbox or host)
Expand All @@ -111,14 +103,12 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "automatic",
inputs: ["sandboxExecDone"],
outputs: ["resultCollected"],
guard: null,
},
{
name: "collectHostResult",
type: "automatic",
inputs: ["hostExecDone"],
outputs: ["resultCollected"],
guard: null,
},

// Continue working (loop back to sandbox)
Expand All @@ -127,7 +117,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "automatic",
inputs: ["resultCollected"],
outputs: ["sandboxReady"],
guard: null,
},

// Finish
Expand All @@ -136,7 +125,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "automatic",
inputs: ["sandboxReady"],
outputs: ["done"],
guard: null,
},
],
initialMarking: {
Expand Down Expand Up @@ -178,78 +166,67 @@ export const lockedDefinition = defineWorkflow<Place, Ctx>({
type: "automatic",
inputs: ["agentIdle"],
outputs: ["sandboxReady"],
guard: null,
},
{
name: "runSandbox",
type: "script",
inputs: ["sandboxReady", "budget"],
outputs: ["sandboxExecRunning"],
guard: null,
},
{
name: "completeSandbox",
type: "automatic",
inputs: ["sandboxExecRunning"],
outputs: ["sandboxExecDone"],
guard: null,
},
{
name: "requestElevation",
type: "automatic",
inputs: ["sandboxReady", "budget"],
outputs: ["elevationRequested"],
guard: null,
},
// approveElevation REMOVED — elevation can never be granted
{
name: "denyElevation",
type: "manual",
inputs: ["elevationRequested"],
outputs: ["sandboxReady", "budget"],
guard: null,
},
{
name: "runHost",
type: "script",
inputs: ["elevationApproved"],
outputs: ["hostExecRunning"],
guard: null,
},
{
name: "completeHost",
type: "automatic",
inputs: ["hostExecRunning"],
outputs: ["hostExecDone"],
guard: null,
},
{
name: "collectSandboxResult",
type: "automatic",
inputs: ["sandboxExecDone"],
outputs: ["resultCollected"],
guard: null,
},
{
name: "collectHostResult",
type: "automatic",
inputs: ["hostExecDone"],
outputs: ["resultCollected"],
guard: null,
},
{
name: "continueWork",
type: "automatic",
inputs: ["resultCollected"],
outputs: ["sandboxReady"],
guard: null,
},
{
name: "finish",
type: "automatic",
inputs: ["sandboxReady"],
outputs: ["done"],
guard: null,
},
],
initialMarking: {
Expand Down
11 changes: 0 additions & 11 deletions comparisons/openclaw-safety/src/scenarios/tool-approval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "automatic",
inputs: ["idle"],
outputs: ["taskReceived"],
guard: null,
},

// Fan-out to three tool tracks
Expand All @@ -50,7 +49,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "automatic",
inputs: ["taskReceived"],
outputs: ["searchReady", "fileReadReady", "shellPending"],
guard: null,
},

// === Search (no approval needed) ===
Expand All @@ -59,7 +57,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "http",
inputs: ["searchReady", "budget"],
outputs: ["searchDone"],
guard: null,
},

// === File read (no approval needed) ===
Expand All @@ -68,7 +65,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "http",
inputs: ["fileReadReady", "budget"],
outputs: ["fileReadDone"],
guard: null,
},

// === Shell (requires approval gate) ===
Expand All @@ -77,28 +73,24 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "automatic",
inputs: ["shellPending"],
outputs: ["shellAwaitingApproval"],
guard: null,
},
{
name: "approveShell",
type: "manual",
inputs: ["shellAwaitingApproval"],
outputs: ["shellApproved"],
guard: null,
},
{
name: "rejectShell",
type: "manual",
inputs: ["shellAwaitingApproval"],
outputs: ["shellDone"],
guard: null,
},
{
name: "execShell",
type: "script",
inputs: ["shellApproved", "budget"],
outputs: ["shellDone"],
guard: null,
},

// Skip shell entirely
Expand All @@ -107,7 +99,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "automatic",
inputs: ["shellPending"],
outputs: ["shellDone"],
guard: null,
},

// AND-join: all three tracks must complete
Expand All @@ -116,7 +107,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "automatic",
inputs: ["searchDone", "fileReadDone", "shellDone"],
outputs: ["resultsReady"],
guard: null,
},

// Generate response
Expand All @@ -125,7 +115,6 @@ export const definition = defineWorkflow<Place, Ctx>({
type: "ai",
inputs: ["resultsReady"],
outputs: ["responseGenerated"],
guard: null,
},
],
initialMarking: {
Expand Down
Loading