You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/capabilities/CAP-013-typescript-bot-api-npm-publish/README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,8 @@ provenance: inferred
9
9
10
10
# CAP-013 — TypeScript Bot API npm publishing
11
11
12
-
(No purpose statement was recorded in the source spec.)
12
+
Publish the TypeScript Bot API package (`@robocode.dev/tank-royale-bot-api`) to the npm registry through Gradle, so every official Bot API is installable through its platform's native channel (Java via Maven Central, Python via PyPI, TypeScript via npm).
13
13
14
-
Extracted from `openspec/specs/typescript-bot-api-npm-publish/spec.md` at CH-001; the source spec's requirement prose is preserved as comments in [criteria.md](criteria.md).
14
+
Implemented: the `npmPack` and `npmPublish` Gradle tasks live in `bot-api/typescript/build.gradle.kts`, the `/release` skill drives `npmPublish`, and the package is live on npm. Criteria stay `draft` until their tests are wired (P-001/M-002).
15
+
16
+
Extracted from `openspec/specs/typescript-bot-api-npm-publish/spec.md` at CH-001 and reconciled to the shipped implementation at CH-002; the source spec's original requirement prose is preserved as comments in [criteria.md](criteria.md).
Copy file name to clipboardExpand all lines: docs/capabilities/CAP-013-typescript-bot-api-npm-publish/design.md
+19-6Lines changed: 19 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,12 +9,25 @@ provenance: inferred
9
9
10
10
# CAP-013 design
11
11
12
-
Carried over from the in-flight OpenSpec change `add-typescript-bot-api-npm-publish`at CH-001 (tracked as [P-002](../../plans/P-002-typescript-bot-api-npm.md), door M-004).
12
+
Originated as the in-flight OpenSpec change `add-typescript-bot-api-npm-publish`, carried into the corpus at CH-001 (tracked as [P-002](../../plans/P-002-typescript-bot-api-npm.md), door M-004) and reconciled to the shipped implementation at CH-002.
13
13
14
-
The TypeScript Bot API package (`@robocode.dev/tank-royale-bot-api`) builds but cannot be published to the npm registry through Gradle, while Java (Maven Central) and Python (PyPI) both publish via Gradle tasks. The intended shape:
14
+
The TypeScript Bot API package (`@robocode.dev/tank-royale-bot-api`) builds but originally could not be published to the npm registry through Gradle, while Java (Maven Central) and Python (PyPI) both publish via Gradle tasks. As shipped in `bot-api/typescript/build.gradle.kts`:
15
15
16
-
-`npmPack` task in `bot-api/typescript/build.gradle.kts` (also needed by sample-bot startup work)
17
-
-`npmPublishDryRun` task — `npm publish --dry-run` validates the package without uploading
18
-
-`npmPublish` task — publishes to npm; requires the `NPM_TOKEN` environment variable
16
+
-`npmPack` task — runs `npm pack` to produce a local `.tgz` tarball for verification and local use. This also covers pre-publish inspection: it shows exactly what would be published without uploading, so a separate `npm publish --dry-run` task was deemed redundant and not built.
17
+
-`npmPublish` task — publishes to npm with `--access public`; requires the `npmjs-api-key` Gradle property (looked up from the user or project `gradle.properties`), consistent with the Sonatype/PyPI credential pattern and the `/release` skill. It writes a temporary `.npmrc` with the token and deletes it afterwards.
19
18
20
-
Impact beyond the build script: `.gitignore` must exclude `.npmrc` (a temporary credential file is written and deleted during publish).
19
+
Impact beyond the build script: `.gitignore` excludes `/bot-api/typescript/.npmrc` (the temporary credential file written and deleted during publish).
20
+
21
+
## Credential setup
22
+
23
+
`npmPublish` reads the npm token from the `npmjs-api-key` Gradle property. Keep it out of the repo by putting it in your **user** Gradle properties file, never the project one:
The token must have publish rights to the `@robocode.dev` scope. If it is missing, `npmPublish` fails with `npmjs-api-key is not set in gradle.properties` (criterion TNP-005). This mirrors the other publish credentials, which live in the same file: `ossrhUsername` / `ossrhPassword` (Maven Central), `nuget-api-key` (NuGet), `pypiToken` (PyPI) — see the `/release` skill for the full set.
Copy file name to clipboardExpand all lines: docs/decisions/log.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,8 @@ Decisions that are cheap and local to reverse, one row each — newest first. Th
12
12
13
13
| Date | Decision | Why | Change/PR |
14
14
|---|---|---|---|
15
+
| 2026-07-19 | Drop the never-built `npmPublishDryRun` task from CAP-013 (retire TNP-001) instead of building it |`npmPack` already produces the `.tgz` and shows what would be published without uploading, so a dry-run task is redundant | CH-002 |
16
+
| 2026-07-19 | TypeScript npm publishing authenticates via the `npmjs-api-key` Gradle property, not an `NPM_TOKEN` env var (retire TNP-002/003, remint TNP-005/006) | Reconciles the corpus to the shipped code and matches the Sonatype/PyPI credential pattern and the `/release` skill | CH-002 |
15
17
| 2026-07-19 | Extracted criteria are born `status: draft`; a capability's criteria go `active` when its tests carry purpose tags | Draft criteria are exempt from the AC↔test wall, which turns the four-language tagging backlog (P-001/M-002) into per-capability increments instead of one blocking big bang | CH-001 |
16
18
| 2026-07-19 | Pre-Cliewen ADRs keep ids ADR-0001…ADR-0041 and become `verified` with `accepted-by: … (date, pre-Cliewen MADR acceptance)`| The MADR acceptance already happened and is preserved as fact, not re-judged; renumbering 41 cross-referenced records would break links for no gain | CH-001 |
17
19
| 2026-07-19 |`INDEX.md` files and `docs/decisions/template.md` deleted; README `clue:index` blocks are the only indexes | Two indexes drift; the validate-checked index block is the enforced one | CH-001 |
Copy file name to clipboardExpand all lines: docs/plans/P-002-typescript-bot-api-npm.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
id: P-002
3
3
type: plan
4
-
status: active
4
+
status: completed
5
5
links: [G-001]
6
6
title: TypeScript Bot API reaches npm
7
7
provenance: inferred
@@ -15,4 +15,4 @@ Carried over from the pending OpenSpec change `add-typescript-bot-api-npm-publis
15
15
16
16
| ID | Milestone | Exit criterion | Status | Evidence |
17
17
|---|---|---|---|---|
18
-
| M-004 | npm publishing via Gradle |`npmPack`, `npmPublishDryRun`,`npmPublish` Gradle tasks exist and a dry-run publish of the package succeeds from a clean checkout; CAP-014 flips to `active` with its ACs tested | todo ||
18
+
| M-004 | npm publishing via Gradle |`npmPack` and`npmPublish` Gradle tasks exist in `bot-api/typescript/build.gradle.kts` and the package publishes to npm via the `/release` skill | done | Commits `b1654f620` / `287ff01ac` / `51c30e21b`; `@robocode.dev/tank-royale-bot-api@1.0.2` live on npm; CAP-013|
0 commit comments