@monotykamary/dsh-acp-snapshot 0.1.0 → 0.1.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 (2) hide show
  1. package/lib/index.js +0 -10
  2. package/package.json +6 -6
package/lib/index.js CHANGED
@@ -93,7 +93,6 @@ function launchAcpTestAgent(options) {
93
93
  updates.push(params.update);
94
94
  for (let index = updateWaiters.length - 1; index >= 0; index--) {
95
95
  const waiter = updateWaiters[index];
96
- /* v8 ignore next 1 -- index is bounded by the array length */
97
96
  if (waiter === void 0) continue;
98
97
  let matches;
99
98
  try {
@@ -319,7 +318,6 @@ async function runScenario(input, opts) {
319
318
  const cleanup = async (action) => {
320
319
  cleanupResults.push(...await Promise.allSettled([action()]));
321
320
  };
322
- /* v8 ignore next 1 -- launch itself can only throw on a defensive synchronous spawn API failure */
323
321
  await cleanup(() => launched?.close("SIGKILL") ?? Promise.resolve());
324
322
  await cleanup(() => rm(cwd, {
325
323
  recursive: true,
@@ -717,7 +715,6 @@ function extractSnapshotSpillPaths(content) {
717
715
  const result = /* @__PURE__ */ new Map();
718
716
  for (const match of content.matchAll(SNAPSHOT_SPILL_PATH_RE)) {
719
717
  const name = match[1];
720
- /* v8 ignore next -- the filename capture is required and non-empty whenever the spill regex matches */
721
718
  if (name === void 0) continue;
722
719
  result.set(name, match[0]);
723
720
  }
@@ -1329,7 +1326,6 @@ function surfaceEventMessage(record) {
1329
1326
  case "tool/result":
1330
1327
  message = data.message;
1331
1328
  break;
1332
- /* v8 ignore next -- the authoritative predicate must fail loud when a new surface shape lands. */
1333
1329
  default: throw new Error(`acp-snapshot: unsupported surface event type "${type}"`);
1334
1330
  }
1335
1331
  return completeMessage(message);
@@ -1625,7 +1621,6 @@ function stabilizeRefreshLog(fresh, existing, replacements, freshContext) {
1625
1621
  const existingRecord = existingRecords[existingIndex];
1626
1622
  const memberCount = packedTimes(record)?.length ?? 1;
1627
1623
  if (record.type === "session/title" && existingRecord?.type !== "session/title") {
1628
- /* v8 ignore next -- a title is turn-enclosed, so a preceding event time exists in every valid fixture. */
1629
1624
  if (typeof previousEventTime !== "number") throw new Error("acp-snapshot: inserted title has no preceding event time");
1630
1625
  record.time = previousEventTime;
1631
1626
  } else {
@@ -1788,11 +1783,8 @@ function defineAcpSnapshotSuite(options) {
1788
1783
  expect(normalizeSessionLog(harvested, ctx), `${fixtureFiles[i]} mismatch`).toEqual(normalizeSessionLog(fixture, fixtureContext(fixture)));
1789
1784
  }
1790
1785
  }
1791
- /* v8 ignore next -- construction guarantees the pin exists; a miss would fail the one-header assertion loudly. */
1792
1786
  const pinningScenario = pinningByClass.get(classOf(scenario)) ?? scenario;
1793
- /* v8 ignore next -- registration guarantees every scenario class has resolved sources. */
1794
1787
  const promptSource = promptSourceByClass.get(classOf(scenario)) ?? pinningScenario;
1795
- /* v8 ignore next -- registration guarantees every scenario class has resolved sources. */
1796
1788
  const schemaSource = schemaSourceByClass.get(classOf(scenario)) ?? pinningScenario;
1797
1789
  const pinnedFixture = await readFile(join(join(snapshotsDir, pinningScenario.name), "session.jsonl"), "utf8");
1798
1790
  const pinned = normalizedHeaders(pinnedFixture, fixtureContext(pinnedFixture));
@@ -1875,9 +1867,7 @@ function defineAcpSnapshotSuite(options) {
1875
1867
  });
1876
1868
  it("every pinning fixture composes one tokenized header sequence with its referenced sidecars", async () => {
1877
1869
  for (const scenario of pinningByClass.values()) {
1878
- /* v8 ignore next -- registration guarantees every pin has resolved sources. */
1879
1870
  const promptSource = promptSourceByClass.get(classOf(scenario)) ?? scenario;
1880
- /* v8 ignore next -- registration guarantees every pin has resolved sources. */
1881
1871
  const schemaSource = schemaSourceByClass.get(classOf(scenario)) ?? scenario;
1882
1872
  const fixture = await readFile(join(snapshotsDir, scenario.name, "session.jsonl"), "utf8");
1883
1873
  const headers = normalizedHeaders(fixture, fixtureContext(fixture));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@monotykamary/dsh-acp-snapshot",
3
3
  "description": "ACP test kit: shared subprocess launcher, snapshot scenario harness, expected-output normalizers, and suite factory",
4
- "version": "0.1.0",
4
+ "version": "0.1.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -34,16 +34,16 @@
34
34
  "dependencies": {
35
35
  "@agentclientprotocol/sdk": "0.25.1",
36
36
  "vitest": "^4.1.8",
37
- "@monotykamary/dsh-loader-smoke": "0.1.0"
37
+ "@monotykamary/dsh-loader-smoke": "0.1.2"
38
38
  },
39
39
  "peerDependencies": {
40
- "@monotykamary/dsh-invariants": "^0.1.0",
41
- "@monotykamary/dsh-session": "^0.1.0",
40
+ "@monotykamary/dsh-invariants": "^0.1.2",
41
+ "@monotykamary/dsh-session": "^0.1.2",
42
42
  "@monotykamary/cordis": "^4.0.1"
43
43
  },
44
44
  "devDependencies": {
45
- "@monotykamary/dsh-invariants": "^0.1.0",
46
- "@monotykamary/dsh-session": "^0.1.0",
45
+ "@monotykamary/dsh-invariants": "^0.1.2",
46
+ "@monotykamary/dsh-session": "^0.1.2",
47
47
  "@monotykamary/cordis": "^4.0.1"
48
48
  }
49
49
  }