kirograph 1.1.1 → 1.2.1
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 +3 -2
- package/dist/bin/commands/memory.js +12 -2
- package/dist/bin/commands/memory.js.map +2 -2
- package/dist/bin/commands/wiki.js +3 -2
- package/dist/bin/commands/wiki.js.map +2 -2
- package/dist/bin/kirograph.js +1 -1
- package/dist/config.js +8 -0
- package/dist/config.js.map +2 -2
- package/dist/db/memory-schema.sql +2 -1
- package/dist/mcp/handlers/memory.js +2 -1
- package/dist/mcp/handlers/memory.js.map +2 -2
- package/dist/mcp/handlers/wiki.js +4 -2
- package/dist/mcp/handlers/wiki.js.map +2 -2
- package/dist/mcp/tools.js +2 -1
- package/dist/mcp/tools.js.map +2 -2
- package/dist/memory/database.js +17 -4
- package/dist/memory/database.js.map +2 -2
- package/dist/memory/index.js +18 -1
- package/dist/memory/index.js.map +2 -2
- package/dist/memory/schema.js +35 -0
- package/dist/memory/schema.js.map +2 -2
- package/dist/memory/types.js.map +1 -1
- package/dist/patterns/loader.js +2 -146
- package/dist/patterns/loader.js.map +3 -3
- package/dist/security/manifest/plugins/maven.js +33 -3
- package/dist/security/manifest/plugins/maven.js.map +2 -2
- package/dist/security/manifest/plugins/npm.js +32 -3
- package/dist/security/manifest/plugins/npm.js.map +2 -2
- package/dist/shared/json-schema.js +136 -0
- package/dist/shared/json-schema.js.map +7 -0
- package/dist/shared/yaml.js +174 -0
- package/dist/shared/yaml.js.map +7 -0
- package/dist/wiki/index.js +3 -1
- package/dist/wiki/index.js.map +2 -2
- package/dist/wiki/lint.js +14 -1
- package/dist/wiki/lint.js.map +2 -2
- package/dist/wiki/typed-pages.js +67 -0
- package/dist/wiki/typed-pages.js.map +7 -0
- package/dist/wiki/types.js.map +1 -1
- package/package.json +1 -1
package/dist/wiki/lint.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/wiki/lint.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * KiroGraph Wiki \u2014 Lint\n *\n * Health checks: contradictions (FTS similarity), orphan pages,\n * broken [[slug]] cross-references.\n */\n\nimport * as path from 'path';\nimport type { WikiLintIssue } from './types';\nimport type { WikiDatabase } from './database';\nimport { extractLinks } from './links';\n\nexport function lintWiki(wikiDb: WikiDatabase): WikiLintIssue[] {\n const issues: WikiLintIssue[] = [];\n const pages = wikiDb.listPages();\n const slugSet = new Set(pages.map(p => p.slug));\n\n for (const page of pages) {\n // Broken [[slug]] links\n for (const linked of extractLinks(page.content)) {\n if (!slugSet.has(linked)) {\n issues.push({\n kind: 'broken_link',\n slug: page.slug,\n detail: `Broken link to [[${linked}]] \u2014 page does not exist`,\n relatedSlug: linked,\n });\n }\n }\n\n // Orphan: no ## Related section and no incoming links from other pages\n const hasRelated = /^## Related/m.test(page.content);\n const hasIncoming = pages.some(p => p.slug !== page.slug && extractLinks(p.content).includes(page.slug));\n if (!hasRelated && !hasIncoming && pages.length > 1) {\n issues.push({\n kind: 'orphan',\n slug: page.slug,\n detail: 'Page has no ## Related section and no incoming links from other pages',\n });\n }\n\n // Stale: ## Sources section present but no date found (can't verify freshness)\n const sourcesMatch = page.content.match(/## Sources\\n([\\s\\S]*?)(?=\\n## |\\n*$)/);\n if (sourcesMatch) {\n const sourcesBlock = sourcesMatch[1];\n const hasDates = /\\d{4}-\\d{2}-\\d{2}/.test(sourcesBlock);\n if (!hasDates) {\n issues.push({\n kind: 'stale',\n slug: page.slug,\n detail: '## Sources section has no dates \u2014 cannot verify freshness',\n });\n }\n }\n\n // Contradictions: FTS similarity with other pages on the same topic\n // Simple heuristic: search for the page title and flag pages with conflicting signals\n const similar = wikiDb.search(page.title, 5);\n for (const { page: other } of similar) {\n if (other.slug === page.slug) continue;\n // Check for negation keywords close to shared terms\n const contradictionSignals = ['instead of', 'not', 'replaced by', 'superseded', 'deprecated'];\n const bothMentionSignal = contradictionSignals.some(\n sig => page.content.toLowerCase().includes(sig) && other.content.toLowerCase().includes(sig)\n );\n if (bothMentionSignal) {\n const key = [page.slug, other.slug].sort().join('|');\n const alreadyReported = issues.some(\n i => i.kind === 'contradiction' && i.detail.includes(other.slug)\n );\n if (!alreadyReported) {\n issues.push({\n kind: 'contradiction',\n slug: page.slug,\n detail: `Possible contradiction with [[${other.slug}]] \u2014 both pages contain negation signals on shared topics`,\n relatedSlug: other.slug,\n });\n }\n }\n }\n }\n\n return issues;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,mBAA6B;
|
|
4
|
+
"sourcesContent": ["/**\n * KiroGraph Wiki \u2014 Lint\n *\n * Health checks: contradictions (FTS similarity), orphan pages,\n * broken [[slug]] cross-references.\n */\n\nimport * as path from 'path';\nimport type { WikiLintIssue } from './types';\nimport type { WikiDatabase } from './database';\nimport { extractLinks } from './links';\nimport { parseFrontmatter, validatePageSchema } from './typed-pages';\n\nexport interface LintWikiOptions {\n /**\n * When set, pages declaring `_type` in their frontmatter are validated\n * against `.kirograph/wiki-schemas/<type>.schema.json` (wikiTypedPages).\n */\n wikiSchemasDir?: string;\n}\n\nexport function lintWiki(wikiDb: WikiDatabase, opts: LintWikiOptions = {}): WikiLintIssue[] {\n const issues: WikiLintIssue[] = [];\n const pages = wikiDb.listPages();\n const slugSet = new Set(pages.map(p => p.slug));\n\n for (const page of pages) {\n // Typed-page schema validation (opt-in via wikiTypedPages)\n if (opts.wikiSchemasDir) {\n const { type, fields } = parseFrontmatter(page.content);\n if (type) {\n for (const violation of validatePageSchema(fields, type, opts.wikiSchemasDir)) {\n issues.push({\n kind: 'schema_error',\n slug: page.slug,\n detail: `[${type}] ${violation}`,\n });\n }\n }\n }\n\n // Broken [[slug]] links\n for (const linked of extractLinks(page.content)) {\n if (!slugSet.has(linked)) {\n issues.push({\n kind: 'broken_link',\n slug: page.slug,\n detail: `Broken link to [[${linked}]] \u2014 page does not exist`,\n relatedSlug: linked,\n });\n }\n }\n\n // Orphan: no ## Related section and no incoming links from other pages\n const hasRelated = /^## Related/m.test(page.content);\n const hasIncoming = pages.some(p => p.slug !== page.slug && extractLinks(p.content).includes(page.slug));\n if (!hasRelated && !hasIncoming && pages.length > 1) {\n issues.push({\n kind: 'orphan',\n slug: page.slug,\n detail: 'Page has no ## Related section and no incoming links from other pages',\n });\n }\n\n // Stale: ## Sources section present but no date found (can't verify freshness)\n const sourcesMatch = page.content.match(/## Sources\\n([\\s\\S]*?)(?=\\n## |\\n*$)/);\n if (sourcesMatch) {\n const sourcesBlock = sourcesMatch[1];\n const hasDates = /\\d{4}-\\d{2}-\\d{2}/.test(sourcesBlock);\n if (!hasDates) {\n issues.push({\n kind: 'stale',\n slug: page.slug,\n detail: '## Sources section has no dates \u2014 cannot verify freshness',\n });\n }\n }\n\n // Contradictions: FTS similarity with other pages on the same topic\n // Simple heuristic: search for the page title and flag pages with conflicting signals\n const similar = wikiDb.search(page.title, 5);\n for (const { page: other } of similar) {\n if (other.slug === page.slug) continue;\n // Check for negation keywords close to shared terms\n const contradictionSignals = ['instead of', 'not', 'replaced by', 'superseded', 'deprecated'];\n const bothMentionSignal = contradictionSignals.some(\n sig => page.content.toLowerCase().includes(sig) && other.content.toLowerCase().includes(sig)\n );\n if (bothMentionSignal) {\n const key = [page.slug, other.slug].sort().join('|');\n const alreadyReported = issues.some(\n i => i.kind === 'contradiction' && i.detail.includes(other.slug)\n );\n if (!alreadyReported) {\n issues.push({\n kind: 'contradiction',\n slug: page.slug,\n detail: `Possible contradiction with [[${other.slug}]] \u2014 both pages contain negation signals on shared topics`,\n relatedSlug: other.slug,\n });\n }\n }\n }\n }\n\n return issues;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,mBAA6B;AAC7B,yBAAqD;AAU9C,SAAS,SAAS,QAAsB,OAAwB,CAAC,GAAoB;AAC1F,QAAM,SAA0B,CAAC;AACjC,QAAM,QAAQ,OAAO,UAAU;AAC/B,QAAM,UAAU,IAAI,IAAI,MAAM,IAAI,OAAK,EAAE,IAAI,CAAC;AAE9C,aAAW,QAAQ,OAAO;AAExB,QAAI,KAAK,gBAAgB;AACvB,YAAM,EAAE,MAAM,OAAO,QAAI,qCAAiB,KAAK,OAAO;AACtD,UAAI,MAAM;AACR,mBAAW,iBAAa,uCAAmB,QAAQ,MAAM,KAAK,cAAc,GAAG;AAC7E,iBAAO,KAAK;AAAA,YACV,MAAM;AAAA,YACN,MAAM,KAAK;AAAA,YACX,QAAQ,IAAI,IAAI,KAAK,SAAS;AAAA,UAChC,CAAC;AAAA,QACH;AAAA,MACF;AAAA,IACF;AAGA,eAAW,cAAU,2BAAa,KAAK,OAAO,GAAG;AAC/C,UAAI,CAAC,QAAQ,IAAI,MAAM,GAAG;AACxB,eAAO,KAAK;AAAA,UACV,MAAM;AAAA,UACN,MAAM,KAAK;AAAA,UACX,QAAQ,oBAAoB,MAAM;AAAA,UAClC,aAAa;AAAA,QACf,CAAC;AAAA,MACH;AAAA,IACF;AAGA,UAAM,aAAa,eAAe,KAAK,KAAK,OAAO;AACnD,UAAM,cAAc,MAAM,KAAK,OAAK,EAAE,SAAS,KAAK,YAAQ,2BAAa,EAAE,OAAO,EAAE,SAAS,KAAK,IAAI,CAAC;AACvG,QAAI,CAAC,cAAc,CAAC,eAAe,MAAM,SAAS,GAAG;AACnD,aAAO,KAAK;AAAA,QACV,MAAM;AAAA,QACN,MAAM,KAAK;AAAA,QACX,QAAQ;AAAA,MACV,CAAC;AAAA,IACH;AAGA,UAAM,eAAe,KAAK,QAAQ,MAAM,sCAAsC;AAC9E,QAAI,cAAc;AAChB,YAAM,eAAe,aAAa,CAAC;AACnC,YAAM,WAAW,oBAAoB,KAAK,YAAY;AACtD,UAAI,CAAC,UAAU;AACb,eAAO,KAAK;AAAA,UACV,MAAM;AAAA,UACN,MAAM,KAAK;AAAA,UACX,QAAQ;AAAA,QACV,CAAC;AAAA,MACH;AAAA,IACF;AAIA,UAAM,UAAU,OAAO,OAAO,KAAK,OAAO,CAAC;AAC3C,eAAW,EAAE,MAAM,MAAM,KAAK,SAAS;AACrC,UAAI,MAAM,SAAS,KAAK,KAAM;AAE9B,YAAM,uBAAuB,CAAC,cAAc,OAAO,eAAe,cAAc,YAAY;AAC5F,YAAM,oBAAoB,qBAAqB;AAAA,QAC7C,SAAO,KAAK,QAAQ,YAAY,EAAE,SAAS,GAAG,KAAK,MAAM,QAAQ,YAAY,EAAE,SAAS,GAAG;AAAA,MAC7F;AACA,UAAI,mBAAmB;AACrB,cAAM,MAAM,CAAC,KAAK,MAAM,MAAM,IAAI,EAAE,KAAK,EAAE,KAAK,GAAG;AACnD,cAAM,kBAAkB,OAAO;AAAA,UAC7B,OAAK,EAAE,SAAS,mBAAmB,EAAE,OAAO,SAAS,MAAM,IAAI;AAAA,QACjE;AACA,YAAI,CAAC,iBAAiB;AACpB,iBAAO,KAAK;AAAA,YACV,MAAM;AAAA,YACN,MAAM,KAAK;AAAA,YACX,QAAQ,iCAAiC,MAAM,IAAI;AAAA,YACnD,aAAa,MAAM;AAAA,UACrB,CAAC;AAAA,QACH;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var typed_pages_exports = {};
|
|
30
|
+
__export(typed_pages_exports, {
|
|
31
|
+
parseFrontmatter: () => parseFrontmatter,
|
|
32
|
+
validatePageSchema: () => validatePageSchema
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(typed_pages_exports);
|
|
35
|
+
var path = __toESM(require("path"));
|
|
36
|
+
var import_yaml = require("../shared/yaml");
|
|
37
|
+
var import_json_schema = require("../shared/json-schema");
|
|
38
|
+
const FRONTMATTER_RE = /^---\r?\n([\s\S]*?)\r?\n---\r?\n?/;
|
|
39
|
+
function parseFrontmatter(content) {
|
|
40
|
+
const match = FRONTMATTER_RE.exec(content);
|
|
41
|
+
if (!match) return { fields: {}, body: content };
|
|
42
|
+
const parsed = (0, import_yaml.parseYaml)(match[1]);
|
|
43
|
+
const { _type, ...fields } = parsed;
|
|
44
|
+
return {
|
|
45
|
+
type: typeof _type === "string" ? _type : void 0,
|
|
46
|
+
fields,
|
|
47
|
+
body: content.slice(match[0].length)
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function validatePageSchema(fields, type, wikiSchemasDir) {
|
|
51
|
+
const schemaPath = path.join(wikiSchemasDir, `${type}.schema.json`);
|
|
52
|
+
let schema;
|
|
53
|
+
try {
|
|
54
|
+
schema = (0, import_json_schema.loadJsonSchema)(schemaPath);
|
|
55
|
+
} catch (err) {
|
|
56
|
+
if (err instanceof import_json_schema.SchemaLoadError) return [err.message];
|
|
57
|
+
throw err;
|
|
58
|
+
}
|
|
59
|
+
if (!schema) return [];
|
|
60
|
+
return (0, import_json_schema.validateAgainstSchema)(fields, schema);
|
|
61
|
+
}
|
|
62
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
63
|
+
0 && (module.exports = {
|
|
64
|
+
parseFrontmatter,
|
|
65
|
+
validatePageSchema
|
|
66
|
+
});
|
|
67
|
+
//# sourceMappingURL=typed-pages.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/wiki/typed-pages.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * KiroGraph Wiki \u2014 Typed pages (opt-in, config `wikiTypedPages`)\n *\n * A wiki page may optionally start with a YAML frontmatter block declaring\n * `_type: <type>` plus arbitrary structured fields. When wikiTypedPages is\n * enabled, `wiki lint` validates those fields against a JSON Schema\n * registered at `.kirograph/wiki-schemas/<type>.schema.json`. Pages with no\n * frontmatter, or a `_type` with no schema registered, are never validated \u2014\n * this is purely additive on top of the existing prose-only wiki pages.\n */\nimport * as path from 'path';\nimport { parseYaml } from '../shared/yaml';\nimport { loadJsonSchema, validateAgainstSchema, SchemaLoadError } from '../shared/json-schema';\n\nexport interface ParsedFrontmatter {\n /** The declared `_type`, if any. */\n type?: string;\n /** All other frontmatter fields (`_type` excluded). */\n fields: Record<string, unknown>;\n /** Page content with the frontmatter block stripped. */\n body: string;\n}\n\nconst FRONTMATTER_RE = /^---\\r?\\n([\\s\\S]*?)\\r?\\n---\\r?\\n?/;\n\n/**\n * Parse a leading `---\\n...\\n---\\n` YAML frontmatter block, if present.\n * Returns `{ fields: {}, body: content }` unchanged when there's no\n * frontmatter block at the very start of the content.\n */\nexport function parseFrontmatter(content: string): ParsedFrontmatter {\n const match = FRONTMATTER_RE.exec(content);\n if (!match) return { fields: {}, body: content };\n\n const parsed = parseYaml(match[1]);\n const { _type, ...fields } = parsed as Record<string, unknown> & { _type?: unknown };\n\n return {\n type: typeof _type === 'string' ? _type : undefined,\n fields,\n body: content.slice(match[0].length),\n };\n}\n\n/**\n * Validate `fields` against `.kirograph/wiki-schemas/<type>.schema.json`.\n * Returns one message per violation. Returns [] when no schema is\n * registered for `type` \u2014 schemas are opt-in per type, not required.\n */\nexport function validatePageSchema(fields: Record<string, unknown>, type: string, wikiSchemasDir: string): string[] {\n const schemaPath = path.join(wikiSchemasDir, `${type}.schema.json`);\n\n let schema;\n try {\n schema = loadJsonSchema(schemaPath);\n } catch (err) {\n if (err instanceof SchemaLoadError) return [err.message];\n throw err;\n }\n if (!schema) return [];\n\n return validateAgainstSchema(fields, schema);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,WAAsB;AACtB,kBAA0B;AAC1B,yBAAuE;AAWvE,MAAM,iBAAiB;AAOhB,SAAS,iBAAiB,SAAoC;AACnE,QAAM,QAAQ,eAAe,KAAK,OAAO;AACzC,MAAI,CAAC,MAAO,QAAO,EAAE,QAAQ,CAAC,GAAG,MAAM,QAAQ;AAE/C,QAAM,aAAS,uBAAU,MAAM,CAAC,CAAC;AACjC,QAAM,EAAE,OAAO,GAAG,OAAO,IAAI;AAE7B,SAAO;AAAA,IACL,MAAM,OAAO,UAAU,WAAW,QAAQ;AAAA,IAC1C;AAAA,IACA,MAAM,QAAQ,MAAM,MAAM,CAAC,EAAE,MAAM;AAAA,EACrC;AACF;AAOO,SAAS,mBAAmB,QAAiC,MAAc,gBAAkC;AAClH,QAAM,aAAa,KAAK,KAAK,gBAAgB,GAAG,IAAI,cAAc;AAElE,MAAI;AACJ,MAAI;AACF,iBAAS,mCAAe,UAAU;AAAA,EACpC,SAAS,KAAK;AACZ,QAAI,eAAe,mCAAiB,QAAO,CAAC,IAAI,OAAO;AACvD,UAAM;AAAA,EACR;AACA,MAAI,CAAC,OAAQ,QAAO,CAAC;AAErB,aAAO,0CAAsB,QAAQ,MAAM;AAC7C;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/wiki/types.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/wiki/types.ts"],
|
|
4
|
-
"sourcesContent": ["// \u2500\u2500 WikiPage \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface WikiPage {\n slug: string;\n title: string;\n content: string;\n filePath: string;\n updatedAt: number;\n sourceCount: number;\n}\n\nexport interface ScoredWikiPage {\n page: WikiPage;\n score: number;\n}\n\n// \u2500\u2500 WIKI_DIFF types \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport type DiffAction = 'upsert' | 'create' | 'append';\nexport type DiffMode = 'replace' | 'append';\n\nexport interface WikiDiffEntry {\n action: DiffAction;\n page: string; // slug\n title?: string; // required for action=create\n section?: string; // target section heading (e.g. \"Decisions\")\n mode?: DiffMode; // for action=upsert: replace section or append to it\n content: string; // markdown content to write\n}\n\nexport interface WikiDiffConflict {\n page: string;\n section: string;\n existing: string;\n incoming: string;\n source: string;\n existingDate?: string; // ISO date string\n incomingDate?: string; // ISO date string\n}\n\nexport interface WikiDiff {\n entries: WikiDiffEntry[];\n conflicts: WikiDiffConflict[];\n rawDiff: string;\n}\n\n// \u2500\u2500 Lint \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport type LintIssueKind = 'contradiction' | 'orphan' | 'stale' | 'broken_link';\n\nexport interface WikiLintIssue {\n kind: LintIssueKind;\n slug: string;\n detail: string;\n relatedSlug?: string;\n}\n\n// \u2500\u2500 Stats \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface WikiStats {\n pageCount: number;\n totalSources: number;\n oldestPage: number | null;\n newestPage: number | null;\n}\n"],
|
|
4
|
+
"sourcesContent": ["// \u2500\u2500 WikiPage \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface WikiPage {\n slug: string;\n title: string;\n content: string;\n filePath: string;\n updatedAt: number;\n sourceCount: number;\n}\n\nexport interface ScoredWikiPage {\n page: WikiPage;\n score: number;\n}\n\n// \u2500\u2500 WIKI_DIFF types \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport type DiffAction = 'upsert' | 'create' | 'append';\nexport type DiffMode = 'replace' | 'append';\n\nexport interface WikiDiffEntry {\n action: DiffAction;\n page: string; // slug\n title?: string; // required for action=create\n section?: string; // target section heading (e.g. \"Decisions\")\n mode?: DiffMode; // for action=upsert: replace section or append to it\n content: string; // markdown content to write\n}\n\nexport interface WikiDiffConflict {\n page: string;\n section: string;\n existing: string;\n incoming: string;\n source: string;\n existingDate?: string; // ISO date string\n incomingDate?: string; // ISO date string\n}\n\nexport interface WikiDiff {\n entries: WikiDiffEntry[];\n conflicts: WikiDiffConflict[];\n rawDiff: string;\n}\n\n// \u2500\u2500 Lint \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport type LintIssueKind = 'contradiction' | 'orphan' | 'stale' | 'broken_link' | 'schema_error';\n\nexport interface WikiLintIssue {\n kind: LintIssueKind;\n slug: string;\n detail: string;\n relatedSlug?: string;\n}\n\n// \u2500\u2500 Stats \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface WikiStats {\n pageCount: number;\n totalSources: number;\n oldestPage: number | null;\n newestPage: number | null;\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED