-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathclass-wp-codebox-runner-workspace-ability-descriptors.php
More file actions
55 lines (52 loc) · 2.63 KB
/
Copy pathclass-wp-codebox-runner-workspace-ability-descriptors.php
File metadata and controls
55 lines (52 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/**
* Runner workspace ability descriptors.
*
* @package WPCodebox
*/
defined( 'ABSPATH' ) || exit;
/**
* Provides runner workspace ability registration descriptors.
*/
final class WP_Codebox_Runner_Workspace_Ability_Descriptors {
/**
* @param array<string,mixed> $context Shared schemas assembled by WP_Codebox_Abilities.
* @return array<int,array<string,mixed>> Runner workspace descriptors in registration order.
*/
public static function descriptors( array $context ): array {
return array(
array(
'canonical_ability' => 'wp-codebox/runner-workspace-prepare',
'label' => 'Prepare Runner Workspace',
'canonical_description' => 'Prepare a runner-owned workspace through the WP Codebox runner boundary using the configured workspace backend adapter.',
'input_schema' => $context['prepare_input_schema'],
'output_schema' => $context['prepare_output_schema'],
'execute_callback' => array( WP_Codebox_Abilities::class, 'prepare_runner_workspace' ),
),
array(
'canonical_ability' => 'wp-codebox/runner-workspace-publish',
'label' => 'Publish Runner Workspace',
'canonical_description' => 'Publish runner-owned workspace changes through the WP Codebox runner boundary using the configured publication backend adapter.',
'input_schema' => $context['publication_input_schema'],
'output_schema' => $context['publication_output_schema'],
'execute_callback' => array( WP_Codebox_Abilities::class, 'publish_runner_workspace' ),
),
array(
'canonical_ability' => 'wp-codebox/runner-workspace-capture',
'label' => 'Capture Runner Workspace',
'canonical_description' => 'Capture runner-owned workspace status and diff metadata through the WP Codebox runner boundary using the configured workspace backend adapter.',
'input_schema' => $context['capture_input_schema'],
'output_schema' => $context['capture_output_schema'],
'execute_callback' => array( WP_Codebox_Abilities::class, 'capture_runner_workspace' ),
),
array(
'canonical_ability' => 'wp-codebox/runner-workspace-command',
'label' => 'Run Runner Workspace Command',
'canonical_description' => 'Run a bounded verification or drift-check command against a runner-owned workspace through the WP Codebox runner boundary.',
'input_schema' => $context['command_input_schema'],
'output_schema' => $context['command_output_schema'],
'execute_callback' => array( WP_Codebox_Abilities::class, 'run_runner_workspace_command' ),
),
);
}
}