@tangle-network/agent-knowledge 1.5.0 → 1.5.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.
Files changed (3) hide show
  1. package/AGENTS.md +17 -0
  2. package/README.md +24 -0
  3. package/package.json +2 -2
package/AGENTS.md CHANGED
@@ -2,6 +2,23 @@
2
2
 
3
3
  Use this package when an agent needs persistent, source-grounded knowledge that improves over time.
4
4
 
5
+ ## Repo layering — this package depends on agent-eval, never the reverse
6
+
7
+ ```
8
+ agent-knowledge (this repo) ─┐
9
+ ├──► agent-eval (substrate — the bottom)
10
+ agent-runtime ───────────────┘
11
+ ```
12
+
13
+ **Rule: agent-knowledge depends on agent-eval. agent-eval MUST NOT import from agent-knowledge.** No upward imports, no peerDependency declaration in agent-eval pointing at agent-knowledge. Substrate primitives that agent-knowledge needs (`AnalystFinding`, `RunRecord`, optimizer types, release-confidence types) live in agent-eval; this repo consumes them.
14
+
15
+ Types that stay in THIS repo because they're knowledge-domain-shaped:
16
+ - `KbStore`, `KnowledgeFragment`, `KnowledgeChange`
17
+ - `KnowledgeDiscoveryDispatcher`, source adapters (`createCornellLiiSource`, `createIrsPublicationsSource`)
18
+ - Freshness store + change-detection primitives
19
+
20
+ **The test for "where does a type live?"** — does this concept make sense WITHOUT persistent knowledge or sourced fragments? If yes, it's substrate (agent-eval). If no, it's a knowledge-domain concept (stays here).
21
+
5
22
  ## Rules
6
23
 
7
24
  - Register sources before citing them: `agent-knowledge source-add <path>`.
package/README.md CHANGED
@@ -4,12 +4,36 @@ Source-grounded, eval-gated knowledge growth primitives for agents.
4
4
 
5
5
  This package turns raw sources and generated markdown knowledge into a versionable graph that agents can search, lint, evaluate, and improve over time. It is intentionally domain-agnostic: legal, tax, coding, research, finance, business, and scientific workflows define their own policies and rubrics on top.
6
6
 
7
+ ## Contents
8
+
9
+ - [Install](#install)
10
+ - [Start here](#start-here) — pick CLI vs programmatic
11
+ - [CLI](#cli) — `init` → `source-add` → `index` → `search` → `lint`
12
+ - [Design](#design) — the invariants (immutable sources, cited claims, deterministic graph)
13
+ - [Agent-Eval integration](#agent-eval-integration) — readiness bundles + release reports
14
+ - [Research loop](#research-loop) — `runKnowledgeResearchLoop` + control-loop adapter
15
+ - [Researcher profile](#researcher-profile) — sandbox `AgentProfile` for `runLoop`
16
+ - [Pluggable knowledge sources](#pluggable-knowledge-sources) — live authorities → eval re-runs
17
+
7
18
  ## Install
8
19
 
9
20
  ```bash
10
21
  pnpm add @tangle-network/agent-knowledge @tangle-network/agent-eval
11
22
  ```
12
23
 
24
+ ## Start here
25
+
26
+ Two ways in, depending on what you're doing:
27
+
28
+ - **Author / inspect a KB by hand** → the [CLI](#cli) (`init` → `source-add` → `index` → `search` → `lint`). Fastest way to see the shape on disk.
29
+ - **Drive it from an agent** → pick the primitive by intent:
30
+ - *"Does the agent have enough context to run?"* → [`buildEvalKnowledgeBundle`](#agent-eval-integration) (block / ask / acquire before execution).
31
+ - *"Grow the KB as a researcher"* → [`runKnowledgeResearchLoop`](#research-loop) (deterministic mechanics; your agent owns judgment) or the sandbox [researcher profile](#researcher-profile) for `runLoop`.
32
+ - *"Does this candidate KB actually improve task success?"* → `runKnowledgeBaseOptimization` ([Agent-Eval integration](#agent-eval-integration)).
33
+ - *"Keep live authorities fresh"* → [pluggable sources](#pluggable-knowledge-sources) + `detectChanges` → eval re-runs.
34
+
35
+ Storage stays consumer-owned via `KbStore` (`MemoryKbStore`, `FileSystemKbStore`, or your own D1/Postgres). Every primitive below is source-grounded: claims cite immutable source records, and lint fails on un-grounded citations.
36
+
13
37
  ## CLI
14
38
 
15
39
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-knowledge",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "Source-grounded, eval-gated knowledge growth primitives for agents.",
5
5
  "homepage": "https://github.com/tangle-network/agent-knowledge#readme",
6
6
  "repository": {
@@ -65,11 +65,11 @@
65
65
  "dependencies": {
66
66
  "@tangle-network/agent-eval": "^0.42.0",
67
67
  "@tangle-network/agent-runtime": "^0.25.0",
68
- "@tangle-network/sandbox": "^0.2.1",
69
68
  "zod": "^4.3.6"
70
69
  },
71
70
  "devDependencies": {
72
71
  "@biomejs/biome": "^2.4.15",
72
+ "@tangle-network/sandbox": "^0.3.0",
73
73
  "@types/node": "^25.6.0",
74
74
  "tsup": "^8.0.0",
75
75
  "typescript": "^5.7.0",