Skip to content

Commit ae51fee

Browse files
authored
Merge pull request #467 from Extra-Chill/revert-sandbox-specific-dmc
Revert sandbox-specific workspace changes
2 parents 06c8254 + 8fe684a commit ae51fee

3 files changed

Lines changed: 5 additions & 8 deletions

File tree

inc/Tools/WorkspaceTools.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ public function check_configuration( $configured, $tool_id )
7676
*/
7777
public function __construct()
7878
{
79-
$contexts = array( 'chat', 'pipeline', 'sandbox' );
80-
$policy_contexts = array( 'chat', 'pipeline', 'sandbox' );
79+
$contexts = array( 'chat', 'pipeline' );
80+
$policy_contexts = array( 'chat', 'pipeline' );
8181
$policy_meta = array( 'requires_opt_in' => true );
8282
$this->registerTool('workspace_path', array( $this, 'getPathDefinition' ), $contexts, array( 'ability' => 'datamachine/workspace-path' ));
8383
$this->registerTool('workspace_capabilities', array( $this, 'getCapabilitiesDefinition' ), $contexts, array( 'ability' => 'datamachine/workspace-capabilities' ));

inc/Workspace/RemoteWorkspaceBackend.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ class RemoteWorkspaceBackend {
2222
* Whether the remote backend should handle workspace operations.
2323
*/
2424
public static function should_handle(): bool {
25-
$should_handle = ! \DataMachineCode\Support\GitRunner::is_available();
26-
return function_exists('apply_filters')
27-
? (bool) apply_filters('datamachine_code_remote_workspace_backend_should_handle', $should_handle)
28-
: $should_handle;
25+
return ! \DataMachineCode\Support\GitRunner::is_available();
2926
}
3027

3128
/**

tests/smoke-workspace-policy-tools.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ static function ( array $tools ) use ( $tool_id, $definition_callback, $contexts
9191
);
9292

9393
foreach ( $default_pipeline_tools as $tool ) {
94-
$assert("{$tool} remains default pipeline-visible and sandbox-visible", array( 'chat', 'pipeline', 'sandbox' ) === ( $tools[ $tool ]['modes'] ?? null ));
94+
$assert("{$tool} remains default pipeline-visible", array( 'chat', 'pipeline' ) === ( $tools[ $tool ]['modes'] ?? null ));
9595
}
9696

9797
$show_definition = $workspace_tools->getShowDefinition();
@@ -123,7 +123,7 @@ static function ( array $tools ) use ( $tool_id, $definition_callback, $contexts
123123
);
124124

125125
foreach ( $policy_tools as $tool ) {
126-
$assert("{$tool} is available in real chat, pipeline, and sandbox modes", array( 'chat', 'pipeline', 'sandbox' ) === ( $tools[ $tool ]['modes'] ?? null ));
126+
$assert("{$tool} is available in real chat and pipeline modes", array( 'chat', 'pipeline' ) === ( $tools[ $tool ]['modes'] ?? null ));
127127
$assert("{$tool} requires explicit opt-in for pipeline use", true === ( $tools[ $tool ]['requires_opt_in'] ?? null ));
128128
}
129129

0 commit comments

Comments
 (0)