@x12i/memorix-service 3.2.1 → 3.3.0
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.
- package/README.md +43 -2
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +4 -0
- package/dist/app.js.map +1 -1
- package/dist/catalog/catalog-service.d.ts +48 -0
- package/dist/catalog/catalog-service.d.ts.map +1 -0
- package/dist/catalog/catalog-service.js +397 -0
- package/dist/catalog/catalog-service.js.map +1 -0
- package/dist/catalog/package-list-source.d.ts +35 -0
- package/dist/catalog/package-list-source.d.ts.map +1 -0
- package/dist/catalog/package-list-source.js +47 -0
- package/dist/catalog/package-list-source.js.map +1 -0
- package/dist/catalog/types.d.ts +65 -0
- package/dist/catalog/types.d.ts.map +1 -0
- package/dist/catalog/types.js +16 -0
- package/dist/catalog/types.js.map +1 -0
- package/dist/catalog-store-cli.d.ts +20 -0
- package/dist/catalog-store-cli.d.ts.map +1 -0
- package/dist/catalog-store-cli.js +206 -0
- package/dist/catalog-store-cli.js.map +1 -0
- package/dist/cli.d.ts +3 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +48 -18
- package/dist/cli.js.map +1 -1
- package/dist/connector-ops/attempt-store.d.ts +5 -0
- package/dist/connector-ops/attempt-store.d.ts.map +1 -0
- package/dist/connector-ops/attempt-store.js +186 -0
- package/dist/connector-ops/attempt-store.js.map +1 -0
- package/dist/connector-ops/index.d.ts +5 -0
- package/dist/connector-ops/index.d.ts.map +1 -0
- package/dist/connector-ops/index.js +5 -0
- package/dist/connector-ops/index.js.map +1 -0
- package/dist/connector-ops/override-store.d.ts +7 -0
- package/dist/connector-ops/override-store.d.ts.map +1 -0
- package/dist/connector-ops/override-store.js +123 -0
- package/dist/connector-ops/override-store.js.map +1 -0
- package/dist/connector-ops/sanitize.d.ts +16 -0
- package/dist/connector-ops/sanitize.d.ts.map +1 -0
- package/dist/connector-ops/sanitize.js +48 -0
- package/dist/connector-ops/sanitize.js.map +1 -0
- package/dist/connector-ops/types.d.ts +76 -0
- package/dist/connector-ops/types.d.ts.map +1 -0
- package/dist/connector-ops/types.js +12 -0
- package/dist/connector-ops/types.js.map +1 -0
- package/dist/effective-listing.d.ts +11 -0
- package/dist/effective-listing.d.ts.map +1 -0
- package/dist/effective-listing.js +41 -0
- package/dist/effective-listing.js.map +1 -0
- package/dist/errors.d.ts +5 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +10 -3
- package/dist/errors.js.map +1 -1
- package/dist/execution-target.d.ts +16 -0
- package/dist/execution-target.d.ts.map +1 -1
- package/dist/execution-target.js +54 -0
- package/dist/execution-target.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/magit/magit-pack-service.d.ts +252 -70
- package/dist/magit/magit-pack-service.d.ts.map +1 -1
- package/dist/magit/magit-pack-service.js +556 -202
- package/dist/magit/magit-pack-service.js.map +1 -1
- package/dist/magit/pack-to-patchset.d.ts +21 -0
- package/dist/magit/pack-to-patchset.d.ts.map +1 -1
- package/dist/magit/pack-to-patchset.js +29 -0
- package/dist/magit/pack-to-patchset.js.map +1 -1
- package/dist/magit/package-catalog-bridge.d.ts +4 -14
- package/dist/magit/package-catalog-bridge.d.ts.map +1 -1
- package/dist/magit/package-catalog-bridge.js +2 -21
- package/dist/magit/package-catalog-bridge.js.map +1 -1
- package/dist/mgc-packages.d.ts +4 -3
- package/dist/mgc-packages.d.ts.map +1 -1
- package/dist/mgc-packages.js +4 -3
- package/dist/mgc-packages.js.map +1 -1
- package/dist/openapi/openapi.json +1716 -137
- package/dist/optional-companion-url.d.ts +72 -0
- package/dist/optional-companion-url.d.ts.map +1 -0
- package/dist/optional-companion-url.js +148 -0
- package/dist/optional-companion-url.js.map +1 -0
- package/dist/platform.d.ts +11 -0
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +77 -2
- package/dist/platform.js.map +1 -1
- package/dist/routes/catalog.d.ts +4 -0
- package/dist/routes/catalog.d.ts.map +1 -0
- package/dist/routes/catalog.js +103 -0
- package/dist/routes/catalog.js.map +1 -0
- package/dist/routes/connector-ops.d.ts +12 -0
- package/dist/routes/connector-ops.d.ts.map +1 -0
- package/dist/routes/connector-ops.js +160 -0
- package/dist/routes/connector-ops.js.map +1 -0
- package/dist/routes/memory.d.ts.map +1 -1
- package/dist/routes/memory.js +9 -2
- package/dist/routes/memory.js.map +1 -1
- package/dist/routes/metadata.d.ts.map +1 -1
- package/dist/routes/metadata.js +135 -186
- package/dist/routes/metadata.js.map +1 -1
- package/dist/routes/pipelines.d.ts.map +1 -1
- package/dist/routes/pipelines.js +3 -2
- package/dist/routes/pipelines.js.map +1 -1
- package/openapi/openapi.json +1716 -137
- package/package.json +30 -7
|
@@ -1,11 +1,107 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type PackageKind as MagitPackageKind } from "@x12i/magit";
|
|
2
2
|
import type { MetadataPack } from "@x12i/memorix-metadata";
|
|
3
|
-
import { type
|
|
3
|
+
import { type PackagePayload } from "./pack-to-patchset.js";
|
|
4
4
|
import { type ProposalLike } from "./proposal-to-pack.js";
|
|
5
|
+
import type { PackageAssociations, PackageKind, PackageMode } from "./package-catalog-bridge.js";
|
|
5
6
|
export type MagitActor = {
|
|
6
7
|
subject: string;
|
|
7
8
|
scopes?: string[];
|
|
8
9
|
};
|
|
10
|
+
export type PackageActor = {
|
|
11
|
+
id?: string;
|
|
12
|
+
email?: string;
|
|
13
|
+
};
|
|
14
|
+
/** Magit's own associations shape (both legs optional) — distinct from
|
|
15
|
+
* Memorix's PackageAssociations (package-catalog-bridge.ts), which requires
|
|
16
|
+
* both legs for locally-discovered associations. */
|
|
17
|
+
export type CatalogAssociations = {
|
|
18
|
+
connectorIds?: string[];
|
|
19
|
+
serviceIds?: string[];
|
|
20
|
+
};
|
|
21
|
+
export type CatalogPackageRef = {
|
|
22
|
+
kind: MagitPackageKind;
|
|
23
|
+
id: string;
|
|
24
|
+
version: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Result of packing into the central catalog.
|
|
28
|
+
* On typed-store (Mode A) paths, Magit returns `published` (remote push
|
|
29
|
+
* succeeded) and `storeId`. Never expose the store selector.
|
|
30
|
+
* Flat FR-CPS (Mode B) only returns version/checksum/reused.
|
|
31
|
+
*/
|
|
32
|
+
export type PackedPackageResult = {
|
|
33
|
+
version: string;
|
|
34
|
+
checksum: string;
|
|
35
|
+
reused: boolean;
|
|
36
|
+
/** Present on store-scoped packs (2.10+). True only after remote publish. */
|
|
37
|
+
published?: boolean;
|
|
38
|
+
/** Present on store-scoped packs. Sensitive for recovery — avoid bulk lists. */
|
|
39
|
+
storeId?: string;
|
|
40
|
+
/** Present on store-scoped packs. Safe structure-language id. */
|
|
41
|
+
packageTypeId?: string;
|
|
42
|
+
};
|
|
43
|
+
export type CatalogPackageListItem = {
|
|
44
|
+
kind: MagitPackageKind;
|
|
45
|
+
id: string;
|
|
46
|
+
version: string;
|
|
47
|
+
checksum: string | null;
|
|
48
|
+
message: string | null;
|
|
49
|
+
createdAt: string;
|
|
50
|
+
associations?: CatalogAssociations;
|
|
51
|
+
mode?: PackageMode;
|
|
52
|
+
/** Present on store-scoped list rows (2.10+). Never secrets. */
|
|
53
|
+
publisher?: {
|
|
54
|
+
id: string;
|
|
55
|
+
displayName?: string;
|
|
56
|
+
appId?: string;
|
|
57
|
+
workspaceId?: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export type FetchedCatalogPackage = {
|
|
61
|
+
ref: CatalogPackageRef;
|
|
62
|
+
checksum: string;
|
|
63
|
+
payload: PackagePayload;
|
|
64
|
+
associations?: CatalogAssociations;
|
|
65
|
+
publisher?: {
|
|
66
|
+
id: string;
|
|
67
|
+
displayName?: string;
|
|
68
|
+
appId?: string;
|
|
69
|
+
workspaceId?: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Typed global store binding (Magit 2.10). Both selector + type required;
|
|
74
|
+
* half-config is an error. Selector must never appear in logs/diagnostics.
|
|
75
|
+
*/
|
|
76
|
+
export type MagitTypedStoreConfig = {
|
|
77
|
+
storeSelector: string;
|
|
78
|
+
packageTypeId: string;
|
|
79
|
+
publisher: {
|
|
80
|
+
id: string;
|
|
81
|
+
appId?: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
/** Last-observed reachability of the central package catalog. `reachable:
|
|
85
|
+
* null` means never attempted yet (optimistic — matches pre-cutover state
|
|
86
|
+
* until proven otherwise). Reactive, not polled: updated after every real
|
|
87
|
+
* catalog operation. */
|
|
88
|
+
export type MagitCatalogHealth = {
|
|
89
|
+
reachable: boolean | null;
|
|
90
|
+
reason: string | null;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Any error surfaced from a catalog-flagged operation that isn't already a
|
|
94
|
+
* ServiceError or PatchsetError (both handled earlier in mapError, and
|
|
95
|
+
* neither indicates a reachability problem) is treated as central-storage
|
|
96
|
+
* unreachable — network/DNS failure, connection refused, and auth failure
|
|
97
|
+
* (missing/expired MAGIT_TOKEN) all leave the catalog equally unusable from
|
|
98
|
+
* an operator's "is Magit healthy" perspective, and the FR (§8's retirement)
|
|
99
|
+
* requires surfacing every one of them rather than silently falling back to
|
|
100
|
+
* local-only behaviour. The first line of the error message is kept as the
|
|
101
|
+
* classified reason for diagnostics.
|
|
102
|
+
*/
|
|
103
|
+
/** First line of an error, with Magit store-selector material redacted. */
|
|
104
|
+
export declare function classifyCatalogUnreachable(err: unknown): string;
|
|
9
105
|
export type PackVersionSummary = {
|
|
10
106
|
commit: string;
|
|
11
107
|
agentId: string;
|
|
@@ -33,6 +129,11 @@ export type PackDiffResult = {
|
|
|
33
129
|
to: string;
|
|
34
130
|
changes: PackDiffRow[];
|
|
35
131
|
};
|
|
132
|
+
/**
|
|
133
|
+
* Pure record-level pack compare used for Mode A (immutable store payloads)
|
|
134
|
+
* and unit tests. Keys definitions by kind/id with stable JSON equality.
|
|
135
|
+
*/
|
|
136
|
+
export declare function diffMetadataPacks(agentId: string, from: string, to: string, fromPack: MetadataPack, toPack: MetadataPack): PackDiffResult;
|
|
36
137
|
export type MemorixReleaseRecord = {
|
|
37
138
|
name: string;
|
|
38
139
|
commit: string;
|
|
@@ -63,101 +164,129 @@ export type MagitPackServiceConfig = {
|
|
|
63
164
|
/** Metadata DB name for this isolation session / org. */
|
|
64
165
|
metadataDb: string;
|
|
65
166
|
storageUrl?: string;
|
|
66
|
-
/**
|
|
67
|
-
* Env var name Magit reads for the storage Authix token.
|
|
68
|
-
* Magit token === Authix service token (same credential).
|
|
69
|
-
*/
|
|
70
167
|
storageTokenEnv?: string;
|
|
71
168
|
/** Optional logger for Magit progress ticks. */
|
|
72
169
|
log?: (msg: string, extra?: Record<string, unknown>) => void;
|
|
73
170
|
};
|
|
74
|
-
export type CatalogPackageVersion = {
|
|
75
|
-
kind: PackageKind;
|
|
76
|
-
id: string;
|
|
77
|
-
version: string;
|
|
78
|
-
commit: string;
|
|
79
|
-
checksum: string | null;
|
|
80
|
-
message: string | null;
|
|
81
|
-
createdAt: string;
|
|
82
|
-
mode?: PackageMode;
|
|
83
|
-
associations?: PackageAssociations;
|
|
84
|
-
};
|
|
85
|
-
export type CatalogPackResult = {
|
|
86
|
-
version: string;
|
|
87
|
-
checksum: string;
|
|
88
|
-
reused: boolean;
|
|
89
|
-
remote: boolean;
|
|
90
|
-
};
|
|
91
|
-
/**
|
|
92
|
-
* Magit storage auth is the Authix service token.
|
|
93
|
-
* Prefers MAGIT_STORAGE_TOKEN_ENV, else MAGIT_TOKEN / AUTHIX_TOKEN when set.
|
|
94
|
-
*/
|
|
95
|
-
export declare function resolveMagitStorageTokenEnv(): string;
|
|
96
171
|
/**
|
|
97
172
|
* Magit is on by default when durable Mongo is configured (platform gates that).
|
|
98
173
|
* Set METADATA_MAGIT=0 / false / off to disable.
|
|
99
174
|
*/
|
|
100
175
|
export declare function isMetadataMagitEnabled(): boolean;
|
|
176
|
+
/**
|
|
177
|
+
* `MAGIT_REPO_ROOT` is the parent of each repo's LOCAL working checkout / cache
|
|
178
|
+
* (per-org live-history repos and the shared package catalog repo alike). It is
|
|
179
|
+
* demoted, not removed, by the central-catalog cutover (X12-65): it no longer
|
|
180
|
+
* doubles as the catalog — that is central storage, bound via `storageTenant`
|
|
181
|
+
* (see `resolveMagitCatalogTenant`). This directory can be wiped and
|
|
182
|
+
* re-bootstrapped from central storage without data loss.
|
|
183
|
+
*/
|
|
101
184
|
export declare function resolveMagitRepoRootParent(): string;
|
|
185
|
+
/**
|
|
186
|
+
* Central Magit package-catalog tenant (FR-CPS-1). This is a fixed
|
|
187
|
+
* developer/solution scope for Memorix's own package storage — it must NEVER
|
|
188
|
+
* be a runtime `orgId`. Org only appears as a Restore install target, never as
|
|
189
|
+
* the catalog key. Default `"memorix"`.
|
|
190
|
+
*/
|
|
191
|
+
export declare function resolveMagitCatalogTenant(): string;
|
|
192
|
+
/**
|
|
193
|
+
* Magit storage repo id for the central package catalog (FR-CPS). Defaults to
|
|
194
|
+
* `memorix-metadata-_package-catalog`. Override with MAGIT_CATALOG_REPO when the
|
|
195
|
+
* Authix token only grants a specific repo (e.g. `demo`).
|
|
196
|
+
*/
|
|
197
|
+
export declare function resolveMagitCatalogRepoName(): string;
|
|
198
|
+
/**
|
|
199
|
+
* Env var *name* Magit uses to load the central-storage bearer token.
|
|
200
|
+
* Priority: MAGIT_STORAGE_TOKEN_ENV (explicit name) → AUTHIX_TOKEN if set → MAGIT_TOKEN.
|
|
201
|
+
*/
|
|
202
|
+
export declare function resolveMagitStorageTokenEnv(): string;
|
|
203
|
+
/**
|
|
204
|
+
* Magit 2.10 typed global store binding.
|
|
205
|
+
* - both MAGIT_PACKAGE_STORE_SELECTOR + MAGIT_PACKAGE_TYPE_ID → store path
|
|
206
|
+
* - neither → flat catalog (2.9 compatible)
|
|
207
|
+
* - only one set → fail closed (never half-use store APIs)
|
|
208
|
+
*/
|
|
209
|
+
export declare function resolveMagitTypedStoreConfig(): MagitTypedStoreConfig | null;
|
|
210
|
+
/** Whether store env is configured (yes/no only — never selector values). */
|
|
211
|
+
export declare function magitTypedStoreConfigured(): boolean;
|
|
212
|
+
/** Whether MAGIT_PACKAGE_TYPE_ID is set (safe to report; not a capability secret). */
|
|
213
|
+
export declare function magitPackageTypeIdConfigured(): boolean;
|
|
214
|
+
/** Whether MAGIT_PACKAGE_STORE_SELECTOR is set (yes/no only — never the value). */
|
|
215
|
+
export declare function magitStoreSelectorConfigured(): boolean;
|
|
216
|
+
/** Structure language id for diagnostics when set. Never the store selector. */
|
|
217
|
+
export declare function magitPackageTypeIdForDiagnostics(): string | null;
|
|
102
218
|
export declare class MagitPackService {
|
|
103
219
|
private readonly cfg;
|
|
104
220
|
private readonly ensured;
|
|
221
|
+
private catalogHealth;
|
|
105
222
|
constructor(cfg: MagitPackServiceConfig);
|
|
223
|
+
/** Last-observed central package-catalog reachability (task 5 diagnostics). */
|
|
224
|
+
catalogHealthStatus(): MagitCatalogHealth;
|
|
106
225
|
private progress;
|
|
107
|
-
private storageTokenEnvName;
|
|
108
|
-
private storageUrl;
|
|
109
|
-
/** True when Authix/Magit token is present for remote catalog push/pull. */
|
|
110
|
-
hasRemoteCatalog(): boolean;
|
|
111
226
|
repoRootFor(orgId: string): string;
|
|
112
|
-
catalogRepoRoot(): string;
|
|
113
227
|
ensureRepo(orgId: string): Promise<void>;
|
|
114
|
-
/** Dedicated Magit root for org-free package catalog (`packages/`). */
|
|
115
|
-
ensureCatalogRepo(): Promise<void>;
|
|
116
|
-
private ensureRepoInternal;
|
|
117
228
|
/**
|
|
118
|
-
*
|
|
119
|
-
*
|
|
229
|
+
* Open the shared central package-catalog repo (org-free). Opening the
|
|
230
|
+
* LOCAL repo directory can succeed even when central storage itself is
|
|
231
|
+
* unreachable (`repo.init` only warns on a failed remote bootstrap by
|
|
232
|
+
* default — see `strictRemote` — and `magit.open` is a local-only call), so
|
|
233
|
+
* this deliberately does NOT mark catalogHealth reachable; only an actual
|
|
234
|
+
* round-trip (pull/pack/list/fetch) that completes should do that.
|
|
120
235
|
*/
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}>;
|
|
131
|
-
/** Pack a MetadataPack into Magit packages/ (does not change live metadata). */
|
|
132
|
-
packCatalogPackage(input: {
|
|
236
|
+
private ensureCatalogRepo;
|
|
237
|
+
/**
|
|
238
|
+
* Pack a payload into the central catalog (FR-CPS-4), or into the typed
|
|
239
|
+
* global store when MAGIT_PACKAGE_STORE_SELECTOR + MAGIT_PACKAGE_TYPE_ID are set.
|
|
240
|
+
*
|
|
241
|
+
* Flat: pull then packPackageFR without selector.
|
|
242
|
+
* Store: packPackageFR with selector/type/kind/publisher; do not full-tree pull.
|
|
243
|
+
*/
|
|
244
|
+
packPackage(opts: {
|
|
133
245
|
kind: PackageKind;
|
|
134
246
|
id: string;
|
|
135
247
|
message: string;
|
|
136
248
|
pack: MetadataPack;
|
|
137
|
-
mode?: PackageMode;
|
|
138
249
|
associations?: PackageAssociations;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
250
|
+
mode?: PackageMode;
|
|
251
|
+
pins?: CatalogPackageRef[];
|
|
252
|
+
actor?: PackageActor;
|
|
253
|
+
}): Promise<PackedPackageResult>;
|
|
254
|
+
/**
|
|
255
|
+
* List packages — flat catalog or store-scoped list (kind required on store path).
|
|
256
|
+
* Org-free: kind + id only; never a store selector from the client.
|
|
257
|
+
*/
|
|
258
|
+
listPackages(filter?: {
|
|
143
259
|
kind?: PackageKind;
|
|
144
260
|
id?: string;
|
|
145
261
|
maxCount?: number;
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
262
|
+
publisher?: string;
|
|
263
|
+
}): Promise<CatalogPackageListItem[]>;
|
|
264
|
+
/**
|
|
265
|
+
* Fetch a package version WITH its payload.
|
|
266
|
+
* Flat: full pull + fetchPackageFR(ref).
|
|
267
|
+
* Store: pullStore + fetchPackageFR({ storeSelector, packageTypeId, kind, id, version }).
|
|
268
|
+
* Restore remains product-side (install after fetch) — no Magit store restore.
|
|
269
|
+
*/
|
|
270
|
+
fetchPackage(ref: CatalogPackageRef): Promise<FetchedCatalogPackage>;
|
|
271
|
+
/**
|
|
272
|
+
* Compare two package versions (or a version vs live/installed).
|
|
273
|
+
*
|
|
274
|
+
* Mode A (typed store): package versions are immutable store payloads, not
|
|
275
|
+
* catalog-repo commits. Fetch both refs (or accept an installed pack for the
|
|
276
|
+
* installed/live sentinel) and produce a record-level PackDiffResult.
|
|
277
|
+
*
|
|
278
|
+
* Mode B (flat FR-CPS): reuses the org-scoped commit diff against the
|
|
279
|
+
* catalog local repo. `sliceAgentId` is the catalog-internal record grouping
|
|
280
|
+
* packPackage embeds, not a runtime org.
|
|
281
|
+
*/
|
|
282
|
+
diffPackages(sliceAgentId: string, opts: {
|
|
283
|
+
from: string;
|
|
284
|
+
to: string;
|
|
285
|
+
kind?: PackageKind;
|
|
286
|
+
id?: string;
|
|
287
|
+
/** Required when either side is "live"/"installed" and typed store is on. */
|
|
288
|
+
installedPack?: MetadataPack | null;
|
|
289
|
+
}): Promise<PackDiffResult>;
|
|
161
290
|
saveVersion(orgId: string, pack: MetadataPack, opts: {
|
|
162
291
|
message: string;
|
|
163
292
|
actor?: MagitActor;
|
|
@@ -242,6 +371,59 @@ export declare class MagitPackService {
|
|
|
242
371
|
private seedAgentsCollectionCommit;
|
|
243
372
|
private ensureMongoEnv;
|
|
244
373
|
private mapError;
|
|
374
|
+
/**
|
|
375
|
+
* Provision a typed global package store (create + pushStore + verify).
|
|
376
|
+
* Returns the selector EXACTLY ONCE — caller must write it to a secret store.
|
|
377
|
+
* Duplicate packageTypeId stores abort unless force=true.
|
|
378
|
+
*/
|
|
379
|
+
provisionTypedPackageStore(opts?: {
|
|
380
|
+
packageTypeId?: string;
|
|
381
|
+
allowedKinds?: string[];
|
|
382
|
+
force?: boolean;
|
|
383
|
+
}): Promise<{
|
|
384
|
+
storeId: string;
|
|
385
|
+
storeSelector: string;
|
|
386
|
+
packageTypeId: string;
|
|
387
|
+
pushed: {
|
|
388
|
+
uploaded: number;
|
|
389
|
+
skipped: number;
|
|
390
|
+
};
|
|
391
|
+
existingStoreCount: number;
|
|
392
|
+
}>;
|
|
393
|
+
/**
|
|
394
|
+
* Verify configured catalog reachability (typed store via pullStore, or flat pull).
|
|
395
|
+
* Never prints selector/token values.
|
|
396
|
+
*/
|
|
397
|
+
verifyTypedPackageStore(): Promise<{
|
|
398
|
+
ok: true;
|
|
399
|
+
mode: "typed-store" | "flat";
|
|
400
|
+
packageTypeId: string | null;
|
|
401
|
+
reachable: true;
|
|
402
|
+
}>;
|
|
403
|
+
/**
|
|
404
|
+
* Owner recovery: mint a new selector for an existing storeId, then pushStore.
|
|
405
|
+
* The new selector is returned ONCE. storeId is sensitive — operators only.
|
|
406
|
+
*/
|
|
407
|
+
recoverStoreSelector(opts: {
|
|
408
|
+
storeId: string;
|
|
409
|
+
}): Promise<{
|
|
410
|
+
storeId: string;
|
|
411
|
+
storeSelector: string;
|
|
412
|
+
packageTypeId: string;
|
|
413
|
+
pushed: {
|
|
414
|
+
uploaded: number;
|
|
415
|
+
skipped: number;
|
|
416
|
+
};
|
|
417
|
+
}>;
|
|
418
|
+
/**
|
|
419
|
+
* Owner inventory of stores (metadata only — never selectors).
|
|
420
|
+
*/
|
|
421
|
+
listPackageStores(): Promise<Array<{
|
|
422
|
+
storeId: string;
|
|
423
|
+
packageTypeId: string;
|
|
424
|
+
allowedKinds: string[];
|
|
425
|
+
createdAt: string;
|
|
426
|
+
}>>;
|
|
245
427
|
}
|
|
246
428
|
export declare function createMagitPackService(cfg: MagitPackServiceConfig): MagitPackService;
|
|
247
429
|
//# sourceMappingURL=magit-pack-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"magit-pack-service.d.ts","sourceRoot":"","sources":["../../src/magit/magit-pack-service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"magit-pack-service.d.ts","sourceRoot":"","sources":["../../src/magit/magit-pack-service.ts"],"names":[],"mappings":"AAaA,OAAO,EAOL,KAAK,WAAW,IAAI,gBAAgB,EACrC,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAO3D,OAAO,EAWL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,mBAAmB,EACnB,WAAW,EACX,WAAW,EACZ,MAAM,6BAA6B,CAAC;AAIrC,MAAM,MAAM,UAAU,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAahE,MAAM,MAAM,YAAY,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3D;;qDAEqD;AACrD,MAAM,MAAM,mBAAmB,GAAG;IAAE,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAMrF,MAAM,MAAM,iBAAiB,GAAG;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAExF;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,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