@saasontools/strauss-kb 0.1.15 → 0.1.16

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/index.d.cts CHANGED
@@ -450,6 +450,11 @@ declare function resolveHeads(from: KbRecord, byId: Map<string, KbRecord>): {
450
450
  warnings: KbWarning[];
451
451
  };
452
452
 
453
+ type KbRecordStamp = {
454
+ conceptId: string;
455
+ digest: string;
456
+ };
457
+
453
458
  /**
454
459
  * Edges a trace may follow — the shared kb-edges.ts definitions, minus
455
460
  * `body-link`: body links can reach most of a bundle from anywhere, which
@@ -816,6 +821,16 @@ type KbLoadResult = {
816
821
  */
817
822
  digest: string;
818
823
  };
824
+ /** What `stamp` reports for one base. See `kb-stamp.ts`. */
825
+ type KbStampResult = {
826
+ path: string;
827
+ digest: string;
828
+ recordCount: number;
829
+ superseded: number;
830
+ /** Newest `generated.at` across the base, or null when none carries one. */
831
+ newestAt: string | null;
832
+ records: KbRecordStamp[];
833
+ };
819
834
  type KbWriteInput = {
820
835
  type: string;
821
836
  slug: string;
@@ -984,6 +999,13 @@ declare class KbStore {
984
999
  all?: boolean;
985
1000
  repoRoot?: string;
986
1001
  }): Promise<KbLoadResult>;
1002
+ /**
1003
+ * `load`'s digest without `load`'s bodies — the same records, adjudicated
1004
+ * the same way, handed back as a stamp. Skips the anchor drift pass, which
1005
+ * reads source files and only ever adds warnings: no warning reaches the
1006
+ * digest, so the value is identical to the one `load` returns.
1007
+ */
1008
+ stamp(bundlePath: string): Promise<KbStampResult>;
987
1009
  /** How a position was arrived at, as a timeline. See `trace.ts`. */
988
1010
  trace(bundlePath: string, seedId: string, options?: KbTraceOptions): Promise<KbTraceStep[]>;
989
1011
  /** Every record named in one line each. See `catalog.ts`. */
@@ -1120,6 +1142,8 @@ declare enum ErrorTypes {
1120
1142
  KbPackBudgetExceeded = "KbPackBudgetExceeded",
1121
1143
  KbRecordNotFound = "KbRecordNotFound",
1122
1144
  KbSelfVerification = "KbSelfVerification",
1145
+ KbStampBaselineUnreadable = "KbStampBaselineUnreadable",
1146
+ KbStampDigestBaselineAmbiguous = "KbStampDigestBaselineAmbiguous",
1123
1147
  KbUnknownLinkRel = "KbUnknownLinkRel",
1124
1148
  KbWriteConflict = "KbWriteConflict"
1125
1149
  }
@@ -1981,8 +2005,12 @@ type KbCommand<Shape extends z.ZodRawShape = z.ZodRawShape> = {
1981
2005
  /** Shown to an agent choosing a tool, so it carries the judgment too. */
1982
2006
  description: string;
1983
2007
  input: z.ZodObject<Shape>;
1984
- /** Positional argv → the same object MCP receives. */
1985
- fromArgv(argv: string[], bundlePath: string, stdin: () => Promise<string>): Promise<unknown> | unknown;
2008
+ /**
2009
+ * Positional argv the same object MCP receives. `bundleExplicit` says
2010
+ * whether `--bundle` was actually passed, for the one command whose meaning
2011
+ * turns on it: `stamp` with no bundle stamps every pinned base.
2012
+ */
2013
+ fromArgv(argv: string[], bundlePath: string, stdin: () => Promise<string>, bundleExplicit?: boolean): Promise<unknown> | unknown;
1986
2014
  run(ctx: KbCommandContext, input: z.infer<z.ZodObject<Shape>>): Promise<unknown>;
1987
2015
  /**
1988
2016
  * A human-readable form of the result, for the CLI. Where it exists the CLI
package/dist/index.d.ts CHANGED
@@ -450,6 +450,11 @@ declare function resolveHeads(from: KbRecord, byId: Map<string, KbRecord>): {
450
450
  warnings: KbWarning[];
451
451
  };
452
452
 
453
+ type KbRecordStamp = {
454
+ conceptId: string;
455
+ digest: string;
456
+ };
457
+
453
458
  /**
454
459
  * Edges a trace may follow — the shared kb-edges.ts definitions, minus
455
460
  * `body-link`: body links can reach most of a bundle from anywhere, which
@@ -816,6 +821,16 @@ type KbLoadResult = {
816
821
  */
817
822
  digest: string;
818
823
  };
824
+ /** What `stamp` reports for one base. See `kb-stamp.ts`. */
825
+ type KbStampResult = {
826
+ path: string;
827
+ digest: string;
828
+ recordCount: number;
829
+ superseded: number;
830
+ /** Newest `generated.at` across the base, or null when none carries one. */
831
+ newestAt: string | null;
832
+ records: KbRecordStamp[];
833
+ };
819
834
  type KbWriteInput = {
820
835
  type: string;
821
836
  slug: string;
@@ -984,6 +999,13 @@ declare class KbStore {
984
999
  all?: boolean;
985
1000
  repoRoot?: string;
986
1001
  }): Promise<KbLoadResult>;
1002
+ /**
1003
+ * `load`'s digest without `load`'s bodies — the same records, adjudicated
1004
+ * the same way, handed back as a stamp. Skips the anchor drift pass, which
1005
+ * reads source files and only ever adds warnings: no warning reaches the
1006
+ * digest, so the value is identical to the one `load` returns.
1007
+ */
1008
+ stamp(bundlePath: string): Promise<KbStampResult>;
987
1009
  /** How a position was arrived at, as a timeline. See `trace.ts`. */
988
1010
  trace(bundlePath: string, seedId: string, options?: KbTraceOptions): Promise<KbTraceStep[]>;
989
1011
  /** Every record named in one line each. See `catalog.ts`. */
@@ -1120,6 +1142,8 @@ declare enum ErrorTypes {
1120
1142
  KbPackBudgetExceeded = "KbPackBudgetExceeded",
1121
1143
  KbRecordNotFound = "KbRecordNotFound",
1122
1144
  KbSelfVerification = "KbSelfVerification",
1145
+ KbStampBaselineUnreadable = "KbStampBaselineUnreadable",
1146
+ KbStampDigestBaselineAmbiguous = "KbStampDigestBaselineAmbiguous",
1123
1147
  KbUnknownLinkRel = "KbUnknownLinkRel",
1124
1148
  KbWriteConflict = "KbWriteConflict"
1125
1149
  }
@@ -1981,8 +2005,12 @@ type KbCommand<Shape extends z.ZodRawShape = z.ZodRawShape> = {
1981
2005
  /** Shown to an agent choosing a tool, so it carries the judgment too. */
1982
2006
  description: string;
1983
2007
  input: z.ZodObject<Shape>;
1984
- /** Positional argv → the same object MCP receives. */
1985
- fromArgv(argv: string[], bundlePath: string, stdin: () => Promise<string>): Promise<unknown> | unknown;
2008
+ /**
2009
+ * Positional argv the same object MCP receives. `bundleExplicit` says
2010
+ * whether `--bundle` was actually passed, for the one command whose meaning
2011
+ * turns on it: `stamp` with no bundle stamps every pinned base.
2012
+ */
2013
+ fromArgv(argv: string[], bundlePath: string, stdin: () => Promise<string>, bundleExplicit?: boolean): Promise<unknown> | unknown;
1986
2014
  run(ctx: KbCommandContext, input: z.infer<z.ZodObject<Shape>>): Promise<unknown>;
1987
2015
  /**
1988
2016
  * A human-readable form of the result, for the CLI. Where it exists the CLI
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  runKbCli
3
- } from "./chunk-MK7GU4DX.js";
3
+ } from "./chunk-RINBOAQZ.js";
4
4
  import {
5
5
  createKbMcpServer,
6
6
  runKbMcpServer
7
- } from "./chunk-LACCRB2Y.js";
7
+ } from "./chunk-MEZCF646.js";
8
8
  import {
9
9
  BaseError,
10
10
  CONTEXT_BEGIN,
@@ -117,7 +117,7 @@ import {
117
117
  trace,
118
118
  unpinBase,
119
119
  validateBundle
120
- } from "./chunk-KNIUBCZY.js";
120
+ } from "./chunk-H5W53NVU.js";
121
121
 
122
122
  // src/match-diff.ts
123
123
  function matchToDiff(files, records, options = {}) {