@hasna/instructions 0.6.1 → 0.7.1
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 +141 -10
- package/dist/chunks/{apply-ynfn1av7.js → apply-c3sd4agz.js} +5 -3
- package/dist/chunks/{apply-sfzja1f3.js → apply-pnn7a3y7.js} +6 -3
- package/dist/chunks/database-wstmr56z.js +23 -0
- package/dist/chunks/{index-pkscjnj5.js → index-3djthcm6.js} +0 -1
- package/dist/chunks/index-5d7zdftc.js +186 -0
- package/dist/chunks/{index-1hpwskwd.js → index-6jncnnw7.js} +318 -329
- package/dist/chunks/index-8rb7ng2y.js +148 -0
- package/dist/chunks/{index-v7dkb384.js → index-aj66f6xr.js} +243 -100
- package/dist/chunks/index-fpeyzn3n.js +186 -0
- package/dist/chunks/{index-9p9gn7gh.js → index-jg8ptcwh.js} +5 -7
- package/dist/chunks/index-mvckkf15.js +363 -0
- package/dist/chunks/index-n3fjspr0.js +119 -0
- package/dist/chunks/{index-85n5wnd8.js → index-pdpg8a44.js} +5 -7
- package/dist/chunks/{index-e9epbsvs.js → index-r7nfef2g.js} +15 -4
- package/dist/chunks/{index-axhwg61p.js → index-ypcef3a2.js} +15 -4
- package/dist/chunks/legacy-store-migration-z2m5yzyk.js +322 -0
- package/dist/chunks/{local-a9nen65z.js → local-0a9gja58.js} +142 -2
- package/dist/chunks/{local-0d8qrc92.js → local-969ye538.js} +153 -188
- package/dist/chunks/s3-backup-hxe3zpfz.js +240 -0
- package/dist/chunks/s3-config-hhght91k.js +14 -0
- package/dist/chunks/s3-object-store-n0s82swt.js +14 -0
- package/dist/chunks/{sync-vy1yjvs6.js → sync-q5hvwq6e.js} +4 -4
- package/dist/chunks/{sync-m46fc257.js → sync-xtkbm5br.js} +5 -4
- package/dist/chunks/{template-02wjvv05.js → template-fsfxpe4p.js} +1 -1
- package/dist/chunks/{template-ke972qqe.js → template-wgnzdn7h.js} +1 -1
- package/dist/cli/index.js +1236 -256
- package/dist/data/config-store.d.ts +10 -1
- package/dist/data/config-store.d.ts.map +1 -1
- package/dist/db/configs.d.ts +4 -1
- package/dist/db/configs.d.ts.map +1 -1
- package/dist/db/local.d.ts +1 -1
- package/dist/db/local.d.ts.map +1 -1
- package/dist/index.js +1086 -215
- package/dist/lib/apply.d.ts +7 -0
- package/dist/lib/apply.d.ts.map +1 -1
- package/dist/lib/compact-output.d.ts +3 -18
- package/dist/lib/compact-output.d.ts.map +1 -1
- package/dist/lib/export.d.ts +22 -3
- package/dist/lib/export.d.ts.map +1 -1
- package/dist/lib/import.d.ts +18 -0
- package/dist/lib/import.d.ts.map +1 -1
- package/dist/lib/legacy-store-migration.d.ts +39 -0
- package/dist/lib/legacy-store-migration.d.ts.map +1 -0
- package/dist/lib/managed-skill-runtimes.d.ts +1 -0
- package/dist/lib/managed-skill-runtimes.d.ts.map +1 -1
- package/dist/lib/sync-dir.d.ts.map +1 -1
- package/dist/mcp/index.js +41 -30
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/sdk/index.d.ts +2 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +229 -10
- package/dist/sdk/resolve.d.ts +1 -1
- package/dist/sdk/resolve.d.ts.map +1 -1
- package/dist/sdk/v1-client.d.ts +58 -0
- package/dist/sdk/v1-client.d.ts.map +1 -0
- package/dist/sdk/v1.generated.d.ts +242 -21
- package/dist/sdk/v1.generated.d.ts.map +1 -1
- package/dist/server/cloud.d.ts.map +1 -1
- package/dist/server/index.d.ts +13 -5
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +1261 -427
- package/dist/server/openapi.d.ts +1379 -93
- package/dist/server/openapi.d.ts.map +1 -1
- package/dist/server/v1.d.ts +25 -1
- package/dist/server/v1.d.ts.map +1 -1
- package/dist/storage/cloud-store.d.ts +45 -2
- package/dist/storage/cloud-store.d.ts.map +1 -1
- package/dist/storage/index.d.ts +7 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +744 -0
- package/dist/storage/s3-backup.d.ts +76 -0
- package/dist/storage/s3-backup.d.ts.map +1 -0
- package/dist/storage/s3-config.d.ts +46 -0
- package/dist/storage/s3-config.d.ts.map +1 -0
- package/dist/storage/s3-object-store.d.ts +70 -0
- package/dist/storage/s3-object-store.d.ts.map +1 -0
- package/dist/types/index.d.ts +98 -3
- package/dist/types/index.d.ts.map +1 -1
- package/hasna.contract.json +110 -0
- package/migrations/0001_instructions.sql +63 -0
- package/migrations/0002_api_keys.sql +20 -0
- package/migrations/0003_idempotency_receipts.sql +24 -0
- package/package.json +24 -13
- package/assets/skills/inbox/SKILL.md +0 -86
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../src/server/openapi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../src/server/openapi.ts"],"names":[],"mappings":"AAgKA,wBAAgB,sBAAsB,CAAC,OAAO,SAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAu2BnE"}
|
package/dist/server/v1.d.ts
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Versioned `/v1` HTTP API for `instructions-serve` (A1 pure-remote).
|
|
3
|
+
*
|
|
4
|
+
* Every handler goes through the vendored storage kit client (`getCloudClient`)
|
|
5
|
+
* which reads/writes the shared RDS directly. Auth is enforced by the contracts
|
|
6
|
+
* API-key verifier: reads require `instructions:read`, writes require
|
|
7
|
+
* `instructions:write` (an `instructions:*` key satisfies both). This is a real
|
|
8
|
+
* wrapper over the configs/profiles store — there are NO stubs; unknown routes
|
|
9
|
+
* 404 and unimplemented operations throw a clear error.
|
|
10
|
+
*/
|
|
11
|
+
import type { ApiKeyPrincipal } from "@hasna/contracts/auth";
|
|
12
|
+
export declare const MAX_REQUEST_BODY_BYTES: number;
|
|
13
|
+
export declare const MAX_SEARCH_QUERY_CHARS = 512;
|
|
14
|
+
export declare const MAX_IDEMPOTENCY_KEY_CHARS = 255;
|
|
15
|
+
export declare class HttpInputError extends Error {
|
|
16
|
+
readonly status: 400 | 413;
|
|
17
|
+
readonly code: "REQUEST_BODY_TOO_LARGE" | "SEARCH_QUERY_TOO_LONG" | "INVALID_IDEMPOTENCY_KEY";
|
|
18
|
+
constructor(status: 400 | 413, code: "REQUEST_BODY_TOO_LARGE" | "SEARCH_QUERY_TOO_LONG" | "INVALID_IDEMPOTENCY_KEY", message: string);
|
|
19
|
+
}
|
|
20
|
+
export interface V1RequestContext {
|
|
21
|
+
principal?: ApiKeyPrincipal;
|
|
22
|
+
}
|
|
23
|
+
export declare function readJson<T>(req: Request): Promise<T | null>;
|
|
24
|
+
export declare function boundedSearchQuery(value: string | null): string | undefined;
|
|
1
25
|
/**
|
|
2
26
|
* Handle a `/v1/*` request. Authentication + read/write scope enforcement is
|
|
3
27
|
* performed UPSTREAM by the contracts `honoApiKey` middleware (see
|
|
@@ -5,5 +29,5 @@
|
|
|
5
29
|
* Returns `null` when the path is not a `/v1` route so the caller can fall
|
|
6
30
|
* through to other handlers.
|
|
7
31
|
*/
|
|
8
|
-
export declare function handleV1Request(req: Request, url: URL): Promise<Response | null>;
|
|
32
|
+
export declare function handleV1Request(req: Request, url: URL, context?: V1RequestContext): Promise<Response | null>;
|
|
9
33
|
//# sourceMappingURL=v1.d.ts.map
|
package/dist/server/v1.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../src/server/v1.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../src/server/v1.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAM7D,eAAO,MAAM,sBAAsB,QAAc,CAAC;AAClD,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C,qBAAa,cAAe,SAAQ,KAAK;IAErC,QAAQ,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG;IAC1B,QAAQ,CAAC,IAAI,EAAE,wBAAwB,GAAG,uBAAuB,GAAG,yBAAyB;gBADpF,MAAM,EAAE,GAAG,GAAG,GAAG,EACjB,IAAI,EAAE,wBAAwB,GAAG,uBAAuB,GAAG,yBAAyB,EAC7F,OAAO,EAAE,MAAM;CAKlB;AAUD,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,eAAe,CAAC;CAC7B;AA0DD,wBAAsB,QAAQ,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAwCjE;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAM3E;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,GAAG,EACR,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CA0V1B"}
|
|
@@ -1,6 +1,35 @@
|
|
|
1
1
|
import type { TypedQueryClient } from "../generated/storage-kit/index.js";
|
|
2
|
-
import { type Config, type ConfigFilter, type ConfigSnapshot, type CreateConfigInput, type CreateProfileInput, type Machine, type Profile, type BoundedReadOptions, type BoundedReadPage, type ProfileResolutionRead, type UpdateConfigInput, type UpdateProfileInput, type ProfileConfigBinding, type ProfileConfigBindingSpec, type ProfileAssetBinding, type ProfileAssetBindingSpec } from "../types/index.js";
|
|
2
|
+
import { type Config, type ConfigFilter, type ConfigSummary, type ConfigIdentity, type ConfigSnapshot, type CreateConfigInput, type CreateProfileInput, type Machine, type Profile, type BoundedReadOptions, type BoundedReadPage, type ProfileResolutionRead, type UpdateConfigInput, type UpdateProfileInput, type ProfileConfigBinding, type ProfileConfigBindingSpec, type ProfileAssetBinding, type ProfileAssetBindingSpec } from "../types/index.js";
|
|
3
|
+
export declare class StoreValidationError extends Error {
|
|
4
|
+
readonly code: "NAME_REQUIRED" | "CATEGORY_REQUIRED";
|
|
5
|
+
constructor(message: string, code: "NAME_REQUIRED" | "CATEGORY_REQUIRED");
|
|
6
|
+
}
|
|
7
|
+
export declare class IdempotencyConflictError extends Error {
|
|
8
|
+
readonly code: "IDEMPOTENCY_KEY_REUSED";
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
|
11
|
+
export interface IdempotentRequestInput {
|
|
12
|
+
principal: string;
|
|
13
|
+
operation: string;
|
|
14
|
+
key: string;
|
|
15
|
+
body: unknown;
|
|
16
|
+
}
|
|
17
|
+
export interface IdempotentResponse<T> {
|
|
18
|
+
status: number;
|
|
19
|
+
body: T;
|
|
20
|
+
replayed: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare function idempotencyBodyDigest(body: unknown): string;
|
|
23
|
+
export declare function ensureIdempotencySchema(client: TypedQueryClient): Promise<void>;
|
|
24
|
+
export declare function executeIdempotentRequest<T>(client: TypedQueryClient, input: IdempotentRequestInput, perform: (client: TypedQueryClient) => Promise<{
|
|
25
|
+
status: number;
|
|
26
|
+
body: T;
|
|
27
|
+
}>): Promise<IdempotentResponse<T>>;
|
|
28
|
+
export declare function listConfigsPage(client: TypedQueryClient, filter?: ConfigFilter, options?: BoundedReadOptions): Promise<BoundedReadPage<Config>>;
|
|
3
29
|
export declare function listConfigs(client: TypedQueryClient, filter?: ConfigFilter): Promise<Config[]>;
|
|
30
|
+
export declare function listConfigSummariesPage(client: TypedQueryClient, filter?: ConfigFilter, options?: BoundedReadOptions): Promise<BoundedReadPage<ConfigSummary>>;
|
|
31
|
+
export declare function listConfigIdentitiesPage(client: TypedQueryClient, options?: BoundedReadOptions): Promise<BoundedReadPage<ConfigIdentity>>;
|
|
32
|
+
export declare function listConfigIdentitiesPage(client: TypedQueryClient, filter: ConfigFilter, options?: BoundedReadOptions): Promise<BoundedReadPage<ConfigIdentity>>;
|
|
4
33
|
export declare function getConfig(client: TypedQueryClient, idOrSlug: string): Promise<Config>;
|
|
5
34
|
export declare function createConfig(client: TypedQueryClient, input: CreateConfigInput): Promise<Config>;
|
|
6
35
|
export declare function updateConfig(client: TypedQueryClient, idOrSlug: string, input: UpdateConfigInput): Promise<Config>;
|
|
@@ -8,12 +37,21 @@ export declare function deleteConfig(client: TypedQueryClient, idOrSlug: string)
|
|
|
8
37
|
export declare function getConfigStats(client: TypedQueryClient): Promise<Record<string, number>>;
|
|
9
38
|
export declare function createSnapshot(client: TypedQueryClient, idOrSlug: string): Promise<ConfigSnapshot>;
|
|
10
39
|
export declare function createSnapshotContent(client: TypedQueryClient, idOrSlug: string, content: string, version: number): Promise<ConfigSnapshot>;
|
|
40
|
+
export declare function listSnapshotsPage(client: TypedQueryClient, idOrSlug: string, options?: BoundedReadOptions): Promise<BoundedReadPage<ConfigSnapshot>>;
|
|
11
41
|
export declare function listSnapshots(client: TypedQueryClient, idOrSlug: string): Promise<ConfigSnapshot[]>;
|
|
12
42
|
export declare function getSnapshotById(client: TypedQueryClient, snapshotId: string): Promise<ConfigSnapshot | null>;
|
|
13
43
|
export declare function getSnapshotByVersion(client: TypedQueryClient, idOrSlug: string, version: number): Promise<ConfigSnapshot | null>;
|
|
14
44
|
export declare function pruneSnapshots(client: TypedQueryClient, idOrSlug: string, keep?: number): Promise<number>;
|
|
15
45
|
export declare function listProfiles(client: TypedQueryClient): Promise<Profile[]>;
|
|
16
46
|
export declare function listProfilesPage(client: TypedQueryClient, options?: BoundedReadOptions): Promise<BoundedReadPage<Profile>>;
|
|
47
|
+
export interface ProfileIdentity {
|
|
48
|
+
id: string;
|
|
49
|
+
name: string;
|
|
50
|
+
slug: string;
|
|
51
|
+
created_at: string;
|
|
52
|
+
updated_at: string;
|
|
53
|
+
}
|
|
54
|
+
export declare function listProfileIdentitiesPage(client: TypedQueryClient, options?: BoundedReadOptions): Promise<BoundedReadPage<ProfileIdentity>>;
|
|
17
55
|
export declare function getProfile(client: TypedQueryClient, idOrSlug: string): Promise<Profile>;
|
|
18
56
|
export declare function getProfileConfigs(client: TypedQueryClient, idOrSlug: string): Promise<Config[]>;
|
|
19
57
|
export declare function getProfileConfigsPage(client: TypedQueryClient, idOrSlug: string, options?: BoundedReadOptions): Promise<BoundedReadPage<Config>>;
|
|
@@ -21,12 +59,14 @@ export declare function createProfile(client: TypedQueryClient, input: CreatePro
|
|
|
21
59
|
export declare function updateProfile(client: TypedQueryClient, idOrSlug: string, input: UpdateProfileInput): Promise<Profile>;
|
|
22
60
|
export declare function deleteProfile(client: TypedQueryClient, idOrSlug: string): Promise<void>;
|
|
23
61
|
export declare function addConfigToProfile(client: TypedQueryClient, profileIdOrSlug: string, configId: string): Promise<void>;
|
|
62
|
+
export declare function getProfileConfigBindingsPage(client: TypedQueryClient, profileIdOrSlug: string, options?: BoundedReadOptions): Promise<BoundedReadPage<ProfileConfigBinding>>;
|
|
24
63
|
export declare function getProfileConfigBindings(client: TypedQueryClient, profileIdOrSlug: string): Promise<ProfileConfigBinding[]>;
|
|
25
64
|
export declare function setProfileConfigBinding(client: TypedQueryClient, profileIdOrSlug: string, configId: string, binding: ProfileConfigBindingSpec): Promise<ProfileConfigBinding>;
|
|
26
65
|
export declare function removeConfigFromProfile(client: TypedQueryClient, profileIdOrSlug: string, configId: string): Promise<void>;
|
|
66
|
+
export declare function getProfileAssetBindingsPage(client: TypedQueryClient, profileIdOrSlug: string, options?: BoundedReadOptions): Promise<BoundedReadPage<ProfileAssetBinding>>;
|
|
67
|
+
export declare function getProfileAssetBindings(client: TypedQueryClient, profileIdOrSlug: string): Promise<ProfileAssetBinding[]>;
|
|
27
68
|
export declare function addAssetToProfile(client: TypedQueryClient, profileIdOrSlug: string, sourceConfigId: string, binding: ProfileAssetBindingSpec): Promise<ProfileAssetBinding>;
|
|
28
69
|
export declare function setProfileAssetBinding(client: TypedQueryClient, profileIdOrSlug: string, assetKey: string, binding: ProfileAssetBindingSpec): Promise<ProfileAssetBinding>;
|
|
29
|
-
export declare function getProfileAssetBindings(client: TypedQueryClient, profileIdOrSlug: string): Promise<ProfileAssetBinding[]>;
|
|
30
70
|
export declare function removeAssetFromProfile(client: TypedQueryClient, profileIdOrSlug: string, assetKey: string): Promise<void>;
|
|
31
71
|
export declare function resolveProfileForMachine(client: TypedQueryClient, machine: {
|
|
32
72
|
hostname?: string;
|
|
@@ -38,7 +78,10 @@ export declare function resolveProfileForMachineRead(client: TypedQueryClient, m
|
|
|
38
78
|
os?: string;
|
|
39
79
|
arch?: string;
|
|
40
80
|
}, options?: BoundedReadOptions): Promise<ProfileResolutionRead>;
|
|
81
|
+
export declare function listMachinesPage(client: TypedQueryClient, options?: BoundedReadOptions): Promise<BoundedReadPage<Machine>>;
|
|
41
82
|
export declare function listMachines(client: TypedQueryClient): Promise<Machine[]>;
|
|
83
|
+
export type MachineIdentity = Machine;
|
|
84
|
+
export declare function listMachineIdentitiesPage(client: TypedQueryClient, options?: BoundedReadOptions): Promise<BoundedReadPage<MachineIdentity>>;
|
|
42
85
|
export declare function registerMachine(client: TypedQueryClient, hostname: string, os: string | null, arch: string | null): Promise<Machine>;
|
|
43
86
|
export declare function updateMachineApplied(client: TypedQueryClient, hostname: string): Promise<void>;
|
|
44
87
|
export declare function insertFeedback(client: TypedQueryClient, input: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-store.d.ts","sourceRoot":"","sources":["../../src/storage/cloud-store.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAGL,KAAK,MAAM,EACX,KAAK,YAAY,EAEjB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,OAAO,EACZ,KAAK,OAAO,EAGZ,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC7B,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"cloud-store.d.ts","sourceRoot":"","sources":["../../src/storage/cloud-store.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAGL,KAAK,MAAM,EACX,KAAK,YAAY,EAEjB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,OAAO,EACZ,KAAK,OAAO,EAGZ,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,wBAA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AAM,GAAG,IAAI,CAAA;CAAE,GACnG,OAAO,CAAC,IAAI,CAAC,CAKf"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { INSTRUCTIONS_S3_ALIAS_ENV, INSTRUCTIONS_S3_ENV, loadInstructionsS3Config, normalizeInstructionsS3Prefix, } from "./s3-config.js";
|
|
2
|
+
export type { InstructionsS3Config, InstructionsS3Credentials, InstructionsS3Env, } from "./s3-config.js";
|
|
3
|
+
export { assertSafeInstructionsObjectKey, assertSafeInstructionsObjectVersionId, createInstructionsS3ObjectStore, memoryInstructionsObjectStore, } from "./s3-object-store.js";
|
|
4
|
+
export type { InstructionsNativeS3Client, InstructionsAtomicObjectStore, InstructionsConditionalCreateFetch, InstructionsNativeS3ClientFactory, InstructionsNativeS3File, InstructionsObjectCreateResult, InstructionsObjectMetadata, InstructionsObjectReadOptions, InstructionsObjectStore, InstructionsS3Fetch, InstructionsS3OperationDeadlines, } from "./s3-object-store.js";
|
|
5
|
+
export { INSTRUCTIONS_BACKUP_MANIFEST_SCHEMA, buildInstructionsBackupKeys, planInstructionsBackupPush, pullInstructionsBackup, pushInstructionsBackup, verifyInstructionsBackup, } from "./s3-backup.js";
|
|
6
|
+
export type { InstructionsBackupKeys, InstructionsBackupManifest, InstructionsBackupObjectVersions, InstructionsBackupPullResult, InstructionsBackupPushInput, InstructionsBackupPushPlan, InstructionsBackupPushResult, InstructionsBackupReadInput, InstructionsBackupVerification, } from "./s3-backup.js";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/storage/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,wBAAwB,EACxB,6BAA6B,GAC9B,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,oBAAoB,EACpB,yBAAyB,EACzB,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,+BAA+B,EAC/B,qCAAqC,EACrC,+BAA+B,EAC/B,6BAA6B,GAC9B,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,0BAA0B,EAC1B,6BAA6B,EAC7B,kCAAkC,EAClC,iCAAiC,EACjC,wBAAwB,EACxB,8BAA8B,EAC9B,0BAA0B,EAC1B,6BAA6B,EAC7B,uBAAuB,EACvB,mBAAmB,EACnB,gCAAgC,GACjC,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,mCAAmC,EACnC,2BAA2B,EAC3B,0BAA0B,EAC1B,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,sBAAsB,EACtB,0BAA0B,EAC1B,gCAAgC,EAChC,4BAA4B,EAC5B,2BAA2B,EAC3B,0BAA0B,EAC1B,4BAA4B,EAC5B,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,gBAAgB,CAAC"}
|