Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .awf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
version: "1"

# Default log level: debug, info, warn, error
log_level: info
log_level: debug

# Output format: text, json, table, quiet
output_format: text
25 changes: 25 additions & 0 deletions .go-arch-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ commonComponents:
- pkg-output
- pkg-registry
- pkg-mcpserver
- pkg-acpserver

vendors:
go-stdlib:
Expand Down Expand Up @@ -209,6 +210,9 @@ components:
pkg-mcpserver:
in: ../pkg/mcpserver

pkg-acpserver:
in: ../pkg/acpserver

# PROTOBUF
proto-plugin:
in: ../proto/plugin/v1
Expand Down Expand Up @@ -293,6 +297,9 @@ components:
infra-xdg:
in: infrastructure/xdg

infra-acp:
in: infrastructure/acp

# INTERFACES LAYER
interfaces-cli:
in: interfaces/cli
Expand Down Expand Up @@ -371,6 +378,7 @@ deps:
- infra-tools
- infra-tools-builtins
- infra-xdg
- infra-acp
canUse:
- go-stdlib
- go-sync
Expand Down Expand Up @@ -591,10 +599,26 @@ deps:
canUse:
- go-stdlib

infra-acp:
mayDependOn:
- domain-ports
- domain-errors
- domain-workflow
- domain-plugin
- infra-agents
- infra-logger
- pkg-acpserver
canUse:
- go-stdlib

pkg-mcpserver:
canUse:
- go-stdlib

pkg-acpserver:
canUse:
- go-stdlib

infra-tools:
mayDependOn:
- domain-ports
Expand All @@ -621,6 +645,7 @@ deps:
- domain-errors
- domain-plugin
- domain-operation
- infra-acp
- infra-agents
- infra-audit
- infra-analyzer
Expand Down
8 changes: 7 additions & 1 deletion .zpm/kb/default/knowledge.pl
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,16 @@
is_main_file(File) :- atom_concat(_, '/main.go', File).
is_main_file(File) :- atom_concat(_, '_test.go', File).

% doc.go files hold only the package-doc comment (zero executable code), so
% there is nothing to test — exempt them from missing_test like main/_test files.
doc_only_file('doc.go').
doc_only_file(File) :- atom_concat(_, '/doc.go', File).

integrity_violation(missing_test, File) :-
source_file(File),
\+ covered_by(File, _),
\+ is_main_file(File).
\+ is_main_file(File),
\+ doc_only_file(File).

