Fix publication blockers for v0.1.0 release candidate#1
Open
darko-mijic wants to merge 44 commits into
Open
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
- Expand HookEventName to 30 events with Setup and MessageDisplay - Add Setup/MessageDisplay input/output types and Zod schemas - Update SessionStart input/output parity (optional model, session_title, initialUserMessage, sessionTitle, watchPaths, reloadSkills) - Expand Notification and StopFailure enums - Add common effort/terminalSequence fields and duration_ms on PostToolUse/PostToolUseFailure - Widen PostToolUseOutput.updatedMCPToolOutput to unknown and add updatedToolOutput - Normalize optional SessionStart.model in lifecycle handler - Update schema completeness test count to 30
…d schema exports Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…for new hook surface Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…ionStart, updatedToolOutput, and command args
… fields, and builder methods Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…pdate implementation context
- Remove obvious comments, dead code, and over-defensive guards across source, tests, and docs - Delete ephemeral planning artifacts (.omo/, prometheus-implementation-context.md) - Add Public Repository Hygiene guardrail to AGENTS.md - Tighten docs wording while preserving commands, examples, and API facts - Lock behavior with regression tests for Setup/MessageDisplay expansion - All quality gates green: 1201 tests, type-check, lint, build
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…tils Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…ments Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…comments Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…ler words - Expand API-contract JSDoc for toError, isRecord, isProtectedFile, validateRequiredFields, validateFilePath, and sanitizeCommand - Remove remaining banned filler words (incremental, automatically, supports, TODO comments) from source comments - Mark final verification wave approved in comment-consistency plan - All quality gates pass: pnpm run check, pnpm run test:run (1201 tests), pnpm run build
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
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.
Summary
This PR resolves the remaining pre-publication blockers for
@libar-dev/agent-harness-kitv0.1.0 release candidate. It fixes stale documentation links and wording, normalizes npm package metadata, moves build-time tooling out of production dependencies, hardens image-content-block handling with a shared helper and regression tests, and replaces the fragile upstream-doc mirror workflow with direct markdown sync fromcode.claude.com.It also removes the ephemeral planning context file that was added during the API parity pass; planning artifacts should not be committed to the public repo.
Detailed Changes
Documentation Fixes
docs/README.md.[0.1.0]release notes with### Added(image content block support) and additional### Changedentries (bin paths, repository URL,publishConfig.access).[1.0.0]release link pointing to the oldclaude-code-hooksrepo.Package Metadata Normalization
tsxfromdependenciestodevDependencies(it is only used for local script execution; published CLIs use#!/usr/bin/env nodeshebangs).pnpm-lock.yamlimporter metadata to match thetsxmove."sideEffects": falsefor improved tree-shaking by consumers.binpaths without./,repository.urlwithgit+prefix.Image Content Block Hardening
imagePlaceholderlogic intosrc/processing/image-placeholder.ts.isRecordfromsrc/utils/index.jsand explicitly rejects arrays, returning the generic[Image]placeholder.src/processing/denoiser.tsandsrc/processing/block-decomposition.tsto import the shared helper.null, or primitives for bothdenoiseSessionandextractBlockspaths.media_typemetadata is used in placeholders.Upstream Docs Sync Automation
scripts/sync-upstream-docs.mjsandpnpm run docs:sync-upstreamto fetch canonical markdown directly fromhttps://code.claude.com/docs/en/*.md.docs/upstream/README.mdto document the new source of truth and the refresh command..mdendpoints.headless.mdduplicated CLI content andhooks-reference.mdcontained mixed page sections).Code Cleanup + Slop Removal
.omo/work-tracking directory anddocs/internal/prometheus-implementation-context.md.## Public Repository Hygieneguardrail toAGENTS.mdso future agents know ephemeral planning artifacts must not be merged.Setup/MessageDisplayand the expanded output builder methods.Why This Is Needed
CONTRIBUTING.mdpointed to a non-existent file.sideEffects: false: Consumers cannot safely tree-shake the package without this explicit marker.tsxin production dependencies: Adds unnecessary install weight and implies runtime dependency on a TypeScript executor that is not used by published artifacts.denoiser.tsaccepted arrays;block-decomposition.tsrejected them). The shared helper normalizes behavior and adds regression coverage for malformed image sources.docs/upstream/, which made API-gap assessment noisy and easy to get wrong..omo/directory were useful during implementation but must not be shipped in a public release.Comment Consistency Cleanup
After the initial cleanup pass, a plan was created to fix the inconsistent comment state it left behind. This branch now includes the final wave of that cleanup.
What changed
src/utils/index.tsfor exported helpers:toError— normalize an unknown value to anError.isRecord— type guard for non-null object records.isProtectedFile— pattern-based protection check, with a security note that it is not a filesystem access-control boundary.validateRequiredFields— required-field presence check, now with@returns void.validateFilePath— path-traversal guard, now with@returns void.sanitizeCommand— shell-metacharacter stripping, with an explicit note that it is not a full shell-injection sanitizer.src/processing/tail.ts— "incremental" → "appended-block"; "automatically advanced" → "advances".src/processing/types.ts— "incremental ingestion" → "ingestion of growing session files".src/processing/discovery.ts— "supports filtering" → "filters".src/lifecycle/stop-handler.ts— "TODO comments" → "TODO markers".src/pre-tool-use/eslint-disable-blocker.ts— removed two "automatically" filler instances.Verification
src/andtests/returns only documented opt-outs:src/cli/export-sessions.ts:219— runtime CLI message string"incremental export".src/processing/ordering.ts:7— false-positive substring"re-exported from".tests/tail.test.ts:1074,1390— executableit()description strings containing"incremental".Testing Performed
pnpm run type-check— passes cleanly.pnpm run lint— passes.pnpm run lint:ci— passes.pnpm run test:run— 1201 tests passing, 0 failures.pnpm run build— produces correctdist/structure.npm publish --dry-run --access public— passes.npm pack— produces clean tarball with required docs,dist/, andpackage.json; nosrc/,.DS_Store, or.omo/leaks.pnpm run docs:sync-upstream— refreshes all mirrored upstream docs from canonical.mdendpoints.pnpm run docs:sync-upstream -- settings— targeted sync works for a single mirrored page.pnpm run test:run -- tests/docs-round-trip.test.ts— passes with the refreshed mirrors.Verification Checklist
CONTRIBUTING.mdarchitecture link points to existingdocs/README.mdCHANGELOG.md[0.1.0]section has expandedAdded/Changedrelease notesCHANGELOG.mdno longer contains stale old-repo release linkSECURITY.mduses grammatically correct "release candidate" wordingpackage.jsoncontains"sideEffects": falsetsxmoved todevDependencies; lockfile regeneratedpnpm install --frozen-lockfilesucceedsimage-placeholder.tshelper exists and is used by both processing callersnpm publish --dry-runpassesnpm packcontents verified cleanpnpm run docs:sync-upstreamrefreshes upstream mirrors fromcode.claude.commarkdown endpointsdocs/upstream/headless.mdis no longer a duplicate of CLI reference contentdocs/upstream/hooks-reference.mdis a clean hooks-reference mirror againtests/docs-round-trip.test.tsnow uses content-based skip classification instead of brittle block indices.omo/,docs/internal/prometheus-implementation-context.md)AGENTS.mdincludes Public Repository Hygiene guardrailsrc/utils/index.tsBreaking Changes
None. All changes are additive, metadata normalization, automation, or internal refactoring.
Claude Code Hook API Parity
This branch also closes the gap between the library and the current upstream Claude Code hook API surface (source of truth:
docs/upstream/hooks-reference.md).Added hook events
Setup— modeled as a full hook event withSetupInput/SetupOutput, Zod schemas, type guards, validators,HookOutputBuilder.setupContext(), and a reference lifecycle handler (src/lifecycle/setup.ts).MessageDisplay— modeled withMessageDisplayInput/MessageDisplayOutput, UUID-aware schemas, type guards, validators,HookOutputBuilder.messageDisplayContent(), and a reference lifecycle handler (src/lifecycle/message-display.ts).Expanded existing events
SessionStart:modelis now optional; addedsession_title.hookSpecificOutputnow supportsadditionalContext,initialUserMessage,sessionTitle,watchPaths, andreloadSkills.Notification: enum widened to all 6 upstream notification types.StopFailure: enum widened to all 10 upstream stop-failure reasons.PostToolUse/PostToolUseFailure: added optionalduration_msto both inputs.PostToolUseoutput: addedupdatedToolOutputand widenedupdatedMCPToolOutputtounknown.effortonBaseHookInput,terminalSequenceonBaseHookOutput.CommandHookHandler: added optionalargs?: string[]for the exec-form command surface.Reference handlers and tooling
pnpm run hook:test:setupandpnpm run hook:test:message-displayscripts.SetupandMessageDisplayhandlers.src/lifecycle/session-start.tsto tolerate a missingmodelandsrc/lifecycle/notification-handler.tsto classify new notification types.Docs and metadata
createSetupInputandcreateMessageDisplayInputintests/test-utils.ts.Verification
pnpm run test:run— 1201 tests passing, 0 failures.pnpm run check— type-check + lint pass.pnpm run hook:test:setup— exits 0.pnpm run hook:test:message-display— exits 0.CLAUDE_PROJECT_DIR=/Users/darkomijic/dev-projects/claude-code-hooks pnpm run hook:test:session— exits 0..passthrough(), no newany,package.jsonversion unchanged,docs/upstream/untouched, no public exports removed.