agent-session-capture
Use when implementing or consuming @jeswr/agent-session-capture in the W9 MCP program.
- License 许可
- MIT
- 所属仓库
- jeswr/solid-sdk
- 最近更新
- 2026-11-15
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- agent-session-capture
- description
- Use when implementing or consuming @jeswr/agent-session-capture in the W9 MCP program.
02 资源文件 30
- 参考文档package.json1.1 KB
- 参考文档README.md11.3 KB
- 脚本src/capture.test.ts41.5 KB
- 脚本src/capture.ts8.2 KB
- 脚本src/cli.test.ts4.0 KB
- 脚本src/cli.ts861 B
- 脚本src/discovery.test.ts5.4 KB
- 脚本src/discovery.ts2.9 KB
- 脚本src/export-file.test.ts5.9 KB
- 脚本src/export-file.ts5.4 KB
- 脚本src/export-import.test.ts14.5 KB
- 脚本src/export-import.ts4.2 KB
- 脚本src/export-parsers.test.ts8.9 KB
- 脚本src/export-parsers.ts5.9 KB
- 参考文档src/fixtures/chatgpt-export.json1.5 KB
- 参考文档src/fixtures/claude-export.json819 B
- 其他src/fixtures/claude.jsonl1.3 KB
- 其他src/fixtures/codex.jsonl2.0 KB
- 参考文档src/fixtures/README.md824 B
- 脚本src/index.ts449 B
- 脚本src/io.test.ts5.1 KB
- 脚本src/io.ts2.6 KB
- 脚本src/parsers.test.ts15.7 KB
- 脚本src/parsers.ts8.9 KB
- 脚本src/queue.test.ts16.1 KB
- 脚本src/queue.ts7.7 KB
- 脚本src/redact.ts181 B
- 脚本src/testing.ts3.7 KB
- 参考文档tsconfig.json204 B
- 脚本vitest.config.ts408 B
03 SKILL.md 正文
<!-- AUTHORED-BY Codex GPT-6.1-Sol -->
@jeswr/agent-session-capture
Claude Code and Codex session capture into the pod (MCP-13), plus ChatGPT/Claude.ai
export imports (MCP-16). Read the planning
repository's specs/mcp/DESIGN.md §6 and the assigned task before changing behavior.
Keep the package private, ESM, Node >=24, and securityCritical. Document public
exports with TSDoc.
Use runExportImport for explicit chatgpt-export <zip|json> and
claude-export <json> commands. It returns 0/1 with no secret-bearing errors,
outside the hook watchdog. Reuse MCP config/auth, ChatWriter and private sequence
assignments; retries are create-only and no raw export snapshots are queued.
Redact titles and text.
Scope source IDs with the normalized account before redacting the label; keep
absent-account derivation byte-identical. Hooks pass channel hook, export parsers
pass export. Accept account via library options or the shared MCP config /
SOLID_MCP_ACCOUNT; validate with normalizeChatAccount and use redactChatAccount
before queueing. Bind queued entries, scans and checkpoints to an opaque account
scope as well as pod root/WebID. Never relabel old snapshots on account changes;
legacy unlabelled snapshots remain unlabelled hook captures.
Bound input bytes, conversation/message/part counts and ZIP decompression
independently; never extract archive paths to disk. Refuse
unsafe paths, links, encryption, ZIP64 and duplicate root conversations.json.
Use runCapture for the hook boundary; it is silent, always resolves to zero,
and caps its processing/request budget at ten seconds. The CLI starts an independent
watchdog before dynamic SDK loading. Keep stdout/stderr free of transcripts, paths,
remote bodies and credentials, including on startup/auth failures.
The JSONL parsers retain text and tool names only. Drop arguments, results, reasoning, images and duplicate Codex event mirrors. Redact before queueing and again on replay. Keep opaque stable IDs and never use raw session IDs as paths. Reuse ChatWriter for AS2, owner-only ACL-first writes and create-only idempotence. Reuse MCP-12's config loader and DPoP fetch; do not duplicate auth or weaken config permissions/read-only checks. The default HTTP transport is guarded-fetch/node with DNS pinning; explicit operator loopback configuration is the only loopback allowance.
.solid-capture-ignore is a presence marker. Check invoking/hook/transcript project
locations and both lexical/real parent chains. Fail closed on unsafe paths or lookup
errors. Recheck opt-out before replay; never replay across pod-root or WebID changes.
Queue snapshots atomically in private directories/files; never queue auth credentials
or raw transcript rows. Preserve queued snapshots after incomplete uploads or deadline.
Queue the current Claude transcript before network I/O to preserve PreCompact data;
replay Codex's backlog before scanning rollouts so discovery cannot starve uploads.
The repo's agent-layer guard requires bare Node builtin imports (with the existing Biome import-protocol suppression convention), literal module specifiers, and no references to global fetch. Use the shared guarded transport and typed injected seams.
Use injected services and the reduced redacted JSONL fixtures; no real accounts or
credentials. Keep reusable fakes under ./testing. Require 100% branch coverage for
implemented security paths. Run lint, dependency-first build, typecheck and tests
through pnpm before committing.
04 同仓库更多 Skills
storage-conformance
Work on @jeswr/storage-conformance, the shared storage conformance suite package in the Solid SDK workspace.
fetch-rdf-engine-tests
Maintain fetch-rdf's real Node WASM parser integration tests without introducing a reverse engine dependency in fetch-rdf.
alpha
Use when checking fixtures, including folded YAML descriptions.
widget
Use when testing package skills: YAML quoting works.
web-seo
Use when improving technical and entity SEO for a modern personal, portfolio, documentation, or marketing site, including crawlable HTML, canonical metadata, sitemap and robots, Person/ProfilePage JSON-LD, Core Web Vitals, and honest ranking expectations.
solid-wac
Use when implementing or auditing Solid server WAC authorization, ACL creation and inheritance, auxiliary-resource escalation, method-to-mode mapping, 401 versus 403 challenges, WAC-Allow, or defensive typed ACL parsing with @solid/object and @rdfjs/wrapper.