Repository navigation
feat(cli): provision the OASF extractor assets in dirctl init - #1756
Conversation
18aeb7e to
7af9807
Compare
7af9807 to
065cb57
Compare
There was a problem hiding this comment.
Pull request overview
Adds the OASF taxonomy extractor provisioning flow to dirctl init, including a reusable provisioning engine, persisted machine-wide config, progress UX, and tests to cover the non-network seams. This aligns with the onboarding wizard scope in #1705/#1743 by making extractor asset setup a first-run step and persisting the chosen asset location + OASF endpoint for later consumers.
Changes:
- Introduces
cli/internal/extractorto provision/smoke-check/teardown extractor assets with dirctl defaults and validation. - Extends
client/configwith a machine-wideextractor:section plus load/save/clear helpers and tests. - Implements
dirctl init(extractor step) with prompts,--yes/--remove, spinner-based progress, and unit tests; bumpsoasf-sdkpin and related deps.
Reviewed changes
Copilot reviewed 18 out of 20 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/go.sum | Updates dependency checksums for test module after SDK/dependency bump. |
| tests/go.mod | Adds/updates indirect dependencies required by the new SDK pin in tests. |
| client/config/config.go | Adds persisted machine-wide extractor section + helpers (load/save/clear). |
| client/config/config_test.go | Adds tests for extractor config round-trip and context preservation. |
| cli/internal/extractor/provision.go | Wraps oasf-sdk extractor provisioning and smoke-check with dirctl defaults/errors. |
| cli/internal/extractor/provision_integration_test.go | Build-tag-gated integration test for real provisioning + smoke check. |
| cli/internal/extractor/config.go | Defines extractor defaults (OASF URL, asset dir) and validation. |
| cli/internal/extractor/config_test.go | Unit tests for default resolution and URL validation. |
| cli/internal/extractor/assets.go | Adds provisioned-state detection and teardown safety guards. |
| cli/internal/extractor/assets_test.go | Unit tests for provisioned detection and teardown behavior. |
| cli/go.sum | Updates CLI module dependency checksums after adding init/extractor deps. |
| cli/go.mod | Bumps oasf-sdk pin and adds direct deps for init spinner/term/logging. |
| cli/cmd/root.go | Registers the new dirctl init command and skips client setup for it. |
| cli/cmd/init/run.go | Implements init provision/remove flows, config persistence, and prompts. |
| cli/cmd/init/run_test.go | Unit tests for prompt handling and provision/remove behavior with saved config. |
| cli/cmd/init/progress.go | Adds spinner UI and captures noisy logs during provisioning. |
| cli/cmd/init/progress_test.go | Tests phase detection and log-capture wrapper behavior. |
| cli/cmd/init/options.go | Adds flags for dirctl init (--oasf-url, --asset-dir, --yes, --remove). |
| cli/cmd/init/init.go | Defines the dirctl init cobra command and confirm prompt helper. |
| cli/cmd/init/init_test.go | Unit test coverage for confirm prompt behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
065cb57 to
fc29bef
Compare
|
The latest Buf updates on your PR. Results from workflow Buf CI / verify-proto (pull_request).
|
61c78ae to
f0728af
Compare
e430b4e to
dbc8a92
Compare
Signed-off-by: András Jáky <[email protected]>
…absolute-path guard Signed-off-by: András Jáky <[email protected]>
Signed-off-by: András Jáky <[email protected]>
…fy errors, panic-safe progress Signed-off-by: András Jáky <[email protected]>
Signed-off-by: András Jáky <[email protected]>
dbc8a92 to
ae02d7f
Compare
Adds the OASF taxonomy extractor provisioning step of
dirctl init(the first step of the onboarding wizard, #1705).dirctl initnow guides a one-time local setup of the extractor: it downloads and caches theall-MiniLM-L6-v2model + the OASF taxonomy to~/.agntcy/oasf-sdk/extractor(in-process, pure-Go — no LLM/Python/API), records the chosen OASF URL / asset dir in the dirctl config sodirctl importenrichment and future free-text search can load the assets in-process, and verifies an extraction round-trip. Re-running is idempotent;--removetears it down.What's in it
cli/internal/extractor— reusable engine (Provision/SmokeCheck/Teardown/IsProvisioned, config defaults + validation) that the feat(cli):dirctl init— add the "Directory MCP server & skills" step to the onboarding wizard #1705 wizard and future import/search consumers share.client/config— machine-wideextractor:section + load/save/clear helpers.cli/cmd/init— thedirctl initcommand with--oasf-url/--asset-dir/--yes/--remove, a minimal confirm + URL prompt, and a non-TTY fallback.Bumps the
oasf-sdkpin to the version shippingpkg/extractor(pulls in the pure-Go cybertron/spago transformer). Offline unit tests cover every filesystem/config/prompt seam; the real model round-trip is a build-tag-gated integration test.Closes #1743