@maadb/core 0.7.14 → 0.7.15
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/README.md +12 -12
- package/dist/architect.js +11 -11
- package/dist/architect.js.map +1 -1
- package/dist/claude-md.js +4 -4
- package/dist/claude-md.js.map +1 -1
- package/dist/cli/index.js +22 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/maad-md.js +7 -7
- package/dist/maad-md.js.map +1 -1
- package/package.json +1 -3
package/README.md
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
[](LICENSE)
|
|
4
4
|
[](package.json)
|
|
5
5
|
[](tsconfig.json)
|
|
6
|
-
[](tests)
|
|
7
7
|
[](https://www.npmjs.com/package/@maadb/core)
|
|
8
|
-
[](Version.md)
|
|
9
9
|
|
|
10
10
|
> **Markdown is the database. The engine makes it queryable.**
|
|
11
11
|
|
|
@@ -283,7 +283,7 @@ node dist/cli.js --instance /path/to/instance.yaml serve \
|
|
|
283
283
|
--transport http --http-host 127.0.0.1 --http-port 7733
|
|
284
284
|
```
|
|
285
285
|
|
|
286
|
-
Hot-reload tokens + instance config on edits: `sudo systemctl reload maad` (or `docker compose kill -s SIGHUP maad`). Rotate tokens via `maad auth rotate-token --id=tok-<id>`; revoke via `maad auth revoke-token --id=tok-<id>`. Full auth primitives: [`docs/
|
|
286
|
+
Hot-reload tokens + instance config on edits: `sudo systemctl reload maad` (or `docker compose kill -s SIGHUP maad`). Rotate tokens via `maad auth rotate-token --id=tok-<id>`; revoke via `maad auth revoke-token --id=tok-<id>`. Full auth primitives: [`docs/archive/0.7.0-scoped-auth.md`](docs/archive/0.7.0-scoped-auth.md).
|
|
287
287
|
|
|
288
288
|
Deployment guides:
|
|
289
289
|
|
|
@@ -350,16 +350,16 @@ In multi-project mode, session tools are always available pre-bind: `maad_projec
|
|
|
350
350
|
|
|
351
351
|
## Current state
|
|
352
352
|
|
|
353
|
-
**Current:** v0.7.
|
|
353
|
+
**Current:** v0.7.15 — `maad version` command, CI on every push/PR (Ubuntu + Windows), LF line-ending enforcement, MAADb brand sweep, packaging hardening.
|
|
354
354
|
|
|
355
355
|
Recent shipped scope:
|
|
356
|
-
- **0.7.
|
|
357
|
-
- **0.7.
|
|
358
|
-
- **0.7.
|
|
359
|
-
- **0.7.
|
|
360
|
-
- **0.7.
|
|
361
|
-
- **0.7.
|
|
362
|
-
- **0.7.0–0.7.
|
|
356
|
+
- **0.7.14** — Correctness patch from a full engine audit: CRLF/BOM-tolerant writes, merged git child environment, numeric sort ordering, composite filters on join/verify, pagination guards, pathspec-scoped audit commits
|
|
357
|
+
- **0.7.13** — Per-document index-time memory guards (annotation cap + byte backstop) so one pathological document can't exhaust the engine process
|
|
358
|
+
- **0.7.12** — `maad_query` sort contract (`UNSUPPORTED_SORT_FIELD` instead of silent NULL ordering), engine-stamped `createdAt`, file-path canonicalization
|
|
359
|
+
- **0.7.11** — `maad_search` rejects unknown primitives up front (`INVALID_PRIMITIVE`)
|
|
360
|
+
- **0.7.10** — Integrity & cleanup: `maad_verify mode: 'integrity'`, `maad_backup` snapshots, destructive cleanup primitives under the confirm contract, memory-pressure observability, pino write-body redaction
|
|
361
|
+
- **0.7.5–0.7.8** — Unix socket transport, schema-cache coherence, write-path security hardening, Node 24 baseline
|
|
362
|
+
- **0.7.0–0.7.4** — Scoped auth & identity, agent-first aggregates, reindex schema-change detection
|
|
363
363
|
|
|
364
364
|
See [Version.md](Version.md) for the full release history and forward plan.
|
|
365
365
|
|
|
@@ -367,7 +367,7 @@ See [Version.md](Version.md) for the full release history and forward plan.
|
|
|
367
367
|
|
|
368
368
|
- TypeScript strict, Node.js 24+ (current Active LTS)
|
|
369
369
|
- 6 production dependencies: `better-sqlite3`, `gray-matter`, `js-yaml`, `simple-git`, `@modelcontextprotocol/sdk`, `pino`
|
|
370
|
-
-
|
|
370
|
+
- 982 tests, Vitest — run on every push/PR across Ubuntu and Windows
|
|
371
371
|
- MIT license, pre-1.0, actively developed
|
|
372
372
|
|
|
373
373
|
## License
|
package/dist/architect.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// ============================================================================
|
|
2
2
|
// Architect Skill File — generated on init
|
|
3
|
-
// The
|
|
3
|
+
// The MAADb Architect role: designs and deploys databases from requirements.
|
|
4
4
|
// Operates autonomously, agent-to-agent, or interactively.
|
|
5
5
|
// ============================================================================
|
|
6
6
|
export function generateArchitectSkill() {
|
|
7
|
-
return `#
|
|
7
|
+
return `# MAADb Architect
|
|
8
8
|
|
|
9
9
|
## Role
|
|
10
10
|
|
|
11
|
-
You are the
|
|
11
|
+
You are the MAADb Architect. Your job is to design, deploy, and maintain MAADb database instances. You receive requirements — from another agent, a system spec, or a human — and produce a working database.
|
|
12
12
|
|
|
13
|
-
You use
|
|
13
|
+
You use MAADb MCP tools for all operations. You do not use shell commands.
|
|
14
14
|
|
|
15
15
|
## Operating Modes
|
|
16
16
|
|
|
@@ -138,8 +138,8 @@ Only declare precision hints on date fields where the contract actually matters.
|
|
|
138
138
|
### ID rules (critical — do not skip)
|
|
139
139
|
- \`id_prefix\` in the registry MUST be 2-5 lowercase alphanumeric characters (e.g. \`cli\`, \`usr\`, \`cas\`, \`note\`, \`te\`)
|
|
140
140
|
- Single characters (C, U, N), uppercase (CS, TE), and symbols are rejected
|
|
141
|
-
-
|
|
142
|
-
- **Source data IDs are input data, not
|
|
141
|
+
- MAADb generates its own IDs: \`<prefix>-<sequence>\` (e.g. \`cli-001\`, \`usr-012\`)
|
|
142
|
+
- **Source data IDs are input data, not MAADb IDs.** Do not change the registry to match source IDs. Map source IDs to MAADb format during import (e.g. C001 → cli-001, U005 → usr-005)
|
|
143
143
|
- Store the original source ID in a field (e.g. \`source_id\`) if you need to cross-reference back
|
|
144
144
|
|
|
145
145
|
## Design Process
|
|
@@ -162,7 +162,7 @@ Rough annual record count per type. This validates master vs transaction decisio
|
|
|
162
162
|
Output a clear summary:
|
|
163
163
|
|
|
164
164
|
\`\`\`
|
|
165
|
-
Proposed
|
|
165
|
+
Proposed MAADb Structure:
|
|
166
166
|
|
|
167
167
|
Master types (one file per record):
|
|
168
168
|
- customer: name, phone, email, address, type [residential, commercial], since. ~500/yr
|
|
@@ -201,7 +201,7 @@ After design is confirmed (or in autonomous mode):
|
|
|
201
201
|
maad_create agent {
|
|
202
202
|
docId: "agt-architect",
|
|
203
203
|
name: "architect",
|
|
204
|
-
role: "
|
|
204
|
+
role: "MAADb Architect — bootstrapped this project's schema",
|
|
205
205
|
description: "Designed registry + schemas on <ISO date>",
|
|
206
206
|
status: "active",
|
|
207
207
|
created_at: <now ISO>
|
|
@@ -246,13 +246,13 @@ After deployment, report to the requesting agent or user:
|
|
|
246
246
|
- What MCP tools are available for this structure
|
|
247
247
|
- Any limitations or notes (e.g., "notes are appended to job files, use get warm to read individual notes")
|
|
248
248
|
|
|
249
|
-
Then transition to
|
|
249
|
+
Then transition to MAADb User mode for day-to-day operations, or hand control back to the upstream agent.
|
|
250
250
|
|
|
251
251
|
## Change Propagation
|
|
252
252
|
|
|
253
253
|
If the project will involve multiple agents, a hosted deployment, or scheduled workers, point the user at \`docs/change-feed.md\` in the engine repo. Key calls: \`maad_changes_since\` is the polling delta tool (shipped); cursor must be persisted between calls; in HTTP deployments polling belongs in the gateway, not the agent's reasoning loop; push via \`maad_subscribe\` is roadmapped for 0.6.5. Do not invent custom polling cadence in skill files — follow the patterns in the reference doc.
|
|
254
254
|
|
|
255
|
-
## What
|
|
255
|
+
## What MAADb Is and Is Not
|
|
256
256
|
|
|
257
257
|
**Good fit:**
|
|
258
258
|
- Narrative + structured data (cases, notes, reports, customer records)
|
|
@@ -267,7 +267,7 @@ If the project will involve multiple agents, a hosted deployment, or scheduled w
|
|
|
267
267
|
- >100K writes/day (SQLite single-writer constraint)
|
|
268
268
|
- Multi-tenant SaaS (one project = one tenant currently)
|
|
269
269
|
|
|
270
|
-
Be honest about limitations when asked. Recommend alternatives when
|
|
270
|
+
Be honest about limitations when asked. Recommend alternatives when MAADb isn't the right tool.
|
|
271
271
|
`;
|
|
272
272
|
}
|
|
273
273
|
//# sourceMappingURL=architect.js.map
|
package/dist/architect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"architect.js","sourceRoot":"","sources":["../src/architect.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,2CAA2C;AAC3C,
|
|
1
|
+
{"version":3,"file":"architect.js","sourceRoot":"","sources":["../src/architect.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,2CAA2C;AAC3C,6EAA6E;AAC7E,2DAA2D;AAC3D,+EAA+E;AAE/E,MAAM,UAAU,sBAAsB;IACpC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwQR,CAAC;AACF,CAAC"}
|
package/dist/claude-md.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// ============================================================================
|
|
2
|
-
// CLAUDE.md Generator — Agent instructions for MCP-first
|
|
2
|
+
// CLAUDE.md Generator — Agent instructions for MCP-first MAADb workflow
|
|
3
3
|
// Generated on init. Tells the LLM how to work with this project.
|
|
4
4
|
// ============================================================================
|
|
5
5
|
export function generateClaudeMd() {
|
|
6
|
-
return `#
|
|
6
|
+
return `# MAADb Project — Agent Instructions
|
|
7
7
|
|
|
8
8
|
## How to work with this project
|
|
9
9
|
|
|
10
|
-
This is a
|
|
10
|
+
This is a MAADb project. You have MCP tools for all data operations.
|
|
11
11
|
|
|
12
|
-
**Use
|
|
12
|
+
**Use MAADb MCP tools for everything.** Do not use bash, shell commands, or direct file reads for data access. If a tool fails, report the error — do not fall back to shell.
|
|
13
13
|
|
|
14
14
|
## Boot sequence
|
|
15
15
|
|
package/dist/claude-md.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-md.js","sourceRoot":"","sources":["../src/claude-md.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,
|
|
1
|
+
{"version":3,"file":"claude-md.js","sourceRoot":"","sources":["../src/claude-md.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,wEAAwE;AACxE,kEAAkE;AAClE,+EAA+E;AAE/E,MAAM,UAAU,gBAAgB;IAC9B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyFR,CAAC;AACF,CAAC"}
|
package/dist/cli/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// ============================================================================
|
|
3
|
-
//
|
|
3
|
+
// MAADb CLI — Command dispatch
|
|
4
4
|
// ============================================================================
|
|
5
5
|
import path from 'node:path';
|
|
6
|
+
import { readFileSync } from 'node:fs';
|
|
6
7
|
import { fileURLToPath } from 'node:url';
|
|
7
8
|
import { cmdScan, cmdSummary, cmdDescribe } from './commands/discover.js';
|
|
8
9
|
import { cmdGet, cmdQuery, cmdSearch, cmdRelated, cmdSchema } from './commands/read.js';
|
|
@@ -105,6 +106,11 @@ async function main() {
|
|
|
105
106
|
case 'serve':
|
|
106
107
|
await cmdServe();
|
|
107
108
|
break;
|
|
109
|
+
case 'version':
|
|
110
|
+
case '--version':
|
|
111
|
+
case '-v':
|
|
112
|
+
printVersion();
|
|
113
|
+
break;
|
|
108
114
|
case 'help':
|
|
109
115
|
case '--help':
|
|
110
116
|
case '-h':
|
|
@@ -224,14 +230,26 @@ async function cmdServe() {
|
|
|
224
230
|
process.exit(1);
|
|
225
231
|
}
|
|
226
232
|
}
|
|
233
|
+
function printVersion() {
|
|
234
|
+
// dist/cli/index.js → two levels up to the package root. package.json
|
|
235
|
+
// always ships in the npm tarball, so this never misses on an install.
|
|
236
|
+
try {
|
|
237
|
+
const pkgPath = path.resolve(__dirname, '..', '..', 'package.json');
|
|
238
|
+
const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
|
|
239
|
+
console.log(pkg.version ?? 'unknown');
|
|
240
|
+
}
|
|
241
|
+
catch {
|
|
242
|
+
console.log('unknown');
|
|
243
|
+
}
|
|
244
|
+
}
|
|
227
245
|
function printHelp() {
|
|
228
246
|
console.log(`
|
|
229
|
-
|
|
247
|
+
MAADb — Markdown As A Database
|
|
230
248
|
|
|
231
249
|
Usage: maad <command> [options]
|
|
232
250
|
|
|
233
251
|
Commands:
|
|
234
|
-
init [dir] Initialize a new
|
|
252
|
+
init [dir] Initialize a new MAADb project
|
|
235
253
|
scan <file.md|dir> Analyze raw markdown (no registry needed)
|
|
236
254
|
summary Project snapshot (types, counts, sample IDs, object inventory)
|
|
237
255
|
describe Show project overview
|
|
@@ -247,6 +265,7 @@ Commands:
|
|
|
247
265
|
parse <file.md> Parse a file and print the result
|
|
248
266
|
history <doc_id> Show git history for a document
|
|
249
267
|
audit [--since date] Show project-wide activity
|
|
268
|
+
version Print the installed version (also --version, -v)
|
|
250
269
|
serve [--transport stdio|http] [--role ...] [--prov ...] Start MCP server
|
|
251
270
|
|
|
252
271
|
Options:
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AACA,+EAA+E;AAC/E
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AACA,+EAA+E;AAC/E,+BAA+B;AAC/B,+EAA+E;AAE/E,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,YAA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CAAC,EAAE,CAAC,CAAC;IAC3E,CAAC;SAAM,IAAI,WAAW,EAAE,CAAC;QACvB,MAAM,WAAW,CAAC,EAAE,GAAG,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IACzE,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CAAC,+DAA+D,CAAC,CAAC;QAC/E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,SAAS,YAAY;IACnB,sEAAsE;IACtE,uEAAuE;IACvE,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QACpE,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAyB,CAAC;QAC/E,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,IAAI,SAAS,CAAC,CAAC;IACxC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACzB,CAAC;AACH,CAAC;AAED,SAAS,SAAS;IAChB,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Db,CAAC,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;IACf,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACjB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/maad-md.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// ============================================================================
|
|
2
2
|
// MAAD.md Generator
|
|
3
|
-
// Generates the LLM instruction file for a
|
|
3
|
+
// Generates the LLM instruction file for a MAADb project.
|
|
4
4
|
// Content is STABLE — no volatile counts, no project-state details.
|
|
5
5
|
// Regenerated on every reindex so interface changes propagate.
|
|
6
6
|
// ============================================================================
|
|
@@ -23,14 +23,14 @@ function buildCmdPrefix(enginePath, projectRoot) {
|
|
|
23
23
|
function generateHeader(cmd) {
|
|
24
24
|
return `# MAAD.md — LLM Interface
|
|
25
25
|
|
|
26
|
-
> Auto-generated by the
|
|
26
|
+
> Auto-generated by the MAADb engine. Do not edit.
|
|
27
27
|
>
|
|
28
28
|
> **This is a test/evaluation project.** If you find issues or have improvement ideas,
|
|
29
29
|
> create a feedback file: \`feedback-YYYY-MM-DD-<model>.md\` (e.g. \`feedback-2026-04-07-gpt-5.md\`).
|
|
30
30
|
|
|
31
31
|
## What is this?
|
|
32
32
|
|
|
33
|
-
A **
|
|
33
|
+
A **MAADb project** — a markdown-native database. Markdown files are the records. A queryable index gives you structured access without reading full files.
|
|
34
34
|
|
|
35
35
|
**This file** = stable operating instructions. Read once per session.
|
|
36
36
|
**\`maad_summary\` tool** = live project snapshot. Run once per session to see what's here.
|
|
@@ -38,7 +38,7 @@ A **MAAD project** — a markdown-native database. Markdown files are the record
|
|
|
38
38
|
|
|
39
39
|
## How to access data
|
|
40
40
|
|
|
41
|
-
Use **
|
|
41
|
+
Use **MAADb MCP tools** for all data operations. Do not use shell commands or direct file reads for data access. If \`maad_summary\` reports an empty project, read \`_skills/architect-core.md\` and enter Architect mode to design and deploy the schema.
|
|
42
42
|
|
|
43
43
|
If using CLI for debugging:
|
|
44
44
|
\`\`\`
|
|
@@ -165,7 +165,7 @@ function generateRules() {
|
|
|
165
165
|
1. **Run \`summary\` first** in every new session — one call to orient
|
|
166
166
|
2. **Use \`hot\` reads by default** — escalate to \`full\`, \`warm\`, then \`cold\` only when needed
|
|
167
167
|
3. **Use \`schema <type>\` before writes** — know what fields are required
|
|
168
|
-
4. **Use
|
|
168
|
+
4. **Use MAADb MCP tools for writes** — never edit markdown files directly; CLI forms above are for operator debugging only
|
|
169
169
|
5. **Use \`search\` for cross-document queries** — don't open files to find people/dates/amounts
|
|
170
170
|
6. **Use \`related\` for graph traversal** — don't manually search for connected docs
|
|
171
171
|
7. **Cite \`doc_id\` and \`block_id\`** in answers for traceability
|
|
@@ -231,13 +231,13 @@ export function generateStubMaadMd(enginePath, projectRoot) {
|
|
|
231
231
|
const cmd = buildCmdPrefix(enginePath, projectRoot);
|
|
232
232
|
return `# MAAD.md — LLM Interface
|
|
233
233
|
|
|
234
|
-
> Auto-generated by the
|
|
234
|
+
> Auto-generated by the MAADb engine.
|
|
235
235
|
> Run \`reindex\` after adding types and schemas to update this file.
|
|
236
236
|
>
|
|
237
237
|
> **This is a test/evaluation project.** If you find issues, create a feedback file:
|
|
238
238
|
> \`feedback-YYYY-MM-DD-<model>.md\`
|
|
239
239
|
|
|
240
|
-
This is a **
|
|
240
|
+
This is a **MAADb project** — a markdown-native database.
|
|
241
241
|
|
|
242
242
|
## Getting Started
|
|
243
243
|
|
package/dist/maad-md.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maad-md.js","sourceRoot":"","sources":["../src/maad-md.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,oBAAoB;AACpB,
|
|
1
|
+
{"version":3,"file":"maad-md.js","sourceRoot":"","sources":["../src/maad-md.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,oBAAoB;AACpB,0DAA0D;AAC1D,oEAAoE;AACpE,+DAA+D;AAC/D,+EAA+E;AAY/E,MAAM,UAAU,cAAc,CAAC,GAAkB;IAC/C,MAAM,GAAG,GAAG,cAAc,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;IAC5D,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;IACnC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG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AC;AACR,CAAC;AAED,SAAS,gBAAgB;IACvB,OAAO;;;;;;;;;;;2DAWkD,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,UAAkB,EAAE,WAAmB;IACxE,MAAM,GAAG,GAAG,cAAc,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IACpD,OAAO;;;;;;;;;;;;;;;YAeG,GAAG;;;CAGd,CAAC;AACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maadb/core",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.15",
|
|
4
4
|
"description": "Markdown As A Database — treats markdown as the canonical data store, builds a queryable index, and gives LLMs deterministic read/write access.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,8 +18,6 @@
|
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
20
|
"dist/",
|
|
21
|
-
"MAAD.md",
|
|
22
|
-
"_skills/",
|
|
23
21
|
"README.md",
|
|
24
22
|
"LICENSE"
|
|
25
23
|
],
|