% --- P2: Framework import in domain layer -----------------------------------
% Domain code must not import web / ORM frameworks (tight coupling to infra).
Expand Down
29 changes: 29 additions & 0 deletions .zpm/kb/pr_feature_f102_acp_transparent_agent_server/journal.wal
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{"ts":1780101531,"op":"retractall","clause":"pr_feature_f102_acp_transparent_agent_server:todo(_, _, _, _)"}
{"ts":1780101531,"op":"retractall","clause":"pr_feature_f102_acp_transparent_agent_server:stub(_, _, _)"}
{"ts":1780101531,"op":"retractall","clause":"pr_feature_f102_acp_transparent_agent_server:mock(_, _, _)"}
{"ts":1780101531,"op":"retractall","clause":"pr_feature_f102_acp_transparent_agent_server:not_impl(_, _, _)"}
{"ts":1780101531,"op":"retractall","clause":"pr_feature_f102_acp_transparent_agent_server:pr_file(_, _)"}
{"ts":1780101531,"op":"assert","clause":"pr_feature_f102_acp_transparent_agent_server:pr_file('.zpm/kb/default/knowledge.pl', changed)"}
{"ts":1780101531,"op":"assert","clause":"pr_feature_f102_acp_transparent_agent_server:stub('issue_1_11', '.zpm/kb/default/knowledge.pl', 'unknown')"}
{"ts":1780101531,"op":"assert","clause":"pr_feature_f102_acp_transparent_agent_server:stub('issue_1_27', '.zpm/kb/default/knowledge.pl', 'unknown')"}
{"ts":1780101531,"op":"assert","clause":"pr_feature_f102_acp_transparent_agent_server:stub('issue_1_28', '.zpm/kb/default/knowledge.pl', 'unknown')"}
{"ts":1780101532,"op":"assert","clause":"pr_feature_f102_acp_transparent_agent_server:stub('issue_1_33', '.zpm/kb/default/knowledge.pl', 'unknown')"}
{"ts":1780101532,"op":"assert","clause":"pr_feature_f102_acp_transparent_agent_server:stub('issue_1_66', '.zpm/kb/default/knowledge.pl', 'unknown')"}
{"ts":1780101532,"op":"assert","clause":"pr_feature_f102_acp_transparent_agent_server:stub('issue_1_67', '.zpm/kb/default/knowledge.pl', 'unknown')"}
{"ts":1780101532,"op":"assert","clause":"pr_feature_f102_acp_transparent_agent_server:pr_file('.zpm/mounts.json', changed)"}
{"ts":1780147578,"op":"retractall","clause":"pr_feature_f102_acp_transparent_agent_server:todo(_, _, _, _)"}
{"ts":1780147578,"op":"retractall","clause":"pr_feature_f102_acp_transparent_agent_server:stub(_, _, _)"}
{"ts":1780147578,"op":"retractall","clause":"pr_feature_f102_acp_transparent_agent_server:mock(_, _, _)"}
{"ts":1780147579,"op":"retractall","clause":"pr_feature_f102_acp_transparent_agent_server:not_impl(_, _, _)"}
{"ts":1780147579,"op":"retractall","clause":"pr_feature_f102_acp_transparent_agent_server:pr_file(_, _)"}
{"ts":1780147579,"op":"assert","clause":"pr_feature_f102_acp_transparent_agent_server:pr_file('.zpm/kb/pr_feature_f102_acp_transparent_agent_server/journal.wal', changed)"}
{"ts":1780147579,"op":"assert","clause":"pr_feature_f102_acp_transparent_agent_server:stub('issue_1_2', '.zpm/kb/pr_feature_f102_acp_transparent_agent_server/journal.wal', 'unknown')"}
{"ts":1780147579,"op":"assert","clause":"pr_feature_f102_acp_transparent_agent_server:mock('issue_1_3', '.zpm/kb/pr_feature_f102_acp_transparent_agent_server/journal.wal', 'unknown')"}
{"ts":1780147579,"op":"assert","clause":"pr_feature_f102_acp_transparent_agent_server:stub('issue_1_7', '.zpm/kb/pr_feature_f102_acp_transparent_agent_server/journal.wal', 'unknown')"}
{"ts":1780147579,"op":"assert","clause":"pr_feature_f102_acp_transparent_agent_server:stub('issue_1_8', '.zpm/kb/pr_feature_f102_acp_transparent_agent_server/journal.wal', 'unknown')"}
{"ts":1780147579,"op":"assert","clause":"pr_feature_f102_acp_transparent_agent_server:stub('issue_1_9', '.zpm/kb/pr_feature_f102_acp_transparent_agent_server/journal.wal', 'unknown')"}
{"ts":1780147579,"op":"assert","clause":"pr_feature_f102_acp_transparent_agent_server:stub('issue_1_10', '.zpm/kb/pr_feature_f102_acp_transparent_agent_server/journal.wal', 'unknown')"}
{"ts":1780147579,"op":"assert","clause":"pr_feature_f102_acp_transparent_agent_server:stub('issue_1_11', '.zpm/kb/pr_feature_f102_acp_transparent_agent_server/journal.wal', 'unknown')"}
{"ts":1780147579,"op":"assert","clause":"pr_feature_f102_acp_transparent_agent_server:stub('issue_1_12', '.zpm/kb/pr_feature_f102_acp_transparent_agent_server/journal.wal', 'unknown')"}
{"ts":1780147580,"op":"assert","clause":"pr_feature_f102_acp_transparent_agent_server:stub('issue_1_15', '.zpm/kb/pr_feature_f102_acp_transparent_agent_server/journal.wal', 'unknown')"}
{"ts":1780147580,"op":"assert","clause":"pr_feature_f102_acp_transparent_agent_server:mock('issue_1_16', '.zpm/kb/pr_feature_f102_acp_transparent_agent_server/journal.wal', 'unknown')"}
62 changes: 62 additions & 0 deletions .zpm/kb/pr_feature_f102_acp_transparent_agent_server/knowledge.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
:- module(pr_feature_f102_acp_transparent_agent_server, []).
% ─── PR Tracking Schema ──────────────────────────────────────────────────────
% Memory segment: pr_<branch>
% Lifecycle: created at implement start, gated before commit, archived on merge.
%
% Facts (asserted by scan scripts and LLM):
% pr_file(Path, ChangeType) — file in PR scope (changed | added | test)
% todo(Id, File, Line, Desc) — TODO/FIXME found in changed code
% stub(Id, File, Symbol) — stub/placeholder implementation
% mock(Id, File, Symbol) — mock that should be replaced with real impl
% not_impl(Id, File, Desc) — "not yet implemented" marker
% resolved(Type, Id) — marks a tracked issue as resolved
%
% Dynamic declarations (required by Trealla Prolog for runtime assertion).
:- dynamic(pr_file/2).
:- dynamic(todo/4).
:- dynamic(stub/3).
:- dynamic(mock/3).
:- dynamic(not_impl/3).
:- dynamic(resolved/2).

