htmlgraph 0.3.2__tar.gz → 0.3.3__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.
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/PKG-INFO +1 -1
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/packages/gemini-extension/gemini-extension.json +1 -1
- {htmlgraph-0.3.2/src/python/htmlgraph/extensions/gemini → htmlgraph-0.3.3/packages/gemini-extension}/hooks/scripts/post-tool.sh +3 -6
- {htmlgraph-0.3.2/src/python/htmlgraph/extensions/gemini → htmlgraph-0.3.3/packages/gemini-extension}/hooks/scripts/session-end.sh +2 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/packages/gemini-extension/hooks/scripts/session-start.sh +2 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/pyproject.toml +1 -1
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/__init__.py +1 -1
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/cli.py +69 -1
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/extensions/gemini/GEMINI.md +3 -1
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/extensions/gemini/gemini-extension.json +1 -1
- {htmlgraph-0.3.2/packages/gemini-extension → htmlgraph-0.3.3/src/python/htmlgraph/extensions/gemini}/hooks/scripts/post-tool.sh +3 -6
- {htmlgraph-0.3.2/packages/gemini-extension → htmlgraph-0.3.3/src/python/htmlgraph/extensions/gemini}/hooks/scripts/session-end.sh +2 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/extensions/gemini/hooks/scripts/session-start.sh +2 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/session_manager.py +14 -4
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/.gitignore +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/README.md +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/examples/create_auth_track_demo.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/examples/create_htmlgraph_dev_track.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/examples/sdk_demo.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/examples/todo-list/demo.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/examples/todo-list/index.html +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/examples/todo-list/styles.css +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/examples/todo-list/task-001.html +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/examples/todo-list/task-002.html +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/examples/todo-list/task-003.html +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/examples/todo-list/task-004.html +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/examples/todo-list/task-005.html +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/packages/gemini-extension/GEMINI.md +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/packages/gemini-extension/README.md +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/packages/gemini-extension/hooks/hooks.json +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/agents.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/analytics_index.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/converter.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/dashboard.html +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/event_log.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/event_migration.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/extensions/gemini/README.md +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/extensions/gemini/hooks/hooks.json +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/file_watcher.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/git_events.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/graph.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/mcp_server.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/models.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/parser.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/planning.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/sdk.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/server.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/setup.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/styles.css +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/track_builder.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/track_manager.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/watch.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/tests/python/__init__.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/tests/python/test_claiming.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/tests/python/test_cli_commands.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/tests/python/test_cross_agent_attribution.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/tests/python/test_dashboard_ui.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/tests/python/test_event_index.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/tests/python/test_git_events.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/tests/python/test_mcp_server.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/tests/python/test_mcp_stdio_transport.py +0 -0
- {htmlgraph-0.3.2 → htmlgraph-0.3.3}/tests/python/test_models.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: htmlgraph
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: HTML is All You Need - Graph database on web standards
|
|
5
5
|
Project-URL: Homepage, https://github.com/Shakes-tzd/htmlgraph
|
|
6
6
|
Project-URL: Documentation, https://github.com/Shakes-tzd/htmlgraph#readme
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "htmlgraph",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "HtmlGraph session tracking and documentation for Gemini CLI. Ensures proper activity attribution, feature awareness, and continuous work tracking.",
|
|
5
5
|
"author": "Shakes",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,12 +34,9 @@ else
|
|
|
34
34
|
HTMLGRAPH_CMD="htmlgraph"
|
|
35
35
|
fi
|
|
36
36
|
|
|
37
|
+
export HTMLGRAPH_AGENT=gemini
|
|
38
|
+
|
|
37
39
|
# Track the tool usage event
|
|
38
|
-
|
|
39
|
-
$HTMLGRAPH_CMD session track-activity \
|
|
40
|
-
--type tool_use \
|
|
41
|
-
--tool "$TOOL_NAME" \
|
|
42
|
-
--timestamp "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
|
|
43
|
-
&> /dev/null &
|
|
40
|
+
$HTMLGRAPH_CMD activity "$TOOL_NAME" "Tool used: $TOOL_NAME" &> /dev/null &
|
|
44
41
|
|
|
45
42
|
exit 0
|
|
@@ -899,7 +899,8 @@ def cmd_track(args):
|
|
|
899
899
|
# Find active session or use specified one
|
|
900
900
|
session_id = args.session
|
|
901
901
|
if not session_id:
|
|
902
|
-
|
|
902
|
+
agent = os.environ.get("HTMLGRAPH_AGENT")
|
|
903
|
+
active = manager.get_active_session(agent=agent)
|
|
903
904
|
if not active:
|
|
904
905
|
print("Error: No active session. Start one with 'htmlgraph session start'.", file=sys.stderr)
|
|
905
906
|
sys.exit(1)
|
|
@@ -1228,6 +1229,67 @@ def cmd_feature_auto_release(args):
|
|
|
1228
1229
|
print(f" - {node_id}")
|
|
1229
1230
|
|
|
1230
1231
|
|
|
1232
|
+
def cmd_publish(args):
|
|
1233
|
+
"""Build and publish the package to PyPI (Interoperable)."""
|
|
1234
|
+
import shutil
|
|
1235
|
+
import subprocess
|
|
1236
|
+
|
|
1237
|
+
# Ensure we are in project root
|
|
1238
|
+
if not Path("pyproject.toml").exists():
|
|
1239
|
+
print("Error: pyproject.toml not found. Run this from the project root.", file=sys.stderr)
|
|
1240
|
+
sys.exit(1)
|
|
1241
|
+
|
|
1242
|
+
# 1. Clean dist/
|
|
1243
|
+
dist_dir = Path("dist")
|
|
1244
|
+
if dist_dir.exists():
|
|
1245
|
+
print("Cleaning dist/...")
|
|
1246
|
+
shutil.rmtree(dist_dir)
|
|
1247
|
+
|
|
1248
|
+
# 2. Build
|
|
1249
|
+
print("Building package with uv...")
|
|
1250
|
+
try:
|
|
1251
|
+
subprocess.run(["uv", "build"], check=True)
|
|
1252
|
+
except subprocess.CalledProcessError:
|
|
1253
|
+
print("Error: Build failed.", file=sys.stderr)
|
|
1254
|
+
sys.exit(1)
|
|
1255
|
+
except FileNotFoundError:
|
|
1256
|
+
print("Error: 'uv' command not found.", file=sys.stderr)
|
|
1257
|
+
sys.exit(1)
|
|
1258
|
+
|
|
1259
|
+
# 3. Publish
|
|
1260
|
+
if args.dry_run:
|
|
1261
|
+
print("Dry run: Skipping publish.")
|
|
1262
|
+
return
|
|
1263
|
+
|
|
1264
|
+
print("Publishing to PyPI...")
|
|
1265
|
+
env = os.environ.copy()
|
|
1266
|
+
|
|
1267
|
+
# Smart credential loading from .env
|
|
1268
|
+
# Maps PyPI_API_TOKEN (common in .env) to UV_PUBLISH_TOKEN (needed by uv)
|
|
1269
|
+
if "UV_PUBLISH_TOKEN" not in env:
|
|
1270
|
+
dotenv = Path(".env")
|
|
1271
|
+
if dotenv.exists():
|
|
1272
|
+
try:
|
|
1273
|
+
content = dotenv.read_text()
|
|
1274
|
+
for line in content.splitlines():
|
|
1275
|
+
if line.strip() and not line.startswith("#") and "=" in line:
|
|
1276
|
+
key, val = line.split("=", 1)
|
|
1277
|
+
key = key.strip()
|
|
1278
|
+
val = val.strip().strip("'").strip('"')
|
|
1279
|
+
if key == "PyPI_API_TOKEN":
|
|
1280
|
+
env["UV_PUBLISH_TOKEN"] = val
|
|
1281
|
+
print("Loaded credentials from .env")
|
|
1282
|
+
except Exception:
|
|
1283
|
+
pass
|
|
1284
|
+
|
|
1285
|
+
try:
|
|
1286
|
+
subprocess.run(["uv", "publish"], env=env, check=True)
|
|
1287
|
+
print("\n✅ Successfully published!")
|
|
1288
|
+
except subprocess.CalledProcessError:
|
|
1289
|
+
print("\n❌ Publish failed.", file=sys.stderr)
|
|
1290
|
+
sys.exit(1)
|
|
1291
|
+
|
|
1292
|
+
|
|
1231
1293
|
def cmd_feature_list(args):
|
|
1232
1294
|
"""List features by status."""
|
|
1233
1295
|
from htmlgraph.sdk import SDK
|
|
@@ -1912,6 +1974,10 @@ curl Examples:
|
|
|
1912
1974
|
setup_all_parser = setup_subparsers.add_parser("all", help="Set up for all supported platforms")
|
|
1913
1975
|
setup_all_parser.add_argument("--auto-install", action="store_true", help="Automatically install when possible")
|
|
1914
1976
|
|
|
1977
|
+
# publish
|
|
1978
|
+
publish_parser = subparsers.add_parser("publish", help="Build and publish package to PyPI")
|
|
1979
|
+
publish_parser.add_argument("--dry-run", action="store_true", help="Build only, do not publish")
|
|
1980
|
+
|
|
1915
1981
|
# install-gemini-extension
|
|
1916
1982
|
install_gemini_parser = subparsers.add_parser(
|
|
1917
1983
|
"install-gemini-extension",
|
|
@@ -2025,6 +2091,8 @@ curl Examples:
|
|
|
2025
2091
|
else:
|
|
2026
2092
|
setup_parser.print_help()
|
|
2027
2093
|
sys.exit(1)
|
|
2094
|
+
elif args.command == "publish":
|
|
2095
|
+
cmd_publish(args)
|
|
2028
2096
|
elif args.command == "install-gemini-extension":
|
|
2029
2097
|
cmd_install_gemini_extension(args)
|
|
2030
2098
|
else:
|
|
@@ -448,7 +448,9 @@ with sdk.features.edit('feature-123') as f:
|
|
|
448
448
|
2. ✅ **VERIFY ATTRIBUTION:** Check that activities are linked to correct feature
|
|
449
449
|
3. ✅ **CHECK STEPS:** ALL feature steps MUST be marked complete
|
|
450
450
|
4. ✅ **CLEAN CODE:** Remove all debug code, console.logs, TODOs
|
|
451
|
-
5. ✅ **COMMIT:** Git commit
|
|
451
|
+
5. ✅ **COMMIT WORK:** Git commit your changes IMMEDIATELY (allows user rollback)
|
|
452
|
+
- Do this BEFORE marking the feature complete
|
|
453
|
+
- Include the feature ID in the commit message
|
|
452
454
|
6. ✅ **COMPLETE FEATURE:** `uv run htmlgraph feature complete <id>`
|
|
453
455
|
7. ✅ **UPDATE EPIC:** If part of epic, mark epic step complete
|
|
454
456
|
|
{htmlgraph-0.3.2 → htmlgraph-0.3.3}/src/python/htmlgraph/extensions/gemini/gemini-extension.json
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "htmlgraph",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "HtmlGraph session tracking and documentation for Gemini CLI. Ensures proper activity attribution, feature awareness, and continuous work tracking.",
|
|
5
5
|
"author": "Shakes",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,12 +34,9 @@ else
|
|
|
34
34
|
HTMLGRAPH_CMD="htmlgraph"
|
|
35
35
|
fi
|
|
36
36
|
|
|
37
|
+
export HTMLGRAPH_AGENT=gemini
|
|
38
|
+
|
|
37
39
|
# Track the tool usage event
|
|
38
|
-
|
|
39
|
-
$HTMLGRAPH_CMD session track-activity \
|
|
40
|
-
--type tool_use \
|
|
41
|
-
--tool "$TOOL_NAME" \
|
|
42
|
-
--timestamp "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
|
|
43
|
-
&> /dev/null &
|
|
40
|
+
$HTMLGRAPH_CMD activity "$TOOL_NAME" "Tool used: $TOOL_NAME" &> /dev/null &
|
|
44
41
|
|
|
45
42
|
exit 0
|
|
@@ -267,12 +267,22 @@ class SessionManager:
|
|
|
267
267
|
return self._active_session
|
|
268
268
|
return self.session_converter.load(session_id)
|
|
269
269
|
|
|
270
|
-
def get_active_session(self) -> Session | None:
|
|
271
|
-
"""
|
|
270
|
+
def get_active_session(self, agent: str | None = None) -> Session | None:
|
|
271
|
+
"""
|
|
272
|
+
Get the currently active session (if any).
|
|
273
|
+
|
|
274
|
+
Args:
|
|
275
|
+
agent: Optional agent filter
|
|
276
|
+
"""
|
|
272
277
|
if self._active_session and self._active_session.status == "active":
|
|
273
|
-
|
|
278
|
+
if not agent or self._active_session.agent == agent:
|
|
279
|
+
return self._active_session
|
|
280
|
+
|
|
281
|
+
sessions = self._list_active_sessions()
|
|
282
|
+
if agent:
|
|
283
|
+
sessions = [s for s in sessions if s.agent == agent]
|
|
274
284
|
|
|
275
|
-
canonical = self._choose_canonical_active_session(
|
|
285
|
+
canonical = self._choose_canonical_active_session(sessions)
|
|
276
286
|
if canonical:
|
|
277
287
|
self._active_session = canonical
|
|
278
288
|
return canonical
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|