* docs(M002): context, requirements, and roadmap * feat: port TTSR and blob/artifact storage from oh-my-pi Phase 1 — TTSR (Time Traveling Stream Rules): - TtsrManager: regex-based stream monitoring with scope filtering, repeat gating, and buffer isolation (picomatch replaces Bun.Glob) - Rule loader: scans ~/.gsd/agent/rules/*.md and .gsd/rules/*.md with YAML frontmatter parsing; project rules override global - TTSR extension: wires into pi event lifecycle (session_start, turn_start, message_update, turn_end, agent_end) to abort on match and inject violation as system reminder via sendMessage - Interrupt template for rule violation injection Phase 2 — Blob/Artifact Storage: - BlobStore: content-addressed storage at ~/.gsd/agent/blobs/ using Node crypto (sha256), sync I/O, automatic deduplication - ArtifactManager: session-scoped sequential artifact files stored alongside session JSONL (lazy dir creation, resume-safe ID scan) - Session manager integration: prepareForPersistence externalizes images ≥1KB to blob store before JSONL write; resolveBlobRefs rehydrates on session load; truncates strings >500KB - Bash tool artifact spill: uses ArtifactManager instead of temp files when available, includes artifact:// references in output Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: harden blob store, TTSR manager, and dep classification - Validate SHA-256 hex format in BlobStore.get/has/parseBlobRef to prevent path traversal via crafted blob references - Cap TTSR per-stream buffers at 512KB to prevent unbounded memory growth - Move picomatch from devDependencies to dependencies (runtime import) - Warn on invalid regex in TTSR rule conditions instead of silent skip - Remove .gsd/ planning files that were force-added past .gitignore - Add trailing newline to ttsr-interrupt.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * test: add tests for blob store, artifact manager, TTSR manager, and rule loader 55 tests covering: - BlobStore put/get/has, idempotency, path traversal rejection - parseBlobRef/isBlobRef validation, externalize/resolve round-trips - ArtifactManager sequential IDs, lazy dir creation, session resume - TtsrManager rule matching, scope filtering, buffer isolation, repeat gating, buffer size cap, injection persistence - Rule loader frontmatter parsing, directory scanning, merge logic Also fixes BlobStore constructor to avoid TS parameter property syntax (incompatible with Node's strip-only TypeScript mode). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
81 lines
2.8 KiB
JSON
81 lines
2.8 KiB
JSON
{
|
|
"name": "gsd-pi",
|
|
"version": "2.8.0",
|
|
"description": "GSD — Get Shit Done coding agent",
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/glittercowboy/gsd-pi.git"
|
|
},
|
|
"homepage": "https://github.com/glittercowboy/gsd-pi#readme",
|
|
"bugs": {
|
|
"url": "https://github.com/glittercowboy/gsd-pi/issues"
|
|
},
|
|
"type": "module",
|
|
"workspaces": [
|
|
"packages/*"
|
|
],
|
|
"bin": {
|
|
"gsd": "dist/loader.js",
|
|
"gsd-cli": "dist/loader.js"
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"packages",
|
|
"pkg",
|
|
"src/resources",
|
|
"scripts/postinstall.js",
|
|
"package.json",
|
|
"README.md"
|
|
],
|
|
"piConfig": {
|
|
"name": "gsd",
|
|
"configDir": ".gsd"
|
|
},
|
|
"engines": {
|
|
"node": ">=20.6.0"
|
|
},
|
|
"scripts": {
|
|
"build:pi-tui": "npm run build -w @gsd/pi-tui",
|
|
"build:pi-ai": "npm run build -w @gsd/pi-ai",
|
|
"build:pi-agent-core": "npm run build -w @gsd/pi-agent-core",
|
|
"build:pi-coding-agent": "npm run build -w @gsd/pi-coding-agent",
|
|
"build:pi": "npm run build:pi-tui && npm run build:pi-ai && npm run build:pi-agent-core && npm run build:pi-coding-agent",
|
|
"build": "npm run build:pi && tsc && npm run copy-themes",
|
|
"copy-themes": "node -e \"const{mkdirSync,cpSync}=require('fs');const{resolve}=require('path');const src=resolve(__dirname,'packages/pi-coding-agent/dist/modes/interactive/theme');mkdirSync('pkg/dist/modes/interactive/theme',{recursive:true});cpSync(src,'pkg/dist/modes/interactive/theme',{recursive:true})\"",
|
|
"test": "node --import ./src/resources/extensions/gsd/tests/resolve-ts.mjs --experimental-strip-types --test src/resources/extensions/gsd/tests/*.test.ts src/resources/extensions/gsd/tests/*.test.mjs src/tests/*.test.ts",
|
|
"test:browser-tools": "node --test src/resources/extensions/browser-tools/tests/browser-tools-unit.test.cjs src/resources/extensions/browser-tools/tests/browser-tools-integration.test.mjs",
|
|
"dev": "tsc --watch",
|
|
"postinstall": "node scripts/postinstall.js",
|
|
"pi:install-global": "node scripts/install-pi-global.js",
|
|
"pi:uninstall-global": "node scripts/uninstall-pi-global.js",
|
|
"sync-pkg-version": "node scripts/sync-pkg-version.cjs",
|
|
"prepublishOnly": "npm run sync-pkg-version && npm run build"
|
|
},
|
|
"dependencies": {
|
|
"@clack/prompts": "^1.1.0",
|
|
"@gsd/pi-agent-core": "*",
|
|
"@gsd/pi-ai": "*",
|
|
"@gsd/pi-coding-agent": "*",
|
|
"@gsd/pi-tui": "*",
|
|
"picocolors": "^1.1.1",
|
|
"picomatch": "^4.0.3",
|
|
"playwright": "^1.58.2",
|
|
"sharp": "^0.34.5"
|
|
},
|
|
"bundleDependencies": [
|
|
"@gsd/pi-agent-core",
|
|
"@gsd/pi-ai",
|
|
"@gsd/pi-coding-agent",
|
|
"@gsd/pi-tui"
|
|
],
|
|
"devDependencies": {
|
|
"@types/node": "^22.0.0",
|
|
"@types/picomatch": "^4.0.2",
|
|
"jiti": "^2.6.1",
|
|
"typescript": "^5.4.0"
|
|
},
|
|
"overrides": {
|
|
"gaxios": "7.1.4"
|
|
}
|
|
}
|