opencode-gitlab-dap 1.5.0 → 1.5.1

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.
Files changed (2) hide show
  1. package/README.md +58 -27
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -73,23 +73,45 @@ When multiple flows are mentioned:
73
73
 
74
74
  The `experimental.chat.system.transform` hook injects system prompt guidelines that instruct the main agent on how to handle multi-flow and batch dispatch scenarios.
75
75
 
76
- ### 13 DAP Tools
77
-
78
- | Tool | Description |
79
- | ------------------------------ | ------------------------------------------ |
80
- | `gitlab_list_agents` | Search agents in the global AI Catalog |
81
- | `gitlab_get_agent` | Get agent details by ID |
82
- | `gitlab_list_project_agents` | List agents enabled for a project |
83
- | `gitlab_enable_project_agent` | Enable an agent in a project |
84
- | `gitlab_disable_project_agent` | Disable an agent in a project |
85
- | `gitlab_list_flows` | Search flows in the global AI Catalog |
86
- | `gitlab_get_flow` | Get flow details by ID |
87
- | `gitlab_list_project_flows` | List flows enabled for a project |
88
- | `gitlab_enable_project_flow` | Enable a flow in a project |
89
- | `gitlab_disable_project_flow` | Disable a flow in a project |
90
- | `gitlab_execute_project_flow` | Execute a flow via DWS REST API |
91
- | `gitlab_get_flow_definition` | Get flow YAML config (inputs, components) |
92
- | `gitlab_get_workflow_status` | Monitor workflow execution status and logs |
76
+ ### Custom Agent Creation
77
+
78
+ Create custom agents interactively:
79
+
80
+ ```
81
+ Create an agent that responds to prompts in the form of poems
82
+ ```
83
+
84
+ The plugin guides you through an interactive workflow:
85
+
86
+ 1. Discovers available built-in tools (`gitlab_list_builtin_tools`) and MCP servers (`gitlab_list_project_mcp_servers`)
87
+ 2. Asks for agent name, visibility, tool categories, and MCP servers via the question tool
88
+ 3. Generates a system prompt and shows the full configuration for approval
89
+ 4. Creates the agent via `gitlab_create_agent` (with `confirmed` gate to prevent accidental creation)
90
+ 5. Offers to enable the agent on the current project
91
+
92
+ The `confirmed` parameter on `gitlab_create_agent` enforces the interactive workflow the tool returns instructions instead of creating the agent when called without explicit confirmation.
93
+
94
+ ### 17 DAP Tools
95
+
96
+ | Tool | Description |
97
+ | --------------------------------- | ------------------------------------------------------- |
98
+ | `gitlab_list_agents` | Search agents in the global AI Catalog |
99
+ | `gitlab_get_agent` | Get agent details by ID |
100
+ | `gitlab_list_project_agents` | List agents enabled for a project |
101
+ | `gitlab_enable_project_agent` | Enable an agent in a project |
102
+ | `gitlab_disable_project_agent` | Disable an agent in a project |
103
+ | `gitlab_create_agent` | Create a custom agent (interactive, confirmation-gated) |
104
+ | `gitlab_update_agent` | Update an existing custom agent |
105
+ | `gitlab_list_builtin_tools` | List available built-in tools for agent configuration |
106
+ | `gitlab_list_flows` | Search flows in the global AI Catalog |
107
+ | `gitlab_get_flow` | Get flow details by ID |
108
+ | `gitlab_list_project_flows` | List flows enabled for a project |
109
+ | `gitlab_enable_project_flow` | Enable a flow in a project |
110
+ | `gitlab_disable_project_flow` | Disable a flow in a project |
111
+ | `gitlab_execute_project_flow` | Execute a flow via DWS REST API |
112
+ | `gitlab_get_flow_definition` | Get flow YAML config (inputs, components) |
113
+ | `gitlab_get_workflow_status` | Monitor workflow execution status and logs |
114
+ | `gitlab_list_project_mcp_servers` | List MCP servers available for project agents |
93
115
 
94
116
  ### Dynamic Refresh
95
117
 
@@ -145,7 +167,7 @@ export GITLAB_INSTANCE_URL=https://your-instance.com
145
167
 
146
168
  ```bash
147
169
  npm install
148
- npm test # Run tests (58 tests)
170
+ npm test # Run tests (62 tests)
149
171
  npm run build # Build (auto-runs vendor:generate)
150
172
  npm run type-check
151
173
  ```
@@ -178,17 +200,17 @@ Plugin init
178
200
  │ └─ aiCatalogConfiguredItems custom agents + flows (GraphQL)
179
201
  │ └─ aiCatalogAgentFlowConfig flow config YAML (GraphQL)
180
202
  ├─ config hook injects agents (primary) + flows (subagent with prompt)
181
- ├─ chat.message hook intercepts multi-@flow → combined dispatch
182
- ├─ experimental.chat.system.transform injects flow dispatch guidelines
183
- └─ tool hook 13 DAP tools
203
+ ├─ chat.message hook intercepts @flow → general subagent dispatch
204
+ ├─ experimental.chat.system.transform injects flow dispatch + agent creation guidelines
205
+ └─ tool hook 17 DAP tools
184
206
 
185
207
  Single flow execution (@FlowName goal):
186
- ├─ Native subagent dispatch opencode routes to registered subagent
187
- ├─ Subagent Step 1 gitlab_get_flow_definition → parse context:goal mapping
188
- ├─ Subagent Step 2 Resolve goal to exact value (MR IID, URL, etc.)
189
- ├─ Subagent Step 3 Gather additional_context inputs via GitLab tools
190
- ├─ Subagent Step 4 gitlab_execute_project_flow → POST to DWS
191
- └─ Subagent Step 5 gitlab_get_workflow_status → report status + URL
208
+ ├─ chat.message hook rewrites @mention Task tool with general subagent
209
+ ├─ General subagent Step 1 gitlab_get_flow_definition → parse context:goal mapping
210
+ ├─ General subagent Step 2 Resolve goal to exact value (MR IID, URL, etc.)
211
+ ├─ General subagent Step 3 Gather additional_context inputs via GitLab tools
212
+ ├─ General subagent Step 4 gitlab_execute_project_flow → POST to DWS
213
+ └─ General subagent Step 5 gitlab_get_workflow_status → report status + URL
192
214
 
193
215
  Multi-flow execution (@Flow1 @Flow2 goal):
194
216
  ├─ chat.message hook detects multiple @mentions → combined dispatch
@@ -199,6 +221,15 @@ Multi-flow execution (@Flow1 @Flow2 goal):
199
221
  ├─ General subagent calls gitlab_get_workflow_status × N (concurrent)
200
222
  └─ General subagent presents summary table
201
223
 
224
+ Agent creation (interactive):
225
+ ├─ gitlab_create_agent called without confirmed → returns instructions
226
+ ├─ gitlab_list_builtin_tools discover available tools
227
+ ├─ gitlab_list_project_mcp_servers discover MCP servers
228
+ ├─ question tool ask user for name, visibility, tools, MCP servers
229
+ ├─ LLM generates system prompt → user confirms
230
+ ├─ gitlab_create_agent called with confirmed=true → creates agent
231
+ └─ gitlab_enable_project_agent optionally enable on project
232
+
202
233
  Enable/disable:
203
234
  └─ refreshAgents() clears cache, re-fetches, updates cfg.agent
204
235
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-gitlab-dap",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "OpenCode plugin that injects GitLab AI Catalog agents as native opencode agents",
5
5
  "license": "MIT",
6
6
  "type": "module",