@de-otio/repo-aegis-llm

中文文档
0.14.0发布于 2026/11/10GPL-3.0-or-laterTypeScriptES Module构建来源已验证近 30 天下载 2736

LLM-assisted helpers for repo-aegis: prose extraction, token suggestion, embedding profiles. Off the deterministic gate path.

原始使用文档
文档目录3 节
  1. What's in here
  2. Why this is a separate package
  3. License

@de-otio/repo-aegis-llm

LLM-assisted helpers for repo-aegis: Ollama HTTP client, prose extraction, marker-token suggestion (Phase 2), and per-engagement embedding profiles for the centralised semantic sweep (Phase 3). Both phases are implemented; the public surface listed below is stable.

Internal — do not depend on this package directly. It is consumed by @de-otio/repo-aegis (the CLI's suggest-markers verb) and @de-otio/repo-aegis-scan (the --semantic sweep and rebuild-profiles verb). The deterministic gate code in @de-otio/repo-aegis-core does not depend on this package, and the import-graph guard test in packages/core/src/import-graph.test.ts enforces that.

What's in here

ModulePhasePurpose
ollama-client.ts2 + 3chat, embed, cosine. Endpoint validation [SEC H-1] (loopback-only by default; localhost is DNS-checked to defeat /etc/hosts redirection). No retries, no fallbacks.
prose-extraction.ts2 + 3Walks a repo to gather prose for the LLM. Hard-skips secrets / .git / .ssh / .aws / .gnupg. [SEC C-1, H-4] realpath / TOCTOU defence. [SEC M-2] resource caps. [SEC C-2] author-domain remote-egress guard.
synthesis.ts2Synthesise word-boundary regexes per token kind (company, codename, person-name, domain, ticket-prefix, account-id, other). [SEC M-4] Unicode-safe boundaries.
filters.ts2Filter dictionary words, dependency names, existing patterns. Pure functions.
token-extraction.ts2Token-extraction prompt (TOKEN_EXTRACTION_PROMPT_V1). [SEC C-3] anti-injection preamble + fence delimiters. Zod-validated response.
profile.ts3Build, write, read, diff per-engagement embedding profiles. Atomic tmp+fsync+rename [SEC M-5]. sha256-stamped manifest [SEC H-3].
exceptions.ts2 + 3Ollama-client errors: RemoteEndpointDisallowedError (REMOTE_DISALLOWED / URL_PARSE), OllamaError. (Module-local errors — RootContainmentError, BundleFenceCollisionError, BundleTooLargeError — live in prose-extraction.ts / token-extraction.ts.)

Why this is a separate package

The deterministic gate (PostToolUse hook, pre-commit hook, repo-aegis check) must stay fast, offline, and free of heavy runtime dependencies (not measured here: each hook invocation is a Node process start). Splitting LLM-adjacent code into its own package keeps core lean and makes the hot-path independence property machine-checkable. See doc/design/zero-config-onboarding.md for the rationale.

License

GPL-3.0-or-later. Copyright (C) 2026 Richard Myers and contributors.

A De Otio tool — https://de-otio.org.

版本与发布记录

@de-otio/repo-aegis-llm 共发布 31 个版本,首次发布于 2026/05/07;过去 12 个月发布了 31 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.14.0latest2026/11/101 天前
0.13.22026/11/102 天前
0.13.12026/11/092 天前
0.13.02026/11/092 天前
0.12.22026/11/093 天前
0.12.12026/11/093 天前

关于 @de-otio/repo-aegis-llm 的常见问题

@de-otio/repo-aegis-llm 是什么?

LLM-assisted helpers for repo-aegis: prose extraction, token suggestion, embedding profiles. Off the deterministic gate path.

如何安装 @de-otio/repo-aegis-llm?

在项目目录运行 npm install @de-otio/repo-aegis-llm,或使用 pnpm add / yarn add / bun add。

@de-otio/repo-aegis-llm 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@de-otio/repo-aegis-llm 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@de-otio/repo-aegis-llm 可以商用吗?

@de-otio/repo-aegis-llm 使用 GPL-3.0-or-later 许可。强 Copyleft:分发包含该代码的软件时,整个作品需以 GPL-3.0 兼容许可开源,并附带专利与反锁定条款。仅内部使用不触发此义务。以上为概括,不构成法律意见,请以许可原文为准。

@de-otio/repo-aegis-llm 的下载量有多少?

根据 npm 官方下载统计,@de-otio/repo-aegis-llm 在 2026/10/12 – 2026/11/10 这 30 天内被下载 2,736 次,日均约 91 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@de-otio/repo-aegis-llm 还在维护吗?

最新版本 0.14.0 发布于 2026/11/10(1 天前);至今共发布 31 个版本,其中过去 12 个月发布了 31 个;首次发布于 2026/05/07。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。