Skip to content

chore(release): v0.1.0-preview.0 (published to npm)#13

Merged
renasami merged 2 commits intomainfrom
release/0.1.0-preview.0
Apr 18, 2026
Merged

chore(release): v0.1.0-preview.0 (published to npm)#13
renasami merged 2 commits intomainfrom
release/0.1.0-preview.0

Conversation

@renasami
Copy link
Copy Markdown
Owner

@renasami renasami commented Apr 18, 2026

Summary

Prepares the repo state that produced tegata@0.1.0-preview.0 on npm. Already published — this PR just records the release prep in git.

What changed

  • package.json:
    • version: 0.1.0-preview.0
    • files: ["dist", "README.md", "LICENSE"] (previously unset — examples/, docs/, CLAUDE.md would have shipped)
    • repository / homepage / bugs / keywords / author for the npmjs.com landing page
    • publishConfig: access: "public", tag: "preview"
    • prepublishOnly: typecheck && test && build
    • author: Ren Asami <60680416+renasami@users.noreply.github.com>
  • tsconfig.build.json (new): extends root tsconfig but excludes **/*.test.ts, so test files are not shipped in the published tarball. pnpm run build now points to this.
  • README: adds a Status: Preview banner calling out the unfrozen API + the npm install tegata@preview command.

Validation

  • pnpm run typecheck / pnpm run test (90 tests) / pnpm run lint — all pass
  • Smoke tested via npm pack → install in scratch project — both tegata and tegata/mcp subpaths resolve, propose() returns a decision, TegataServer constructs cleanly
  • Tarball contents: 39 files, 25.7 kB packed, 89.5 kB unpacked, no test files / docs / examples

Follow-ups (not in this PR)

  • Decide whether to remove the auto-created latest dist-tag so only tegata@preview resolves
  • Dogfood by wrapping the Kanbi MCP server with TegataServer

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Added preview status notice outlining current capabilities, API stability expectations, and upcoming features
    • Updated installation instructions to use the preview release
  • Chores

    • Released as v0.1.0-preview.0
    • Updated publishing configuration and package metadata, including access and tag for preview
    • Improved build/publish workflow with stricter publish checks and a focused build configuration
    • Restricted published files to the intended distribution artifacts

Package metadata:
- bump version to 0.1.0-preview.0
- add files whitelist (dist, README, LICENSE) so internal paths,
  examples, and docs stay out of the tarball
- add repository / homepage / bugs / keywords / author for
  a non-embarrassing npmjs.com landing page
- add publishConfig with access: public and tag: preview so the
  preview release does not claim @latest
- add prepublishOnly hook that runs typecheck + tests + build
- split build into tsconfig.build.json that excludes *.test.ts
  so test files do not ship in the tarball

README:
- add a Status: Preview banner calling out the unfrozen API and
  the install command (`npm install tegata@preview`)

Verified via `npm pack` + install in a scratch project: both
the root export and the `tegata/mcp` subpath resolve, `propose()`
returns a decision, and `TegataServer` constructs cleanly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 18, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

The PR marks the project as a preview release, updates package metadata and publish settings, changes the build script to use a new TypeScript build config, and adds tsconfig.build.json; README install instructions were updated to the preview tag. (48 words)

Changes

Cohort / File(s) Summary
Documentation
README.md
Added a "Status: Preview (v0.1.0-preview)" callout, clarified core runtime/policy/MCP status, noted API is not frozen until v0.1.0 GA, mentioned extra policies are specified but not implemented, and updated install instruction to npm install tegata@preview.
Package manifest & publish
package.json
Version changed to 0.1.0-preview.0; build script now removes dist then runs tsc -p tsconfig.build.json; added files whitelist, keywords, author, repository, homepage, bugs; added prepublishOnly script and publishConfig with access: public and tag: preview; removed duplicate license field.
Build configuration
tsconfig.build.json
New file that extends tsconfig.json, disables sourceMap and declarationMap, and excludes node_modules, dist, and **/*.test.ts to constrain the production build inputs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 wiggles nose
A preview hop, a tidy build,
Metadata sown in fields well-tilled,
Dist cleared, tsconfig set to go,
We nibble bugs and let features grow.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore(release): v0.1.0-preview.0 (published to npm)' clearly and specifically describes the main change—a release/version bump and npm publication. It is concise, follows conventional commit conventions, and directly relates to all major file modifications (package.json version, README status callout, and new build configuration).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release/0.1.0-preview.0

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request prepares the project for its initial preview release by updating the versioning to v0.1.0-preview.0, adding comprehensive package metadata to package.json, and refining the build and publication scripts. A new tsconfig.build.json has been introduced to handle production builds. Feedback focuses on improving the reliability of the release process by cleaning the build directory before compilation, ensuring linting is part of the pre-publish hook, and disabling source maps in the production build to prevent broken references for package consumers.

Comment thread package.json Outdated
},
"scripts": {
"build": "tsc",
"build": "tsc -p tsconfig.build.json",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The build script does not clean the dist directory before compiling. This can lead to stale or "ghost" files (from previous builds or deleted source files) being included in the published package. It is recommended to add a clean step to ensure a fresh build for every release.

Suggested change
"build": "tsc -p tsconfig.build.json",
"build": "rm -rf dist && tsc -p tsconfig.build.json",

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7a8d343. build now runs rm -rf dist && tsc -p tsconfig.build.json. Noted that 0.1.0-preview.0 on npm is immutable, so this first takes effect on the next preview publish.

Comment thread package.json Outdated
"lint": "prettier --check . && eslint .",
"format": "prettier --write ."
"format": "prettier --write .",
"prepublishOnly": "pnpm run typecheck && pnpm run test && pnpm run build"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

It is recommended to include the lint script in the prepublishOnly hook. This ensures that only code adhering to the project's style and quality rules is published to npm, preventing accidental releases of unformatted or lint-violating code.

Suggested change
"prepublishOnly": "pnpm run typecheck && pnpm run test && pnpm run build"
"prepublishOnly": "pnpm run lint && pnpm run typecheck && pnpm run test && pnpm run build"

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7a8d343. prepublishOnly now runs lint && typecheck && test && build.

Comment thread tsconfig.build.json
Comment on lines +1 to +4
{
"extends": "./tsconfig.json",
"exclude": ["node_modules", "dist", "**/*.test.ts"]
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The production build inherits sourceMap: true and declarationMap: true from the base tsconfig.json, but the src directory is excluded from the npm package (via package.json#files). This results in broken source maps for consumers, as the mapped .ts files will be missing in the installed package. You should either disable maps in this build configuration or include the src directory in the package.

Suggested change
{
"extends": "./tsconfig.json",
"exclude": ["node_modules", "dist", "**/*.test.ts"]
}
{
"extends": "./tsconfig.json",
"compilerOptions": {
"sourceMap": false,
"declarationMap": false
},
"exclude": ["node_modules", "dist", "**/*.test.ts"]
}

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — fixed in 7a8d343. tsconfig.build.json now sets sourceMap: false and declarationMap: false. Adding src/ to the package was the other option, but shipping only compiled output keeps the tarball small and matches what most SDK consumers expect. Tarball went from 39 files / 25.7 kB to 21 files / ~14 kB as a side effect.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@README.md`:
- Line 5: Update the preview banner version to the exact prerelease string used
by the package: replace "v0.1.0-preview" with "0.1.0-preview.0" (and update the
install instruction `npm install tegata@preview` to `npm install
tegata@0.1.0-preview.0` if you want the exact pinned install) so the README's
status line and install example match the package's actual prerelease version.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: df4cc304-2db1-4fce-acd4-2fa1e22d36f5

📥 Commits

Reviewing files that changed from the base of the PR and between 1e44b0f and dc3b093.

📒 Files selected for processing (3)
  • README.md
  • package.json
  • tsconfig.build.json

Comment thread README.md

**Enforceable authorization for MCP tool calls.**

> **Status: Preview (v0.1.0-preview).** Core runtime, policy engine, and MCP tool call intercept are working and tested. The API is **not frozen** until the v0.1.0 GA release — breaking changes may ship in subsequent preview versions. Trust Score and Consensus policies beyond `single`/`majority` are specified but not yet implemented. Install with `npm install tegata@preview`.
Copy link
Copy Markdown

@coderabbitai coderabbitai bot Apr 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Use the exact prerelease version string in the preview banner.

Line [5] says v0.1.0-preview, while the package version is 0.1.0-preview.0. Matching the exact version avoids ambiguity.

✏️ Suggested doc fix
-> **Status: Preview (v0.1.0-preview).** Core runtime, policy engine, and MCP tool call intercept are working and tested. The API is **not frozen** until the v0.1.0 GA release — breaking changes may ship in subsequent preview versions. Trust Score and Consensus policies beyond `single`/`majority` are specified but not yet implemented. Install with `npm install tegata@preview`.
+> **Status: Preview (v0.1.0-preview.0).** Core runtime, policy engine, and MCP tool call intercept are working and tested. The API is **not frozen** until the v0.1.0 GA release — breaking changes may ship in subsequent preview versions. Trust Score and Consensus policies beyond `single`/`majority` are specified but not yet implemented. Install with `npm install tegata@preview`.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
> **Status: Preview (v0.1.0-preview).** Core runtime, policy engine, and MCP tool call intercept are working and tested. The API is **not frozen** until the v0.1.0 GA release — breaking changes may ship in subsequent preview versions. Trust Score and Consensus policies beyond `single`/`majority` are specified but not yet implemented. Install with `npm install tegata@preview`.
> **Status: Preview (v0.1.0-preview.0).** Core runtime, policy engine, and MCP tool call intercept are working and tested. The API is **not frozen** until the v0.1.0 GA release — breaking changes may ship in subsequent preview versions. Trust Score and Consensus policies beyond `single`/`majority` are specified but not yet implemented. Install with `npm install tegata@preview`.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 5, Update the preview banner version to the exact
prerelease string used by the package: replace "v0.1.0-preview" with
"0.1.0-preview.0" (and update the install instruction `npm install
tegata@preview` to `npm install tegata@0.1.0-preview.0` if you want the exact
pinned install) so the README's status line and install example match the
package's actual prerelease version.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentionally keeping v0.1.0-preview (series-level) rather than 0.1.0-preview.0 (pinned) in the banner. The banner is meant to describe the preview line as a whole — preview.1, preview.2, etc. will all ship under the same README text, and I do not want to bump the README every time I cut a prerelease. The exact version is one npm-view away for anyone who wants it, and the install command (npm install tegata@preview) already resolves to whatever the current preview head is. Not applying this one.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@renasami, understood — using the series-level label v0.1.0-preview intentionally so the banner stays stable across all preview increments is a sensible doc strategy. The npm install tegata@preview tag already handles version resolution dynamically. I'll drop this suggestion.


✏️ Learnings added
Learnt from: renasami
Repo: renasami/tegata PR: 13
File: README.md:5-5
Timestamp: 2026-04-18T18:48:09.954Z
Learning: In `README.md` (Tegata project), the preview banner intentionally uses the series-level string `v0.1.0-preview` rather than a pinned prerelease like `0.1.0-preview.0`. This is by design so the README does not need to be updated for each prerelease cut (preview.0, preview.1, etc.). The `npm install tegatapreview` dist-tag resolves to the current preview head dynamically.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: CR
Repo: renasami/tegata PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-14T16:49:36.018Z
Learning: Tegata v0.1 scope is Agent→Tool authorization (MCP tool call intercept) ONLY — do NOT implement Agent↔Agent features (planned for v0.3)

Learnt from: renasami
Repo: renasami/tegata PR: 10
File: src/bindings/mcp/tegata-server.ts:190-195
Timestamp: 2026-04-16T17:34:39.259Z
Learning: In `src/bindings/mcp/tegata-server.ts` (Tegata project, TypeScript), the cast of `toolConfig as ToolConfig<undefined>` and `wrappedHandler as ToolCallback` when calling `this.mcp.registerTool(...)` is intentional and correct at the MCP SDK boundary. TypeScript generics are erased at runtime; the MCP SDK validates using the actual `inputSchema` value, not the generic type parameter. The cast is necessary to satisfy TypeScript's type checker at the boundary and does not affect runtime behavior.

Learnt from: renasami
Repo: renasami/tegata PR: 7
File: src/core/runtime.ts:186-236
Timestamp: 2026-04-14T17:34:05.295Z
Learning: In `src/core/runtime.ts` (Tegata runtime, TypeScript), unregistered proposers intentionally bypass the agent capability and `maxApprovableRisk` checks in `propose()`. This is by design to honour the zero-config guarantee (`new Tegata()` + unregistered proposer must work). The test "unregistered proposer skips capability check (zero-config)" explicitly validates this behaviour. An opt-in `requireRegisteredProposer` control is planned for v0.2.

- build: prefix `rm -rf dist` so tsc does not leave stale files from
  previous compilations in the tarball.
- prepublishOnly: run `lint` before typecheck/test/build so prettier
  and eslint violations cannot slip into a published release.
- tsconfig.build: disable `sourceMap` and `declarationMap`. The
  package does not ship `src/`, so source maps were pointing at
  `.ts` files that do not exist in the consumer's node_modules —
  that is broken maps, not helpful ones. Shrinks the tarball from
  39 files (25.7 kB) to 21 files (~14 kB) as a side effect.

Will be reflected in the next preview publish; 0.1.0-preview.0 is
immutable on npm.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@renasami
Copy link
Copy Markdown
Owner Author

Review response (7a8d343)

# Reviewer Finding Action
1 Gemini build leaves stale dist files Fixedrm -rf dist && prefix
2 Gemini prepublishOnly should run lint Fixed — lint added to the chain
3 Gemini Source maps reference .ts files absent from the package FixedsourceMap: false, declarationMap: false in tsconfig.build.json. Tarball shrinks from 39 files to 21 (25.7 kB → ~14 kB)
4 CodeRabbit README banner should say 0.1.0-preview.0 instead of v0.1.0-preview Rejected — series-level is intentional, avoids churning the banner on every prerelease bump

Important caveat: 0.1.0-preview.0 is already on npm and is immutable. These fixes take effect in the next preview publish (0.1.0-preview.1 or later). Source maps in the currently-published tarball are broken, but that only affects consumers who opt into sourceMap lookups against node_modules/tegata.

@renasami renasami merged commit 38b0c60 into main Apr 18, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant