putitoutthere 0.1.43 → 0.1.45

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.
Files changed (82) hide show
  1. package/CHANGELOG.md +115 -0
  2. package/MIGRATIONS.md +632 -0
  3. package/README.md +342 -94
  4. package/action.yml +5 -5
  5. package/dist/action.js +2 -2
  6. package/dist/action.js.map +1 -1
  7. package/dist/cascade.d.ts +1 -1
  8. package/dist/cascade.js +2 -2
  9. package/dist/cli.d.ts +9 -6
  10. package/dist/cli.d.ts.map +1 -1
  11. package/dist/cli.js +12 -426
  12. package/dist/cli.js.map +1 -1
  13. package/dist/config.d.ts +13 -61
  14. package/dist/config.d.ts.map +1 -1
  15. package/dist/config.js +31 -45
  16. package/dist/config.js.map +1 -1
  17. package/dist/git.js +1 -1
  18. package/dist/git.js.map +1 -1
  19. package/dist/handlers/npm-platform.d.ts.map +1 -1
  20. package/dist/handlers/npm-platform.js +5 -1
  21. package/dist/handlers/npm-platform.js.map +1 -1
  22. package/dist/handlers/pypi.d.ts.map +1 -1
  23. package/dist/handlers/pypi.js +29 -6
  24. package/dist/handlers/pypi.js.map +1 -1
  25. package/dist/plan.d.ts +0 -1
  26. package/dist/plan.d.ts.map +1 -1
  27. package/dist/plan.js +19 -18
  28. package/dist/plan.js.map +1 -1
  29. package/dist/preflight.js +1 -1
  30. package/dist/preflight.js.map +1 -1
  31. package/dist/publish.d.ts +0 -10
  32. package/dist/publish.d.ts.map +1 -1
  33. package/dist/publish.js +6 -52
  34. package/dist/publish.js.map +1 -1
  35. package/dist/types.d.ts +1 -21
  36. package/dist/types.d.ts.map +1 -1
  37. package/dist/types.js.map +1 -1
  38. package/package.json +5 -3
  39. package/dist/auth.d.ts +0 -68
  40. package/dist/auth.d.ts.map +0 -1
  41. package/dist/auth.js +0 -285
  42. package/dist/auth.js.map +0 -1
  43. package/dist/doctor.d.ts +0 -115
  44. package/dist/doctor.d.ts.map +0 -1
  45. package/dist/doctor.js +0 -292
  46. package/dist/doctor.js.map +0 -1
  47. package/dist/init.d.ts +0 -59
  48. package/dist/init.d.ts.map +0 -1
  49. package/dist/init.js +0 -181
  50. package/dist/init.js.map +0 -1
  51. package/dist/keyring.d.ts +0 -35
  52. package/dist/keyring.d.ts.map +0 -1
  53. package/dist/keyring.js +0 -88
  54. package/dist/keyring.js.map +0 -1
  55. package/dist/oidc-policy.d.ts +0 -145
  56. package/dist/oidc-policy.d.ts.map +0 -1
  57. package/dist/oidc-policy.js +0 -383
  58. package/dist/oidc-policy.js.map +0 -1
  59. package/dist/preflight-run.d.ts +0 -47
  60. package/dist/preflight-run.d.ts.map +0 -1
  61. package/dist/preflight-run.js +0 -197
  62. package/dist/preflight-run.js.map +0 -1
  63. package/dist/registries/crates-trust.d.ts +0 -69
  64. package/dist/registries/crates-trust.d.ts.map +0 -1
  65. package/dist/registries/crates-trust.js +0 -95
  66. package/dist/registries/crates-trust.js.map +0 -1
  67. package/dist/release.d.ts +0 -36
  68. package/dist/release.d.ts.map +0 -1
  69. package/dist/release.js +0 -102
  70. package/dist/release.js.map +0 -1
  71. package/dist/templates.d.ts +0 -43
  72. package/dist/templates.d.ts.map +0 -1
  73. package/dist/templates.js +0 -310
  74. package/dist/templates.js.map +0 -1
  75. package/dist/token-scope.d.ts +0 -65
  76. package/dist/token-scope.d.ts.map +0 -1
  77. package/dist/token-scope.js +0 -163
  78. package/dist/token-scope.js.map +0 -1
  79. package/dist/token.d.ts +0 -211
  80. package/dist/token.d.ts.map +0 -1
  81. package/dist/token.js +0 -719
  82. package/dist/token.js.map +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,115 @@
1
+ # Changelog
2
+
3
+ All notable changes to `putitoutthere` are documented here. Format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
+
6
+ Every PR that changes public API adds an entry here (see
7
+ [`AGENTS.md`](./AGENTS.md#changelog-and-migration-policy)). Breaking changes
8
+ are prefixed `**BREAKING**` and link to the matching section in
9
+ [`MIGRATIONS.md`](./MIGRATIONS.md).
10
+
11
+ ## Unreleased
12
+
13
+ ### Added
14
+
15
+ - **Reusable workflow `.github/workflows/release.yml` (`workflow_call`).** The single user-facing surface. Consumer integration is one `uses: thekevinscott/putitoutthere/.github/workflows/release.yml@v0` line in their own `release.yml`; pinned action versions, plan/build/publish orchestration, and GitHub Release creation all live inside. Three optional inputs: `environment` (default `release`), `node_version` (default `24`), `python_version` (default `3.12`). No `dry_run`, `working_directory`, or `config` inputs — the plan job is already side-effect-free, the config file is `putitoutthere.toml` at the repo root, period. The engine is invoked via `uses: thekevinscott/putitoutthere@v0` so the workflow file and the engine always agree on a single git ref.
16
+
17
+ - **`[package.bundle_cli]` recipe for maturin pypi packages** (#217). Opt-in declarative shape for libraries that ship a Rust CLI inside each wheel (the `ruff` / `uv` / `pydantic-core` pattern). Declare `bin`, `stage_to`, and optional `crate_path`; the reusable workflow cross-compiles the binary per target, stages it into the package source tree, and maturin picks it up via `[tool.maturin].include`. Requires `build = "maturin"` and non-empty `targets`. See [README → Recipes → Rust CLI inside a PyPI wheel](./README.md#rust-cli-inside-a-pypi-wheel). No behavior change for existing packages that don't declare the block.
18
+
19
+ ### Changed
20
+
21
+ - **Public consumer surface collapsed to the README + the reusable workflow.** The CLI, the JS action (`action.yml`), and the diagnostic subcommands (`doctor`, `preflight`) are internal seams the reusable workflow invokes; consumers do not call them. The entire `docs/` directory is removed — `README.md` is the single user-facing surface. See [MIGRATIONS.md](./MIGRATIONS.md#public-surface-collapsed-to-a-reusable-workflow) for the before/after.
22
+ - **Auth is OIDC trusted publishers only.** The reusable workflow does not pass long-lived registry tokens (`NPM_TOKEN`, `PYPI_API_TOKEN`, `CARGO_REGISTRY_TOKEN`) as secrets. The engine's env-var fallback code paths still exist (in `src/auth.ts`); they're just not reachable through the reusable workflow.
23
+ - **Repository renamed `put-it-out-there` → `putitoutthere`.** GitHub auto-redirects the old slug, but consumers with the old URL pinned in `package.json`, `Cargo.toml`, `pyproject.toml`, or workflow files should update them. See [MIGRATIONS.md](./MIGRATIONS.md#repository-renamed-put-it-out-there--putitoutthere).
24
+ - **BREAKING: `[[package]].paths` renamed to `[[package]].globs`.** The `path`/`paths` pair was confusing — singular and plural differed only in a trailing `s` while meaning two unrelated things (the package working directory vs. the cascade-trigger globs). Configs declaring `paths` now fail validation. See [MIGRATIONS.md](./MIGRATIONS.md#package-paths-renamed-to-globs).
25
+
26
+ ### Deprecated
27
+
28
+ - _nothing yet_
29
+
30
+ ### Removed
31
+
32
+ - **The entire `docs/` directory** (VitePress site, all guide pages, all shape walkthroughs). README is the single user-facing surface. Engine contracts that were documented in `docs/guide/{artifact-contract,runner-prerequisites}.md` moved to `notes/internals/` — internal references the reusable workflow honors so consumers don't have to know them.
33
+ - **`.github/workflows/docs.yml` and `docs-test.yml`** — the docs site no longer exists.
34
+ - **`build_workflow:` config field.** Removed from the schema in `src/config.ts`; configs declaring it now fail validation.
35
+ - **`putitoutthere init` subcommand** and the templates it scaffolded. Source removed (`src/init.ts`, `src/templates.ts`, plus tests, plus `--force` and `--cadence` flag plumbing).
36
+ - **`migrations/` directory** moved to `notes/migrations-pre-rewrite/`. Stale plans drafted against the prior hand-written-`release.yml` model.
37
+ - **`[package.trust_policy]` config block + the OIDC trust-policy diff machinery.** Removed: `src/oidc-policy.ts`, `src/registries/crates-trust.ts`, the `trust_policy` schema field, and the matching README section. The check was opt-in defensive validation — for npm + PyPI it could only verify "the workflow file you declared exists locally" (no public read API for trust-policy config), making it a typo-catcher rather than a real drift detector. crates.io's registry cross-check was the only path with real bug-catching power and required a separate `CRATES_IO_DOCTOR_TOKEN`. Net: false security; renaming `release.yml` still produces an HTTP 400 from the registry, which is the same UX as before and what every other tool gives you.
38
+ - **`putitoutthere doctor` subcommand + `src/doctor.ts`.** Its main job was the trust-policy validation phases above. With those gone, doctor was checking workflow structural details that are already validated by the reusable workflow's own shape. Internal seam, no consumer use case.
39
+ - **`putitoutthere preflight` subcommand + `src/preflight-run.ts`.** Standalone diagnostic CLI surface. The internal `requireAuth` check that gates `publish` is preserved (`src/preflight.ts` stays).
40
+ - **`putitoutthere token` subcommand + `src/token.ts`, `src/token-scope.ts`.** The `token list` / `token inspect` operator-debugging surface was built when long-lived registry tokens were the norm. Under OIDC-only there's nothing to enumerate or scope-check at the env level. ~1,100 lines removed.
41
+ - **`putitoutthere auth login/logout/status` subcommand + `src/auth.ts`, `src/keyring.ts`.** The GitHub App device-flow login existed solely to power `token list --secrets` (which fetched secret names via the GitHub API). With `token` removed, the App + keyring + device-flow plumbing is dead weight. ~500 lines removed. The `putitoutthere-cli` GitHub App registration is no longer used.
42
+ - **`src/release.ts` (engine-side GitHub Release creation).** Duplicated by the reusable workflow's `gh release create --generate-notes` step. The engine cuts the tag and stops; the workflow owns the Release. ~129 lines removed.
43
+ - **Dead config fields**: `cadence`, `agents_path`, `smoke`, `wheels_artifact`. Defined in the schema; never read anywhere in the engine.
44
+ - **`--preflight-check` flag on `publish`.** The deep token-scope check it gated was the sole consumer of `src/token-scope.ts`. Same reason as the `token` subcommand removal: under OIDC-only there's no long-lived token to scope-check.
45
+
46
+ ### Fixed
47
+
48
+ - **Scaffolded `release.yml` now forwards `GITHUB_TOKEN` to the publish
49
+ step.** piot has cut GitHub Releases alongside tag pushes since #26, but
50
+ Actions doesn't auto-mount the runner token as an env var, so the
51
+ scaffolded workflow's publish step ran without `GITHUB_TOKEN` and
52
+ silent-skipped Release creation — leaving consumers with tags but no
53
+ Releases page entries. The publish job's `env:` block now includes
54
+ `GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}`. Existing `release.yml` files
55
+ need a one-line patch — see
56
+ [MIGRATIONS.md](./MIGRATIONS.md#scaffolded-releaseyml-now-forwards-github_token).
57
+ - **`/` in `[[package]].name` is now safe — planner encodes it for
58
+ `actions/upload-artifact@v4`** (#230). Polyglot-monorepo grouping
59
+ shapes (e.g. `name = "py/cachetta"`, `"js/cachetta"`) used to
60
+ produce `artifact_name` values containing `/`, which
61
+ `actions/upload-artifact@v4` rejects with
62
+ `The artifact name is not valid: ... Contains the following character: Forward slash /`,
63
+ failing the build job before piot ever ran. The planner now encodes
64
+ each `/` to `__` in `artifact_name` (so `py/cachetta` →
65
+ `py__cachetta-sdist`) and config validation reserves `__` in
66
+ `pkg.name` so the round-trip stays unambiguous. Other
67
+ upload-artifact-forbidden characters (`\`, `:`, `<`, `>`, `|`,
68
+ `*`, `?`, `"`) are now rejected at config load. Read sites
69
+ (`publish`, `doctor`, `preflight`, `completeness`) consume
70
+ `artifact_name` verbatim and need no changes; consumers running
71
+ the `cachetta#26` encode/decode workaround should remove it once
72
+ they upgrade. See [MIGRATIONS.md](./MIGRATIONS.md#package-names-with--no-longer-need-an-encode-decode-workaround) and
73
+ [Artifact contract → notes](./notes/internals/artifact-contract.md#naming-convention-reference).
74
+ - **Documentation accuracy pass** (#231). A docs-vs-code audit caught
75
+ several places where reference material lagged behind shipped behavior.
76
+ No code paths changed beyond a stale help-text line; existing configs
77
+ and workflows are unaffected.
78
+ - `putitoutthere --help` text for `--json` no longer claims "(plan
79
+ only)" — the flag has worked across every command that emits a
80
+ result since their respective additions. `docs/api/cli.md` now lists
81
+ the supported commands explicitly.
82
+ - `docs/api/cli.md` documents short flags (`-h`, `-v`, `--version`)
83
+ and exit codes (`0` / `1` / `4`).
84
+ - `docs/api/action.md` documents the `outputs.matrix` contract
85
+ (output key omitted when empty, not "empty string"), the matrix-row
86
+ field schema, and the GitHub Release body shape.
87
+ - `action.yml`'s `command` description and `docs/api/action.md`
88
+ clarify that the action shells through to any putitoutthere CLI
89
+ subcommand, not just `plan` / `publish` / `doctor`.
90
+ - `docs/guide/configuration.md` adds the previously-shape-only `pypi`
91
+ field to the central `kind = "pypi"` table.
92
+ - `docs/guide/trailer.md` documents the package-name character
93
+ grammar, leading-whitespace tolerance, and last-wins semantics.
94
+ - `README.md`'s scaffolding description now correctly mentions both
95
+ workflow files written by `putitoutthere init`.
96
+ - **Publish path works end-to-end for slash-containing `pkg.name`** (#237).
97
+ Two follow-up bugs that #230 didn't catch: (1) `pypi.ts.collectArtifacts`
98
+ and `npm-platform.ts.synthesizePlatformPackage` both built directory
99
+ lookups from raw `pkg.name`, so a package called `py/foo` couldn't
100
+ match the encoded on-disk directory `py__foo-sdist/` and the publish
101
+ step reported `pypi: no artifacts found for py/foo under <root>`.
102
+ (2) The planner emitted glob `artifact_path` values
103
+ (`${pkg.path}/dist/*.tar.gz`, `${pkg.path}/dist/*.whl`,
104
+ `${pkg.path}/target/package/*.crate`), which `actions/upload-artifact@v4`
105
+ treats differently from a directory `path:` — it preserves the
106
+ workspace-relative path, so the file lands at
107
+ `<name>/packages/python/dist/foo.tar.gz` instead of `<name>/foo.tar.gz`.
108
+ Both bugs fixed: handlers now encode `pkg.name` via
109
+ `sanitizeArtifactName` and walk the artifact directory recursively
110
+ for the expected file extensions; planner emits directory-shaped
111
+ `artifact_path` values for the three slots that previously used a
112
+ glob. Consumers using `${{ matrix.artifact_path }}` verbatim see no
113
+ required workflow changes; consumers who hand-coded a glob path
114
+ should switch to the directory shape — see
115
+ [MIGRATIONS.md](./MIGRATIONS.md#publish-path-works-end-to-end-for-slash-containing-pkgname).