agent-office-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.
@@ -0,0 +1,93 @@
1
+ Metadata-Version: 2.4
2
+ Name: agent-office-cli
3
+ Version: 0.1.0
4
+ Summary: Human-centered multi-department office workflow, request management, and conversation adapter framework for AI agents
5
+ License: MIT
6
+ Project-URL: Homepage, https://github.com/IT-Engineer-K/Agent-Office
7
+ Project-URL: Repository, https://github.com/IT-Engineer-K/Agent-Office
8
+ Project-URL: Issues, https://github.com/IT-Engineer-K/Agent-Office/issues
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Requires-Python: >=3.10
17
+ Description-Content-Type: text/markdown
18
+ Requires-Dist: discord-message-cli>=0.3.0
19
+
20
+ # Agent Office (`agent-office-cli`)
21
+
22
+ 人間を中心に据えつつ、部署ごとの AI エージェント(マネージャー役・部下役)が並列に協調し、要望受付・質問すり合わせ・委譲・完了報告を行うためのオフィス基盤 CLI(`agent-office`)兼 Python ライブラリ(`agent_office`)です。
23
+
24
+ ## 設計の特徴
25
+
26
+ - **`discord-msg` との責務分離**: Discord の低レベル通信は [`discord-message-cli`](https://pypi.org/project/discord-message-cli/) (`discord_msg >= 0.3.0`) へ委譲し、Agent Office は `ConversationAdapter` を介して `REQ-ID`・部署窓口(`Desk`)・登場人物(`Actor`)・ステータス遷移・SQLite 永続化を管理します。
27
+ - **人間中心&複数部署の並列協調に対応**:
28
+ - `Desk`(各部署の窓口=チャンネル。登録済みチャンネルのみアクセス可能な allowlist として機能)
29
+ - `Actor`(`human` / `manager` / `worker`)
30
+ - `Request`(`REQ-0001` 形式の連番、`parent_req_id` による親子タスク委譲、`OPEN` / `CLARIFYING` / `WAITING_HUMAN` / `IN_PROGRESS` / `DONE` / `CANCELLED`)
31
+ - `RequestEvent`(質問・回答・状態変更の監査ログ)
32
+ - **再開可能なカーソル管理**: 受付チャンネルの `inbox_cursor` と各スレッドの `thread_cursor` を SQLite へ永続化し、プロセス再起動後も同じ位置から再開できます。
33
+
34
+ ## 導入
35
+
36
+ ```powershell
37
+ pip install agent-office-cli
38
+ ```
39
+
40
+ ローカルで開発する場合はリポジトリ直下で以下を実行してください。
41
+
42
+ ```powershell
43
+ pip install -e .
44
+ ```
45
+
46
+ Discord と連携する場合は事前に `DISCORD_BOT_TOKEN` 環境変数を設定してください(`discord-msg setup` でも設定可能です)。
47
+
48
+ ## 基本的な使い方(CLI)
49
+
50
+ 全コマンドで `--format json`(AI エージェント向け)と `--format table`(人間向け・既定)を利用できます。
51
+
52
+ ```powershell
53
+ # 1. 部署窓口(Desk)と登場人物(Actor)を登録
54
+ agent-office desk add dev --channel 123456789012345678 --name "開発部"
55
+ agent-office actor add owner --role human --name "オーナー" --external-user-id 222333444555666777
56
+ agent-office actor add dev-manager --role manager --name "開発マネージャー" --desk dev
57
+
58
+ # 2. 受付チャンネルの新着メッセージから REQ-ID を発番
59
+ agent-office inbox pull --desk dev --format json
60
+
61
+ # 3. 質問を送信(スレッド未作成なら自動作成、ステータスは CLARIFYING へ)
62
+ agent-office req ask REQ-0001 "優先度は高・中・低のどれにしますか?" --actor dev-manager --format json
63
+
64
+ # 4. 提案者の返信を待機(タイムアウトしてもカーソルを保存して終了コード 0)
65
+ agent-office req wait REQ-0001 --timeout 60 --format json
66
+
67
+ # 5. 進捗報告や完了報告(ステータス同時更新)
68
+ agent-office req reply REQ-0001 "実装とテストが完了しました。" --actor dev-manager --status DONE --format json
69
+ ```
70
+
71
+ ## Python API の利用例
72
+
73
+ ```python
74
+ from agent_office import AgentOfficeService, DiscordConversationAdapter, SQLiteStore
75
+
76
+ with SQLiteStore() as store:
77
+ svc = AgentOfficeService(store, DiscordConversationAdapter())
78
+ pulled = svc.pull_inbox("dev")
79
+ for req in pulled.created_requests:
80
+ svc.ask(req.req_id, "詳細要件を確認させてください。", actor_id="dev-manager")
81
+ waited = svc.wait_for_answer(req.req_id, timeout=60.0)
82
+ if not waited.timed_out:
83
+ svc.reply(req.req_id, "承知しました。作業を開始します。", actor_id="dev-manager", status="IN_PROGRESS")
84
+ ```
85
+
86
+ ## テストの実行
87
+
88
+ テストは `InMemoryConversationAdapter` およびモック `HttpTransport` を使用するため、外部通信なしで実行できます。
89
+
90
+ ```powershell
91
+ $env:PYTHONPATH="src"
92
+ python -m unittest discover -s tests -v
93
+ ```
@@ -0,0 +1,16 @@
1
+ agent_office/__init__.py,sha256=pEcbW9bJ8hfxiSqLl-FjiCsNLkjFZnpqE03W9K2sG_Y,1480
2
+ agent_office/cli.py,sha256=BIkbZ_4plWSBXFRaJf-zUmtWevJP3RmMaCsoSboAkCU,15970
3
+ agent_office/errors.py,sha256=fbK4HQfFSp4GtizAH3g8u4eWirEhpj3EJyM4OlhpN_k,1488
4
+ agent_office/formatter.py,sha256=kDhMB5il0qzWDmQduXNmE5vT_BYpVsl4wTpGwxCrM2Y,6775
5
+ agent_office/models.py,sha256=IF3flfRf3RGKcO-kflPBZ59FXmNZgNhXh2JHtckNcjs,8105
6
+ agent_office/service.py,sha256=nuuDU2uStgfFKk6Gd-3QRtonHc1xuNo-Yyqu-tDY_hQ,17965
7
+ agent_office/store.py,sha256=YjB5j8kVB2SEVyTNkvnBUdrh6gkMfljaI1iEMZoNu48,21634
8
+ agent_office/adapters/__init__.py,sha256=OKHOoWwZn7TSc1rTXmKAuzUkWn0lMXOZAn1YYvSaKww,307
9
+ agent_office/adapters/base.py,sha256=p2gA0911KT6a-j-WPFe_86t0hJ1f5X0wbWEjcgrmAEU,2018
10
+ agent_office/adapters/discord.py,sha256=ecin9SwcQUERo8-scLACJR-_pl8Za1AjuWKL3qqxWjw,8533
11
+ agent_office/adapters/memory.py,sha256=MYzPaSaIwN5iliUQRaVl8I-5T19jI_jjEU2OFcmOIh4,8058
12
+ agent_office_cli-0.1.0.dist-info/METADATA,sha256=aXhNp0YnXfZNRtszOGKi3KAZgijmROZZ1tEtMYt7Y4Q,4760
13
+ agent_office_cli-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
14
+ agent_office_cli-0.1.0.dist-info/entry_points.txt,sha256=5e3yrgXqrK0pBN6YH_nv3aenWh4MNcxeYvQ3SP4ckI8,55
15
+ agent_office_cli-0.1.0.dist-info/top_level.txt,sha256=n2Sh9D9ZXPjkFHODkjEe4r0fLW1TRXgiIC2qrKW7-cE,13
16
+ agent_office_cli-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ agent-office = agent_office.cli:main
@@ -0,0 +1 @@
1
+ agent_office