Skip to content

feat(2.0)!: split voice into @open-gitagent/voice, drop unused deps#56

Merged
shreyas-lyzr merged 1 commit into
mainfrom
chore/slim-package-split-voice
Jun 6, 2026
Merged

feat(2.0)!: split voice into @open-gitagent/voice, drop unused deps#56
shreyas-lyzr merged 1 commit into
mainfrom
chore/slim-package-split-voice

Conversation

@shreyas-lyzr

Copy link
Copy Markdown
Contributor

A hosted dev sandbox blocks every published version of @open-gitagent/gitagent (1.5.0–1.5.2 and the predecessor gitclaw 0.5.0–1.4.1) with HTTP 403 on the tarball fetch — the supply-chain scanner between sandbox and registry refuses the bundle. Metadata for the ~710-package dep tree resolves fine; only the .tgz is refused. The trigger is inside the published contents.

Audit surfaced two pure wins regardless of the scanner, plus the user-requested directive:

  1. baileys is declared in dependencies but never imported from source — dead weight pulling in ~100 transitive packages.
  2. dist/voice/ui.html (~3,860 LOC of mixed HTML/JS/CSS, ~200 kB) ships in every tarball — exactly the shape supply-chain scanners flag.
  3. The user wants the personal voice agent opt-in, not bundled by default.

These three point to one fix: split the package so voice is a separate optional install, drop the dead deps, and shrink the surface scanners see.

What changed in core (this PR)

  • 1.5.22.0.0 (semver-major: gitagent --voice no longer works on a fresh core-only install).
  • Drop deps: baileys (unused), ws (voice-only), @googleworkspace/cli (unused), @types/ws from devDeps.
  • Tighten files allowlist to exclude dist/voice/ and dist/composio/.
  • Move shared types/utilities out of src/voice/ so non-voice modules can still use them:
    • src/voice/adapter.tssrc/adapter.ts (pure types + DEFAULT_VOICE_INSTRUCTIONS)
    • src/voice/chat-history.tssrc/chat-history.ts (persistence; used by context.ts for recent-chat context)
  • Delete src/voice/* and src/composio/* (all voice-only).
  • Re-export from src/exports.ts the symbols @open-gitagent/voice needs as a peer: context helpers, skills, workflows, schedules, schedule-runner, chat history, adapter types.
  • --voice in src/index.ts now await import("@open-gitagent/voice") dynamically and prints a clear install hint if missing.

install.sh + docs

  • install.sh installs both packages by default (curl-bash UX unchanged). GITAGENT_SLIM=1 opts into a core-only install for sandboxed/CI environments.
  • README adds a Migrating from 1.x → 2.0 section explaining the split and the two-line migration. Documentation.md install snippet updated.

Results

1.5.2 2.0.0
Tarball packed 179.5 kB 85.7 kB (−52%)
Tarball unpacked 752 kB 343 kB (−54%)
Files 124 109
Resolved node_modules 310 211
dist/voice/* entries many 0
dist/composio/* entries yes 0

tsc clean. npm test — 27/27 pass.

Follow-up

The matching @open-gitagent/voice@1.0.0 package ships from a separate repo (next PR / new repo). Once it's published, npm install -g @open-gitagent/voice adds voice back. The --voice install hint in core points users straight there.

🤖 Generated with Claude Code

A hosted dev sandbox blocks every published version (1.5.0–1.5.2 and the
predecessor gitclaw 0.5.0–1.4.1) with HTTP 403 on the tarball fetch. The
trigger is inside the bundle, not the dep tree. Two contributors plus a
user directive to make voice opt-in point to one fix: split the package
so voice is a separate optional install, drop unused deps, and shrink
the surface scanners actually see.

What's in the core (this commit):
- Bump 1.5.2 -> 2.0.0 (semver-major because gitagent --voice no longer
  works on a fresh install of just core)
- Drop baileys (declared but never imported), ws (voice-only),
  @googleworkspace/cli (unused) from dependencies. Drop @types/ws too.
- Tighten the 'files' allowlist to exclude dist/voice/ and dist/composio/
- Move shared types/utilities from src/voice/ into the core surface:
    src/voice/adapter.ts       -> src/adapter.ts
    src/voice/chat-history.ts  -> src/chat-history.ts
- Remove src/voice/* and src/composio/* (all voice-only).
- Re-export the symbols the voice package needs (context, skills,
  workflows, schedules, schedule-runner, chat history, adapter types,
  DEFAULT_VOICE_INSTRUCTIONS) from src/exports.ts.
- --voice in src/index.ts now dynamic-imports @open-gitagent/voice and
  prints an install hint if missing.

install.sh defaults to installing both packages (curl-bash UX is
unchanged); GITAGENT_SLIM=1 opts into a core-only install for sandboxed
or CI environments.

README + Documentation updated with the migration note and the new
two-line install.

Results:
- Tarball 179.5 kB -> 85.7 kB packed (-52%), 752 kB -> 343 kB unpacked
  (-54%), 124 files -> 109. Zero dist/voice/* or dist/composio/* in the
  tarball. node_modules dep count 310 -> 211.
- tsc clean; 27/27 tests pass.

The matching voice package (@open-gitagent/voice) ships separately.
@shreyas-lyzr
shreyas-lyzr merged commit e4f3af9 into main Jun 6, 2026
@shreyas-lyzr
shreyas-lyzr deleted the chore/slim-package-split-voice branch June 6, 2026 14:14
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