abstractcode 0.1.0__py3-none-any.whl → 0.3.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,270 @@
1
+ Metadata-Version: 2.4
2
+ Name: abstractcode
3
+ Version: 0.3.0
4
+ Summary: A clean terminal CLI for multi-agent agentic coding
5
+ Author-email: Laurent-Philippe Albou <contact@abstractcore.ai>
6
+ Maintainer-email: Laurent-Philippe Albou <contact@abstractcore.ai>
7
+ License: MIT
8
+ Project-URL: Homepage, https://abstractcore.ai
9
+ Project-URL: Documentation, https://abstractcore.ai
10
+ Project-URL: Repository, https://github.com/lpalbou/abstractcode
11
+ Project-URL: Bug Tracker, https://github.com/lpalbou/abstractcode/issues
12
+ Keywords: ai,llm,cli,coding,agent,multi-agent,agentic,terminal,abstractcore,abstractruntime,abstractagent
13
+ Classifier: Development Status :: 2 - Pre-Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: abstractagent>=0.2.0
27
+ Requires-Dist: abstractruntime>=0.2.0
28
+ Requires-Dist: abstractcore[tools]>=2.6.8
29
+ Requires-Dist: ddgs<10.0.0,>=9.10.0
30
+ Requires-Dist: prompt_toolkit>=3.0.0
31
+ Provides-Extra: dev
32
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
33
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
34
+ Requires-Dist: black>=23.0.0; extra == "dev"
35
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
36
+ Provides-Extra: flow
37
+ Requires-Dist: abstractflow>=0.1.0; extra == "flow"
38
+ Dynamic: license-file
39
+
40
+ # AbstractCode
41
+
42
+ Terminal TUI for the AbstractFramework:
43
+ - run **agents** (ReAct / CodeAct)
44
+ - run **workflows** authored in AbstractFlow (VisualFlow JSON)
45
+ - keep everything **durable** via AbstractRuntime (runs, ledger, artifacts)
46
+
47
+ ## Install
48
+
49
+ ```bash
50
+ pip install abstractcode
51
+ ```
52
+
53
+ To run AbstractFlow workflows from AbstractCode:
54
+
55
+ ```bash
56
+ pip install "abstractcode[flow]"
57
+ ```
58
+
59
+ ## Start the TUI (Agents)
60
+
61
+ ```bash
62
+ abstractcode --provider lmstudio --model qwen/qwen3-next-80b
63
+ ```
64
+
65
+ Interaction model:
66
+ - commands are slash-prefixed (`/help`)
67
+ - any non-command line starts a task (same as `/task ...`)
68
+
69
+ ### Useful commands
70
+ - `/status` (run status)
71
+ - `/auto-accept on|off` (tool approvals)
72
+ - `/max-tokens N` (or `-1` auto-detect)
73
+ - `/compact [light|standard|heavy] [--preserve N] [focus...]` (durable compaction)
74
+ - `/spans`, `/expand <span> [--show] [--into-context]` (provenance recall)
75
+ - `/recall [--since ISO] [--until ISO] [--tag k=v] [--q text] [--into-context]`
76
+ - `/snapshot save|load|list`
77
+
78
+ ### Persistence
79
+ By default, AbstractCode uses `~/.abstractcode/state.json` and stores the durable data in `~/.abstractcode/state.d/`.
80
+ - disable persistence: `abstractcode --no-state`
81
+ - override path: `ABSTRACTCODE_STATE_FILE=... abstractcode`
82
+
83
+ ## Workflow Agents (VisualFlow as `--agent`)
84
+
85
+ AbstractCode can run an AbstractFlow VisualFlow workflow *as an agent* (instead of using the built-in `react|codeact|memact` agents).
86
+
87
+ ### Requirements (`abstractcode.agent.v1`)
88
+ - The workflow JSON must declare: `interfaces: ["abstractcode.agent.v1"]`
89
+ - The workflow must expose these pins:
90
+ - `On Flow Start`: output pins:
91
+ - `request` (type `string`)
92
+ - `provider` (type `provider`)
93
+ - `model` (type `model`)
94
+ - `tools` (type `tools`)
95
+ - `On Flow End`: input pin `response` (type `string`)
96
+
97
+ Recommended (optional) pins:
98
+ - `On Flow Start`: `context` (object), `max_iterations` (number)
99
+ - `On Flow End`: `meta` (object), `scratchpad` (object), `raw_result` (object)
100
+
101
+ ### Authoring in the AbstractFlow visual editor
102
+ - **Mark the interface**: click `📂 Load` → select the workflow → in the right preview panel find **Interfaces** → click the ✏️ icon → enable **AbstractCode Agent (v1)** → **Save Interfaces**
103
+ - **Pins are scaffolded automatically**: when the interface is enabled, AbstractFlow will ensure `On Flow Start` and `On Flow End` have the required pins. You can still add/remove optional pins as needed.
104
+
105
+ Tip: an example workflow is shipped at `abstractflow/web/flows/acagent01.json` (implements the interface).
106
+
107
+ ### What is `meta` and how do I use it?
108
+ `On Flow End.meta` is an **optional JSON object** for host-facing metadata (usage, trace ids, warnings, raw provider info, etc.).
109
+
110
+ It is intentionally **not strictly validated** today (the host treats it as opaque JSON). To make workflows portable and predictable across hosts, we recommend using a small “envelope” shape:
111
+
112
+ ```json
113
+ {
114
+ "schema": "abstractcode.agent.v1.meta",
115
+ "version": 1,
116
+ "provider": "lmstudio",
117
+ "model": "qwen/qwen3-next-80b",
118
+ "usage": { "input_tokens": 123, "output_tokens": 456 },
119
+ "trace": { "trace_id": "..." },
120
+ "warnings": ["..."],
121
+ "debug": {}
122
+ }
123
+ ```
124
+
125
+ Hosts should treat unknown fields as allowed and ignore what they don’t understand (forward-compatible).
126
+
127
+ Typical ways to produce it inside a workflow:
128
+ - Wire `LLM Call.result` (object) → `On Flow End.meta`
129
+ - Wire `Agent.result` (object) → `On Flow End.meta`
130
+ - Or build your own object and wire it into `meta`
131
+
132
+ When present, AbstractCode attaches it to the assistant message metadata as `workflow_meta`.
133
+
134
+ ### Workflow-driven status updates (footer / live UX)
135
+ Inside a workflow, you can update AbstractCode’s footer status text by emitting the reserved event:
136
+ - Add an **Emit Event** node
137
+ - Set **name** to `abstractcode.status`
138
+ - Set **payload** to:
139
+ - a string (e.g. `"Enrich Query..."`), or
140
+ - an object like `{ "text": "Enrich Query...", "duration": -1 }`
141
+
142
+ `duration` is seconds:
143
+ - default: `-1` (sticky)
144
+ - if `> 0`: auto-clears after the timeout unless superseded by a newer status
145
+
146
+ Example workflow: `abstractflow/web/flows/acagent_status_demo.json` (3 status updates, each separated by a 2s Delay).
147
+
148
+ ### Workflow-driven UI events (messages + tool UX)
149
+ Workflows can also emit additional reserved events for host UX:
150
+ - `abstractcode.message`: show a message/notification (payload is a string or `{text, level?, title?}`)
151
+ - `abstractcode.tool_execution`: render a tool-call block (payload is a tool call object or a list)
152
+ - recommended shape: `{name, arguments, call_id?}`
153
+ - `abstractcode.tool_result`: render a tool-result block (payload is a tool result object or a list)
154
+ - recommended shape: `{name, call_id?, success?, output?, error?}`
155
+
156
+ Full contract (recommended for integrators): `docs/ui_events.md`
157
+
158
+ Example workflows:
159
+ - `abstractflow/web/flows/acagent_message_demo.json`
160
+ - `abstractflow/web/flows/acagent_tool_events_demo.json`
161
+
162
+ ### Durable ask+wait (prompt the user and resume)
163
+ For workflows that need human input, you can:
164
+ - use the **Ask User** node (WAIT_USER), or
165
+ - use **Wait Event** with a `prompt` field (WAIT_EVENT), which is also durable and network-friendly.
166
+
167
+ Example workflow: `abstractflow/web/flows/acagent_ask_demo.json`
168
+
169
+ ### Run
170
+ Use `--agent` with a workflow id/name (from the flows directory) or a direct JSON path:
171
+
172
+ ```bash
173
+ abstractcode --agent acagent01
174
+ abstractcode --agent abstractflow/web/flows/acagent01.json
175
+
176
+ # If your flows are stored elsewhere:
177
+ ABSTRACTFLOW_FLOWS_DIR=/path/to/flows abstractcode --agent my_flow_id
178
+ ```
179
+
180
+ ## Run Workflows (AbstractFlow VisualFlow)
181
+
182
+ ### From the CLI
183
+
184
+ ```bash
185
+ abstractcode flow run <flow_id_or_path> [inputs...]
186
+ ```
187
+
188
+ Inputs can be passed as flags (no JSON typing required):
189
+
190
+ ```bash
191
+ abstractcode flow run abstractflow/web/flows/4e2f2329.json --query "who are you?"
192
+
193
+ abstractcode flow run abstractflow/web/flows/b3a9d7c1.json \
194
+ --query "who are you?" \
195
+ --max_web_search 15 \
196
+ --max_fetch_url 50 \
197
+ --follow_up_questions true
198
+ ```
199
+
200
+ Other input options:
201
+
202
+ ```bash
203
+ abstractcode flow run deep-research-pro --input-json-file params.json
204
+ abstractcode flow run deep-research-pro --param max_web_search=15 --param follow_up_questions=true
205
+ ```
206
+
207
+ Tool approvals:
208
+ - approval-gated by default (type `a` once to approve all remaining calls for that run)
209
+ - auto-approve (unsafe): `--accept-tools` (alias `--auto-approve`)
210
+
211
+ Controls:
212
+
213
+ ```bash
214
+ abstractcode flow resume
215
+ abstractcode flow pause
216
+ abstractcode flow resume-run
217
+ abstractcode flow cancel
218
+ ```
219
+
220
+ Run discovery and event injection:
221
+
222
+ ```bash
223
+ abstractcode flow runs
224
+ abstractcode flow attach <run_id>
225
+ abstractcode flow emit --name my_event --scope session --payload-json '{"k":"v"}'
226
+ ```
227
+
228
+ Flow state:
229
+ - default: `~/.abstractcode/flow_state.json` (stores in `~/.abstractcode/flow_state.d/`)
230
+ - override with `ABSTRACTCODE_FLOW_STATE_FILE=...`
231
+ - flow discovery default dir: `ABSTRACTFLOW_FLOWS_DIR=...`
232
+
233
+ ### From inside the TUI (keeps outputs in context)
234
+
235
+ ```text
236
+ /flow run deep-research-pro --query "..." --max_web_search 10 --follow_up_questions true
237
+ ```
238
+
239
+ `ANSWER_USER` outputs from the workflow are appended into the current conversation’s active context so you can continue the dialogue naturally.
240
+
241
+ ## Development (Monorepo)
242
+
243
+ ```bash
244
+ pip install -e ./abstractcore -e ./abstractruntime -e ./abstractagent -e ./abstractflow -e ./abstractcode
245
+ abstractcode --help
246
+ ```
247
+
248
+ ## Environment variables
249
+ - `ABSTRACTCODE_STATE_FILE`
250
+ - `ABSTRACTCODE_FLOW_STATE_FILE`
251
+ - `ABSTRACTFLOW_FLOWS_DIR`
252
+
253
+ ## Default Tools
254
+
255
+ AbstractCode provides a curated set of 10 tools for coding tasks (ReAct agent):
256
+
257
+ | Tool | Description |
258
+ |------|-------------|
259
+ | `list_files` | Find and list files using glob patterns (case-insensitive) |
260
+ | `search_files` | Search for text patterns inside files using regex |
261
+ | `analyze_code` | Outline a Python/JS file (imports/classes/functions + line ranges) |
262
+ | `read_file` | Read file contents with optional line range |
263
+ | `write_file` | Write content to files, creating directories as needed |
264
+ | `edit_file` | Edit files by replacing text patterns (supports regex, line ranges, preview mode) |
265
+ | `execute_command` | Execute shell commands with security controls |
266
+ | `web_search` | Search the web via DuckDuckGo (no API key required) |
267
+ | `fetch_url` | Fetch a URL and return text/metadata (best-effort parsing) |
268
+ | `self_improve` | Log improvement suggestions for later review |
269
+
270
+ When running `--agent codeact`, AbstractCode exposes `execute_python` instead of the ReAct toolset.
@@ -0,0 +1,17 @@
1
+ abstractcode/__init__.py,sha256=pHrawn8KtpITMmArbfOQBm1WrGKL7qMAr0cu81ianDU,658
2
+ abstractcode/cli.py,sha256=2DS9eI9VgFcxlE78Pom_Q5OsiMQxA8PKOGyVXDK3qnQ,14797
3
+ abstractcode/flow_cli.py,sha256=CQq1g4rFylSW7y8ZZeQYmfroAXG1dDtmuOF8tc1BF2Y,49235
4
+ abstractcode/fullscreen_ui.py,sha256=3pRz098lbTbmPH14w2zKVPXUeTFVTtCyRSNs2h3w_yc,59898
5
+ abstractcode/input_handler.py,sha256=W2ImW4Yr3HMMD5SNPZOZJendVL-CRdYR5idXTWroxAY,2240
6
+ abstractcode/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
7
+ abstractcode/react_shell.py,sha256=0Dk9KrIsvRNC4ufRFC6WQwVjY2TzS73gUUYRNKP_NeE,285565
8
+ abstractcode/recall.py,sha256=xu-xz8-kvkmAW6pKoAIcwox5jHWMBfBKExsA8fgwg_A,13040
9
+ abstractcode/remember.py,sha256=cmJlw-nR0OvK7tkN5B0sZSMaYlECl_tAyO34c-IL0Uo,6158
10
+ abstractcode/terminal_markdown.py,sha256=mDR-70S-P6dv4JefB6OgmjQRw9tFtP7RNkW9ZHw8NLE,5449
11
+ abstractcode/workflow_agent.py,sha256=belBm7TyyO1zu57H70hklB3mos3BR43FpvRdbJDgk_A,35323
12
+ abstractcode-0.3.0.dist-info/licenses/LICENSE,sha256=f8z-PbFM_xH0eqLsha8_nEg1jbm1eVtC2NNjtXhtuCo,1080
13
+ abstractcode-0.3.0.dist-info/METADATA,sha256=sbuUa8yTLaJHgchguiqH5ee0hIhnrKmw3nZ63MBttag,10179
14
+ abstractcode-0.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
+ abstractcode-0.3.0.dist-info/entry_points.txt,sha256=M4AOKb4h2vKWy5OMg-czeJE2aXunVKlljUPN8BUtwoE,51
16
+ abstractcode-0.3.0.dist-info/top_level.txt,sha256=n9Hfv6cnmL55HoxXsA3V1YLbQxYAr58-UMLbdr-FCNw,13
17
+ abstractcode-0.3.0.dist-info/RECORD,,
@@ -1,114 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: abstractcode
3
- Version: 0.1.0
4
- Summary: A clean terminal CLI for multi-agent agentic coding
5
- Author-email: Laurent-Philippe Albou <contact@abstractcore.ai>
6
- Maintainer-email: Laurent-Philippe Albou <contact@abstractcore.ai>
7
- License: MIT
8
- Project-URL: Homepage, https://abstractcore.ai
9
- Project-URL: Documentation, https://abstractcore.ai
10
- Project-URL: Repository, https://github.com/lpalbou/abstractcode
11
- Project-URL: Bug Tracker, https://github.com/lpalbou/abstractcode/issues
12
- Keywords: ai,llm,cli,coding,agent,multi-agent,agentic,terminal,abstractcore,abstractruntime,abstractagent
13
- Classifier: Development Status :: 2 - Pre-Alpha
14
- Classifier: Intended Audience :: Developers
15
- Classifier: License :: OSI Approved :: MIT License
16
- Classifier: Operating System :: OS Independent
17
- Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.8
19
- Classifier: Programming Language :: Python :: 3.9
20
- Classifier: Programming Language :: Python :: 3.10
21
- Classifier: Programming Language :: Python :: 3.11
22
- Classifier: Programming Language :: Python :: 3.12
23
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
- Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
25
- Requires-Python: >=3.8
26
- Description-Content-Type: text/markdown
27
- License-File: LICENSE
28
- Provides-Extra: dev
29
- Requires-Dist: pytest>=7.0.0; extra == "dev"
30
- Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
31
- Requires-Dist: black>=23.0.0; extra == "dev"
32
- Requires-Dist: ruff>=0.1.0; extra == "dev"
33
- Dynamic: license-file
34
-
35
- # AbstractCode
36
-
37
- **A clean terminal CLI for multi-agent agentic coding**
38
-
39
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
40
- [![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
41
-
42
- ---
43
-
44
- ## 🚧 Under Development
45
-
46
- AbstractCode is currently under active development. This is a placeholder release to reserve the package name on PyPI.
47
-
48
- ## What is AbstractCode?
49
-
50
- AbstractCode is a clean terminal CLI for multi-agent agentic coding, similar to Claude Code, Codex, and Gemini CLI. It leverages the Abstract Framework ecosystem to provide seamless AI-powered coding assistance directly in your terminal.
51
-
52
- ## The Abstract Framework
53
-
54
- AbstractCode is built on top of the Abstract Framework, a comprehensive suite of tools for AI-powered development:
55
-
56
- - **[AbstractCore](https://github.com/lpalbou/abstractcore)** - Unified interface for multiple LLM providers
57
- - **[AbstractRuntime](https://github.com/lpalbou/abstractruntime)** - Runtime environment for AI agents
58
- - **[AbstractAgent](https://github.com/lpalbou/abstractagent)** - Multi-agent orchestration and coordination
59
-
60
- ## Features (Coming Soon)
61
-
62
- - 🤖 **Multi-Agent Coding** - Coordinate multiple AI agents for complex coding tasks
63
- - 🔌 **Provider Agnostic** - Works with OpenAI, Anthropic, Ollama, and more
64
- - 💻 **Terminal Native** - Clean CLI interface for seamless workflow integration
65
- - 🎯 **Context Aware** - Understands your codebase and project structure
66
- - 🔄 **Iterative Development** - Collaborative coding with AI assistance
67
- - 🌐 **Offline Capable** - Works with local models via Ollama
68
-
69
- ## Installation
70
-
71
- ```bash
72
- pip install abstractcode
73
- ```
74
-
75
- ## Quick Start
76
-
77
- ```bash
78
- # Coming soon!
79
- abstractcode --help
80
- ```
81
-
82
- ## Requirements
83
-
84
- - Python 3.8 or higher
85
- - AbstractCore
86
- - AbstractRuntime
87
- - AbstractAgent
88
-
89
- ## Documentation
90
-
91
- Full documentation will be available at [abstractcore.ai](https://abstractcore.ai)
92
-
93
- ## Development Status
94
-
95
- This project is in early development. Stay tuned for updates!
96
-
97
- ## Contributing
98
-
99
- Contributions are welcome! Please check back soon for contribution guidelines.
100
-
101
- ## Contact
102
-
103
- **Maintainer:** Laurent-Philippe Albou
104
- 📧 Email: contact@abstractcore.ai
105
- 🌐 Website: [abstractcore.ai](https://abstractcore.ai)
106
-
107
- ## License
108
-
109
- MIT License - see LICENSE file for details.
110
-
111
- ---
112
-
113
- **AbstractCode** - Multi-agent agentic coding in your terminal, powered by the Abstract Framework.
114
-
@@ -1,7 +0,0 @@
1
- abstractcode/__init__.py,sha256=oan-Wsnr4B1W36uWXN2Qk7YzcnGdi8QlXuQePHSwI4Y,1433
2
- abstractcode-0.1.0.dist-info/licenses/LICENSE,sha256=f8z-PbFM_xH0eqLsha8_nEg1jbm1eVtC2NNjtXhtuCo,1080
3
- abstractcode-0.1.0.dist-info/METADATA,sha256=31HEIv-JD2M9wK5lFYoBziYCVmIrqLwcRiWdimWdCCo,4011
4
- abstractcode-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
5
- abstractcode-0.1.0.dist-info/entry_points.txt,sha256=M4AOKb4h2vKWy5OMg-czeJE2aXunVKlljUPN8BUtwoE,51
6
- abstractcode-0.1.0.dist-info/top_level.txt,sha256=n9Hfv6cnmL55HoxXsA3V1YLbQxYAr58-UMLbdr-FCNw,13
7
- abstractcode-0.1.0.dist-info/RECORD,,