@hasna/instructions 0.6.1 → 0.7.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 +123 -6
- package/dist/chunks/{apply-ynfn1av7.js → apply-7svah2qm.js} +5 -3
- package/dist/chunks/{apply-sfzja1f3.js → apply-jp13sa1e.js} +6 -3
- package/dist/chunks/database-wstmr56z.js +23 -0
- package/dist/chunks/{index-85n5wnd8.js → index-1cnyjnd7.js} +5 -7
- package/dist/chunks/{index-pkscjnj5.js → index-3djthcm6.js} +0 -1
- package/dist/chunks/{index-v7dkb384.js → index-4pfq42t5.js} +129 -77
- package/dist/chunks/index-5d7zdftc.js +186 -0
- package/dist/chunks/{index-1hpwskwd.js → index-7m4j8a33.js} +205 -329
- package/dist/chunks/index-8rb7ng2y.js +148 -0
- package/dist/chunks/index-arrrx0ed.js +344 -0
- package/dist/chunks/{index-9p9gn7gh.js → index-bzyxvwcd.js} +5 -7
- package/dist/chunks/index-fpeyzn3n.js +186 -0
- package/dist/chunks/{index-axhwg61p.js → index-fwbs6tma.js} +15 -4
- package/dist/chunks/index-n3fjspr0.js +119 -0
- package/dist/chunks/{index-e9epbsvs.js → index-z3ma4aqk.js} +15 -4
- package/dist/chunks/legacy-store-migration-z2m5yzyk.js +322 -0
- package/dist/chunks/{local-a9nen65z.js → local-5wvv5xv3.js} +2 -2
- package/dist/chunks/{local-0d8qrc92.js → local-zxa5dpf4.js} +13 -188
- package/dist/chunks/s3-backup-n2z4fwyh.js +240 -0
- package/dist/chunks/s3-config-hhght91k.js +14 -0
- package/dist/chunks/s3-object-store-90tgbh6k.js +14 -0
- package/dist/chunks/{sync-m46fc257.js → sync-2075deve.js} +5 -4
- package/dist/chunks/{sync-vy1yjvs6.js → sync-r8t7zsp3.js} +4 -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 +1011 -247
- package/dist/data/config-store.d.ts +1 -0
- package/dist/data/config-store.d.ts.map +1 -1
- package/dist/index.js +840 -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 +1 -0
- 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 +31 -20
- package/dist/sdk/index.d.ts +2 -0
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +205 -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 +57 -0
- package/dist/sdk/v1-client.d.ts.map +1 -0
- package/dist/sdk/v1.generated.d.ts +212 -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 +1180 -432
- package/dist/server/openapi.d.ts +1264 -92
- 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 +57 -1
- 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 +725 -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 +65 -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 +22 -11
- package/assets/skills/inbox/SKILL.md +0 -86
package/dist/sdk/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
//
|
|
2
|
+
// ../../node_modules/.bun/@hasna+contracts@1.0.2+e8014c875821e0be/node_modules/@hasna/contracts/dist/client/transport.js
|
|
3
3
|
import { isIP } from "net";
|
|
4
4
|
import { spawnSync } from "child_process";
|
|
5
5
|
import { closeSync, fstatSync, openSync, readFileSync } from "fs";
|
|
@@ -756,14 +756,14 @@ class ApiError extends Error {
|
|
|
756
756
|
}
|
|
757
757
|
}
|
|
758
758
|
|
|
759
|
-
class
|
|
759
|
+
class GeneratedInstructionsV1Client {
|
|
760
760
|
baseUrl;
|
|
761
761
|
apiKey;
|
|
762
762
|
fetchImpl;
|
|
763
763
|
baseHeaders;
|
|
764
764
|
constructor(options) {
|
|
765
765
|
if (!options.baseUrl)
|
|
766
|
-
throw new Error("
|
|
766
|
+
throw new Error("GeneratedInstructionsV1Client requires a baseUrl.");
|
|
767
767
|
this.baseUrl = options.baseUrl.replace(/\/$/, "");
|
|
768
768
|
this.apiKey = options.apiKey;
|
|
769
769
|
this.fetchImpl = options.fetch ?? globalThis.fetch;
|
|
@@ -828,6 +828,13 @@ class InstructionsV1Client {
|
|
|
828
828
|
init
|
|
829
829
|
});
|
|
830
830
|
}
|
|
831
|
+
async putConfig(id, body, init) {
|
|
832
|
+
return this.request("PUT", `/v1/configs/${encodeURIComponent(String(id))}`, {
|
|
833
|
+
body,
|
|
834
|
+
query: undefined,
|
|
835
|
+
init
|
|
836
|
+
});
|
|
837
|
+
}
|
|
831
838
|
async deleteConfig(id, init) {
|
|
832
839
|
return this.request("DELETE", `/v1/configs/${encodeURIComponent(String(id))}`, {
|
|
833
840
|
body: undefined,
|
|
@@ -842,20 +849,62 @@ class InstructionsV1Client {
|
|
|
842
849
|
init
|
|
843
850
|
});
|
|
844
851
|
}
|
|
845
|
-
async listSnapshots(id, init) {
|
|
852
|
+
async listSnapshots(id, query, init) {
|
|
846
853
|
return this.request("GET", `/v1/configs/${encodeURIComponent(String(id))}/snapshots`, {
|
|
847
854
|
body: undefined,
|
|
848
|
-
query
|
|
855
|
+
query,
|
|
849
856
|
init
|
|
850
857
|
});
|
|
851
858
|
}
|
|
852
|
-
async createSnapshot(id, init) {
|
|
859
|
+
async createSnapshot(id, body, init) {
|
|
853
860
|
return this.request("POST", `/v1/configs/${encodeURIComponent(String(id))}/snapshots`, {
|
|
861
|
+
body,
|
|
862
|
+
query: undefined,
|
|
863
|
+
init
|
|
864
|
+
});
|
|
865
|
+
}
|
|
866
|
+
async pruneSnapshots(id, body, init) {
|
|
867
|
+
return this.request("POST", `/v1/configs/${encodeURIComponent(String(id))}/snapshots/prune`, {
|
|
868
|
+
body,
|
|
869
|
+
query: undefined,
|
|
870
|
+
init
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
async getSnapshotByVersion(id, version, init) {
|
|
874
|
+
return this.request("GET", `/v1/configs/${encodeURIComponent(String(id))}/snapshots/${encodeURIComponent(String(version))}`, {
|
|
854
875
|
body: undefined,
|
|
855
876
|
query: undefined,
|
|
856
877
|
init
|
|
857
878
|
});
|
|
858
879
|
}
|
|
880
|
+
async createFeedback(body, init) {
|
|
881
|
+
return this.request("POST", `/v1/feedback`, {
|
|
882
|
+
body,
|
|
883
|
+
query: undefined,
|
|
884
|
+
init
|
|
885
|
+
});
|
|
886
|
+
}
|
|
887
|
+
async listMachines(query, init) {
|
|
888
|
+
return this.request("GET", `/v1/machines`, {
|
|
889
|
+
body: undefined,
|
|
890
|
+
query,
|
|
891
|
+
init
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
async registerMachine(body, init) {
|
|
895
|
+
return this.request("POST", `/v1/machines`, {
|
|
896
|
+
body,
|
|
897
|
+
query: undefined,
|
|
898
|
+
init
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
async markMachineApplied(body, init) {
|
|
902
|
+
return this.request("POST", `/v1/machines/applied`, {
|
|
903
|
+
body,
|
|
904
|
+
query: undefined,
|
|
905
|
+
init
|
|
906
|
+
});
|
|
907
|
+
}
|
|
859
908
|
async listProfiles(query, init) {
|
|
860
909
|
return this.request("GET", `/v1/profiles`, {
|
|
861
910
|
body: undefined,
|
|
@@ -884,6 +933,13 @@ class InstructionsV1Client {
|
|
|
884
933
|
init
|
|
885
934
|
});
|
|
886
935
|
}
|
|
936
|
+
async putProfile(id, body, init) {
|
|
937
|
+
return this.request("PUT", `/v1/profiles/${encodeURIComponent(String(id))}`, {
|
|
938
|
+
body,
|
|
939
|
+
query: undefined,
|
|
940
|
+
init
|
|
941
|
+
});
|
|
942
|
+
}
|
|
887
943
|
async deleteProfile(id, init) {
|
|
888
944
|
return this.request("DELETE", `/v1/profiles/${encodeURIComponent(String(id))}`, {
|
|
889
945
|
body: undefined,
|
|
@@ -891,10 +947,17 @@ class InstructionsV1Client {
|
|
|
891
947
|
init
|
|
892
948
|
});
|
|
893
949
|
}
|
|
894
|
-
async
|
|
950
|
+
async updateProfile(id, body, init) {
|
|
951
|
+
return this.request("PATCH", `/v1/profiles/${encodeURIComponent(String(id))}`, {
|
|
952
|
+
body,
|
|
953
|
+
query: undefined,
|
|
954
|
+
init
|
|
955
|
+
});
|
|
956
|
+
}
|
|
957
|
+
async getProfileAssetBindings(id, query, init) {
|
|
895
958
|
return this.request("GET", `/v1/profiles/${encodeURIComponent(String(id))}/assets`, {
|
|
896
959
|
body: undefined,
|
|
897
|
-
query
|
|
960
|
+
query,
|
|
898
961
|
init
|
|
899
962
|
});
|
|
900
963
|
}
|
|
@@ -919,10 +982,10 @@ class InstructionsV1Client {
|
|
|
919
982
|
init
|
|
920
983
|
});
|
|
921
984
|
}
|
|
922
|
-
async getProfileConfigBindings(id, init) {
|
|
985
|
+
async getProfileConfigBindings(id, query, init) {
|
|
923
986
|
return this.request("GET", `/v1/profiles/${encodeURIComponent(String(id))}/bindings`, {
|
|
924
987
|
body: undefined,
|
|
925
|
-
query
|
|
988
|
+
query,
|
|
926
989
|
init
|
|
927
990
|
});
|
|
928
991
|
}
|
|
@@ -947,6 +1010,13 @@ class InstructionsV1Client {
|
|
|
947
1010
|
init
|
|
948
1011
|
});
|
|
949
1012
|
}
|
|
1013
|
+
async getSnapshot(id, init) {
|
|
1014
|
+
return this.request("GET", `/v1/snapshots/${encodeURIComponent(String(id))}`, {
|
|
1015
|
+
body: undefined,
|
|
1016
|
+
query: undefined,
|
|
1017
|
+
init
|
|
1018
|
+
});
|
|
1019
|
+
}
|
|
950
1020
|
async getStats(init) {
|
|
951
1021
|
return this.request("GET", `/v1/stats`, {
|
|
952
1022
|
body: undefined,
|
|
@@ -956,6 +1026,130 @@ class InstructionsV1Client {
|
|
|
956
1026
|
}
|
|
957
1027
|
}
|
|
958
1028
|
|
|
1029
|
+
// src/sdk/v1-client.ts
|
|
1030
|
+
var REQUEST_INIT_KEYS = new Set([
|
|
1031
|
+
"body",
|
|
1032
|
+
"cache",
|
|
1033
|
+
"credentials",
|
|
1034
|
+
"headers",
|
|
1035
|
+
"integrity",
|
|
1036
|
+
"keepalive",
|
|
1037
|
+
"method",
|
|
1038
|
+
"mode",
|
|
1039
|
+
"priority",
|
|
1040
|
+
"redirect",
|
|
1041
|
+
"referrer",
|
|
1042
|
+
"referrerPolicy",
|
|
1043
|
+
"signal",
|
|
1044
|
+
"window"
|
|
1045
|
+
]);
|
|
1046
|
+
function isRequestInit(value) {
|
|
1047
|
+
return Boolean(value && typeof value === "object" && !Array.isArray(value) && Object.keys(value).some((key) => REQUEST_INIT_KEYS.has(key)));
|
|
1048
|
+
}
|
|
1049
|
+
function positiveInteger(value, fallback) {
|
|
1050
|
+
return Number.isSafeInteger(value) && Number(value) >= 0 ? Number(value) : fallback;
|
|
1051
|
+
}
|
|
1052
|
+
function configIdentity(value) {
|
|
1053
|
+
return {
|
|
1054
|
+
id: String(value.id ?? ""),
|
|
1055
|
+
name: String(value.name ?? ""),
|
|
1056
|
+
slug: String(value.slug ?? ""),
|
|
1057
|
+
kind: String(value.kind ?? ""),
|
|
1058
|
+
category: String(value.category ?? ""),
|
|
1059
|
+
agent: String(value.agent ?? ""),
|
|
1060
|
+
format: String(value.format ?? ""),
|
|
1061
|
+
is_template: Boolean(value.is_template),
|
|
1062
|
+
version: Number(value.version ?? 0),
|
|
1063
|
+
created_at: String(value.created_at ?? ""),
|
|
1064
|
+
updated_at: String(value.updated_at ?? ""),
|
|
1065
|
+
synced_at: value.synced_at == null ? null : String(value.synced_at)
|
|
1066
|
+
};
|
|
1067
|
+
}
|
|
1068
|
+
function profileIdentity(value) {
|
|
1069
|
+
return {
|
|
1070
|
+
id: String(value.id ?? ""),
|
|
1071
|
+
name: String(value.name ?? ""),
|
|
1072
|
+
slug: String(value.slug ?? ""),
|
|
1073
|
+
created_at: String(value.created_at ?? ""),
|
|
1074
|
+
updated_at: String(value.updated_at ?? "")
|
|
1075
|
+
};
|
|
1076
|
+
}
|
|
1077
|
+
function normalizeLegacyPage(value, alias, query, project) {
|
|
1078
|
+
const record = value && typeof value === "object" ? value : {};
|
|
1079
|
+
if (Array.isArray(record.items))
|
|
1080
|
+
return value;
|
|
1081
|
+
const legacy = record[alias];
|
|
1082
|
+
if (!Array.isArray(legacy)) {
|
|
1083
|
+
throw new Error(`Instructions V1 ${alias} response is neither bounded nor a complete legacy array`);
|
|
1084
|
+
}
|
|
1085
|
+
const cursor = positiveInteger(query?.cursor, 0);
|
|
1086
|
+
const defaultLimit = Math.max(legacy.length, 1);
|
|
1087
|
+
const limit = Math.max(1, positiveInteger(query?.limit, defaultLimit));
|
|
1088
|
+
const source = legacy;
|
|
1089
|
+
const items = source.slice(cursor, cursor + limit).map((item) => project ? project(item) : item);
|
|
1090
|
+
const total = source.length;
|
|
1091
|
+
const consumed = cursor + items.length;
|
|
1092
|
+
const complete = consumed >= total;
|
|
1093
|
+
return {
|
|
1094
|
+
[alias]: items,
|
|
1095
|
+
items,
|
|
1096
|
+
count: items.length,
|
|
1097
|
+
total,
|
|
1098
|
+
limit,
|
|
1099
|
+
cursor,
|
|
1100
|
+
next_cursor: complete ? null : consumed,
|
|
1101
|
+
has_more: !complete,
|
|
1102
|
+
complete,
|
|
1103
|
+
truncated: false,
|
|
1104
|
+
source_bounded: false
|
|
1105
|
+
};
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
class InstructionsV1Client extends GeneratedInstructionsV1Client {
|
|
1109
|
+
constructor(options) {
|
|
1110
|
+
super(options);
|
|
1111
|
+
}
|
|
1112
|
+
async listConfigs(query, init) {
|
|
1113
|
+
const response = await super.listConfigs(query, init);
|
|
1114
|
+
return normalizeLegacyPage(response, "configs", query, query?.view === "identity" ? configIdentity : undefined);
|
|
1115
|
+
}
|
|
1116
|
+
async listProfiles(query, init) {
|
|
1117
|
+
const response = await super.listProfiles(query, init);
|
|
1118
|
+
return normalizeLegacyPage(response, "profiles", query, query?.view === "identity" ? profileIdentity : undefined);
|
|
1119
|
+
}
|
|
1120
|
+
async listMachines(query, init) {
|
|
1121
|
+
const response = await super.listMachines(query, init);
|
|
1122
|
+
return normalizeLegacyPage(response, "machines", query);
|
|
1123
|
+
}
|
|
1124
|
+
async getProfileConfigBindings(id, queryOrInit, init) {
|
|
1125
|
+
const legacyInit = isRequestInit(queryOrInit) && init === undefined;
|
|
1126
|
+
const query = legacyInit ? undefined : queryOrInit;
|
|
1127
|
+
const requestInit = legacyInit ? queryOrInit : init;
|
|
1128
|
+
const response = await super.getProfileConfigBindings(id, query, requestInit);
|
|
1129
|
+
return normalizeLegacyPage(response, "bindings", query);
|
|
1130
|
+
}
|
|
1131
|
+
async getProfileAssetBindings(id, queryOrInit, init) {
|
|
1132
|
+
const legacyInit = isRequestInit(queryOrInit) && init === undefined;
|
|
1133
|
+
const query = legacyInit ? undefined : queryOrInit;
|
|
1134
|
+
const requestInit = legacyInit ? queryOrInit : init;
|
|
1135
|
+
const response = await super.getProfileAssetBindings(id, query, requestInit);
|
|
1136
|
+
return normalizeLegacyPage(response, "assets", query);
|
|
1137
|
+
}
|
|
1138
|
+
async listSnapshots(id, queryOrInit, init) {
|
|
1139
|
+
const legacyInit = isRequestInit(queryOrInit) && init === undefined;
|
|
1140
|
+
const query = legacyInit ? undefined : queryOrInit;
|
|
1141
|
+
const requestInit = legacyInit ? queryOrInit : init;
|
|
1142
|
+
const response = await super.listSnapshots(id, query, requestInit);
|
|
1143
|
+
return normalizeLegacyPage(response, "snapshots", query);
|
|
1144
|
+
}
|
|
1145
|
+
async createSnapshot(id, bodyOrInit, init) {
|
|
1146
|
+
const legacyInit = isRequestInit(bodyOrInit) && init === undefined;
|
|
1147
|
+
const body = legacyInit ? undefined : bodyOrInit;
|
|
1148
|
+
const requestInit = legacyInit ? bodyOrInit : init;
|
|
1149
|
+
return super.createSnapshot(id, body, requestInit);
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
|
|
959
1153
|
// src/sdk/resolve.ts
|
|
960
1154
|
var INSTRUCTIONS_SDK_APP = "instructions";
|
|
961
1155
|
function stripV1(baseUrl) {
|
|
@@ -1038,5 +1232,6 @@ export {
|
|
|
1038
1232
|
createInstructionsV1ClientFromEnv,
|
|
1039
1233
|
InstructionsV1Client,
|
|
1040
1234
|
INSTRUCTIONS_SDK_APP,
|
|
1235
|
+
GeneratedInstructionsV1Client,
|
|
1041
1236
|
ApiError
|
|
1042
1237
|
};
|
package/dist/sdk/resolve.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InstructionsV1Client } from "./v1.
|
|
1
|
+
import { InstructionsV1Client } from "./v1-client.js";
|
|
2
2
|
/** The app slug the shared resolver resolves credentials and authority for. */
|
|
3
3
|
export declare const INSTRUCTIONS_SDK_APP = "instructions";
|
|
4
4
|
/** The Keychain-tier controls the SDK forwards to the resolver. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/sdk/resolve.ts"],"names":[],"mappings":"AA2CA,OAAO,EAAE,oBAAoB,EAAoC,MAAM,
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/sdk/resolve.ts"],"names":[],"mappings":"AA2CA,OAAO,EAAE,oBAAoB,EAAoC,MAAM,gBAAgB,CAAC;AAExF,+EAA+E;AAC/E,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AAUnD,mEAAmE;AACnE,MAAM,WAAW,8BAA8B;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,MAAM,CAAC;IACxB,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,KAAK;QAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9F;AAED,+CAA+C;AAC/C,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAEpE,6EAA6E;AAC7E,MAAM,WAAW,6BAA6B;IAC5C,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uFAAuF;IACvF,WAAW,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,8BAA8B,CAAA;KAAE,CAAC;IAC/F,iCAAiC;IACjC,GAAG,CAAC,EAAE,kBAAkB,CAAC;IACzB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED;;;;;GAKG;AACH,MAAM,WAAW,8BAA8B;IAC7C,yGAAyG;IACzG,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC;IAC1B,qEAAqE;IACrE,OAAO,EAAE,MAAM,CAAC;IAChB,0GAA0G;IAC1G,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,+GAA+G;IAC/G,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,2EAA2E;IAC3E,YAAY,EAAE,MAAM,CAAC;CACtB;AAgBD;;;;;;;;GAQG;AACH,wBAAgB,+BAA+B,CAC7C,OAAO,GAAE,6BAAkC,GAC1C,8BAA8B,CA6BhC;AAqBD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iCAAiC,CAC/C,OAAO,GAAE,6BAAkC,GAC1C,oBAAoB,CAmCtB"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { GeneratedInstructionsV1Client, type BoundedConfigIdentityPage, type BoundedConfigPage, type BoundedMachinePage, type BoundedProfileAssetBindingPage, type BoundedProfileConfigBindingPage, type BoundedProfileIdentityPage, type BoundedProfilePage, type BoundedSnapshotPage, type ConfigSnapshot, type GeneratedInstructionsV1ClientOptions } from "./v1.generated.js";
|
|
2
|
+
export type InstructionsV1ClientOptions = GeneratedInstructionsV1ClientOptions;
|
|
3
|
+
type ConfigListQuery = {
|
|
4
|
+
category?: string;
|
|
5
|
+
agent?: string;
|
|
6
|
+
kind?: string;
|
|
7
|
+
search?: string;
|
|
8
|
+
limit?: number;
|
|
9
|
+
cursor?: number;
|
|
10
|
+
view?: "identity";
|
|
11
|
+
};
|
|
12
|
+
type ProfileListQuery = {
|
|
13
|
+
limit?: number;
|
|
14
|
+
cursor?: number;
|
|
15
|
+
view?: "identity";
|
|
16
|
+
};
|
|
17
|
+
type MachineListQuery = {
|
|
18
|
+
limit?: number;
|
|
19
|
+
cursor?: number;
|
|
20
|
+
view?: "identity";
|
|
21
|
+
};
|
|
22
|
+
type SnapshotListQuery = {
|
|
23
|
+
limit?: number;
|
|
24
|
+
cursor?: number;
|
|
25
|
+
};
|
|
26
|
+
type BindingListQuery = {
|
|
27
|
+
limit?: number;
|
|
28
|
+
cursor?: number;
|
|
29
|
+
};
|
|
30
|
+
type SnapshotCreateBody = {
|
|
31
|
+
content?: string;
|
|
32
|
+
version?: number;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Generated `/v1` client with wire compatibility for the deployed 0.5 API and
|
|
36
|
+
* positional compatibility for the pre-0.7 snapshot methods.
|
|
37
|
+
*/
|
|
38
|
+
export declare class InstructionsV1Client extends GeneratedInstructionsV1Client {
|
|
39
|
+
constructor(options: GeneratedInstructionsV1ClientOptions);
|
|
40
|
+
listConfigs(query?: ConfigListQuery, init?: RequestInit): Promise<BoundedConfigPage | BoundedConfigIdentityPage>;
|
|
41
|
+
listProfiles(query?: ProfileListQuery, init?: RequestInit): Promise<BoundedProfilePage | BoundedProfileIdentityPage>;
|
|
42
|
+
listMachines(query?: MachineListQuery, init?: RequestInit): Promise<BoundedMachinePage>;
|
|
43
|
+
getProfileConfigBindings(id: string, init?: RequestInit): Promise<BoundedProfileConfigBindingPage>;
|
|
44
|
+
getProfileConfigBindings(id: string, query?: BindingListQuery, init?: RequestInit): Promise<BoundedProfileConfigBindingPage>;
|
|
45
|
+
getProfileAssetBindings(id: string, init?: RequestInit): Promise<BoundedProfileAssetBindingPage>;
|
|
46
|
+
getProfileAssetBindings(id: string, query?: BindingListQuery, init?: RequestInit): Promise<BoundedProfileAssetBindingPage>;
|
|
47
|
+
listSnapshots(id: string, init?: RequestInit): Promise<BoundedSnapshotPage>;
|
|
48
|
+
listSnapshots(id: string, query?: SnapshotListQuery, init?: RequestInit): Promise<BoundedSnapshotPage>;
|
|
49
|
+
createSnapshot(id: string, init?: RequestInit): Promise<{
|
|
50
|
+
snapshot?: ConfigSnapshot;
|
|
51
|
+
}>;
|
|
52
|
+
createSnapshot(id: string, body?: SnapshotCreateBody, init?: RequestInit): Promise<{
|
|
53
|
+
snapshot?: ConfigSnapshot;
|
|
54
|
+
}>;
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=v1-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v1-client.d.ts","sourceRoot":"","sources":["../../src/sdk/v1-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,8BAA8B,EACnC,KAAK,+BAA+B,EACpC,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EAExB,KAAK,cAAc,EACnB,KAAK,oCAAoC,EAE1C,MAAM,mBAAmB,CAAC;AAE3B,MAAM,MAAM,2BAA2B,GAAG,oCAAoC,CAAC;AAE/E,KAAK,eAAe,GAAG;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB,CAAC;AACF,KAAK,gBAAgB,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,UAAU,CAAA;CAAE,CAAC;AAC/E,KAAK,gBAAgB,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,M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