alpi-agent 0.2.93__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.
- alpi_agent-0.2.93/LICENSE +112 -0
- alpi_agent-0.2.93/PKG-INFO +263 -0
- alpi_agent-0.2.93/README.md +212 -0
- alpi_agent-0.2.93/alpi/__init__.py +1 -0
- alpi_agent-0.2.93/alpi/__main__.py +4 -0
- alpi_agent-0.2.93/alpi/_log.py +50 -0
- alpi_agent-0.2.93/alpi/alp/__init__.py +18 -0
- alpi_agent-0.2.93/alpi/alp/agent_context.py +368 -0
- alpi_agent-0.2.93/alpi/alp/client.py +221 -0
- alpi_agent-0.2.93/alpi/alp/envelope.py +249 -0
- alpi_agent-0.2.93/alpi/alp/handlers.py +135 -0
- alpi_agent-0.2.93/alpi/alp/keys.py +117 -0
- alpi_agent-0.2.93/alpi/alp/mention.py +115 -0
- alpi_agent-0.2.93/alpi/alp/noise.py +337 -0
- alpi_agent-0.2.93/alpi/alp/peers.py +122 -0
- alpi_agent-0.2.93/alpi/alp/rate_limit.py +73 -0
- alpi_agent-0.2.93/alpi/alp/server.py +396 -0
- alpi_agent-0.2.93/alpi/alp/setup.py +318 -0
- alpi_agent-0.2.93/alpi/alp/subscription.py +253 -0
- alpi_agent-0.2.93/alpi/alp/tasks.py +161 -0
- alpi_agent-0.2.93/alpi/alp/transport_tcp.py +168 -0
- alpi_agent-0.2.93/alpi/alp/workgroup.py +881 -0
- alpi_agent-0.2.93/alpi/alp/workgroup_client.py +322 -0
- alpi_agent-0.2.93/alpi/alp/workgroup_setup.py +787 -0
- alpi_agent-0.2.93/alpi/changelog.py +192 -0
- alpi_agent-0.2.93/alpi/cli.py +2367 -0
- alpi_agent-0.2.93/alpi/config.py +374 -0
- alpi_agent-0.2.93/alpi/doctor.py +696 -0
- alpi_agent-0.2.93/alpi/engine.py +469 -0
- alpi_agent-0.2.93/alpi/gateway/__init__.py +0 -0
- alpi_agent-0.2.93/alpi/gateway/base.py +50 -0
- alpi_agent-0.2.93/alpi/gateway/delivery.py +178 -0
- alpi_agent-0.2.93/alpi/gateway/platforms/__init__.py +0 -0
- alpi_agent-0.2.93/alpi/gateway/platforms/_md2.py +121 -0
- alpi_agent-0.2.93/alpi/gateway/platforms/gmail.py +214 -0
- alpi_agent-0.2.93/alpi/gateway/platforms/imap.py +298 -0
- alpi_agent-0.2.93/alpi/gateway/platforms/telegram.py +601 -0
- alpi_agent-0.2.93/alpi/gateway/platforms/webhook.py +25 -0
- alpi_agent-0.2.93/alpi/gateway/run.py +236 -0
- alpi_agent-0.2.93/alpi/gateway/setup.py +62 -0
- alpi_agent-0.2.93/alpi/gateway/shortcuts.py +173 -0
- alpi_agent-0.2.93/alpi/home.py +96 -0
- alpi_agent-0.2.93/alpi/ledger.py +156 -0
- alpi_agent-0.2.93/alpi/llm.py +233 -0
- alpi_agent-0.2.93/alpi/logs.py +125 -0
- alpi_agent-0.2.93/alpi/mail/__init__.py +1 -0
- alpi_agent-0.2.93/alpi/mail/gmail.py +434 -0
- alpi_agent-0.2.93/alpi/mail/gmail_auth.py +296 -0
- alpi_agent-0.2.93/alpi/mail/gmail_setup.py +76 -0
- alpi_agent-0.2.93/alpi/mail/imap.py +577 -0
- alpi_agent-0.2.93/alpi/mail/setup.py +105 -0
- alpi_agent-0.2.93/alpi/mcp/__init__.py +1 -0
- alpi_agent-0.2.93/alpi/mcp/client.py +259 -0
- alpi_agent-0.2.93/alpi/mcp/registry.py +135 -0
- alpi_agent-0.2.93/alpi/mcp/setup.py +272 -0
- alpi_agent-0.2.93/alpi/memory.py +214 -0
- alpi_agent-0.2.93/alpi/model_selector.py +297 -0
- alpi_agent-0.2.93/alpi/prompts/create_skill_guide.md +81 -0
- alpi_agent-0.2.93/alpi/prompts/default_agent.md +30 -0
- alpi_agent-0.2.93/alpi/prompts/skill_template.md +24 -0
- alpi_agent-0.2.93/alpi/prompts/system_prompt.md +137 -0
- alpi_agent-0.2.93/alpi/providers/__init__.py +29 -0
- alpi_agent-0.2.93/alpi/providers/anthropic.py +24 -0
- alpi_agent-0.2.93/alpi/providers/base.py +28 -0
- alpi_agent-0.2.93/alpi/providers/google.py +18 -0
- alpi_agent-0.2.93/alpi/providers/groq.py +20 -0
- alpi_agent-0.2.93/alpi/providers/ollama.py +118 -0
- alpi_agent-0.2.93/alpi/providers/openai.py +25 -0
- alpi_agent-0.2.93/alpi/providers/openrouter.py +19 -0
- alpi_agent-0.2.93/alpi/scheduler/__init__.py +1 -0
- alpi_agent-0.2.93/alpi/scheduler/run.py +346 -0
- alpi_agent-0.2.93/alpi/service.py +1041 -0
- alpi_agent-0.2.93/alpi/session.py +155 -0
- alpi_agent-0.2.93/alpi/session_map.py +96 -0
- alpi_agent-0.2.93/alpi/skills/__init__.py +0 -0
- alpi_agent-0.2.93/alpi/status.py +41 -0
- alpi_agent-0.2.93/alpi/tools/__init__.py +100 -0
- alpi_agent-0.2.93/alpi/tools/_approval.py +271 -0
- alpi_agent-0.2.93/alpi/tools/_budget.py +35 -0
- alpi_agent-0.2.93/alpi/tools/_guards.py +133 -0
- alpi_agent-0.2.93/alpi/tools/_osv.py +72 -0
- alpi_agent-0.2.93/alpi/tools/_paths.py +103 -0
- alpi_agent-0.2.93/alpi/tools/_sandbox.py +168 -0
- alpi_agent-0.2.93/alpi/tools/_skill_validate.py +149 -0
- alpi_agent-0.2.93/alpi/tools/_state.py +106 -0
- alpi_agent-0.2.93/alpi/tools/base.py +38 -0
- alpi_agent-0.2.93/alpi/tools/browser.py +457 -0
- alpi_agent-0.2.93/alpi/tools/delegate.py +349 -0
- alpi_agent-0.2.93/alpi/tools/edit_file.py +82 -0
- alpi_agent-0.2.93/alpi/tools/email.py +295 -0
- alpi_agent-0.2.93/alpi/tools/memory.py +315 -0
- alpi_agent-0.2.93/alpi/tools/peer.py +64 -0
- alpi_agent-0.2.93/alpi/tools/read_file.py +77 -0
- alpi_agent-0.2.93/alpi/tools/read_image.py +270 -0
- alpi_agent-0.2.93/alpi/tools/research.py +296 -0
- alpi_agent-0.2.93/alpi/tools/schedule.py +204 -0
- alpi_agent-0.2.93/alpi/tools/search.py +288 -0
- alpi_agent-0.2.93/alpi/tools/send_message.py +99 -0
- alpi_agent-0.2.93/alpi/tools/session_search.py +137 -0
- alpi_agent-0.2.93/alpi/tools/skill.py +924 -0
- alpi_agent-0.2.93/alpi/tools/stt.py +121 -0
- alpi_agent-0.2.93/alpi/tools/terminal.py +245 -0
- alpi_agent-0.2.93/alpi/tools/todo.py +94 -0
- alpi_agent-0.2.93/alpi/tools/tts.py +210 -0
- alpi_agent-0.2.93/alpi/tools/web_extract.py +112 -0
- alpi_agent-0.2.93/alpi/tools/web_fetch.py +131 -0
- alpi_agent-0.2.93/alpi/tools/web_search.py +105 -0
- alpi_agent-0.2.93/alpi/tools/workgroup.py +95 -0
- alpi_agent-0.2.93/alpi/tools/write_file.py +68 -0
- alpi_agent-0.2.93/alpi/tui/__init__.py +8 -0
- alpi_agent-0.2.93/alpi/tui/_links.py +39 -0
- alpi_agent-0.2.93/alpi/tui/app.py +721 -0
- alpi_agent-0.2.93/alpi/tui/formatting.py +250 -0
- alpi_agent-0.2.93/alpi/tui/list_row.py +85 -0
- alpi_agent-0.2.93/alpi/tui/model_panel.py +199 -0
- alpi_agent-0.2.93/alpi/tui/screens.py +527 -0
- alpi_agent-0.2.93/alpi/tui/theme.tcss +123 -0
- alpi_agent-0.2.93/alpi/tui/themes.py +53 -0
- alpi_agent-0.2.93/alpi/tui/widgets.py +425 -0
- alpi_agent-0.2.93/alpi/ui.py +475 -0
- alpi_agent-0.2.93/alpi_agent.egg-info/PKG-INFO +263 -0
- alpi_agent-0.2.93/alpi_agent.egg-info/SOURCES.txt +200 -0
- alpi_agent-0.2.93/alpi_agent.egg-info/dependency_links.txt +1 -0
- alpi_agent-0.2.93/alpi_agent.egg-info/entry_points.txt +2 -0
- alpi_agent-0.2.93/alpi_agent.egg-info/requires.txt +24 -0
- alpi_agent-0.2.93/alpi_agent.egg-info/top_level.txt +1 -0
- alpi_agent-0.2.93/pyproject.toml +94 -0
- alpi_agent-0.2.93/setup.cfg +4 -0
- alpi_agent-0.2.93/tests/test_alp_agent_context.py +186 -0
- alpi_agent-0.2.93/tests/test_alp_budget.py +144 -0
- alpi_agent-0.2.93/tests/test_alp_envelope.py +201 -0
- alpi_agent-0.2.93/tests/test_alp_intra.py +226 -0
- alpi_agent-0.2.93/tests/test_alp_keys.py +77 -0
- alpi_agent-0.2.93/tests/test_alp_mention.py +44 -0
- alpi_agent-0.2.93/tests/test_alp_noise.py +149 -0
- alpi_agent-0.2.93/tests/test_alp_peers.py +91 -0
- alpi_agent-0.2.93/tests/test_alp_tasks.py +252 -0
- alpi_agent-0.2.93/tests/test_alp_tcp.py +251 -0
- alpi_agent-0.2.93/tests/test_alp_workgroup.py +1648 -0
- alpi_agent-0.2.93/tests/test_alp_workgroup_client.py +399 -0
- alpi_agent-0.2.93/tests/test_alp_workgroup_poller.py +201 -0
- alpi_agent-0.2.93/tests/test_approval.py +101 -0
- alpi_agent-0.2.93/tests/test_auto_resume.py +90 -0
- alpi_agent-0.2.93/tests/test_browser.py +230 -0
- alpi_agent-0.2.93/tests/test_budget.py +85 -0
- alpi_agent-0.2.93/tests/test_bundled_skills.py +182 -0
- alpi_agent-0.2.93/tests/test_changelog.py +93 -0
- alpi_agent-0.2.93/tests/test_cli_surface.py +111 -0
- alpi_agent-0.2.93/tests/test_config.py +62 -0
- alpi_agent-0.2.93/tests/test_continue.py +136 -0
- alpi_agent-0.2.93/tests/test_doctor.py +144 -0
- alpi_agent-0.2.93/tests/test_email_tool_dispatch.py +96 -0
- alpi_agent-0.2.93/tests/test_engine_reset.py +56 -0
- alpi_agent-0.2.93/tests/test_engine_strip_cache.py +48 -0
- alpi_agent-0.2.93/tests/test_gateway.py +285 -0
- alpi_agent-0.2.93/tests/test_gateway_md2.py +130 -0
- alpi_agent-0.2.93/tests/test_gateway_model_picker.py +100 -0
- alpi_agent-0.2.93/tests/test_gateway_session_thread.py +115 -0
- alpi_agent-0.2.93/tests/test_gateway_shortcuts.py +132 -0
- alpi_agent-0.2.93/tests/test_gmail.py +264 -0
- alpi_agent-0.2.93/tests/test_guards.py +181 -0
- alpi_agent-0.2.93/tests/test_home.py +53 -0
- alpi_agent-0.2.93/tests/test_imap.py +454 -0
- alpi_agent-0.2.93/tests/test_imap_gateway.py +252 -0
- alpi_agent-0.2.93/tests/test_ledger.py +162 -0
- alpi_agent-0.2.93/tests/test_llm_chat.py +73 -0
- alpi_agent-0.2.93/tests/test_llm_privacy.py +15 -0
- alpi_agent-0.2.93/tests/test_logs_cmd.py +81 -0
- alpi_agent-0.2.93/tests/test_mcp.py +389 -0
- alpi_agent-0.2.93/tests/test_memory.py +65 -0
- alpi_agent-0.2.93/tests/test_memory_tool.py +160 -0
- alpi_agent-0.2.93/tests/test_memory_tool_v2.py +148 -0
- alpi_agent-0.2.93/tests/test_osv.py +73 -0
- alpi_agent-0.2.93/tests/test_parallel_tasks.py +134 -0
- alpi_agent-0.2.93/tests/test_paths_denylist.py +35 -0
- alpi_agent-0.2.93/tests/test_platform_hint.py +48 -0
- alpi_agent-0.2.93/tests/test_profile_cli.py +170 -0
- alpi_agent-0.2.93/tests/test_read_image_resize.py +85 -0
- alpi_agent-0.2.93/tests/test_sandbox.py +205 -0
- alpi_agent-0.2.93/tests/test_schedule.py +467 -0
- alpi_agent-0.2.93/tests/test_schedule_threatscan.py +61 -0
- alpi_agent-0.2.93/tests/test_send_message.py +235 -0
- alpi_agent-0.2.93/tests/test_service.py +269 -0
- alpi_agent-0.2.93/tests/test_session_map.py +69 -0
- alpi_agent-0.2.93/tests/test_session_search.py +97 -0
- alpi_agent-0.2.93/tests/test_skill_auto_validate.py +109 -0
- alpi_agent-0.2.93/tests/test_skill_validate.py +113 -0
- alpi_agent-0.2.93/tests/test_skills.py +447 -0
- alpi_agent-0.2.93/tests/test_state_contextvar.py +102 -0
- alpi_agent-0.2.93/tests/test_state_turn_usage.py +47 -0
- alpi_agent-0.2.93/tests/test_status_panel.py +66 -0
- alpi_agent-0.2.93/tests/test_stt.py +90 -0
- alpi_agent-0.2.93/tests/test_subsystem_logs.py +119 -0
- alpi_agent-0.2.93/tests/test_telegram_voice_inbound.py +104 -0
- alpi_agent-0.2.93/tests/test_tools.py +516 -0
- alpi_agent-0.2.93/tests/test_tts.py +149 -0
- alpi_agent-0.2.93/tests/test_tui_links.py +71 -0
- alpi_agent-0.2.93/tests/test_tui_list_row.py +97 -0
- alpi_agent-0.2.93/tests/test_ui.py +320 -0
- alpi_agent-0.2.93/tests/test_ui_menu.py +80 -0
- alpi_agent-0.2.93/tests/test_web_fetch.py +45 -0
- alpi_agent-0.2.93/tests/test_web_search.py +145 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
Business Source License 1.1
|
|
2
|
+
|
|
3
|
+
Licensor: Satoshi Ltd. (Hong Kong SAR)
|
|
4
|
+
Licensed Work: alpi — the source code in this repository at the
|
|
5
|
+
time the Licensed Work is accessed.
|
|
6
|
+
The Licensed Work is © 2026 Satoshi Ltd.
|
|
7
|
+
Additional Use Grant: You may make production use of the Licensed Work,
|
|
8
|
+
provided your use does not include offering the
|
|
9
|
+
Licensed Work, or any derivative work based on it,
|
|
10
|
+
to third parties on a hosted, embedded, or
|
|
11
|
+
managed-service basis. Natural persons using the
|
|
12
|
+
Licensed Work on machines they personally control
|
|
13
|
+
are covered by this grant for all personal,
|
|
14
|
+
research, and non-commercial purposes. Legal
|
|
15
|
+
entities (companies, organisations, partnerships,
|
|
16
|
+
trusts, government bodies) are covered only for
|
|
17
|
+
internal evaluation, development, and
|
|
18
|
+
experimentation — production deployment by a
|
|
19
|
+
legal entity requires a commercial licence from
|
|
20
|
+
the Licensor.
|
|
21
|
+
Change Date: 2030-04-23
|
|
22
|
+
Change License: Apache License, Version 2.0
|
|
23
|
+
|
|
24
|
+
For information about alternative licensing arrangements for the
|
|
25
|
+
Licensed Work, please contact: info@satoshi-ltd.com
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
Terms
|
|
30
|
+
|
|
31
|
+
The Licensor hereby grants you the right to copy, modify, create
|
|
32
|
+
derivative works, redistribute, and make non-production use of the
|
|
33
|
+
Licensed Work. The Licensor may make an Additional Use Grant, above,
|
|
34
|
+
permitting limited production use.
|
|
35
|
+
|
|
36
|
+
Effective on the Change Date, or the fourth anniversary of the first
|
|
37
|
+
publicly available distribution of a specific version of the Licensed
|
|
38
|
+
Work under this Licence, whichever comes first, the Licensor hereby
|
|
39
|
+
grants you rights under the terms of the Change Licence, and the
|
|
40
|
+
rights granted in the paragraph above terminate.
|
|
41
|
+
|
|
42
|
+
If your use of the Licensed Work does not comply with the
|
|
43
|
+
requirements currently in effect as described in this Licence, you
|
|
44
|
+
must purchase a commercial licence from the Licensor, its affiliated
|
|
45
|
+
entities, or authorised resellers, or you must refrain from using the
|
|
46
|
+
Licensed Work.
|
|
47
|
+
|
|
48
|
+
All copies of the original and modified Licensed Work, and derivative
|
|
49
|
+
works of the Licensed Work, are subject to this Licence. This Licence
|
|
50
|
+
applies separately for each version of the Licensed Work and the
|
|
51
|
+
Change Date may vary for each version of the Licensed Work released
|
|
52
|
+
by Licensor.
|
|
53
|
+
|
|
54
|
+
You must conspicuously display this Licence on each original or
|
|
55
|
+
modified copy of the Licensed Work. If you receive the Licensed Work
|
|
56
|
+
in original or modified form from a third party, the terms and
|
|
57
|
+
conditions set forth in this Licence apply to your use of that work.
|
|
58
|
+
|
|
59
|
+
Any use of the Licensed Work in violation of this Licence will
|
|
60
|
+
automatically terminate your rights under this Licence for the
|
|
61
|
+
current and all other versions of the Licensed Work.
|
|
62
|
+
|
|
63
|
+
This Licence does not grant you any right in any trademark or logo
|
|
64
|
+
of Licensor or its affiliates (provided that you may use a trademark
|
|
65
|
+
or logo of Licensor as expressly required by this Licence).
|
|
66
|
+
|
|
67
|
+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS
|
|
68
|
+
PROVIDED ON AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL
|
|
69
|
+
WARRANTIES AND CONDITIONS, EXPRESS OR IMPLIED, INCLUDING (WITHOUT
|
|
70
|
+
LIMITATION) WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, AND
|
|
71
|
+
FITNESS FOR A PARTICULAR PURPOSE.
|
|
72
|
+
|
|
73
|
+
MariaDB hereby grants you permission to use this Licence's text to
|
|
74
|
+
licence your works, and to refer to it using the trademark
|
|
75
|
+
"Business Source Licence", as long as you comply with the Covenants
|
|
76
|
+
of Licensor below.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
Covenants of Licensor
|
|
81
|
+
|
|
82
|
+
In consideration of the right to use this Licence's text and the
|
|
83
|
+
"Business Source Licence" name and trademark, Licensor covenants to
|
|
84
|
+
MariaDB, and to all other recipients of the Licensed Work to be
|
|
85
|
+
provided by Licensor:
|
|
86
|
+
|
|
87
|
+
1. To specify as the Change Licence the GPL Version 2.0 or any
|
|
88
|
+
later version, or a licence that is compatible with GPL
|
|
89
|
+
Version 2.0 or a later version, where "compatible" means that
|
|
90
|
+
software provided under the Change Licence can be included in
|
|
91
|
+
a program with software provided under GPL Version 2.0 or a
|
|
92
|
+
later version. Licensor may specify additional Change Licences
|
|
93
|
+
without limitation.
|
|
94
|
+
|
|
95
|
+
2. To either: (a) specify an additional grant of rights to end
|
|
96
|
+
users that is at least as permissive as the rights granted
|
|
97
|
+
under this Licence on the Change Date, or (b) require that the
|
|
98
|
+
Licensed Work be released under the Change Licence, and in no
|
|
99
|
+
event later than the Change Date.
|
|
100
|
+
|
|
101
|
+
3. To specify a Change Date.
|
|
102
|
+
|
|
103
|
+
4. Not to modify this Licence in any other way.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
Notice
|
|
108
|
+
|
|
109
|
+
The Business Source Licence (this document, or the "Licence") is not
|
|
110
|
+
an Open Source licence. However, the Licensed Work will eventually
|
|
111
|
+
be made available under an Open Source Licence, as stated in this
|
|
112
|
+
Licence.
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: alpi-agent
|
|
3
|
+
Version: 0.2.93
|
|
4
|
+
Summary: A profile-based personal AI agent for terminal, messengers, and private ALP networks
|
|
5
|
+
Author: Satoshi Ltd.
|
|
6
|
+
License-Expression: BUSL-1.1
|
|
7
|
+
Project-URL: Homepage, https://alpi.satoshi.ltd
|
|
8
|
+
Project-URL: Repository, https://github.com/satoshi-ltd/alpi
|
|
9
|
+
Project-URL: Issues, https://github.com/satoshi-ltd/alpi/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/satoshi-ltd/alpi/blob/main/CHANGELOG.md
|
|
11
|
+
Keywords: agent,ai,cli,llm,personal-agent,privacy,agent-to-agent,telegram,imap
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
17
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Communications :: Chat
|
|
23
|
+
Classifier: Topic :: Utilities
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: litellm>=1.50.0
|
|
28
|
+
Requires-Dist: rich>=13.7.0
|
|
29
|
+
Requires-Dist: prompt_toolkit>=3.0.43
|
|
30
|
+
Requires-Dist: pyyaml>=6.0
|
|
31
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
32
|
+
Requires-Dist: httpx>=0.27.0
|
|
33
|
+
Requires-Dist: click>=8.1.0
|
|
34
|
+
Requires-Dist: html2text>=2024.2.26
|
|
35
|
+
Requires-Dist: textual>=0.86.0
|
|
36
|
+
Requires-Dist: ddgs>=9.0.0
|
|
37
|
+
Requires-Dist: croniter>=2.0.0
|
|
38
|
+
Requires-Dist: playwright>=1.44
|
|
39
|
+
Requires-Dist: playwright-stealth>=1.0.6
|
|
40
|
+
Requires-Dist: pillow>=10.0
|
|
41
|
+
Requires-Dist: edge-tts>=7.0
|
|
42
|
+
Requires-Dist: faster-whisper>=1.0
|
|
43
|
+
Requires-Dist: cryptography>=42.0
|
|
44
|
+
Requires-Dist: setproctitle>=1.3
|
|
45
|
+
Provides-Extra: dev
|
|
46
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
47
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
|
|
48
|
+
Requires-Dist: ruff>=0.3.0; extra == "dev"
|
|
49
|
+
Requires-Dist: pip-audit>=2.7; extra == "dev"
|
|
50
|
+
Dynamic: license-file
|
|
51
|
+
|
|
52
|
+
# alpi
|
|
53
|
+
|
|
54
|
+
**Your private agent network.**
|
|
55
|
+
|
|
56
|
+
alpi starts as the agent in your terminal, then grows with you:
|
|
57
|
+
profiles for work, cron, home servers, research, and workgroups with other
|
|
58
|
+
alpis. Each profile owns its memory, keys, model, skills, gateways,
|
|
59
|
+
approvals, and trust boundary. ALP links them across machines without
|
|
60
|
+
a registry, central account, or mandatory cloud.
|
|
61
|
+
|
|
62
|
+
Bring any model. Keep every key. Run one alpi, or a network that stays
|
|
63
|
+
yours.
|
|
64
|
+
|
|
65
|
+
## Why alpi exists
|
|
66
|
+
|
|
67
|
+
Most useful agents eventually become infrastructure: they hold memory,
|
|
68
|
+
touch files, run commands, answer from a phone, wake up on schedules,
|
|
69
|
+
and coordinate work across machines. alpi treats the **profile** as
|
|
70
|
+
the unit of that infrastructure, not the chat.
|
|
71
|
+
|
|
72
|
+
The design goal is sovereignty:
|
|
73
|
+
|
|
74
|
+
- **Local-first by default.** State lives under `~/.alpi/` or a named
|
|
75
|
+
profile. Memory, sessions, skills, keys, logs, and peer lists are
|
|
76
|
+
files on your machine.
|
|
77
|
+
- **User-owned models.** Fresh profiles ship with no default model.
|
|
78
|
+
You pick the provider, model, API key, or Ollama server per profile.
|
|
79
|
+
- **Security as product shape.** Shell commands pass a three-tier
|
|
80
|
+
approval system. Dangerous commands are blocked with no override.
|
|
81
|
+
Web and email content is treated as hostile data. Skills and MCPs
|
|
82
|
+
are scanned before install.
|
|
83
|
+
- **Operational UX.** One setup wizard, a live `doctor`, a single
|
|
84
|
+
per-profile `alpi service` orchestrator (gateway + scheduler + ALP
|
|
85
|
+
listener on one asyncio loop), merged logs, and cleanup.
|
|
86
|
+
- **Private coordination.** ALP.1 links local profiles, ALP.2 links
|
|
87
|
+
machines over Noise_XK, and ALP.3 adds shared workgroups. Peers are
|
|
88
|
+
pinned by Ed25519 identity and governed by fail-closed capabilities.
|
|
89
|
+
No discovery service, no shared account, no central broker.
|
|
90
|
+
- **Honest provider boundaries.** alpi does not reverse-engineer
|
|
91
|
+
ChatGPT Plus, Claude Pro, Claude Code, or other first-party
|
|
92
|
+
subscription clients. If a vendor publishes an official third-party
|
|
93
|
+
OAuth flow, alpi can adopt it. Until then, users pay per-token API
|
|
94
|
+
access through their own keys.
|
|
95
|
+
|
|
96
|
+
## What ships today
|
|
97
|
+
|
|
98
|
+
The current release ships the full local-to-network shape:
|
|
99
|
+
|
|
100
|
+
- Textual TUI with streaming replies, slash commands, live tool cards,
|
|
101
|
+
interrupt, session resume, model switching, and cost/token display.
|
|
102
|
+
- Telegram, IMAP, and Gmail gateways hosted by the unified per-profile
|
|
103
|
+
service.
|
|
104
|
+
- Inline-learning memory: `USER.md`, `MEMORY.md`, and `AGENT.md`.
|
|
105
|
+
- Live skills under `~/.alpi/skills/<category>/<name>/`, scanner-gated
|
|
106
|
+
and auto-injected into the system prompt.
|
|
107
|
+
- Multi-provider LLM support through LiteLLM, plus first-class Ollama.
|
|
108
|
+
- Read-only `research(brief, depth)` sub-agent with `quick`, `normal`,
|
|
109
|
+
and `deep` tiers.
|
|
110
|
+
- Write-capable `delegate` sub-agent for focused file/web/terminal
|
|
111
|
+
tasks.
|
|
112
|
+
- Cron + one-shot scheduler hosted by the unified service.
|
|
113
|
+
- MCP client for user-configured local MCP servers.
|
|
114
|
+
- ALP.1: intra-machine agent-to-agent links over Unix sockets.
|
|
115
|
+
- ALP.2: inter-machine links over Noise_XK TCP, with per-peer budget
|
|
116
|
+
and rate-limit enforcement.
|
|
117
|
+
- ALP.3: hub-anchored shared workgroups for multiple alpis and optional
|
|
118
|
+
human participants.
|
|
119
|
+
- `alpi doctor`, `alpi logs`, one launchd / systemd unit per profile,
|
|
120
|
+
backup-friendly file layout, and security audit logs.
|
|
121
|
+
|
|
122
|
+
## Quickstart
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
uv tool install alpi-agent
|
|
126
|
+
alpi setup
|
|
127
|
+
alpi
|
|
128
|
+
alpi doctor
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Optional browser support:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
playwright install chromium
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
During setup, pick a model, paste the relevant key, and pin a
|
|
138
|
+
workspace. For local-only inference, install Ollama first and add it in
|
|
139
|
+
`alpi setup -> Model`.
|
|
140
|
+
|
|
141
|
+
Common commands:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
alpi # interactive TUI
|
|
145
|
+
alpi -c # resume last session
|
|
146
|
+
alpi -p work # use named profile
|
|
147
|
+
alpi chat --once "status?" # one-shot stdout turn
|
|
148
|
+
|
|
149
|
+
alpi setup # model, gateways, MCPs, sandbox, service
|
|
150
|
+
alpi doctor # live health checks
|
|
151
|
+
alpi logs # merged profile logs
|
|
152
|
+
|
|
153
|
+
alpi profile list
|
|
154
|
+
alpi profile create work
|
|
155
|
+
alpi profile remove work
|
|
156
|
+
|
|
157
|
+
alpi service start|stop|restart|status # unified per-profile orchestrator
|
|
158
|
+
alpi schedule run-once|fire <job-id> # operational scheduler verbs
|
|
159
|
+
|
|
160
|
+
alpi peers key
|
|
161
|
+
alpi peers list
|
|
162
|
+
alpi peers add <id> <pubkey>
|
|
163
|
+
alpi peers ping <id>
|
|
164
|
+
|
|
165
|
+
alpi workgroup list
|
|
166
|
+
alpi workgroup create <name> --member <peer-id>
|
|
167
|
+
alpi workgroup join <hub-id> <wg_id>
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
For the first-day walkthrough, see [QUICKSTART.md](QUICKSTART.md).
|
|
171
|
+
|
|
172
|
+
## Core concepts
|
|
173
|
+
|
|
174
|
+
**Profiles** are the isolation primitive. A profile is one directory,
|
|
175
|
+
one identity, one model choice, one memory, one skill set, one gateway
|
|
176
|
+
configuration, one schedule surface, and one ALP peer list. The
|
|
177
|
+
default profile lives at `~/.alpi/`; named profiles live under
|
|
178
|
+
`~/.alpi/profiles/<name>/`.
|
|
179
|
+
|
|
180
|
+
**Memory** is plain Markdown. `USER.md` captures facts about the user,
|
|
181
|
+
`MEMORY.md` captures environment quirks and durable operational facts,
|
|
182
|
+
and `AGENT.md` shapes how alpi should respond. Memory is updated inline
|
|
183
|
+
during conversations; there is no post-session reflection loop.
|
|
184
|
+
|
|
185
|
+
**Skills** are reusable recipes with a strict directory contract. They
|
|
186
|
+
can include instructions, scripts, references, assets, secrets, and
|
|
187
|
+
state. Mutations go through validation and a security scanner; secrets
|
|
188
|
+
live in either `.env` or a per-skill `secrets/` directory.
|
|
189
|
+
|
|
190
|
+
**Workspace** is the default root for relative paths, not a fake
|
|
191
|
+
security wall. File tools and terminal can use absolute paths except
|
|
192
|
+
for a sensitive-path denylist. Real workspace-only isolation is the
|
|
193
|
+
opt-in OS sandbox.
|
|
194
|
+
|
|
195
|
+
**ALP** is the Alpi Link Protocol. Each profile owns an Ed25519 keypair.
|
|
196
|
+
Peers pin pubkeys out of band and grant explicit capabilities such as
|
|
197
|
+
`link.ping`, `link.ask`, and `workgroup.post`. ALP.1 handles same-machine
|
|
198
|
+
profiles over Unix sockets. ALP.2 handles inter-machine links with
|
|
199
|
+
Noise_XK over TCP plus budgets and rate limits. ALP.3 adds
|
|
200
|
+
hub-anchored workgroups.
|
|
201
|
+
|
|
202
|
+
## Security posture
|
|
203
|
+
|
|
204
|
+
alpi assumes the LLM is powerful, fallible, and sitting next to user
|
|
205
|
+
credentials. The guardrails are local and layered:
|
|
206
|
+
|
|
207
|
+
- safe / caution / dangerous command classification;
|
|
208
|
+
- dangerous commands blocked with no config escape hatch;
|
|
209
|
+
- caution commands require interactive approval or configured allowlist;
|
|
210
|
+
- sensitive-path denylist shared across file and terminal posture;
|
|
211
|
+
- SSRF protection on web tools;
|
|
212
|
+
- prompt-injection warnings on fetched web/email content;
|
|
213
|
+
- OSV malware checks before skill or MCP install;
|
|
214
|
+
- optional macOS/Linux OS sandbox per profile;
|
|
215
|
+
- `approval.log` and `agent.log` for audit.
|
|
216
|
+
|
|
217
|
+
See [docs/SECURITY.md](docs/SECURITY.md) for the full model.
|
|
218
|
+
|
|
219
|
+
## Documentation
|
|
220
|
+
|
|
221
|
+
- [QUICKSTART.md](QUICKSTART.md) — install, model, workspace, first chat,
|
|
222
|
+
gateways, profiles, ALP, doctor.
|
|
223
|
+
- [docs/PROFILES.md](docs/PROFILES.md) — per-profile identity,
|
|
224
|
+
isolation, state, memory, skills, peers, services.
|
|
225
|
+
- [docs/ALP.md](docs/ALP.md) — wire protocol, identity, signatures,
|
|
226
|
+
transports, methods, errors, workgroups.
|
|
227
|
+
- [docs/SECURITY.md](docs/SECURITY.md) — threat model, approval gate,
|
|
228
|
+
sandbox, injection/SSRF/path guards, dependency posture.
|
|
229
|
+
- [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) — implementation
|
|
230
|
+
reference for contributors and agents reading the codebase.
|
|
231
|
+
- [docs/CONFIG.md](docs/CONFIG.md) — every YAML key and when it takes
|
|
232
|
+
effect.
|
|
233
|
+
- [docs/SKILLS.md](docs/SKILLS.md) — skill directory contract,
|
|
234
|
+
frontmatter, secrets, scanner, validation.
|
|
235
|
+
- [docs/MODELS.md](docs/MODELS.md) — model recommendations for
|
|
236
|
+
tool-heavy agent use.
|
|
237
|
+
- [docs/DEPLOYMENTS.md](docs/DEPLOYMENTS.md) — laptop, home server,
|
|
238
|
+
multi-profile, multi-device, family/team, enterprise shapes.
|
|
239
|
+
- [docs/OPERATIONS.md](docs/OPERATIONS.md) — services, logs, upgrades,
|
|
240
|
+
backup/restore, monitoring, disaster recovery.
|
|
241
|
+
- [docs/ROADMAP.md](docs/ROADMAP.md) — open work and rejected ideas.
|
|
242
|
+
|
|
243
|
+
## Tests
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
uv run --with pytest pytest -q
|
|
247
|
+
uv run --with pytest pytest --llm
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
## License
|
|
251
|
+
|
|
252
|
+
alpi is source-available from day one. The agent core is published by
|
|
253
|
+
[Satoshi Ltd.](https://www.satoshi-ltd.com/) under the
|
|
254
|
+
[Business Source Licence 1.1](LICENSE), with a scheduled conversion to
|
|
255
|
+
Apache 2.0 on 2030-04-23, or four years after each version's first
|
|
256
|
+
public release, whichever comes first.
|
|
257
|
+
|
|
258
|
+
Personal use, research, evaluation, and non-production deployments are
|
|
259
|
+
free. Commercial production deployments, or offering alpi as a hosted,
|
|
260
|
+
embedded, or managed service, are covered by a Satoshi Ltd. commercial
|
|
261
|
+
licence.
|
|
262
|
+
|
|
263
|
+
Commercial enquiries: **info@satoshi-ltd.com**.
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# alpi
|
|
2
|
+
|
|
3
|
+
**Your private agent network.**
|
|
4
|
+
|
|
5
|
+
alpi starts as the agent in your terminal, then grows with you:
|
|
6
|
+
profiles for work, cron, home servers, research, and workgroups with other
|
|
7
|
+
alpis. Each profile owns its memory, keys, model, skills, gateways,
|
|
8
|
+
approvals, and trust boundary. ALP links them across machines without
|
|
9
|
+
a registry, central account, or mandatory cloud.
|
|
10
|
+
|
|
11
|
+
Bring any model. Keep every key. Run one alpi, or a network that stays
|
|
12
|
+
yours.
|
|
13
|
+
|
|
14
|
+
## Why alpi exists
|
|
15
|
+
|
|
16
|
+
Most useful agents eventually become infrastructure: they hold memory,
|
|
17
|
+
touch files, run commands, answer from a phone, wake up on schedules,
|
|
18
|
+
and coordinate work across machines. alpi treats the **profile** as
|
|
19
|
+
the unit of that infrastructure, not the chat.
|
|
20
|
+
|
|
21
|
+
The design goal is sovereignty:
|
|
22
|
+
|
|
23
|
+
- **Local-first by default.** State lives under `~/.alpi/` or a named
|
|
24
|
+
profile. Memory, sessions, skills, keys, logs, and peer lists are
|
|
25
|
+
files on your machine.
|
|
26
|
+
- **User-owned models.** Fresh profiles ship with no default model.
|
|
27
|
+
You pick the provider, model, API key, or Ollama server per profile.
|
|
28
|
+
- **Security as product shape.** Shell commands pass a three-tier
|
|
29
|
+
approval system. Dangerous commands are blocked with no override.
|
|
30
|
+
Web and email content is treated as hostile data. Skills and MCPs
|
|
31
|
+
are scanned before install.
|
|
32
|
+
- **Operational UX.** One setup wizard, a live `doctor`, a single
|
|
33
|
+
per-profile `alpi service` orchestrator (gateway + scheduler + ALP
|
|
34
|
+
listener on one asyncio loop), merged logs, and cleanup.
|
|
35
|
+
- **Private coordination.** ALP.1 links local profiles, ALP.2 links
|
|
36
|
+
machines over Noise_XK, and ALP.3 adds shared workgroups. Peers are
|
|
37
|
+
pinned by Ed25519 identity and governed by fail-closed capabilities.
|
|
38
|
+
No discovery service, no shared account, no central broker.
|
|
39
|
+
- **Honest provider boundaries.** alpi does not reverse-engineer
|
|
40
|
+
ChatGPT Plus, Claude Pro, Claude Code, or other first-party
|
|
41
|
+
subscription clients. If a vendor publishes an official third-party
|
|
42
|
+
OAuth flow, alpi can adopt it. Until then, users pay per-token API
|
|
43
|
+
access through their own keys.
|
|
44
|
+
|
|
45
|
+
## What ships today
|
|
46
|
+
|
|
47
|
+
The current release ships the full local-to-network shape:
|
|
48
|
+
|
|
49
|
+
- Textual TUI with streaming replies, slash commands, live tool cards,
|
|
50
|
+
interrupt, session resume, model switching, and cost/token display.
|
|
51
|
+
- Telegram, IMAP, and Gmail gateways hosted by the unified per-profile
|
|
52
|
+
service.
|
|
53
|
+
- Inline-learning memory: `USER.md`, `MEMORY.md`, and `AGENT.md`.
|
|
54
|
+
- Live skills under `~/.alpi/skills/<category>/<name>/`, scanner-gated
|
|
55
|
+
and auto-injected into the system prompt.
|
|
56
|
+
- Multi-provider LLM support through LiteLLM, plus first-class Ollama.
|
|
57
|
+
- Read-only `research(brief, depth)` sub-agent with `quick`, `normal`,
|
|
58
|
+
and `deep` tiers.
|
|
59
|
+
- Write-capable `delegate` sub-agent for focused file/web/terminal
|
|
60
|
+
tasks.
|
|
61
|
+
- Cron + one-shot scheduler hosted by the unified service.
|
|
62
|
+
- MCP client for user-configured local MCP servers.
|
|
63
|
+
- ALP.1: intra-machine agent-to-agent links over Unix sockets.
|
|
64
|
+
- ALP.2: inter-machine links over Noise_XK TCP, with per-peer budget
|
|
65
|
+
and rate-limit enforcement.
|
|
66
|
+
- ALP.3: hub-anchored shared workgroups for multiple alpis and optional
|
|
67
|
+
human participants.
|
|
68
|
+
- `alpi doctor`, `alpi logs`, one launchd / systemd unit per profile,
|
|
69
|
+
backup-friendly file layout, and security audit logs.
|
|
70
|
+
|
|
71
|
+
## Quickstart
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
uv tool install alpi-agent
|
|
75
|
+
alpi setup
|
|
76
|
+
alpi
|
|
77
|
+
alpi doctor
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Optional browser support:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
playwright install chromium
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
During setup, pick a model, paste the relevant key, and pin a
|
|
87
|
+
workspace. For local-only inference, install Ollama first and add it in
|
|
88
|
+
`alpi setup -> Model`.
|
|
89
|
+
|
|
90
|
+
Common commands:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
alpi # interactive TUI
|
|
94
|
+
alpi -c # resume last session
|
|
95
|
+
alpi -p work # use named profile
|
|
96
|
+
alpi chat --once "status?" # one-shot stdout turn
|
|
97
|
+
|
|
98
|
+
alpi setup # model, gateways, MCPs, sandbox, service
|
|
99
|
+
alpi doctor # live health checks
|
|
100
|
+
alpi logs # merged profile logs
|
|
101
|
+
|
|
102
|
+
alpi profile list
|
|
103
|
+
alpi profile create work
|
|
104
|
+
alpi profile remove work
|
|
105
|
+
|
|
106
|
+
alpi service start|stop|restart|status # unified per-profile orchestrator
|
|
107
|
+
alpi schedule run-once|fire <job-id> # operational scheduler verbs
|
|
108
|
+
|
|
109
|
+
alpi peers key
|
|
110
|
+
alpi peers list
|
|
111
|
+
alpi peers add <id> <pubkey>
|
|
112
|
+
alpi peers ping <id>
|
|
113
|
+
|
|
114
|
+
alpi workgroup list
|
|
115
|
+
alpi workgroup create <name> --member <peer-id>
|
|
116
|
+
alpi workgroup join <hub-id> <wg_id>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
For the first-day walkthrough, see [QUICKSTART.md](QUICKSTART.md).
|
|
120
|
+
|
|
121
|
+
## Core concepts
|
|
122
|
+
|
|
123
|
+
**Profiles** are the isolation primitive. A profile is one directory,
|
|
124
|
+
one identity, one model choice, one memory, one skill set, one gateway
|
|
125
|
+
configuration, one schedule surface, and one ALP peer list. The
|
|
126
|
+
default profile lives at `~/.alpi/`; named profiles live under
|
|
127
|
+
`~/.alpi/profiles/<name>/`.
|
|
128
|
+
|
|
129
|
+
**Memory** is plain Markdown. `USER.md` captures facts about the user,
|
|
130
|
+
`MEMORY.md` captures environment quirks and durable operational facts,
|
|
131
|
+
and `AGENT.md` shapes how alpi should respond. Memory is updated inline
|
|
132
|
+
during conversations; there is no post-session reflection loop.
|
|
133
|
+
|
|
134
|
+
**Skills** are reusable recipes with a strict directory contract. They
|
|
135
|
+
can include instructions, scripts, references, assets, secrets, and
|
|
136
|
+
state. Mutations go through validation and a security scanner; secrets
|
|
137
|
+
live in either `.env` or a per-skill `secrets/` directory.
|
|
138
|
+
|
|
139
|
+
**Workspace** is the default root for relative paths, not a fake
|
|
140
|
+
security wall. File tools and terminal can use absolute paths except
|
|
141
|
+
for a sensitive-path denylist. Real workspace-only isolation is the
|
|
142
|
+
opt-in OS sandbox.
|
|
143
|
+
|
|
144
|
+
**ALP** is the Alpi Link Protocol. Each profile owns an Ed25519 keypair.
|
|
145
|
+
Peers pin pubkeys out of band and grant explicit capabilities such as
|
|
146
|
+
`link.ping`, `link.ask`, and `workgroup.post`. ALP.1 handles same-machine
|
|
147
|
+
profiles over Unix sockets. ALP.2 handles inter-machine links with
|
|
148
|
+
Noise_XK over TCP plus budgets and rate limits. ALP.3 adds
|
|
149
|
+
hub-anchored workgroups.
|
|
150
|
+
|
|
151
|
+
## Security posture
|
|
152
|
+
|
|
153
|
+
alpi assumes the LLM is powerful, fallible, and sitting next to user
|
|
154
|
+
credentials. The guardrails are local and layered:
|
|
155
|
+
|
|
156
|
+
- safe / caution / dangerous command classification;
|
|
157
|
+
- dangerous commands blocked with no config escape hatch;
|
|
158
|
+
- caution commands require interactive approval or configured allowlist;
|
|
159
|
+
- sensitive-path denylist shared across file and terminal posture;
|
|
160
|
+
- SSRF protection on web tools;
|
|
161
|
+
- prompt-injection warnings on fetched web/email content;
|
|
162
|
+
- OSV malware checks before skill or MCP install;
|
|
163
|
+
- optional macOS/Linux OS sandbox per profile;
|
|
164
|
+
- `approval.log` and `agent.log` for audit.
|
|
165
|
+
|
|
166
|
+
See [docs/SECURITY.md](docs/SECURITY.md) for the full model.
|
|
167
|
+
|
|
168
|
+
## Documentation
|
|
169
|
+
|
|
170
|
+
- [QUICKSTART.md](QUICKSTART.md) — install, model, workspace, first chat,
|
|
171
|
+
gateways, profiles, ALP, doctor.
|
|
172
|
+
- [docs/PROFILES.md](docs/PROFILES.md) — per-profile identity,
|
|
173
|
+
isolation, state, memory, skills, peers, services.
|
|
174
|
+
- [docs/ALP.md](docs/ALP.md) — wire protocol, identity, signatures,
|
|
175
|
+
transports, methods, errors, workgroups.
|
|
176
|
+
- [docs/SECURITY.md](docs/SECURITY.md) — threat model, approval gate,
|
|
177
|
+
sandbox, injection/SSRF/path guards, dependency posture.
|
|
178
|
+
- [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) — implementation
|
|
179
|
+
reference for contributors and agents reading the codebase.
|
|
180
|
+
- [docs/CONFIG.md](docs/CONFIG.md) — every YAML key and when it takes
|
|
181
|
+
effect.
|
|
182
|
+
- [docs/SKILLS.md](docs/SKILLS.md) — skill directory contract,
|
|
183
|
+
frontmatter, secrets, scanner, validation.
|
|
184
|
+
- [docs/MODELS.md](docs/MODELS.md) — model recommendations for
|
|
185
|
+
tool-heavy agent use.
|
|
186
|
+
- [docs/DEPLOYMENTS.md](docs/DEPLOYMENTS.md) — laptop, home server,
|
|
187
|
+
multi-profile, multi-device, family/team, enterprise shapes.
|
|
188
|
+
- [docs/OPERATIONS.md](docs/OPERATIONS.md) — services, logs, upgrades,
|
|
189
|
+
backup/restore, monitoring, disaster recovery.
|
|
190
|
+
- [docs/ROADMAP.md](docs/ROADMAP.md) — open work and rejected ideas.
|
|
191
|
+
|
|
192
|
+
## Tests
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
uv run --with pytest pytest -q
|
|
196
|
+
uv run --with pytest pytest --llm
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## License
|
|
200
|
+
|
|
201
|
+
alpi is source-available from day one. The agent core is published by
|
|
202
|
+
[Satoshi Ltd.](https://www.satoshi-ltd.com/) under the
|
|
203
|
+
[Business Source Licence 1.1](LICENSE), with a scheduled conversion to
|
|
204
|
+
Apache 2.0 on 2030-04-23, or four years after each version's first
|
|
205
|
+
public release, whichever comes first.
|
|
206
|
+
|
|
207
|
+
Personal use, research, evaluation, and non-production deployments are
|
|
208
|
+
free. Commercial production deployments, or offering alpi as a hosted,
|
|
209
|
+
embedded, or managed service, are covered by a Satoshi Ltd. commercial
|
|
210
|
+
licence.
|
|
211
|
+
|
|
212
|
+
Commercial enquiries: **info@satoshi-ltd.com**.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.93"
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""Shared subsystem logging — one rotating file per subsystem in ``~/.alpi/logs/``.
|
|
2
|
+
|
|
3
|
+
Every subsystem writes to ``{home}/logs/{subsystem}.log`` with the same
|
|
4
|
+
format so ``alpi logs`` can merge them cleanly. The logger is namespaced
|
|
5
|
+
(``alpi.<subsystem>``) and does NOT propagate to the root — it's
|
|
6
|
+
self-contained, so importing this from inside the TUI doesn't leak lines
|
|
7
|
+
into stdout.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
import logging
|
|
13
|
+
from logging.handlers import RotatingFileHandler
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
|
|
16
|
+
FORMAT = "%(asctime)s %(levelname)s %(name)s %(message)s"
|
|
17
|
+
MAX_BYTES = 1_000_000
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def log_dir(home: Path) -> Path:
|
|
21
|
+
"""The canonical logs directory for a profile."""
|
|
22
|
+
return home / "logs"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def log_path(home: Path, subsystem: str) -> Path:
|
|
26
|
+
return log_dir(home) / f"{subsystem}.log"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def get_subsystem_logger(home: Path, subsystem: str) -> logging.Logger:
|
|
30
|
+
"""Return the dedicated logger for ``subsystem``, configured lazily."""
|
|
31
|
+
name = f"alpi.{subsystem}"
|
|
32
|
+
logger = logging.getLogger(name)
|
|
33
|
+
if getattr(logger, "_alpi_configured", False):
|
|
34
|
+
return logger
|
|
35
|
+
|
|
36
|
+
try:
|
|
37
|
+
d = log_dir(home)
|
|
38
|
+
d.mkdir(parents=True, exist_ok=True)
|
|
39
|
+
handler = RotatingFileHandler(
|
|
40
|
+
d / f"{subsystem}.log", maxBytes=MAX_BYTES, backupCount=0,
|
|
41
|
+
)
|
|
42
|
+
handler.setFormatter(logging.Formatter(FORMAT))
|
|
43
|
+
logger.addHandler(handler)
|
|
44
|
+
except OSError:
|
|
45
|
+
pass # no-op logger — better than crashing if the dir can't be made
|
|
46
|
+
|
|
47
|
+
logger.setLevel(logging.INFO)
|
|
48
|
+
logger.propagate = False
|
|
49
|
+
logger._alpi_configured = True # type: ignore[attr-defined]
|
|
50
|
+
return logger
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""ALP — Alpi Link Protocol.
|
|
2
|
+
|
|
3
|
+
Reference implementation of the ALP specification (see
|
|
4
|
+
``docs/ALP.md``). Covers agent-to-agent communication between alpi
|
|
5
|
+
instances: intra-profile on the same machine over a Unix-domain
|
|
6
|
+
socket, inter-machine over Noise_XK-on-TCP, and shared workgroups.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
PROTOCOL_VERSION = 1
|
|
12
|
+
"""The ALP protocol version this implementation speaks.
|
|
13
|
+
|
|
14
|
+
Senders tag every envelope with this value. Receivers reject
|
|
15
|
+
messages carrying an unknown version with error ``-32006``. A
|
|
16
|
+
bump is deliberate and lands alongside a changelog entry in
|
|
17
|
+
``docs/ALP.md``.
|
|
18
|
+
"""
|