@saasontools/strauss-kb 0.1.13 → 0.1.14
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/ARCHITECTURE.md +39 -50
- package/README.md +139 -424
- package/dist/{chunk-XALWG3EZ.js → chunk-43KALLFU.js} +21 -36
- package/dist/chunk-43KALLFU.js.map +1 -0
- package/dist/{chunk-ZICKDZGY.js → chunk-MBXNCZ4V.js} +2 -2
- package/dist/{chunk-WZODZNR6.js → chunk-PYA5E7FL.js} +2 -2
- package/dist/cli-main.cjs +20 -35
- package/dist/cli-main.cjs.map +1 -1
- package/dist/cli-main.js +2 -2
- package/dist/index.cjs +20 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/mcp-main.cjs +20 -35
- package/dist/mcp-main.cjs.map +1 -1
- package/dist/mcp-main.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-XALWG3EZ.js.map +0 -1
- /package/dist/{chunk-ZICKDZGY.js.map → chunk-MBXNCZ4V.js.map} +0 -0
- /package/dist/{chunk-WZODZNR6.js.map → chunk-PYA5E7FL.js.map} +0 -0
|
@@ -2479,7 +2479,7 @@ var answerCommand = define({
|
|
|
2479
2479
|
name: "answer",
|
|
2480
2480
|
tool: "kb_answer",
|
|
2481
2481
|
usage: "answer <concept-id> <answer...>",
|
|
2482
|
-
description: "Resolve an open question:
|
|
2482
|
+
description: "Resolve an open question: set status, stamp who and when, append an Answer section. If the answer overturns a decision or assumption, supersede that record explicitly.",
|
|
2483
2483
|
input: z9.object({ bundlePath, conceptId, answer: z9.string().min(1) }),
|
|
2484
2484
|
fromArgv: (argv, path) => ({
|
|
2485
2485
|
bundlePath: path,
|
|
@@ -2574,7 +2574,7 @@ var contextCommand = define({
|
|
|
2574
2574
|
name: "context",
|
|
2575
2575
|
tool: "kb_context",
|
|
2576
2576
|
usage: "context [--profile NAME] [--budget N] [--full-under N] [--format json] [--event NAME]",
|
|
2577
|
-
description: "
|
|
2577
|
+
description: "Index block of pinned bases (ids, titles, standing) for injection at context birth. Takes no bundlePath \u2014 reads the workspace pin manifests. Empty when nothing is pinned; refuses over budget rather than truncating. Budget precedence: flags, then the manifest `context[profile]` over `context.default`, then the built-in profile, then package defaults.",
|
|
2578
2578
|
input: z12.object({
|
|
2579
2579
|
budgetTokens: z12.number().int().positive().optional().describe(
|
|
2580
2580
|
"Ceiling on the whole emitted block; past it the command refuses with a list of bases rather than truncating. Defaults to 4000."
|
|
@@ -2760,7 +2760,7 @@ var listCommand = define({
|
|
|
2760
2760
|
name: "list",
|
|
2761
2761
|
tool: "kb_list",
|
|
2762
2762
|
usage: "list [type]",
|
|
2763
|
-
description: "Every record, optionally
|
|
2763
|
+
description: "Every record, optionally one type. For enumerating; use kb_query for a question.",
|
|
2764
2764
|
input: z15.object({ bundlePath, type: z15.enum(KB_RECORD_TYPES).optional() }),
|
|
2765
2765
|
fromArgv: (argv, path) => ({ bundlePath: path, type: argv[1] }),
|
|
2766
2766
|
run: async ({ store }, { bundlePath: path, type }) => (await store.list(path, type)).map((record) => ({
|
|
@@ -2778,7 +2778,7 @@ var loadCommand = define({
|
|
|
2778
2778
|
name: "load",
|
|
2779
2779
|
tool: "kb_load",
|
|
2780
2780
|
usage: "load [type] [--budget N | --all] [--repo-root PATH]",
|
|
2781
|
-
description: "
|
|
2781
|
+
description: "Load the whole base, each record with its standing \u2014 call it first, at the point of use, since compaction drops it. Superseded records arrive as stubs; kb_trace has the history. Over budget it refuses: kb_catalog, then kb_pack, or narrow with `type`; `all` bypasses. Never read record files directly \u2014 only kb_* tools resolve supersession. `digest` stamps the base's content, so hooks know when to reload.",
|
|
2782
2782
|
input: z16.object({
|
|
2783
2783
|
bundlePath,
|
|
2784
2784
|
type: z16.enum(KB_RECORD_TYPES).optional(),
|
|
@@ -2830,7 +2830,7 @@ var logCommand = define({
|
|
|
2830
2830
|
name: "log",
|
|
2831
2831
|
tool: "kb_log",
|
|
2832
2832
|
usage: "log",
|
|
2833
|
-
description: "
|
|
2833
|
+
description: "Who touched what, and when. Append-only; malformed lines are reported, never repaired.",
|
|
2834
2834
|
input: z17.object({ bundlePath }),
|
|
2835
2835
|
fromArgv: (_argv, path) => ({ bundlePath: path }),
|
|
2836
2836
|
run: ({ store }, { bundlePath: path }) => store.readLog(path)
|
|
@@ -2842,7 +2842,7 @@ var noDecisionCommand = define({
|
|
|
2842
2842
|
name: "no-decision",
|
|
2843
2843
|
tool: "kb_no_decision",
|
|
2844
2844
|
usage: "no-decision <reason...>",
|
|
2845
|
-
description:
|
|
2845
|
+
description: "Record in one sentence that a piece of work had nothing to decide. Idempotent.",
|
|
2846
2846
|
input: z18.object({ bundlePath, reason: z18.string().min(1) }),
|
|
2847
2847
|
fromArgv: (argv, path) => ({
|
|
2848
2848
|
bundlePath: path,
|
|
@@ -2865,7 +2865,7 @@ var packCommand = define({
|
|
|
2865
2865
|
name: "pack",
|
|
2866
2866
|
tool: "kb_pack",
|
|
2867
2867
|
usage: "pack <conceptId> [--hops N] [--max-nodes N] [--budget N]",
|
|
2868
|
-
description: "
|
|
2868
|
+
description: "Bounded neighbourhood around one record: within `hops`, ranked, cut to `maxNodes`, with every cut record named under Excluded. Use when the base is over kb_load's budget and the work centres on a record you can name. Refuses over budget rather than truncating. Everything below the header is byte-stable across runs. Resolves supersession like kb_load.",
|
|
2869
2869
|
input: z19.object({
|
|
2870
2870
|
bundlePath,
|
|
2871
2871
|
conceptId,
|
|
@@ -2965,7 +2965,7 @@ var pinCommand = define({
|
|
|
2965
2965
|
name: "pin",
|
|
2966
2966
|
tool: "kb_pin",
|
|
2967
2967
|
usage: "pin [bundle-path] [--mode full|index] [--profiles a,b] [--local|--user] [--frozen|--unfreeze]",
|
|
2968
|
-
description: "Pin a base into a workspace
|
|
2968
|
+
description: "Pin a base into a workspace manifest so kb_context surfaces it. Layers, nearest wins: project `.strauss/kb-pins.json` (default), `--local` (personal, gitignored), `--user` (`~/.strauss`). Idempotent; `--mode full|index`, `--profiles`, `--frozen`/`--unfreeze` update only those fields. A path with no records pins with a warning. Never touches the base itself.",
|
|
2969
2969
|
input: z20.object({
|
|
2970
2970
|
bundlePath,
|
|
2971
2971
|
mode: z20.enum(["full", "index"]).optional().describe(
|
|
@@ -3009,7 +3009,7 @@ var pinsCommand = define({
|
|
|
3009
3009
|
name: "pins",
|
|
3010
3010
|
tool: "kb_pins",
|
|
3011
3011
|
usage: "pins",
|
|
3012
|
-
description: "Every pinned base across the manifest layers,
|
|
3012
|
+
description: "Every pinned base across the manifest layers, with its layer and whether it resolves to records. Takes no bundlePath.",
|
|
3013
3013
|
input: z21.object({}),
|
|
3014
3014
|
fromArgv: () => ({}),
|
|
3015
3015
|
run: ({ store }) => listPins(store, process.cwd())
|
|
@@ -3063,7 +3063,7 @@ var readIndexCommand = define({
|
|
|
3063
3063
|
name: "index",
|
|
3064
3064
|
tool: "kb_index",
|
|
3065
3065
|
usage: "index",
|
|
3066
|
-
description: "The index
|
|
3066
|
+
description: "The index \u2014 title, type, status, description per record \u2014 rebuilt if stale. Cheapest re-orientation after compaction: call it (or kb_context) first, then kb_load or fetch by id.",
|
|
3067
3067
|
input: z23.object({ bundlePath }),
|
|
3068
3068
|
fromArgv: (_argv, path) => ({ bundlePath: path }),
|
|
3069
3069
|
run: ({ store }, { bundlePath: path }) => store.readIndex(path)
|
|
@@ -3075,7 +3075,7 @@ var schemaCommand = define({
|
|
|
3075
3075
|
name: "schema",
|
|
3076
3076
|
tool: "kb_schema",
|
|
3077
3077
|
usage: "schema",
|
|
3078
|
-
description: "JSON Schema for
|
|
3078
|
+
description: "JSON Schema for frontmatter, write input, and log entries, generated from the enforcing code.",
|
|
3079
3079
|
input: z24.object({}),
|
|
3080
3080
|
fromArgv: () => ({}),
|
|
3081
3081
|
run: () => Promise.resolve(kbJsonSchemas())
|
|
@@ -3087,7 +3087,7 @@ var statusCommand = define({
|
|
|
3087
3087
|
name: "status",
|
|
3088
3088
|
tool: "kb_status",
|
|
3089
3089
|
usage: "status <concept-id> <status>",
|
|
3090
|
-
description: "Move a record's status
|
|
3090
|
+
description: "Move a record's status. Compare-and-swap: a concurrent change fails instead of being overwritten.",
|
|
3091
3091
|
input: z25.object({
|
|
3092
3092
|
bundlePath,
|
|
3093
3093
|
conceptId,
|
|
@@ -3111,7 +3111,7 @@ var supersedeCommand = define({
|
|
|
3111
3111
|
name: "supersede",
|
|
3112
3112
|
tool: "kb_supersede",
|
|
3113
3113
|
usage: "supersede <concept-id> <replacement-id>",
|
|
3114
|
-
description: "Mark a record superseded by another,
|
|
3114
|
+
description: "Mark a record superseded by another, linked in both directions. Use instead of editing a record whose meaning changed.",
|
|
3115
3115
|
input: z26.object({ bundlePath, conceptId, replacementId: conceptId }),
|
|
3116
3116
|
fromArgv: (argv, path) => ({
|
|
3117
3117
|
bundlePath: path,
|
|
@@ -3130,7 +3130,7 @@ import { z as z27 } from "zod";
|
|
|
3130
3130
|
var syncInstructionsCommand = define({
|
|
3131
3131
|
name: "sync-instructions",
|
|
3132
3132
|
usage: "sync-instructions <file> [--profile NAME] [--budget N] [--full-under N]",
|
|
3133
|
-
description: "
|
|
3133
|
+
description: "CLI-only: plant the kb_context block between sentinel comments in AGENTS.md or CLAUDE.md, idempotently.",
|
|
3134
3134
|
input: z27.object({
|
|
3135
3135
|
file: z27.string().min(1).describe("The instruction file to edit in place."),
|
|
3136
3136
|
budgetTokens: z27.number().int().positive().optional(),
|
|
@@ -3166,7 +3166,7 @@ var traceCommand = define({
|
|
|
3166
3166
|
name: "trace",
|
|
3167
3167
|
tool: "kb_trace",
|
|
3168
3168
|
usage: "trace <concept-id> [edges...]",
|
|
3169
|
-
description: '
|
|
3169
|
+
description: 'Timeline of how a position was reached, ordered by write time, following supersession, shared anchors and shared sources. Includes rejected, draft and superseded records \u2014 in a history they are the content. For "why is it like this"; kb_load answers "what holds now".',
|
|
3170
3170
|
input: z28.object({
|
|
3171
3171
|
bundlePath,
|
|
3172
3172
|
conceptId,
|
|
@@ -3210,7 +3210,7 @@ var unpinCommand = define({
|
|
|
3210
3210
|
name: "unpin",
|
|
3211
3211
|
tool: "kb_unpin",
|
|
3212
3212
|
usage: "unpin [bundle-path]",
|
|
3213
|
-
description: "Remove a base from every
|
|
3213
|
+
description: "Remove a base from every manifest layer that holds it. Reports the layers touched.",
|
|
3214
3214
|
input: z30.object({ bundlePath }),
|
|
3215
3215
|
fromArgv: (argv, path) => ({ bundlePath: argv[1] ?? path }),
|
|
3216
3216
|
run: (_ctx, { bundlePath: path }) => unpinBase(process.cwd(), path)
|
|
@@ -3238,7 +3238,7 @@ var verifyCommand = define({
|
|
|
3238
3238
|
name: "verify",
|
|
3239
3239
|
tool: "kb_verify",
|
|
3240
3240
|
usage: "verify <concept-id> --note <text>",
|
|
3241
|
-
description: "Append
|
|
3241
|
+
description: "Append a verified[] event: who checked, when, and what was found. Append-only. A record's own generator is refused unless the actor is `human:`-prefixed.",
|
|
3242
3242
|
input: z32.object({
|
|
3243
3243
|
bundlePath,
|
|
3244
3244
|
conceptId,
|
|
@@ -3267,15 +3267,7 @@ var writeCommand = define({
|
|
|
3267
3267
|
name: "write",
|
|
3268
3268
|
tool: "kb_write",
|
|
3269
3269
|
usage: "write <type> < record.json",
|
|
3270
|
-
description:
|
|
3271
|
-
"Write one record. Search first \u2014 the same knowledge filed twice under different slugs is how a base rots, and a duplicate concept id is rejected rather than overwritten. Call kb_types for the sections each type accepts.",
|
|
3272
|
-
"",
|
|
3273
|
-
"Judgment the tool cannot enforce for you:",
|
|
3274
|
-
"- An unsourced claim is an `assumption` record with assumption: true, never a `fact` with a vague source. The distinction is what lets a later reader separate what was established from what was guessed.",
|
|
3275
|
-
"- When two records conflict, say so in a `risk`, an `open-question`, or a superseding `decision`. Quietly picking a winner destroys the disagreement, which is usually the useful part.",
|
|
3276
|
-
"- Prefer a new record over overloading an existing one, and keep each short. A record nobody finishes reading is not durable memory.",
|
|
3277
|
-
"- Records are never deleted; supersede instead, so the earlier reasoning stays inspectable."
|
|
3278
|
-
].join("\n"),
|
|
3270
|
+
description: "Write one record. Search first \u2014 a duplicate concept id is rejected, not overwritten; kb_types lists each type's sections. An unsourced claim is an `assumption` with assumption: true, never a vague `fact`. Conflicting records get a `risk`, `open-question`, or superseding `decision`. Prefer a new short record over overloading one. Never delete; supersede.",
|
|
3279
3271
|
input: z33.object({
|
|
3280
3272
|
bundlePath,
|
|
3281
3273
|
type: z33.enum(KB_RECORD_TYPES),
|
|
@@ -3307,14 +3299,7 @@ var writeDecisionCommand = define({
|
|
|
3307
3299
|
name: "write-decision",
|
|
3308
3300
|
tool: "kb_write_decision",
|
|
3309
3301
|
usage: "write-decision < decision.json",
|
|
3310
|
-
description:
|
|
3311
|
-
"Write a decision. Takes `alternative` and `impact` as fields rather than free sections, because what was rejected is the part a later reader cannot reconstruct from the code \u2014 a heading is too easy to leave empty.",
|
|
3312
|
-
"",
|
|
3313
|
-
"What belongs in one:",
|
|
3314
|
-
'- Record a decision when a later reader would otherwise "simplify" the constraint away. If the diff already answers the question, there is nothing here to write.',
|
|
3315
|
-
"- `alternative` is what you turned down and why, not a list of everything considered.",
|
|
3316
|
-
"- A reference to material you read goes in `sources`; a reference to code goes in `anchors`; a reference to another record goes in `relatedConceptIds`."
|
|
3317
|
-
].join("\n"),
|
|
3302
|
+
description: "Write a decision, with `alternative` (what was rejected and why) and `impact` as fields. Record one when a later reader would otherwise simplify the constraint away; skip when the diff already answers it. `sources` for material read, `anchors` for code, `relatedConceptIds` for records.",
|
|
3318
3303
|
input: z34.object({ bundlePath, input: decisionInputSchema }),
|
|
3319
3304
|
fromArgv: async (_argv, path, stdin) => ({
|
|
3320
3305
|
bundlePath: path,
|
|
@@ -4447,7 +4432,7 @@ function typeRank(record) {
|
|
|
4447
4432
|
}
|
|
4448
4433
|
|
|
4449
4434
|
// src/version.ts
|
|
4450
|
-
var VERSION = true ? "0.1.
|
|
4435
|
+
var VERSION = true ? "0.1.14" : "0.0.0-dev";
|
|
4451
4436
|
|
|
4452
4437
|
export {
|
|
4453
4438
|
kbSourceSchema,
|
|
@@ -4560,4 +4545,4 @@ export {
|
|
|
4560
4545
|
KbStore,
|
|
4561
4546
|
VERSION
|
|
4562
4547
|
};
|
|
4563
|
-
//# sourceMappingURL=chunk-
|
|
4548
|
+
//# sourceMappingURL=chunk-43KALLFU.js.map
|