@hasna/mementos 0.14.74 → 0.14.78

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 (68) hide show
  1. package/bun.lock +93 -0
  2. package/dist/cli/commands/agent.d.ts.map +1 -1
  3. package/dist/cli/commands/info-context.d.ts.map +1 -1
  4. package/dist/cli/commands/info-stale.d.ts.map +1 -1
  5. package/dist/cli/commands/io-export.d.ts.map +1 -1
  6. package/dist/cli/commands/memory-cmd-crud.d.ts.map +1 -1
  7. package/dist/cli/commands/memory-cmd-list.d.ts.map +1 -1
  8. package/dist/cli/commands/memory-cmd-recall.d.ts.map +1 -1
  9. package/dist/cli/commands/memory-cmd-search.d.ts.map +1 -1
  10. package/dist/cli/commands/memory-cmd-tail.d.ts.map +1 -1
  11. package/dist/cli/commands/project.d.ts.map +1 -1
  12. package/dist/cli/commands/system-watch.d.ts.map +1 -1
  13. package/dist/cli/helpers.d.ts +38 -0
  14. package/dist/cli/helpers.d.ts.map +1 -1
  15. package/dist/cli/index.js +2077 -299
  16. package/dist/db/__fixtures__/fail-closed-stub-server.d.ts.map +1 -1
  17. package/dist/db/agents.d.ts +6 -0
  18. package/dist/db/agents.d.ts.map +1 -1
  19. package/dist/db/audit.d.ts +14 -0
  20. package/dist/db/audit.d.ts.map +1 -1
  21. package/dist/db/memory-project-link.d.ts +13 -0
  22. package/dist/db/memory-project-link.d.ts.map +1 -0
  23. package/dist/db/migrations.d.ts.map +1 -1
  24. package/dist/db/pg-migrations.d.ts +0 -6
  25. package/dist/db/pg-migrations.d.ts.map +1 -1
  26. package/dist/db/projects.d.ts +22 -1
  27. package/dist/db/projects.d.ts.map +1 -1
  28. package/dist/index.d.ts +5 -2
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +2909 -173
  31. package/dist/lib/package-version.d.ts +3 -0
  32. package/dist/lib/package-version.d.ts.map +1 -0
  33. package/dist/mcp/index.js +524 -10
  34. package/dist/memory-project-link/index.d.ts +2 -0
  35. package/dist/memory-project-link/index.d.ts.map +1 -0
  36. package/dist/memory-project-link/schema.d.ts +5 -0
  37. package/dist/memory-project-link/schema.d.ts.map +1 -0
  38. package/dist/project-registration/authority.d.ts +39 -0
  39. package/dist/project-registration/authority.d.ts.map +1 -0
  40. package/dist/project-registration/http.d.ts +29 -0
  41. package/dist/project-registration/http.d.ts.map +1 -0
  42. package/dist/project-registration/index.d.ts +8 -0
  43. package/dist/project-registration/index.d.ts.map +1 -0
  44. package/dist/project-registration/project-references.d.ts +71 -0
  45. package/dist/project-registration/project-references.d.ts.map +1 -0
  46. package/dist/project-registration/schema.d.ts +5 -0
  47. package/dist/project-registration/schema.d.ts.map +1 -0
  48. package/dist/project-registration/types.d.ts +168 -0
  49. package/dist/project-registration/types.d.ts.map +1 -0
  50. package/dist/project-registration.d.ts +2 -0
  51. package/dist/project-registration.d.ts.map +1 -0
  52. package/dist/project-registration.js +1496 -0
  53. package/dist/sdk/index.d.ts +127 -0
  54. package/dist/sdk/index.d.ts.map +1 -1
  55. package/dist/sdk/index.js +74 -0
  56. package/dist/server/index.d.ts +1 -0
  57. package/dist/server/index.d.ts.map +1 -1
  58. package/dist/server/index.js +2667 -149
  59. package/dist/server/routes/memories.d.ts +1 -0
  60. package/dist/server/routes/memories.d.ts.map +1 -1
  61. package/dist/server/routes/memory-project-link.d.ts +2 -0
  62. package/dist/server/routes/memory-project-link.d.ts.map +1 -0
  63. package/dist/server/routes/project-registration.d.ts +2 -0
  64. package/dist/server/routes/project-registration.d.ts.map +1 -0
  65. package/dist/types/index.d.ts +119 -0
  66. package/dist/types/index.d.ts.map +1 -1
  67. package/package.json +9 -3
  68. package/dashboard/bun.lock +0 -519
