intent-cli-python 1.2.0__tar.gz → 2.0.0__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.
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/PKG-INFO +31 -1
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/README.md +30 -0
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/pyproject.toml +2 -4
- intent_cli_python-2.0.0/src/intent_cli/__init__.py +38 -0
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/src/intent_cli_python.egg-info/PKG-INFO +31 -1
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/tests/test_cli.py +70 -5
- intent_cli_python-1.2.0/src/intent_cli/__init__.py +0 -8
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/LICENSE +0 -0
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/setup.cfg +0 -0
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/src/intent_cli/__main__.py +0 -0
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/src/intent_cli/cli.py +0 -0
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/src/intent_cli/commands/__init__.py +0 -0
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/src/intent_cli/commands/common.py +0 -0
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/src/intent_cli/commands/core.py +0 -0
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/src/intent_cli/commands/hub.py +0 -0
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/src/intent_cli/hub/__init__.py +0 -0
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/src/intent_cli/hub/client.py +0 -0
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/src/intent_cli/hub/payload.py +0 -0
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/src/intent_cli/hub/runtime.py +0 -0
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/src/intent_cli/output.py +0 -0
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/src/intent_cli/store.py +0 -0
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/src/intent_cli_python.egg-info/SOURCES.txt +0 -0
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/src/intent_cli_python.egg-info/dependency_links.txt +0 -0
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/src/intent_cli_python.egg-info/entry_points.txt +0 -0
- {intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/src/intent_cli_python.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: intent-cli-python
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: Semantic history for agent-driven development. Records what you did and why.
|
|
5
5
|
Author: Zeng Deyang
|
|
6
6
|
License-Expression: MIT
|
|
@@ -72,6 +72,36 @@ pip install intent-cli-python
|
|
|
72
72
|
|
|
73
73
|
Requires Python 3.9+ and Git.
|
|
74
74
|
|
|
75
|
+
### IntHub boundary
|
|
76
|
+
|
|
77
|
+
`pipx install intent-cli-python` installs the CLI only.
|
|
78
|
+
|
|
79
|
+
This repository is the umbrella project for both `Intent` and `IntHub`, but the distribution boundary is narrower than the repository boundary:
|
|
80
|
+
|
|
81
|
+
- PyPI ships only the `itt` CLI
|
|
82
|
+
- IntHub Web is a separate static frontend and is a good fit for GitHub Pages
|
|
83
|
+
- IntHub API is a separate service and is not part of the PyPI package
|
|
84
|
+
|
|
85
|
+
If you are running IntHub from source inside this repository, the current local entrypoints are:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
python -m apps.inthub_api --db-path .inthub/inthub.db
|
|
89
|
+
python -m apps.inthub_web --api-base-url http://127.0.0.1:8000
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Then use `itt hub login`, `itt hub link`, and `itt hub sync` from a local Intent workspace to populate the read-only IntHub project view.
|
|
93
|
+
|
|
94
|
+
### Versioning and releases
|
|
95
|
+
|
|
96
|
+
`Intent` is the umbrella project and monorepo. It does not maintain one shared project version anymore.
|
|
97
|
+
|
|
98
|
+
Release versions now belong to concrete deliverables:
|
|
99
|
+
|
|
100
|
+
- CLI releases use the PyPI package version from `pyproject.toml` and Git tags like `cli-v2.0.0`
|
|
101
|
+
- IntHub releases use their own track and Git tags like `hub-v0.1.0`
|
|
102
|
+
|
|
103
|
+
Historical bare tags such as `v1.3.0` remain as history, but new releases use deliverable-prefixed tags.
|
|
104
|
+
|
|
75
105
|
### Install the skills.sh skill
|
|
76
106
|
|
|
77
107
|
```bash
|
|
@@ -48,6 +48,36 @@ pip install intent-cli-python
|
|
|
48
48
|
|
|
49
49
|
Requires Python 3.9+ and Git.
|
|
50
50
|
|
|
51
|
+
### IntHub boundary
|
|
52
|
+
|
|
53
|
+
`pipx install intent-cli-python` installs the CLI only.
|
|
54
|
+
|
|
55
|
+
This repository is the umbrella project for both `Intent` and `IntHub`, but the distribution boundary is narrower than the repository boundary:
|
|
56
|
+
|
|
57
|
+
- PyPI ships only the `itt` CLI
|
|
58
|
+
- IntHub Web is a separate static frontend and is a good fit for GitHub Pages
|
|
59
|
+
- IntHub API is a separate service and is not part of the PyPI package
|
|
60
|
+
|
|
61
|
+
If you are running IntHub from source inside this repository, the current local entrypoints are:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
python -m apps.inthub_api --db-path .inthub/inthub.db
|
|
65
|
+
python -m apps.inthub_web --api-base-url http://127.0.0.1:8000
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Then use `itt hub login`, `itt hub link`, and `itt hub sync` from a local Intent workspace to populate the read-only IntHub project view.
|
|
69
|
+
|
|
70
|
+
### Versioning and releases
|
|
71
|
+
|
|
72
|
+
`Intent` is the umbrella project and monorepo. It does not maintain one shared project version anymore.
|
|
73
|
+
|
|
74
|
+
Release versions now belong to concrete deliverables:
|
|
75
|
+
|
|
76
|
+
- CLI releases use the PyPI package version from `pyproject.toml` and Git tags like `cli-v2.0.0`
|
|
77
|
+
- IntHub releases use their own track and Git tags like `hub-v0.1.0`
|
|
78
|
+
|
|
79
|
+
Historical bare tags such as `v1.3.0` remain as history, but new releases use deliverable-prefixed tags.
|
|
80
|
+
|
|
51
81
|
### Install the skills.sh skill
|
|
52
82
|
|
|
53
83
|
```bash
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "intent-cli-python"
|
|
7
|
-
version = "
|
|
7
|
+
version = "2.0.0"
|
|
8
8
|
description = "Semantic history for agent-driven development. Records what you did and why."
|
|
9
9
|
requires-python = ">=3.9"
|
|
10
10
|
readme = "README.md"
|
|
@@ -33,8 +33,6 @@ Repository = "https://github.com/dozybot001/Intent"
|
|
|
33
33
|
[project.scripts]
|
|
34
34
|
itt = "intent_cli.cli:main"
|
|
35
35
|
|
|
36
|
-
[tool.setuptools]
|
|
37
|
-
package-dir = {"" = "src"}
|
|
38
|
-
|
|
39
36
|
[tool.setuptools.packages.find]
|
|
40
37
|
where = ["src"]
|
|
38
|
+
include = ["intent_cli*"]
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"""Intent CLI — semantic history for agent-driven development."""
|
|
2
|
+
|
|
3
|
+
import re
|
|
4
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def _read_source_version():
|
|
9
|
+
pyproject = Path(__file__).resolve().parents[2] / "pyproject.toml"
|
|
10
|
+
if not pyproject.exists():
|
|
11
|
+
return None
|
|
12
|
+
text = pyproject.read_text(encoding="utf-8")
|
|
13
|
+
in_project = False
|
|
14
|
+
for line in text.splitlines():
|
|
15
|
+
stripped = line.strip()
|
|
16
|
+
if stripped == "[project]":
|
|
17
|
+
in_project = True
|
|
18
|
+
continue
|
|
19
|
+
if in_project and stripped.startswith("["):
|
|
20
|
+
break
|
|
21
|
+
if in_project:
|
|
22
|
+
match = re.match(r'version\s*=\s*"([^"]+)"', stripped)
|
|
23
|
+
if match:
|
|
24
|
+
return match.group(1)
|
|
25
|
+
return None
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _resolve_version():
|
|
29
|
+
source_version = _read_source_version()
|
|
30
|
+
if source_version is not None:
|
|
31
|
+
return source_version
|
|
32
|
+
try:
|
|
33
|
+
return version("intent-cli-python")
|
|
34
|
+
except PackageNotFoundError:
|
|
35
|
+
return "0.0.0"
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
__version__ = _resolve_version()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: intent-cli-python
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: Semantic history for agent-driven development. Records what you did and why.
|
|
5
5
|
Author: Zeng Deyang
|
|
6
6
|
License-Expression: MIT
|
|
@@ -72,6 +72,36 @@ pip install intent-cli-python
|
|
|
72
72
|
|
|
73
73
|
Requires Python 3.9+ and Git.
|
|
74
74
|
|
|
75
|
+
### IntHub boundary
|
|
76
|
+
|
|
77
|
+
`pipx install intent-cli-python` installs the CLI only.
|
|
78
|
+
|
|
79
|
+
This repository is the umbrella project for both `Intent` and `IntHub`, but the distribution boundary is narrower than the repository boundary:
|
|
80
|
+
|
|
81
|
+
- PyPI ships only the `itt` CLI
|
|
82
|
+
- IntHub Web is a separate static frontend and is a good fit for GitHub Pages
|
|
83
|
+
- IntHub API is a separate service and is not part of the PyPI package
|
|
84
|
+
|
|
85
|
+
If you are running IntHub from source inside this repository, the current local entrypoints are:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
python -m apps.inthub_api --db-path .inthub/inthub.db
|
|
89
|
+
python -m apps.inthub_web --api-base-url http://127.0.0.1:8000
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Then use `itt hub login`, `itt hub link`, and `itt hub sync` from a local Intent workspace to populate the read-only IntHub project view.
|
|
93
|
+
|
|
94
|
+
### Versioning and releases
|
|
95
|
+
|
|
96
|
+
`Intent` is the umbrella project and monorepo. It does not maintain one shared project version anymore.
|
|
97
|
+
|
|
98
|
+
Release versions now belong to concrete deliverables:
|
|
99
|
+
|
|
100
|
+
- CLI releases use the PyPI package version from `pyproject.toml` and Git tags like `cli-v2.0.0`
|
|
101
|
+
- IntHub releases use their own track and Git tags like `hub-v0.1.0`
|
|
102
|
+
|
|
103
|
+
Historical bare tags such as `v1.3.0` remain as history, but new releases use deliverable-prefixed tags.
|
|
104
|
+
|
|
75
105
|
### Install the skills.sh skill
|
|
76
106
|
|
|
77
107
|
```bash
|
|
@@ -2,18 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
import os
|
|
5
|
+
import re
|
|
5
6
|
import subprocess
|
|
6
7
|
import sys
|
|
7
8
|
import tempfile
|
|
8
9
|
import threading
|
|
9
|
-
from importlib import metadata
|
|
10
10
|
from http.server import ThreadingHTTPServer
|
|
11
11
|
from pathlib import Path
|
|
12
12
|
from urllib.request import urlopen
|
|
13
13
|
|
|
14
14
|
import pytest
|
|
15
15
|
|
|
16
|
-
from apps.inthub_api.server import make_handler
|
|
16
|
+
from apps.inthub_api.server import make_handler as make_inthub_api_handler
|
|
17
|
+
from apps.inthub_web.server import make_handler as make_inthub_web_handler
|
|
18
|
+
|
|
19
|
+
REPO_ROOT = Path(__file__).resolve().parents[1]
|
|
20
|
+
SOURCE_PATHS = [str(REPO_ROOT), str(REPO_ROOT / "src")]
|
|
17
21
|
|
|
18
22
|
|
|
19
23
|
@pytest.fixture
|
|
@@ -33,7 +37,23 @@ def workspace(tmp_path):
|
|
|
33
37
|
def inthub_server(tmp_path):
|
|
34
38
|
server = ThreadingHTTPServer(
|
|
35
39
|
("127.0.0.1", 0),
|
|
36
|
-
|
|
40
|
+
make_inthub_api_handler(str(tmp_path / "inthub.db")),
|
|
41
|
+
)
|
|
42
|
+
thread = threading.Thread(target=server.serve_forever, daemon=True)
|
|
43
|
+
thread.start()
|
|
44
|
+
try:
|
|
45
|
+
yield f"http://127.0.0.1:{server.server_port}"
|
|
46
|
+
finally:
|
|
47
|
+
server.shutdown()
|
|
48
|
+
thread.join()
|
|
49
|
+
server.server_close()
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
@pytest.fixture
|
|
53
|
+
def inthub_web_server(inthub_server):
|
|
54
|
+
server = ThreadingHTTPServer(
|
|
55
|
+
("127.0.0.1", 0),
|
|
56
|
+
make_inthub_web_handler(api_base_url=inthub_server),
|
|
37
57
|
)
|
|
38
58
|
thread = threading.Thread(target=server.serve_forever, daemon=True)
|
|
39
59
|
thread.start()
|
|
@@ -47,9 +67,14 @@ def inthub_server(tmp_path):
|
|
|
47
67
|
|
|
48
68
|
def _run(cwd, *args):
|
|
49
69
|
"""Run itt command and return parsed JSON."""
|
|
70
|
+
env = os.environ.copy()
|
|
71
|
+
existing = env.get("PYTHONPATH")
|
|
72
|
+
env["PYTHONPATH"] = os.pathsep.join(
|
|
73
|
+
SOURCE_PATHS + ([existing] if existing else [])
|
|
74
|
+
)
|
|
50
75
|
r = subprocess.run(
|
|
51
76
|
[sys.executable, "-m", "intent_cli", *args],
|
|
52
|
-
cwd=cwd, capture_output=True, text=True,
|
|
77
|
+
cwd=cwd, capture_output=True, text=True, env=env,
|
|
53
78
|
)
|
|
54
79
|
return json.loads(r.stdout)
|
|
55
80
|
|
|
@@ -66,6 +91,23 @@ def _get_json(url):
|
|
|
66
91
|
return json.loads(resp.read().decode("utf-8"))
|
|
67
92
|
|
|
68
93
|
|
|
94
|
+
def _expected_cli_version():
|
|
95
|
+
text = (REPO_ROOT / "pyproject.toml").read_text(encoding="utf-8")
|
|
96
|
+
in_project = False
|
|
97
|
+
for line in text.splitlines():
|
|
98
|
+
stripped = line.strip()
|
|
99
|
+
if stripped == "[project]":
|
|
100
|
+
in_project = True
|
|
101
|
+
continue
|
|
102
|
+
if in_project and stripped.startswith("["):
|
|
103
|
+
break
|
|
104
|
+
if in_project:
|
|
105
|
+
match = re.match(r'version\s*=\s*"([^"]+)"', stripped)
|
|
106
|
+
if match:
|
|
107
|
+
return match.group(1)
|
|
108
|
+
raise AssertionError("Could not find project.version in pyproject.toml")
|
|
109
|
+
|
|
110
|
+
|
|
69
111
|
# ---------------------------------------------------------------------------
|
|
70
112
|
# Global commands
|
|
71
113
|
# ---------------------------------------------------------------------------
|
|
@@ -74,7 +116,7 @@ class TestGlobal:
|
|
|
74
116
|
def test_version(self, workspace):
|
|
75
117
|
r = _run(workspace, "version")
|
|
76
118
|
assert r["ok"] is True
|
|
77
|
-
assert r["result"]["version"] ==
|
|
119
|
+
assert r["result"]["version"] == _expected_cli_version()
|
|
78
120
|
|
|
79
121
|
def test_init_already_exists(self, workspace):
|
|
80
122
|
r = _run(workspace, "init")
|
|
@@ -165,15 +207,38 @@ class TestHub:
|
|
|
165
207
|
assert len(overview["result"]["active_intents"]) == 1
|
|
166
208
|
assert overview["result"]["active_intents"][0]["id"] == "intent-001"
|
|
167
209
|
assert len(overview["result"]["recent_snaps"]) == 1
|
|
210
|
+
snap_remote_id = overview["result"]["recent_snaps"][0]["remote_id"]
|
|
168
211
|
|
|
169
212
|
handoff = _get_json(f"{inthub_server}/api/v1/projects/{project_id}/handoff")
|
|
170
213
|
assert handoff["ok"] is True
|
|
171
214
|
assert handoff["result"]["intents"][0]["latest_snap"]["id"] == "snap-001"
|
|
172
215
|
|
|
216
|
+
projects = _get_json(f"{inthub_server}/api/v1/projects")
|
|
217
|
+
assert projects["ok"] is True
|
|
218
|
+
assert projects["result"]["projects"][0]["id"] == project_id
|
|
219
|
+
|
|
173
220
|
search = _get_json(f"{inthub_server}/api/v1/search?project_id={project_id}&q=Goal")
|
|
174
221
|
assert search["ok"] is True
|
|
175
222
|
assert search["result"]["matches"][0]["id"] == "intent-001"
|
|
176
223
|
|
|
224
|
+
snap_detail = _get_json(f"{inthub_server}/api/v1/snaps/{snap_remote_id}")
|
|
225
|
+
assert snap_detail["ok"] is True
|
|
226
|
+
assert snap_detail["result"]["snap"]["id"] == "snap-001"
|
|
227
|
+
|
|
228
|
+
def test_read_only_web_shell_serves_config(self, inthub_web_server, inthub_server):
|
|
229
|
+
config = _get_json(f"{inthub_web_server}/config.json")
|
|
230
|
+
assert config["apiBaseUrl"] == inthub_server
|
|
231
|
+
html = urlopen(f"{inthub_web_server}/").read().decode("utf-8")
|
|
232
|
+
assert "Read-only IntHub" in html
|
|
233
|
+
assert "Semantic history, shared without re-explaining it." in html
|
|
234
|
+
assert 'id="setup-guide"' in html
|
|
235
|
+
deep_link = urlopen(f"{inthub_web_server}/projects/demo").read().decode("utf-8")
|
|
236
|
+
assert "Read-only IntHub" in deep_link
|
|
237
|
+
js = urlopen(f"{inthub_web_server}/app.js").read().decode("utf-8")
|
|
238
|
+
assert "Open raw payload" in js
|
|
239
|
+
assert "Linked decisions" in js
|
|
240
|
+
assert "itt hub sync" in js
|
|
241
|
+
|
|
177
242
|
|
|
178
243
|
# ---------------------------------------------------------------------------
|
|
179
244
|
# Intent commands
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/src/intent_cli_python.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/src/intent_cli_python.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{intent_cli_python-1.2.0 → intent_cli_python-2.0.0}/src/intent_cli_python.egg-info/top_level.txt
RENAMED
|
File without changes
|