Skip to content

Commit 2840fdc

Browse files
authored
feat(agent): add agent socket API (#20717)
relates to: coder/internal#1094 This is number 2 of 5 pull requests in an effort to add agent script ordering. It adds a drpc API that is exposed via a local socket. This API serves access to a lightweight DAG based dependency manager that was inspired by systemd. In follow-up PRs: * This unit manager will be plumbed into the workspace agent struct. * CLI commands will use this agentsocket api to express dependencies between coder scripts I used an LLM to produce some of these changes, but I have conducted thorough self review and consider this contribution to be ready for an external reviewer.
1 parent 5a7d4f6 commit 2840fdc

File tree

13 files changed

+2568
-60
lines changed

13 files changed

+2568
-60
lines changed

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,7 @@ AIBRIDGED_MOCKS := \
642642
GEN_FILES := \
643643
tailnet/proto/tailnet.pb.go \
644644
agent/proto/agent.pb.go \
645+
agent/agentsocket/proto/agentsocket.pb.go \
645646
provisionersdk/proto/provisioner.pb.go \
646647
provisionerd/proto/provisionerd.pb.go \
647648
vpn/vpn.pb.go \
@@ -696,6 +697,7 @@ gen/mark-fresh:
696697
agent/proto/agent.pb.go \
697698
provisionersdk/proto/provisioner.pb.go \
698699
provisionerd/proto/provisionerd.pb.go \
700+
agent/agentsocket/proto/agentsocket.pb.go \
699701
vpn/vpn.pb.go \
700702
enterprise/aibridged/proto/aibridged.pb.go \
701703
coderd/database/dump.sql \
@@ -800,6 +802,14 @@ agent/proto/agent.pb.go: agent/proto/agent.proto
800802
--go-drpc_opt=paths=source_relative \
801803
./agent/proto/agent.proto
802804

805+
agent/agentsocket/proto/agentsocket.pb.go: agent/agentsocket/proto/agentsocket.proto
806+
protoc \
807+
--go_out=. \
808+
--go_opt=paths=source_relative \
809+
--go-drpc_out=. \
810+
--go-drpc_opt=paths=source_relative \
811+
./agent/agentsocket/proto/agentsocket.proto
812+
803813
provisionersdk/proto/provisioner.pb.go: provisionersdk/proto/provisioner.proto
804814
protoc \
805815
--go_out=. \

0 commit comments

Comments
 (0)