agent-issues 0.0.127 → 0.0.128

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.
@@ -1,3 +1,3 @@
1
1
  {
2
- "buildHash": "536b001c2ad510d2ee33217a2ae31c732d9b9ca92468f51e65a97b402ea71b44"
2
+ "buildHash": "4c59c0840c318adff9f2cd2ea80f1f9a324cb7b80b5ee72cca577e918c248f9e"
3
3
  }
package/dist/cli.js CHANGED
@@ -47817,7 +47817,7 @@ function String2(descriptor, ...args) {
47817
47817
  // package.json
47818
47818
  var package_default = {
47819
47819
  name: "agent-issues",
47820
- version: "0.0.127",
47820
+ version: "0.0.128",
47821
47821
  description: "CLI for managing initiatives, PRDs, user stories, ADRs, and issues.",
47822
47822
  type: "module",
47823
47823
  bin: {
@@ -71184,7 +71184,7 @@ ${renderListSkills(capabilities.skills)}`
71184
71184
  import { spawn as spawn2 } from "node:child_process";
71185
71185
 
71186
71186
  // src/site/server.ts
71187
- import { readFileSync as readFileSync9 } from "node:fs";
71187
+ import { existsSync as existsSync14, readFileSync as readFileSync9, statSync as statSync5 } from "node:fs";
71188
71188
  import { createServer as createServer3, request as sendRequest2 } from "node:http";
71189
71189
 
71190
71190
  // src/site/assets.ts
@@ -71328,6 +71328,15 @@ var PROJECT_MUTATION_METHODS = /* @__PURE__ */ new Set([
71328
71328
  "updatePlanEntry",
71329
71329
  "upsertContext"
71330
71330
  ]);
71331
+ function computeFileStatSignature2(dbPath) {
71332
+ return [dbPath, `${dbPath}-wal`, `${dbPath}-shm`].map((candidate) => {
71333
+ if (!existsSync14(candidate)) {
71334
+ return `${candidate}:missing`;
71335
+ }
71336
+ const stats = statSync5(candidate);
71337
+ return `${candidate}:${stats.size}:${stats.mtimeMs}`;
71338
+ }).join("|");
71339
+ }
71331
71340
  function isInitiativeTab(value) {
71332
71341
  return typeof value === "string" && INITIATIVE_TABS.includes(value);
71333
71342
  }
@@ -71339,6 +71348,7 @@ async function startLiveSite(input) {
71339
71348
  const host = input.host ?? "127.0.0.1";
71340
71349
  const port = input.port ?? 4173;
71341
71350
  const pollIntervalMs = input.pollIntervalMs ?? 1e3;
71351
+ const readLocalSignature = input.readLocalSignature ?? computeFileStatSignature2;
71342
71352
  const info = {
71343
71353
  dbPath,
71344
71354
  defaultTenant,
@@ -71354,7 +71364,7 @@ async function startLiveSite(input) {
71354
71364
  localDaemon: { buildHash: readBuildContentHash() }
71355
71365
  });
71356
71366
  await opened.store.close();
71357
- let databaseSignature = opened.backend === "local" ? await readSnapshotSignature(dbPath, defaultTenant, currentWorkingDirectory, credentialStoreOptions) : void 0;
71367
+ let databaseSignature = opened.backend === "local" ? readLocalSignature(dbPath) : void 0;
71358
71368
  let pollTimer;
71359
71369
  let pollingStopped = false;
71360
71370
  let stopCloudEventsRelay;
@@ -71410,7 +71420,7 @@ async function startLiveSite(input) {
71410
71420
  return;
71411
71421
  }
71412
71422
  pollTimer = setTimeout(() => {
71413
- void readSnapshotSignature(dbPath, defaultTenant, currentWorkingDirectory, credentialStoreOptions).then((nextSignature) => {
71423
+ void Promise.resolve().then(() => readLocalSignature(dbPath)).then((nextSignature) => {
71414
71424
  if (nextSignature !== databaseSignature) {
71415
71425
  databaseSignature = nextSignature;
71416
71426
  broadcast(clients, JSON.stringify({ type: "snapshot-changed", at: (/* @__PURE__ */ new Date()).toISOString(), category: "unknown" }));
@@ -72005,9 +72015,6 @@ function parseSearchLimit(value) {
72005
72015
  const limit = Number(value);
72006
72016
  return limit > 0 && limit <= 100 ? limit : null;
72007
72017
  }
72008
- async function readSnapshotSignature(dbPath, tenant, currentWorkingDirectory, credentialStoreOptions) {
72009
- return withStore(dbPath, { credentialStoreOptions, currentWorkingDirectory, tenant }, (store) => store.getSnapshotSignature());
72010
- }
72011
72018
  async function readProjectMutationRequest(request) {
72012
72019
  const chunks = [];
72013
72020
  for await (const chunk of request) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-issues",
3
- "version": "0.0.127",
3
+ "version": "0.0.128",
4
4
  "description": "CLI for managing initiatives, PRDs, user stories, ADRs, and issues.",
5
5
  "type": "module",
6
6
  "bin": {