webglass-cli 0.4.0__tar.gz → 0.4.1__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.
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/CHANGELOG.md +10 -0
- webglass_cli-0.4.1/CLAUDE.md +227 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/PKG-INFO +1 -1
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/pyproject.toml +1 -1
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/tests/test_cli.py +8 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/uv.lock +1 -1
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/webglass/explain/catalog.py +5 -2
- webglass_cli-0.4.0/CLAUDE.md +0 -28
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/agent-config/SKILL.md +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/agent-config/data/backend-fingerprints.yaml +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/agent-config/scripts/show.sh +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/ask-colleague/SKILL.md +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/ask-colleague/prompts/explore.md +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/ask-colleague/prompts/review.md +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/ask-colleague/prompts/write.md +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/ask-colleague/scripts/ask-colleague.sh +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/assign-to-workforce/SKILL.md +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/assign-to-workforce/scripts/assign-to-workforce.sh +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/cicd/SKILL.md +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/cicd/scripts/_resolve-nick.sh +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/cicd/scripts/portability-lint.sh +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/cicd/scripts/pr-reply.sh +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/cicd/scripts/pr-status.sh +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/cicd/scripts/workflow.sh +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/communicate/SKILL.md +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/communicate/scripts/fetch-issues.sh +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/communicate/scripts/mesh-message.sh +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/communicate/scripts/post-comment.sh +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/communicate/scripts/post-issue.sh +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/communicate/scripts/templates/skill-new-brief.md +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/communicate/scripts/templates/skill-update-brief.md +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/doc-test-alignment/SKILL.md +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/doc-test-alignment/scripts/check.sh +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/pypi-maintainer/SKILL.md +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/pypi-maintainer/scripts/switch-source.sh +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/recall/SKILL.md +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/recall/scripts/recall.sh +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/remember/SKILL.md +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/remember/scripts/remember.sh +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/run-tests/SKILL.md +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/run-tests/scripts/test.sh +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/sonarclaude/SKILL.md +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/sonarclaude/scripts/sonar.sh +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/spec-to-plan/SKILL.md +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/spec-to-plan/scripts/spec-to-plan.sh +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/think/SKILL.md +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/think/scripts/think.sh +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/version-bump/SKILL.md +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/version-bump/scripts/bump.py +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills.local.yaml.example +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.flake8 +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.github/workflows/publish.yml +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.github/workflows/tests.yml +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.gitignore +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/.markdownlint-cli2.yaml +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/AGENTS.colleague.md +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/LICENSE +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/README.md +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/culture.yaml +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/docs/skill-sources.md +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/sonar-project.properties +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/tests/__init__.py +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/tests/test_cli_introspection.py +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/webglass/__init__.py +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/webglass/__main__.py +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/webglass/cli/__init__.py +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/webglass/cli/_commands/__init__.py +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/webglass/cli/_commands/cli.py +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/webglass/cli/_commands/doctor.py +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/webglass/cli/_commands/explain.py +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/webglass/cli/_commands/learn.py +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/webglass/cli/_commands/overview.py +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/webglass/cli/_commands/whoami.py +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/webglass/cli/_errors.py +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/webglass/cli/_output.py +0 -0
- {webglass_cli-0.4.0 → webglass_cli-0.4.1}/webglass/explain/__init__.py +0 -0
|
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
Format follows [Keep a Changelog](https://keepachangelog.com/). This project
|
|
6
6
|
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.4.1] - 2026-06-23
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Re-initialized `CLAUDE.md` from the bootstrap seed into a full runtime prompt (via `/init`, incorporating the WebGlass design spec in issue #2): documents the two-layer state (template CLI skeleton vs. the not-yet-built WebGlass product), the CLI registration/error/output/explain contracts, the agent-first rubric gate constraints, mesh identity, the version-bump/cicd conventions, and the target architecture.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- explain catalog now resolves the import-package name `webglass` (not just the dist name `webglass-cli`), which the agent-first rubric's `explain_self` check probes. The `teken cli doctor . --strict` gate was exiting 1 (CI lint job red); it now passes. Added a regression test.
|
|
17
|
+
|
|
8
18
|
## [0.4.0] - 2026-06-23
|
|
9
19
|
|
|
10
20
|
### Added
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## What this repo is (and is not yet)
|
|
6
|
+
|
|
7
|
+
`webglass-cli` is **WebGlass** — an agent-facing web exploration CLI. The product
|
|
8
|
+
goal (the design spec is [issue #2](https://github.com/agentculture/webglass-cli/issues/2))
|
|
9
|
+
is a *web lens for agents*: search, open, read, inspect, follow link paths,
|
|
10
|
+
capture evidence, and remember it all so an agent can explore the web cheaply
|
|
11
|
+
(in tokens) and resume a session later — built on **Playwright** automation with
|
|
12
|
+
**Chromium** as the first browser backend.
|
|
13
|
+
|
|
14
|
+
**None of that exists yet.** The repo was scaffolded from `culture-agent-template`
|
|
15
|
+
and is at the *seed* stage. What ships today is the template's **agent-first
|
|
16
|
+
introspection CLI** (cited from [teken](https://github.com/agentculture/teken)'s
|
|
17
|
+
`afi-cli` `python-cli` reference) with verbs `whoami` / `learn` / `explain` /
|
|
18
|
+
`overview` / `doctor` and the `cli` noun group. The runtime has **zero
|
|
19
|
+
third-party dependencies** (`dependencies = []` in `pyproject.toml`); `teken` is
|
|
20
|
+
a dev-only dependency.
|
|
21
|
+
|
|
22
|
+
So there are two layers to keep straight:
|
|
23
|
+
|
|
24
|
+
- **The CLI skeleton** (below) — the registration / error / output / explain
|
|
25
|
+
machinery you extend. It is real, tested, and the foundation every WebGlass
|
|
26
|
+
verb will register onto.
|
|
27
|
+
- **The WebGlass product** (issue #2, summarized at the end) — the target
|
|
28
|
+
architecture. Building it means adding `search` / `open` / `read` / `inspect`
|
|
29
|
+
/ `explore` / `screenshot` / `path` / `memory` / `cite` verbs onto the
|
|
30
|
+
skeleton, plus the browser, extraction, evidence, and Web-memory modules.
|
|
31
|
+
|
|
32
|
+
Much of the runtime *text* still describes the repo as "a clonable template for
|
|
33
|
+
AgentCulture mesh agents" (the `learn` body, the `explain` catalog, the argparse
|
|
34
|
+
`prog` description, the README). As real WebGlass verbs land, update those
|
|
35
|
+
self-description strings to describe WebGlass — they are the CLI's own
|
|
36
|
+
documentation surface, not just prose.
|
|
37
|
+
|
|
38
|
+
## Commands
|
|
39
|
+
|
|
40
|
+
This is a **uv**-managed Python 3.12+ package. The console script is **`webglass`**
|
|
41
|
+
(see the gotcha below — it is *not* `webglass-cli`).
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
uv sync # create .venv and install (incl. dev group)
|
|
45
|
+
uv run webglass whoami # run the CLI; --json on every verb
|
|
46
|
+
python -m webglass whoami # equivalent entry point
|
|
47
|
+
|
|
48
|
+
uv run pytest -n auto # full test suite (xdist parallel)
|
|
49
|
+
uv run pytest tests/test_cli.py::test_whoami_text -v # a single test
|
|
50
|
+
uv run pytest -n auto --cov=webglass --cov-report=term # coverage (fail_under=60)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Lint / format / security — these run as the CI `lint` job and must all pass:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
uv run black --check webglass tests # line-length 100
|
|
57
|
+
uv run isort --check-only webglass tests # black profile
|
|
58
|
+
uv run flake8 webglass tests
|
|
59
|
+
uv run bandit -c pyproject.toml -r webglass # B101/B404/B603 skipped (see pyproject)
|
|
60
|
+
markdownlint-cli2 "**/*.md" "#node_modules" "#.local" "#.claude/skills" "#.teken"
|
|
61
|
+
uv run teken cli doctor . --strict # the agent-first rubric gate (see below)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
(Drop `--check`/`--check-only` from black/isort to auto-format.)
|
|
65
|
+
|
|
66
|
+
## Architecture: the CLI skeleton
|
|
67
|
+
|
|
68
|
+
Reading these four concerns together is how you understand the CLI — they are
|
|
69
|
+
deliberately small and contract-driven so an agent consumer can rely on them.
|
|
70
|
+
|
|
71
|
+
**Command registration** (`webglass/cli/__init__.py`). `main()` → `_build_parser()`
|
|
72
|
+
→ `_dispatch()`. Every command lives in its own module under
|
|
73
|
+
`webglass/cli/_commands/` and exposes a `register(sub)` function that adds its
|
|
74
|
+
subparser and sets `func=<handler>` (and `json=False`) via `set_defaults`. To
|
|
75
|
+
add a verb: write the module, then call its `register()` inside `_build_parser`
|
|
76
|
+
(there is a marked "Register your own noun groups here" spot). Handlers return
|
|
77
|
+
`None`/`0` for success or raise `CliError`; `_dispatch` translates the return or
|
|
78
|
+
exception into the process exit code.
|
|
79
|
+
|
|
80
|
+
**Error contract** (`webglass/cli/_errors.py` + `_output.py`). *No Python
|
|
81
|
+
traceback ever reaches stderr.* Every failure raises `CliError(code, message,
|
|
82
|
+
remediation)`. `_dispatch` catches `CliError` and routes it through
|
|
83
|
+
`emit_error`; any *other* exception is wrapped into a `CliError` so even bugs
|
|
84
|
+
surface as the structured shape. Argparse's own errors (unknown verb, missing
|
|
85
|
+
arg) are also routed through this contract: `_CliArgumentParser` overrides
|
|
86
|
+
`.error()`, and because the subparsers are built with
|
|
87
|
+
`parser_class=_CliArgumentParser`, the override propagates to every level.
|
|
88
|
+
|
|
89
|
+
**Output contract** (`webglass/cli/_output.py`). *Results to stdout, diagnostics
|
|
90
|
+
and errors to stderr — never mixed.* Every verb takes `--json`; in JSON mode the
|
|
91
|
+
result payload goes to stdout and `{code, message, remediation}` errors go to
|
|
92
|
+
stderr. Text-mode errors render as `error: <message>` + `hint: <remediation>`
|
|
93
|
+
(the `hint:` prefix is load-bearing — agents and the rubric look for it).
|
|
94
|
+
Because argparse errors fire *before* `args.json` is parsed, `main()` peeks at
|
|
95
|
+
raw argv for `--json` and stashes it on `_CliArgumentParser._json_hint` so
|
|
96
|
+
parse-time errors still honor JSON mode.
|
|
97
|
+
|
|
98
|
+
**Exit-code policy** (centralized in `_errors.py`): `0` success, `1` user-input
|
|
99
|
+
error, `2` environment/setup error, `3+` reserved. Documented in `learn` output
|
|
100
|
+
because the rubric checks for it.
|
|
101
|
+
|
|
102
|
+
**The explain catalog** (`webglass/explain/`). `explain` is a *global* verb
|
|
103
|
+
(not nested under a noun) that resolves a command-path tuple to verbatim
|
|
104
|
+
markdown. Entries live in `catalog.py` as a `dict[tuple[str, ...], str]`;
|
|
105
|
+
`resolve()` raises `CliError` on a miss. **Every new noun/verb must get a
|
|
106
|
+
catalog entry**, keyed by its path tuple — otherwise `explain <new-verb>` 404s
|
|
107
|
+
and the rubric's per-verb `explain` check fails.
|
|
108
|
+
|
|
109
|
+
### The agent-first rubric gate is a hard CI gate
|
|
110
|
+
|
|
111
|
+
`uv run teken cli doctor . --strict` enforces teken's seven-bundle agent-first
|
|
112
|
+
rubric and runs in CI. It is not advisory — a failure reds the build. Practical
|
|
113
|
+
constraints it imposes when you extend the CLI:
|
|
114
|
+
|
|
115
|
+
- **Any noun that has action-verbs must also expose `overview`.** The `cli` noun
|
|
116
|
+
exists today purely to satisfy `overview_cli_noun_exists` (it has no
|
|
117
|
+
action-verbs yet); follow that pattern for new nouns like `path` and `memory`.
|
|
118
|
+
- **`learn`** must be ≥200 chars and mention purpose, the command map, exit
|
|
119
|
+
codes, `--json`, and `explain`.
|
|
120
|
+
- **Descriptive verbs** (`overview`) must never hard-fail on a stray/bad target
|
|
121
|
+
path — `overview` accepts an ignored positional `target` for exactly this.
|
|
122
|
+
- **`explain <self>` must resolve** — for both the dist name (`webglass-cli`)
|
|
123
|
+
*and* the **import-package** name (`webglass`), because the rubric's
|
|
124
|
+
`explain_self` check probes the import name. The catalog (`ENTRIES` in
|
|
125
|
+
`webglass/explain/catalog.py`) carries both as root keys; if you ever rename
|
|
126
|
+
the package, keep both aliases in sync or this check goes red.
|
|
127
|
+
|
|
128
|
+
## Identity and mesh membership
|
|
129
|
+
|
|
130
|
+
This repo is a node in the AgentCulture IRC mesh. Its identity is declared in
|
|
131
|
+
`culture.yaml`: `suffix: webglass-cli`, **`backend: colleague`**, and a pinned
|
|
132
|
+
served model. The backend determines the **resident prompt file**: `colleague` →
|
|
133
|
+
**`AGENTS.colleague.md`** (not `CLAUDE.md`). So `CLAUDE.md` is *your* operating
|
|
134
|
+
guide, while `AGENTS.colleague.md` is the prompt the colleague backend actually
|
|
135
|
+
residents on — keep both coherent, but the mesh runtime reads
|
|
136
|
+
`AGENTS.colleague.md`.
|
|
137
|
+
|
|
138
|
+
`doctor` checks the same invariants `steward doctor` enforces:
|
|
139
|
+
**backend-consistency** (the prompt file for the declared backend exists —
|
|
140
|
+
`claude`→`CLAUDE.md`, `colleague`→`AGENTS.colleague.md`, `acp`→`AGENTS.md`,
|
|
141
|
+
`gemini`→`GEMINI.md`) and **skills-present** (`.claude/skills/` is non-empty).
|
|
142
|
+
|
|
143
|
+
Note: `whoami`/`doctor` parse `culture.yaml` with a **hand-rolled line parser**
|
|
144
|
+
(`read_agent_fields` in `whoami.py`), deliberately *not* PyYAML, to keep the
|
|
145
|
+
runtime dependency-free. It reads only the first agent block's top-level
|
|
146
|
+
`suffix`/`backend`/`model`. If WebGlass ever needs richer config, that's the
|
|
147
|
+
constraint to revisit — adding a YAML dep is a real architectural decision, same
|
|
148
|
+
as adding Playwright.
|
|
149
|
+
|
|
150
|
+
## Conventions and workflow
|
|
151
|
+
|
|
152
|
+
**Version-bump-every-PR (hard CI gate).** The `version-check` job fails any PR
|
|
153
|
+
whose `pyproject.toml` version equals `main`'s — *every* PR bumps the version,
|
|
154
|
+
even docs/config/CI-only ones. Use the `version-bump` skill (`major|minor|patch`)
|
|
155
|
+
which also prepends a Keep-a-Changelog entry to `CHANGELOG.md`. The version
|
|
156
|
+
flows from package metadata into `webglass.__version__` at runtime via
|
|
157
|
+
`importlib.metadata`.
|
|
158
|
+
|
|
159
|
+
**PR lifecycle** runs through the `cicd` skill (layered on the `devex pr` CLI):
|
|
160
|
+
it handles lint/open/read/reply and adds `status` (SonarCloud quality gate) and
|
|
161
|
+
`await` (block until CI + Sonar settle). The Sonar quality gate is wired in
|
|
162
|
+
(`sonar-project.properties`, `sonar.qualitygate.wait=true`) and gates the `test`
|
|
163
|
+
job when `SONAR_TOKEN` is set; token-less/fork PRs stay green.
|
|
164
|
+
|
|
165
|
+
**Skills.** `.claude/skills/` is vendored **cite-don't-import** from
|
|
166
|
+
`guildmaster` (the AgentCulture skills supplier); `docs/skill-sources.md` is the
|
|
167
|
+
provenance ledger and re-sync procedure — read it before touching anything under
|
|
168
|
+
`.claude/skills/`, and never edit a vendored script body in place (lift the
|
|
169
|
+
change upstream and re-vendor). Beyond `cicd`/`version-bump`, the kit includes
|
|
170
|
+
`communicate` (cross-repo issues + mesh messages), `ask-colleague` (hand a
|
|
171
|
+
scoped task to a *different* model for a second opinion — reach for `review`
|
|
172
|
+
before opening a PR), `think`/`spec-to-plan`/`assign-to-workforce` (the devague
|
|
173
|
+
idea→spec→plan→build chain), `run-tests`, `sonarclaude`, and `recall`/`remember`
|
|
174
|
+
(shared eidetic memory).
|
|
175
|
+
|
|
176
|
+
**Deploy.** PyPI Trusted Publishing (`.github/workflows/publish.yml`). A push to
|
|
177
|
+
`main` that touches `pyproject.toml` or `webglass/**` publishes to PyPI; a PR
|
|
178
|
+
touching them publishes a `.devN` build to TestPyPI. The dist name is
|
|
179
|
+
`webglass-cli`.
|
|
180
|
+
|
|
181
|
+
## Target architecture (WebGlass — issue #2)
|
|
182
|
+
|
|
183
|
+
When building the actual product, the spec calls for **strict module
|
|
184
|
+
separation** — keep browser automation, extraction, evidence, and Web-memory as
|
|
185
|
+
distinct modules. The intended shape:
|
|
186
|
+
|
|
187
|
+
- **Browser automation** — a Playwright-backed adapter. Keep it *adapter-shaped*:
|
|
188
|
+
Chromium is the first backend, but the interface must accommodate
|
|
189
|
+
Firefox/WebKit/plain-HTTP-fetch/search-provider-API/local-cache backends
|
|
190
|
+
later. Operations: open URL, navigate links, extract page/visible text, DOM
|
|
191
|
+
snapshots, screenshots, wait-for-selector, page metadata, and detection of
|
|
192
|
+
navigation failures / redirects / login walls / bot walls / blocked content.
|
|
193
|
+
*This adds the first runtime dependency (Playwright) — currently `[]`.*
|
|
194
|
+
- **Token-budgeted extraction (the whole point).** Reads return cleaned,
|
|
195
|
+
budgeted content *by default* — strip boilerplate, outline-first then detail
|
|
196
|
+
on demand, deterministic chunking, dedup across pages, query-focused
|
|
197
|
+
extraction, agent-selectable verbosity (e.g. `read <url> --budget 4000`,
|
|
198
|
+
`inspect <url> --outline`, `extract <url> --query "..."`).
|
|
199
|
+
- **Web-memory** — persistent, reusable exploration memory so an agent can ask
|
|
200
|
+
"have I seen this URL?", "did it change?", "what did I extract from this
|
|
201
|
+
domain?", "can I resume that session?". Built on URL canonicalization, content
|
|
202
|
+
hashing, snapshot IDs, and a Session→Query→Result→Page→{Extraction, Evidence,
|
|
203
|
+
Screenshot, LinkEdges, Notes} record model. Repeated reads must be
|
|
204
|
+
cache/memory-aware.
|
|
205
|
+
- **Exploration paths** — represent exploration as a graph, not isolated
|
|
206
|
+
fetches: source query → result page → clicked page → evidence, with link
|
|
207
|
+
edges, the reason each link was followed, and per-node branch status
|
|
208
|
+
(useful / dead-end / blocked / duplicate / deferred). Paths are persisted,
|
|
209
|
+
inspectable, and resumable (`path list|show|resume|mark`, `map <url> --depth`).
|
|
210
|
+
- **Evidence & citation** — useful findings are saved and citeable (`cite <id>`).
|
|
211
|
+
|
|
212
|
+
Acceptance criteria worth internalizing: agents use WebGlass without ever
|
|
213
|
+
touching Playwright directly; extraction is token-budgeted by default; repeated
|
|
214
|
+
reads are cache-aware; every session is resumable; paths and evidence are
|
|
215
|
+
persisted and inspectable. Position it as an *agent web exploration layer*, not
|
|
216
|
+
a generic scraper/crawler.
|
|
217
|
+
|
|
218
|
+
## Known gotchas
|
|
219
|
+
|
|
220
|
+
- **Console script is `webglass`, not `webglass-cli`.** `[project.scripts]` binds
|
|
221
|
+
`webglass = "webglass.cli:main"`. The README's `uv run webglass-cli ...`
|
|
222
|
+
examples are wrong (that binary does not exist). Naming map: dist/PyPI name
|
|
223
|
+
`webglass-cli`, import package `webglass`, console script `webglass`, argparse
|
|
224
|
+
`prog` (shown in help/errors) `webglass-cli`. Several of these should converge
|
|
225
|
+
as the product matures. This divergence is also why the explain catalog keys
|
|
226
|
+
the root entry under *both* `webglass-cli` and `webglass` (see the rubric
|
|
227
|
+
section).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: webglass-cli
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: Agent-first web browsing CLI — wraps Playwright and headless Chromium so an agent can navigate, read, and interact with web pages more effectively.
|
|
5
5
|
Project-URL: Homepage, https://github.com/agentculture/webglass-cli
|
|
6
6
|
Project-URL: Issues, https://github.com/agentculture/webglass-cli/issues
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "webglass-cli"
|
|
3
|
-
version = "0.4.
|
|
3
|
+
version = "0.4.1"
|
|
4
4
|
description = "Agent-first web browsing CLI — wraps Playwright and headless Chromium so an agent can navigate, read, and interact with web pages more effectively."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -92,6 +92,14 @@ def test_explain_self(capsys: pytest.CaptureFixture[str]) -> None:
|
|
|
92
92
|
assert capsys.readouterr().out.startswith("#")
|
|
93
93
|
|
|
94
94
|
|
|
95
|
+
def test_explain_import_package_name(capsys: pytest.CaptureFixture[str]) -> None:
|
|
96
|
+
# The agent-first rubric's `explain_self` probes the import-package name
|
|
97
|
+
# (`webglass`), not the dist name (`webglass-cli`). Both must resolve.
|
|
98
|
+
rc = main(["explain", "webglass"])
|
|
99
|
+
assert rc == 0
|
|
100
|
+
assert capsys.readouterr().out.startswith("#")
|
|
101
|
+
|
|
102
|
+
|
|
95
103
|
def test_explain_json(capsys: pytest.CaptureFixture[str]) -> None:
|
|
96
104
|
rc = main(["explain", "whoami", "--json"])
|
|
97
105
|
assert rc == 0
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"""Markdown catalog for ``webglass-cli explain <path>``.
|
|
2
2
|
|
|
3
|
-
Each entry is verbatim markdown. Keys are command-path tuples. The empty tuple
|
|
4
|
-
|
|
3
|
+
Each entry is verbatim markdown. Keys are command-path tuples. The empty tuple,
|
|
4
|
+
``("webglass-cli",)`` (the dist name), and ``("webglass",)`` (the import-package
|
|
5
|
+
name the agent-first rubric's ``explain_self`` check probes) all resolve to the
|
|
6
|
+
root entry.
|
|
5
7
|
|
|
6
8
|
Keep bodies self-contained: an agent reading one entry should get enough
|
|
7
9
|
context without chaining reads.
|
|
@@ -119,6 +121,7 @@ itself (distinct from the global `overview`, which describes the agent).
|
|
|
119
121
|
ENTRIES: dict[tuple[str, ...], str] = {
|
|
120
122
|
(): _ROOT,
|
|
121
123
|
("webglass-cli",): _ROOT,
|
|
124
|
+
("webglass",): _ROOT,
|
|
122
125
|
("whoami",): _WHOAMI,
|
|
123
126
|
("learn",): _LEARN,
|
|
124
127
|
("explain",): _EXPLAIN,
|
webglass_cli-0.4.0/CLAUDE.md
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# CLAUDE.md — seed / bootstrap placeholder
|
|
2
|
-
|
|
3
|
-
> **This is a self-initializing seed, not a finished runtime prompt.**
|
|
4
|
-
> Run `/init` (or describe the agent's domain to your AI assistant) to
|
|
5
|
-
> re-initialize this file into a full runtime prompt, using the description
|
|
6
|
-
> below and the scaffolded repo as context.
|
|
7
|
-
|
|
8
|
-
## Agent
|
|
9
|
-
|
|
10
|
-
This repository hosts the **webglass-cli** agent.
|
|
11
|
-
|
|
12
|
-
## Description
|
|
13
|
-
|
|
14
|
-
Agent-first web browsing CLI — wraps Playwright and headless Chromium so an agent can navigate, read, and interact with web pages more effectively.
|
|
15
|
-
|
|
16
|
-
## Re-init instruction
|
|
17
|
-
|
|
18
|
-
This file is a seed. To expand it into your full runtime prompt:
|
|
19
|
-
|
|
20
|
-
1. Open this repo in Claude Code (or your preferred AI assistant).
|
|
21
|
-
2. Run `/init` — the assistant will read the repo, incorporate the description
|
|
22
|
-
above, and replace this seed with a complete `CLAUDE.md`.
|
|
23
|
-
3. Commit the result.
|
|
24
|
-
|
|
25
|
-
Until you run `/init`, `webglass-cli` satisfies the `steward doctor`
|
|
26
|
-
`prompt-file-present` and `backend-consistency` invariants (a `CLAUDE.md`
|
|
27
|
-
exists and `culture.yaml` declares `backend: claude`) but the prompt is not
|
|
28
|
-
yet tailored to this agent's domain.
|
|
File without changes
|
{webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/agent-config/data/backend-fingerprints.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/ask-colleague/scripts/ask-colleague.sh
RENAMED
|
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
|
{webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/communicate/scripts/fetch-issues.sh
RENAMED
|
File without changes
|
{webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/communicate/scripts/mesh-message.sh
RENAMED
|
File without changes
|
{webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/communicate/scripts/post-comment.sh
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/doc-test-alignment/scripts/check.sh
RENAMED
|
File without changes
|
|
File without changes
|
{webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/pypi-maintainer/scripts/switch-source.sh
RENAMED
|
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
|
{webglass_cli-0.4.0 → webglass_cli-0.4.1}/.claude/skills/spec-to-plan/scripts/spec-to-plan.sh
RENAMED
|
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
|