Elwyn Benson activity https://gitlab.com/elwyn-gitlab 2026-03-18T00:04:20Z tag:gitlab.com,2026-03-18:5215203323 Elwyn Benson deleted project branch kjamoralin/2068-action-executor-abstraction at GitLab.org / editor-extensions / GitLab Language Server 2026-03-18T00:04:20Z elwyn-gitlab Elwyn Benson

Elwyn Benson (6c5a9c69) at 18 Mar 00:04

tag:gitlab.com,2026-03-18:5215198737 Elwyn Benson accepted merge request !3063: refactor(workflow): extract ActionExecutor abstraction (part 1 of #2068) at GitLab.org / editor-extensions / GitLa... 2026-03-18T00:03:40Z elwyn-gitlab Elwyn Benson

Summary

Extract action dispatch logic from NodeExecutor into an ActionExecutor interface and factory pattern, preparing for sandboxed execution in follow-up MRs.

Changes

  • Add ActionExecutor interface with execute() and dispose()
  • Add ActionExecutorFactory interface with createExecutor()
  • Add DirectActionExecutor that wraps existing handler dispatch logic
  • Add DefaultActionExecutorFactory (returns DirectActionExecutor)
  • Update NodeExecutor to inject ActionExecutorFactory instead of collection(WorkflowActionHandler)
  • Register DefaultActionExecutorFactory in workflowExecutorContributions
  • Update node_executor.test.ts to use mockActionExecutor / mockActionExecutorFactory

No behavior change. This is a pure refactor that introduces the seam for a follow-up MR to swap in a SandboxedActionExecutor when the DuoSandboxedExecution feature flag is enabled.

Part of https://gitlab.com/gitlab-org/editor-extensions/gitlab-lsp/-/issues/2068

tag:gitlab.com,2026-03-18:5215198237 Elwyn Benson pushed to project branch main at GitLab.org / editor-extensions / GitLab Language Server 2026-03-18T00:03:37Z elwyn-gitlab Elwyn Benson

Elwyn Benson (5ee2760b) at 18 Mar 00:03

Merge branch 'kjamoralin/2068-action-executor-abstraction' into 'main'

... and 1 more commit

tag:gitlab.com,2026-03-17:5215123916 Elwyn Benson commented on merge request !3066 at GitLab.org / editor-extensions / GitLab Language Server 2026-03-17T23:20:20Z elwyn-gitlab Elwyn Benson

Hey @mcorren, @donaldcook, assuming the CI detection is working, does this implementation seem ok?

tag:gitlab.com,2026-03-17:5215108482 Elwyn Benson opened merge request !3066: Draft: feat(cli): add beta consent agreement prompt at GitLab.org / editor-extensions / GitLab Language Server 2026-03-17T23:11:23Z elwyn-gitlab Elwyn Benson

Description

Adds a beta consent prompt to Duo CLI that requires users to accept GitLab's Testing Agreement before using the tool.

On first launch, the CLI shows the consent text and waits (y/Y to accept, n/N to reject). Once accepted, consent is persisted to storage and the prompt isn't shown again.

Handles non-interactive environments (throws with instructions to accept via storage config) and CI environments (silently skips beta consent).

behaviour scenario
beta_agreement_tui_n user runs main TUI, declines agreement
beta_agreement_tui_y user runs main TUI, accepts agreement
beta_agreement_run_n user runs run command, declines agreement
beta_agreement_run_y user runs run command, accepts agreement
beta_agreement_run_non-tty user runs run command in non-interactive terminal environment
TODO: VERIFY CORRECTLY DETECTED GitLab runs run command in CI environment, agreement is silently skipped

I changed the implementation to show which key the user pressed, after I recorded all of these. Sorry too lazy to re-record, but it will show the y/n that was pressed

#2148

How has this been tested?

  • checkout this branch
  • mise install && npm install
  • npm run cli
  • observe the beta consent prompt appears
  • press n to decline, confirm Duo CLI exits
  • npm run cli
  • observe the beta consent prompt appears again
  • press y to accept, confirm the TUI loads
  • run again, confirm the prompt is not shown a second time
  • persisted value can be removed from inside ~/.gitlab/storage.json to reset testing

What CHANGELOG entry will this MR create?

  • feature: New feature - a user-facing change which adds functionality - included in changelog
tag:gitlab.com,2026-03-17:5215107792 Elwyn Benson pushed new project branch 2148-add-beta-consent-prompt at GitLab.org / editor-extensions / GitLab Language Server 2026-03-17T23:10:59Z elwyn-gitlab Elwyn Benson

Elwyn Benson (b8becfdb) at 17 Mar 23:10

feat(cli): add beta consent agreement

tag:gitlab.com,2026-03-17:5215049292 Elwyn Benson commented on merge request !3063 at GitLab.org / editor-extensions / GitLab Language Server 2026-03-17T22:40:55Z elwyn-gitlab Elwyn Benson

Nice @kjamoralin, this is a clean separation!

tag:gitlab.com,2026-03-17:5215049169 Elwyn Benson approved merge request !3063: refactor(workflow): extract ActionExecutor abstraction (part 1 of #2068) at GitLab.org / editor-extensions / GitLa... 2026-03-17T22:40:51Z elwyn-gitlab Elwyn Benson

Summary

Extract action dispatch logic from NodeExecutor into an ActionExecutor interface and factory pattern, preparing for sandboxed execution in follow-up MRs.

Changes

  • Add ActionExecutor interface with execute() and dispose()
  • Add ActionExecutorFactory interface with createExecutor()
  • Add DirectActionExecutor that wraps existing handler dispatch logic
  • Add DefaultActionExecutorFactory (returns DirectActionExecutor)
  • Update NodeExecutor to inject ActionExecutorFactory instead of collection(WorkflowActionHandler)
  • Register DefaultActionExecutorFactory in workflowExecutorContributions
  • Update node_executor.test.ts to use mockActionExecutor / mockActionExecutorFactory

No behavior change. This is a pure refactor that introduces the seam for a follow-up MR to swap in a SandboxedActionExecutor when the DuoSandboxedExecution feature flag is enabled.

Part of https://gitlab.com/gitlab-org/editor-extensions/gitlab-lsp/-/issues/2068

tag:gitlab.com,2026-03-17:5214989403 Elwyn Benson approved merge request !3057: Draft: feat(cli): Replace workflow-executor tools with pi-mono-derived direct tools at GitLab.org / editor-extensi... 2026-03-17T22:18:56Z elwyn-gitlab Elwyn Benson

Summary

Replaces the Anthropic backend's workflow-executor-based tools with pi-mono-derived tool implementations, and simplifies the system prompt.

Changes

New pi_tools/ module (packages/cli/src/backend/anthropic/pi_tools/):

  • read.ts — File reading with offset/limit and head-truncation (line + byte limits)
  • write.ts — File writing with auto-mkdir
  • edit.ts — Exact text replacement with fuzzy matching and diff generation
  • bash.ts — Shell execution with timeout support and tail-truncation
  • truncate.ts — Shared head/tail truncation utilities
  • path_utils.ts — Path resolution with macOS filename variant fallbacks
  • edit_diff.ts — Fuzzy text matching and unified diff generation

Tool layer refactor (tools.ts):

  • WorkflowToolsPiTools with 4 built-in tools (read, write, edit, bash) + MCP
  • Removed dependencies on WorkflowActionHandler, FileStateTracker, CredentialProvider
  • DI reduced to Logger, ParsedCliInput, McpManager

System prompt (system_prompt.ts):

  • Replaced ~120 line verbose prompt with ~10 line concise prompt

TUI integration (tool_input_formatter.ts):

  • Maps pi tool names to existing TUI display types
  • Edit tool computes diffs for display

Out of scope

  • Image support in read tool
  • Streaming bash output
  • Windows shell support
tag:gitlab.com,2026-03-17:5214989371 Elwyn Benson commented on merge request !3057 at GitLab.org / editor-extensions / GitLab Language Server 2026-03-17T22:18:55Z elwyn-gitlab Elwyn Benson

Generally LGTM @viktomas! I'm ok with the split, so long as we're intentional in direct no longer having parity with tui since the overhead of supporting features in both will be harder now in some cases

tag:gitlab.com,2026-03-17:5214989360 Elwyn Benson commented on merge request !3057 at GitLab.org / editor-extensions / GitLab Language Server 2026-03-17T22:18:55Z elwyn-gitlab Elwyn Benson

This isn't necessary right? The tool descriptions themselves are already provided in the context

tag:gitlab.com,2026-03-17:5214989355 Elwyn Benson commented on merge request !3057 at GitLab.org / editor-extensions / GitLab Language Server 2026-03-17T22:18:54Z elwyn-gitlab Elwyn Benson

Love it!

tag:gitlab.com,2026-03-17:5214989334 Elwyn Benson commented on merge request !3057 at GitLab.org / editor-extensions / GitLab Language Server 2026-03-17T22:18:54Z elwyn-gitlab Elwyn Benson

and images (jpg, png, gif, webp). Images are sent as attachments.

Not sure we should say this? Images are NOT sent as attachments, they are read and sent directly as text via the tool response. And while the LLM can read some image metadata, it won't actually "see" the image like other harnesses do when using the actual provider image APIs

image

tag:gitlab.com,2026-03-17:5214989315 Elwyn Benson commented on merge request !3057 at GitLab.org / editor-extensions / GitLab Language Server 2026-03-17T22:18:54Z elwyn-gitlab Elwyn Benson

I personally dislike the lack of read-before-edit enforcement 😅 have had my manual edits clobbered by LLM one too many times.

Not a problem if the agent is running in isolation, annoying problem if you're running an agent in the same place you're actively working!

tag:gitlab.com,2026-03-17:5214989311 Elwyn Benson commented on merge request !3057 at GitLab.org / editor-extensions / GitLab Language Server 2026-03-17T22:18:53Z elwyn-gitlab Elwyn Benson

We can at least try to make it less likely to make changes in plan mode, though I don't like that it's not enforced and I can't trust it completely!

- Do NOT produce code edits, diffs, or implementation artifacts. Your output is analysis and a plan only.
- Do NOT use 'bash' tool to modify files (e.g. with `sed`, `echo`). User MUST switch to \`build\` mode before you may run those commands.`;

This break in tools also means any future custom agents or integration with agent catalog will be unsupported in duo direct

tag:gitlab.com,2026-03-17:5214989290 Elwyn Benson commented on merge request !3057 at GitLab.org / editor-extensions / GitLab Language Server 2026-03-17T22:18:53Z elwyn-gitlab Elwyn Benson

Noting difference from DAP run_command which filters certain known sensitive CI env vars

tag:gitlab.com,2026-03-17:5214839655 Elwyn Benson commented on issue #2139 at GitLab.org / editor-extensions / GitLab Language Server 2026-03-17T21:35:33Z elwyn-gitlab Elwyn Benson

Async issue update

This is merged, prompt history responsibilities are extracted, helping the effort to thin-down our tui_controller

tag:gitlab.com,2026-03-17:5214839322 Elwyn Benson closed issue #2139: [LS][CLI] Extract prompt history management into a dedicated controller at GitLab.org / editor-extensions / GitLab Language ... 2026-03-17T21:35:28Z elwyn-gitlab Elwyn Benson tag:gitlab.com,2026-03-17:5214834743 Elwyn Benson commented on issue #2143 at GitLab.org / editor-extensions / GitLab Language Server 2026-03-17T21:34:12Z elwyn-gitlab Elwyn Benson

Async issue update

This test tidyup is merged. All tests working with AsyncIterators / AsyncGenerators (e.g. workflow streams) are updated to use a new consolidated set of test helpers instead of re-declaring helpers inline every time.

tag:gitlab.com,2026-03-17:5214834389 Elwyn Benson closed issue #2143: [LS] Consolidate async iterator/generator test helpers into `@gitlab-org/test-utils` at GitLab.org / editor-extensions / Git... 2026-03-17T21:34:07Z elwyn-gitlab Elwyn Benson