trail-code 0.0.0-stage → 0.28.0-semantic.3
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/LICENSE +21 -0
- package/README.md +567 -2
- package/dist/ai/crux.d.ts +88 -0
- package/dist/ai/crux.d.ts.map +1 -0
- package/dist/ai/crux.js +219 -0
- package/dist/ai/crux.js.map +1 -0
- package/dist/ai/failure.d.ts +60 -0
- package/dist/ai/failure.d.ts.map +1 -0
- package/dist/ai/failure.js +86 -0
- package/dist/ai/failure.js.map +1 -0
- package/dist/ai/llm/anthropic.d.ts +37 -0
- package/dist/ai/llm/anthropic.d.ts.map +1 -0
- package/dist/ai/llm/anthropic.js +144 -0
- package/dist/ai/llm/anthropic.js.map +1 -0
- package/dist/ai/llm/factory.d.ts +28 -0
- package/dist/ai/llm/factory.d.ts.map +1 -0
- package/dist/ai/llm/factory.js +36 -0
- package/dist/ai/llm/factory.js.map +1 -0
- package/dist/ai/llm/litellm.d.ts +34 -0
- package/dist/ai/llm/litellm.d.ts.map +1 -0
- package/dist/ai/llm/litellm.js +45 -0
- package/dist/ai/llm/litellm.js.map +1 -0
- package/dist/ai/llm/openai.d.ts +145 -0
- package/dist/ai/llm/openai.d.ts.map +1 -0
- package/dist/ai/llm/openai.js +629 -0
- package/dist/ai/llm/openai.js.map +1 -0
- package/dist/ai/llm/orcarouter.d.ts +34 -0
- package/dist/ai/llm/orcarouter.d.ts.map +1 -0
- package/dist/ai/llm/orcarouter.js +45 -0
- package/dist/ai/llm/orcarouter.js.map +1 -0
- package/dist/ai/llm/recover-tool.d.ts +21 -0
- package/dist/ai/llm/recover-tool.d.ts.map +1 -0
- package/dist/ai/llm/recover-tool.js +109 -0
- package/dist/ai/llm/recover-tool.js.map +1 -0
- package/dist/ai/llm/types.d.ts +122 -0
- package/dist/ai/llm/types.d.ts.map +1 -0
- package/dist/ai/llm/types.js +33 -0
- package/dist/ai/llm/types.js.map +1 -0
- package/dist/ai/providers.d.ts +59 -0
- package/dist/ai/providers.d.ts.map +1 -0
- package/dist/ai/providers.js +54 -0
- package/dist/ai/providers.js.map +1 -0
- package/dist/ai/summarize.d.ts +25 -0
- package/dist/ai/summarize.d.ts.map +1 -0
- package/dist/ai/summarize.js +34 -0
- package/dist/ai/summarize.js.map +1 -0
- package/dist/ai/synthesize.d.ts +40 -0
- package/dist/ai/synthesize.d.ts.map +1 -0
- package/dist/ai/synthesize.js +230 -0
- package/dist/ai/synthesize.js.map +1 -0
- package/dist/ask/ask.d.ts +199 -0
- package/dist/ask/ask.d.ts.map +1 -0
- package/dist/ask/ask.js +1291 -0
- package/dist/ask/ask.js.map +1 -0
- package/dist/ask/file-rank.d.ts +72 -0
- package/dist/ask/file-rank.d.ts.map +1 -0
- package/dist/ask/file-rank.js +160 -0
- package/dist/ask/file-rank.js.map +1 -0
- package/dist/ask/file-selection.d.ts +22 -0
- package/dist/ask/file-selection.d.ts.map +1 -0
- package/dist/ask/file-selection.js +66 -0
- package/dist/ask/file-selection.js.map +1 -0
- package/dist/ask/fuse.d.ts +195 -0
- package/dist/ask/fuse.d.ts.map +1 -0
- package/dist/ask/fuse.js +344 -0
- package/dist/ask/fuse.js.map +1 -0
- package/dist/ask/graphrank.d.ts +61 -0
- package/dist/ask/graphrank.d.ts.map +1 -0
- package/dist/ask/graphrank.js +130 -0
- package/dist/ask/graphrank.js.map +1 -0
- package/dist/ask/index-file.d.ts +44 -0
- package/dist/ask/index-file.d.ts.map +1 -0
- package/dist/ask/index-file.js +128 -0
- package/dist/ask/index-file.js.map +1 -0
- package/dist/ask/semantic.d.ts +42 -0
- package/dist/ask/semantic.d.ts.map +1 -0
- package/dist/ask/semantic.js +293 -0
- package/dist/ask/semantic.js.map +1 -0
- package/dist/bin/graft.d.ts +3 -0
- package/dist/bin/graft.d.ts.map +1 -0
- package/dist/bin/graft.js +14 -0
- package/dist/bin/graft.js.map +1 -0
- package/dist/bin/trail.d.ts +3 -0
- package/dist/bin/trail.d.ts.map +1 -0
- package/dist/bin/trail.js +13 -0
- package/dist/bin/trail.js.map +1 -0
- package/dist/blast/blast-cli.d.ts +35 -0
- package/dist/blast/blast-cli.d.ts.map +1 -0
- package/dist/blast/blast-cli.js +155 -0
- package/dist/blast/blast-cli.js.map +1 -0
- package/dist/blast/blast.d.ts +128 -0
- package/dist/blast/blast.d.ts.map +1 -0
- package/dist/blast/blast.js +383 -0
- package/dist/blast/blast.js.map +1 -0
- package/dist/blast/diff.d.ts +53 -0
- package/dist/blast/diff.d.ts.map +1 -0
- package/dist/blast/diff.js +193 -0
- package/dist/blast/diff.js.map +1 -0
- package/dist/blast/evidence.d.ts +51 -0
- package/dist/blast/evidence.d.ts.map +1 -0
- package/dist/blast/evidence.js +162 -0
- package/dist/blast/evidence.js.map +1 -0
- package/dist/blast/modules.d.ts +33 -0
- package/dist/blast/modules.d.ts.map +1 -0
- package/dist/blast/modules.js +83 -0
- package/dist/blast/modules.js.map +1 -0
- package/dist/blast/name.d.ts +74 -0
- package/dist/blast/name.d.ts.map +1 -0
- package/dist/blast/name.js +269 -0
- package/dist/blast/name.js.map +1 -0
- package/dist/blast/owners.d.ts +85 -0
- package/dist/blast/owners.d.ts.map +1 -0
- package/dist/blast/owners.js +272 -0
- package/dist/blast/owners.js.map +1 -0
- package/dist/blast/render.d.ts +46 -0
- package/dist/blast/render.d.ts.map +1 -0
- package/dist/blast/render.js +422 -0
- package/dist/blast/render.js.map +1 -0
- package/dist/blast/viz.d.ts +37 -0
- package/dist/blast/viz.d.ts.map +1 -0
- package/dist/blast/viz.js +180 -0
- package/dist/blast/viz.js.map +1 -0
- package/dist/brand.d.ts +111 -0
- package/dist/brand.d.ts.map +1 -0
- package/dist/brand.js +282 -0
- package/dist/brand.js.map +1 -0
- package/dist/claude/build-progress.d.ts +30 -0
- package/dist/claude/build-progress.d.ts.map +1 -0
- package/dist/claude/build-progress.js +81 -0
- package/dist/claude/build-progress.js.map +1 -0
- package/dist/claude/hermes-skill-template.d.ts +16 -0
- package/dist/claude/hermes-skill-template.d.ts.map +1 -0
- package/dist/claude/hermes-skill-template.js +154 -0
- package/dist/claude/hermes-skill-template.js.map +1 -0
- package/dist/claude/init.d.ts +65 -0
- package/dist/claude/init.d.ts.map +1 -0
- package/dist/claude/init.js +258 -0
- package/dist/claude/init.js.map +1 -0
- package/dist/claude/paths.d.ts +9 -0
- package/dist/claude/paths.d.ts.map +1 -0
- package/dist/claude/paths.js +22 -0
- package/dist/claude/paths.js.map +1 -0
- package/dist/claude/session-metrics.d.ts +73 -0
- package/dist/claude/session-metrics.d.ts.map +1 -0
- package/dist/claude/session-metrics.js +209 -0
- package/dist/claude/session-metrics.js.map +1 -0
- package/dist/claude/settings-merge.d.ts +76 -0
- package/dist/claude/settings-merge.d.ts.map +1 -0
- package/dist/claude/settings-merge.js +283 -0
- package/dist/claude/settings-merge.js.map +1 -0
- package/dist/claude/skill-template.d.ts +13 -0
- package/dist/claude/skill-template.d.ts.map +1 -0
- package/dist/claude/skill-template.js +290 -0
- package/dist/claude/skill-template.js.map +1 -0
- package/dist/claude/state.d.ts +85 -0
- package/dist/claude/state.d.ts.map +1 -0
- package/dist/claude/state.js +88 -0
- package/dist/claude/state.js.map +1 -0
- package/dist/claude/stats.d.ts +5 -0
- package/dist/claude/stats.d.ts.map +1 -0
- package/dist/claude/stats.js +24 -0
- package/dist/claude/stats.js.map +1 -0
- package/dist/cli-epilogue.d.ts +12 -0
- package/dist/cli-epilogue.d.ts.map +1 -0
- package/dist/cli-epilogue.js +72 -0
- package/dist/cli-epilogue.js.map +1 -0
- package/dist/cli-meta.d.ts +82 -0
- package/dist/cli-meta.d.ts.map +1 -0
- package/dist/cli-meta.js +238 -0
- package/dist/cli-meta.js.map +1 -0
- package/dist/cli-picker.d.ts +139 -0
- package/dist/cli-picker.d.ts.map +1 -0
- package/dist/cli-picker.js +439 -0
- package/dist/cli-picker.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +1638 -0
- package/dist/cli.js.map +1 -0
- package/dist/context/batches.d.ts +29 -0
- package/dist/context/batches.d.ts.map +1 -0
- package/dist/context/batches.js +130 -0
- package/dist/context/batches.js.map +1 -0
- package/dist/context/build.d.ts +57 -0
- package/dist/context/build.d.ts.map +1 -0
- package/dist/context/build.js +396 -0
- package/dist/context/build.js.map +1 -0
- package/dist/context/check.d.ts +42 -0
- package/dist/context/check.d.ts.map +1 -0
- package/dist/context/check.js +162 -0
- package/dist/context/check.js.map +1 -0
- package/dist/context/map-dir.d.ts +13 -0
- package/dist/context/map-dir.d.ts.map +1 -0
- package/dist/context/map-dir.js +81 -0
- package/dist/context/map-dir.js.map +1 -0
- package/dist/context/node-file.d.ts +109 -0
- package/dist/context/node-file.d.ts.map +1 -0
- package/dist/context/node-file.js +390 -0
- package/dist/context/node-file.js.map +1 -0
- package/dist/context/price.d.ts +49 -0
- package/dist/context/price.d.ts.map +1 -0
- package/dist/context/price.js +83 -0
- package/dist/context/price.js.map +1 -0
- package/dist/context/savings.d.ts +67 -0
- package/dist/context/savings.d.ts.map +1 -0
- package/dist/context/savings.js +125 -0
- package/dist/context/savings.js.map +1 -0
- package/dist/engine.d.ts +85 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +122 -0
- package/dist/engine.js.map +1 -0
- package/dist/graph/bindings.d.ts +64 -0
- package/dist/graph/bindings.d.ts.map +1 -0
- package/dist/graph/bindings.js +713 -0
- package/dist/graph/bindings.js.map +1 -0
- package/dist/graph/build-run.d.ts +25 -0
- package/dist/graph/build-run.d.ts.map +1 -0
- package/dist/graph/build-run.js +121 -0
- package/dist/graph/build-run.js.map +1 -0
- package/dist/graph/build.d.ts +88 -0
- package/dist/graph/build.d.ts.map +1 -0
- package/dist/graph/build.js +386 -0
- package/dist/graph/build.js.map +1 -0
- package/dist/graph/cards.d.ts +46 -0
- package/dist/graph/cards.d.ts.map +1 -0
- package/dist/graph/cards.js +280 -0
- package/dist/graph/cards.js.map +1 -0
- package/dist/graph/check.d.ts +25 -0
- package/dist/graph/check.d.ts.map +1 -0
- package/dist/graph/check.js +192 -0
- package/dist/graph/check.js.map +1 -0
- package/dist/graph/container.d.ts +63 -0
- package/dist/graph/container.d.ts.map +1 -0
- package/dist/graph/container.js +191 -0
- package/dist/graph/container.js.map +1 -0
- package/dist/graph/depth-parser.d.ts +61 -0
- package/dist/graph/depth-parser.d.ts.map +1 -0
- package/dist/graph/depth-parser.js +153 -0
- package/dist/graph/depth-parser.js.map +1 -0
- package/dist/graph/enrich.d.ts +62 -0
- package/dist/graph/enrich.d.ts.map +1 -0
- package/dist/graph/enrich.js +258 -0
- package/dist/graph/enrich.js.map +1 -0
- package/dist/graph/extract-cache.d.ts +101 -0
- package/dist/graph/extract-cache.d.ts.map +1 -0
- package/dist/graph/extract-cache.js +199 -0
- package/dist/graph/extract-cache.js.map +1 -0
- package/dist/graph/extract.d.ts +85 -0
- package/dist/graph/extract.d.ts.map +1 -0
- package/dist/graph/extract.js +2377 -0
- package/dist/graph/extract.js.map +1 -0
- package/dist/graph/fingerprint.d.ts +76 -0
- package/dist/graph/fingerprint.d.ts.map +1 -0
- package/dist/graph/fingerprint.js +160 -0
- package/dist/graph/fingerprint.js.map +1 -0
- package/dist/graph/generic.d.ts +74 -0
- package/dist/graph/generic.d.ts.map +1 -0
- package/dist/graph/generic.js +773 -0
- package/dist/graph/generic.js.map +1 -0
- package/dist/graph/invariants.d.ts +33 -0
- package/dist/graph/invariants.d.ts.map +1 -0
- package/dist/graph/invariants.js +52 -0
- package/dist/graph/invariants.js.map +1 -0
- package/dist/graph/load.d.ts +29 -0
- package/dist/graph/load.d.ts.map +1 -0
- package/dist/graph/load.js +97 -0
- package/dist/graph/load.js.map +1 -0
- package/dist/graph/lsp/client.d.ts +61 -0
- package/dist/graph/lsp/client.d.ts.map +1 -0
- package/dist/graph/lsp/client.js +217 -0
- package/dist/graph/lsp/client.js.map +1 -0
- package/dist/graph/lsp/enrich.d.ts +11 -0
- package/dist/graph/lsp/enrich.d.ts.map +1 -0
- package/dist/graph/lsp/enrich.js +163 -0
- package/dist/graph/lsp/enrich.js.map +1 -0
- package/dist/graph/lsp/registry.d.ts +22 -0
- package/dist/graph/lsp/registry.d.ts.map +1 -0
- package/dist/graph/lsp/registry.js +71 -0
- package/dist/graph/lsp/registry.js.map +1 -0
- package/dist/graph/map.d.ts +107 -0
- package/dist/graph/map.d.ts.map +1 -0
- package/dist/graph/map.js +239 -0
- package/dist/graph/map.js.map +1 -0
- package/dist/graph/markdown.d.ts +22 -0
- package/dist/graph/markdown.d.ts.map +1 -0
- package/dist/graph/markdown.js +143 -0
- package/dist/graph/markdown.js.map +1 -0
- package/dist/graph/native.d.ts +46 -0
- package/dist/graph/native.d.ts.map +1 -0
- package/dist/graph/native.js +169 -0
- package/dist/graph/native.js.map +1 -0
- package/dist/graph/queries/c.scm +13 -0
- package/dist/graph/queries/c_sharp.scm +19 -0
- package/dist/graph/queries/clojure.scm +58 -0
- package/dist/graph/queries/cpp.scm +23 -0
- package/dist/graph/queries/dart.scm +42 -0
- package/dist/graph/queries/elixir.scm +54 -0
- package/dist/graph/queries/gleam.scm +51 -0
- package/dist/graph/queries/java.scm +20 -0
- package/dist/graph/queries/kotlin.scm +43 -0
- package/dist/graph/queries/lua.scm +36 -0
- package/dist/graph/queries/nix.scm +32 -0
- package/dist/graph/queries/php.scm +40 -0
- package/dist/graph/queries/ruby.scm +65 -0
- package/dist/graph/queries/rust.scm +41 -0
- package/dist/graph/queries/scala.scm +66 -0
- package/dist/graph/queries/solidity.scm +43 -0
- package/dist/graph/queries/swift.scm +51 -0
- package/dist/graph/refresh.d.ts +106 -0
- package/dist/graph/refresh.d.ts.map +1 -0
- package/dist/graph/refresh.js +430 -0
- package/dist/graph/refresh.js.map +1 -0
- package/dist/graph/relations.d.ts +14 -0
- package/dist/graph/relations.d.ts.map +1 -0
- package/dist/graph/relations.js +8 -0
- package/dist/graph/relations.js.map +1 -0
- package/dist/graph/resolve.d.ts +17 -0
- package/dist/graph/resolve.d.ts.map +1 -0
- package/dist/graph/resolve.js +716 -0
- package/dist/graph/resolve.js.map +1 -0
- package/dist/graph/root.d.ts +11 -0
- package/dist/graph/root.d.ts.map +1 -0
- package/dist/graph/root.js +40 -0
- package/dist/graph/root.js.map +1 -0
- package/dist/graph/scopes.d.ts +40 -0
- package/dist/graph/scopes.d.ts.map +1 -0
- package/dist/graph/scopes.js +383 -0
- package/dist/graph/scopes.js.map +1 -0
- package/dist/graph/seed.d.ts +38 -0
- package/dist/graph/seed.d.ts.map +1 -0
- package/dist/graph/seed.js +229 -0
- package/dist/graph/seed.js.map +1 -0
- package/dist/graph/source-files.d.ts +46 -0
- package/dist/graph/source-files.d.ts.map +1 -0
- package/dist/graph/source-files.js +118 -0
- package/dist/graph/source-files.js.map +1 -0
- package/dist/graph/traverse-cli.d.ts +55 -0
- package/dist/graph/traverse-cli.d.ts.map +1 -0
- package/dist/graph/traverse-cli.js +189 -0
- package/dist/graph/traverse-cli.js.map +1 -0
- package/dist/graph/traverse.d.ts +112 -0
- package/dist/graph/traverse.d.ts.map +1 -0
- package/dist/graph/traverse.js +192 -0
- package/dist/graph/traverse.js.map +1 -0
- package/dist/graph/types.d.ts +78 -0
- package/dist/graph/types.d.ts.map +1 -0
- package/dist/graph/types.js +14 -0
- package/dist/graph/types.js.map +1 -0
- package/dist/graph/wasm-runtime.d.ts +19 -0
- package/dist/graph/wasm-runtime.d.ts.map +1 -0
- package/dist/graph/wasm-runtime.js +38 -0
- package/dist/graph/wasm-runtime.js.map +1 -0
- package/dist/graph/workspace-cli.d.ts +56 -0
- package/dist/graph/workspace-cli.d.ts.map +1 -0
- package/dist/graph/workspace-cli.js +111 -0
- package/dist/graph/workspace-cli.js.map +1 -0
- package/dist/graph/workspace.d.ts +172 -0
- package/dist/graph/workspace.d.ts.map +1 -0
- package/dist/graph/workspace.js +714 -0
- package/dist/graph/workspace.js.map +1 -0
- package/dist/graph/write.d.ts +13 -0
- package/dist/graph/write.d.ts.map +1 -0
- package/dist/graph/write.js +86 -0
- package/dist/graph/write.js.map +1 -0
- package/dist/hosts/antigravity.d.ts +14 -0
- package/dist/hosts/antigravity.d.ts.map +1 -0
- package/dist/hosts/antigravity.js +59 -0
- package/dist/hosts/antigravity.js.map +1 -0
- package/dist/hosts/auto.d.ts +37 -0
- package/dist/hosts/auto.d.ts.map +1 -0
- package/dist/hosts/auto.js +141 -0
- package/dist/hosts/auto.js.map +1 -0
- package/dist/hosts/claude-global.d.ts +72 -0
- package/dist/hosts/claude-global.d.ts.map +1 -0
- package/dist/hosts/claude-global.js +230 -0
- package/dist/hosts/claude-global.js.map +1 -0
- package/dist/hosts/config-write.d.ts +36 -0
- package/dist/hosts/config-write.d.ts.map +1 -0
- package/dist/hosts/config-write.js +64 -0
- package/dist/hosts/config-write.js.map +1 -0
- package/dist/hosts/init.d.ts +28 -0
- package/dist/hosts/init.d.ts.map +1 -0
- package/dist/hosts/init.js +89 -0
- package/dist/hosts/init.js.map +1 -0
- package/dist/hosts/instructions.d.ts +14 -0
- package/dist/hosts/instructions.d.ts.map +1 -0
- package/dist/hosts/instructions.js +95 -0
- package/dist/hosts/instructions.js.map +1 -0
- package/dist/hosts/mcp-config.d.ts +78 -0
- package/dist/hosts/mcp-config.d.ts.map +1 -0
- package/dist/hosts/mcp-config.js +251 -0
- package/dist/hosts/mcp-config.js.map +1 -0
- package/dist/hosts/plan.d.ts +32 -0
- package/dist/hosts/plan.d.ts.map +1 -0
- package/dist/hosts/plan.js +73 -0
- package/dist/hosts/plan.js.map +1 -0
- package/dist/hosts/registry.d.ts +41 -0
- package/dist/hosts/registry.d.ts.map +1 -0
- package/dist/hosts/registry.js +164 -0
- package/dist/hosts/registry.js.map +1 -0
- package/dist/hosts/retract.d.ts +47 -0
- package/dist/hosts/retract.d.ts.map +1 -0
- package/dist/hosts/retract.js +520 -0
- package/dist/hosts/retract.js.map +1 -0
- package/dist/hosts/sections.d.ts +47 -0
- package/dist/hosts/sections.d.ts.map +1 -0
- package/dist/hosts/sections.js +127 -0
- package/dist/hosts/sections.js.map +1 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/dist/ingest/fs.d.ts +79 -0
- package/dist/ingest/fs.d.ts.map +1 -0
- package/dist/ingest/fs.js +306 -0
- package/dist/ingest/fs.js.map +1 -0
- package/dist/init-guard.d.ts +16 -0
- package/dist/init-guard.d.ts.map +1 -0
- package/dist/init-guard.js +27 -0
- package/dist/init-guard.js.map +1 -0
- package/dist/mcp/instructions.d.ts +5 -0
- package/dist/mcp/instructions.d.ts.map +1 -0
- package/dist/mcp/instructions.js +64 -0
- package/dist/mcp/instructions.js.map +1 -0
- package/dist/mcp/kept-listing.d.ts +27 -0
- package/dist/mcp/kept-listing.d.ts.map +1 -0
- package/dist/mcp/kept-listing.js +63 -0
- package/dist/mcp/kept-listing.js.map +1 -0
- package/dist/mcp/server.d.ts +4 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +147 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tool-names.d.ts +27 -0
- package/dist/mcp/tool-names.d.ts.map +1 -0
- package/dist/mcp/tool-names.js +47 -0
- package/dist/mcp/tool-names.js.map +1 -0
- package/dist/mcp/tools.d.ts +22 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +440 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/node-version.d.ts +15 -0
- package/dist/node-version.d.ts.map +1 -0
- package/dist/node-version.js +23 -0
- package/dist/node-version.js.map +1 -0
- package/dist/search/grep-cli.d.ts +35 -0
- package/dist/search/grep-cli.d.ts.map +1 -0
- package/dist/search/grep-cli.js +115 -0
- package/dist/search/grep-cli.js.map +1 -0
- package/dist/search/grep.d.ts +60 -0
- package/dist/search/grep.d.ts.map +1 -0
- package/dist/search/grep.js +143 -0
- package/dist/search/grep.js.map +1 -0
- package/dist/search/ignored-code.d.ts +9 -0
- package/dist/search/ignored-code.d.ts.map +1 -0
- package/dist/search/ignored-code.js +73 -0
- package/dist/search/ignored-code.js.map +1 -0
- package/dist/search/user-regexp.d.ts +26 -0
- package/dist/search/user-regexp.d.ts.map +1 -0
- package/dist/search/user-regexp.js +150 -0
- package/dist/search/user-regexp.js.map +1 -0
- package/dist/telemetry/contract.d.ts +117 -0
- package/dist/telemetry/contract.d.ts.map +1 -0
- package/dist/telemetry/contract.js +341 -0
- package/dist/telemetry/contract.js.map +1 -0
- package/dist/telemetry/flush.d.ts +21 -0
- package/dist/telemetry/flush.d.ts.map +1 -0
- package/dist/telemetry/flush.js +85 -0
- package/dist/telemetry/flush.js.map +1 -0
- package/dist/telemetry/gate.d.ts +30 -0
- package/dist/telemetry/gate.d.ts.map +1 -0
- package/dist/telemetry/gate.js +81 -0
- package/dist/telemetry/gate.js.map +1 -0
- package/dist/telemetry/identity.d.ts +40 -0
- package/dist/telemetry/identity.d.ts.map +1 -0
- package/dist/telemetry/identity.js +80 -0
- package/dist/telemetry/identity.js.map +1 -0
- package/dist/telemetry/index.d.ts +18 -0
- package/dist/telemetry/index.d.ts.map +1 -0
- package/dist/telemetry/index.js +16 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/telemetry/key.d.ts +21 -0
- package/dist/telemetry/key.d.ts.map +1 -0
- package/dist/telemetry/key.js +49 -0
- package/dist/telemetry/key.js.map +1 -0
- package/dist/telemetry/notice.d.ts +19 -0
- package/dist/telemetry/notice.d.ts.map +1 -0
- package/dist/telemetry/notice.js +93 -0
- package/dist/telemetry/notice.js.map +1 -0
- package/dist/telemetry/queue.d.ts +35 -0
- package/dist/telemetry/queue.d.ts.map +1 -0
- package/dist/telemetry/queue.js +162 -0
- package/dist/telemetry/queue.js.map +1 -0
- package/dist/telemetry/send.d.ts +19 -0
- package/dist/telemetry/send.d.ts.map +1 -0
- package/dist/telemetry/send.js +84 -0
- package/dist/telemetry/send.js.map +1 -0
- package/dist/telemetry/sessions.d.ts +25 -0
- package/dist/telemetry/sessions.d.ts.map +1 -0
- package/dist/telemetry/sessions.js +104 -0
- package/dist/telemetry/sessions.js.map +1 -0
- package/dist/telemetry/track.d.ts +62 -0
- package/dist/telemetry/track.d.ts.map +1 -0
- package/dist/telemetry/track.js +143 -0
- package/dist/telemetry/track.js.map +1 -0
- package/dist/upkeep-run.d.ts +22 -0
- package/dist/upkeep-run.d.ts.map +1 -0
- package/dist/upkeep-run.js +85 -0
- package/dist/upkeep-run.js.map +1 -0
- package/dist/upkeep.d.ts +127 -0
- package/dist/upkeep.d.ts.map +1 -0
- package/dist/upkeep.js +252 -0
- package/dist/upkeep.js.map +1 -0
- package/dist/util/actions-folder.d.ts +2 -0
- package/dist/util/actions-folder.d.ts.map +1 -0
- package/dist/util/actions-folder.js +9 -0
- package/dist/util/actions-folder.js.map +1 -0
- package/dist/util/browser.d.ts +3 -0
- package/dist/util/browser.d.ts.map +1 -0
- package/dist/util/browser.js +14 -0
- package/dist/util/browser.js.map +1 -0
- package/dist/util/child-process.d.ts +15 -0
- package/dist/util/child-process.d.ts.map +1 -0
- package/dist/util/child-process.js +15 -0
- package/dist/util/child-process.js.map +1 -0
- package/dist/util/front-matter.d.ts +46 -0
- package/dist/util/front-matter.d.ts.map +1 -0
- package/dist/util/front-matter.js +113 -0
- package/dist/util/front-matter.js.map +1 -0
- package/dist/util/id.d.ts +7 -0
- package/dist/util/id.d.ts.map +1 -0
- package/dist/util/id.js +14 -0
- package/dist/util/id.js.map +1 -0
- package/dist/util/paths.d.ts +29 -0
- package/dist/util/paths.d.ts.map +1 -0
- package/dist/util/paths.js +71 -0
- package/dist/util/paths.js.map +1 -0
- package/dist/util/private-file.d.ts +14 -0
- package/dist/util/private-file.d.ts.map +1 -0
- package/dist/util/private-file.js +82 -0
- package/dist/util/private-file.js.map +1 -0
- package/dist/util/source.d.ts +4 -0
- package/dist/util/source.d.ts.map +1 -0
- package/dist/util/source.js +12 -0
- package/dist/util/source.js.map +1 -0
- package/dist/util/spinner.d.ts +15 -0
- package/dist/util/spinner.d.ts.map +1 -0
- package/dist/util/spinner.js +52 -0
- package/dist/util/spinner.js.map +1 -0
- package/dist/util/state.d.ts +120 -0
- package/dist/util/state.d.ts.map +1 -0
- package/dist/util/state.js +264 -0
- package/dist/util/state.js.map +1 -0
- package/dist/vendor/grammars/tree-sitter-go.LICENSE +21 -0
- package/dist/vendor/grammars/tree-sitter-go.wasm +0 -0
- package/dist/vendor/grammars/tree-sitter-java.LICENSE +21 -0
- package/dist/vendor/grammars/tree-sitter-java.wasm +0 -0
- package/dist/vendor/grammars/tree-sitter-kotlin.LICENSE +9 -0
- package/dist/vendor/grammars/tree-sitter-kotlin.wasm +0 -0
- package/dist/vendor/grammars/tree-sitter-php.LICENSE +22 -0
- package/dist/vendor/grammars/tree-sitter-php.wasm +0 -0
- package/dist/vendor/grammars/tree-sitter-python.LICENSE +21 -0
- package/dist/vendor/grammars/tree-sitter-python.wasm +0 -0
- package/dist/vendor/grammars/tree-sitter-r.LICENSE +9 -0
- package/dist/vendor/grammars/tree-sitter-r.wasm +0 -0
- package/dist/vendor/grammars/tree-sitter-swift.LICENSE +21 -0
- package/dist/vendor/grammars/tree-sitter-swift.wasm +0 -0
- package/dist/vendor/grammars/tree-sitter-tsx.wasm +0 -0
- package/dist/vendor/grammars/tree-sitter-typescript.LICENSE +21 -0
- package/dist/vendor/grammars/tree-sitter-typescript.wasm +0 -0
- package/dist/viewer/app.js +2 -0
- package/dist/viewer/index.html +49 -0
- package/dist/viewer/style.css +154 -0
- package/dist/viz/assemble.d.ts +83 -0
- package/dist/viz/assemble.d.ts.map +1 -0
- package/dist/viz/assemble.js +101 -0
- package/dist/viz/assemble.js.map +1 -0
- package/dist/viz/export.d.ts +39 -0
- package/dist/viz/export.d.ts.map +1 -0
- package/dist/viz/export.js +98 -0
- package/dist/viz/export.js.map +1 -0
- package/dist/viz/serve.d.ts +13 -0
- package/dist/viz/serve.d.ts.map +1 -0
- package/dist/viz/serve.js +130 -0
- package/dist/viz/serve.js.map +1 -0
- package/package.json +115 -4
- package/scripts/build-grammar-wasm.mjs +112 -0
- package/scripts/build-viewer.mjs +44 -0
- package/scripts/graph-quality.mjs +117 -0
- package/scripts/pack-trail.mjs +53 -0
- package/scripts/postinstall.mjs +65 -0
- package/scripts/run-tests.mjs +72 -0
- package/scripts/stamp-telemetry-key.mjs +56 -0
- package/scripts/tally-audit.mjs +140 -0
- package/scripts/vendor-grammars.mjs +53 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
export interface Stats {
|
|
2
|
+
nodeCount: number;
|
|
3
|
+
edgeCount: number;
|
|
4
|
+
languages: string[];
|
|
5
|
+
totalCount: number;
|
|
6
|
+
readyCount: number;
|
|
7
|
+
staleCount: number;
|
|
8
|
+
dirty: boolean;
|
|
9
|
+
syncing: boolean;
|
|
10
|
+
syncedAt: string | null;
|
|
11
|
+
lastFile: string | null;
|
|
12
|
+
}
|
|
13
|
+
export declare const LOCK_STALE_MS = 300000;
|
|
14
|
+
export declare function emptyStats(): Stats;
|
|
15
|
+
/**
|
|
16
|
+
* Where the pieces this module manages (the stats cache, the sync lock,
|
|
17
|
+
* per-session state, the upkeep stamp) actually live when no caller-supplied
|
|
18
|
+
* override is available. The Claude Code hooks, `sync-run`, the statusline,
|
|
19
|
+
* and `upkeep` all resolve a bare project dir and never see an explicit
|
|
20
|
+
* `--dir` — unlike a direct CLI invocation, which threads one through
|
|
21
|
+
* `contextDirFor` (`context/node-file.ts`). This mirrors that same override
|
|
22
|
+
* precedence for those entry points: `GRAFT_DIR` wins over the default
|
|
23
|
+
* `<projectDir>/graft`, the same env var `resolveConfig` already honors for
|
|
24
|
+
* the `--deep` LLM path. A relative `GRAFT_DIR` resolves against `projectDir`
|
|
25
|
+
* so it holds regardless of the caller's cwd.
|
|
26
|
+
*/
|
|
27
|
+
export declare function resolveContextDir(projectDir: string): string;
|
|
28
|
+
export declare function cacheDir(projectDir: string): string;
|
|
29
|
+
export declare function readJson<T>(p: string): T | null;
|
|
30
|
+
/**
|
|
31
|
+
* Write JSON to `p` via a scratch file and a rename, so a concurrent reader sees
|
|
32
|
+
* either the whole old file or the whole new one — never a truncated prefix. The
|
|
33
|
+
* pid in the temp name keeps two concurrent writers off each other's scratch file.
|
|
34
|
+
*
|
|
35
|
+
* `compact` drops the indentation, for the caches only a machine ever opens —
|
|
36
|
+
* it's ~30% of the bytes on a big, deep object.
|
|
37
|
+
*
|
|
38
|
+
* A failed write takes its scratch file with it. Every CLI invocation is a new pid,
|
|
39
|
+
* so the names never collide and never get reused: leaving them behind means a repo
|
|
40
|
+
* that fails this write repeatedly (ENOSPC, or a Windows indexer holding the target
|
|
41
|
+
* open) accumulates one full-size file per attempt, and nothing in graft ever lists
|
|
42
|
+
* `.cache/` to clean them up.
|
|
43
|
+
*/
|
|
44
|
+
export declare function writeJsonAtomic(p: string, value: unknown, compact?: boolean, mode?: number): void;
|
|
45
|
+
export declare function readStats(d: string): Stats | null;
|
|
46
|
+
export declare function writeStats(d: string, s: Stats): void;
|
|
47
|
+
/**
|
|
48
|
+
* Persisted per-repo build configuration. Explicit CLI choices live here so
|
|
49
|
+
* later no-flag builds and automatic refreshes enumerate the same file set.
|
|
50
|
+
* Missing fields always retain backwards-compatible defaults.
|
|
51
|
+
*/
|
|
52
|
+
export interface BuildConfig {
|
|
53
|
+
/** SKIP_DIRS names to include in this repo's walks, persisted so a LATER
|
|
54
|
+
* no-flag build — and the fingerprint/refresh path, which never sees CLI
|
|
55
|
+
* flags at all — behave identically to the invocation that set it. */
|
|
56
|
+
includeDirs?: string[];
|
|
57
|
+
/** Whether initialized Git submodules (gitlinks) are folded into this repo's
|
|
58
|
+
* graph. Absent/false keeps the historical boundary at the superproject. */
|
|
59
|
+
followSubmodules?: boolean;
|
|
60
|
+
/** Whether nested Git clones the index does not track — how manifest-driven
|
|
61
|
+
* multi-repo tools check dependencies out, and how an ad-hoc local clone lands
|
|
62
|
+
* in the tree — are folded into this repo's graph. Deliberately SEPARATE from
|
|
63
|
+
* `followSubmodules`: a submodule is a dependency the parent pins, a nested
|
|
64
|
+
* clone is invisible to the parent's index and may equally be a scratch
|
|
65
|
+
* checkout someone parked in the tree. Absent/false keeps the historical
|
|
66
|
+
* boundary. */
|
|
67
|
+
followNestedRepos?: boolean;
|
|
68
|
+
/** Whether `.md` files are indexed as graph nodes (headings → symbols).
|
|
69
|
+
* Opt-in: off by default so code repos are unaffected. */
|
|
70
|
+
includeMd?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* When set, only `.md` files under these repo-relative paths are indexed.
|
|
73
|
+
* Useful to exclude `archive/`, `changes/` etc. from knowledge repos.
|
|
74
|
+
* Example: ["specs"] indexes only the specs/ directory.
|
|
75
|
+
*/
|
|
76
|
+
mdOnlyDirs?: string[];
|
|
77
|
+
/** Whether to include `openspec/changes/archive/` when auto-indexing OpenSpec
|
|
78
|
+
* `.md` files. Off by default: archive specs are historical and add noise.
|
|
79
|
+
* Persisted so later no-flag builds retain the choice. */
|
|
80
|
+
includeOpenSpecArchive?: boolean;
|
|
81
|
+
}
|
|
82
|
+
/** Local, Git-ignored repository configuration. Under trail, lives in `.trail/`
|
|
83
|
+
* (alongside learnings, hooks and the graph cache) to keep all trail files together.
|
|
84
|
+
* Falls back to `.graft/` for repos that were configured with the old upstream name. */
|
|
85
|
+
export declare const BUILD_CONFIG_DIR = ".trail";
|
|
86
|
+
export declare function buildConfigPath(d: string): string;
|
|
87
|
+
export declare function readBuildConfig(d: string): BuildConfig | null;
|
|
88
|
+
export declare function writeBuildConfig(d: string, c: BuildConfig): void;
|
|
89
|
+
/** Merge explicit CLI choices into the existing local config, so updating one
|
|
90
|
+
* persisted build option cannot erase another. */
|
|
91
|
+
export declare function patchBuildConfig(d: string, patch: BuildConfig): void;
|
|
92
|
+
/** The persisted `--include-dir` override for repo `d`, as a Set — `undefined`
|
|
93
|
+
* when nothing was ever persisted (or the persisted list is empty), which every
|
|
94
|
+
* `shouldSkipDir`/`walkDir` caller treats as "today's default behavior". Shared
|
|
95
|
+
* by every walkDir-driven entry point (source-files.ts, scopes.ts) so a build,
|
|
96
|
+
* a later no-flag rebuild, and the hooks/refresh path all agree. */
|
|
97
|
+
export declare function readIncludeDirs(d: string): Set<string> | undefined;
|
|
98
|
+
/** Missing and explicit false both retain the backwards-compatible default. */
|
|
99
|
+
export declare function readFollowSubmodules(d: string): boolean;
|
|
100
|
+
/** Missing and explicit false both retain the backwards-compatible default. */
|
|
101
|
+
export declare function readFollowNestedRepos(d: string): boolean;
|
|
102
|
+
/** Whether `.md` files are included in this repo's graph. Opt-in, off by default. */
|
|
103
|
+
export declare function readIncludeMd(d: string): boolean;
|
|
104
|
+
/** Repo-relative dirs to limit .md indexing to. Empty/absent = all dirs. */
|
|
105
|
+
export declare function readMdOnlyDirs(d: string): string[];
|
|
106
|
+
export declare function readIncludeOpenSpecArchive(d: string): boolean;
|
|
107
|
+
export declare function patchStats(d: string, patch: Partial<Stats>): Stats;
|
|
108
|
+
export declare function acquireLock(d: string): boolean;
|
|
109
|
+
export declare function releaseLock(d: string): void;
|
|
110
|
+
/**
|
|
111
|
+
* The lock, addressed by cache dir rather than project dir. For the default layout
|
|
112
|
+
* `<root>/graft/.cache` these are the same file, which is the point: the Claude Code
|
|
113
|
+
* hooks lock by project dir and the graph's auto-refresh locks by the context dir it
|
|
114
|
+
* is actually writing, and the two must collide so they can't rebuild at once.
|
|
115
|
+
*/
|
|
116
|
+
export declare function acquireLockIn(cache: string): boolean;
|
|
117
|
+
export declare function releaseLockIn(cache: string): void;
|
|
118
|
+
/** Whether someone holds the lock in `cache`: the file is there and not yet old enough to reclaim. */
|
|
119
|
+
export declare function lockHeldIn(cache: string): boolean;
|
|
120
|
+
//# sourceMappingURL=state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/util/state.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,KAAK;IACpB,SAAS,EAAE,MAAM,CAAC;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ACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAgBpD;AACD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAEjD;AACD,sGAAsG;AACtG,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEjD"}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `graft/.cache/` sidecar state: the statusline's stats snapshot and the
|
|
3
|
+
* build lock that serializes rebuilds.
|
|
4
|
+
*
|
|
5
|
+
* Lives in `util/` rather than `claude/` because two very different callers need
|
|
6
|
+
* it: the Claude Code hooks (which flip `dirty` on an edit and clear it after a
|
|
7
|
+
* background sync) and the graph's own pre-query auto-refresh
|
|
8
|
+
* (`graph/refresh.ts`), which must take the same lock so the two never rebuild
|
|
9
|
+
* on top of each other. `claude/state.ts` re-exports all of this, so nothing
|
|
10
|
+
* outside had to change when it moved.
|
|
11
|
+
*/
|
|
12
|
+
import { existsSync, readFileSync, writeFileSync, mkdirSync, renameSync, rmSync, statSync, openSync, writeSync, closeSync, fchmodSync, constants } from 'node:fs';
|
|
13
|
+
import { randomBytes } from 'node:crypto';
|
|
14
|
+
import { join, dirname, isAbsolute } from 'node:path';
|
|
15
|
+
import { mapDirFor } from '../context/map-dir.js';
|
|
16
|
+
export const LOCK_STALE_MS = 300000;
|
|
17
|
+
export function emptyStats() {
|
|
18
|
+
return { nodeCount: 0, edgeCount: 0, languages: [], totalCount: 0, readyCount: 0,
|
|
19
|
+
staleCount: 0, dirty: false, syncing: false, syncedAt: null, lastFile: null };
|
|
20
|
+
}
|
|
21
|
+
const LOCK_FILE = '.sync.lock';
|
|
22
|
+
/**
|
|
23
|
+
* Where the pieces this module manages (the stats cache, the sync lock,
|
|
24
|
+
* per-session state, the upkeep stamp) actually live when no caller-supplied
|
|
25
|
+
* override is available. The Claude Code hooks, `sync-run`, the statusline,
|
|
26
|
+
* and `upkeep` all resolve a bare project dir and never see an explicit
|
|
27
|
+
* `--dir` — unlike a direct CLI invocation, which threads one through
|
|
28
|
+
* `contextDirFor` (`context/node-file.ts`). This mirrors that same override
|
|
29
|
+
* precedence for those entry points: `GRAFT_DIR` wins over the default
|
|
30
|
+
* `<projectDir>/graft`, the same env var `resolveConfig` already honors for
|
|
31
|
+
* the `--deep` LLM path. A relative `GRAFT_DIR` resolves against `projectDir`
|
|
32
|
+
* so it holds regardless of the caller's cwd.
|
|
33
|
+
*/
|
|
34
|
+
export function resolveContextDir(projectDir) {
|
|
35
|
+
const override = process.env.GRAFT_DIR;
|
|
36
|
+
if (!override)
|
|
37
|
+
return mapDirFor(projectDir);
|
|
38
|
+
return isAbsolute(override) ? override : join(projectDir, override);
|
|
39
|
+
}
|
|
40
|
+
export function cacheDir(projectDir) { return join(resolveContextDir(projectDir), '.cache'); }
|
|
41
|
+
function statsPath(d) { return join(cacheDir(d), 'stats.json'); }
|
|
42
|
+
export function readJson(p) {
|
|
43
|
+
try {
|
|
44
|
+
return JSON.parse(readFileSync(p, 'utf8'));
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Write JSON to `p` via a scratch file and a rename, so a concurrent reader sees
|
|
52
|
+
* either the whole old file or the whole new one — never a truncated prefix. The
|
|
53
|
+
* pid in the temp name keeps two concurrent writers off each other's scratch file.
|
|
54
|
+
*
|
|
55
|
+
* `compact` drops the indentation, for the caches only a machine ever opens —
|
|
56
|
+
* it's ~30% of the bytes on a big, deep object.
|
|
57
|
+
*
|
|
58
|
+
* A failed write takes its scratch file with it. Every CLI invocation is a new pid,
|
|
59
|
+
* so the names never collide and never get reused: leaving them behind means a repo
|
|
60
|
+
* that fails this write repeatedly (ENOSPC, or a Windows indexer holding the target
|
|
61
|
+
* open) accumulates one full-size file per attempt, and nothing in graft ever lists
|
|
62
|
+
* `.cache/` to clean them up.
|
|
63
|
+
*/
|
|
64
|
+
export function writeJsonAtomic(p, value, compact = false, mode) {
|
|
65
|
+
mkdirSync(dirname(p), { recursive: true });
|
|
66
|
+
// A name no one can guess, opened new-only and never through a link: a link
|
|
67
|
+
// planted where the temp file goes is neither written through nor renamed
|
|
68
|
+
// into place (D85).
|
|
69
|
+
const tmp = `${p}.${process.pid}.${randomBytes(8).toString('hex')}.tmp`;
|
|
70
|
+
try {
|
|
71
|
+
// `mode` applies to the new file before it's renamed into place, so a
|
|
72
|
+
// secret is never readable by others even for a moment.
|
|
73
|
+
const fd = openSync(tmp, constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | (constants.O_NOFOLLOW ?? 0), mode ?? 0o666);
|
|
74
|
+
try {
|
|
75
|
+
if (mode !== undefined && process.platform !== 'win32')
|
|
76
|
+
fchmodSync(fd, mode);
|
|
77
|
+
const buf = Buffer.from(compact ? JSON.stringify(value) : JSON.stringify(value, null, 2), 'utf8');
|
|
78
|
+
for (let off = 0; off < buf.length;)
|
|
79
|
+
off += writeSync(fd, buf, off, buf.length - off);
|
|
80
|
+
}
|
|
81
|
+
finally {
|
|
82
|
+
closeSync(fd);
|
|
83
|
+
}
|
|
84
|
+
renameSync(tmp, p);
|
|
85
|
+
}
|
|
86
|
+
catch (e) {
|
|
87
|
+
try {
|
|
88
|
+
rmSync(tmp, { force: true });
|
|
89
|
+
}
|
|
90
|
+
catch { /* nothing more we can do */ }
|
|
91
|
+
throw e;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
export function readStats(d) { return readJson(statsPath(d)); }
|
|
95
|
+
export function writeStats(d, s) { writeJsonAtomic(statsPath(d), s); }
|
|
96
|
+
/** Local, Git-ignored repository configuration. Under trail, lives in `.trail/`
|
|
97
|
+
* (alongside learnings, hooks and the graph cache) to keep all trail files together.
|
|
98
|
+
* Falls back to `.graft/` for repos that were configured with the old upstream name. */
|
|
99
|
+
export const BUILD_CONFIG_DIR = '.trail';
|
|
100
|
+
const BUILD_CONFIG_DIR_LEGACY = '.graft';
|
|
101
|
+
export function buildConfigPath(d) {
|
|
102
|
+
// Prefer .trail/config.json; fall back to .graft/config.json for migration.
|
|
103
|
+
const legacy = join(d, BUILD_CONFIG_DIR_LEGACY, 'config.json');
|
|
104
|
+
if (!existsSync(join(d, BUILD_CONFIG_DIR, 'config.json')) && existsSync(legacy)) {
|
|
105
|
+
return legacy;
|
|
106
|
+
}
|
|
107
|
+
return join(d, BUILD_CONFIG_DIR, 'config.json');
|
|
108
|
+
}
|
|
109
|
+
/** Keep local build configuration out of Git without coupling it to the
|
|
110
|
+
* generated graph directory. Best-effort, matching graph-cache ignore setup. */
|
|
111
|
+
function ensureBuildConfigIgnored(d) {
|
|
112
|
+
const noGitignore = process.env.GRAFT_NO_GITIGNORE;
|
|
113
|
+
if (noGitignore && noGitignore !== '0' && noGitignore !== 'false')
|
|
114
|
+
return;
|
|
115
|
+
const path = join(d, '.gitignore');
|
|
116
|
+
let current = '';
|
|
117
|
+
try {
|
|
118
|
+
current = readFileSync(path, 'utf8');
|
|
119
|
+
}
|
|
120
|
+
catch { /* no .gitignore yet */ }
|
|
121
|
+
// Only ignore the config.json file itself, not the whole .trail/ dir
|
|
122
|
+
// (.trail/ contains learnings/, hook.cjs etc. that must be committed).
|
|
123
|
+
const CONFIG_IGNORE = `${BUILD_CONFIG_DIR}/config.json`;
|
|
124
|
+
const present = current.split('\n').some((line) => {
|
|
125
|
+
const value = line.trim();
|
|
126
|
+
return value === CONFIG_IGNORE || value === `/${CONFIG_IGNORE}`;
|
|
127
|
+
});
|
|
128
|
+
if (present)
|
|
129
|
+
return;
|
|
130
|
+
const gap = current === '' ? '' : current.endsWith('\n') ? '\n' : '\n\n';
|
|
131
|
+
const block = `${gap}# trail's local build config — not committed.\n/${CONFIG_IGNORE}\n`;
|
|
132
|
+
try {
|
|
133
|
+
writeFileSync(path, current + block);
|
|
134
|
+
}
|
|
135
|
+
catch { /* best-effort */ }
|
|
136
|
+
}
|
|
137
|
+
export function readBuildConfig(d) {
|
|
138
|
+
const cfg = readJson(buildConfigPath(d));
|
|
139
|
+
// Auto-migrate: if we read from legacy .graft/, write to .trail/ and clean up.
|
|
140
|
+
if (cfg && existsSync(join(d, BUILD_CONFIG_DIR_LEGACY, 'config.json')) && !existsSync(join(d, BUILD_CONFIG_DIR, 'config.json'))) {
|
|
141
|
+
writeBuildConfig(d, cfg);
|
|
142
|
+
}
|
|
143
|
+
return cfg;
|
|
144
|
+
}
|
|
145
|
+
export function writeBuildConfig(d, c) {
|
|
146
|
+
ensureBuildConfigIgnored(d);
|
|
147
|
+
// Always write to .trail/config.json (canonical path for the trail fork).
|
|
148
|
+
const targetDir = join(d, BUILD_CONFIG_DIR);
|
|
149
|
+
mkdirSync(targetDir, { recursive: true });
|
|
150
|
+
const targetPath = join(targetDir, 'config.json');
|
|
151
|
+
writeJsonAtomic(targetPath, c);
|
|
152
|
+
// Migrate: remove legacy .graft/ after writing to .trail/.
|
|
153
|
+
const legacyDir = join(d, BUILD_CONFIG_DIR_LEGACY);
|
|
154
|
+
const legacyConfig = join(legacyDir, 'config.json');
|
|
155
|
+
if (existsSync(legacyConfig)) {
|
|
156
|
+
try {
|
|
157
|
+
rmSync(legacyDir, { recursive: true, force: true });
|
|
158
|
+
}
|
|
159
|
+
catch { /* best-effort */ }
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
/** Merge explicit CLI choices into the existing local config, so updating one
|
|
163
|
+
* persisted build option cannot erase another. */
|
|
164
|
+
export function patchBuildConfig(d, patch) {
|
|
165
|
+
writeBuildConfig(d, { ...(readBuildConfig(d) ?? {}), ...patch });
|
|
166
|
+
}
|
|
167
|
+
/** The persisted `--include-dir` override for repo `d`, as a Set — `undefined`
|
|
168
|
+
* when nothing was ever persisted (or the persisted list is empty), which every
|
|
169
|
+
* `shouldSkipDir`/`walkDir` caller treats as "today's default behavior". Shared
|
|
170
|
+
* by every walkDir-driven entry point (source-files.ts, scopes.ts) so a build,
|
|
171
|
+
* a later no-flag rebuild, and the hooks/refresh path all agree. */
|
|
172
|
+
export function readIncludeDirs(d) {
|
|
173
|
+
const dirs = readBuildConfig(d)?.includeDirs;
|
|
174
|
+
return dirs && dirs.length ? new Set(dirs) : undefined;
|
|
175
|
+
}
|
|
176
|
+
/** Missing and explicit false both retain the backwards-compatible default. */
|
|
177
|
+
export function readFollowSubmodules(d) {
|
|
178
|
+
return readBuildConfig(d)?.followSubmodules === true;
|
|
179
|
+
}
|
|
180
|
+
/** Missing and explicit false both retain the backwards-compatible default. */
|
|
181
|
+
export function readFollowNestedRepos(d) {
|
|
182
|
+
return readBuildConfig(d)?.followNestedRepos === true;
|
|
183
|
+
}
|
|
184
|
+
/** Whether `.md` files are included in this repo's graph. Opt-in, off by default. */
|
|
185
|
+
export function readIncludeMd(d) {
|
|
186
|
+
return readBuildConfig(d)?.includeMd === true;
|
|
187
|
+
}
|
|
188
|
+
/** Repo-relative dirs to limit .md indexing to. Empty/absent = all dirs. */
|
|
189
|
+
export function readMdOnlyDirs(d) {
|
|
190
|
+
return readBuildConfig(d)?.mdOnlyDirs ?? [];
|
|
191
|
+
}
|
|
192
|
+
export function readIncludeOpenSpecArchive(d) {
|
|
193
|
+
return readBuildConfig(d)?.includeOpenSpecArchive === true;
|
|
194
|
+
}
|
|
195
|
+
// Best-effort read-modify-write; not atomic across concurrent processes, but acceptable
|
|
196
|
+
// for episodic hook writes (worst case is a lost update, not corruption).
|
|
197
|
+
export function patchStats(d, patch) {
|
|
198
|
+
const next = { ...(readStats(d) ?? emptyStats()), ...patch };
|
|
199
|
+
writeStats(d, next);
|
|
200
|
+
return next;
|
|
201
|
+
}
|
|
202
|
+
export function acquireLock(d) {
|
|
203
|
+
return acquireLockIn(cacheDir(d));
|
|
204
|
+
}
|
|
205
|
+
export function releaseLock(d) {
|
|
206
|
+
releaseLockIn(cacheDir(d));
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* The lock, addressed by cache dir rather than project dir. For the default layout
|
|
210
|
+
* `<root>/graft/.cache` these are the same file, which is the point: the Claude Code
|
|
211
|
+
* hooks lock by project dir and the graph's auto-refresh locks by the context dir it
|
|
212
|
+
* is actually writing, and the two must collide so they can't rebuild at once.
|
|
213
|
+
*/
|
|
214
|
+
export function acquireLockIn(cache) {
|
|
215
|
+
const p = join(cache, LOCK_FILE);
|
|
216
|
+
mkdirSync(cache, { recursive: true });
|
|
217
|
+
const payload = JSON.stringify({ pid: process.pid, at: new Date().toISOString() });
|
|
218
|
+
try {
|
|
219
|
+
writeFileSync(p, payload, { flag: 'wx' }); // atomic exclusive create
|
|
220
|
+
return true;
|
|
221
|
+
}
|
|
222
|
+
catch (e) {
|
|
223
|
+
if (e?.code !== 'EEXIST')
|
|
224
|
+
throw e;
|
|
225
|
+
let stale;
|
|
226
|
+
try {
|
|
227
|
+
stale = Date.now() - statSync(p).mtimeMs >= LOCK_STALE_MS;
|
|
228
|
+
}
|
|
229
|
+
catch {
|
|
230
|
+
stale = true;
|
|
231
|
+
}
|
|
232
|
+
if (!stale)
|
|
233
|
+
return false;
|
|
234
|
+
try {
|
|
235
|
+
rmSync(p);
|
|
236
|
+
}
|
|
237
|
+
catch { /* another process reclaimed it */ }
|
|
238
|
+
try {
|
|
239
|
+
writeFileSync(p, payload, { flag: 'wx' });
|
|
240
|
+
return true;
|
|
241
|
+
}
|
|
242
|
+
catch (e2) {
|
|
243
|
+
if (e2?.code === 'EEXIST')
|
|
244
|
+
return false;
|
|
245
|
+
throw e2;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
export function releaseLockIn(cache) {
|
|
250
|
+
try {
|
|
251
|
+
rmSync(join(cache, LOCK_FILE));
|
|
252
|
+
}
|
|
253
|
+
catch { /* already gone */ }
|
|
254
|
+
}
|
|
255
|
+
/** Whether someone holds the lock in `cache`: the file is there and not yet old enough to reclaim. */
|
|
256
|
+
export function lockHeldIn(cache) {
|
|
257
|
+
try {
|
|
258
|
+
return Date.now() - statSync(join(cache, LOCK_FILE)).mtimeMs < LOCK_STALE_MS;
|
|
259
|
+
}
|
|
260
|
+
catch {
|
|
261
|
+
return false;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../src/util/state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAClK,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AASlD,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC;AAEpC,MAAM,UAAU,UAAU;IACxB,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC;QAC9E,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAClF,CAAC;AAED,MAAM,SAAS,GAAG,YAAY,CAAC;AAE/B;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,iBAAiB,CAAC,UAAkB;IAClD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC;IACvC,IAAI,CAAC,QAAQ;QAAE,OAAO,SAAS,CAAC,UAAU,CAAC,CAAC;IAC5C,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAA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AAG,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,aAAa,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC;YAAC,KAAK,GAAG,IAAI,CAAC;QAAC,CAAC;QAC1F,IAAI,CAAC,KAAK;YAAE,OAAO,KAAK,CAAC;QACzB,IAAI,CAAC;YAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC,CAAC,kCAAkC,CAAC,CAAC;QAC/D,IAAI,CAAC;YAAC,aAAa,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;YAAC,OAAO,IAAI,CAAC;QAAC,CAAC;QAC/D,OAAO,EAAO,EAAE,CAAC;YAAC,IAAI,EAAE,EAAE,IAAI,KAAK,QAAQ;gBAAE,OAAO,KAAK,CAAC;YAAC,MAAM,EAAE,CAAC;QAAC,CAAC;IACxE,CAAC;AACH,CAAC;AACD,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,IAAI,CAAC;QAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC,CAAC,kBAAkB,CAAC,CAAC;AACtE,CAAC;AACD,sGAAsG;AACtG,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,IAAI,CAAC;QAAC,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,OAAO,GAAG,aAAa,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC;QAAC,OAAO,KAAK,CAAC;IAAC,CAAC;AAC/G,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014 Max Brunsfeld
|
|
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.
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017 Ayman Nadeem
|
|
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.
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 fwcd
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017 Josh Vera, GitHub
|
|
4
|
+
Copyright (c) 2019 Max Brunsfeld, Amaan Qureshi, Christian Frøystad, Caleb White
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016 Max Brunsfeld
|
|
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.
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 tree-sitter-r authors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 alex-pinkus
|
|
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.
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017 Max Brunsfeld
|
|
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.
|
|
Binary file
|