% ─── Unresolved queries ─────────────────────────────────────────────────────
% Convenience predicates for querying unresolved issues by type.
unresolved_todo(Id, File, Line, Desc) :-
todo(Id, File, Line, Desc), \+ resolved(todo, Id).
unresolved_stub(Id, File, Symbol) :-
stub(Id, File, Symbol), \+ resolved(stub, Id).
unresolved_mock(Id, File, Symbol) :-
mock(Id, File, Symbol), \+ resolved(mock, Id).
unresolved_not_impl(Id, File, Desc) :-
not_impl(Id, File, Desc), \+ resolved(not_impl, Id).

% A blocking issue is any tracked issue that has not been resolved.
blocking_issue(Id, todo, File, Desc) :-
todo(Id, File, _, Desc), \+ resolved(todo, Id).
blocking_issue(Id, stub, File, Symbol) :-
stub(Id, File, Symbol), \+ resolved(stub, Id).
blocking_issue(Id, mock, File, Symbol) :-
mock(Id, File, Symbol), \+ resolved(mock, Id).
blocking_issue(Id, not_impl, File, Desc) :-
not_impl(Id, File, Desc), \+ resolved(not_impl, Id).

% PR is ready ONLY when zero blocking issues remain.
pr_ready :- \+ blocking_issue(_, _, _, _).

% Health summary — counts by category.
pr_health(blocking, N) :-
findall(I, blocking_issue(I, _, _, _), L), length(L, N).
pr_health(resolved, N) :-
findall(I, resolved(_, I), L), length(L, N).
pr_health(files, N) :-
findall(F, pr_file(F, _), L), length(L, N).

% Coverage gap: source file changed without corresponding test file.
coverage_gap(File) :-
pr_file(File, changed),
\+ pr_file(File, test),
\+ test_file(File, _).

% List all blocking issues as Id-Type-File-Desc tuples.
all_blockers(Blockers) :-
findall(blocker(Id, Type, File, Desc), blocking_issue(Id, Type, File, Desc), Blockers).
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ A Go CLI tool for orchestrating AI agents (Claude, Gemini, Codex, GitHub Copilot
- **Built-in Notification Plugin** - Workflow completion alerts via desktop and webhooks with configurable backends
- **Terminal User Interface (TUI)** - Full-screen interactive dashboard (`awf tui`) with tab-based navigation for workflow browsing, real-time execution monitoring, history exploration, agent conversation rendering, and Claude Code session tailing; built on Bubble Tea with Lip Gloss styling and Glamour Markdown rendering
- **HTTP REST API Server** - `awf serve` exposes workflow discovery, async execution, SSE event streaming, lifecycle control, and execution history over HTTP with auto-generated OpenAPI 3.1 spec and Swagger UI at `/docs`; built on Huma v2 + chi v5; defaults to `127.0.0.1:2511` (loopback-only) with `--host`/`--port` overrides
- **ACP Transparent Agent Server** - `awf acp-serve` (hidden) exposes workflows as an [ACP (Agent Client Protocol)](https://agentclientprotocol.com) agent over stdio, enabling ACP-compatible editors (Zed, acp.nvim) to spawn AWF as a transparent agent subprocess; full workflow execution per `session/prompt` (not single-provider passthrough) with multi-step progress projected as `tool_call` / `tool_call_update` notifications; workflow discovery via slash commands (`available_commands_update`); native `session/request_permission` for approval gates; mid-workflow user input via turn-boundary resume; `session/cancel` with 5s SIGTERM→SIGKILL grace; editor-provided `mcpServers` merged with per-step MCP proxy config (editor wins on collision); stdlib-only `pkg/acpserver` engine mirroring the `pkg/mcpserver` invariant. See [ADR-018](docs/ADR/018-acp-transparent-agent-server-protocol.md).

## Installation

Expand Down
Loading
Loading