@@ -0,0 +1,29 @@
1
+ import { type MementosProjectRegistrationAuthority, type MementosProjectRegistrationCapability, type MementosProjectRegistrationHttpClientOptions, type MementosProjectRegistrationInverseVerification, type MementosProjectRegistrationLookupRequest, type MementosProjectRegistrationLookupResult, type MementosProjectRegistrationPathHandle, type MementosProjectRegistrationReceipt, type MementosProjectRegistrationRecord, type MementosProjectRegistrationRequest } from "./types.js";
2
+ /**
3
+ * Handle one package-owned registration request. The canonical path is private
4
+ * request material and is converted back to a structural handle before the
5
+ * authority sees it; no capability or result serializes it.
6
+ */
7
+ export declare function handleMementosProjectRegistrationHttpRequest(request: Request, url: URL, authority: MementosProjectRegistrationAuthority, basePath?: "/v1/project-registration" | "/api/project-registration"): Promise<Response | null>;
8
+ export declare class MementosProjectRegistrationHttpClient implements MementosProjectRegistrationAuthority {
9
+ readonly authority: "mementos";
10
+ private readonly baseUrl;
11
+ private readonly fetchImpl;
12
+ private readonly headers;
13
+ constructor(options: MementosProjectRegistrationHttpClientOptions);
14
+ private request;
15
+ capability(): Promise<MementosProjectRegistrationCapability>;
16
+ create(request: MementosProjectRegistrationRequest): Promise<MementosProjectRegistrationReceipt>;
17
+ readExact(request: {
18
+ resource_kind: "project";
19
+ target_id: string;
20
+ target: MementosProjectRegistrationPathHandle;
21
+ response_byte_limit: number;
22
+ time_budget_ms: number;
23
+ }): Promise<MementosProjectRegistrationRecord>;
24
+ lookupReceipt(request: MementosProjectRegistrationLookupRequest): Promise<MementosProjectRegistrationLookupResult>;
25
+ compensate(request: MementosProjectRegistrationRequest): Promise<MementosProjectRegistrationReceipt>;
26
+ verifyInverse(request: MementosProjectRegistrationRequest): Promise<MementosProjectRegistrationInverseVerification>;
27
+ }
28
+ export declare function createMementosProjectRegistrationHttpClient(options: MementosProjectRegistrationHttpClientOptions): MementosProjectRegistrationAuthority;
29
+ //# sourceMappingURL=http.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/project-registration/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oCAAoC,EACzC,KAAK,qCAAqC,EAC1C,KAAK,4CAA4C,EACjD,KAAK,8CAA8C,EACnD,KAAK,wCAAwC,EAC7C,KAAK,uCAAuC,EAC5C,KAAK,qCAAqC,EAC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ationAuthority, canonicalMementosProjectRegistrationJson, createLocalMementosProjectRegistrationAuthority, createMementosProjectRegistrationAuthority, deriveMementosProjectRegistrationIdempotencyKey, digestMementosProjectRegistrationValue, } from "./authority.js";
2
+ export { MementosProjectRegistrationHttpClient, createMementosProjectRegistrationHttpClient, handleMementosProjectRegistrationHttpRequest, } from "./http.js";
3
+ export { postgresMementosProjectRegistrationSchemaSql, postgresMementosProjectGuardedUpdateSchemaSql, sqliteMementosProjectRegistrationSchemaSql, sqliteMementosProjectGuardedUpdateSchemaSql, } from "./schema.js";
4
+ export { MEMENTOS_PROJECT_REFERENCE_SURFACES, hasMementosProjectReferences, mementosProjectReferenceCounts, } from "./project-references.js";
5
+ export type { MementosProjectReferenceCounts, MementosProjectReferenceKey, } from "./project-references.js";
6
+ export { MEMENTOS_PROJECT_REGISTRATION_CALLER_ROUTE, MEMENTOS_PROJECT_REGISTRATION_ROUTE, MEMENTOS_PROJECT_REGISTRATION_SCHEMA_VERSION, MEMENTOS_PROJECT_GUARDED_UPDATE_ROUTE, MementosProjectRegistrationError, } from "./types.js";
7
+ export type { MementosProjectRegistrationAuthority, MementosProjectRegistrationAuthorityOptions, MementosProjectRegistrationBounds, MementosProjectRegistrationCapability, MementosProjectRegistrationDirection, MementosProjectRegistrationErrorCode, MementosProjectRegistrationFaultPoint, MementosProjectRegistrationHttpClientOptions, MementosProjectRegistrationInverseVerification, MementosProjectRegistrationLookupRequest, MementosProjectRegistrationLookupResult, MementosProjectRegistrationOutcome, MementosProjectRegistrationPathHandle, MementosProjectRegistrationReceipt, MementosProjectRegistrationRecord, MementosProjectRegistrationRequest, MementosProjectRegistrationResourceKind, MementosProjectRegistrationResponseControl, } from "./types.js";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/project-registration/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gDAAgD,EAChD,wCAAwC,EACxC,+CAA+C,EAC/C,0CAA0C,EAC1C,+CAA+C,EAC/C,sCAAsC,GACvC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,qCAAqC,EACrC,2CAA2C,EAC3C,4CAA4C,GAC7C,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,4CAA4C,EAC5C,6CAA6C,EAC7C,0CAA0C,EAC1C,2CAA2C,GAC5C,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,mCAAmC,EACnC,4BAA4B,EAC5B,8BAA8B,GAC/B,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,8BAA8B,EAC9B,2BAA2B,GAC5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,0CAA0C,EAC1C,mCAAmC,EACnC,4CAA4C,EAC5C,qCAAqC,EACrC,gCAAgC,GACjC,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,oCAAoC,EACpC,2CAA2C,EAC3C,iCAAiC,EACjC,qCAAqC,EACrC,oCAAoC,EACpC,oCAAoC,EACpC,qCAAqC,EACrC,4CAA4C,EAC5C,8CAA8C,EAC9C,wCAAwC,EACxC,uCAAuC,EACvC,kCAAkC,EAClC,qCAAqC,EACrC,kCAAkC,EAClC,iCAAiC,EACjC,kCAAkC,EAClC,uCAAuC,EACvC,0CAA0C,GAC3C,MAAM,YAAY,CAAC"}
@@ -0,0 +1,71 @@
1
+ import type { DbAdapter } from "../storage.js";
2
+ /**
3
+ * Every supported schema column that directly points at a Mementos project.
4
+ * Counts, receipt digests, inverse admission, and the conditional DELETE all
5
+ * derive from this registry so adding a relationship cannot update one guard
6
+ * while silently bypassing another.
7
+ */
8
+ export declare const MEMENTOS_PROJECT_REFERENCE_SURFACES: readonly [{
9
+ readonly key: "memories";
10
+ readonly table: "memories";
11
+ readonly column: "project_id";
12
+ }, {
13
+ readonly key: "sessions";
14
+ readonly table: "sessions";
15
+ readonly column: "project_id";
16
+ }, {
17
+ readonly key: "entities";
18
+ readonly table: "entities";
19
+ readonly column: "project_id";
20
+ }, {
21
+ readonly key: "agents";
22
+ readonly table: "agents";
23
+ readonly column: "active_project_id";
24
+ }, {
25
+ readonly key: "tool_events";
26
+ readonly table: "tool_events";
27
+ readonly column: "project_id";
28
+ }, {
29
+ readonly key: "tasks";
30
+ readonly table: "tasks";
31
+ readonly column: "project_id";
32
+ }, {
33
+ readonly key: "memory_consolidation_runs";
34
+ readonly table: "memory_consolidation_runs";
35
+ readonly column: "project_id";
36
+ }, {
37
+ readonly key: "memory_reflection_runs";
38
+ readonly table: "memory_reflection_runs";
39
+ readonly column: "project_id";
40
+ }, {
41
+ readonly key: "memory_acl";
42
+ readonly table: "memory_acl";
43
+ readonly column: "project_id";
44
+ }, {
45
+ readonly key: "search_history";
46
+ readonly table: "search_history";
47
+ readonly column: "project_id";
48
+ }, {
49
+ readonly key: "session_memory_jobs";
50
+ readonly table: "session_memory_jobs";
51
+ readonly column: "project_id";
52
+ }, {
53
+ readonly key: "synthesis_events";
54
+ readonly table: "synthesis_events";
55
+ readonly column: "project_id";
56
+ }, {
57
+ readonly key: "synthesis_runs";
58
+ readonly table: "synthesis_runs";
59
+ readonly column: "project_id";
60
+ }, {
61
+ readonly key: "webhook_hooks";
62
+ readonly table: "webhook_hooks";
63
+ readonly column: "project_id";
64
+ }];
65
+ export type MementosProjectReferenceKey = (typeof MEMENTOS_PROJECT_REFERENCE_SURFACES)[number]["key"];
66
+ export type MementosProjectReferenceCounts = Record<MementosProjectReferenceKey, number>;
67
+ export declare function mementosProjectReferenceCounts(db: DbAdapter, projectId: string): MementosProjectReferenceCounts;
68
+ export declare function hasMementosProjectReferences(counts: MementosProjectReferenceCounts): boolean;
69
+ /** Delete exactly one project only when every registered direct relationship is absent. */
70
+ export declare function deleteMementosProjectIfUnreferenced(db: DbAdapter, projectId: string): number;
71
+ //# sourceMappingURL=project-references.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-references.d.ts","sourceRoot":"","sources":["../../src/project-registration/project-references.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;;;;GAKG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BtC,CAAC;AAEX,MAAM,MAAM,2BAA2B,GACrC,CAAC,OAAO,mCAAmC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC;AAE9D,MAAM,MAAM,8BAA8B,GAAG,MAAM,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC;AASzF,wBAAgB,8BAA8B,CAC5C,EAAE,EAAE,SAAS,EACb,SAAS,EAAE,MAAM,GAChB,8BAA8B,CAYhC;AAED,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,8BAA8B,GACrC,OAAO,CAET;AAED,2FAA2F;AAC3F,wBAAgB,mCAAmC,CACjD,EAAE,EAAE,SAAS,EACb,SAAS,EAAE,MAAM,GAChB,MAAM,CAaR"}
@@ -0,0 +1,5 @@
1
+ export declare function sqliteMementosProjectRegistrationSchemaSql(): string;
2
+ export declare function postgresMementosProjectRegistrationSchemaSql(): string;
3
+ export declare function sqliteMementosProjectGuardedUpdateSchemaSql(): string;
4
+ export declare function postgresMementosProjectGuardedUpdateSchemaSql(): string;
5
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/project-registration/schema.ts"],"names":[],"mappings":"AAAA,wBAAgB,0CAA0C,IAAI,MAAM,CAwFnE;AAED,wBAAgB,4CAA4C,IAAI,MAAM,CAyFrE;AAED,wBAAgB,2CAA2C,IAAI,MAAM,CA4CpE;AAED,wBAAgB,6CAA6C,IAAI,MAAM,CA8CtE"}
@@ -0,0 +1,168 @@
1
+ export declare const MEMENTOS_PROJECT_REGISTRATION_ROUTE: "mementos.project-registration.v1";
2
+ export declare const MEMENTOS_PROJECT_REGISTRATION_CALLER_ROUTE: "projects.full-registration.v1";
3
+ export declare const MEMENTOS_PROJECT_REGISTRATION_SCHEMA_VERSION: 1;
4
+ export declare const MEMENTOS_PROJECT_GUARDED_UPDATE_ROUTE: "mementos.project-guarded-update.v1";
5
+ export type MementosProjectRegistrationResourceKind = "project";
6
+ export type MementosProjectRegistrationDirection = "forward" | "inverse";
7
+ export type MementosProjectRegistrationOutcome = "accepted" | "duplicate_of_accepted" | "terminal_nonacceptance";
8
+ export interface MementosProjectRegistrationBounds {
9
+ response_byte_limit: number;
10
+ time_budget_ms: number;
11
+ }
12
+ export interface MementosProjectRegistrationResponseControl extends MementosProjectRegistrationBounds {
13
+ response_bytes: number;
14
+ elapsed_ms: number;
15
+ complete: true;
16
+ truncated: false;
17
+ }
18
+ export interface MementosProjectRegistrationCapability {
19
+ authority: "mementos";
20
+ route: typeof MEMENTOS_PROJECT_REGISTRATION_ROUTE;
21
+ package_version: string;
22
+ authority_id: string;
23
+ tenant_id: string;
24
+ corpus_id: string;
25
+ supported_resources: ["project"];
26
+ conditional_create: true;
27
+ immutable_receipts: true;
28
+ exact_terminal_lookup: true;
29
+ exact_readback: true;
30
+ conditional_inverse: true;
31
+ ambiguous_outcome_reconciliation: true;
32
+ guarded_update: true;
33
+ no_write_dry_run: true;
34
+ expected_revision_compare_and_swap: true;
35
+ caller_idempotency: true;
36
+ exact_inverse_rollback: true;
37
+ }
38
+ export interface MementosProjectRegistrationReceipt {
39
+ receipt_id: string;
40
+ authority: "mementos";
41
+ route: typeof MEMENTOS_PROJECT_REGISTRATION_ROUTE;
42
+ package_version: string;
43
+ authority_id: string;
44
+ tenant_id: string;
45
+ corpus_id: string;
46
+ operation_id: string;
47
+ step_id: string;
48
+ resource_kind: "project";
49
+ direction: MementosProjectRegistrationDirection;
50
+ idempotency_key: string;
51
+ request_digest: string;
52
+ precondition_digest: string;
53
+ outcome: MementosProjectRegistrationOutcome;
54
+ reason: string | null;
55
+ target_id: string | null;
56
+ result_revision: string | null;
57
+ result_digest: string | null;
58
+ duplicate_of_receipt_id: string | null;
59
+ accepted_receipt_id: string | null;
60
+ created_by_operation: boolean;
61
+ created_at: string;
62
+ }
63
+ export interface MementosProjectRegistrationRecord {
64
+ target_id: string;
65
+ revision: string;
66
+ digest: string;
67
+ }
68
+ /**
69
+ * Structural handle implemented by @hasna/projects. The absolute path can be
70
+ * consumed by this authority but is never returned in a capability, receipt,
71
+ * lookup, or exact-read response.
72
+ */
73
+ export interface MementosProjectRegistrationPathHandle {
74
+ withOwnedPath<T>(consumer: (absolutePath: string) => T): T;
75
+ }
76
+ export interface MementosProjectRegistrationRequest extends MementosProjectRegistrationBounds {
77
+ operation_id: string;
78
+ step_id: string;
79
+ resource_kind: "project";
80
+ direction: MementosProjectRegistrationDirection;
81
+ authority_route: string;
82
+ package_version: string;
83
+ authority_id: string;
84
+ tenant_id: string;
85
+ corpus_id: string;
86
+ target_selector: string;
87
+ idempotency_key: string;
88
+ request_digest: string;
89
+ precondition_digest: string;
90
+ project_id: string;
91
+ project_slug: string;
92
+ project_name: string;
93
+ desired: Record<string, unknown>;
94
+ target: MementosProjectRegistrationPathHandle;
95
+ accepted_receipt?: MementosProjectRegistrationReceipt;
96
+ }
97
+ export interface MementosProjectRegistrationLookupRequest extends MementosProjectRegistrationBounds {
98
+ operation_id: string;
99
+ step_id: string;
100
+ resource_kind: "project";
101
+ direction: MementosProjectRegistrationDirection;
102
+ authority: "mementos";
103
+ authority_route: string;
104
+ package_version: string;
105
+ authority_id: string;
106
+ tenant_id: string;
107
+ corpus_id: string;
108
+ target_selector: string;
109
+ idempotency_key: string;
110
+ target_id?: string;
111
+ max_items: 1;
112
+ }
113
+ export interface MementosProjectRegistrationLookupResult {
114
+ receipt: MementosProjectRegistrationReceipt;
115
+ response_control: MementosProjectRegistrationResponseControl;
116
+ }
117
+ export interface MementosProjectRegistrationInverseVerification {
118
+ target_id: string;
119
+ accepted_receipt_id: string;
120
+ absent: true;
121
+ digest: string;
122
+ }
123
+ export interface MementosProjectRegistrationAuthority {
124
+ readonly authority: "mementos";
125
+ capability(): Promise<MementosProjectRegistrationCapability>;
126
+ create(request: MementosProjectRegistrationRequest): Promise<MementosProjectRegistrationReceipt>;
127
+ readExact(request: {
128
+ resource_kind: "project";
129
+ target_id: string;
130
+ target: MementosProjectRegistrationPathHandle;
131
+ response_byte_limit: number;
132
+ time_budget_ms: number;
133
+ }): Promise<MementosProjectRegistrationRecord>;
134
+ lookupReceipt(request: MementosProjectRegistrationLookupRequest): Promise<MementosProjectRegistrationLookupResult>;
135
+ compensate(request: MementosProjectRegistrationRequest): Promise<MementosProjectRegistrationReceipt>;
136
+ verifyInverse(request: MementosProjectRegistrationRequest): Promise<MementosProjectRegistrationInverseVerification>;
137
+ }
138
+ export type MementosProjectRegistrationFaultPoint = "before_object_write" | "after_object_write" | "before_receipt_write" | "after_receipt_write" | "after_commit";
139
+ export interface MementosProjectRegistrationAuthorityOptions {
140
+ packageVersion?: string;
141
+ authorityId?: string;
142
+ tenantId?: string;
143
+ corpusId?: string;
144
+ now?: () => string;
145
+ faultInjector?: (point: MementosProjectRegistrationFaultPoint, context: {
146
+ operation_id: string;
147
+ step_id: string;
148
+ resource_kind: "project";
149
+ direction: MementosProjectRegistrationDirection;
150
+ }) => void;
151
+ }
152
+ export type MementosProjectRegistrationErrorCode = "MEMENTOS_PROJECT_REGISTRATION_INVALID_INPUT" | "MEMENTOS_PROJECT_REGISTRATION_INVALID_BOUNDS" | "MEMENTOS_PROJECT_REGISTRATION_RESPONSE_TOO_LARGE" | "MEMENTOS_PROJECT_REGISTRATION_TIME_BUDGET_EXCEEDED" | "MEMENTOS_PROJECT_REGISTRATION_CAPABILITY_MISMATCH" | "MEMENTOS_PROJECT_REGISTRATION_DIGEST_MISMATCH" | "MEMENTOS_PROJECT_REGISTRATION_IDEMPOTENCY_MISMATCH" | "MEMENTOS_PROJECT_REGISTRATION_EXACT_ID_REQUIRED" | "MEMENTOS_PROJECT_REGISTRATION_RECEIPT_NOT_FOUND" | "MEMENTOS_PROJECT_REGISTRATION_RECORD_NOT_FOUND" | "MEMENTOS_PROJECT_REGISTRATION_ACCEPTED_RECEIPT_NOT_FOUND" | "MEMENTOS_PROJECT_REGISTRATION_ATOMICITY_UNAVAILABLE" | "MEMENTOS_PROJECT_REGISTRATION_CONFLICT";
153
+ export declare class MementosProjectRegistrationError extends Error {
154
+ readonly code: MementosProjectRegistrationErrorCode;
155
+ readonly details: Record<string, unknown>;
156
+ constructor(code: MementosProjectRegistrationErrorCode, message: string, details?: Record<string, unknown>);
157
+ }
158
+ export interface MementosProjectRegistrationHttpClientOptions {
159
+ baseUrl: string;
160
+ apiKey?: string;
161
+ fetch?: typeof globalThis.fetch;
162
+ headers?: Record<string, string>;
163
+ }
164
+ /** Private wire request used only between the package-owned HTTP client/server. */
165
+ export interface MementosProjectRegistrationWireRequest extends Omit<MementosProjectRegistrationRequest, "target"> {
166
+ canonical_path: string;
167
+ }
168
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/project-registration/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mCAAmC,EAAG,kCAA2C,CAAC;AAC/F,eAAO,MAAM,0CAA0C,EAAG,+BAAwC,CAAC;AACnG,eAAO,MAAM,4CAA4C,EAAG,CAAU,CAAC;AACvE,eAAO,MAAM,qCAAqC,EAChD,oCAA6C,CAAC;AAEhD,MAAM,MAAM,uCAAuC,GAAG,SAAS,CAAC;AAChE,MAAM,MAAM,oCAAoC,GAAG,SAAS,GAAG,SAAS,CAAC;AACzE,MAAM,MAAM,kCAAkC,GAC1C,UAAU,GACV,uBAAuB,GACvB,wBAAwB,CAAC;AAE7B,MAAM,WAAW,iCAAiC;IAChD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,0CACjB,SAAQ,iCAAiC;IACvC,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB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MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,mFAAmF;AACnF,MAAM,WAAW,sCACjB,SAAQ,IAAI,CAAC,kCAAkC,EAAE,QAAQ,CAAC;IACxD,cAAc,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,2 @@
1
+ export * from "./project-registration/index.js";
2
+ //# sourceMappingURL=project-registration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-registration.d.ts","sourceRoot":"","sources":["../src/project-registration.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC"}