agent-whisker 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +12 -0
- package/LICENSE +21 -0
- package/README.md +155 -2
- package/README.zh-CN.md +156 -0
- package/node_modules/jieba-wasm/LICENSE +25 -0
- package/node_modules/jieba-wasm/README.md +134 -0
- package/node_modules/jieba-wasm/package.json +129 -0
- package/node_modules/jieba-wasm/pkg/nodejs/jieba_rs_wasm.d.ts +24 -0
- package/node_modules/jieba-wasm/pkg/nodejs/jieba_rs_wasm.js +341 -0
- package/node_modules/jieba-wasm/pkg/nodejs/jieba_rs_wasm_bg.wasm +0 -0
- package/node_modules/jieba-wasm/pkg/nodejs/jieba_rs_wasm_bg.wasm.d.ts +25 -0
- package/node_modules/yaml/LICENSE +13 -0
- package/node_modules/yaml/README.md +172 -0
- package/node_modules/yaml/bin.mjs +11 -0
- package/node_modules/yaml/browser/dist/compose/compose-collection.js +88 -0
- package/node_modules/yaml/browser/dist/compose/compose-doc.js +43 -0
- package/node_modules/yaml/browser/dist/compose/compose-node.js +109 -0
- package/node_modules/yaml/browser/dist/compose/compose-scalar.js +86 -0
- package/node_modules/yaml/browser/dist/compose/composer.js +219 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-map.js +115 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +198 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +49 -0
- package/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +207 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +226 -0
- package/node_modules/yaml/browser/dist/compose/resolve-props.js +146 -0
- package/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
- package/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +26 -0
- package/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
- package/node_modules/yaml/browser/dist/compose/util-map-includes.js +13 -0
- package/node_modules/yaml/browser/dist/doc/Document.js +335 -0
- package/node_modules/yaml/browser/dist/doc/anchors.js +71 -0
- package/node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
- package/node_modules/yaml/browser/dist/doc/createNode.js +88 -0
- package/node_modules/yaml/browser/dist/doc/directives.js +176 -0
- package/node_modules/yaml/browser/dist/errors.js +57 -0
- package/node_modules/yaml/browser/dist/index.js +17 -0
- package/node_modules/yaml/browser/dist/log.js +11 -0
- package/node_modules/yaml/browser/dist/nodes/Alias.js +118 -0
- package/node_modules/yaml/browser/dist/nodes/Collection.js +147 -0
- package/node_modules/yaml/browser/dist/nodes/Node.js +38 -0
- package/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/Scalar.js +24 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLMap.js +144 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +113 -0
- package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +63 -0
- package/node_modules/yaml/browser/dist/nodes/identity.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
- package/node_modules/yaml/browser/dist/parse/cst-scalar.js +214 -0
- package/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
- package/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
- package/node_modules/yaml/browser/dist/parse/cst.js +98 -0
- package/node_modules/yaml/browser/dist/parse/lexer.js +721 -0
- package/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
- package/node_modules/yaml/browser/dist/parse/parser.js +975 -0
- package/node_modules/yaml/browser/dist/public-api.js +102 -0
- package/node_modules/yaml/browser/dist/schema/Schema.js +37 -0
- package/node_modules/yaml/browser/dist/schema/common/map.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
- package/node_modules/yaml/browser/dist/schema/common/seq.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
- package/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
- package/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
- package/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
- package/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
- package/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
- package/node_modules/yaml/browser/dist/schema/tags.js +96 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +58 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +67 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +74 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +78 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +39 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +93 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
- package/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +146 -0
- package/node_modules/yaml/browser/dist/stringify/stringify.js +129 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +153 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +85 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +25 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +150 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyString.js +336 -0
- package/node_modules/yaml/browser/dist/util.js +11 -0
- package/node_modules/yaml/browser/dist/visit.js +233 -0
- package/node_modules/yaml/browser/index.js +5 -0
- package/node_modules/yaml/browser/package.json +3 -0
- package/node_modules/yaml/dist/cli.d.ts +8 -0
- package/node_modules/yaml/dist/cli.mjs +201 -0
- package/node_modules/yaml/dist/compose/compose-collection.d.ts +11 -0
- package/node_modules/yaml/dist/compose/compose-collection.js +90 -0
- package/node_modules/yaml/dist/compose/compose-doc.d.ts +7 -0
- package/node_modules/yaml/dist/compose/compose-doc.js +45 -0
- package/node_modules/yaml/dist/compose/compose-node.d.ts +29 -0
- package/node_modules/yaml/dist/compose/compose-node.js +112 -0
- package/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
- package/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
- package/node_modules/yaml/dist/compose/composer.d.ts +63 -0
- package/node_modules/yaml/dist/compose/composer.js +224 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
- package/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-end.js +39 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +228 -0
- package/node_modules/yaml/dist/compose/resolve-props.d.ts +23 -0
- package/node_modules/yaml/dist/compose/resolve-props.js +148 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
- package/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
- package/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
- package/node_modules/yaml/dist/doc/Document.d.ts +141 -0
- package/node_modules/yaml/dist/doc/Document.js +337 -0
- package/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
- package/node_modules/yaml/dist/doc/anchors.js +76 -0
- package/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
- package/node_modules/yaml/dist/doc/applyReviver.js +57 -0
- package/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
- package/node_modules/yaml/dist/doc/createNode.js +90 -0
- package/node_modules/yaml/dist/doc/directives.d.ts +49 -0
- package/node_modules/yaml/dist/doc/directives.js +178 -0
- package/node_modules/yaml/dist/errors.d.ts +21 -0
- package/node_modules/yaml/dist/errors.js +62 -0
- package/node_modules/yaml/dist/index.d.ts +25 -0
- package/node_modules/yaml/dist/index.js +50 -0
- package/node_modules/yaml/dist/log.d.ts +3 -0
- package/node_modules/yaml/dist/log.js +19 -0
- package/node_modules/yaml/dist/nodes/Alias.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/Alias.js +120 -0
- package/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
- package/node_modules/yaml/dist/nodes/Collection.js +151 -0
- package/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/Node.js +40 -0
- package/node_modules/yaml/dist/nodes/Pair.d.ts +22 -0
- package/node_modules/yaml/dist/nodes/Pair.js +39 -0
- package/node_modules/yaml/dist/nodes/Scalar.d.ts +47 -0
- package/node_modules/yaml/dist/nodes/Scalar.js +27 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
- package/node_modules/yaml/dist/nodes/identity.d.ts +23 -0
- package/node_modules/yaml/dist/nodes/identity.js +53 -0
- package/node_modules/yaml/dist/nodes/toJS.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/toJS.js +39 -0
- package/node_modules/yaml/dist/options.d.ts +350 -0
- package/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
- package/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
- package/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
- package/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
- package/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
- package/node_modules/yaml/dist/parse/cst-visit.js +99 -0
- package/node_modules/yaml/dist/parse/cst.d.ts +109 -0
- package/node_modules/yaml/dist/parse/cst.js +112 -0
- package/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
- package/node_modules/yaml/dist/parse/lexer.js +723 -0
- package/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
- package/node_modules/yaml/dist/parse/line-counter.js +41 -0
- package/node_modules/yaml/dist/parse/parser.d.ts +84 -0
- package/node_modules/yaml/dist/parse/parser.js +980 -0
- package/node_modules/yaml/dist/public-api.d.ts +44 -0
- package/node_modules/yaml/dist/public-api.js +107 -0
- package/node_modules/yaml/dist/schema/Schema.d.ts +17 -0
- package/node_modules/yaml/dist/schema/Schema.js +39 -0
- package/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/map.js +19 -0
- package/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
- package/node_modules/yaml/dist/schema/common/null.js +17 -0
- package/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/seq.js +19 -0
- package/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/string.js +16 -0
- package/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/bool.js +21 -0
- package/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/float.js +47 -0
- package/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/int.js +42 -0
- package/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/core/schema.js +25 -0
- package/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
- package/node_modules/yaml/dist/schema/json/schema.js +64 -0
- package/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
- package/node_modules/yaml/dist/schema/tags.d.ts +48 -0
- package/node_modules/yaml/dist/schema/tags.js +99 -0
- package/node_modules/yaml/dist/schema/types.d.ts +92 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +71 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
- package/node_modules/yaml/dist/stringify/stringify.d.ts +21 -0
- package/node_modules/yaml/dist/stringify/stringify.js +132 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.js +155 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.js +27 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
- package/node_modules/yaml/dist/stringify/stringifyString.d.ts +9 -0
- package/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
- package/node_modules/yaml/dist/test-events.d.ts +4 -0
- package/node_modules/yaml/dist/test-events.js +134 -0
- package/node_modules/yaml/dist/util.d.ts +16 -0
- package/node_modules/yaml/dist/util.js +28 -0
- package/node_modules/yaml/dist/visit.d.ts +102 -0
- package/node_modules/yaml/dist/visit.js +236 -0
- package/node_modules/yaml/package.json +97 -0
- package/node_modules/yaml/util.js +2 -0
- package/package.json +53 -4
- package/packages/antigravity-plugin/README.md +27 -0
- package/packages/antigravity-plugin/README.zh-CN.md +27 -0
- package/packages/antigravity-plugin/agents/review.md +36 -0
- package/packages/antigravity-plugin/hooks.json +24 -0
- package/packages/antigravity-plugin/package.json +7 -0
- package/packages/antigravity-plugin/plugin.json +5 -0
- package/packages/antigravity-plugin/review-perspectives.md +14 -0
- package/packages/antigravity-plugin/rules/agent-whisker.md +7 -0
- package/packages/antigravity-plugin/skills/task-state/SKILL.md +93 -0
- package/packages/claude-plugin/.claude-plugin/plugin.json +8 -0
- package/packages/claude-plugin/.codex-plugin/plugin.json +8 -0
- package/packages/claude-plugin/README.md +232 -0
- package/packages/claude-plugin/README.zh-CN.md +85 -0
- package/packages/claude-plugin/agents/recall.md +28 -0
- package/packages/claude-plugin/agents/review.md +33 -0
- package/packages/claude-plugin/bin/taskstate +1133 -0
- package/packages/claude-plugin/bin/windows-launch.mjs +71 -0
- package/packages/claude-plugin/hooks/codex.json +95 -0
- package/packages/claude-plugin/hooks/hooks.json +80 -0
- package/packages/claude-plugin/package.json +7 -0
- package/packages/claude-plugin/review-perspectives.md +14 -0
- package/packages/claude-plugin/skills/task-state/SKILL.md +93 -0
- package/packages/cli/README.md +221 -0
- package/packages/cli/README.zh-CN.md +221 -0
- package/packages/cli/package.json +16 -0
- package/packages/cli/src/command.js +308 -0
- package/packages/cli/src/commands/catalog.js +82 -0
- package/packages/cli/src/commands/doctor.js +1769 -0
- package/packages/cli/src/commands/document.js +38 -0
- package/packages/cli/src/commands/extract.js +61 -0
- package/packages/cli/src/commands/grep.js +139 -0
- package/packages/cli/src/commands/hook.js +342 -0
- package/packages/cli/src/commands/index-command.js +199 -0
- package/packages/cli/src/commands/index.js +45 -0
- package/packages/cli/src/commands/ingest.js +332 -0
- package/packages/cli/src/commands/init.js +208 -0
- package/packages/cli/src/commands/install.js +214 -0
- package/packages/cli/src/commands/mcp.js +54 -0
- package/packages/cli/src/commands/nudge.js +81 -0
- package/packages/cli/src/commands/project.js +228 -0
- package/packages/cli/src/commands/read.js +157 -0
- package/packages/cli/src/commands/search.js +253 -0
- package/packages/cli/src/commands/service.js +241 -0
- package/packages/cli/src/commands/sessions.js +603 -0
- package/packages/cli/src/commands/status.js +191 -0
- package/packages/cli/src/commands/version.js +25 -0
- package/packages/cli/src/grep-options.js +133 -0
- package/packages/cli/src/index.js +18 -0
- package/packages/cli/src/install/agents.js +99 -0
- package/packages/cli/src/install/antigravity-plugin.js +221 -0
- package/packages/cli/src/install/claude-plugin.js +167 -0
- package/packages/cli/src/install/clients.js +515 -0
- package/packages/cli/src/install/codex-plugin.js +206 -0
- package/packages/cli/src/install/dsh.js +599 -0
- package/packages/cli/src/install/external.js +648 -0
- package/packages/cli/src/install/handlers.js +75 -0
- package/packages/cli/src/install/herdr-mod.js +411 -0
- package/packages/cli/src/install/mcp.js +266 -0
- package/packages/cli/src/install/remove.js +913 -0
- package/packages/cli/src/install/rules.js +669 -0
- package/packages/cli/src/install/steps.js +1739 -0
- package/packages/cli/src/install/wrapper.js +535 -0
- package/packages/cli/src/keystore.js +530 -0
- package/packages/cli/src/launcher.js +184 -0
- package/packages/cli/src/main.js +14 -0
- package/packages/cli/src/paths.js +16 -0
- package/packages/cli/src/pointer.js +330 -0
- package/packages/cli/src/run.js +234 -0
- package/packages/cli/src/session-wait.js +365 -0
- package/packages/cli/src/store-access.js +51 -0
- package/packages/core/README.md +53 -0
- package/packages/core/README.zh-CN.md +53 -0
- package/packages/core/package.json +13 -0
- package/packages/core/src/antigravity.js +471 -0
- package/packages/core/src/append.js +309 -0
- package/packages/core/src/atomic-file.js +127 -0
- package/packages/core/src/barrier.js +359 -0
- package/packages/core/src/blobs.js +423 -0
- package/packages/core/src/catalog.js +501 -0
- package/packages/core/src/chunk.js +371 -0
- package/packages/core/src/clairic.js +518 -0
- package/packages/core/src/compact.js +194 -0
- package/packages/core/src/context.js +65 -0
- package/packages/core/src/convert.js +168 -0
- package/packages/core/src/crashpoints.js +59 -0
- package/packages/core/src/db.js +1313 -0
- package/packages/core/src/doc-kind.js +30 -0
- package/packages/core/src/dsh.js +494 -0
- package/packages/core/src/encoding.js +175 -0
- package/packages/core/src/errors.js +139 -0
- package/packages/core/src/excerpt.js +93 -0
- package/packages/core/src/exclude.js +102 -0
- package/packages/core/src/extract.js +708 -0
- package/packages/core/src/extractors.js +170 -0
- package/packages/core/src/format.js +18 -0
- package/packages/core/src/grep.js +623 -0
- package/packages/core/src/host.js +486 -0
- package/packages/core/src/ids.js +242 -0
- package/packages/core/src/index-db.js +1040 -0
- package/packages/core/src/index-view.js +201 -0
- package/packages/core/src/index.js +89 -0
- package/packages/core/src/ingest-file.js +854 -0
- package/packages/core/src/json.js +127 -0
- package/packages/core/src/library-filters.js +126 -0
- package/packages/core/src/library-read.js +747 -0
- package/packages/core/src/nudge.js +96 -0
- package/packages/core/src/observers.js +175 -0
- package/packages/core/src/pages.js +95 -0
- package/packages/core/src/pattern.js +433 -0
- package/packages/core/src/pdf-bookmarks.js +231 -0
- package/packages/core/src/project.js +1073 -0
- package/packages/core/src/protobuf.js +112 -0
- package/packages/core/src/ranking.js +13 -0
- package/packages/core/src/reclassify.js +78 -0
- package/packages/core/src/recovery.js +179 -0
- package/packages/core/src/reducers/library.js +559 -0
- package/packages/core/src/reducers/registry.js +180 -0
- package/packages/core/src/replay.js +525 -0
- package/packages/core/src/rerank.js +1263 -0
- package/packages/core/src/schema.js +462 -0
- package/packages/core/src/search.js +1241 -0
- package/packages/core/src/session-files.js +2320 -0
- package/packages/core/src/session-grep.js +270 -0
- package/packages/core/src/session-reader.js +201 -0
- package/packages/core/src/sessions-read.js +876 -0
- package/packages/core/src/sessions-search.js +1142 -0
- package/packages/core/src/sessions-sync.js +886 -0
- package/packages/core/src/sessions.js +958 -0
- package/packages/core/src/sources.js +558 -0
- package/packages/core/src/state.js +172 -0
- package/packages/core/src/store.js +1039 -0
- package/packages/core/src/tokenize.js +187 -0
- package/packages/core/src/validation.js +127 -0
- package/packages/dsh-plugin/README.md +64 -0
- package/packages/dsh-plugin/README.zh-CN.md +64 -0
- package/packages/dsh-plugin/checked.json +3 -0
- package/packages/dsh-plugin/index.js +520 -0
- package/packages/dsh-plugin/package.json +7 -0
- package/packages/dsh-plugin/skills/task-state/SKILL.md +93 -0
- package/packages/herdr-plugin/README.md +15 -0
- package/packages/herdr-plugin/README.zh-CN.md +15 -0
- package/packages/herdr-plugin/app-mod/main.js +189 -0
- package/packages/herdr-plugin/app-mod/mod.json +1 -0
- package/packages/herdr-plugin/app-mod/status.js +275 -0
- package/packages/herdr-plugin/herdr-plugin.toml +15 -0
- package/packages/herdr-plugin/package.json +7 -0
- package/packages/mcp/README.md +106 -0
- package/packages/mcp/README.zh-CN.md +106 -0
- package/packages/mcp/package.json +13 -0
- package/packages/mcp/src/framing.js +101 -0
- package/packages/mcp/src/index.js +13 -0
- package/packages/mcp/src/instructions.js +378 -0
- package/packages/mcp/src/reload.js +141 -0
- package/packages/mcp/src/roots.js +185 -0
- package/packages/mcp/src/server.js +779 -0
- package/packages/mcp/src/tools/arguments.js +482 -0
- package/packages/mcp/src/tools/context.js +21 -0
- package/packages/mcp/src/tools/definitions.js +343 -0
- package/packages/mcp/src/tools/document-sessions.js +262 -0
- package/packages/mcp/src/tools/extract.js +57 -0
- package/packages/mcp/src/tools/grep.js +39 -0
- package/packages/mcp/src/tools/library.js +716 -0
- package/packages/mcp/src/tools/other-store.js +159 -0
- package/packages/mcp/src/tools/results.js +32 -0
- package/packages/mcp/src/tools/session-entries.js +49 -0
- package/packages/mcp/src/tools/sessions.js +730 -0
- package/packages/mcp/src/tools/text.js +47 -0
- package/packages/mcp/src/tools.js +125 -0
- package/packages/mcp/src/whisker.js +132 -0
- package/packages/pi-extension/LICENSE +21 -0
- package/packages/pi-extension/README.md +29 -0
- package/packages/pi-extension/README.zh-CN.md +29 -0
- package/packages/pi-extension/agents/review.md +33 -0
- package/packages/pi-extension/package.json +20 -0
- package/packages/pi-extension/review-perspectives.md +14 -0
- package/packages/pi-extension/skills/task-state/SKILL.md +93 -0
- package/packages/pi-extension/src/extension.ts +857 -0
- package/packages/pi-extension/src/index.ts +6 -0
- package/packages/service/README.md +22 -0
- package/packages/service/README.zh-CN.md +22 -0
- package/packages/service/package.json +13 -0
- package/packages/service/src/errors.js +38 -0
- package/packages/service/src/files.js +289 -0
- package/packages/service/src/index.js +16 -0
- package/packages/service/src/launch-agent.js +387 -0
- package/packages/service/src/on-demand.js +93 -0
- package/packages/service/src/runtime.js +473 -0
- package/packages/service/src/types.js +119 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agent-whisker",
|
|
3
|
+
"description": "The agent-whisker plugin for Claude Code and Codex",
|
|
4
|
+
"owner": { "name": "agent-whisker" },
|
|
5
|
+
"plugins": [
|
|
6
|
+
{
|
|
7
|
+
"name": "agent-whisker",
|
|
8
|
+
"source": "./packages/claude-plugin",
|
|
9
|
+
"description": "Task goal, expectations and evidence injected into the session and every subagent, written only through taskstate; a pointer line on the sessions recorded in this directory"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Tomatamatom1
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,156 @@
|
|
|
1
|
-
#
|
|
1
|
+
# agent-whisker
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
English · [简体中文](README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
`agent-whisker` is a local document library and session store for coding agents. It indexes Markdown, plain text, PDFs, DOCX files, and local agent session transcripts on your machine. Agents and operators query passages, physical PDF pages, and conversation turns through the CLI or a read-only stdio MCP server, with optional read-time passage reranking and page-level field extraction.
|
|
6
|
+
|
|
7
|
+
## Quick start
|
|
8
|
+
|
|
9
|
+
From a source checkout (Node runs TypeScript directly; keep the checkout in place because the installed launcher points to it):
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
git clone https://github.com/Tomatamatom1/agent-whisker.git
|
|
13
|
+
cd agent-whisker
|
|
14
|
+
pnpm install
|
|
15
|
+
node packages/cli/src/main.ts install --dry-run
|
|
16
|
+
node packages/cli/src/main.ts install --apply all
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
From npm (once published, or from a [locally packed tarball](packages/cli/README.md#the-npm-package) with `npm install -g <tarball>`):
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npm install -g agent-whisker
|
|
23
|
+
agent-whisker install --dry-run
|
|
24
|
+
agent-whisker install --apply all
|
|
25
|
+
agent-whisker doctor
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`agent-whisker` is pre-release (`0.1.0`). Runtime requires Node `>=24.22.1 <25` or `>=26.13.0 <27` (with `~/.local/bin` on `PATH` on macOS). Markdown and plain text import directly. PDF text import requires Poppler's `pdftotext` (`qpdf` adds PDF bookmarks and page slicing), and DOCX import requires Pandoc `>=2.15`.
|
|
29
|
+
|
|
30
|
+
CI runs checks on macOS, Ubuntu, and Windows. `agent-whisker install` configures launchers, background sync, and agent programs on macOS and Windows; on Linux, the CLI, stdio MCP server, and foreground `service run` work directly. See [Windows setup](packages/cli/README.md#windows).
|
|
31
|
+
|
|
32
|
+
## Use cases
|
|
33
|
+
|
|
34
|
+
- **Document retrieval.** Import runbooks, papers, and standards with `agent-whisker ingest <path>`, rank passages with `search`, scan literal strings with `grep -F`, and open matched sections or PDF pages with `read`.
|
|
35
|
+
- **Agent session history.** Sync and search transcripts across local coding agents (`sessions sync`, `sessions search`), or inspect surrounding turns with `sessions read`.
|
|
36
|
+
- **Read-only MCP retrieval.** Expose seven stdio tools (`library_search`, `library_read`, `library_catalog`, `library_grep`, `session_search`, `session_read`, `session_grep`) to coding agents, plus `library_extract` when an extraction endpoint is configured.
|
|
37
|
+
- **Task verification.** Record user expectations, observed command runs (`taskstate run --for <E> -- <command>`), and completion claims separately with `taskstate` so a reviewer on another model can verify the runs after merge.
|
|
38
|
+
|
|
39
|
+
## Properties
|
|
40
|
+
|
|
41
|
+
- **Append-only truth, rebuildable indexes.** Under `~/.agent-whisker`, `truth/` holds the append-only journal, versioned document text, and retained sessions. The SQLite FTS5 indexes in `derived/` can be rebuilt with `agent-whisker index repair`.
|
|
42
|
+
- **Local lexical search.** Retrieval uses Node's built-in `node:sqlite` and `jieba-wasm` for CJK word segmentation. The npm tarball bundles `jieba-wasm` and `yaml` for offline installation.
|
|
43
|
+
- **Session retention and redaction.** Synced session entries remain readable after a host program deletes its own log, and known secret-token patterns are redacted on retention.
|
|
44
|
+
- **Versioned sources.** Re-ingesting an edited file or passing `--doc <id>` writes a new version of that document, and `read --version <hash>` pins the exact version returned by a search.
|
|
45
|
+
- **Read-time passage filtering.** Setting `AGENT_WHISKER_RERANK_URL` and `AGENT_WHISKER_RERANK_MODEL` (append `#choice` for local `llama-server` group comparison) scores `open`-tier library candidates at read time; on `confident: false`, `hits` is `[]` and weak candidates appear only as locators in `more`.
|
|
46
|
+
- **On-demand field extraction.** Setting `AGENT_WHISKER_EXTRACT_URL` enables `agent-whisker extract` and MCP `library_extract` over 1–4 selected PDF pages or images (`open` documents for remote endpoints; `personal` allowed on loopback).
|
|
47
|
+
|
|
48
|
+
The [architecture guide](docs/architecture.md) states where each of these mechanisms stops.
|
|
49
|
+
|
|
50
|
+
## How it works
|
|
51
|
+
|
|
52
|
+
[](docs/architecture.md)
|
|
53
|
+
|
|
54
|
+
Runtime data flow across a coding agent, `~/.agent-whisker`, optional read-time HTTP endpoints, and standalone `taskstate`. See the [architecture guide](docs/architecture.md).
|
|
55
|
+
|
|
56
|
+
## Supported agents
|
|
57
|
+
|
|
58
|
+
`agent-whisker install --apply all` sets up every installed program listed in `AGENT_WHISKER_AGENTS`, registering the MCP server, session collection, context pointers, and `taskstate` integration (any other MCP client can run `agent-whisker mcp` over stdio):
|
|
59
|
+
|
|
60
|
+
| Program | Install steps | Hooks, skills, and subagents |
|
|
61
|
+
| --- | --- | --- |
|
|
62
|
+
| Claude Code | `mcp-claude`, `claude-plugin` | `SessionStart` and `UserPromptSubmit` pointers, `taskstate` hooks/skill, `review` and `recall` subagents ([guide](packages/claude-plugin/README.md)) |
|
|
63
|
+
| Codex | `mcp-codex`, `codex-plugin` | `SessionStart` and `UserPromptSubmit` pointers and `taskstate` hooks once trusted via `/hooks` ([guide](packages/claude-plugin/README.md)) |
|
|
64
|
+
| `pi` | `mcp-pi`, `pi-package` | System-prompt guidance and start pointer, `/agent-whisker`, `agent_whisker_wait`, `taskstate` hooks/skill ([guide](packages/pi-extension/README.md)) |
|
|
65
|
+
| Antigravity | `mcp-antigravity`, `antigravity-plugin` | Always-on rule, `SessionStart` and `PreInvocation` hooks, `taskstate` skill, `review` subagent ([guide](packages/antigravity-plugin/README.md)) |
|
|
66
|
+
| DeepSeek Harness | `mcp-dsh`, `dsh-plugin`, `dsh-skill` | Root-session start pointer and `taskstate` context/skill ([guide](packages/dsh-plugin/README.md)) |
|
|
67
|
+
|
|
68
|
+
Optional host integrations route MCP entries through Magpie (`install --apply mcp --via magpie`) and connect Herdr (`install --apply herdr-plugin,herdr-mod`; see [Herdr guide](packages/herdr-plugin/README.md)).
|
|
69
|
+
|
|
70
|
+
## Task verification
|
|
71
|
+
|
|
72
|
+
`taskstate` is an append-only task ledger under `~/.local/state/agent-whisker-task` injected into main sessions and subagents by the host hooks. It keeps four record types separate: user outcomes (`expect`), observed command runs (`run`, capturing exit code, git commit, dirty-tree status, and optional `--target` file hashes), agent handoffs (`claim`), and post-merge audit verdicts (`conclude` and `gap`).
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
taskstate open "Fix upload retry cap" # opens T1 and attaches this session
|
|
76
|
+
taskstate expect "Cap upload retries at 3" --core # records E1 before implementation
|
|
77
|
+
taskstate run --for E1 --expect-fail -- pnpm test # records failing baseline check (red)
|
|
78
|
+
# ... implement the fix ...
|
|
79
|
+
taskstate run --for E1 -- pnpm test # records passing check on clean commit (green)
|
|
80
|
+
taskstate claim "Retry cap enforced; see run log" --for E1
|
|
81
|
+
taskstate facts # summarizes runs and verification status
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Use `taskstate hold` to carry an active task across directories or `taskstate park` to set an umbrella task aside. After changes merge, invoke the `review` subagent (preferably on a different model than the implementer) to inspect recorded logs and diffs before running `taskstate close <T>`. See [Task state and review](packages/claude-plugin/README.md).
|
|
85
|
+
|
|
86
|
+
## Examples
|
|
87
|
+
|
|
88
|
+
Import documents, search passages, and trace decisions across agent sessions:
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
agent-whisker ingest ./runbooks
|
|
92
|
+
agent-whisker search "upload retry budget"
|
|
93
|
+
agent-whisker grep -F "UPLOAD_RETRY_LIMIT"
|
|
94
|
+
agent-whisker sessions sync
|
|
95
|
+
agent-whisker sessions search "upload retry budget" --project --group session
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Query the read-only MCP server (`tools/call` payloads):
|
|
99
|
+
|
|
100
|
+
```json
|
|
101
|
+
{"name":"library_search","arguments":{"queries":["upload retry budget","UPLOAD_RETRY_LIMIT"]}}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{"name":"session_search","arguments":{"queries":["upload retry budget"],"project":true}}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Optional read-time filtering (`System One: Decide`) and 1–4 page extraction (`Clairic-Flash`):
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
export AGENT_WHISKER_RERANK_URL='http://127.0.0.1:8788/v1/systemone#choice'
|
|
112
|
+
export AGENT_WHISKER_RERANK_MODEL='vllm-d3-lite'
|
|
113
|
+
agent-whisker search "upload retry budget"
|
|
114
|
+
|
|
115
|
+
export AGENT_WHISKER_EXTRACT_URL='http://127.0.0.1:18093/v1/systemone'
|
|
116
|
+
agent-whisker extract "$DOC_ID" --pages 1,2 --fields '{"invoice_total":{"type":"number"}}' --source-only
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Evaluation and boundaries
|
|
120
|
+
|
|
121
|
+
Retrieval benchmarks ran on Apple Silicon with Node `26.13.1` and SQLite FTS5 (tokenizer revision `t3`), scoring retrieved evidence directly. On LongMemEval-S (500 questions, ~50 sessions per isolated store, 470 questions with ground-truth evidence), `strict@5` requires *all* evidence sessions in the top five results and `hit@5` requires at least one.
|
|
122
|
+
|
|
123
|
+
| Benchmark | Read path | Result |
|
|
124
|
+
| --- | --- | --- |
|
|
125
|
+
| LongMemEval-S | Lexical session search (`store.searchSessions`) | 82.3% `strict@5` (387/470); 95.3% `hit@5`; p50 ≈6–11 ms |
|
|
126
|
+
| ADEBENCH `sets/quick` | Lexical only (`rerank=off`) | 38.7 / 55 Core |
|
|
127
|
+
| ADEBENCH `sets/quick` | Lexical + System One: Decide on read | 42.1 / 55 Core |
|
|
128
|
+
| ADEBENCH `sets/public2` (36 questions) | Lexical + System One: Decide on read | 43.5 / 55 Core |
|
|
129
|
+
|
|
130
|
+
On ADEBENCH `v0.2.17`, the external adapter imported fixtures via the CLI and queried `agent-whisker mcp` over stdio (9,234 bytes for the seven default tools in `tools/list`; median lookup 5 ms on sessions and 16 ms on documents).
|
|
131
|
+
|
|
132
|
+
Scope boundaries: MCP is read-only (imports and maintenance run through the CLI or background sync service); importing a separate file with a newer value keeps both documents searchable as written (ADEBENCH `updates`: 3.3/10); PDF import reads existing text layers up to 256 MiB per PDF (64 MiB for non-PDF sources and extracted text) without automatic OCR.
|
|
133
|
+
|
|
134
|
+
## Packages
|
|
135
|
+
|
|
136
|
+
Nine workspace packages live under `packages/`:
|
|
137
|
+
|
|
138
|
+
- **Runtime DAG (`cli` → `{mcp, service, core}`, `{mcp, service}` → `core`).** `core` owns storage, FTS5 indexing, `jieba-wasm` tokenization, reranking, and page extraction; `mcp` serves the read-only stdio server; `service` runs background indexing and session sync; `cli` provides the `agent-whisker` command and installer.
|
|
139
|
+
- **Host plugins (`claude-plugin`, `pi-extension`, `antigravity-plugin`, `dsh-plugin`, `herdr-plugin`).** None depends on a workspace package; each invokes `agent-whisker` and standalone `taskstate` as subprocesses. See the [package topology](docs/architecture.md#package-topology).
|
|
140
|
+
|
|
141
|
+
## By role
|
|
142
|
+
|
|
143
|
+
- Connecting agent programs: [CLI guide](packages/cli/README.md), then [Agent programs](packages/cli/README.md#agent-programs)
|
|
144
|
+
- Importing folders and excluding paths: [Ingest](packages/cli/README.md#ingest), then [Core guide](packages/core/README.md)
|
|
145
|
+
- Registering an MCP client manually: [MCP guide](packages/mcp/README.md#manual-registration)
|
|
146
|
+
- Recording checks for post-merge review: [Task state and review](packages/claude-plugin/README.md)
|
|
147
|
+
- Operating and repairing the store: [Architecture](docs/architecture.md), then [Background service](packages/service/README.md)
|
|
148
|
+
- Contributing changes: [Documentation map](docs/README.md), [Roadmap](docs/roadmap.md), and [AGENTS.md](AGENTS.md)
|
|
149
|
+
|
|
150
|
+
## Releases
|
|
151
|
+
|
|
152
|
+
[`main`](https://github.com/Tomatamatom1/agent-whisker/commits/main/) is the development branch. `node scripts/package.ts pack <directory>` builds a self-contained npm tarball from tracked files, and `v*.*.*` release tags publish to npm through GitHub Actions.
|
|
153
|
+
|
|
154
|
+
## License
|
|
155
|
+
|
|
156
|
+
`agent-whisker` is licensed under the [MIT License](LICENSE). The npm package bundles `jieba-wasm` (MIT) and `yaml` (ISC) and retains their upstream license notices.
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# agent-whisker
|
|
2
|
+
|
|
3
|
+
[English](README.md) · 简体中文
|
|
4
|
+
|
|
5
|
+
`agent-whisker` 是面向编码 agent 的本地文档库与会话存储。它在本机索引 Markdown、纯文本、PDF、DOCX 文件以及本地 agent 的历史会话记录。用户与 agent 可通过 CLI 或只读 stdio MCP 服务检索原文段落、物理 PDF 页与对话轮次,并可按需启用读取时段落重排与页面字段提取。
|
|
6
|
+
|
|
7
|
+
## 快速上手
|
|
8
|
+
|
|
9
|
+
从源码检出安装(Node 直接运行 TypeScript;启动器指向该检出目录,请保留仓库位置):
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
git clone https://github.com/Tomatamatom1/agent-whisker.git
|
|
13
|
+
cd agent-whisker
|
|
14
|
+
pnpm install
|
|
15
|
+
node packages/cli/src/main.ts install --dry-run
|
|
16
|
+
node packages/cli/src/main.ts install --apply all
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
从 npm 安装(正式发布后,或按 [npm 打包说明](packages/cli/README.zh-CN.md#npm-包) 使用 `npm install -g <tarball>` 安装本地构建包):
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npm install -g agent-whisker
|
|
23
|
+
agent-whisker install --dry-run
|
|
24
|
+
agent-whisker install --apply all
|
|
25
|
+
agent-whisker doctor
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`agent-whisker` 当前为预发布版本(`0.1.0`)。运行需要 Node `>=24.22.1 <25` 或 `>=26.13.0 <27`(macOS 上需将 `~/.local/bin` 加入 `PATH`)。Markdown 和纯文本直接导入;导入 PDF 文本需要 Poppler 的 `pdftotext`(装有 `qpdf` 时同时支持书签读取与页面切分),导入 DOCX 需要 Pandoc `>=2.15`。
|
|
29
|
+
|
|
30
|
+
CI 在 macOS、Ubuntu 与 Windows 上运行检查。`agent-whisker install` 在 macOS 和 Windows 上配置启动器、后台同步及已安装的 agent 程序;在 Linux 上可直接使用 CLI、stdio MCP 服务与前台 `service run`。详见 [Windows 安装指南](packages/cli/README.zh-CN.md#windows)。
|
|
31
|
+
|
|
32
|
+
## 适用场景
|
|
33
|
+
|
|
34
|
+
- **本地文档检索。** 用 `agent-whisker ingest <path>` 导入运维手册、论文与规范,用 `search` 排列相关段落,用 `grep -F` 查找字面匹配,并用 `read` 打开命中的章节或物理 PDF 页。
|
|
35
|
+
- **Agent 会话历史。** 同步并联合检索本机各编码 agent 的历史会话(`sessions sync`、`sessions search`),或用 `sessions read` 查看前后多轮对话。
|
|
36
|
+
- **只读 MCP 检索。** 向编码 agent 提供七个 stdio 工具(`library_search`、`library_read`、`library_catalog`、`library_grep`、`session_search`、`session_read`、`session_grep`);配置提取端点后额外开放 `library_extract`。
|
|
37
|
+
- **任务记录核验。** 通过 `taskstate` 将用户预期、实际命令运行(`taskstate run --for <E> -- <command>`)与完成声明分开记录,便于合并后由另一模型核对运行结果。
|
|
38
|
+
|
|
39
|
+
## 系统特性
|
|
40
|
+
|
|
41
|
+
- **只追加事实源与可重建索引。** 在 `~/.agent-whisker` 下,`truth/` 保存只追加事件日志、版本化文档正文和留存会话;`derived/` 下的 SQLite FTS5 索引可随时通过 `agent-whisker index repair` 重建。
|
|
42
|
+
- **本机词法检索。** 全文检索使用 Node 内置的 `node:sqlite` 与负责中日韩分词的 `jieba-wasm`。npm 包内置 `jieba-wasm` 和 `yaml`,支持离线安装。
|
|
43
|
+
- **会话留存与敏感信息脱敏。** 会话条目同步后,即便宿主程序清理自身日志仍可读取;符合已知密钥或令牌格式的内容会在留存时脱敏。
|
|
44
|
+
- **版本化原文留存。** 重新导入修改后的文件或传入 `--doc <id>` 会写入该文档的新版本,`read --version <hash>` 可固定读取搜索命中时的版本。
|
|
45
|
+
- **读取时段落筛选。** 设置 `AGENT_WHISKER_RERANK_URL` 与 `AGENT_WHISKER_RERANK_MODEL`(本地 `llama-server` 分组比较可在地址末尾加 `#choice`)可在读取时为 `open` 级候选打分;判定 `confident: false` 时,`hits` 为 `[]`,弱候选仅作为定位信息保留在 `more` 中。
|
|
46
|
+
- **按需页面提取。** 设置 `AGENT_WHISKER_EXTRACT_URL` 后,可通过 `agent-whisker extract` 与 MCP `library_extract` 从 1–4 个指定 PDF 页或图片提取带类型字段(远程端点仅接收 `open` 文档,本机回环端点可读取 `personal` 文档)。
|
|
47
|
+
|
|
48
|
+
[架构说明](docs/architecture.zh-CN.md)写明了上述每项机制的作用边界。
|
|
49
|
+
|
|
50
|
+
## 工作原理
|
|
51
|
+
|
|
52
|
+
[](docs/architecture.zh-CN.md)
|
|
53
|
+
|
|
54
|
+
编码 agent、`~/.agent-whisker`、可选读取时 HTTP 端点与独立 `taskstate` 之间的运行期数据流向。详见[架构说明](docs/architecture.zh-CN.md)。
|
|
55
|
+
|
|
56
|
+
## 支持的 agent 程序
|
|
57
|
+
|
|
58
|
+
`agent-whisker install --apply all` 会为 `AGENT_WHISKER_AGENTS` 中已安装的每款程序注册 MCP 服务、会话采集、上下文指引及 `taskstate` 集成(其他标准 MCP 客户端也可通过 stdio 直接运行 `agent-whisker mcp`):
|
|
59
|
+
|
|
60
|
+
| 程序 | 安装步骤 | 钩子、技能与子代理 |
|
|
61
|
+
| --- | --- | --- |
|
|
62
|
+
| Claude Code | `mcp-claude`、`claude-plugin` | `SessionStart` 与 `UserPromptSubmit` 指引、`taskstate` 钩子与技能、`review` 与 `recall` 子代理([指南](packages/claude-plugin/README.zh-CN.md)) |
|
|
63
|
+
| Codex | `mcp-codex`、`codex-plugin` | 在 `/hooks` 中信任后启用 `SessionStart` 与 `UserPromptSubmit` 指引及 `taskstate` 钩子([指南](packages/claude-plugin/README.zh-CN.md)) |
|
|
64
|
+
| `pi` | `mcp-pi`、`pi-package` | 系统提示与开场指引、`/agent-whisker`、`agent_whisker_wait`、`taskstate` 钩子与技能([指南](packages/pi-extension/README.zh-CN.md)) |
|
|
65
|
+
| Antigravity | `mcp-antigravity`、`antigravity-plugin` | 常驻规则、`SessionStart` 与 `PreInvocation` 钩子、`taskstate` 技能、`review` 子代理([指南](packages/antigravity-plugin/README.zh-CN.md)) |
|
|
66
|
+
| DeepSeek Harness | `mcp-dsh`、`dsh-plugin`、`dsh-skill` | 根会话开场指引、`taskstate` 上下文与技能([指南](packages/dsh-plugin/README.zh-CN.md)) |
|
|
67
|
+
|
|
68
|
+
此外还可通过 `install --apply mcp --via magpie` 经由 Magpie 分发 MCP 条目,或用 `install --apply herdr-plugin,herdr-mod` 接入 Herdr(见 [Herdr 指南](packages/herdr-plugin/README.zh-CN.md))。
|
|
69
|
+
|
|
70
|
+
## 任务核验
|
|
71
|
+
|
|
72
|
+
`taskstate` 是保存在 `~/.local/state/agent-whisker-task` 下的只追加任务台账,由宿主钩子自动注入主会话与子代理上下文。它将四类记录严格分开:用户预期(`expect`)、实际观测到的命令运行(`run`,自动记录退出码、Git 提交、工作区干净状态及可选的 `--target` 文件哈希)、agent 交接声明(`claim`),以及合并后的评审结论(`conclude` 与 `gap`)。
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
taskstate open "Fix upload retry cap" # 开启任务 T1 并挂载当前会话
|
|
76
|
+
taskstate expect "Cap upload retries at 3" --core # 实现前记录核心预期 E1
|
|
77
|
+
taskstate run --for E1 --expect-fail -- pnpm test # 记录修改前的失败基线(红灯)
|
|
78
|
+
# ... 完成代码修改 ...
|
|
79
|
+
taskstate run --for E1 -- pnpm test # 在干净提交上记录通过结果(绿灯)
|
|
80
|
+
taskstate claim "Retry cap enforced; see run log" --for E1
|
|
81
|
+
taskstate facts # 汇总运行记录与核验状态
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
跨目录续做任务可用 `taskstate hold`,暂存伞状任务可用 `taskstate park`。改动合并后,可启动 `review` 子代理(建议使用不同于实现者的模型)对照运行日志与代码差异逐项给出评审结论,确认完成后运行 `taskstate close <T>`。详见 [任务状态与评审](packages/claude-plugin/README.zh-CN.md)。
|
|
85
|
+
|
|
86
|
+
## 使用示例
|
|
87
|
+
|
|
88
|
+
导入文档、检索段落,并跨会话追溯过往决定:
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
agent-whisker ingest ./runbooks
|
|
92
|
+
agent-whisker search "upload retry budget"
|
|
93
|
+
agent-whisker grep -F "UPLOAD_RETRY_LIMIT"
|
|
94
|
+
agent-whisker sessions sync
|
|
95
|
+
agent-whisker sessions search "upload retry budget" --project --group session
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
调用只读 MCP 服务(`tools/call` 请求参数):
|
|
99
|
+
|
|
100
|
+
```json
|
|
101
|
+
{"name":"library_search","arguments":{"queries":["upload retry budget","UPLOAD_RETRY_LIMIT"]}}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{"name":"session_search","arguments":{"queries":["upload retry budget"],"project":true}}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
可选的读取时段落筛选(`System One: Decide`)与 1–4 页字段提取(`Clairic-Flash`):
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
export AGENT_WHISKER_RERANK_URL='http://127.0.0.1:8788/v1/systemone#choice'
|
|
112
|
+
export AGENT_WHISKER_RERANK_MODEL='vllm-d3-lite'
|
|
113
|
+
agent-whisker search "upload retry budget"
|
|
114
|
+
|
|
115
|
+
export AGENT_WHISKER_EXTRACT_URL='http://127.0.0.1:18093/v1/systemone'
|
|
116
|
+
agent-whisker extract "$DOC_ID" --pages 1,2 --fields '{"invoice_total":{"type":"number"}}' --source-only
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## 基准评测与项目边界
|
|
120
|
+
|
|
121
|
+
检索基准在 Apple Silicon、Node `26.13.1` 与 SQLite FTS5(分词器版本 `t3`)上运行,直接评测检出的原始证据。在 LongMemEval-S(共 500 题,每题约 50 个会话的独立存储,其中 470 题含标准证据会话)中,`strict@5` 要求前五条结果包含该题的**全部**证据会话,`hit@5` 要求至少命中一条。
|
|
122
|
+
|
|
123
|
+
| 基准 | 读取方式 | 结果 |
|
|
124
|
+
| --- | --- | --- |
|
|
125
|
+
| LongMemEval-S | 词法会话检索(`store.searchSessions`) | `strict@5` 为 82.3%(387/470);`hit@5` 为 95.3%;p50 约 6–11 ms |
|
|
126
|
+
| ADEBENCH `sets/quick` | 仅词法检索(`rerank=off`) | 核心分 38.7 / 55 |
|
|
127
|
+
| ADEBENCH `sets/quick` | 词法检索 + 读取时 System One: Decide | 核心分 42.1 / 55 |
|
|
128
|
+
| ADEBENCH `sets/public2`(36 题) | 词法检索 + 读取时 System One: Decide | 核心分 43.5 / 55 |
|
|
129
|
+
|
|
130
|
+
在 ADEBENCH `v0.2.17` 中,外部适配器经 CLI 导入数据,通过 stdio 查询 `agent-whisker mcp`(`tools/list` 默认七个工具定义共 9,234 字节;会话检索中位耗时 5 ms,文档为 16 ms)。
|
|
131
|
+
|
|
132
|
+
范围边界:MCP 仅提供只读检索(导入与维护通过 CLI 或后台同步服务执行);导入另一份写有新数值的独立文件时,两份文档均按原貌保留在检索结果中(ADEBENCH `updates`:3.3/10);PDF 导入读取已有文本层,单份原始 PDF 上限 256 MiB(非 PDF 源文件与提取文本上限 64 MiB),不内置自动 OCR。
|
|
133
|
+
|
|
134
|
+
## 包结构与拓扑
|
|
135
|
+
|
|
136
|
+
`packages/` 下包含九个工作区子包:
|
|
137
|
+
|
|
138
|
+
- **运行时依赖图(`cli` → `{mcp, service, core}`,`{mcp, service}` → `core`)。** `core` 负责存储、FTS5 索引、`jieba-wasm` 分词、段落重排与页面提取;`mcp` 提供只读 stdio 服务;`service` 负责后台索引与会话同步;`cli` 提供 `agent-whisker` 命令与安装器。
|
|
139
|
+
- **宿主扩展包(`claude-plugin`、`pi-extension`、`antigravity-plugin`、`dsh-plugin`、`herdr-plugin`)。** 五个扩展包均不依赖任何工作区子包,只通过子进程调用 `agent-whisker` 与独立的 `taskstate`。完整图示见[包拓扑](docs/architecture.zh-CN.md#包拓扑)。
|
|
140
|
+
|
|
141
|
+
## 按角色查阅
|
|
142
|
+
|
|
143
|
+
- 接入本机 agent 程序:[CLI 指南](packages/cli/README.zh-CN.md),以及 [各 agent 程序](packages/cli/README.zh-CN.md#各-agent-程序)
|
|
144
|
+
- 导入目录与排除路径:[导入](packages/cli/README.zh-CN.md#导入),以及 [核心包指南](packages/core/README.zh-CN.md)
|
|
145
|
+
- 手动注册 MCP 客户端:[MCP 指南](packages/mcp/README.zh-CN.md#手动注册)
|
|
146
|
+
- 为合并后评审记录检查:[任务状态与评审](packages/claude-plugin/README.zh-CN.md)
|
|
147
|
+
- 运维与修复本地存储:[架构说明](docs/architecture.zh-CN.md),以及 [后台服务](packages/service/README.zh-CN.md)
|
|
148
|
+
- 参与代码与文档贡献:[文档索引](docs/README.zh-CN.md)、[路线图](docs/roadmap.zh-CN.md) 与 [AGENTS.md](AGENTS.md)
|
|
149
|
+
|
|
150
|
+
## 发布说明
|
|
151
|
+
|
|
152
|
+
[`main`](https://github.com/Tomatamatom1/agent-whisker/commits/main/) 是日常开发分支。运行 `node scripts/package.ts pack <directory>` 可从受管文件构建自包含的 npm 包,推送 `v*.*.*` 标签后由 GitHub Actions 发布至 npm。
|
|
153
|
+
|
|
154
|
+
## 许可证
|
|
155
|
+
|
|
156
|
+
`agent-whisker` 采用 [MIT 许可证](LICENSE)。npm 包内联捆绑了 `jieba-wasm`(MIT)与 `yaml`(ISC),并保留各自的上游许可证声明。
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Copyright (c) 2018 fengkx <liangkx8237@gmail.com>
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any
|
|
4
|
+
person obtaining a copy of this software and associated
|
|
5
|
+
documentation files (the "Software"), to deal in the
|
|
6
|
+
Software without restriction, including without
|
|
7
|
+
limitation the rights to use, copy, modify, merge,
|
|
8
|
+
publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software
|
|
10
|
+
is furnished to do so, subject to the following
|
|
11
|
+
conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice
|
|
14
|
+
shall be included in all copies or substantial portions
|
|
15
|
+
of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
|
18
|
+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
|
19
|
+
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
20
|
+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
|
21
|
+
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
22
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
23
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
|
24
|
+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
25
|
+
DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# jieba-wasm
|
|
2
|
+
|
|
3
|
+
> [jieba-rs](https://github.com/messense/jieba-rs) 的 wasm binding
|
|
4
|
+
|
|
5
|
+
_编译成 WASM 摆脱编译 Node Addon 的烦恼_
|
|
6
|
+
|
|
7
|
+
# Usage
|
|
8
|
+
## Node.js
|
|
9
|
+
```js
|
|
10
|
+
const {
|
|
11
|
+
cut,
|
|
12
|
+
cut_all,
|
|
13
|
+
cut_for_search,
|
|
14
|
+
tokenize,
|
|
15
|
+
add_word,
|
|
16
|
+
} = require("jieba-wasm");
|
|
17
|
+
cut("中华人民共和国武汉市长江大桥", true);
|
|
18
|
+
// [ '中华人民共和国', '武汉市', '长江大桥' ]
|
|
19
|
+
cut_all("中华人民共和国武汉市长江大桥", true);
|
|
20
|
+
/*
|
|
21
|
+
[
|
|
22
|
+
'中', '中华',
|
|
23
|
+
'中华人民', '中华人民共和国',
|
|
24
|
+
'华', '华人',
|
|
25
|
+
'人', '人民',
|
|
26
|
+
'人民共和国', '民',
|
|
27
|
+
'共', '共和',
|
|
28
|
+
'共和国', '和',
|
|
29
|
+
'国', '武',
|
|
30
|
+
'武汉', '武汉市',
|
|
31
|
+
'汉', '市',
|
|
32
|
+
'市长', '长',
|
|
33
|
+
'长江', '长江大桥',
|
|
34
|
+
'江', '大',
|
|
35
|
+
'大桥', '桥'
|
|
36
|
+
]
|
|
37
|
+
*/
|
|
38
|
+
cut_for_search("中华人民共和国武汉市长江大桥", true);
|
|
39
|
+
/*
|
|
40
|
+
[
|
|
41
|
+
'中华', '华人',
|
|
42
|
+
'人民', '共和',
|
|
43
|
+
'共和国', '中华人民共和国',
|
|
44
|
+
'武汉', '武汉市',
|
|
45
|
+
'长江', '大桥',
|
|
46
|
+
'长江大桥'
|
|
47
|
+
]
|
|
48
|
+
*/
|
|
49
|
+
tokenize("中华人民共和国武汉市长江大桥", "default", true);
|
|
50
|
+
/*
|
|
51
|
+
[
|
|
52
|
+
{ word: '中华人民共和国', start: 0, end: 7 },
|
|
53
|
+
{ word: '武汉市', start: 7, end: 10 },
|
|
54
|
+
{ word: '长江大桥', start: 10, end: 14 }
|
|
55
|
+
]
|
|
56
|
+
*/
|
|
57
|
+
tokenize("中华人民共和国武汉市长江大桥", "search", true);
|
|
58
|
+
/*
|
|
59
|
+
[
|
|
60
|
+
{ word: '中华', start: 0, end: 2 },
|
|
61
|
+
{ word: '华人', start: 1, end: 3 },
|
|
62
|
+
{ word: '人民', start: 2, end: 4 },
|
|
63
|
+
{ word: '共和', start: 4, end: 6 },
|
|
64
|
+
{ word: '共和国', start: 4, end: 7 },
|
|
65
|
+
{ word: '中华人民共和国', start: 0, end: 7 },
|
|
66
|
+
{ word: '武汉', start: 7, end: 9 },
|
|
67
|
+
{ word: '武汉市', start: 7, end: 10 },
|
|
68
|
+
{ word: '长江', start: 10, end: 12 },
|
|
69
|
+
{ word: '大桥', start: 12, end: 14 },
|
|
70
|
+
{ word: '长江大桥', start: 10, end: 14 }
|
|
71
|
+
]
|
|
72
|
+
*/
|
|
73
|
+
|
|
74
|
+
cut("桥大江长市汉武的省北湖国和共民人华中");
|
|
75
|
+
/*
|
|
76
|
+
[
|
|
77
|
+
'桥', '大江', '长',
|
|
78
|
+
'市', '汉', '武',
|
|
79
|
+
'的', '省', '北湖',
|
|
80
|
+
'国', '和', '共',
|
|
81
|
+
'民', '人', '华中'
|
|
82
|
+
]
|
|
83
|
+
*/
|
|
84
|
+
["桥大江长", "市汉武", "省北湖", "国和共民人华中"].map((word) => {
|
|
85
|
+
add_word(word);
|
|
86
|
+
});
|
|
87
|
+
cut("桥大江长市汉武的省北湖国和共民人华中");
|
|
88
|
+
// ["桥大江长", "市汉武", "的", "省北湖", "国和共民人华中"];
|
|
89
|
+
|
|
90
|
+
with_dict("自动借书机 1 n"); // 导入自定义字典,词条格式:词语 词频 词性(可选),以换行符分隔
|
|
91
|
+
cut("你好我是一个自动借书机");
|
|
92
|
+
// ["你好", "我", "是", "一个", "自动借书机"];
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Browser
|
|
96
|
+
```ts
|
|
97
|
+
import init, { cut } from 'jieba-wasm';
|
|
98
|
+
|
|
99
|
+
// 重要:使用前必须初始化
|
|
100
|
+
await init();
|
|
101
|
+
|
|
102
|
+
cut("中华人民共和国武汉市长江大桥", true);
|
|
103
|
+
// [ '中华人民共和国', '武汉市', '长江大桥' ]
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
# 示例 Demo
|
|
107
|
+
|
|
108
|
+
## 安装依赖
|
|
109
|
+
|
|
110
|
+
安装 wasm-bindgen 和 wasm-opt
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
cargo install wasm-bindgen-cli --locked
|
|
114
|
+
cargo install wasm-opt --locked
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## 前期准备
|
|
118
|
+
|
|
119
|
+
首先保证存在 rust 环境,然后运行以下命令
|
|
120
|
+
```bash
|
|
121
|
+
npm run build:cargo
|
|
122
|
+
npm run build
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## 运行浏览器端示例
|
|
126
|
+
```bash
|
|
127
|
+
cd demo/web
|
|
128
|
+
npm install
|
|
129
|
+
npm run dev
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
# Piror Art
|
|
133
|
+
|
|
134
|
+
https://github.com/messense/jieba-rs
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "jieba-wasm",
|
|
3
|
+
"version": "2.4.0",
|
|
4
|
+
"description": "WASM binding to jieba-rs",
|
|
5
|
+
"main": "./pkg/nodejs/jieba_rs_wasm.js",
|
|
6
|
+
"types": "./pkg/nodejs/jieba_rs_wasm.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"node": {
|
|
10
|
+
"types": "./pkg/nodejs/jieba_rs_wasm.d.ts",
|
|
11
|
+
"default": "./pkg/nodejs/jieba_rs_wasm.js"
|
|
12
|
+
},
|
|
13
|
+
"deno": {
|
|
14
|
+
"types": "./pkg/deno/jieba_rs_wasm.d.ts",
|
|
15
|
+
"default": "./pkg/deno/jieba_rs_wasm.js"
|
|
16
|
+
},
|
|
17
|
+
"browser": {
|
|
18
|
+
"types": "./pkg/web/jieba_rs_wasm.d.ts",
|
|
19
|
+
"default": "./pkg/web/jieba_rs_wasm.js"
|
|
20
|
+
},
|
|
21
|
+
"import": {
|
|
22
|
+
"types": "./pkg/web/jieba_rs_wasm.d.ts",
|
|
23
|
+
"default": "./pkg/web/jieba_rs_wasm.js"
|
|
24
|
+
},
|
|
25
|
+
"require": {
|
|
26
|
+
"types": "./pkg/nodejs/jieba_rs_wasm.d.ts",
|
|
27
|
+
"default": "./pkg/nodejs/jieba_rs_wasm.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"./web": {
|
|
31
|
+
"types": "./pkg/web/jieba_rs_wasm.d.ts",
|
|
32
|
+
"default": "./pkg/web/jieba_rs_wasm.js"
|
|
33
|
+
},
|
|
34
|
+
"./node": {
|
|
35
|
+
"types": "./pkg/nodejs/jieba_rs_wasm.d.ts",
|
|
36
|
+
"default": "./pkg/nodejs/jieba_rs_wasm.js"
|
|
37
|
+
},
|
|
38
|
+
"./deno": {
|
|
39
|
+
"types": "./pkg/deno/jieba_rs_wasm.d.ts",
|
|
40
|
+
"default": "./pkg/deno/jieba_rs_wasm.js"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"directories": {
|
|
44
|
+
"test": "tests"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "wireit",
|
|
48
|
+
"build:cargo": "wireit",
|
|
49
|
+
"build:bundler": "wireit",
|
|
50
|
+
"build:nodejs": "wireit",
|
|
51
|
+
"build:deno": "wireit",
|
|
52
|
+
"build:web": "wireit",
|
|
53
|
+
"build:opt": "wireit",
|
|
54
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
55
|
+
},
|
|
56
|
+
"wireit": {
|
|
57
|
+
"build:cargo": {
|
|
58
|
+
"command": "cargo build --release --target wasm32-unknown-unknown"
|
|
59
|
+
},
|
|
60
|
+
"build:bundler": {
|
|
61
|
+
"command": "wasm-bindgen target/wasm32-unknown-unknown/release/jieba_rs_wasm.wasm --out-dir ./pkg/bundler --target bundler",
|
|
62
|
+
"dependencies": [
|
|
63
|
+
"build:cargo"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"build:nodejs": {
|
|
67
|
+
"command": "wasm-bindgen target/wasm32-unknown-unknown/release/jieba_rs_wasm.wasm --out-dir ./pkg/nodejs --target nodejs",
|
|
68
|
+
"dependencies": [
|
|
69
|
+
"build:cargo"
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"build:deno": {
|
|
73
|
+
"command": "wasm-bindgen target/wasm32-unknown-unknown/release/jieba_rs_wasm.wasm --out-dir ./pkg/deno --target deno",
|
|
74
|
+
"dependencies": [
|
|
75
|
+
"build:cargo"
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"build:web": {
|
|
79
|
+
"command": "wasm-bindgen target/wasm32-unknown-unknown/release/jieba_rs_wasm.wasm --out-dir ./pkg/web --target web",
|
|
80
|
+
"dependencies": [
|
|
81
|
+
"build:cargo"
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
"build": {
|
|
85
|
+
"dependencies": [
|
|
86
|
+
"build:cargo",
|
|
87
|
+
"build:bundler",
|
|
88
|
+
"build:nodejs",
|
|
89
|
+
"build:deno",
|
|
90
|
+
"build:web",
|
|
91
|
+
"build:opt"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
"build:opt": {
|
|
95
|
+
"command": "node scripts/opt.js",
|
|
96
|
+
"dependencies": [
|
|
97
|
+
"build:cargo",
|
|
98
|
+
"build:bundler",
|
|
99
|
+
"build:nodejs",
|
|
100
|
+
"build:deno",
|
|
101
|
+
"build:web"
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"files": [
|
|
106
|
+
"pkg/**/*"
|
|
107
|
+
],
|
|
108
|
+
"repository": {
|
|
109
|
+
"type": "git",
|
|
110
|
+
"url": "git+https://github.com/fengkx/jieba-wasm.git"
|
|
111
|
+
},
|
|
112
|
+
"keywords": [
|
|
113
|
+
"wasm",
|
|
114
|
+
"jieba",
|
|
115
|
+
"chinese",
|
|
116
|
+
"segment",
|
|
117
|
+
"中文分词"
|
|
118
|
+
],
|
|
119
|
+
"author": "fengkx",
|
|
120
|
+
"license": "MIT",
|
|
121
|
+
"bugs": {
|
|
122
|
+
"url": "https://github.com/fengkx/jieba-wasm/issues"
|
|
123
|
+
},
|
|
124
|
+
"homepage": "https://github.com/fengkx/jieba-wasm#readme",
|
|
125
|
+
"devDependencies": {
|
|
126
|
+
"@jsdevtools/ez-spawn": "^3.0.4",
|
|
127
|
+
"wireit": "^0.14.4"
|
|
128
|
+
}
|
|
129
|
+
}
|