@nt-ai-lab/deterministic-agent-workflow-engine 0.4.1 → 0.4.2
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.
|
@@ -27,19 +27,6 @@ export function checkBashWithPlatformEvents(context, toolName, command, bashForb
|
|
|
27
27
|
const gate = context.applyIdentityGate('bash-check');
|
|
28
28
|
if (gate !== undefined)
|
|
29
29
|
return gate;
|
|
30
|
-
if (toolName !== 'Bash') {
|
|
31
|
-
context.persistPlatformEvent({
|
|
32
|
-
type: 'bash-checked',
|
|
33
|
-
at: context.engineDeps.now(),
|
|
34
|
-
tool: toolName,
|
|
35
|
-
command,
|
|
36
|
-
allowed: true,
|
|
37
|
-
});
|
|
38
|
-
return {
|
|
39
|
-
type: 'success',
|
|
40
|
-
output: '',
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
30
|
const exemptions = context.factory.getRegistry()[currentStateName].allowForbidden?.bash ?? [];
|
|
44
31
|
const bashCheckResult = checkBashCommand(command, bashForbidden, exemptions);
|
|
45
32
|
if (!bashCheckResult.pass) {
|
|
@@ -77,20 +64,6 @@ export function checkWriteWithPlatformEvents(context, toolName, filePath, isWrit
|
|
|
77
64
|
const gate = context.applyIdentityGate('write-check');
|
|
78
65
|
if (gate !== undefined)
|
|
79
66
|
return gate;
|
|
80
|
-
const writeTools = new Set(['Write', 'Edit', 'NotebookEdit']);
|
|
81
|
-
if (!writeTools.has(toolName)) {
|
|
82
|
-
context.persistPlatformEvent({
|
|
83
|
-
type: 'write-checked',
|
|
84
|
-
at: context.engineDeps.now(),
|
|
85
|
-
tool: toolName,
|
|
86
|
-
filePath,
|
|
87
|
-
allowed: true,
|
|
88
|
-
});
|
|
89
|
-
return {
|
|
90
|
-
type: 'success',
|
|
91
|
-
output: '',
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
67
|
const storePath = `${context.engineDeps.getPluginRoot()}/workflow.db`;
|
|
95
68
|
if (filePath === storePath) {
|
|
96
69
|
context.persistPlatformEvent({
|