cognitive-core 0.2.1 → 0.2.2
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/dist/atlas.d.ts +10 -0
- package/dist/atlas.d.ts.map +1 -1
- package/dist/atlas.js +65 -0
- package/dist/atlas.js.map +1 -1
- package/dist/learning/pipeline.d.ts +4 -31
- package/dist/learning/pipeline.d.ts.map +1 -1
- package/dist/learning/pipeline.js +12 -64
- package/dist/learning/pipeline.js.map +1 -1
- package/dist/memory/curated-loader.d.ts +21 -4
- package/dist/memory/curated-loader.d.ts.map +1 -1
- package/dist/memory/curated-loader.js +53 -16
- package/dist/memory/curated-loader.js.map +1 -1
- package/dist/memory/index.d.ts +2 -1
- package/dist/memory/index.d.ts.map +1 -1
- package/dist/memory/index.js +3 -1
- package/dist/memory/index.js.map +1 -1
- package/dist/memory/playbook.d.ts +6 -0
- package/dist/memory/playbook.d.ts.map +1 -1
- package/dist/memory/playbook.js +15 -0
- package/dist/memory/playbook.js.map +1 -1
- package/dist/memory/source-resolver.d.ts +120 -0
- package/dist/memory/source-resolver.d.ts.map +1 -0
- package/dist/memory/source-resolver.js +300 -0
- package/dist/memory/source-resolver.js.map +1 -0
- package/dist/types/config.d.ts +141 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js +40 -0
- package/dist/types/config.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/workspace/types.d.ts +12 -54
- package/dist/workspace/types.d.ts.map +1 -1
- package/dist/workspace/types.js.map +1 -1
- package/package.json +2 -2
- package/playbooks/compound-engineering/adversarial-review.json +51 -0
- package/playbooks/compound-engineering/agent-native-architecture.json +59 -0
- package/playbooks/compound-engineering/agent-native-review.json +54 -0
- package/playbooks/compound-engineering/api-contract-review.json +52 -0
- package/playbooks/compound-engineering/brainstorm-requirements.json +55 -0
- package/playbooks/compound-engineering/bug-reproduction.json +62 -0
- package/playbooks/compound-engineering/confidence-calibration.json +49 -0
- package/playbooks/compound-engineering/correctness-review.json +49 -0
- package/playbooks/compound-engineering/data-migration-safety.json +59 -0
- package/playbooks/compound-engineering/deployment-verification.json +63 -0
- package/playbooks/compound-engineering/error-recovery-patterns.json +53 -0
- package/playbooks/compound-engineering/implementation-planning.json +64 -0
- package/playbooks/compound-engineering/issue-pattern-analysis.json +53 -0
- package/playbooks/compound-engineering/knowledge-compounding.json +63 -0
- package/playbooks/compound-engineering/learnings-research.json +54 -0
- package/playbooks/compound-engineering/maintainability-review.json +49 -0
- package/playbooks/compound-engineering/performance-review.json +54 -0
- package/playbooks/compound-engineering/plan-adversarial-review.json +56 -0
- package/playbooks/compound-engineering/plan-feasibility-review.json +56 -0
- package/playbooks/compound-engineering/project-standards-review.json +52 -0
- package/playbooks/compound-engineering/reliability-review.json +53 -0
- package/playbooks/compound-engineering/review-orchestration.json +64 -0
- package/playbooks/compound-engineering/security-review.json +54 -0
- package/playbooks/compound-engineering/systematic-execution.json +64 -0
- package/playbooks/compound-engineering/testing-review.json +50 -0
- package/src/atlas.ts +96 -0
- package/src/memory/curated-loader.ts +69 -16
- package/src/memory/index.ts +16 -0
- package/src/memory/playbook.ts +19 -0
- package/src/memory/source-resolver.ts +422 -0
- package/src/types/config.ts +46 -0
- package/src/types/index.ts +4 -0
- package/src/workspace/types.ts +22 -78
- package/tests/integration/curated-sources-e2e.test.ts +502 -0
- package/tests/memory/compound-engineering-seed.test.ts +338 -0
- package/tests/memory/curated-loader-extended.test.ts +225 -0
- package/tests/memory/playbook-quality-validation.test.ts +430 -0
- package/tests/memory/source-resolver.test.ts +700 -0
- package/.claude/settings.local.json +0 -11
- package/dist/learning/llm-extractor.d.ts +0 -88
- package/dist/learning/llm-extractor.d.ts.map +0 -1
- package/dist/learning/llm-extractor.js +0 -372
- package/dist/learning/llm-extractor.js.map +0 -1
- package/dist/learning/loop-coordinator.d.ts +0 -61
- package/dist/learning/loop-coordinator.d.ts.map +0 -1
- package/dist/learning/loop-coordinator.js +0 -96
- package/dist/learning/loop-coordinator.js.map +0 -1
- package/references/agent-workspace/CLAUDE.md +0 -74
- package/references/agent-workspace/README.md +0 -587
- package/references/agent-workspace/media/banner.png +0 -0
- package/references/agent-workspace/package-lock.json +0 -2061
- package/references/agent-workspace/package.json +0 -54
- package/references/agent-workspace/src/handle.ts +0 -122
- package/references/agent-workspace/src/index.ts +0 -32
- package/references/agent-workspace/src/manager.ts +0 -102
- package/references/agent-workspace/src/readers/json.ts +0 -71
- package/references/agent-workspace/src/readers/markdown.ts +0 -37
- package/references/agent-workspace/src/readers/raw.ts +0 -27
- package/references/agent-workspace/src/types.ts +0 -68
- package/references/agent-workspace/src/validation.ts +0 -93
- package/references/agent-workspace/src/writers/json.ts +0 -17
- package/references/agent-workspace/src/writers/markdown.ts +0 -27
- package/references/agent-workspace/src/writers/raw.ts +0 -22
- package/references/agent-workspace/tests/errors.test.ts +0 -652
- package/references/agent-workspace/tests/handle.test.ts +0 -144
- package/references/agent-workspace/tests/manager.test.ts +0 -124
- package/references/agent-workspace/tests/readers.test.ts +0 -205
- package/references/agent-workspace/tests/validation.test.ts +0 -196
- package/references/agent-workspace/tests/writers.test.ts +0 -108
- package/references/agent-workspace/tsconfig.json +0 -20
- package/references/agent-workspace/tsup.config.ts +0 -9
- package/references/minimem/.claude/settings.json +0 -7
- package/references/minimem/.sudocode/issues.jsonl +0 -18
- package/references/minimem/.sudocode/specs.jsonl +0 -1
- package/references/minimem/CLAUDE.md +0 -310
- package/references/minimem/README.md +0 -556
- package/references/minimem/claude-plugin/.claude-plugin/plugin.json +0 -10
- package/references/minimem/claude-plugin/.mcp.json +0 -7
- package/references/minimem/claude-plugin/README.md +0 -158
- package/references/minimem/claude-plugin/commands/recall.md +0 -47
- package/references/minimem/claude-plugin/commands/remember.md +0 -41
- package/references/minimem/claude-plugin/hooks/__tests__/hooks.test.ts +0 -272
- package/references/minimem/claude-plugin/hooks/hooks.json +0 -27
- package/references/minimem/claude-plugin/hooks/session-end.sh +0 -86
- package/references/minimem/claude-plugin/hooks/session-start.sh +0 -85
- package/references/minimem/claude-plugin/skills/memory/SKILL.md +0 -108
- package/references/minimem/package-lock.json +0 -5373
- package/references/minimem/package.json +0 -60
- package/references/minimem/scripts/postbuild.js +0 -35
- package/references/minimem/src/__tests__/edge-cases.test.ts +0 -371
- package/references/minimem/src/__tests__/errors.test.ts +0 -265
- package/references/minimem/src/__tests__/helpers.ts +0 -199
- package/references/minimem/src/__tests__/internal.test.ts +0 -407
- package/references/minimem/src/__tests__/knowledge.test.ts +0 -287
- package/references/minimem/src/__tests__/minimem.integration.test.ts +0 -1127
- package/references/minimem/src/__tests__/session.test.ts +0 -190
- package/references/minimem/src/cli/__tests__/commands.test.ts +0 -759
- package/references/minimem/src/cli/commands/__tests__/conflicts.test.ts +0 -141
- package/references/minimem/src/cli/commands/append.ts +0 -76
- package/references/minimem/src/cli/commands/config.ts +0 -262
- package/references/minimem/src/cli/commands/conflicts.ts +0 -413
- package/references/minimem/src/cli/commands/daemon.ts +0 -169
- package/references/minimem/src/cli/commands/index.ts +0 -12
- package/references/minimem/src/cli/commands/init.ts +0 -88
- package/references/minimem/src/cli/commands/mcp.ts +0 -177
- package/references/minimem/src/cli/commands/push-pull.ts +0 -213
- package/references/minimem/src/cli/commands/search.ts +0 -158
- package/references/minimem/src/cli/commands/status.ts +0 -84
- package/references/minimem/src/cli/commands/sync-init.ts +0 -290
- package/references/minimem/src/cli/commands/sync.ts +0 -70
- package/references/minimem/src/cli/commands/upsert.ts +0 -197
- package/references/minimem/src/cli/config.ts +0 -584
- package/references/minimem/src/cli/index.ts +0 -264
- package/references/minimem/src/cli/shared.ts +0 -161
- package/references/minimem/src/cli/sync/__tests__/central.test.ts +0 -152
- package/references/minimem/src/cli/sync/__tests__/conflicts.test.ts +0 -209
- package/references/minimem/src/cli/sync/__tests__/daemon.test.ts +0 -118
- package/references/minimem/src/cli/sync/__tests__/detection.test.ts +0 -207
- package/references/minimem/src/cli/sync/__tests__/integration.test.ts +0 -476
- package/references/minimem/src/cli/sync/__tests__/registry.test.ts +0 -363
- package/references/minimem/src/cli/sync/__tests__/state.test.ts +0 -255
- package/references/minimem/src/cli/sync/__tests__/validation.test.ts +0 -193
- package/references/minimem/src/cli/sync/__tests__/watcher.test.ts +0 -178
- package/references/minimem/src/cli/sync/central.ts +0 -292
- package/references/minimem/src/cli/sync/conflicts.ts +0 -204
- package/references/minimem/src/cli/sync/daemon.ts +0 -407
- package/references/minimem/src/cli/sync/detection.ts +0 -138
- package/references/minimem/src/cli/sync/index.ts +0 -107
- package/references/minimem/src/cli/sync/operations.ts +0 -373
- package/references/minimem/src/cli/sync/registry.ts +0 -279
- package/references/minimem/src/cli/sync/state.ts +0 -355
- package/references/minimem/src/cli/sync/validation.ts +0 -206
- package/references/minimem/src/cli/sync/watcher.ts +0 -234
- package/references/minimem/src/cli/version.ts +0 -34
- package/references/minimem/src/core/index.ts +0 -9
- package/references/minimem/src/core/indexer.ts +0 -628
- package/references/minimem/src/core/searcher.ts +0 -221
- package/references/minimem/src/db/schema.ts +0 -183
- package/references/minimem/src/db/sqlite-vec.ts +0 -24
- package/references/minimem/src/embeddings/__tests__/embeddings.test.ts +0 -431
- package/references/minimem/src/embeddings/batch-gemini.ts +0 -392
- package/references/minimem/src/embeddings/batch-openai.ts +0 -409
- package/references/minimem/src/embeddings/embeddings.ts +0 -434
- package/references/minimem/src/index.ts +0 -109
- package/references/minimem/src/internal.ts +0 -299
- package/references/minimem/src/minimem.ts +0 -1276
- package/references/minimem/src/search/__tests__/hybrid.test.ts +0 -247
- package/references/minimem/src/search/graph.ts +0 -234
- package/references/minimem/src/search/hybrid.ts +0 -151
- package/references/minimem/src/search/search.ts +0 -256
- package/references/minimem/src/server/__tests__/mcp.test.ts +0 -341
- package/references/minimem/src/server/__tests__/tools.test.ts +0 -364
- package/references/minimem/src/server/mcp.ts +0 -326
- package/references/minimem/src/server/tools.ts +0 -720
- package/references/minimem/src/session.ts +0 -460
- package/references/minimem/tsconfig.json +0 -19
- package/references/minimem/tsup.config.ts +0 -26
- package/references/minimem/vitest.config.ts +0 -24
- package/references/sessionlog/.husky/pre-commit +0 -1
- package/references/sessionlog/.lintstagedrc.json +0 -4
- package/references/sessionlog/.prettierignore +0 -4
- package/references/sessionlog/.prettierrc.json +0 -11
- package/references/sessionlog/LICENSE +0 -21
- package/references/sessionlog/README.md +0 -453
- package/references/sessionlog/eslint.config.js +0 -58
- package/references/sessionlog/package-lock.json +0 -3672
- package/references/sessionlog/package.json +0 -65
- package/references/sessionlog/src/__tests__/agent-hooks.test.ts +0 -570
- package/references/sessionlog/src/__tests__/agent-registry.test.ts +0 -127
- package/references/sessionlog/src/__tests__/claude-code-hooks.test.ts +0 -225
- package/references/sessionlog/src/__tests__/claude-generator.test.ts +0 -46
- package/references/sessionlog/src/__tests__/commit-msg.test.ts +0 -86
- package/references/sessionlog/src/__tests__/cursor-agent.test.ts +0 -224
- package/references/sessionlog/src/__tests__/e2e-live.test.ts +0 -890
- package/references/sessionlog/src/__tests__/event-log.test.ts +0 -183
- package/references/sessionlog/src/__tests__/flush-sentinel.test.ts +0 -105
- package/references/sessionlog/src/__tests__/gemini-agent.test.ts +0 -375
- package/references/sessionlog/src/__tests__/git-hooks.test.ts +0 -78
- package/references/sessionlog/src/__tests__/hook-managers.test.ts +0 -121
- package/references/sessionlog/src/__tests__/lifecycle-tasks.test.ts +0 -759
- package/references/sessionlog/src/__tests__/opencode-agent.test.ts +0 -338
- package/references/sessionlog/src/__tests__/redaction.test.ts +0 -136
- package/references/sessionlog/src/__tests__/session-repo.test.ts +0 -353
- package/references/sessionlog/src/__tests__/session-store.test.ts +0 -166
- package/references/sessionlog/src/__tests__/setup-ccweb.test.ts +0 -466
- package/references/sessionlog/src/__tests__/skill-live.test.ts +0 -461
- package/references/sessionlog/src/__tests__/summarize.test.ts +0 -348
- package/references/sessionlog/src/__tests__/task-plan-e2e.test.ts +0 -610
- package/references/sessionlog/src/__tests__/task-plan-live.test.ts +0 -632
- package/references/sessionlog/src/__tests__/transcript-timestamp.test.ts +0 -121
- package/references/sessionlog/src/__tests__/types.test.ts +0 -166
- package/references/sessionlog/src/__tests__/utils.test.ts +0 -333
- package/references/sessionlog/src/__tests__/validation.test.ts +0 -103
- package/references/sessionlog/src/__tests__/worktree.test.ts +0 -57
- package/references/sessionlog/src/agent/agents/claude-code.ts +0 -1089
- package/references/sessionlog/src/agent/agents/cursor.ts +0 -361
- package/references/sessionlog/src/agent/agents/gemini-cli.ts +0 -632
- package/references/sessionlog/src/agent/agents/opencode.ts +0 -540
- package/references/sessionlog/src/agent/registry.ts +0 -143
- package/references/sessionlog/src/agent/session-types.ts +0 -113
- package/references/sessionlog/src/agent/types.ts +0 -220
- package/references/sessionlog/src/cli.ts +0 -597
- package/references/sessionlog/src/commands/clean.ts +0 -133
- package/references/sessionlog/src/commands/disable.ts +0 -84
- package/references/sessionlog/src/commands/doctor.ts +0 -145
- package/references/sessionlog/src/commands/enable.ts +0 -202
- package/references/sessionlog/src/commands/explain.ts +0 -261
- package/references/sessionlog/src/commands/reset.ts +0 -105
- package/references/sessionlog/src/commands/resume.ts +0 -180
- package/references/sessionlog/src/commands/rewind.ts +0 -195
- package/references/sessionlog/src/commands/setup-ccweb.ts +0 -275
- package/references/sessionlog/src/commands/status.ts +0 -172
- package/references/sessionlog/src/config.ts +0 -165
- package/references/sessionlog/src/events/event-log.ts +0 -126
- package/references/sessionlog/src/git-operations.ts +0 -558
- package/references/sessionlog/src/hooks/git-hooks.ts +0 -165
- package/references/sessionlog/src/hooks/lifecycle.ts +0 -391
- package/references/sessionlog/src/index.ts +0 -650
- package/references/sessionlog/src/security/redaction.ts +0 -283
- package/references/sessionlog/src/session/state-machine.ts +0 -452
- package/references/sessionlog/src/store/checkpoint-store.ts +0 -509
- package/references/sessionlog/src/store/native-store.ts +0 -173
- package/references/sessionlog/src/store/provider-types.ts +0 -99
- package/references/sessionlog/src/store/session-store.ts +0 -266
- package/references/sessionlog/src/strategy/attribution.ts +0 -296
- package/references/sessionlog/src/strategy/common.ts +0 -207
- package/references/sessionlog/src/strategy/content-overlap.ts +0 -228
- package/references/sessionlog/src/strategy/manual-commit.ts +0 -988
- package/references/sessionlog/src/strategy/types.ts +0 -279
- package/references/sessionlog/src/summarize/claude-generator.ts +0 -115
- package/references/sessionlog/src/summarize/summarize.ts +0 -432
- package/references/sessionlog/src/types.ts +0 -508
- package/references/sessionlog/src/utils/chunk-files.ts +0 -49
- package/references/sessionlog/src/utils/commit-message.ts +0 -65
- package/references/sessionlog/src/utils/detect-agent.ts +0 -36
- package/references/sessionlog/src/utils/hook-managers.ts +0 -125
- package/references/sessionlog/src/utils/ide-tags.ts +0 -32
- package/references/sessionlog/src/utils/paths.ts +0 -79
- package/references/sessionlog/src/utils/preview-rewind.ts +0 -80
- package/references/sessionlog/src/utils/rewind-conflict.ts +0 -121
- package/references/sessionlog/src/utils/shadow-branch.ts +0 -109
- package/references/sessionlog/src/utils/string-utils.ts +0 -46
- package/references/sessionlog/src/utils/todo-extract.ts +0 -188
- package/references/sessionlog/src/utils/trailers.ts +0 -187
- package/references/sessionlog/src/utils/transcript-parse.ts +0 -177
- package/references/sessionlog/src/utils/transcript-timestamp.ts +0 -59
- package/references/sessionlog/src/utils/tree-ops.ts +0 -219
- package/references/sessionlog/src/utils/tty.ts +0 -72
- package/references/sessionlog/src/utils/validation.ts +0 -65
- package/references/sessionlog/src/utils/worktree.ts +0 -58
- package/references/sessionlog/src/wire-types.ts +0 -59
- package/references/sessionlog/templates/setup-env.sh +0 -153
- package/references/sessionlog/tsconfig.json +0 -18
- package/references/sessionlog/vitest.config.ts +0 -12
- package/references/skill-tree/.claude/settings.json +0 -6
- package/references/skill-tree/.sudocode/issues.jsonl +0 -19
- package/references/skill-tree/.sudocode/specs.jsonl +0 -3
- package/references/skill-tree/CLAUDE.md +0 -126
- package/references/skill-tree/README.md +0 -372
- package/references/skill-tree/docs/GAPS_v1.md +0 -221
- package/references/skill-tree/docs/INTEGRATION_PLAN.md +0 -467
- package/references/skill-tree/docs/TODOS.md +0 -91
- package/references/skill-tree/docs/anthropic_skill_guide.md +0 -1364
- package/references/skill-tree/docs/design/federated-skill-trees.md +0 -524
- package/references/skill-tree/docs/design/multi-agent-sync.md +0 -759
- package/references/skill-tree/docs/scraper/BRAINSTORM.md +0 -583
- package/references/skill-tree/docs/scraper/POC_PLAN.md +0 -420
- package/references/skill-tree/docs/scraper/README.md +0 -170
- package/references/skill-tree/examples/basic-usage.ts +0 -164
- package/references/skill-tree/package-lock.json +0 -1852
- package/references/skill-tree/package.json +0 -66
- package/references/skill-tree/scraper/README.md +0 -123
- package/references/skill-tree/scraper/docs/DESIGN.md +0 -683
- package/references/skill-tree/scraper/docs/PLAN.md +0 -336
- package/references/skill-tree/scraper/drizzle.config.ts +0 -10
- package/references/skill-tree/scraper/package-lock.json +0 -6329
- package/references/skill-tree/scraper/package.json +0 -68
- package/references/skill-tree/scraper/test/fixtures/invalid-skill/missing-description.md +0 -7
- package/references/skill-tree/scraper/test/fixtures/invalid-skill/missing-name.md +0 -7
- package/references/skill-tree/scraper/test/fixtures/minimal-skill/SKILL.md +0 -27
- package/references/skill-tree/scraper/test/fixtures/skill-json/SKILL.json +0 -21
- package/references/skill-tree/scraper/test/fixtures/skill-with-meta/SKILL.md +0 -54
- package/references/skill-tree/scraper/test/fixtures/skill-with-meta/_meta.json +0 -24
- package/references/skill-tree/scraper/test/fixtures/valid-skill/SKILL.md +0 -93
- package/references/skill-tree/scraper/test/fixtures/valid-skill/_meta.json +0 -22
- package/references/skill-tree/scraper/tsup.config.ts +0 -14
- package/references/skill-tree/scraper/vitest.config.ts +0 -17
- package/references/skill-tree/scripts/convert-to-vitest.ts +0 -166
- package/references/skill-tree/skills/skill-writer/SKILL.md +0 -339
- package/references/skill-tree/skills/skill-writer/references/examples.md +0 -326
- package/references/skill-tree/skills/skill-writer/references/patterns.md +0 -210
- package/references/skill-tree/skills/skill-writer/references/quality-checklist.md +0 -123
- package/references/skill-tree/test/run-all.ts +0 -106
- package/references/skill-tree/test/utils.ts +0 -128
- package/references/skill-tree/vitest.config.ts +0 -16
|
@@ -1,460 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Session tracking for memory entries
|
|
3
|
-
*
|
|
4
|
-
* Captures context about the originating session (Claude Code, VS Code, etc.)
|
|
5
|
-
* and stores it as YAML frontmatter in memory files.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import * as os from "node:os";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Session metadata for memory entries
|
|
12
|
-
*/
|
|
13
|
-
export type SessionContext = {
|
|
14
|
-
/** Session identifier (e.g., Claude Code session ID) */
|
|
15
|
-
id?: string;
|
|
16
|
-
/** Source application (claude-code, vscode, cursor, etc.) */
|
|
17
|
-
source?: string;
|
|
18
|
-
/** Project directory path */
|
|
19
|
-
project?: string;
|
|
20
|
-
/** Path to session transcript/log file */
|
|
21
|
-
transcript?: string;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Source provenance for a knowledge entry
|
|
26
|
-
*/
|
|
27
|
-
export type KnowledgeSource = {
|
|
28
|
-
origin?: string;
|
|
29
|
-
trajectories?: string[];
|
|
30
|
-
agentId?: string;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* A directional link from this entry to another knowledge node
|
|
35
|
-
*/
|
|
36
|
-
export type KnowledgeLink = {
|
|
37
|
-
target: string;
|
|
38
|
-
relation: string;
|
|
39
|
-
layer?: string;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Frontmatter structure for memory files
|
|
44
|
-
*/
|
|
45
|
-
export type MemoryFrontmatter = {
|
|
46
|
-
session?: SessionContext;
|
|
47
|
-
created?: string;
|
|
48
|
-
updated?: string;
|
|
49
|
-
tags?: string[];
|
|
50
|
-
/** Knowledge node identifier */
|
|
51
|
-
id?: string;
|
|
52
|
-
/** Knowledge entry type */
|
|
53
|
-
type?: "observation" | "entity" | "domain-summary" | string;
|
|
54
|
-
/** Domain tags for this knowledge entry */
|
|
55
|
-
domain?: string[];
|
|
56
|
-
/** Entity references in this knowledge entry */
|
|
57
|
-
entities?: string[];
|
|
58
|
-
/** Confidence score 0-1 */
|
|
59
|
-
confidence?: number;
|
|
60
|
-
/** Source provenance */
|
|
61
|
-
source?: KnowledgeSource;
|
|
62
|
-
/** Links to other knowledge nodes */
|
|
63
|
-
links?: KnowledgeLink[];
|
|
64
|
-
/** ID of the entry this supersedes */
|
|
65
|
-
supersedes?: string | null;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Parse YAML frontmatter from content
|
|
70
|
-
*
|
|
71
|
-
* Frontmatter is delimited by --- at the start and end:
|
|
72
|
-
* ```
|
|
73
|
-
* ---
|
|
74
|
-
* session:
|
|
75
|
-
* id: abc123
|
|
76
|
-
* source: claude-code
|
|
77
|
-
* created: 2024-01-27T14:30:00Z
|
|
78
|
-
* ---
|
|
79
|
-
* Actual content here...
|
|
80
|
-
* ```
|
|
81
|
-
*/
|
|
82
|
-
export function parseFrontmatter(content: string): {
|
|
83
|
-
frontmatter: MemoryFrontmatter | undefined;
|
|
84
|
-
body: string;
|
|
85
|
-
} {
|
|
86
|
-
const frontmatterRegex = /^---\n([\s\S]*?)\n---\n/;
|
|
87
|
-
const match = content.match(frontmatterRegex);
|
|
88
|
-
|
|
89
|
-
if (!match) {
|
|
90
|
-
return { frontmatter: undefined, body: content };
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
const yamlContent = match[1];
|
|
94
|
-
const body = content.slice(match[0].length);
|
|
95
|
-
|
|
96
|
-
try {
|
|
97
|
-
const frontmatter = parseSimpleYaml(yamlContent);
|
|
98
|
-
return { frontmatter, body };
|
|
99
|
-
} catch {
|
|
100
|
-
// If parsing fails, treat as no frontmatter
|
|
101
|
-
return { frontmatter: undefined, body: content };
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* Simple YAML parser for frontmatter.
|
|
107
|
-
*
|
|
108
|
-
* **Limitations** (by design — keeps the dependency count at zero):
|
|
109
|
-
* - Does not handle multi-line strings (block scalars `|` / `>`)
|
|
110
|
-
* - Does not preserve comments
|
|
111
|
-
* - Keys must be simple `\w+` identifiers (no quoted or special-char keys)
|
|
112
|
-
*
|
|
113
|
-
* Supports:
|
|
114
|
-
* - Multi-level nesting (objects within objects)
|
|
115
|
-
* - Inline arrays `[a, b]`
|
|
116
|
-
* - YAML list items with `- ` syntax (including `- {key: val}` objects)
|
|
117
|
-
* - Null values via `~` or `null`
|
|
118
|
-
*/
|
|
119
|
-
function parseSimpleYaml(yaml: string): MemoryFrontmatter {
|
|
120
|
-
const lines = yaml.split("\n");
|
|
121
|
-
return parseYamlBlock(lines, 0, 0, lines.length).value as MemoryFrontmatter;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Parse a block of YAML lines at a given indentation level into an object.
|
|
126
|
-
* Returns the parsed value and the line index where parsing stopped.
|
|
127
|
-
*/
|
|
128
|
-
function parseYamlBlock(
|
|
129
|
-
lines: string[],
|
|
130
|
-
indent: number,
|
|
131
|
-
startIdx: number,
|
|
132
|
-
endIdx: number,
|
|
133
|
-
): { value: Record<string, unknown>; nextIdx: number } {
|
|
134
|
-
const result: Record<string, unknown> = {};
|
|
135
|
-
let i = startIdx;
|
|
136
|
-
|
|
137
|
-
while (i < endIdx) {
|
|
138
|
-
const line = lines[i];
|
|
139
|
-
if (!line || !line.trim()) {
|
|
140
|
-
i++;
|
|
141
|
-
continue;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
const lineIndent = getIndent(line);
|
|
145
|
-
// If we've dedented back beyond our level, stop
|
|
146
|
-
if (lineIndent < indent) break;
|
|
147
|
-
// Skip lines indented deeper than expected (shouldn't happen at top of block)
|
|
148
|
-
if (lineIndent > indent) {
|
|
149
|
-
i++;
|
|
150
|
-
continue;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
// Match a key: value line
|
|
154
|
-
const keyMatch = line.match(/^(\s*)([\w-]+):\s*(.*)?$/);
|
|
155
|
-
if (!keyMatch) {
|
|
156
|
-
i++;
|
|
157
|
-
continue;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
const [, , key, rawValue] = keyMatch;
|
|
161
|
-
const value = rawValue?.trim() ?? "";
|
|
162
|
-
|
|
163
|
-
if (value === "" || value === undefined) {
|
|
164
|
-
// Could be an object or a list starting on next lines
|
|
165
|
-
const nextNonEmpty = findNextNonEmptyLine(lines, i + 1, endIdx);
|
|
166
|
-
if (nextNonEmpty < endIdx) {
|
|
167
|
-
const nextLine = lines[nextNonEmpty]!;
|
|
168
|
-
const nextIndent = getIndent(nextLine);
|
|
169
|
-
if (nextIndent > indent) {
|
|
170
|
-
// Check if it's a list (starts with "- ")
|
|
171
|
-
if (nextLine.trimStart().startsWith("- ")) {
|
|
172
|
-
const listResult = parseYamlList(lines, nextIndent, i + 1, endIdx);
|
|
173
|
-
result[key] = listResult.value;
|
|
174
|
-
i = listResult.nextIdx;
|
|
175
|
-
} else {
|
|
176
|
-
// Nested object
|
|
177
|
-
const blockResult = parseYamlBlock(lines, nextIndent, i + 1, endIdx);
|
|
178
|
-
result[key] = blockResult.value;
|
|
179
|
-
i = blockResult.nextIdx;
|
|
180
|
-
}
|
|
181
|
-
continue;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
// Empty value, no nested content
|
|
185
|
-
result[key] = null;
|
|
186
|
-
i++;
|
|
187
|
-
} else {
|
|
188
|
-
result[key] = parseYamlValue(value);
|
|
189
|
-
i++;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
return { value: result, nextIdx: i };
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Parse a YAML list (lines starting with "- ") at a given indentation level.
|
|
198
|
-
*/
|
|
199
|
-
function parseYamlList(
|
|
200
|
-
lines: string[],
|
|
201
|
-
indent: number,
|
|
202
|
-
startIdx: number,
|
|
203
|
-
endIdx: number,
|
|
204
|
-
): { value: unknown[]; nextIdx: number } {
|
|
205
|
-
const result: unknown[] = [];
|
|
206
|
-
let i = startIdx;
|
|
207
|
-
|
|
208
|
-
while (i < endIdx) {
|
|
209
|
-
const line = lines[i];
|
|
210
|
-
if (!line || !line.trim()) {
|
|
211
|
-
i++;
|
|
212
|
-
continue;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
const lineIndent = getIndent(line);
|
|
216
|
-
if (lineIndent < indent) break;
|
|
217
|
-
if (lineIndent > indent) {
|
|
218
|
-
i++;
|
|
219
|
-
continue;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
const trimmed = line.trimStart();
|
|
223
|
-
if (!trimmed.startsWith("- ")) break;
|
|
224
|
-
|
|
225
|
-
// Get content after "- "
|
|
226
|
-
const itemContent = trimmed.slice(2).trim();
|
|
227
|
-
|
|
228
|
-
if (itemContent === "" || itemContent === undefined) {
|
|
229
|
-
// Sub-block under this list item
|
|
230
|
-
const nextNonEmpty = findNextNonEmptyLine(lines, i + 1, endIdx);
|
|
231
|
-
if (nextNonEmpty < endIdx) {
|
|
232
|
-
const nextIndent = getIndent(lines[nextNonEmpty]!);
|
|
233
|
-
if (nextIndent > indent) {
|
|
234
|
-
const blockResult = parseYamlBlock(lines, nextIndent, i + 1, endIdx);
|
|
235
|
-
result.push(blockResult.value);
|
|
236
|
-
i = blockResult.nextIdx;
|
|
237
|
-
continue;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
result.push(null);
|
|
241
|
-
i++;
|
|
242
|
-
} else {
|
|
243
|
-
// Check for inline key: value (object item like "- target: foo")
|
|
244
|
-
const kvMatch = itemContent.match(/^([\w-]+):\s*(.*)$/);
|
|
245
|
-
if (kvMatch) {
|
|
246
|
-
// This list item is an object — collect all keys at this item's indent + 2
|
|
247
|
-
const obj: Record<string, unknown> = {};
|
|
248
|
-
const [, firstKey, firstVal] = kvMatch;
|
|
249
|
-
obj[firstKey] = parseYamlValue(firstVal?.trim() ?? "");
|
|
250
|
-
|
|
251
|
-
// Look for continuation keys indented further
|
|
252
|
-
const itemKeyIndent = indent + 2;
|
|
253
|
-
let j = i + 1;
|
|
254
|
-
while (j < endIdx) {
|
|
255
|
-
const nextLine = lines[j];
|
|
256
|
-
if (!nextLine || !nextLine.trim()) {
|
|
257
|
-
j++;
|
|
258
|
-
continue;
|
|
259
|
-
}
|
|
260
|
-
const nextLineIndent = getIndent(nextLine);
|
|
261
|
-
if (nextLineIndent < itemKeyIndent) break;
|
|
262
|
-
if (nextLineIndent === itemKeyIndent) {
|
|
263
|
-
const nextKv = nextLine.match(/^\s*([\w-]+):\s*(.*)$/);
|
|
264
|
-
if (nextKv) {
|
|
265
|
-
const [, nk, nv] = nextKv;
|
|
266
|
-
obj[nk] = parseYamlValue(nv?.trim() ?? "");
|
|
267
|
-
j++;
|
|
268
|
-
continue;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
break;
|
|
272
|
-
}
|
|
273
|
-
result.push(obj);
|
|
274
|
-
i = j;
|
|
275
|
-
} else {
|
|
276
|
-
result.push(parseYamlValue(itemContent));
|
|
277
|
-
i++;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
return { value: result, nextIdx: i };
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
function getIndent(line: string): number {
|
|
286
|
-
const match = line.match(/^(\s*)/);
|
|
287
|
-
return match ? match[1].length : 0;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
function findNextNonEmptyLine(lines: string[], from: number, end: number): number {
|
|
291
|
-
for (let i = from; i < end; i++) {
|
|
292
|
-
if (lines[i]?.trim()) return i;
|
|
293
|
-
}
|
|
294
|
-
return end;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* Parse a YAML value (handles strings, numbers, booleans, null, arrays)
|
|
299
|
-
*/
|
|
300
|
-
function parseYamlValue(value: string): unknown {
|
|
301
|
-
// Empty string
|
|
302
|
-
if (value === "") return null;
|
|
303
|
-
|
|
304
|
-
// Remove quotes if present
|
|
305
|
-
if ((value.startsWith('"') && value.endsWith('"')) ||
|
|
306
|
-
(value.startsWith("'") && value.endsWith("'"))) {
|
|
307
|
-
return value.slice(1, -1);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
// Null
|
|
311
|
-
if (value === "null" || value === "~") return null;
|
|
312
|
-
|
|
313
|
-
// Boolean
|
|
314
|
-
if (value === "true") return true;
|
|
315
|
-
if (value === "false") return false;
|
|
316
|
-
|
|
317
|
-
// Number
|
|
318
|
-
const num = Number(value);
|
|
319
|
-
if (!isNaN(num) && value !== "") return num;
|
|
320
|
-
|
|
321
|
-
// Array (simple inline format)
|
|
322
|
-
if (value.startsWith("[") && value.endsWith("]")) {
|
|
323
|
-
const inner = value.slice(1, -1);
|
|
324
|
-
if (inner.trim() === "") return [];
|
|
325
|
-
return inner.split(",").map((s) => parseYamlValue(s.trim()));
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
// String
|
|
329
|
-
return value;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
/**
|
|
333
|
-
* Serialize frontmatter to YAML string
|
|
334
|
-
*/
|
|
335
|
-
export function serializeFrontmatter(frontmatter: MemoryFrontmatter): string {
|
|
336
|
-
const lines: string[] = ["---"];
|
|
337
|
-
|
|
338
|
-
if (frontmatter.id) {
|
|
339
|
-
lines.push(`id: ${frontmatter.id}`);
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
if (frontmatter.type) {
|
|
343
|
-
lines.push(`type: ${frontmatter.type}`);
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
if (frontmatter.session) {
|
|
347
|
-
lines.push("session:");
|
|
348
|
-
const session = frontmatter.session;
|
|
349
|
-
if (session.id) lines.push(` id: ${session.id}`);
|
|
350
|
-
if (session.source) lines.push(` source: ${session.source}`);
|
|
351
|
-
if (session.project) lines.push(` project: ${formatPath(session.project)}`);
|
|
352
|
-
if (session.transcript) lines.push(` transcript: ${formatPath(session.transcript)}`);
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
if (frontmatter.created) {
|
|
356
|
-
lines.push(`created: ${frontmatter.created}`);
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
if (frontmatter.updated) {
|
|
360
|
-
lines.push(`updated: ${frontmatter.updated}`);
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
if (frontmatter.tags && frontmatter.tags.length > 0) {
|
|
364
|
-
lines.push(`tags: [${frontmatter.tags.join(", ")}]`);
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
if (frontmatter.domain && frontmatter.domain.length > 0) {
|
|
368
|
-
lines.push(`domain: [${frontmatter.domain.join(", ")}]`);
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
if (frontmatter.entities && frontmatter.entities.length > 0) {
|
|
372
|
-
lines.push(`entities: [${frontmatter.entities.join(", ")}]`);
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
if (frontmatter.confidence !== undefined) {
|
|
376
|
-
lines.push(`confidence: ${frontmatter.confidence}`);
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
if (frontmatter.source) {
|
|
380
|
-
lines.push("source:");
|
|
381
|
-
if (frontmatter.source.origin) lines.push(` origin: ${frontmatter.source.origin}`);
|
|
382
|
-
if (frontmatter.source.trajectories && frontmatter.source.trajectories.length > 0) {
|
|
383
|
-
lines.push(` trajectories: [${frontmatter.source.trajectories.join(", ")}]`);
|
|
384
|
-
}
|
|
385
|
-
if (frontmatter.source.agentId) lines.push(` agentId: ${frontmatter.source.agentId}`);
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
if (frontmatter.links && frontmatter.links.length > 0) {
|
|
389
|
-
lines.push("links:");
|
|
390
|
-
for (const link of frontmatter.links) {
|
|
391
|
-
lines.push(` - target: ${link.target}`);
|
|
392
|
-
lines.push(` relation: ${link.relation}`);
|
|
393
|
-
if (link.layer) lines.push(` layer: ${link.layer}`);
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
if (frontmatter.supersedes !== undefined) {
|
|
398
|
-
lines.push(`supersedes: ${frontmatter.supersedes === null ? "~" : frontmatter.supersedes}`);
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
lines.push("---");
|
|
402
|
-
return lines.join("\n") + "\n";
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
/**
|
|
406
|
-
* Add or update frontmatter in content
|
|
407
|
-
*/
|
|
408
|
-
export function addFrontmatter(
|
|
409
|
-
content: string,
|
|
410
|
-
frontmatter: MemoryFrontmatter,
|
|
411
|
-
): string {
|
|
412
|
-
const { frontmatter: existing, body } = parseFrontmatter(content);
|
|
413
|
-
|
|
414
|
-
// Merge with existing frontmatter
|
|
415
|
-
const merged: MemoryFrontmatter = {
|
|
416
|
-
...existing,
|
|
417
|
-
...frontmatter,
|
|
418
|
-
session: {
|
|
419
|
-
...existing?.session,
|
|
420
|
-
...frontmatter.session,
|
|
421
|
-
},
|
|
422
|
-
};
|
|
423
|
-
|
|
424
|
-
// Update timestamp
|
|
425
|
-
if (!merged.created) {
|
|
426
|
-
merged.created = new Date().toISOString();
|
|
427
|
-
}
|
|
428
|
-
merged.updated = new Date().toISOString();
|
|
429
|
-
|
|
430
|
-
return serializeFrontmatter(merged) + body;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
/**
|
|
434
|
-
* Add session context as frontmatter to content
|
|
435
|
-
*/
|
|
436
|
-
export function addSessionToContent(
|
|
437
|
-
content: string,
|
|
438
|
-
session: SessionContext,
|
|
439
|
-
): string {
|
|
440
|
-
return addFrontmatter(content, { session });
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
/**
|
|
444
|
-
* Format path for display (use ~ for home directory)
|
|
445
|
-
*/
|
|
446
|
-
function formatPath(filePath: string): string {
|
|
447
|
-
const home = os.homedir();
|
|
448
|
-
if (filePath.startsWith(home)) {
|
|
449
|
-
return "~" + filePath.slice(home.length);
|
|
450
|
-
}
|
|
451
|
-
return filePath;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
/**
|
|
455
|
-
* Extract session context from file content
|
|
456
|
-
*/
|
|
457
|
-
export function extractSession(content: string): SessionContext | undefined {
|
|
458
|
-
const { frontmatter } = parseFrontmatter(content);
|
|
459
|
-
return frontmatter?.session;
|
|
460
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2023",
|
|
4
|
-
"lib": ["ES2023"],
|
|
5
|
-
"module": "NodeNext",
|
|
6
|
-
"moduleResolution": "NodeNext",
|
|
7
|
-
"declaration": true,
|
|
8
|
-
"declarationMap": true,
|
|
9
|
-
"strict": true,
|
|
10
|
-
"esModuleInterop": true,
|
|
11
|
-
"skipLibCheck": true,
|
|
12
|
-
"forceConsistentCasingInFileNames": true,
|
|
13
|
-
"outDir": "dist",
|
|
14
|
-
"rootDir": "src",
|
|
15
|
-
"types": ["node"]
|
|
16
|
-
},
|
|
17
|
-
"include": ["src"],
|
|
18
|
-
"exclude": ["node_modules", "dist"]
|
|
19
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "tsup";
|
|
2
|
-
|
|
3
|
-
export default defineConfig([
|
|
4
|
-
// Library build
|
|
5
|
-
{
|
|
6
|
-
entry: ["src/index.ts"],
|
|
7
|
-
format: ["esm"],
|
|
8
|
-
dts: true,
|
|
9
|
-
clean: true,
|
|
10
|
-
sourcemap: true,
|
|
11
|
-
target: "node22",
|
|
12
|
-
external: ["node-llama-cpp"],
|
|
13
|
-
},
|
|
14
|
-
// CLI build - bundle everything into single file
|
|
15
|
-
{
|
|
16
|
-
entry: ["src/cli/index.ts"],
|
|
17
|
-
format: ["esm"],
|
|
18
|
-
outDir: "dist/cli",
|
|
19
|
-
sourcemap: true,
|
|
20
|
-
target: "node22",
|
|
21
|
-
external: ["node-llama-cpp", "commander"],
|
|
22
|
-
banner: {
|
|
23
|
-
js: "#!/usr/bin/env node",
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
]);
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "vitest/config";
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
test: {
|
|
5
|
-
watch: false,
|
|
6
|
-
include: ["src/**/*.test.ts"],
|
|
7
|
-
exclude: [
|
|
8
|
-
"**/node_modules/**",
|
|
9
|
-
"**/clawdbot/**",
|
|
10
|
-
"**/dist/**",
|
|
11
|
-
// These tests use node:sqlite which Vite can't handle
|
|
12
|
-
// Run with: npm run test:integration or npm run test:cli
|
|
13
|
-
"**/*.integration.test.ts",
|
|
14
|
-
"**/cli/__tests__/commands.test.ts",
|
|
15
|
-
],
|
|
16
|
-
// Run tests sequentially to avoid XDG_CONFIG_HOME conflicts
|
|
17
|
-
pool: "forks",
|
|
18
|
-
poolOptions: {
|
|
19
|
-
forks: {
|
|
20
|
-
singleFork: true,
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
npx lint-staged
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Alex Ngai
|
|
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.
|