Skip to content

Robe/poc aiagent#1996

Draft
zentron wants to merge 18 commits into
mainfrom
robe/poc-aiagent
Draft

Robe/poc aiagent#1996
zentron wants to merge 18 commits into
mainfrom
robe/poc-aiagent

Conversation

@zentron

@zentron zentron commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

⚠️ Does this change require a corresponding Server Change?
⚠️ If so - please add a "Requires Server Change" label to this PR!

@gitguardian

gitguardian Bot commented Jun 9, 2026

Copy link
Copy Markdown

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

zentron and others added 16 commits June 10, 2026 10:15
Introduce provider selection (Anthropic/OpenAI) via variables, add
Microsoft.Extensions.AI.OpenAI bridge package, and bump MEAI packages
to 10.5.0 for ModelContextProtocol 1.3.0 compatibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…ce messages

Introduce InvokeClaudeCodeBehaviour as an alternative to the SDK-based
provider, shelling out to `claude -p` with stream-json output. Includes
typed stream event models, a dedicated stream processor, temp working
directory with skills support, and an ai-agent-usage service message
for reporting cost/token metrics back to the server.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Add --strict-mcp-config with configurable MCP servers passed via
ClaudeCodeOptions. Wire up GitHub and Octopus MCP servers from
variables in InvokeClaudeCodeBehaviour.

Introduce enums for StreamEventType and ContentBlockType used in
processor routing, but keep model properties as strings to avoid
JsonSerializer throwing on unknown values from the evolving CLI format.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Add ProcessCredentials and RunAs support to ClaudeCodeCliRunner.
Windows uses ProcessStartInfo.UserName/PasswordInClearText natively.
Linux wraps in sudo -u <user> -- env ANTHROPIC_API_KEY=<key> claude <args>
to avoid -E requiring SETENV in sudoers (see ADR-001).

Add unit tests for stream processor (17 tests) and CLI runner (10 tests).
Replace integration test fixture with clean validation and Claude Code tests.
Fix malformed JSON handling and result event fallback in stream processor.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…uilder

Replace hardcoded GitHubToken MCP config with a generic JSON-encoded
McpServers variable that supports user-configured MCP servers. The
Octopus MCP server remains hardcoded. Add McpServerEntry record for
deserialization. Update stream models with full init/hook/result fields
from Claude Code stream-json output. Extract CLI argument construction
into ClaudeCommandArgsBuilder with max-turns and max-budget-usd support.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…d fixes

Write filtered deployment variables to deployment-variables.json in the
working directory so the agent can read deployment context on demand.
Add --effort flag support (low/medium/high/xhigh/max). Auto-add
mcp__<server>__* to --allowedTools for all configured MCP servers so
they aren't blocked by --permission-mode dontAsk. Add --bare flag for
clean environment isolation. Fix verbose log missing newlines between
JSON events. Update PermissionDenial model to structured record. Remove
superpowers planning docs from repo.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Introduces a customEnvVars dictionary for env vars that need to be
explicitly set on the process (currently just ANTHROPIC_API_KEY).
No behaviour change — prepares for passing these vars into ApplyCredentials
so they can be inlined into a su -c command on Linux in a follow-up task.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Adds a static ShellQuote method to ClaudeCodeCliRunner that wraps a
value in single quotes and escapes any embedded single quotes as '\''.
This is needed to safely embed values (API keys, env var values) into
su -c command strings without shell injection risk.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…tion

On Linux, instead of using ProcessStartInfo.UserName (which requires CAP_SETUID),
wrap the command with `script -qec "su - {user} -c '{envVars} {cmd}'" /dev/null`
to allocate a pseudo-TTY for su. Custom env vars are inlined into the command
string since `su -` starts a login shell that clears the environment.
Windows behaviour is unchanged.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…ate ADR comment

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@zentron zentron force-pushed the robe/poc-aiagent branch from 5313cf9 to c344557 Compare June 10, 2026 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant