@hexclave/shared 1.0.49 → 1.0.52

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 (60) hide show
  1. package/dist/{admin-interface-BPBTfhZC.d.ts → admin-interface-D9wMduWc.d.ts} +3 -3
  2. package/dist/{admin-interface-BPBTfhZC.d.ts.map → admin-interface-D9wMduWc.d.ts.map} +1 -1
  3. package/dist/ai/unified-prompts/reminders.js +2 -0
  4. package/dist/ai/unified-prompts/reminders.js.map +1 -1
  5. package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts.map +1 -1
  6. package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js +14 -29
  7. package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js.map +1 -1
  8. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.d.ts +5 -4
  9. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js +5 -2
  10. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js.map +1 -1
  11. package/dist/apps/apps-config.d.ts +6 -0
  12. package/dist/apps/apps-config.d.ts.map +1 -1
  13. package/dist/apps/apps-config.js +6 -0
  14. package/dist/apps/apps-config.js.map +1 -1
  15. package/dist/config/schema.d.ts +1 -1
  16. package/dist/config-authoring.d.ts +1 -1
  17. package/dist/esm/ai/unified-prompts/reminders.js +2 -0
  18. package/dist/esm/ai/unified-prompts/reminders.js.map +1 -1
  19. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts.map +1 -1
  20. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js +14 -29
  21. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js.map +1 -1
  22. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.d.ts +5 -4
  23. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js +5 -2
  24. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js.map +1 -1
  25. package/dist/esm/apps/apps-config.d.ts +6 -0
  26. package/dist/esm/apps/apps-config.d.ts.map +1 -1
  27. package/dist/esm/apps/apps-config.js +6 -0
  28. package/dist/esm/apps/apps-config.js.map +1 -1
  29. package/dist/esm/config/schema.d.ts +3 -3
  30. package/dist/esm/interface/conversations.d.ts +29 -29
  31. package/dist/esm/interface/plan-usage.d.ts +1 -1
  32. package/dist/esm/utils/esbuild.d.ts.map +1 -1
  33. package/dist/esm/utils/esbuild.js +8 -3
  34. package/dist/esm/utils/esbuild.js.map +1 -1
  35. package/dist/esm/utils/promises.d.ts +3 -1
  36. package/dist/esm/utils/promises.d.ts.map +1 -1
  37. package/dist/esm/utils/promises.js +5 -2
  38. package/dist/esm/utils/promises.js.map +1 -1
  39. package/dist/index.d.ts +1 -1
  40. package/dist/interface/admin-interface.d.ts +2 -2
  41. package/dist/interface/conversations.d.ts +29 -29
  42. package/dist/interface/plan-usage.d.ts +1 -1
  43. package/dist/{plan-usage-BO2GsKlN.d.ts → plan-usage-BaDxcLZ1.d.ts} +2 -2
  44. package/dist/{plan-usage-BO2GsKlN.d.ts.map → plan-usage-BaDxcLZ1.d.ts.map} +1 -1
  45. package/dist/{schema-Daq0b_sf.d.ts → schema-DV0SQUbY.d.ts} +4 -4
  46. package/dist/{schema-Daq0b_sf.d.ts.map → schema-DV0SQUbY.d.ts.map} +1 -1
  47. package/dist/utils/esbuild.d.ts.map +1 -1
  48. package/dist/utils/esbuild.js +8 -3
  49. package/dist/utils/esbuild.js.map +1 -1
  50. package/dist/utils/promises.d.ts +3 -1
  51. package/dist/utils/promises.d.ts.map +1 -1
  52. package/dist/utils/promises.js +5 -2
  53. package/dist/utils/promises.js.map +1 -1
  54. package/package.json +1 -1
  55. package/src/ai/unified-prompts/reminders.ts +2 -0
  56. package/src/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.ts +44 -29
  57. package/src/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.ts +7 -4
  58. package/src/apps/apps-config.ts +6 -0
  59. package/src/utils/esbuild.tsx +18 -3
  60. package/src/utils/promises.tsx +9 -2
@@ -259,7 +259,7 @@ export function concatStacktracesIfRejected<T>(promise: Promise<T>): void {
259
259
  });
260
260
  }
261
261
 
262
- export async function wait(ms: number) {
262
+ export async function wait(ms: number, options?: { unref?: boolean }) {
263
263
  if (!Number.isFinite(ms) || ms < 0) {
264
264
  throw new HexclaveAssertionError(`wait() requires a non-negative integer number of milliseconds to wait. (found: ${ms}ms)`);
265
265
  }
@@ -267,7 +267,10 @@ export async function wait(ms: number) {
267
267
  throw new HexclaveAssertionError("The maximum timeout for wait() is 2147483647ms (2**31 - 1). (found: ${ms}ms)");
268
268
  }
269
269
  return await traceSpan({ description: 'wait(...)', attributes: { 'stack.wait.ms': ms } }, async (span) => {
270
- return await new Promise<void>(resolve => setTimeout(resolve, ms));
270
+ return await new Promise<void>((resolve) => {
271
+ const timeout = setTimeout(resolve, ms);
272
+ if (options?.unref === true && typeof timeout === "object") timeout.unref();
273
+ });
271
274
  });
272
275
  }
273
276
  import.meta.vitest?.test("wait", async ({ expect }) => {
@@ -280,6 +283,10 @@ import.meta.vitest?.test("wait", async ({ expect }) => {
280
283
  // Test with zero
281
284
  await expect(wait(0)).resolves.toBeUndefined();
282
285
 
286
+ // Node's unref option must preserve the normal wait behavior while another
287
+ // referenced handle (the test runner) owns the process lifetime.
288
+ await expect(wait(0, { unref: true })).resolves.toBeUndefined();
289
+
283
290
  // Test with negative number
284
291
  await expect(wait(-10)).rejects.toThrow("wait() requires a non-negative integer");
285
292