@wrongstack/core 0.302.0 → 0.302.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 (42) hide show
  1. package/dist/agent-status-tracker.d.ts +6 -2
  2. package/dist/chronicle/index.js +1836 -1645
  3. package/dist/chronicle/metrics-store.d.ts +14 -0
  4. package/dist/chronicle/project-server-protocol.d.ts +13 -0
  5. package/dist/chronicle/project-server.js +1759 -1583
  6. package/dist/chronicle/rollup-adapter.d.ts +2 -0
  7. package/dist/chronicle/sqlite-journal.d.ts +59 -0
  8. package/dist/coordination/index.js +790 -248
  9. package/dist/coordination/mail-tools.d.ts +2 -2
  10. package/dist/core/continue-intent.d.ts +2 -0
  11. package/dist/core/conversation-state.d.ts +5 -0
  12. package/dist/core/index.js +120 -19
  13. package/dist/defaults/index.js +927 -373
  14. package/dist/execution/index.js +27 -10
  15. package/dist/index.d.ts +3 -1
  16. package/dist/index.js +8762 -6780
  17. package/dist/infrastructure/index.js +722 -672
  18. package/dist/kernel/events/memory-events.d.ts +62 -0
  19. package/dist/plugin/index.js +2154 -1979
  20. package/dist/session-catalog/client.d.ts +62 -0
  21. package/dist/session-catalog/endpoint.d.ts +6 -0
  22. package/dist/session-catalog/index.d.ts +6 -0
  23. package/dist/session-catalog/index.js +1978 -0
  24. package/dist/session-catalog/project-server.d.ts +3 -0
  25. package/dist/session-catalog/project-server.js +1838 -0
  26. package/dist/session-catalog/protocol.d.ts +275 -0
  27. package/dist/session-catalog/registry.d.ts +59 -0
  28. package/dist/session-catalog/store.d.ts +55 -0
  29. package/dist/storage/index.d.ts +42 -38
  30. package/dist/storage/index.js +14279 -13393
  31. package/dist/storage/session-event-bridge.d.ts +2 -2
  32. package/dist/storage/session-store.d.ts +6 -0
  33. package/dist/tools/index.js +8 -2
  34. package/dist/types/context-evidence.d.ts +2 -0
  35. package/dist/types/messages.d.ts +8 -0
  36. package/dist/types/session.d.ts +19 -0
  37. package/dist/utils/context-evidence.d.ts +13 -1
  38. package/dist/utils/index.js +26 -2
  39. package/instructions/system-lite.md +11 -2
  40. package/instructions/system-pro.md +14 -0
  41. package/instructions/system.md +14 -0
  42. package/package.json +7 -3
@@ -0,0 +1,62 @@
1
+ import { type SessionCatalogEvent, type SessionCatalogOperationName, type SessionCatalogOperations } from './protocol.js';
2
+ export interface SessionCatalogProjectClientOptions {
3
+ projectDir: string;
4
+ projectRoot: string;
5
+ }
6
+ export type SessionCatalogDaemonAvailability = {
7
+ kind: 'available';
8
+ url: URL;
9
+ } | {
10
+ kind: 'inline-requested';
11
+ } | {
12
+ kind: 'missing-build';
13
+ };
14
+ export declare function resolveSessionCatalogDaemonAvailability(moduleUrl?: string, exists?: (filePath: string) => boolean): SessionCatalogDaemonAvailability;
15
+ export declare function resolveSessionCatalogProjectServerUrl(moduleUrl?: string, exists?: (filePath: string) => boolean): URL | null;
16
+ export declare class SessionCatalogProjectClient {
17
+ readonly options: SessionCatalogProjectClientOptions;
18
+ readonly endpoint: string;
19
+ private socket;
20
+ private info;
21
+ private buffer;
22
+ private connecting;
23
+ private connectResolve;
24
+ private connectReject;
25
+ private authToken;
26
+ private nextId;
27
+ private readonly pending;
28
+ private readonly eventListeners;
29
+ private reconnectTimer;
30
+ private explicitlyClosed;
31
+ constructor(options: SessionCatalogProjectClientOptions);
32
+ call<O extends SessionCatalogOperationName>(op: O, args: SessionCatalogOperations[O]['args'], options?: {
33
+ timeoutMs?: number;
34
+ }): Promise<SessionCatalogOperations[O]['result']>;
35
+ /**
36
+ * Call an already-running project daemon without starting one.
37
+ *
38
+ * Cross-project discovery must use this path: observing another project is
39
+ * never sufficient authority to wake that project's IPC owner.
40
+ */
41
+ callExisting<O extends SessionCatalogOperationName>(op: O, args: SessionCatalogOperations[O]['args'], options?: {
42
+ timeoutMs?: number;
43
+ }): Promise<SessionCatalogOperations[O]['result']>;
44
+ ping(): Promise<SessionCatalogOperations['ping']['result']>;
45
+ subscribe(listener: (event: SessionCatalogEvent) => void): Promise<() => Promise<void>>;
46
+ shutdown(reason?: string): Promise<{
47
+ stopped: boolean;
48
+ pid?: number;
49
+ }>;
50
+ close(): Promise<void>;
51
+ private ensureConnected;
52
+ private connectWithElection;
53
+ private connectOnce;
54
+ private currentAuthToken;
55
+ private request;
56
+ private onData;
57
+ private onMessage;
58
+ private onClose;
59
+ private scheduleSubscriptionReconnect;
60
+ private spawnDetached;
61
+ }
62
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1,6 @@
1
+ export declare const SESSION_CATALOG_METADATA_FILE = ".session-catalog-server.json";
2
+ export declare function sessionCatalogProjectServerKey(projectDir: string): string;
3
+ export declare function sessionCatalogProjectServerEndpoint(projectDir: string): string;
4
+ export declare function sessionCatalogProjectServerMetadataPath(projectDir: string): string;
5
+ export declare function ensureSessionCatalogSocketDirectory(endpoint: string): void;
6
+ //# sourceMappingURL=endpoint.d.ts.map
@@ -0,0 +1,6 @@
1
+ export * from './client.js';
2
+ export * from './endpoint.js';
3
+ export * from './protocol.js';
4
+ export * from './registry.js';
5
+ export * from './store.js';
6
+ //# sourceMappingURL=index.d.ts.map