agentlink-cli 0.1.0__py3-none-any.whl
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.
- agentlink_cli-0.1.0.dist-info/METADATA +136 -0
- agentlink_cli-0.1.0.dist-info/RECORD +55 -0
- agentlink_cli-0.1.0.dist-info/WHEEL +4 -0
- agentlink_cli-0.1.0.dist-info/entry_points.txt +3 -0
- connector/__init__.py +3 -0
- connector/acp/__init__.py +6 -0
- connector/acp/adapter.py +1221 -0
- connector/acp/config_options.py +175 -0
- connector/acp/discovery.py +385 -0
- connector/acp/manifest.py +110 -0
- connector/acp/manifests/__init__.py +1 -0
- connector/acp/manifests/codebuddy.json +37 -0
- connector/acp/manifests/cursor.json +39 -0
- connector/acp/manifests/gemini.json +33 -0
- connector/acp/manifests/grok_build.json +31 -0
- connector/acp/reducer.py +615 -0
- connector/acp/rpc.py +308 -0
- connector/adapter.py +39 -0
- connector/attachments.py +36 -0
- connector/capabilities.py +603 -0
- connector/claude/__init__.py +8 -0
- connector/claude/history_adapter.py +642 -0
- connector/claude/normalized.py +23 -0
- connector/claude/normalizers.py +97 -0
- connector/claude/path_utils.py +13 -0
- connector/claude/preferences.py +38 -0
- connector/claude/sdk_adapter.py +1376 -0
- connector/claude/timeline_identity.py +47 -0
- connector/claude/timeline_reducer.py +379 -0
- connector/claude/trust.py +69 -0
- connector/cli.py +280 -0
- connector/codex/__init__.py +3 -0
- connector/codex/adapter.py +1150 -0
- connector/codex/history.py +199 -0
- connector/codex/reducer.py +1309 -0
- connector/codex/rpc.py +261 -0
- connector/control.py +298 -0
- connector/json_rpc.py +143 -0
- connector/launch.py +310 -0
- connector/local/__init__.py +6 -0
- connector/local/common.py +118 -0
- connector/local/file_ops.py +144 -0
- connector/local/ops.py +92 -0
- connector/local/shell.py +225 -0
- connector/local/terminal.py +658 -0
- connector/local_ops.py +5 -0
- connector/local_runtime.py +139 -0
- connector/logging.py +50 -0
- connector/perf.py +89 -0
- connector/protocol.py +26 -0
- connector/registry.py +49 -0
- connector/runtime.py +1309 -0
- connector/sync_state.py +155 -0
- connector/time.py +7 -0
- connector/version.py +13 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: agentlink-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Local runtime connector for AgentLink
|
|
5
|
+
Requires-Python: >=3.12
|
|
6
|
+
Requires-Dist: claude-agent-sdk
|
|
7
|
+
Requires-Dist: httpx[socks]>=0.28.1
|
|
8
|
+
Requires-Dist: loguru>=0.7.3
|
|
9
|
+
Requires-Dist: pexpect>=4.9.0; sys_platform != 'win32'
|
|
10
|
+
Requires-Dist: ptyprocess>=0.7.0; sys_platform != 'win32'
|
|
11
|
+
Requires-Dist: pydantic>=2.0.0
|
|
12
|
+
Requires-Dist: pyte>=0.8.2
|
|
13
|
+
Requires-Dist: python-socks>=2.8.1
|
|
14
|
+
Requires-Dist: pywinpty>=2.0.13; sys_platform == 'win32'
|
|
15
|
+
Requires-Dist: websockets>=16.0
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
|
|
18
|
+
# AgentLink CLI
|
|
19
|
+
|
|
20
|
+
Local runtime connector for AgentLink. It runs on the machine that owns
|
|
21
|
+
the workspace and agent runtimes, connects to the server over HTTP/WebSocket,
|
|
22
|
+
executes connector RPC locally, and uploads normalized runtime/session state
|
|
23
|
+
back to the backend.
|
|
24
|
+
|
|
25
|
+
## Layout
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
connector/
|
|
29
|
+
claude/ Claude Code discovery, adapter, reducer, and transcript logic
|
|
30
|
+
codex/ Codex app-server discovery, RPC, adapter, and reducer logic
|
|
31
|
+
local/ Local filesystem, shell, and terminal backends
|
|
32
|
+
cli.py agentlink-cli CLI
|
|
33
|
+
runtime.py Connector config, auth, WebSocket loop, and RPC dispatch
|
|
34
|
+
tests/ Connector tests
|
|
35
|
+
pyproject.toml Connector dependencies and console script
|
|
36
|
+
run.sh Local helper for saved-config startup
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Run
|
|
40
|
+
|
|
41
|
+
Install dependencies:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
uv sync
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Start with explicit credentials from the web pairing flow:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
uvx agentlink-cli start \
|
|
51
|
+
--server-url http://127.0.0.1:8000 \
|
|
52
|
+
--connector-id conn_xxx \
|
|
53
|
+
--connector-token cxt_xxx
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Passing a connector token on the command line can store it in shell history.
|
|
57
|
+
For persistent installations, prefer a saved config or the environment variables
|
|
58
|
+
listed below.
|
|
59
|
+
|
|
60
|
+
Or save the config locally and start without arguments:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
uvx agentlink-cli configure \
|
|
64
|
+
--server-url http://127.0.0.1:8000 \
|
|
65
|
+
--connector-id conn_xxx \
|
|
66
|
+
--connector-token cxt_xxx
|
|
67
|
+
|
|
68
|
+
uvx agentlink-cli start
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The default config path is `~/.agent-server/connector.json`. Override it with
|
|
72
|
+
`--config` or `AGENT_CONNECTOR_CONFIG`.
|
|
73
|
+
|
|
74
|
+
## Runtime Discovery
|
|
75
|
+
|
|
76
|
+
The connector discovers Codex and Claude locally and reports attached runtime
|
|
77
|
+
capabilities to the server. If a runtime is not on `PATH`, set one of:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
CODEX_BIN=/path/to/codex
|
|
81
|
+
CLAUDE_BIN=/path/to/claude
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The connector uses local runtime credentials and local filesystem permissions.
|
|
85
|
+
AgentLink does not proxy Claude or Codex account credentials.
|
|
86
|
+
|
|
87
|
+
## Local Operations
|
|
88
|
+
|
|
89
|
+
The server can ask an online connector to perform local work:
|
|
90
|
+
|
|
91
|
+
- read/list/write files inside workspace-safe roots
|
|
92
|
+
- upload/download file content through the server
|
|
93
|
+
- run one-shot shell commands
|
|
94
|
+
- start and wait for shell tasks
|
|
95
|
+
- create, write, resize, stream, list, and close interactive terminals
|
|
96
|
+
- start, interrupt, sync, and approve runtime turns
|
|
97
|
+
|
|
98
|
+
## Environment
|
|
99
|
+
|
|
100
|
+
| Variable | Purpose |
|
|
101
|
+
| --- | --- |
|
|
102
|
+
| `AGENT_CONNECTOR_CONFIG` | Connector config path. |
|
|
103
|
+
| `AGENT_SERVER_URL` | Server URL used when `--server-url` is omitted. |
|
|
104
|
+
| `AGENT_CONNECTOR_ID` | Connector id used when `--connector-id` is omitted. |
|
|
105
|
+
| `AGENT_CONNECTOR_TOKEN` | Connector token used when `--connector-token` is omitted. |
|
|
106
|
+
| `AGENT_CONNECTOR_ATTACHMENTS_ROOT` | Runtime attachment download directory. Defaults to `~/.agent-link/attachments`. |
|
|
107
|
+
| `CODEX_BIN` | Explicit Codex CLI/app-server path. |
|
|
108
|
+
| `CLAUDE_BIN` | Explicit Claude Code CLI path. |
|
|
109
|
+
|
|
110
|
+
## Verify
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
uv run ruff check connector tests
|
|
114
|
+
uv run pytest -q
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Release
|
|
118
|
+
|
|
119
|
+
Releases are published to PyPI by `.github/workflows/publish-agentlink-cli.yml`
|
|
120
|
+
when a GitHub Release is published. The release tag must match the package
|
|
121
|
+
version with a `v` prefix, for example `v0.1.0`.
|
|
122
|
+
|
|
123
|
+
Before the first release, create a GitHub Environment named `pypi`, then add a
|
|
124
|
+
pending trusted publisher in PyPI with these values:
|
|
125
|
+
|
|
126
|
+
| Field | Value |
|
|
127
|
+
| --- | --- |
|
|
128
|
+
| PyPI project name | `agentlink-cli` |
|
|
129
|
+
| GitHub owner | `zhoujun0601` |
|
|
130
|
+
| GitHub repository | `AgentLink` |
|
|
131
|
+
| Workflow filename | `publish-agentlink-cli.yml` |
|
|
132
|
+
| Environment name | `pypi` |
|
|
133
|
+
|
|
134
|
+
The workflow tests the connector, validates the tag and distribution metadata,
|
|
135
|
+
checks the wheel contents and CLI entry point, and publishes through OIDC without
|
|
136
|
+
a long-lived PyPI token.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
connector/__init__.py,sha256=uSDSaR-MjP0aiGRJv852lhPq5gjGJgWJ87a5MDZw3Sk,132
|
|
2
|
+
connector/adapter.py,sha256=vDkyu1U5BzcbJAlKWuxPpBNgm_9t3qkZbRqV1pi-tZU,1323
|
|
3
|
+
connector/attachments.py,sha256=iKyYN9RqjTozv7RPqHwGpNPQQ7w5B_InZn-HTy5dCJo,1254
|
|
4
|
+
connector/capabilities.py,sha256=9ScqYSlJbI9qJvmVZTKzW633J1TpEZxnbBmrfE6JZMY,22192
|
|
5
|
+
connector/cli.py,sha256=s-GhkIu0CxxrItP8ECy8Vl-eeuGCyy-KYbeeJUR0JsY,10750
|
|
6
|
+
connector/control.py,sha256=Lv1riCd05on6cxK6GuBiOz4IeIcNsSasKGfHUBJXkNo,12307
|
|
7
|
+
connector/json_rpc.py,sha256=wfzGK9JLoLccDaxkitJQup9uB1YCmoodz_oQ-JGiCvs,5160
|
|
8
|
+
connector/launch.py,sha256=gtiyya9Tr_Qme503wy0hcQO6tEoEmXgCdsG5aQ7NNx4,9932
|
|
9
|
+
connector/local_ops.py,sha256=1MTXYxcgH6Aw2DTPF1IPqen-WLSxRdCGQFcYCTiYS88,169
|
|
10
|
+
connector/local_runtime.py,sha256=o0vOrvbr8Y439brcSaW449x5qcEpguPiyvuGfKzjC50,4008
|
|
11
|
+
connector/logging.py,sha256=a33VORdXbfjPS-9BZBkfXHp4puZGNz1o9ipZfZ_h1II,1708
|
|
12
|
+
connector/perf.py,sha256=LMrWvoM8eh-1rpR6hQKy9-jeWsFD_6o5GAYTZHS96sE,2709
|
|
13
|
+
connector/protocol.py,sha256=JEo2Y-Op-R_1bWvidieHG4U1-V52-OX0rplXWrzMVno,512
|
|
14
|
+
connector/registry.py,sha256=52lL35d4OUCoBjpLprke4asSK-XivarGUDKQyNqZxsk,1876
|
|
15
|
+
connector/runtime.py,sha256=AgZwMtEBDjnwWiYbKxQezGpGHnU9Ao1hyuTEP8UqLNs,59848
|
|
16
|
+
connector/sync_state.py,sha256=3_U66rcC9LT1emE6Pbc967DL5MwxgZrH6QUCedM1bw4,5040
|
|
17
|
+
connector/time.py,sha256=ZDCx-RaEQ0xU6siWnnnRsS7MNHy_RTkdEaiuZisDLjE,159
|
|
18
|
+
connector/version.py,sha256=Ul_bRGL00-T3z30CslsJwJt4WFpQA2o2AHZbeB4fVj8,356
|
|
19
|
+
connector/acp/__init__.py,sha256=xVqtUJI3lCyTm_G6Cht34YovIX0HZX9a3YCGgiMfv2Q,265
|
|
20
|
+
connector/acp/adapter.py,sha256=6ds_JoI0TX2f1PrYIKwyKMbT4l9_OeAPnzpv9h6wEUo,52478
|
|
21
|
+
connector/acp/config_options.py,sha256=0VetQmmqJv_TBbl3_8jw8pfex5F5pyBCL1B4nsR-8vU,5586
|
|
22
|
+
connector/acp/discovery.py,sha256=pYi-YL1ClWDIFMs_n_yoR7-R6b2yLz0I8Ae4MUTDQLE,14771
|
|
23
|
+
connector/acp/manifest.py,sha256=Ij4xq0oXRuJyg25X0qxZw0wEJrQmWBMskCKK0zeFQ6c,4643
|
|
24
|
+
connector/acp/reducer.py,sha256=XCJFgzd4YlCqpxuBFtKeaw1pZMFAYc1CZdy8-gDBJ_I,22213
|
|
25
|
+
connector/acp/rpc.py,sha256=535zztCoGRFU2GCXbDGKLgAwiQS9EGAalLHxuKYIj4o,11612
|
|
26
|
+
connector/acp/manifests/__init__.py,sha256=-hTLeIHJFp9u-gMIWjk4iQxNQ_PUna6qnEGpKoHUBn0,43
|
|
27
|
+
connector/acp/manifests/codebuddy.json,sha256=b0_4QARoByyAuu0LYbmNk6bYsN2_n316-c0AjpxVS5A,986
|
|
28
|
+
connector/acp/manifests/cursor.json,sha256=Ka0BXhnx542bsA7IlZQzZC2ZtO0nJdIBm3DGhF2i2eI,986
|
|
29
|
+
connector/acp/manifests/gemini.json,sha256=YihU5G3qmsTKSXvDZTubWseAHOtSF5L5FYskDW86G84,783
|
|
30
|
+
connector/acp/manifests/grok_build.json,sha256=IMLr7fQs9VxBw-Qbngt-1waaRA9bbfn2jjBILAZDu8U,789
|
|
31
|
+
connector/claude/__init__.py,sha256=lTL6yk26FR9RJ6du1DsIgVPIPH434wBpZcqn59FszMQ,243
|
|
32
|
+
connector/claude/history_adapter.py,sha256=-WoCxdVB_1dmgmjKuhnRCFkMDUrnkoU7fM6QcvpOlRY,22870
|
|
33
|
+
connector/claude/normalized.py,sha256=8MAErEZh7M4zLFWtJIbJ2apL8O8bxJEBNUPowQrxChw,687
|
|
34
|
+
connector/claude/normalizers.py,sha256=HU4-TlZimCxQHg1_gNnLg5bzeiEQVu3B0pSdG_ccfiU,4117
|
|
35
|
+
connector/claude/path_utils.py,sha256=QfXudfFUDto8rvKUoTaJ8gvOudcalTpdPx6dlWVmosA,483
|
|
36
|
+
connector/claude/preferences.py,sha256=pHPUPs-gaVnoejZqwJK6tz4Zzy_V6P81EzKzVSJyRDI,1351
|
|
37
|
+
connector/claude/sdk_adapter.py,sha256=Sjr2g3mJA8yu2fH2WpNO7JiGKGQatPEbEjKjhLJgDto,53564
|
|
38
|
+
connector/claude/timeline_identity.py,sha256=5F4B6cH6baYkAE1JqcD-PxuzUNKFzLYuHzb3xlFpzG8,1365
|
|
39
|
+
connector/claude/timeline_reducer.py,sha256=okS7VWLU-uGsVeH13bPqVYLcvYSZUATesvtDOghhJo0,13589
|
|
40
|
+
connector/claude/trust.py,sha256=VmaqJmgBIGl7RGAt3bwXQzFW9EzxBk1F8hWFgz_D3G8,2150
|
|
41
|
+
connector/codex/__init__.py,sha256=TeU5p5BpXLAaEaJdtJFCqbY1_QMi4R9SNKorfbOaXnk,77
|
|
42
|
+
connector/codex/adapter.py,sha256=w3Hvl_Hujr0oVNEVd8UqUikGTN360_ci6kZJxWW45Xs,47833
|
|
43
|
+
connector/codex/history.py,sha256=4DuA1RJGz3KatCKnVyUfhbw4YH6zzCqZcrOXNidDTa8,7012
|
|
44
|
+
connector/codex/reducer.py,sha256=9Wm9-wPBarn-3p1L0y0rtD5Bz5a0J-q919H5PuyQy5k,49690
|
|
45
|
+
connector/codex/rpc.py,sha256=45nNZaRksvgzIKtWbBc2NGGxJhKmQgKzQ2jcx1XfNX8,10636
|
|
46
|
+
connector/local/__init__.py,sha256=Z6asmJEqFmAMGJ6Ia1ENN17j0AZfbX53zOSLcgl8ojw,207
|
|
47
|
+
connector/local/common.py,sha256=43DE1ldHwworQ_CeHh_F4n0aHw9UUBD5sYmS_t80Jso,3391
|
|
48
|
+
connector/local/file_ops.py,sha256=9RPYAgAhC1AaPSReX-eWM32yoZGBn6xV_11yWjWvsFo,5354
|
|
49
|
+
connector/local/ops.py,sha256=U0SV4zZ822caskVTfYCpNvjPdMeZREG0j46ks5QW6bQ,3245
|
|
50
|
+
connector/local/shell.py,sha256=HgHtkJmlnm0S2eyA3ZfKq6YjRpRKYarmmx1xJ4rnwwg,8375
|
|
51
|
+
connector/local/terminal.py,sha256=B2JUly_tzitgKS4VPYN_0JVmPwvcGC3lBNOX8SUDVYc,24262
|
|
52
|
+
agentlink_cli-0.1.0.dist-info/METADATA,sha256=nHgoDvfHUrIK-mFxCq7xExLMaP84iXaybO2XbGH93lM,4248
|
|
53
|
+
agentlink_cli-0.1.0.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
|
|
54
|
+
agentlink_cli-0.1.0.dist-info/entry_points.txt,sha256=CaZ9KMv8hWjsQ9AREOZdGVcwStE128n0kWZWSmsKXpA,90
|
|
55
|
+
agentlink_cli-0.1.0.dist-info/RECORD,,
|
connector/__init__.py
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"""Generic ACP (Agent Client Protocol) transport for multi-agent support."""
|
|
2
|
+
|
|
3
|
+
from connector.acp.adapter import AcpAdapter
|
|
4
|
+
from connector.acp.manifest import AgentManifest, load_builtin_manifests
|
|
5
|
+
|
|
6
|
+
__all__ = ["AcpAdapter", "AgentManifest", "load_builtin_manifests"]
|