synapse-a2a 0.2.15__tar.gz → 0.2.19__tar.gz
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.
Potentially problematic release.
This version of synapse-a2a might be problematic. Click here for more details.
- {synapse_a2a-0.2.15/synapse_a2a.egg-info → synapse_a2a-0.2.19}/PKG-INFO +48 -7
- synapse_a2a-0.2.15/PKG-INFO → synapse_a2a-0.2.19/README.md +46 -20
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/pyproject.toml +2 -1
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/cli.py +105 -10
- synapse_a2a-0.2.19/synapse/commands/config.py +519 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/templates/.synapse/default.md +14 -6
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/templates/.synapse/gemini.md +14 -6
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/tools/a2a.py +47 -15
- synapse_a2a-0.2.15/README.md → synapse_a2a-0.2.19/synapse_a2a.egg-info/PKG-INFO +61 -6
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse_a2a.egg-info/SOURCES.txt +2 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse_a2a.egg-info/requires.txt +1 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_cli_file_safety.py +74 -4
- synapse_a2a-0.2.19/tests/test_cmd_config.py +456 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_file_safety_pid.py +37 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_tools_a2a.py +176 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/setup.cfg +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/__init__.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/a2a_client.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/a2a_compat.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/auth.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/commands/__init__.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/commands/instructions.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/commands/list.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/commands/start.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/config.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/controller.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/delegation.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/error_detector.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/file_safety.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/grpc_server.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/history.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/input_router.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/logging_config.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/output_parser.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/port_manager.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/profiles/claude.yaml +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/profiles/codex.yaml +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/profiles/dummy.yaml +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/profiles/gemini.yaml +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/proto/__init__.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/proto/a2a_pb2.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/proto/a2a_pb2_grpc.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/registry.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/server.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/settings.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/shell.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/shell_hook.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/templates/.synapse/delegate.md +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/templates/.synapse/file-safety.md +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/templates/.synapse/settings.json +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/utils.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse/webhooks.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse_a2a.egg-info/dependency_links.txt +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse_a2a.egg-info/entry_points.txt +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/synapse_a2a.egg-info/top_level.txt +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_a2a_client.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_a2a_compat.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_a2a_compat_extended.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_a2a_tool.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_auth.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_cli.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_cli_args.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_cli_commands_coverage.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_cli_extended.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_cli_extra.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_cli_history.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_cli_interactive.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_cli_main.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_cli_refactor_spec.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_cmd_instructions.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_cmd_list_file_safety.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_cmd_list_watch.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_cmd_list_working_dir.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_config.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_controller.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_controller_pty.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_controller_registry_sync.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_controller_resume.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_delegation.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_error_detector.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_file_safety.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_file_safety_extended.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_gemini_init_timing.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_grpc_server.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_grpc_server_methods.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_history.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_input_router.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_input_router_extended.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_interactive_idle_detection.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_logging_config.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_output_parser.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_port_manager.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_proto.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_refactoring.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_registry.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_registry_extended.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_response_option.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_sender_identification.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_server.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_server_extended.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_server_extra.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_server_lifespan.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_settings.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_shell.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_shell_hook.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_status_unification.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_transport_retention.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_utils.py +0 -0
- {synapse_a2a-0.2.15 → synapse_a2a-0.2.19}/tests/test_webhooks.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: synapse-a2a
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.19
|
|
4
4
|
Summary: Agent-to-Agent communication protocol for CLI agents
|
|
5
5
|
Author: Synapse A2A Team
|
|
6
6
|
License: MIT
|
|
@@ -11,6 +11,7 @@ Requires-Dist: uvicorn>=0.23.0
|
|
|
11
11
|
Requires-Dist: pyyaml>=6.0
|
|
12
12
|
Requires-Dist: requests>=2.31.0
|
|
13
13
|
Requires-Dist: httpx>=0.24.0
|
|
14
|
+
Requires-Dist: questionary>=2.0.0
|
|
14
15
|
|
|
15
16
|
# Synapse A2A
|
|
16
17
|
|
|
@@ -464,6 +465,8 @@ synapse claude -- --resume
|
|
|
464
465
|
| `synapse file-safety record` | 変更を手動記録 |
|
|
465
466
|
| `synapse file-safety cleanup` | 古いデータ削除 |
|
|
466
467
|
| `synapse file-safety debug` | デバッグ情報表示 |
|
|
468
|
+
| `synapse config` | 設定管理(インタラクティブTUI) |
|
|
469
|
+
| `synapse config show` | 現在の設定表示 |
|
|
467
470
|
|
|
468
471
|
### コンテキストの再開 (Resume Mode)
|
|
469
472
|
|
|
@@ -664,32 +667,49 @@ synapse history cleanup --days 30 --dry-run
|
|
|
664
667
|
エージェント間通信には `synapse send` コマンドを使用してください。サンドボックス環境でも動作します。
|
|
665
668
|
|
|
666
669
|
```bash
|
|
667
|
-
synapse send <target> "<message>" [--from <sender>] [--priority <1-5>] [--response | --no-response]
|
|
670
|
+
synapse send <target> "<message>" [--from <sender>] [--priority <1-5>] [--response | --no-response] [--reply-to <task_id>]
|
|
668
671
|
```
|
|
669
672
|
|
|
673
|
+
**ターゲット指定方法:**
|
|
674
|
+
|
|
675
|
+
| 形式 | 例 | 説明 |
|
|
676
|
+
|-----|---|------|
|
|
677
|
+
| エージェントタイプ | `claude` | 単一インスタンスの場合のみ有効 |
|
|
678
|
+
| タイプ-ポート | `claude-8100` | 同タイプが複数ある場合の指定 |
|
|
679
|
+
| フルID | `synapse-claude-8100` | 完全なエージェントID |
|
|
680
|
+
|
|
681
|
+
同じタイプのエージェントが複数起動している場合、タイプのみの指定(例: `claude`)はエラーになります。`claude-8100` や `synapse-claude-8100` のように特定のインスタンスを指定してください。
|
|
682
|
+
|
|
670
683
|
**オプション:**
|
|
671
684
|
|
|
672
685
|
| オプション | 短縮形 | 説明 |
|
|
673
686
|
|-----------|--------|------|
|
|
674
687
|
| `--from` | `-f` | 送信元エージェントID(返信識別用) |
|
|
675
688
|
| `--priority` | `-p` | 優先度 1-4: 通常、5: 緊急停止(SIGINT送信) |
|
|
676
|
-
| `--response` | - |
|
|
677
|
-
| `--no-response` | - |
|
|
689
|
+
| `--response` | - | Roundtrip - 送信側が待機、受信側は `--reply-to` で返信必須 |
|
|
690
|
+
| `--no-response` | - | Oneway - 送りっぱなし、返信不要(デフォルト) |
|
|
691
|
+
| `--reply-to` | - | 特定タスクIDへの返信(`--response` への返信時に使用) |
|
|
678
692
|
|
|
679
693
|
**例:**
|
|
680
694
|
|
|
681
695
|
```bash
|
|
682
|
-
#
|
|
696
|
+
# メッセージ送信(単一インスタンス)
|
|
683
697
|
synapse send claude "Hello" --priority 1 --from codex
|
|
684
698
|
|
|
699
|
+
# 特定インスタンスへ送信(同タイプが複数の場合)
|
|
700
|
+
synapse send claude-8100 "Hello" --from synapse-claude-8101
|
|
701
|
+
|
|
685
702
|
# 緊急停止
|
|
686
703
|
synapse send claude "Stop!" --priority 5 --from codex
|
|
687
704
|
|
|
688
|
-
#
|
|
705
|
+
# レスポンスを待つ(roundtrip)
|
|
689
706
|
synapse send gemini "分析して" --response --from claude
|
|
707
|
+
|
|
708
|
+
# --response への返信(task_idは [A2A:task_id:sender] から取得)
|
|
709
|
+
synapse send claude "分析結果です..." --reply-to abc123 --from gemini
|
|
690
710
|
```
|
|
691
711
|
|
|
692
|
-
**重要:** `--from`
|
|
712
|
+
**重要:** `--from` オプションで送信元を指定してください。`--response` への返信時は `--reply-to <task_id>` を使用して返信を紐付けます。
|
|
693
713
|
|
|
694
714
|
### 低レベル A2A ツール
|
|
695
715
|
|
|
@@ -1136,6 +1156,27 @@ synapse init
|
|
|
1136
1156
|
|
|
1137
1157
|
# デフォルトに戻す
|
|
1138
1158
|
synapse reset
|
|
1159
|
+
|
|
1160
|
+
# 設定をインタラクティブに編集(TUI)
|
|
1161
|
+
synapse config
|
|
1162
|
+
|
|
1163
|
+
# ? Which settings file do you want to edit?
|
|
1164
|
+
# ❯ User settings (~/.synapse/settings.json)
|
|
1165
|
+
# Project settings (./.synapse/settings.json)
|
|
1166
|
+
#
|
|
1167
|
+
# ? Select a category to configure:
|
|
1168
|
+
# ❯ Environment Variables
|
|
1169
|
+
# Instructions
|
|
1170
|
+
# A2A Protocol
|
|
1171
|
+
# Delegation
|
|
1172
|
+
# Resume Flags
|
|
1173
|
+
# ──────────────
|
|
1174
|
+
# Save and exit
|
|
1175
|
+
# Exit without saving
|
|
1176
|
+
|
|
1177
|
+
# 現在の設定を表示(読み取り専用)
|
|
1178
|
+
synapse config show
|
|
1179
|
+
synapse config show --scope user
|
|
1139
1180
|
```
|
|
1140
1181
|
|
|
1141
1182
|
`synapse init` は以下のファイルを `.synapse/` ディレクトリにコピーします:
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: synapse-a2a
|
|
3
|
-
Version: 0.2.15
|
|
4
|
-
Summary: Agent-to-Agent communication protocol for CLI agents
|
|
5
|
-
Author: Synapse A2A Team
|
|
6
|
-
License: MIT
|
|
7
|
-
Requires-Python: >=3.10
|
|
8
|
-
Description-Content-Type: text/markdown
|
|
9
|
-
Requires-Dist: fastapi>=0.100.0
|
|
10
|
-
Requires-Dist: uvicorn>=0.23.0
|
|
11
|
-
Requires-Dist: pyyaml>=6.0
|
|
12
|
-
Requires-Dist: requests>=2.31.0
|
|
13
|
-
Requires-Dist: httpx>=0.24.0
|
|
14
|
-
|
|
15
1
|
# Synapse A2A
|
|
16
2
|
|
|
17
3
|
> **各エージェントの挙動を変えることなく、エージェント同士を協力させてタスクを実行する**
|
|
@@ -464,6 +450,8 @@ synapse claude -- --resume
|
|
|
464
450
|
| `synapse file-safety record` | 変更を手動記録 |
|
|
465
451
|
| `synapse file-safety cleanup` | 古いデータ削除 |
|
|
466
452
|
| `synapse file-safety debug` | デバッグ情報表示 |
|
|
453
|
+
| `synapse config` | 設定管理(インタラクティブTUI) |
|
|
454
|
+
| `synapse config show` | 現在の設定表示 |
|
|
467
455
|
|
|
468
456
|
### コンテキストの再開 (Resume Mode)
|
|
469
457
|
|
|
@@ -664,32 +652,49 @@ synapse history cleanup --days 30 --dry-run
|
|
|
664
652
|
エージェント間通信には `synapse send` コマンドを使用してください。サンドボックス環境でも動作します。
|
|
665
653
|
|
|
666
654
|
```bash
|
|
667
|
-
synapse send <target> "<message>" [--from <sender>] [--priority <1-5>] [--response | --no-response]
|
|
655
|
+
synapse send <target> "<message>" [--from <sender>] [--priority <1-5>] [--response | --no-response] [--reply-to <task_id>]
|
|
668
656
|
```
|
|
669
657
|
|
|
658
|
+
**ターゲット指定方法:**
|
|
659
|
+
|
|
660
|
+
| 形式 | 例 | 説明 |
|
|
661
|
+
|-----|---|------|
|
|
662
|
+
| エージェントタイプ | `claude` | 単一インスタンスの場合のみ有効 |
|
|
663
|
+
| タイプ-ポート | `claude-8100` | 同タイプが複数ある場合の指定 |
|
|
664
|
+
| フルID | `synapse-claude-8100` | 完全なエージェントID |
|
|
665
|
+
|
|
666
|
+
同じタイプのエージェントが複数起動している場合、タイプのみの指定(例: `claude`)はエラーになります。`claude-8100` や `synapse-claude-8100` のように特定のインスタンスを指定してください。
|
|
667
|
+
|
|
670
668
|
**オプション:**
|
|
671
669
|
|
|
672
670
|
| オプション | 短縮形 | 説明 |
|
|
673
671
|
|-----------|--------|------|
|
|
674
672
|
| `--from` | `-f` | 送信元エージェントID(返信識別用) |
|
|
675
673
|
| `--priority` | `-p` | 優先度 1-4: 通常、5: 緊急停止(SIGINT送信) |
|
|
676
|
-
| `--response` | - |
|
|
677
|
-
| `--no-response` | - |
|
|
674
|
+
| `--response` | - | Roundtrip - 送信側が待機、受信側は `--reply-to` で返信必須 |
|
|
675
|
+
| `--no-response` | - | Oneway - 送りっぱなし、返信不要(デフォルト) |
|
|
676
|
+
| `--reply-to` | - | 特定タスクIDへの返信(`--response` への返信時に使用) |
|
|
678
677
|
|
|
679
678
|
**例:**
|
|
680
679
|
|
|
681
680
|
```bash
|
|
682
|
-
#
|
|
681
|
+
# メッセージ送信(単一インスタンス)
|
|
683
682
|
synapse send claude "Hello" --priority 1 --from codex
|
|
684
683
|
|
|
684
|
+
# 特定インスタンスへ送信(同タイプが複数の場合)
|
|
685
|
+
synapse send claude-8100 "Hello" --from synapse-claude-8101
|
|
686
|
+
|
|
685
687
|
# 緊急停止
|
|
686
688
|
synapse send claude "Stop!" --priority 5 --from codex
|
|
687
689
|
|
|
688
|
-
#
|
|
690
|
+
# レスポンスを待つ(roundtrip)
|
|
689
691
|
synapse send gemini "分析して" --response --from claude
|
|
692
|
+
|
|
693
|
+
# --response への返信(task_idは [A2A:task_id:sender] から取得)
|
|
694
|
+
synapse send claude "分析結果です..." --reply-to abc123 --from gemini
|
|
690
695
|
```
|
|
691
696
|
|
|
692
|
-
**重要:** `--from`
|
|
697
|
+
**重要:** `--from` オプションで送信元を指定してください。`--response` への返信時は `--reply-to <task_id>` を使用して返信を紐付けます。
|
|
693
698
|
|
|
694
699
|
### 低レベル A2A ツール
|
|
695
700
|
|
|
@@ -1136,6 +1141,27 @@ synapse init
|
|
|
1136
1141
|
|
|
1137
1142
|
# デフォルトに戻す
|
|
1138
1143
|
synapse reset
|
|
1144
|
+
|
|
1145
|
+
# 設定をインタラクティブに編集(TUI)
|
|
1146
|
+
synapse config
|
|
1147
|
+
|
|
1148
|
+
# ? Which settings file do you want to edit?
|
|
1149
|
+
# ❯ User settings (~/.synapse/settings.json)
|
|
1150
|
+
# Project settings (./.synapse/settings.json)
|
|
1151
|
+
#
|
|
1152
|
+
# ? Select a category to configure:
|
|
1153
|
+
# ❯ Environment Variables
|
|
1154
|
+
# Instructions
|
|
1155
|
+
# A2A Protocol
|
|
1156
|
+
# Delegation
|
|
1157
|
+
# Resume Flags
|
|
1158
|
+
# ──────────────
|
|
1159
|
+
# Save and exit
|
|
1160
|
+
# Exit without saving
|
|
1161
|
+
|
|
1162
|
+
# 現在の設定を表示(読み取り専用)
|
|
1163
|
+
synapse config show
|
|
1164
|
+
synapse config show --scope user
|
|
1139
1165
|
```
|
|
1140
1166
|
|
|
1141
1167
|
`synapse init` は以下のファイルを `.synapse/` ディレクトリにコピーします:
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "synapse-a2a"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.19"
|
|
8
8
|
description = "Agent-to-Agent communication protocol for CLI agents"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -18,6 +18,7 @@ dependencies = [
|
|
|
18
18
|
"pyyaml>=6.0",
|
|
19
19
|
"requests>=2.31.0",
|
|
20
20
|
"httpx>=0.24.0",
|
|
21
|
+
"questionary>=2.0.0",
|
|
21
22
|
]
|
|
22
23
|
|
|
23
24
|
[dependency-groups]
|
|
@@ -680,10 +680,53 @@ def cmd_file_safety_locks(args: argparse.Namespace) -> None:
|
|
|
680
680
|
print("Run 'synapse file-safety cleanup-locks' to clean them up.")
|
|
681
681
|
|
|
682
682
|
|
|
683
|
+
def _resolve_agent_info(
|
|
684
|
+
agent_name: str,
|
|
685
|
+
) -> tuple[str, str | None, int | None]:
|
|
686
|
+
"""Resolve agent name to (agent_id, agent_type, pid).
|
|
687
|
+
|
|
688
|
+
Lookup order:
|
|
689
|
+
1. Exact match by agent_id in registry
|
|
690
|
+
2. Match by agent_type (short name like "claude") in live agents
|
|
691
|
+
3. Parse agent_type from agent_id format "synapse-{type}-{port}"
|
|
692
|
+
|
|
693
|
+
Returns:
|
|
694
|
+
Tuple of (agent_id, agent_type, pid). agent_type and pid may be None.
|
|
695
|
+
"""
|
|
696
|
+
from synapse.registry import AgentRegistry
|
|
697
|
+
|
|
698
|
+
agent_id = agent_name
|
|
699
|
+
agent_type = None
|
|
700
|
+
pid = None
|
|
701
|
+
|
|
702
|
+
with contextlib.suppress(Exception):
|
|
703
|
+
registry = AgentRegistry()
|
|
704
|
+
agent_info = registry.get_agent(agent_id)
|
|
705
|
+
|
|
706
|
+
# Try to find by agent_type if exact match fails
|
|
707
|
+
if not agent_info:
|
|
708
|
+
for aid, info in registry.get_live_agents().items():
|
|
709
|
+
if info.get("agent_type") == agent_id:
|
|
710
|
+
agent_info = info
|
|
711
|
+
agent_id = aid
|
|
712
|
+
break
|
|
713
|
+
|
|
714
|
+
if agent_info:
|
|
715
|
+
pid = agent_info.get("pid")
|
|
716
|
+
agent_type = agent_info.get("agent_type")
|
|
717
|
+
|
|
718
|
+
# Fallback: extract agent_type from agent_id format "synapse-{type}-{port}"
|
|
719
|
+
if not agent_type and agent_id.startswith("synapse-"):
|
|
720
|
+
parts = agent_id.split("-")
|
|
721
|
+
if len(parts) >= 3:
|
|
722
|
+
agent_type = parts[1]
|
|
723
|
+
|
|
724
|
+
return agent_id, agent_type, pid
|
|
725
|
+
|
|
726
|
+
|
|
683
727
|
def cmd_file_safety_lock(args: argparse.Namespace) -> None:
|
|
684
728
|
"""Acquire a lock on a file."""
|
|
685
729
|
from synapse.file_safety import FileSafetyManager, LockStatus
|
|
686
|
-
from synapse.registry import AgentRegistry
|
|
687
730
|
|
|
688
731
|
manager = FileSafetyManager.from_env()
|
|
689
732
|
|
|
@@ -691,18 +734,12 @@ def cmd_file_safety_lock(args: argparse.Namespace) -> None:
|
|
|
691
734
|
print("File safety is disabled. Enable with: SYNAPSE_FILE_SAFETY_ENABLED=true")
|
|
692
735
|
return
|
|
693
736
|
|
|
694
|
-
pid =
|
|
695
|
-
try:
|
|
696
|
-
registry = AgentRegistry()
|
|
697
|
-
agent_info = registry.get_agent(args.agent)
|
|
698
|
-
if agent_info:
|
|
699
|
-
pid = agent_info.get("pid")
|
|
700
|
-
except Exception:
|
|
701
|
-
pid = None
|
|
737
|
+
agent_id, agent_type, pid = _resolve_agent_info(args.agent)
|
|
702
738
|
|
|
703
739
|
result = manager.acquire_lock(
|
|
704
740
|
file_path=args.file,
|
|
705
|
-
|
|
741
|
+
agent_id=agent_id,
|
|
742
|
+
agent_type=agent_type,
|
|
706
743
|
task_id=args.task_id if hasattr(args, "task_id") else None,
|
|
707
744
|
duration_seconds=args.duration if hasattr(args, "duration") else None,
|
|
708
745
|
intent=args.intent if hasattr(args, "intent") else None,
|
|
@@ -1435,6 +1472,25 @@ def cmd_reset(args: argparse.Namespace) -> None:
|
|
|
1435
1472
|
print(f"✔ Re-copied skill to {installed_path}")
|
|
1436
1473
|
|
|
1437
1474
|
|
|
1475
|
+
def cmd_config(args: argparse.Namespace) -> None:
|
|
1476
|
+
"""Interactive configuration management."""
|
|
1477
|
+
from synapse.commands.config import ConfigCommand
|
|
1478
|
+
|
|
1479
|
+
cmd = ConfigCommand()
|
|
1480
|
+
scope = getattr(args, "scope", None)
|
|
1481
|
+
|
|
1482
|
+
cmd.run(scope=scope)
|
|
1483
|
+
|
|
1484
|
+
|
|
1485
|
+
def cmd_config_show(args: argparse.Namespace) -> None:
|
|
1486
|
+
"""Show current settings."""
|
|
1487
|
+
from synapse.commands.config import ConfigCommand
|
|
1488
|
+
|
|
1489
|
+
cmd = ConfigCommand()
|
|
1490
|
+
scope = getattr(args, "scope", None)
|
|
1491
|
+
cmd.show(scope=scope)
|
|
1492
|
+
|
|
1493
|
+
|
|
1438
1494
|
def cmd_auth_setup(args: argparse.Namespace) -> None:
|
|
1439
1495
|
"""Generate API keys and show setup instructions."""
|
|
1440
1496
|
api_key = generate_api_key()
|
|
@@ -2205,6 +2261,45 @@ Also re-copies skills from .claude to .codex.""",
|
|
|
2205
2261
|
)
|
|
2206
2262
|
p_reset.set_defaults(func=cmd_reset)
|
|
2207
2263
|
|
|
2264
|
+
# config - Interactive settings management
|
|
2265
|
+
p_config = subparsers.add_parser(
|
|
2266
|
+
"config",
|
|
2267
|
+
help="Interactive settings management",
|
|
2268
|
+
description="""Interactively configure Synapse settings using a TUI.
|
|
2269
|
+
|
|
2270
|
+
Opens an interactive menu to browse and modify settings in .synapse/settings.json.""",
|
|
2271
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
2272
|
+
epilog="""Examples:
|
|
2273
|
+
synapse config Interactive mode (prompts for scope)
|
|
2274
|
+
synapse config --scope user Edit user settings directly
|
|
2275
|
+
synapse config --scope project Edit project settings directly
|
|
2276
|
+
synapse config show Show merged settings (read-only)
|
|
2277
|
+
synapse config show --scope user Show user settings only""",
|
|
2278
|
+
)
|
|
2279
|
+
p_config.add_argument(
|
|
2280
|
+
"--scope",
|
|
2281
|
+
choices=["user", "project"],
|
|
2282
|
+
help="Settings scope to edit (user or project)",
|
|
2283
|
+
)
|
|
2284
|
+
p_config.set_defaults(func=cmd_config)
|
|
2285
|
+
|
|
2286
|
+
# config subcommands
|
|
2287
|
+
config_subparsers = p_config.add_subparsers(
|
|
2288
|
+
dest="config_command", metavar="SUBCOMMAND"
|
|
2289
|
+
)
|
|
2290
|
+
|
|
2291
|
+
# config show
|
|
2292
|
+
p_config_show = config_subparsers.add_parser(
|
|
2293
|
+
"show", help="Show current settings (read-only)"
|
|
2294
|
+
)
|
|
2295
|
+
p_config_show.add_argument(
|
|
2296
|
+
"--scope",
|
|
2297
|
+
choices=["user", "project", "merged"],
|
|
2298
|
+
default="merged",
|
|
2299
|
+
help="Settings scope to display (default: merged)",
|
|
2300
|
+
)
|
|
2301
|
+
p_config_show.set_defaults(func=cmd_config_show)
|
|
2302
|
+
|
|
2208
2303
|
# file-safety - File locking and modification tracking
|
|
2209
2304
|
p_file_safety = subparsers.add_parser(
|
|
2210
2305
|
"file-safety",
|