Repository navigation
explore: say why a proposal failed, propose typescript-public-api per package, and mark what a proposal needs - #215
Open
agorischek wants to merge 2 commits into
Open
agorischek wants to merge 2 commits into
agorischek wants to merge 2 commits into
Conversation
…h its tsconfig, and what a proposal needs first Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Fallback package IDs are neither checked nor reserved for uniqueness, allowing collisions that prevent some packages from being adopted independently.
1 open issue
What changed in this PR
This PR improves Projections’ discovery and onboarding flow by explaining proposal failures, generating package-specific TypeScript API proposals, and identifying prerequisites.
Changes:
- Propose TypeScript public APIs per package, with tsconfig inputs and install or configuration needs.
- Surface extractor failure reasons in sweep and adoption output, and clarify duplicate workspace-name errors.
- Preserve omitted TypeScript inputs and update regression tests, tool descriptions, and agent guidance.
| File | Description |
|---|---|
tools/scripts/reference-docs/agents.mjs |
Update generated guidance for prerequisites and failure reporting. |
packages/integrations/vscode/package.json |
Describe proposal prerequisites in the explore tool. |
packages/extractors/workspace-dependencies/tests/managers.rs |
Test duplicate-name diagnostics naming both manifests. |
packages/extractors/workspace-dependencies/src/workspace.rs |
Make duplicate-name errors actionable. |
packages/extractors/typescript-support/src/lib.rs |
Preserve absent inputs and add a regression test. |
packages/extractors/typescript-support/Cargo.toml |
Enable SDK testing helpers. |
packages/cli/src/tools/catalog.rs |
Document prerequisites in the explore tool description. |
packages/cli/src/sweep/tests.rs |
Test extractor failure reasons and stderr formatting. |
packages/cli/src/sweep/mod.rs |
Put extractor failure reasons on summary lines. |
packages/cli/src/explore/typescript.rs |
Generate per-package proposals and prerequisite metadata. |
packages/cli/src/explore.rs |
Integrate TypeScript discovery and display prerequisites. |
packages/cli/src/commands/explore.rs |
Distinguish all-failed adoption sweeps from unchanged results. |
docs/agents/explore.md |
Explain prerequisite handling and failure reporting. |
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
860c8dae904924374f55a419686e101cdb54a4f3inputs: null, and the duplicate-name message.↑ End to end on a clone of the downstream repository: explore lists one proposal per package with what it needs, and the sweep says why each failed.
↓
adopt's new note, for a projection that failed on every change, isn't covered by a test.Item 6 of a downstream user's (Superego) feedback, as decided for v0.3.1. Explore proposed projections that then failed without saying why. On their pnpm monorepo: workspace-dependencies hit a duplicate package name, and typescript-public-api was proposed with no inputs and failed with
inputs must be an object.Why a proposal failed
adoptsaid a projection "showed no change … so nothing was bookmarked" when it had in fact failed on every change. It now says it failed, and why.inputs must be an objectwas a bug.present_inputs(typescript-support) indexeddefinition["inputs"]mutably, which addsinputs: nullto a definition without inputs, so every typescript-public-api definition without inputs failed. It now leaves such a request alone, and a test covers it.Obvious inputs filled in. typescript-public-api is now proposed once per package that declares its API (
exports,typesortypings) beside atsconfig.json, astypescript-public-api-<name>withinputs.tsconfigset. The extractor already derives a package's entrypoints from itsexports, so the tsconfig is what selects the package. When no package qualifies, the single generic proposal remains.What a proposal needs first. Candidates carry
needs, shown in the text as(needs an install: …)or(needs configuration: …):typescriptisn't resolvable from the package, as Node resolves it.The explore agent guide and the
exploretool's description say so.Duplicate workspace package names (conservative). workspace-dependencies identifies a member by its name, so a root and a member sharing one, which pnpm allows, still fails. The message now names both manifests and says to rename one. Accepting duplicates changes entity identity, so that is left as a design decision.
Tests:
cargo test -p projections-cli --lib explore:: sweep::,cargo test -p projections-extractor-typescript-support,cargo test -p projections-extractor-workspace-dependencies --test managers duplicate.