@hasna/skills 0.5.8 → 0.5.9
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/bin/index.js +310 -309
- package/bin/mcp.js +183 -181
- package/bin/migrate.js +4 -2
- package/bin/server.js +144 -123
- package/bin/worker.js +123 -121
- package/dist/admin-contract.js +8 -8
- package/dist/index.js +13 -11
- package/dist/sdk/amounts.d.ts +5 -0
- package/dist/sdk/governance-store.d.ts +2 -0
- package/dist/sdk/index.js +198 -164
- package/dist/sdk/runs.d.ts +1 -1
- package/dist/sdk/spend.d.ts +5 -2
- package/package.json +4 -2
- package/dist/cli/cli.test-utils.d.ts +0 -43
- package/dist/server/store-fixtures.d.ts +0 -31
package/dist/sdk/index.js
CHANGED
|
@@ -46,7 +46,7 @@ var __export = (target, all) => {
|
|
|
46
46
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
47
47
|
var __require = import.meta.require;
|
|
48
48
|
|
|
49
|
-
//
|
|
49
|
+
// ../../node_modules/.bun/@smithy+types@4.18.0/node_modules/@smithy/types/dist-cjs/index.js
|
|
50
50
|
var require_dist_cjs = __commonJS((exports) => {
|
|
51
51
|
var HttpAuthLocation;
|
|
52
52
|
(function(HttpAuthLocation2) {
|
|
@@ -137,7 +137,7 @@ var require_dist_cjs = __commonJS((exports) => {
|
|
|
137
137
|
exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig;
|
|
138
138
|
});
|
|
139
139
|
|
|
140
|
-
//
|
|
140
|
+
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js
|
|
141
141
|
var require_transport = __commonJS((exports) => {
|
|
142
142
|
var { SMITHY_CONTEXT_KEY } = require_dist_cjs();
|
|
143
143
|
var getSmithyContext = (context) => context[SMITHY_CONTEXT_KEY] || (context[SMITHY_CONTEXT_KEY] = {});
|
|
@@ -310,7 +310,7 @@ var require_transport = __commonJS((exports) => {
|
|
|
310
310
|
exports.toEndpointV1 = toEndpointV1;
|
|
311
311
|
});
|
|
312
312
|
|
|
313
|
-
//
|
|
313
|
+
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js
|
|
314
314
|
var require_schema = __commonJS((exports) => {
|
|
315
315
|
var { getSmithyContext, HttpResponse, toEndpointV1 } = require_transport();
|
|
316
316
|
var deref = (schemaRef) => {
|
|
@@ -979,7 +979,7 @@ var require_schema = __commonJS((exports) => {
|
|
|
979
979
|
exports.translateTraits = translateTraits;
|
|
980
980
|
});
|
|
981
981
|
|
|
982
|
-
//
|
|
982
|
+
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/submodules/client/index.js
|
|
983
983
|
var require_client = __commonJS((exports) => {
|
|
984
984
|
var { hasOwn: hasOwn2 } = require_transport();
|
|
985
985
|
var { getSmithyContext, normalizeProvider } = require_transport();
|
|
@@ -2059,7 +2059,7 @@ var require_client = __commonJS((exports) => {
|
|
|
2059
2059
|
exports.withBaseException = withBaseException;
|
|
2060
2060
|
});
|
|
2061
2061
|
|
|
2062
|
-
//
|
|
2062
|
+
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/submodules/config/index.js
|
|
2063
2063
|
var require_config = __commonJS((exports) => {
|
|
2064
2064
|
var { homedir } = __require("os");
|
|
2065
2065
|
var { sep, join: join3 } = __require("path");
|
|
@@ -2754,7 +2754,7 @@ var require_config = __commonJS((exports) => {
|
|
|
2754
2754
|
exports.resolveRegionConfig = resolveRegionConfig;
|
|
2755
2755
|
});
|
|
2756
2756
|
|
|
2757
|
-
//
|
|
2757
|
+
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js
|
|
2758
2758
|
var require_endpoints = __commonJS((exports) => {
|
|
2759
2759
|
var { CONFIG_PREFIX_SEPARATOR, booleanSelector, SelectorType, loadConfig } = require_config();
|
|
2760
2760
|
var { toEndpointV1, getSmithyContext, normalizeProvider, isValidHostLabel, hasOwn: hasOwn2 } = require_transport();
|
|
@@ -3568,7 +3568,7 @@ var require_endpoints = __commonJS((exports) => {
|
|
|
3568
3568
|
exports.resolveParams = resolveParams;
|
|
3569
3569
|
});
|
|
3570
3570
|
|
|
3571
|
-
//
|
|
3571
|
+
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js
|
|
3572
3572
|
var require_serde = __commonJS((exports) => {
|
|
3573
3573
|
var { createHmac: createHmac2, createHash: createHash2, getRandomValues } = __require("crypto");
|
|
3574
3574
|
var { hasOwn: hasOwn2, HttpResponse } = require_transport();
|
|
@@ -5209,7 +5209,7 @@ ${value}\r
|
|
|
5209
5209
|
exports.v4 = v4;
|
|
5210
5210
|
});
|
|
5211
5211
|
|
|
5212
|
-
//
|
|
5212
|
+
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.js
|
|
5213
5213
|
var require_checksum = __commonJS((exports) => {
|
|
5214
5214
|
var { createReadStream } = __require("fs");
|
|
5215
5215
|
var { Writable } = __require("stream");
|
|
@@ -5825,7 +5825,7 @@ var require_checksum = __commonJS((exports) => {
|
|
|
5825
5825
|
exports.readableStreamHasher = readableStreamHasher;
|
|
5826
5826
|
});
|
|
5827
5827
|
|
|
5828
|
-
//
|
|
5828
|
+
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js
|
|
5829
5829
|
var require_event_streams = __commonJS((exports) => {
|
|
5830
5830
|
var { Crc32 } = require_checksum();
|
|
5831
5831
|
var { hasOwn: hasOwn2 } = require_transport();
|
|
@@ -6717,7 +6717,7 @@ var require_event_streams = __commonJS((exports) => {
|
|
|
6717
6717
|
exports.universalEventStreamSerdeProvider = eventStreamSerdeProvider$1;
|
|
6718
6718
|
});
|
|
6719
6719
|
|
|
6720
|
-
//
|
|
6720
|
+
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js
|
|
6721
6721
|
var require_protocols = __commonJS((exports) => {
|
|
6722
6722
|
var { Uint8ArrayBlobAdapter, sdkStreamMixin, splitEvery, splitHeader, fromBase64, _parseEpochTimestamp, _parseRfc7231DateTime, _parseRfc3339DateTimeWithOffset, LazyJsonString, NumericValue, toUtf8, fromUtf8, generateIdempotencyToken, toBase64, dateToUtcString, quoteHeader } = require_serde();
|
|
6723
6723
|
var { HttpRequest, HttpResponse, hasOwn: hasOwn2, isValidHostname } = require_transport();
|
|
@@ -7721,7 +7721,7 @@ var require_protocols = __commonJS((exports) => {
|
|
|
7721
7721
|
exports.resolvedPath = resolvedPath;
|
|
7722
7722
|
});
|
|
7723
7723
|
|
|
7724
|
-
//
|
|
7724
|
+
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js
|
|
7725
7725
|
var require_retry = __commonJS((exports) => {
|
|
7726
7726
|
var { Readable } = __require("stream");
|
|
7727
7727
|
var { NoOpLogger, normalizeProvider } = require_client();
|
|
@@ -8521,7 +8521,7 @@ var require_retry = __commonJS((exports) => {
|
|
|
8521
8521
|
exports.retryMiddlewareOptions = retryMiddlewareOptions;
|
|
8522
8522
|
});
|
|
8523
8523
|
|
|
8524
|
-
//
|
|
8524
|
+
// ../../node_modules/.bun/@aws+lambda-invoke-store@0.3.0/node_modules/@aws/lambda-invoke-store/dist-cjs/invoke-store.js
|
|
8525
8525
|
var require_invoke_store = __commonJS((exports) => {
|
|
8526
8526
|
var PROTECTED_KEYS = {
|
|
8527
8527
|
REQUEST_ID: Symbol.for("_AWS_LAMBDA_REQUEST_ID"),
|
|
@@ -8650,7 +8650,7 @@ var require_invoke_store = __commonJS((exports) => {
|
|
|
8650
8650
|
exports.InvokeStoreBase = InvokeStoreBase;
|
|
8651
8651
|
});
|
|
8652
8652
|
|
|
8653
|
-
//
|
|
8653
|
+
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/index.js
|
|
8654
8654
|
var require_dist_cjs2 = __commonJS((exports) => {
|
|
8655
8655
|
var { getSmithyContext, hasOwn: hasOwn2 } = require_transport();
|
|
8656
8656
|
exports.getSmithyContext = getSmithyContext;
|
|
@@ -8978,7 +8978,7 @@ var require_dist_cjs2 = __commonJS((exports) => {
|
|
|
8978
8978
|
exports.setFeature = setFeature;
|
|
8979
8979
|
});
|
|
8980
8980
|
|
|
8981
|
-
//
|
|
8981
|
+
// ../../node_modules/.bun/bowser@2.14.1/node_modules/bowser/es5.js
|
|
8982
8982
|
var require_es5 = __commonJS((exports, module) => {
|
|
8983
8983
|
(function(e, t) {
|
|
8984
8984
|
typeof exports == "object" && typeof module == "object" ? module.exports = t() : typeof define == "function" && define.amd ? define([], t) : typeof exports == "object" ? exports.bowser = t() : e.bowser = t();
|
|
@@ -9818,7 +9818,7 @@ var require_es5 = __commonJS((exports, module) => {
|
|
|
9818
9818
|
});
|
|
9819
9819
|
});
|
|
9820
9820
|
|
|
9821
|
-
//
|
|
9821
|
+
// ../../node_modules/.bun/@aws-sdk+core@3.977.9/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js
|
|
9822
9822
|
var require_client2 = __commonJS((exports) => {
|
|
9823
9823
|
var { Retry, RETRY_MODES } = require_retry();
|
|
9824
9824
|
var { HttpRequest, parseUrl } = require_protocols();
|
|
@@ -10756,7 +10756,7 @@ More information can be found at: https://a.co/c895JFp`);
|
|
|
10756
10756
|
exports.userAgentMiddleware = userAgentMiddleware;
|
|
10757
10757
|
});
|
|
10758
10758
|
|
|
10759
|
-
//
|
|
10759
|
+
// ../../node_modules/.bun/@aws-sdk+checksums@3.1000.29/node_modules/@aws-sdk/checksums/dist-cjs/submodules/crc/index.js
|
|
10760
10760
|
var require_crc = __commonJS((exports) => {
|
|
10761
10761
|
var { Crc32, Crc32Js, Crc32Node } = require_checksum();
|
|
10762
10762
|
exports.Crc32 = Crc32;
|
|
@@ -10913,7 +10913,7 @@ var require_crc = __commonJS((exports) => {
|
|
|
10913
10913
|
exports.crc64NvmeCrtContainer = crc64NvmeCrtContainer;
|
|
10914
10914
|
});
|
|
10915
10915
|
|
|
10916
|
-
//
|
|
10916
|
+
// ../../node_modules/.bun/@smithy+signature-v4@5.7.3/node_modules/@smithy/signature-v4/dist-cjs/index.js
|
|
10917
10917
|
var require_dist_cjs3 = __commonJS((exports) => {
|
|
10918
10918
|
var { hasOwn: hasOwn2, fromUtf8, fromHex, toHex, toUint8Array: toUint8Array2, isArrayBuffer: isArrayBuffer2 } = require_serde();
|
|
10919
10919
|
var { normalizeProvider: normalizeProvider2 } = require_client();
|
|
@@ -11465,7 +11465,7 @@ ${toHex(hashedRequest)}`;
|
|
|
11465
11465
|
exports.signatureV4aContainer = signatureV4aContainer;
|
|
11466
11466
|
});
|
|
11467
11467
|
|
|
11468
|
-
//
|
|
11468
|
+
// ../../node_modules/.bun/@aws-sdk+signature-v4-multi-region@3.996.46/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js
|
|
11469
11469
|
var require_dist_cjs4 = __commonJS((exports) => {
|
|
11470
11470
|
var { SignatureV4, signatureV4aContainer } = require_dist_cjs3();
|
|
11471
11471
|
var signatureV4CrtContainer = {
|
|
@@ -11597,7 +11597,7 @@ var require_dist_cjs4 = __commonJS((exports) => {
|
|
|
11597
11597
|
exports.signatureV4CrtContainer = signatureV4CrtContainer;
|
|
11598
11598
|
});
|
|
11599
11599
|
|
|
11600
|
-
//
|
|
11600
|
+
// ../../node_modules/.bun/@aws-sdk+core@3.977.9/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js
|
|
11601
11601
|
var require_util = __commonJS((exports) => {
|
|
11602
11602
|
var { buildQueryString } = require_protocols();
|
|
11603
11603
|
var validate = (str) => typeof str === "string" && str.indexOf("arn:") === 0 && str.split(":").length >= 6;
|
|
@@ -11655,7 +11655,7 @@ var require_util = __commonJS((exports) => {
|
|
|
11655
11655
|
exports.validate = validate;
|
|
11656
11656
|
});
|
|
11657
11657
|
|
|
11658
|
-
//
|
|
11658
|
+
// ../../node_modules/.bun/@smithy+core@3.33.3/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js
|
|
11659
11659
|
var require_cbor = __commonJS((exports) => {
|
|
11660
11660
|
var { nv, NumericValue, calculateBodyLength, generateIdempotencyToken, fromBase64, _parseEpochTimestamp } = require_serde();
|
|
11661
11661
|
var { hasOwn: hasOwn2, getSmithyContext } = require_transport();
|
|
@@ -14105,7 +14105,7 @@ var require_cbor = __commonJS((exports) => {
|
|
|
14105
14105
|
exports.tagSymbol = tagSymbol;
|
|
14106
14106
|
});
|
|
14107
14107
|
|
|
14108
|
-
//
|
|
14108
|
+
// ../../node_modules/.bun/@aws-sdk+xml-builder@3.972.40/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js
|
|
14109
14109
|
var require_dist_cjs5 = __commonJS((exports) => {
|
|
14110
14110
|
var ATTR_ESCAPE_RE = /[&<>"]/g;
|
|
14111
14111
|
var ATTR_ESCAPE_MAP = {
|
|
@@ -14473,7 +14473,7 @@ var require_dist_cjs5 = __commonJS((exports) => {
|
|
|
14473
14473
|
exports.parseXML = parseXML;
|
|
14474
14474
|
});
|
|
14475
14475
|
|
|
14476
|
-
//
|
|
14476
|
+
// ../../node_modules/.bun/@aws-sdk+core@3.977.9/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js
|
|
14477
14477
|
var require_protocols2 = __commonJS((exports) => {
|
|
14478
14478
|
var { SmithyRpcV2CborProtocol, loadSmithyRpcV2CborErrorCode } = require_cbor();
|
|
14479
14479
|
var { TypeRegistry, NormalizedSchema, deref } = require_schema();
|
|
@@ -17314,7 +17314,7 @@ var require_protocols2 = __commonJS((exports) => {
|
|
|
17314
17314
|
exports.parseXmlErrorBody = parseXmlErrorBody;
|
|
17315
17315
|
});
|
|
17316
17316
|
|
|
17317
|
-
//
|
|
17317
|
+
// ../../node_modules/.bun/@aws-sdk+core@3.977.9/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js
|
|
17318
17318
|
var require_httpAuthSchemes = __commonJS((exports) => {
|
|
17319
17319
|
var { ProviderError, booleanSelector: booleanSelector2, SelectorType: SelectorType3, loadConfig } = require_config();
|
|
17320
17320
|
var { setCredentialFeature } = require_client2();
|
|
@@ -17644,7 +17644,7 @@ var require_httpAuthSchemes = __commonJS((exports) => {
|
|
|
17644
17644
|
exports.validateSigningProperties = validateSigningProperties;
|
|
17645
17645
|
});
|
|
17646
17646
|
|
|
17647
|
-
//
|
|
17647
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-env@3.972.70/node_modules/@aws-sdk/credential-provider-env/dist-es/fromEnv.js
|
|
17648
17648
|
var import_client8, import_config, ENV_KEY = "AWS_ACCESS_KEY_ID", ENV_SECRET = "AWS_SECRET_ACCESS_KEY", ENV_SESSION = "AWS_SESSION_TOKEN", ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION", ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE", ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID", fromEnv = (init) => async () => {
|
|
17649
17649
|
init?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");
|
|
17650
17650
|
const accessKeyId = process.env[ENV_KEY];
|
|
@@ -17672,7 +17672,7 @@ var init_fromEnv = __esm(() => {
|
|
|
17672
17672
|
import_config = __toESM(require_config(), 1);
|
|
17673
17673
|
});
|
|
17674
17674
|
|
|
17675
|
-
//
|
|
17675
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-env@3.972.70/node_modules/@aws-sdk/credential-provider-env/dist-es/index.js
|
|
17676
17676
|
var exports_dist_es = {};
|
|
17677
17677
|
__export(exports_dist_es, {
|
|
17678
17678
|
fromEnv: () => fromEnv,
|
|
@@ -17687,7 +17687,7 @@ var init_dist_es = __esm(() => {
|
|
|
17687
17687
|
init_fromEnv();
|
|
17688
17688
|
});
|
|
17689
17689
|
|
|
17690
|
-
//
|
|
17690
|
+
// ../../node_modules/.bun/@smithy+credential-provider-imds@4.5.2/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/ImdsCredentials.js
|
|
17691
17691
|
var isImdsCredentials = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.AccessKeyId === "string" && typeof arg.SecretAccessKey === "string" && typeof arg.Token === "string" && typeof arg.Expiration === "string", fromImdsCredentials = (creds) => ({
|
|
17692
17692
|
accessKeyId: creds.AccessKeyId,
|
|
17693
17693
|
secretAccessKey: creds.SecretAccessKey,
|
|
@@ -17696,14 +17696,14 @@ var isImdsCredentials = (arg) => Boolean(arg) && typeof arg === "object" && type
|
|
|
17696
17696
|
...creds.AccountId && { accountId: creds.AccountId }
|
|
17697
17697
|
});
|
|
17698
17698
|
|
|
17699
|
-
//
|
|
17699
|
+
// ../../node_modules/.bun/@smithy+credential-provider-imds@4.5.2/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/RemoteProviderInit.js
|
|
17700
17700
|
var DEFAULT_TIMEOUT = 1000, DEFAULT_MAX_RETRIES = 0, providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT }) => ({ maxRetries, timeout });
|
|
17701
17701
|
|
|
17702
|
-
//
|
|
17702
|
+
// ../../node_modules/.bun/@smithy+credential-provider-imds@4.5.2/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/node-http.js
|
|
17703
17703
|
import node_http from "http";
|
|
17704
17704
|
var init_node_http = () => {};
|
|
17705
17705
|
|
|
17706
|
-
//
|
|
17706
|
+
// ../../node_modules/.bun/@smithy+credential-provider-imds@4.5.2/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/httpRequest.js
|
|
17707
17707
|
function httpRequest(options) {
|
|
17708
17708
|
return new Promise((resolve, reject) => {
|
|
17709
17709
|
const req = node_http.request({
|
|
@@ -17743,7 +17743,7 @@ var init_httpRequest = __esm(() => {
|
|
|
17743
17743
|
import_config2 = __toESM(require_config(), 1);
|
|
17744
17744
|
});
|
|
17745
17745
|
|
|
17746
|
-
//
|
|
17746
|
+
// ../../node_modules/.bun/@smithy+credential-provider-imds@4.5.2/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/retry.js
|
|
17747
17747
|
var retry = (toRetry, maxRetries) => {
|
|
17748
17748
|
let promise = toRetry();
|
|
17749
17749
|
for (let i2 = 0;i2 < maxRetries; i2++) {
|
|
@@ -17752,7 +17752,7 @@ var retry = (toRetry, maxRetries) => {
|
|
|
17752
17752
|
return promise;
|
|
17753
17753
|
};
|
|
17754
17754
|
|
|
17755
|
-
//
|
|
17755
|
+
// ../../node_modules/.bun/@smithy+credential-provider-imds@4.5.2/node_modules/@smithy/credential-provider-imds/dist-es/fromContainerMetadata.js
|
|
17756
17756
|
var import_config3, ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI", ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI", ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN", fromContainerMetadata = (init = {}) => {
|
|
17757
17757
|
const { timeout, maxRetries } = providerConfigFromInit(init);
|
|
17758
17758
|
return () => retry(async () => {
|
|
@@ -17822,7 +17822,7 @@ var init_fromContainerMetadata = __esm(() => {
|
|
|
17822
17822
|
GREENGRASS_PROTOCOLS = new Set(["http:", "https:"]);
|
|
17823
17823
|
});
|
|
17824
17824
|
|
|
17825
|
-
//
|
|
17825
|
+
// ../../node_modules/.bun/@smithy+credential-provider-imds@4.5.2/node_modules/@smithy/credential-provider-imds/dist-es/error/InstanceMetadataV1FallbackError.js
|
|
17826
17826
|
var import_config4, InstanceMetadataV1FallbackError;
|
|
17827
17827
|
var init_InstanceMetadataV1FallbackError = __esm(() => {
|
|
17828
17828
|
import_config4 = __toESM(require_config(), 1);
|
|
@@ -17837,7 +17837,7 @@ var init_InstanceMetadataV1FallbackError = __esm(() => {
|
|
|
17837
17837
|
};
|
|
17838
17838
|
});
|
|
17839
17839
|
|
|
17840
|
-
//
|
|
17840
|
+
// ../../node_modules/.bun/@smithy+credential-provider-imds@4.5.2/node_modules/@smithy/credential-provider-imds/dist-es/config/Endpoint.js
|
|
17841
17841
|
var Endpoint;
|
|
17842
17842
|
var init_Endpoint = __esm(() => {
|
|
17843
17843
|
(function(Endpoint2) {
|
|
@@ -17846,7 +17846,7 @@ var init_Endpoint = __esm(() => {
|
|
|
17846
17846
|
})(Endpoint || (Endpoint = {}));
|
|
17847
17847
|
});
|
|
17848
17848
|
|
|
17849
|
-
//
|
|
17849
|
+
// ../../node_modules/.bun/@smithy+credential-provider-imds@4.5.2/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointConfigOptions.js
|
|
17850
17850
|
var ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT", CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint", ENDPOINT_CONFIG_OPTIONS;
|
|
17851
17851
|
var init_EndpointConfigOptions = __esm(() => {
|
|
17852
17852
|
ENDPOINT_CONFIG_OPTIONS = {
|
|
@@ -17856,7 +17856,7 @@ var init_EndpointConfigOptions = __esm(() => {
|
|
|
17856
17856
|
};
|
|
17857
17857
|
});
|
|
17858
17858
|
|
|
17859
|
-
//
|
|
17859
|
+
// ../../node_modules/.bun/@smithy+credential-provider-imds@4.5.2/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointMode.js
|
|
17860
17860
|
var EndpointMode;
|
|
17861
17861
|
var init_EndpointMode = __esm(() => {
|
|
17862
17862
|
(function(EndpointMode2) {
|
|
@@ -17865,7 +17865,7 @@ var init_EndpointMode = __esm(() => {
|
|
|
17865
17865
|
})(EndpointMode || (EndpointMode = {}));
|
|
17866
17866
|
});
|
|
17867
17867
|
|
|
17868
|
-
//
|
|
17868
|
+
// ../../node_modules/.bun/@smithy+credential-provider-imds@4.5.2/node_modules/@smithy/credential-provider-imds/dist-es/config/EndpointModeConfigOptions.js
|
|
17869
17869
|
var ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE", CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode", ENDPOINT_MODE_CONFIG_OPTIONS;
|
|
17870
17870
|
var init_EndpointModeConfigOptions = __esm(() => {
|
|
17871
17871
|
init_EndpointMode();
|
|
@@ -17876,7 +17876,7 @@ var init_EndpointModeConfigOptions = __esm(() => {
|
|
|
17876
17876
|
};
|
|
17877
17877
|
});
|
|
17878
17878
|
|
|
17879
|
-
//
|
|
17879
|
+
// ../../node_modules/.bun/@smithy+credential-provider-imds@4.5.2/node_modules/@smithy/credential-provider-imds/dist-es/utils/getInstanceMetadataEndpoint.js
|
|
17880
17880
|
var import_config5, import_protocols, getInstanceMetadataEndpoint = async () => import_protocols.parseUrl(await getFromEndpointConfig() || await getFromEndpointModeConfig()), getFromEndpointConfig = async () => import_config5.loadConfig(ENDPOINT_CONFIG_OPTIONS)(), getFromEndpointModeConfig = async () => {
|
|
17881
17881
|
const endpointMode = await import_config5.loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)();
|
|
17882
17882
|
switch (endpointMode) {
|
|
@@ -17897,7 +17897,7 @@ var init_getInstanceMetadataEndpoint = __esm(() => {
|
|
|
17897
17897
|
import_protocols = __toESM(require_protocols(), 1);
|
|
17898
17898
|
});
|
|
17899
17899
|
|
|
17900
|
-
//
|
|
17900
|
+
// ../../node_modules/.bun/@smithy+credential-provider-imds@4.5.2/node_modules/@smithy/credential-provider-imds/dist-es/utils/getExtendedInstanceMetadataCredentials.js
|
|
17901
17901
|
var STATIC_STABILITY_REFRESH_INTERVAL_SECONDS, STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS, STATIC_STABILITY_DOC_URL = "https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html", getExtendedInstanceMetadataCredentials = (credentials, logger) => {
|
|
17902
17902
|
const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS);
|
|
17903
17903
|
const newExpiration = new Date(Date.now() + refreshInterval * 1000);
|
|
@@ -17915,7 +17915,7 @@ var init_getExtendedInstanceMetadataCredentials = __esm(() => {
|
|
|
17915
17915
|
STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60;
|
|
17916
17916
|
});
|
|
17917
17917
|
|
|
17918
|
-
//
|
|
17918
|
+
// ../../node_modules/.bun/@smithy+credential-provider-imds@4.5.2/node_modules/@smithy/credential-provider-imds/dist-es/utils/staticStabilityProvider.js
|
|
17919
17919
|
var staticStabilityProvider = (provider, options = {}) => {
|
|
17920
17920
|
const logger = options?.logger || console;
|
|
17921
17921
|
let pastCredentials;
|
|
@@ -17942,7 +17942,7 @@ var init_staticStabilityProvider = __esm(() => {
|
|
|
17942
17942
|
init_getExtendedInstanceMetadataCredentials();
|
|
17943
17943
|
});
|
|
17944
17944
|
|
|
17945
|
-
//
|
|
17945
|
+
// ../../node_modules/.bun/@smithy+credential-provider-imds@4.5.2/node_modules/@smithy/credential-provider-imds/dist-es/fromInstanceMetadata.js
|
|
17946
17946
|
var import_config6, IMDS_PATH = "/latest/meta-data/iam/security-credentials/", IMDS_TOKEN_PATH = "/latest/api/token", AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED", PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled", X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token", fromInstanceMetadata = (init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger }), getInstanceMetadataProvider = (init = {}) => {
|
|
17947
17947
|
let disableFetchToken = false;
|
|
17948
17948
|
const { logger, profile } = init;
|
|
@@ -18062,7 +18062,7 @@ var init_fromInstanceMetadata = __esm(() => {
|
|
|
18062
18062
|
import_config6 = __toESM(require_config(), 1);
|
|
18063
18063
|
});
|
|
18064
18064
|
|
|
18065
|
-
//
|
|
18065
|
+
// ../../node_modules/.bun/@smithy+credential-provider-imds@4.5.2/node_modules/@smithy/credential-provider-imds/dist-es/index.js
|
|
18066
18066
|
var exports_dist_es2 = {};
|
|
18067
18067
|
__export(exports_dist_es2, {
|
|
18068
18068
|
providerConfigFromInit: () => providerConfigFromInit,
|
|
@@ -18085,7 +18085,7 @@ var init_dist_es2 = __esm(() => {
|
|
|
18085
18085
|
init_Endpoint();
|
|
18086
18086
|
});
|
|
18087
18087
|
|
|
18088
|
-
//
|
|
18088
|
+
// ../../node_modules/.bun/@smithy+node-http-handler@4.12.1/node_modules/@smithy/node-http-handler/dist-cjs/index.js
|
|
18089
18089
|
var require_dist_cjs6 = __commonJS((exports) => {
|
|
18090
18090
|
var { hasOwn: hasOwn2 } = require_serde();
|
|
18091
18091
|
var { streamCollector } = require_serde();
|
|
@@ -18911,7 +18911,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
18911
18911
|
exports.NodeHttpHandler = NodeHttpHandler;
|
|
18912
18912
|
});
|
|
18913
18913
|
|
|
18914
|
-
//
|
|
18914
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-http@3.972.72/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/checkUrl.js
|
|
18915
18915
|
var import_config7, ECS_CONTAINER_HOST = "169.254.170.2", EKS_CONTAINER_HOST_IPv4 = "169.254.170.23", EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]", checkUrl = (url, logger) => {
|
|
18916
18916
|
if (url.protocol === "https:") {
|
|
18917
18917
|
return;
|
|
@@ -18945,7 +18945,7 @@ var init_checkUrl = __esm(() => {
|
|
|
18945
18945
|
import_config7 = __toESM(require_config(), 1);
|
|
18946
18946
|
});
|
|
18947
18947
|
|
|
18948
|
-
//
|
|
18948
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-http@3.972.72/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/requestHelpers.js
|
|
18949
18949
|
function createGetRequest(url) {
|
|
18950
18950
|
return new import_protocols2.HttpRequest({
|
|
18951
18951
|
protocol: url.protocol,
|
|
@@ -18994,7 +18994,7 @@ var init_requestHelpers = __esm(() => {
|
|
|
18994
18994
|
import_serde2 = __toESM(require_serde(), 1);
|
|
18995
18995
|
});
|
|
18996
18996
|
|
|
18997
|
-
//
|
|
18997
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-http@3.972.72/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/retry-wrapper.js
|
|
18998
18998
|
var retryWrapper = (toRetry, maxRetries, delayMs) => {
|
|
18999
18999
|
return async () => {
|
|
19000
19000
|
for (let i2 = 0;i2 < maxRetries; ++i2) {
|
|
@@ -19008,7 +19008,7 @@ var retryWrapper = (toRetry, maxRetries, delayMs) => {
|
|
|
19008
19008
|
};
|
|
19009
19009
|
};
|
|
19010
19010
|
|
|
19011
|
-
//
|
|
19011
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-http@3.972.72/node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js
|
|
19012
19012
|
import fs from "fs/promises";
|
|
19013
19013
|
var import_client9, import_config9, import_node_http_handler, AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI", DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2", AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI", AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE", AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN", fromHttp = (options = {}) => {
|
|
19014
19014
|
options.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");
|
|
@@ -19074,7 +19074,7 @@ var init_fromHttp = __esm(() => {
|
|
|
19074
19074
|
import_node_http_handler = __toESM(require_dist_cjs6(), 1);
|
|
19075
19075
|
});
|
|
19076
19076
|
|
|
19077
|
-
//
|
|
19077
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-http@3.972.72/node_modules/@aws-sdk/credential-provider-http/dist-es/index.js
|
|
19078
19078
|
var exports_dist_es3 = {};
|
|
19079
19079
|
__export(exports_dist_es3, {
|
|
19080
19080
|
fromHttp: () => fromHttp
|
|
@@ -19083,16 +19083,16 @@ var init_dist_es3 = __esm(() => {
|
|
|
19083
19083
|
init_fromHttp();
|
|
19084
19084
|
});
|
|
19085
19085
|
|
|
19086
|
-
//
|
|
19086
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.973.14/node_modules/@aws-sdk/credential-provider-sso/dist-es/isSsoProfile.js
|
|
19087
19087
|
var isSsoProfile = (arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string");
|
|
19088
19088
|
|
|
19089
|
-
//
|
|
19089
|
+
// ../../node_modules/.bun/@aws-sdk+token-providers@3.1116.0/node_modules/@aws-sdk/token-providers/dist-es/constants.js
|
|
19090
19090
|
var EXPIRE_WINDOW_MS, REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;
|
|
19091
19091
|
var init_constants = __esm(() => {
|
|
19092
19092
|
EXPIRE_WINDOW_MS = 5 * 60 * 1000;
|
|
19093
19093
|
});
|
|
19094
19094
|
|
|
19095
|
-
//
|
|
19095
|
+
// ../../node_modules/.bun/@aws-sdk+nested-clients@3.997.44/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js
|
|
19096
19096
|
var require_sso_oidc = __commonJS((exports) => {
|
|
19097
19097
|
var { awsEndpointFunctions: awsEndpointFunctions2, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require_client2();
|
|
19098
19098
|
var { NoAuthSigner, getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require_dist_cjs2();
|
|
@@ -19847,7 +19847,7 @@ var require_sso_oidc = __commonJS((exports) => {
|
|
|
19847
19847
|
exports.errorTypeRegistries = errorTypeRegistries2;
|
|
19848
19848
|
});
|
|
19849
19849
|
|
|
19850
|
-
//
|
|
19850
|
+
// ../../node_modules/.bun/@aws-sdk+token-providers@3.1116.0/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js
|
|
19851
19851
|
var getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {
|
|
19852
19852
|
const { SSOOIDCClient } = await Promise.resolve().then(() => __toESM(require_sso_oidc(), 1));
|
|
19853
19853
|
const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop];
|
|
@@ -19859,7 +19859,7 @@ var getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => {
|
|
|
19859
19859
|
return ssoOidcClient;
|
|
19860
19860
|
};
|
|
19861
19861
|
|
|
19862
|
-
//
|
|
19862
|
+
// ../../node_modules/.bun/@aws-sdk+token-providers@3.1116.0/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js
|
|
19863
19863
|
var getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConfig) => {
|
|
19864
19864
|
const { CreateTokenCommand } = await Promise.resolve().then(() => __toESM(require_sso_oidc(), 1));
|
|
19865
19865
|
const ssoOidcClient = await getSsoOidcClient(ssoRegion, init, callerClientConfig);
|
|
@@ -19872,7 +19872,7 @@ var getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConf
|
|
|
19872
19872
|
};
|
|
19873
19873
|
var init_getNewSsoOidcToken = () => {};
|
|
19874
19874
|
|
|
19875
|
-
//
|
|
19875
|
+
// ../../node_modules/.bun/@aws-sdk+token-providers@3.1116.0/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js
|
|
19876
19876
|
var import_config11, validateTokenExpiry = (token) => {
|
|
19877
19877
|
if (token.expiration && token.expiration.getTime() < Date.now()) {
|
|
19878
19878
|
throw new import_config11.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
|
|
@@ -19883,7 +19883,7 @@ var init_validateTokenExpiry = __esm(() => {
|
|
|
19883
19883
|
import_config11 = __toESM(require_config(), 1);
|
|
19884
19884
|
});
|
|
19885
19885
|
|
|
19886
|
-
//
|
|
19886
|
+
// ../../node_modules/.bun/@aws-sdk+token-providers@3.1116.0/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js
|
|
19887
19887
|
var import_config12, validateTokenKey = (key, value, forRefresh = false) => {
|
|
19888
19888
|
if (typeof value === "undefined") {
|
|
19889
19889
|
throw new import_config12.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
|
|
@@ -19894,7 +19894,7 @@ var init_validateTokenKey = __esm(() => {
|
|
|
19894
19894
|
import_config12 = __toESM(require_config(), 1);
|
|
19895
19895
|
});
|
|
19896
19896
|
|
|
19897
|
-
//
|
|
19897
|
+
// ../../node_modules/.bun/@aws-sdk+token-providers@3.1116.0/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js
|
|
19898
19898
|
import { promises as fsPromises } from "fs";
|
|
19899
19899
|
var import_config13, writeFile, writeSSOTokenToFile = (id, ssoToken) => {
|
|
19900
19900
|
const tokenFilepath = import_config13.getSSOTokenFilepath(id);
|
|
@@ -19906,7 +19906,7 @@ var init_writeSSOTokenToFile = __esm(() => {
|
|
|
19906
19906
|
({ writeFile } = fsPromises);
|
|
19907
19907
|
});
|
|
19908
19908
|
|
|
19909
|
-
//
|
|
19909
|
+
// ../../node_modules/.bun/@aws-sdk+token-providers@3.1116.0/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js
|
|
19910
19910
|
var import_config14, lastRefreshAttemptTimes, fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
19911
19911
|
init.logger?.debug("@aws-sdk/token-providers - fromSso");
|
|
19912
19912
|
const profiles = await import_config14.parseKnownFiles(init);
|
|
@@ -19989,12 +19989,12 @@ var init_fromSso = __esm(() => {
|
|
|
19989
19989
|
lastRefreshAttemptTimes = new Map;
|
|
19990
19990
|
});
|
|
19991
19991
|
|
|
19992
|
-
//
|
|
19992
|
+
// ../../node_modules/.bun/@aws-sdk+token-providers@3.1116.0/node_modules/@aws-sdk/token-providers/dist-es/index.js
|
|
19993
19993
|
var init_dist_es4 = __esm(() => {
|
|
19994
19994
|
init_fromSso();
|
|
19995
19995
|
});
|
|
19996
19996
|
|
|
19997
|
-
//
|
|
19997
|
+
// ../../node_modules/.bun/@aws-sdk+nested-clients@3.997.44/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js
|
|
19998
19998
|
function createAwsAuthSigv4HttpAuthOption2(authParameters) {
|
|
19999
19999
|
return {
|
|
20000
20000
|
schemeId: "aws.auth#sigv4",
|
|
@@ -20442,7 +20442,7 @@ var init_sso = __esm(() => {
|
|
|
20442
20442
|
$SSOClient = SSOClient;
|
|
20443
20443
|
});
|
|
20444
20444
|
|
|
20445
|
-
//
|
|
20445
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.973.14/node_modules/@aws-sdk/credential-provider-sso/dist-es/loadSso.js
|
|
20446
20446
|
var exports_loadSso = {};
|
|
20447
20447
|
__export(exports_loadSso, {
|
|
20448
20448
|
SSOClient: () => $SSOClient,
|
|
@@ -20452,7 +20452,7 @@ var init_loadSso = __esm(() => {
|
|
|
20452
20452
|
init_sso();
|
|
20453
20453
|
});
|
|
20454
20454
|
|
|
20455
|
-
//
|
|
20455
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.973.14/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js
|
|
20456
20456
|
var import_client10, import_config15, SHOULD_FAIL_CREDENTIAL_CHAIN = false, resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger }) => {
|
|
20457
20457
|
let token;
|
|
20458
20458
|
const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;
|
|
@@ -20541,7 +20541,7 @@ var init_resolveSSOCredentials = __esm(() => {
|
|
|
20541
20541
|
import_config15 = __toESM(require_config(), 1);
|
|
20542
20542
|
});
|
|
20543
20543
|
|
|
20544
|
-
//
|
|
20544
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.973.14/node_modules/@aws-sdk/credential-provider-sso/dist-es/validateSsoProfile.js
|
|
20545
20545
|
var import_config16, validateSsoProfile = (profile, logger) => {
|
|
20546
20546
|
const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;
|
|
20547
20547
|
if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {
|
|
@@ -20554,7 +20554,7 @@ var init_validateSsoProfile = __esm(() => {
|
|
|
20554
20554
|
import_config16 = __toESM(require_config(), 1);
|
|
20555
20555
|
});
|
|
20556
20556
|
|
|
20557
|
-
//
|
|
20557
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.973.14/node_modules/@aws-sdk/credential-provider-sso/dist-es/fromSSO.js
|
|
20558
20558
|
var import_config17, fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
20559
20559
|
init.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");
|
|
20560
20560
|
const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
|
|
@@ -20636,7 +20636,7 @@ var init_fromSSO = __esm(() => {
|
|
|
20636
20636
|
import_config17 = __toESM(require_config(), 1);
|
|
20637
20637
|
});
|
|
20638
20638
|
|
|
20639
|
-
//
|
|
20639
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-sso@3.973.14/node_modules/@aws-sdk/credential-provider-sso/dist-es/index.js
|
|
20640
20640
|
var exports_dist_es4 = {};
|
|
20641
20641
|
__export(exports_dist_es4, {
|
|
20642
20642
|
validateSsoProfile: () => validateSsoProfile,
|
|
@@ -20648,7 +20648,7 @@ var init_dist_es5 = __esm(() => {
|
|
|
20648
20648
|
init_validateSsoProfile();
|
|
20649
20649
|
});
|
|
20650
20650
|
|
|
20651
|
-
//
|
|
20651
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.973.15/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js
|
|
20652
20652
|
var import_client11, import_config18, resolveCredentialSource = (credentialSource, profileName, logger) => {
|
|
20653
20653
|
const sourceProvidersMap = {
|
|
20654
20654
|
EcsContainer: async (options) => {
|
|
@@ -20679,7 +20679,7 @@ var init_resolveCredentialSource = __esm(() => {
|
|
|
20679
20679
|
import_config18 = __toESM(require_config(), 1);
|
|
20680
20680
|
});
|
|
20681
20681
|
|
|
20682
|
-
//
|
|
20682
|
+
// ../../node_modules/.bun/@aws-sdk+nested-clients@3.997.44/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js
|
|
20683
20683
|
var require_sts = __commonJS((exports) => {
|
|
20684
20684
|
var { awsEndpointFunctions: awsEndpointFunctions3, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$12, createDefaultUserAgentProvider: createDefaultUserAgentProvider2, NODE_APP_ID_CONFIG_OPTIONS: NODE_APP_ID_CONFIG_OPTIONS2, getAwsRegionExtensionConfiguration: getAwsRegionExtensionConfiguration2, resolveAwsRegionExtensionConfiguration: resolveAwsRegionExtensionConfiguration2, resolveUserAgentConfig: resolveUserAgentConfig2, resolveHostHeaderConfig: resolveHostHeaderConfig2, getUserAgentPlugin: getUserAgentPlugin2, getHostHeaderPlugin: getHostHeaderPlugin2, getLoggerPlugin: getLoggerPlugin2, getRecursionDetectionPlugin: getRecursionDetectionPlugin2, setCredentialFeature: setCredentialFeature5, stsRegionDefaultResolver } = require_client2();
|
|
20685
20685
|
var { NoAuthSigner: NoAuthSigner2, getHttpAuthSchemeEndpointRuleSetPlugin: getHttpAuthSchemeEndpointRuleSetPlugin2, DefaultIdentityProviderConfig: DefaultIdentityProviderConfig2, getHttpSigningPlugin: getHttpSigningPlugin2 } = require_dist_cjs2();
|
|
@@ -21701,7 +21701,7 @@ var require_sts = __commonJS((exports) => {
|
|
|
21701
21701
|
exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
|
|
21702
21702
|
});
|
|
21703
21703
|
|
|
21704
|
-
//
|
|
21704
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.973.15/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js
|
|
21705
21705
|
var import_client12, import_config19, isAssumeRoleProfile = (arg, { profile = "default", logger } = {}) => {
|
|
21706
21706
|
return Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger }));
|
|
21707
21707
|
}, isAssumeRoleWithSourceProfile = (arg, { profile, logger }) => {
|
|
@@ -21769,7 +21769,7 @@ var init_resolveAssumeRoleCredentials = __esm(() => {
|
|
|
21769
21769
|
import_config19 = __toESM(require_config(), 1);
|
|
21770
21770
|
});
|
|
21771
21771
|
|
|
21772
|
-
//
|
|
21772
|
+
// ../../node_modules/.bun/@aws-sdk+nested-clients@3.997.44/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js
|
|
21773
21773
|
var require_signin = __commonJS((exports) => {
|
|
21774
21774
|
var { awsEndpointFunctions: awsEndpointFunctions3, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$12, createDefaultUserAgentProvider: createDefaultUserAgentProvider2, NODE_APP_ID_CONFIG_OPTIONS: NODE_APP_ID_CONFIG_OPTIONS2, getAwsRegionExtensionConfiguration: getAwsRegionExtensionConfiguration2, resolveAwsRegionExtensionConfiguration: resolveAwsRegionExtensionConfiguration2, resolveUserAgentConfig: resolveUserAgentConfig2, resolveHostHeaderConfig: resolveHostHeaderConfig2, getUserAgentPlugin: getUserAgentPlugin2, getHostHeaderPlugin: getHostHeaderPlugin2, getLoggerPlugin: getLoggerPlugin2, getRecursionDetectionPlugin: getRecursionDetectionPlugin2 } = require_client2();
|
|
21775
21775
|
var { NoAuthSigner: NoAuthSigner2, getHttpAuthSchemeEndpointRuleSetPlugin: getHttpAuthSchemeEndpointRuleSetPlugin2, DefaultIdentityProviderConfig: DefaultIdentityProviderConfig2, getHttpSigningPlugin: getHttpSigningPlugin2 } = require_dist_cjs2();
|
|
@@ -22501,7 +22501,7 @@ var require_signin = __commonJS((exports) => {
|
|
|
22501
22501
|
exports.errorTypeRegistries = errorTypeRegistries3;
|
|
22502
22502
|
});
|
|
22503
22503
|
|
|
22504
|
-
//
|
|
22504
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-login@3.972.77/node_modules/@aws-sdk/credential-provider-login/dist-es/LoginCredentialsFetcher.js
|
|
22505
22505
|
import { createHash as createHash2, createPrivateKey, createPublicKey, sign } from "crypto";
|
|
22506
22506
|
import { promises as fs2 } from "fs";
|
|
22507
22507
|
import { homedir } from "os";
|
|
@@ -22765,7 +22765,7 @@ var init_LoginCredentialsFetcher = __esm(() => {
|
|
|
22765
22765
|
};
|
|
22766
22766
|
});
|
|
22767
22767
|
|
|
22768
|
-
//
|
|
22768
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-login@3.972.77/node_modules/@aws-sdk/credential-provider-login/dist-es/fromLoginCredentials.js
|
|
22769
22769
|
var import_client13, import_config21, fromLoginCredentials = (init) => async ({ callerClientConfig } = {}) => {
|
|
22770
22770
|
init?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");
|
|
22771
22771
|
const profiles = await import_config21.parseKnownFiles(init || {});
|
|
@@ -22789,7 +22789,7 @@ var init_fromLoginCredentials = __esm(() => {
|
|
|
22789
22789
|
import_config21 = __toESM(require_config(), 1);
|
|
22790
22790
|
});
|
|
22791
22791
|
|
|
22792
|
-
//
|
|
22792
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-login@3.972.77/node_modules/@aws-sdk/credential-provider-login/dist-es/index.js
|
|
22793
22793
|
var exports_dist_es5 = {};
|
|
22794
22794
|
__export(exports_dist_es5, {
|
|
22795
22795
|
fromLoginCredentials: () => fromLoginCredentials
|
|
@@ -22798,7 +22798,7 @@ var init_dist_es6 = __esm(() => {
|
|
|
22798
22798
|
init_fromLoginCredentials();
|
|
22799
22799
|
});
|
|
22800
22800
|
|
|
22801
|
-
//
|
|
22801
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.973.15/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveLoginCredentials.js
|
|
22802
22802
|
var import_client14, isLoginProfile = (data) => {
|
|
22803
22803
|
return Boolean(data && data.login_session);
|
|
22804
22804
|
}, resolveLoginCredentials = async (profileName, options, callerClientConfig) => {
|
|
@@ -22813,7 +22813,7 @@ var init_resolveLoginCredentials = __esm(() => {
|
|
|
22813
22813
|
import_client14 = __toESM(require_client2(), 1);
|
|
22814
22814
|
});
|
|
22815
22815
|
|
|
22816
|
-
//
|
|
22816
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-process@3.972.70/node_modules/@aws-sdk/credential-provider-process/dist-es/getValidatedProcessCredentials.js
|
|
22817
22817
|
var import_client15, getValidatedProcessCredentials = (profileName, data, profiles) => {
|
|
22818
22818
|
if (data.Version !== 1) {
|
|
22819
22819
|
throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
|
|
@@ -22847,7 +22847,7 @@ var init_getValidatedProcessCredentials = __esm(() => {
|
|
|
22847
22847
|
import_client15 = __toESM(require_client2(), 1);
|
|
22848
22848
|
});
|
|
22849
22849
|
|
|
22850
|
-
//
|
|
22850
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-process@3.972.70/node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js
|
|
22851
22851
|
import { exec } from "child_process";
|
|
22852
22852
|
import { promisify } from "util";
|
|
22853
22853
|
var import_config22, resolveProcessCredentials = async (profileName, profiles, logger) => {
|
|
@@ -22882,7 +22882,7 @@ var init_resolveProcessCredentials = __esm(() => {
|
|
|
22882
22882
|
import_config22 = __toESM(require_config(), 1);
|
|
22883
22883
|
});
|
|
22884
22884
|
|
|
22885
|
-
//
|
|
22885
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-process@3.972.70/node_modules/@aws-sdk/credential-provider-process/dist-es/fromProcess.js
|
|
22886
22886
|
var import_config23, fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
22887
22887
|
init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");
|
|
22888
22888
|
const profiles = await import_config23.parseKnownFiles(init);
|
|
@@ -22895,7 +22895,7 @@ var init_fromProcess = __esm(() => {
|
|
|
22895
22895
|
import_config23 = __toESM(require_config(), 1);
|
|
22896
22896
|
});
|
|
22897
22897
|
|
|
22898
|
-
//
|
|
22898
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-process@3.972.70/node_modules/@aws-sdk/credential-provider-process/dist-es/index.js
|
|
22899
22899
|
var exports_dist_es6 = {};
|
|
22900
22900
|
__export(exports_dist_es6, {
|
|
22901
22901
|
fromProcess: () => fromProcess
|
|
@@ -22904,7 +22904,7 @@ var init_dist_es7 = __esm(() => {
|
|
|
22904
22904
|
init_fromProcess();
|
|
22905
22905
|
});
|
|
22906
22906
|
|
|
22907
|
-
//
|
|
22907
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.973.15/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js
|
|
22908
22908
|
var import_client16, isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", resolveProcessCredentials2 = async (options, profile) => {
|
|
22909
22909
|
const { fromProcess: fromProcess2 } = await Promise.resolve().then(() => (init_dist_es7(), exports_dist_es6));
|
|
22910
22910
|
const credentials = await fromProcess2({
|
|
@@ -22917,7 +22917,7 @@ var init_resolveProcessCredentials2 = __esm(() => {
|
|
|
22917
22917
|
import_client16 = __toESM(require_client2(), 1);
|
|
22918
22918
|
});
|
|
22919
22919
|
|
|
22920
|
-
//
|
|
22920
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.973.15/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js
|
|
22921
22921
|
var import_client17, resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => {
|
|
22922
22922
|
const { fromSSO: fromSSO2 } = await Promise.resolve().then(() => (init_dist_es5(), exports_dist_es4));
|
|
22923
22923
|
return fromSSO2({
|
|
@@ -22939,7 +22939,7 @@ var init_resolveSsoCredentials = __esm(() => {
|
|
|
22939
22939
|
import_client17 = __toESM(require_client2(), 1);
|
|
22940
22940
|
});
|
|
22941
22941
|
|
|
22942
|
-
//
|
|
22942
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.973.15/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js
|
|
22943
22943
|
var import_client18, isStaticCredsProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 && ["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1, resolveStaticCredentials = async (profile, options) => {
|
|
22944
22944
|
options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
|
|
22945
22945
|
const credentials = {
|
|
@@ -22955,7 +22955,7 @@ var init_resolveStaticCredentials = __esm(() => {
|
|
|
22955
22955
|
import_client18 = __toESM(require_client2(), 1);
|
|
22956
22956
|
});
|
|
22957
22957
|
|
|
22958
|
-
//
|
|
22958
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-web-identity@3.972.76/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromWebToken.js
|
|
22959
22959
|
var fromWebToken = (init) => async (awsIdentityProperties) => {
|
|
22960
22960
|
init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");
|
|
22961
22961
|
const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;
|
|
@@ -22982,7 +22982,7 @@ var fromWebToken = (init) => async (awsIdentityProperties) => {
|
|
|
22982
22982
|
});
|
|
22983
22983
|
};
|
|
22984
22984
|
|
|
22985
|
-
//
|
|
22985
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-web-identity@3.972.76/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromTokenFile.js
|
|
22986
22986
|
import { readFileSync as readFileSync3 } from "fs";
|
|
22987
22987
|
var import_client19, import_config24, ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE", ENV_ROLE_ARN = "AWS_ROLE_ARN", ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME", fromTokenFile = (init = {}) => async (awsIdentityProperties) => {
|
|
22988
22988
|
init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");
|
|
@@ -23010,7 +23010,7 @@ var init_fromTokenFile = __esm(() => {
|
|
|
23010
23010
|
import_config24 = __toESM(require_config(), 1);
|
|
23011
23011
|
});
|
|
23012
23012
|
|
|
23013
|
-
//
|
|
23013
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-web-identity@3.972.76/node_modules/@aws-sdk/credential-provider-web-identity/dist-es/index.js
|
|
23014
23014
|
var exports_dist_es7 = {};
|
|
23015
23015
|
__export(exports_dist_es7, {
|
|
23016
23016
|
fromWebToken: () => fromWebToken,
|
|
@@ -23020,7 +23020,7 @@ var init_dist_es8 = __esm(() => {
|
|
|
23020
23020
|
init_fromTokenFile();
|
|
23021
23021
|
});
|
|
23022
23022
|
|
|
23023
|
-
//
|
|
23023
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.973.15/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js
|
|
23024
23024
|
var import_client20, isWebIdentityProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1, resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => {
|
|
23025
23025
|
const { fromTokenFile: fromTokenFile2 } = await Promise.resolve().then(() => (init_dist_es8(), exports_dist_es7));
|
|
23026
23026
|
const credentials = await fromTokenFile2({
|
|
@@ -23039,7 +23039,7 @@ var init_resolveWebIdentityCredentials = __esm(() => {
|
|
|
23039
23039
|
import_client20 = __toESM(require_client2(), 1);
|
|
23040
23040
|
});
|
|
23041
23041
|
|
|
23042
|
-
//
|
|
23042
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.973.15/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js
|
|
23043
23043
|
var import_config25, resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {
|
|
23044
23044
|
const data = profiles[profileName];
|
|
23045
23045
|
if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {
|
|
@@ -23075,7 +23075,7 @@ var init_resolveProfileData = __esm(() => {
|
|
|
23075
23075
|
import_config25 = __toESM(require_config(), 1);
|
|
23076
23076
|
});
|
|
23077
23077
|
|
|
23078
|
-
//
|
|
23078
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.973.15/node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js
|
|
23079
23079
|
var import_config26, fromIni = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
23080
23080
|
init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");
|
|
23081
23081
|
const profiles = await import_config26.parseKnownFiles(init);
|
|
@@ -23088,7 +23088,7 @@ var init_fromIni = __esm(() => {
|
|
|
23088
23088
|
import_config26 = __toESM(require_config(), 1);
|
|
23089
23089
|
});
|
|
23090
23090
|
|
|
23091
|
-
//
|
|
23091
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-ini@3.973.15/node_modules/@aws-sdk/credential-provider-ini/dist-es/index.js
|
|
23092
23092
|
var exports_dist_es8 = {};
|
|
23093
23093
|
__export(exports_dist_es8, {
|
|
23094
23094
|
fromIni: () => fromIni
|
|
@@ -23097,7 +23097,7 @@ var init_dist_es9 = __esm(() => {
|
|
|
23097
23097
|
init_fromIni();
|
|
23098
23098
|
});
|
|
23099
23099
|
|
|
23100
|
-
//
|
|
23100
|
+
// ../events/dist/index.js
|
|
23101
23101
|
import { chmod, mkdir, readFile, rename, writeFile as writeFile2 } from "fs/promises";
|
|
23102
23102
|
import { Buffer as Buffer2 } from "buffer";
|
|
23103
23103
|
import { existsSync as existsSync22 } from "fs";
|
|
@@ -24425,7 +24425,7 @@ var init_event_sink = __esm(() => {
|
|
|
24425
24425
|
init_dist();
|
|
24426
24426
|
});
|
|
24427
24427
|
|
|
24428
|
-
//
|
|
24428
|
+
// ../contracts/dist/client/transport.js
|
|
24429
24429
|
import { isIP } from "net";
|
|
24430
24430
|
import { spawnSync } from "child_process";
|
|
24431
24431
|
import { closeSync, fstatSync, openSync, readFileSync } from "fs";
|
|
@@ -25496,7 +25496,7 @@ class MissingSkillsFleetError extends Error {
|
|
|
25496
25496
|
// package.json
|
|
25497
25497
|
var package_default = {
|
|
25498
25498
|
name: "@hasna/skills",
|
|
25499
|
-
version: "0.5.
|
|
25499
|
+
version: "0.5.9",
|
|
25500
25500
|
description: "Skills library for AI coding agents",
|
|
25501
25501
|
type: "module",
|
|
25502
25502
|
bin: {
|
|
@@ -25536,7 +25536,9 @@ var package_default = {
|
|
|
25536
25536
|
"docs/skill-standard.md",
|
|
25537
25537
|
"schemas/",
|
|
25538
25538
|
"LICENSE",
|
|
25539
|
-
"README.md"
|
|
25539
|
+
"README.md",
|
|
25540
|
+
"!dist/**/*test-utils.d.ts",
|
|
25541
|
+
"!dist/**/*fixtures.d.ts"
|
|
25540
25542
|
],
|
|
25541
25543
|
main: "./dist/index.js",
|
|
25542
25544
|
types: "./dist/index.d.ts",
|
|
@@ -26269,7 +26271,7 @@ function verifyBundleSignature(bytes, signature, key) {
|
|
|
26269
26271
|
return expected.length === actual.length && timingSafeEqual(expected, actual);
|
|
26270
26272
|
}
|
|
26271
26273
|
|
|
26272
|
-
//
|
|
26274
|
+
// ../../node_modules/.bun/@aws-sdk+checksums@3.1000.29/node_modules/@aws-sdk/checksums/dist-cjs/submodules/flexible-checksums/index.js
|
|
26273
26275
|
var { setFeature } = require_client2();
|
|
26274
26276
|
var { HttpRequest } = require_protocols();
|
|
26275
26277
|
var { isArrayBuffer, toUint8Array, createBufferedReadable, createChecksumStream } = require_serde();
|
|
@@ -26662,10 +26664,10 @@ var $NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS = NODE_RESPONSE_CHECKSUM_V
|
|
|
26662
26664
|
var $getFlexibleChecksumsPlugin = getFlexibleChecksumsPlugin;
|
|
26663
26665
|
var $resolveFlexibleChecksumsConfig = resolveFlexibleChecksumsConfig;
|
|
26664
26666
|
|
|
26665
|
-
//
|
|
26667
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/S3Client.js
|
|
26666
26668
|
var import_client26 = __toESM(require_client2(), 1);
|
|
26667
26669
|
|
|
26668
|
-
//
|
|
26670
|
+
// ../../node_modules/.bun/@aws-sdk+middleware-sdk-s3@3.972.75/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/submodules/s3/index.js
|
|
26669
26671
|
var { NoOpLogger, getSmithyContext } = require_client();
|
|
26670
26672
|
var { HttpRequest: HttpRequest2, HttpResponse } = require_protocols();
|
|
26671
26673
|
var { parseRfc7231DateTime } = require_serde();
|
|
@@ -27270,7 +27272,7 @@ var $getThrow200ExceptionsPlugin = getThrow200ExceptionsPlugin;
|
|
|
27270
27272
|
var $getValidateBucketNamePlugin = getValidateBucketNamePlugin;
|
|
27271
27273
|
var $resolveS3Config = resolveS3Config;
|
|
27272
27274
|
|
|
27273
|
-
//
|
|
27275
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/S3Client.js
|
|
27274
27276
|
var import_core = __toESM(require_dist_cjs2(), 1);
|
|
27275
27277
|
var import_client27 = __toESM(require_client(), 1);
|
|
27276
27278
|
var import_config29 = __toESM(require_config(), 1);
|
|
@@ -27280,17 +27282,17 @@ var import_protocols6 = __toESM(require_protocols(), 1);
|
|
|
27280
27282
|
var import_retry4 = __toESM(require_retry(), 1);
|
|
27281
27283
|
var import_schema2 = __toESM(require_schema(), 1);
|
|
27282
27284
|
|
|
27283
|
-
//
|
|
27285
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthSchemeProvider.js
|
|
27284
27286
|
var import_httpAuthSchemes = __toESM(require_httpAuthSchemes(), 1);
|
|
27285
27287
|
var import_signature_v4_multi_region = __toESM(require_dist_cjs4(), 1);
|
|
27286
27288
|
var import_client5 = __toESM(require_client(), 1);
|
|
27287
27289
|
var import_endpoints3 = __toESM(require_endpoints(), 1);
|
|
27288
27290
|
|
|
27289
|
-
//
|
|
27291
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/endpoint/endpointResolver.js
|
|
27290
27292
|
var import_client4 = __toESM(require_client2(), 1);
|
|
27291
27293
|
var import_endpoints2 = __toESM(require_endpoints(), 1);
|
|
27292
27294
|
|
|
27293
|
-
//
|
|
27295
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/endpoint/bdd.js
|
|
27294
27296
|
var import_endpoints = __toESM(require_endpoints(), 1);
|
|
27295
27297
|
var aw = "ref";
|
|
27296
27298
|
var ax = "argv";
|
|
@@ -29234,7 +29236,7 @@ var nodes = new Int32Array([
|
|
|
29234
29236
|
]);
|
|
29235
29237
|
var bdd = import_endpoints.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
29236
29238
|
|
|
29237
|
-
//
|
|
29239
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/endpoint/endpointResolver.js
|
|
29238
29240
|
var cache = new import_endpoints2.EndpointCache({
|
|
29239
29241
|
size: 50,
|
|
29240
29242
|
params: [
|
|
@@ -29262,7 +29264,7 @@ var defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
|
29262
29264
|
};
|
|
29263
29265
|
import_endpoints2.customEndpointFunctions.aws = import_client4.awsEndpointFunctions;
|
|
29264
29266
|
|
|
29265
|
-
//
|
|
29267
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthSchemeProvider.js
|
|
29266
29268
|
var createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => {
|
|
29267
29269
|
if (!input) {
|
|
29268
29270
|
throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");
|
|
@@ -29378,11 +29380,11 @@ var resolveHttpAuthSchemeConfig = (config) => {
|
|
|
29378
29380
|
});
|
|
29379
29381
|
};
|
|
29380
29382
|
|
|
29381
|
-
//
|
|
29383
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/commandBuilder.js
|
|
29382
29384
|
var import_client6 = __toESM(require_client(), 1);
|
|
29383
29385
|
var import_endpoints4 = __toESM(require_endpoints(), 1);
|
|
29384
29386
|
|
|
29385
|
-
//
|
|
29387
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/endpoint/EndpointParameters.js
|
|
29386
29388
|
var resolveClientEndpointParameters = (options) => {
|
|
29387
29389
|
return Object.assign(options, {
|
|
29388
29390
|
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
@@ -29408,7 +29410,7 @@ var commonParams = {
|
|
|
29408
29410
|
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
|
|
29409
29411
|
};
|
|
29410
29412
|
|
|
29411
|
-
//
|
|
29413
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/commandBuilder.js
|
|
29412
29414
|
var command = import_client6.makeBuilder(commonParams, "AmazonS3", "S3Client", import_endpoints4.getEndpointPlugin);
|
|
29413
29415
|
var _ep0 = {
|
|
29414
29416
|
Bucket: { type: "contextParams", name: "Bucket" },
|
|
@@ -29440,10 +29442,10 @@ var _mw11 = (Command, cs, config, o2) => [
|
|
|
29440
29442
|
$getSsecPlugin(config)
|
|
29441
29443
|
];
|
|
29442
29444
|
|
|
29443
|
-
//
|
|
29445
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js
|
|
29444
29446
|
var import_schema = __toESM(require_schema(), 1);
|
|
29445
29447
|
|
|
29446
|
-
//
|
|
29448
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/models/S3ServiceException.js
|
|
29447
29449
|
var import_client7 = __toESM(require_client(), 1);
|
|
29448
29450
|
class S3ServiceException extends import_client7.ServiceException {
|
|
29449
29451
|
constructor(options) {
|
|
@@ -29452,7 +29454,7 @@ class S3ServiceException extends import_client7.ServiceException {
|
|
|
29452
29454
|
}
|
|
29453
29455
|
}
|
|
29454
29456
|
|
|
29455
|
-
//
|
|
29457
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/models/errors.js
|
|
29456
29458
|
class NoSuchUpload extends S3ServiceException {
|
|
29457
29459
|
name = "NoSuchUpload";
|
|
29458
29460
|
$fault = "client";
|
|
@@ -29730,7 +29732,7 @@ class ObjectAlreadyInActiveTierError extends S3ServiceException {
|
|
|
29730
29732
|
}
|
|
29731
29733
|
}
|
|
29732
29734
|
|
|
29733
|
-
//
|
|
29735
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js
|
|
29734
29736
|
var _A = "Account";
|
|
29735
29737
|
var _AAO = "AnalyticsAndOperator";
|
|
29736
29738
|
var _AC = "AccelerateConfiguration";
|
|
@@ -35182,10 +35184,10 @@ var WriteGetObjectResponse$ = [
|
|
|
35182
35184
|
() => __Unit
|
|
35183
35185
|
];
|
|
35184
35186
|
|
|
35185
|
-
//
|
|
35187
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/commands/CreateSessionCommand.js
|
|
35186
35188
|
class CreateSessionCommand extends command(_ep4, _mw0, "CreateSession", CreateSession$) {
|
|
35187
35189
|
}
|
|
35188
|
-
//
|
|
35190
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/package.json
|
|
35189
35191
|
var package_default2 = {
|
|
35190
35192
|
name: "@aws-sdk/client-s3",
|
|
35191
35193
|
version: "3.1127.0",
|
|
@@ -35270,15 +35272,15 @@ var package_default2 = {
|
|
|
35270
35272
|
}
|
|
35271
35273
|
};
|
|
35272
35274
|
|
|
35273
|
-
//
|
|
35275
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.js
|
|
35274
35276
|
var import_client22 = __toESM(require_client2(), 1);
|
|
35275
35277
|
var import_httpAuthSchemes3 = __toESM(require_httpAuthSchemes(), 1);
|
|
35276
35278
|
|
|
35277
|
-
//
|
|
35279
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-node@3.972.82/node_modules/@aws-sdk/credential-provider-node/dist-es/defaultProvider.js
|
|
35278
35280
|
init_dist_es();
|
|
35279
35281
|
var import_config27 = __toESM(require_config(), 1);
|
|
35280
35282
|
|
|
35281
|
-
//
|
|
35283
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-node@3.972.82/node_modules/@aws-sdk/credential-provider-node/dist-es/remoteProvider.js
|
|
35282
35284
|
var import_config10 = __toESM(require_config(), 1);
|
|
35283
35285
|
var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
|
|
35284
35286
|
var remoteProvider = async (init) => {
|
|
@@ -35297,7 +35299,7 @@ var remoteProvider = async (init) => {
|
|
|
35297
35299
|
return fromInstanceMetadata2(init);
|
|
35298
35300
|
};
|
|
35299
35301
|
|
|
35300
|
-
//
|
|
35302
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-node@3.972.82/node_modules/@aws-sdk/credential-provider-node/dist-es/runtime/memoize-chain.js
|
|
35301
35303
|
function memoizeChain(providers, treatAsExpired) {
|
|
35302
35304
|
const chain2 = internalCreateChain(providers);
|
|
35303
35305
|
let activeLock;
|
|
@@ -35361,7 +35363,7 @@ var internalCreateChain = (providers) => async (awsIdentityProperties) => {
|
|
|
35361
35363
|
throw lastProviderError;
|
|
35362
35364
|
};
|
|
35363
35365
|
|
|
35364
|
-
//
|
|
35366
|
+
// ../../node_modules/.bun/@aws-sdk+credential-provider-node@3.972.82/node_modules/@aws-sdk/credential-provider-node/dist-es/defaultProvider.js
|
|
35365
35367
|
var multipleCredentialSourceWarningEmitted = false;
|
|
35366
35368
|
var defaultProvider = (init = {}) => memoizeChain([
|
|
35367
35369
|
async () => {
|
|
@@ -35427,7 +35429,7 @@ var defaultProvider = (init = {}) => memoizeChain([
|
|
|
35427
35429
|
}
|
|
35428
35430
|
], credentialsTreatedAsExpired);
|
|
35429
35431
|
var credentialsTreatedAsExpired = (credentials) => credentials?.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000;
|
|
35430
|
-
//
|
|
35432
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.js
|
|
35431
35433
|
var import_checksum2 = __toESM(require_checksum(), 1);
|
|
35432
35434
|
var import_client23 = __toESM(require_client(), 1);
|
|
35433
35435
|
var import_config28 = __toESM(require_config(), 1);
|
|
@@ -35436,7 +35438,7 @@ var import_retry3 = __toESM(require_retry(), 1);
|
|
|
35436
35438
|
var import_serde4 = __toESM(require_serde(), 1);
|
|
35437
35439
|
var import_node_http_handler2 = __toESM(require_dist_cjs6(), 1);
|
|
35438
35440
|
|
|
35439
|
-
//
|
|
35441
|
+
// ../../node_modules/.bun/@aws-sdk+checksums@3.1000.29/node_modules/@aws-sdk/checksums/dist-cjs/submodules/sha/index.js
|
|
35440
35442
|
var { toUint8Array: toUint8Array2, concatBytes } = require_serde();
|
|
35441
35443
|
var { createHmac: createHmac2, createHash: createHash3 } = __require("crypto");
|
|
35442
35444
|
var { Sha256: Sha2562, Sha256Js, Sha256Node } = require_checksum();
|
|
@@ -35665,7 +35667,7 @@ var subtle = typeof digest === "function" && typeof sign2 === "function" && type
|
|
|
35665
35667
|
var MAX_PENDING_BYTES = 8 * 1024 * 1024;
|
|
35666
35668
|
var $Sha1 = Sha1Node;
|
|
35667
35669
|
|
|
35668
|
-
//
|
|
35670
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.shared.js
|
|
35669
35671
|
var import_httpAuthSchemes2 = __toESM(require_httpAuthSchemes(), 1);
|
|
35670
35672
|
var import_signature_v4_multi_region2 = __toESM(require_dist_cjs4(), 1);
|
|
35671
35673
|
var import_checksum = __toESM(require_checksum(), 1);
|
|
@@ -35717,7 +35719,7 @@ var getRuntimeConfig2 = (config) => {
|
|
|
35717
35719
|
};
|
|
35718
35720
|
};
|
|
35719
35721
|
|
|
35720
|
-
//
|
|
35722
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.js
|
|
35721
35723
|
var getRuntimeConfig3 = (config) => {
|
|
35722
35724
|
import_client23.emitWarningIfUnsupportedVersion(process.version);
|
|
35723
35725
|
const defaultsMode = import_config28.resolveDefaultsModeConfig(config);
|
|
@@ -35758,12 +35760,12 @@ var getRuntimeConfig3 = (config) => {
|
|
|
35758
35760
|
};
|
|
35759
35761
|
};
|
|
35760
35762
|
|
|
35761
|
-
//
|
|
35763
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/runtimeExtensions.js
|
|
35762
35764
|
var import_client24 = __toESM(require_client2(), 1);
|
|
35763
35765
|
var import_client25 = __toESM(require_client(), 1);
|
|
35764
35766
|
var import_protocols5 = __toESM(require_protocols(), 1);
|
|
35765
35767
|
|
|
35766
|
-
//
|
|
35768
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthExtensionConfiguration.js
|
|
35767
35769
|
var getHttpAuthExtensionConfiguration2 = (runtimeConfig) => {
|
|
35768
35770
|
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
35769
35771
|
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
@@ -35802,14 +35804,14 @@ var resolveHttpAuthRuntimeConfig2 = (config) => {
|
|
|
35802
35804
|
};
|
|
35803
35805
|
};
|
|
35804
35806
|
|
|
35805
|
-
//
|
|
35807
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/runtimeExtensions.js
|
|
35806
35808
|
var resolveRuntimeExtensions2 = (runtimeConfig, extensions) => {
|
|
35807
35809
|
const extensionConfiguration = Object.assign(import_client24.getAwsRegionExtensionConfiguration(runtimeConfig), import_client25.getDefaultExtensionConfiguration(runtimeConfig), import_protocols5.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration2(runtimeConfig));
|
|
35808
35810
|
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
35809
35811
|
return Object.assign(runtimeConfig, import_client24.resolveAwsRegionExtensionConfiguration(extensionConfiguration), import_client25.resolveDefaultRuntimeConfig(extensionConfiguration), import_protocols5.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig2(extensionConfiguration));
|
|
35810
35812
|
};
|
|
35811
35813
|
|
|
35812
|
-
//
|
|
35814
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/S3Client.js
|
|
35813
35815
|
class S3Client extends import_client27.Client {
|
|
35814
35816
|
config;
|
|
35815
35817
|
constructor(...[configuration]) {
|
|
@@ -35854,15 +35856,15 @@ class S3Client extends import_client27.Client {
|
|
|
35854
35856
|
}
|
|
35855
35857
|
}
|
|
35856
35858
|
|
|
35857
|
-
//
|
|
35859
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectCommand.js
|
|
35858
35860
|
class DeleteObjectCommand extends command(_ep0, _mw0, "DeleteObject", DeleteObject$) {
|
|
35859
35861
|
}
|
|
35860
35862
|
|
|
35861
|
-
//
|
|
35863
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectCommand.js
|
|
35862
35864
|
class GetObjectCommand extends command(_ep0, _mw7, "GetObject", GetObject$) {
|
|
35863
35865
|
}
|
|
35864
35866
|
|
|
35865
|
-
//
|
|
35867
|
+
// ../../node_modules/.bun/@aws-sdk+client-s3@3.1127.0/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectCommand.js
|
|
35866
35868
|
class PutObjectCommand extends command(_ep0, _mw11, "PutObject", PutObject$) {
|
|
35867
35869
|
}
|
|
35868
35870
|
|
|
@@ -36197,6 +36199,19 @@ function createCancelService(options) {
|
|
|
36197
36199
|
};
|
|
36198
36200
|
}
|
|
36199
36201
|
|
|
36202
|
+
// src/sdk/amounts.ts
|
|
36203
|
+
function assertCents(value, field) {
|
|
36204
|
+
if (!Number.isSafeInteger(value) || value < 0) {
|
|
36205
|
+
throw new RangeError(field + " must be a nonnegative safe integer number of cents");
|
|
36206
|
+
}
|
|
36207
|
+
}
|
|
36208
|
+
function assertReservationCents(value, field) {
|
|
36209
|
+
assertCents(value, field);
|
|
36210
|
+
if (value > 2147483647) {
|
|
36211
|
+
throw new RangeError(field + " must not exceed 2147483647 cents per reservation");
|
|
36212
|
+
}
|
|
36213
|
+
}
|
|
36214
|
+
|
|
36200
36215
|
// src/sdk/governance-store.ts
|
|
36201
36216
|
import { Database as Database2 } from "bun:sqlite";
|
|
36202
36217
|
import { randomUUID as randomUUID3 } from "crypto";
|
|
@@ -37530,7 +37545,9 @@ class MemoryGovernanceStore {
|
|
|
37530
37545
|
return this.receipts.filter((receipt) => receipt.orgId === orgId && receipt.runId === runId2);
|
|
37531
37546
|
}
|
|
37532
37547
|
async createReservation(input) {
|
|
37533
|
-
const
|
|
37548
|
+
const estimatedCents = input.estimatedCents;
|
|
37549
|
+
assertReservationCents(estimatedCents, "estimatedCents");
|
|
37550
|
+
const reservation = { ...input, estimatedCents, id: reservationId(), status: "reserved", createdAt: nowIso() };
|
|
37534
37551
|
this.reservations.push(reservation);
|
|
37535
37552
|
return reservation;
|
|
37536
37553
|
}
|
|
@@ -37538,6 +37555,7 @@ class MemoryGovernanceStore {
|
|
|
37538
37555
|
return this.reservations.filter((reservation) => reservation.orgId === orgId && reservation.runId === runId2);
|
|
37539
37556
|
}
|
|
37540
37557
|
async reconcileReservation(reservationId2, actualCents, status) {
|
|
37558
|
+
assertReservationCents(actualCents, "actualCents");
|
|
37541
37559
|
const reservation = this.reservations.find((candidate) => candidate.id === reservationId2);
|
|
37542
37560
|
if (!reservation || reservation.status !== "reserved")
|
|
37543
37561
|
return reservation ?? null;
|
|
@@ -37620,7 +37638,9 @@ class SqliteGovernanceStore {
|
|
|
37620
37638
|
}));
|
|
37621
37639
|
}
|
|
37622
37640
|
async createReservation(input) {
|
|
37623
|
-
const
|
|
37641
|
+
const estimatedCents = input.estimatedCents;
|
|
37642
|
+
assertReservationCents(estimatedCents, "estimatedCents");
|
|
37643
|
+
const reservation = { ...input, estimatedCents, id: reservationId(), status: "reserved", createdAt: nowIso() };
|
|
37624
37644
|
this.db.run(`INSERT INTO skills_credit_reservations (id, org_id, run_id, estimated_cents, status, created_at)
|
|
37625
37645
|
VALUES (?, ?, ?, ?, ?, ?)`, [reservation.id, reservation.orgId, reservation.runId, reservation.estimatedCents, reservation.status, reservation.createdAt]);
|
|
37626
37646
|
return reservation;
|
|
@@ -37630,6 +37650,7 @@ class SqliteGovernanceStore {
|
|
|
37630
37650
|
return rows.map((row) => this.reservationFrom(row));
|
|
37631
37651
|
}
|
|
37632
37652
|
async reconcileReservation(reservationId2, actualCents, status) {
|
|
37653
|
+
assertReservationCents(actualCents, "actualCents");
|
|
37633
37654
|
const updated = this.db.query(`UPDATE skills_credit_reservations SET actual_cents = ?, status = ?, reconciled_at = ?
|
|
37634
37655
|
WHERE id = ? AND status = 'reserved' RETURNING *`).get(actualCents, status, nowIso(), reservationId2);
|
|
37635
37656
|
if (updated)
|
|
@@ -37715,7 +37736,9 @@ class PostgresGovernanceStore {
|
|
|
37715
37736
|
}));
|
|
37716
37737
|
}
|
|
37717
37738
|
async createReservation(input) {
|
|
37718
|
-
const
|
|
37739
|
+
const estimatedCents = input.estimatedCents;
|
|
37740
|
+
assertReservationCents(estimatedCents, "estimatedCents");
|
|
37741
|
+
const reservation = { ...input, estimatedCents, id: reservationId(), status: "reserved", createdAt: nowIso() };
|
|
37719
37742
|
await this.sql`
|
|
37720
37743
|
INSERT INTO skills_credit_reservations (id, org_id, run_id, estimated_cents, status)
|
|
37721
37744
|
VALUES (${reservation.id}, ${reservation.orgId}, ${reservation.runId}, ${reservation.estimatedCents}, ${reservation.status})
|
|
@@ -37729,6 +37752,7 @@ class PostgresGovernanceStore {
|
|
|
37729
37752
|
return rows.map((row) => this.reservationFrom(row));
|
|
37730
37753
|
}
|
|
37731
37754
|
async reconcileReservation(reservationId2, actualCents, status) {
|
|
37755
|
+
assertReservationCents(actualCents, "actualCents");
|
|
37732
37756
|
const rows = await this.sql`
|
|
37733
37757
|
UPDATE skills_credit_reservations
|
|
37734
37758
|
SET actual_cents = ${actualCents}, status = ${status}, reconciled_at = now()
|
|
@@ -44132,7 +44156,7 @@ var bundledRegistry = {
|
|
|
44132
44156
|
var currentVersionService = {
|
|
44133
44157
|
resolveVersion: (record) => record.version
|
|
44134
44158
|
};
|
|
44135
|
-
//
|
|
44159
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/external.js
|
|
44136
44160
|
var exports_external = {};
|
|
44137
44161
|
__export(exports_external, {
|
|
44138
44162
|
void: () => voidType,
|
|
@@ -44244,7 +44268,7 @@ __export(exports_external, {
|
|
|
44244
44268
|
BRAND: () => BRAND
|
|
44245
44269
|
});
|
|
44246
44270
|
|
|
44247
|
-
//
|
|
44271
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.js
|
|
44248
44272
|
var util;
|
|
44249
44273
|
(function(util2) {
|
|
44250
44274
|
util2.assertEqual = (_) => {};
|
|
@@ -44375,7 +44399,7 @@ var getParsedType = (data) => {
|
|
|
44375
44399
|
}
|
|
44376
44400
|
};
|
|
44377
44401
|
|
|
44378
|
-
//
|
|
44402
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/ZodError.js
|
|
44379
44403
|
var ZodIssueCode = util.arrayToEnum([
|
|
44380
44404
|
"invalid_type",
|
|
44381
44405
|
"invalid_literal",
|
|
@@ -44494,7 +44518,7 @@ ZodError.create = (issues) => {
|
|
|
44494
44518
|
return error;
|
|
44495
44519
|
};
|
|
44496
44520
|
|
|
44497
|
-
//
|
|
44521
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/locales/en.js
|
|
44498
44522
|
var errorMap = (issue, _ctx) => {
|
|
44499
44523
|
let message;
|
|
44500
44524
|
switch (issue.code) {
|
|
@@ -44597,7 +44621,7 @@ var errorMap = (issue, _ctx) => {
|
|
|
44597
44621
|
};
|
|
44598
44622
|
var en_default = errorMap;
|
|
44599
44623
|
|
|
44600
|
-
//
|
|
44624
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/errors.js
|
|
44601
44625
|
var overrideErrorMap = en_default;
|
|
44602
44626
|
function setErrorMap(map) {
|
|
44603
44627
|
overrideErrorMap = map;
|
|
@@ -44605,7 +44629,7 @@ function setErrorMap(map) {
|
|
|
44605
44629
|
function getErrorMap() {
|
|
44606
44630
|
return overrideErrorMap;
|
|
44607
44631
|
}
|
|
44608
|
-
//
|
|
44632
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
44609
44633
|
var makeIssue = (params) => {
|
|
44610
44634
|
const { data, path, errorMaps, issueData } = params;
|
|
44611
44635
|
const fullPath = [...path, ...issueData.path || []];
|
|
@@ -44711,14 +44735,14 @@ var isAborted = (x2) => x2.status === "aborted";
|
|
|
44711
44735
|
var isDirty = (x2) => x2.status === "dirty";
|
|
44712
44736
|
var isValid = (x2) => x2.status === "valid";
|
|
44713
44737
|
var isAsync = (x2) => typeof Promise !== "undefined" && x2 instanceof Promise;
|
|
44714
|
-
//
|
|
44738
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
|
|
44715
44739
|
var errorUtil;
|
|
44716
44740
|
(function(errorUtil2) {
|
|
44717
44741
|
errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
44718
44742
|
errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
|
|
44719
44743
|
})(errorUtil || (errorUtil = {}));
|
|
44720
44744
|
|
|
44721
|
-
//
|
|
44745
|
+
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/types.js
|
|
44722
44746
|
class ParseInputLazyPath {
|
|
44723
44747
|
constructor(parent, value, path, key) {
|
|
44724
44748
|
this._cachedPath = [];
|
|
@@ -48165,19 +48189,22 @@ function leaseGenerationOf(run) {
|
|
|
48165
48189
|
function createRunService({ store, governance }) {
|
|
48166
48190
|
return {
|
|
48167
48191
|
async admit(input) {
|
|
48192
|
+
const estimatedCents = governance?.estimatedCents;
|
|
48193
|
+
if (estimatedCents !== undefined)
|
|
48194
|
+
assertReservationCents(estimatedCents, "estimatedCents");
|
|
48168
48195
|
if (governance) {
|
|
48169
48196
|
await governance.offline?.assertCanRunLocal(input.slug);
|
|
48170
48197
|
await governance.spend?.admit({
|
|
48171
48198
|
principal: input.principal,
|
|
48172
48199
|
slug: input.slug,
|
|
48173
48200
|
quota: governance.quota,
|
|
48174
|
-
estimatedCents
|
|
48201
|
+
estimatedCents
|
|
48175
48202
|
});
|
|
48176
48203
|
}
|
|
48177
48204
|
const run = await store.createRun(input);
|
|
48178
48205
|
if (governance) {
|
|
48179
|
-
if (governance.spend &&
|
|
48180
|
-
await governance.spend.reserve(run.orgId, run.id,
|
|
48206
|
+
if (governance.spend && estimatedCents !== undefined) {
|
|
48207
|
+
await governance.spend.reserve(run.orgId, run.id, estimatedCents);
|
|
48181
48208
|
}
|
|
48182
48209
|
await governance.events?.emit("skills.run.admitted", run);
|
|
48183
48210
|
}
|
|
@@ -48189,8 +48216,10 @@ function createRunService({ store, governance }) {
|
|
|
48189
48216
|
};
|
|
48190
48217
|
}
|
|
48191
48218
|
async function settleRun(store, options, run, actualCents) {
|
|
48219
|
+
const amount = actualCents === undefined ? run.costCents : actualCents;
|
|
48220
|
+
assertReservationCents(amount, "actualCents");
|
|
48192
48221
|
if (options.spend) {
|
|
48193
|
-
await options.spend.reconcile(run.orgId, run.id,
|
|
48222
|
+
await options.spend.reconcile(run.orgId, run.id, amount);
|
|
48194
48223
|
}
|
|
48195
48224
|
if (options.events) {
|
|
48196
48225
|
const type = run.status === "cancelled" ? "skills.run.cancelled" : "skills.run.terminal";
|
|
@@ -48983,7 +49012,7 @@ function createReceiptService(store) {
|
|
|
48983
49012
|
// src/sdk/execution/dispatchers/ecs.ts
|
|
48984
49013
|
import { createHash as createHash11 } from "crypto";
|
|
48985
49014
|
|
|
48986
|
-
//
|
|
49015
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/ECSClient.js
|
|
48987
49016
|
var import_client36 = __toESM(require_client2(), 1);
|
|
48988
49017
|
var import_core2 = __toESM(require_dist_cjs2(), 1);
|
|
48989
49018
|
var import_client37 = __toESM(require_client(), 1);
|
|
@@ -48993,7 +49022,7 @@ var import_protocols10 = __toESM(require_protocols(), 1);
|
|
|
48993
49022
|
var import_retry6 = __toESM(require_retry(), 1);
|
|
48994
49023
|
var import_schema4 = __toESM(require_schema(), 1);
|
|
48995
49024
|
|
|
48996
|
-
//
|
|
49025
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/auth/httpAuthSchemeProvider.js
|
|
48997
49026
|
var import_httpAuthSchemes4 = __toESM(require_httpAuthSchemes(), 1);
|
|
48998
49027
|
var import_client28 = __toESM(require_client(), 1);
|
|
48999
49028
|
var defaultECSHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
@@ -49035,7 +49064,7 @@ var resolveHttpAuthSchemeConfig3 = (config) => {
|
|
|
49035
49064
|
});
|
|
49036
49065
|
};
|
|
49037
49066
|
|
|
49038
|
-
//
|
|
49067
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/endpoint/EndpointParameters.js
|
|
49039
49068
|
var resolveClientEndpointParameters3 = (options) => {
|
|
49040
49069
|
return Object.assign(options, {
|
|
49041
49070
|
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
@@ -49049,7 +49078,7 @@ var commonParams3 = {
|
|
|
49049
49078
|
Region: { type: "builtInParams", name: "region" },
|
|
49050
49079
|
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
|
|
49051
49080
|
};
|
|
49052
|
-
//
|
|
49081
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/package.json
|
|
49053
49082
|
var package_default3 = {
|
|
49054
49083
|
name: "@aws-sdk/client-ecs",
|
|
49055
49084
|
version: "3.1127.0",
|
|
@@ -49122,7 +49151,7 @@ var package_default3 = {
|
|
|
49122
49151
|
}
|
|
49123
49152
|
};
|
|
49124
49153
|
|
|
49125
|
-
//
|
|
49154
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/runtimeConfig.js
|
|
49126
49155
|
var import_client32 = __toESM(require_client2(), 1);
|
|
49127
49156
|
var import_httpAuthSchemes6 = __toESM(require_httpAuthSchemes(), 1);
|
|
49128
49157
|
var import_client33 = __toESM(require_client(), 1);
|
|
@@ -49131,7 +49160,7 @@ var import_retry5 = __toESM(require_retry(), 1);
|
|
|
49131
49160
|
var import_serde6 = __toESM(require_serde(), 1);
|
|
49132
49161
|
var import_node_http_handler3 = __toESM(require_dist_cjs6(), 1);
|
|
49133
49162
|
|
|
49134
|
-
//
|
|
49163
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/runtimeConfig.shared.js
|
|
49135
49164
|
var import_httpAuthSchemes5 = __toESM(require_httpAuthSchemes(), 1);
|
|
49136
49165
|
var import_protocols7 = __toESM(require_protocols2(), 1);
|
|
49137
49166
|
var import_checksum3 = __toESM(require_checksum(), 1);
|
|
@@ -49139,11 +49168,11 @@ var import_client31 = __toESM(require_client(), 1);
|
|
|
49139
49168
|
var import_protocols8 = __toESM(require_protocols(), 1);
|
|
49140
49169
|
var import_serde5 = __toESM(require_serde(), 1);
|
|
49141
49170
|
|
|
49142
|
-
//
|
|
49171
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/endpoint/endpointResolver.js
|
|
49143
49172
|
var import_client29 = __toESM(require_client2(), 1);
|
|
49144
49173
|
var import_endpoints7 = __toESM(require_endpoints(), 1);
|
|
49145
49174
|
|
|
49146
|
-
//
|
|
49175
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/endpoint/bdd.js
|
|
49147
49176
|
var import_endpoints6 = __toESM(require_endpoints(), 1);
|
|
49148
49177
|
var k3 = "ref";
|
|
49149
49178
|
var a3 = -1;
|
|
@@ -49226,7 +49255,7 @@ var nodes3 = new Int32Array([
|
|
|
49226
49255
|
]);
|
|
49227
49256
|
var bdd3 = import_endpoints6.BinaryDecisionDiagram.from(nodes3, root3, _data3.conditions, _data3.results);
|
|
49228
49257
|
|
|
49229
|
-
//
|
|
49258
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/endpoint/endpointResolver.js
|
|
49230
49259
|
var cache3 = new import_endpoints7.EndpointCache({
|
|
49231
49260
|
size: 50,
|
|
49232
49261
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
|
|
@@ -49239,10 +49268,10 @@ var defaultEndpointResolver3 = (endpointParams, context = {}) => {
|
|
|
49239
49268
|
};
|
|
49240
49269
|
import_endpoints7.customEndpointFunctions.aws = import_client29.awsEndpointFunctions;
|
|
49241
49270
|
|
|
49242
|
-
//
|
|
49271
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/schemas/schemas_0.js
|
|
49243
49272
|
var import_schema3 = __toESM(require_schema(), 1);
|
|
49244
49273
|
|
|
49245
|
-
//
|
|
49274
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/models/ECSServiceException.js
|
|
49246
49275
|
var import_client30 = __toESM(require_client(), 1);
|
|
49247
49276
|
class ECSServiceException extends import_client30.ServiceException {
|
|
49248
49277
|
constructor(options) {
|
|
@@ -49251,7 +49280,7 @@ class ECSServiceException extends import_client30.ServiceException {
|
|
|
49251
49280
|
}
|
|
49252
49281
|
}
|
|
49253
49282
|
|
|
49254
|
-
//
|
|
49283
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/models/errors.js
|
|
49255
49284
|
class AccessDeniedException extends ECSServiceException {
|
|
49256
49285
|
name = "AccessDeniedException";
|
|
49257
49286
|
$fault = "client";
|
|
@@ -49644,7 +49673,7 @@ class BlockedException extends ECSServiceException {
|
|
|
49644
49673
|
}
|
|
49645
49674
|
}
|
|
49646
49675
|
|
|
49647
|
-
//
|
|
49676
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/schemas/schemas_0.js
|
|
49648
49677
|
var _A2 = "Attachment";
|
|
49649
49678
|
var _ACR = "AcceleratorCountRequest";
|
|
49650
49679
|
var _AD2 = "AttachmentDetails";
|
|
@@ -52031,7 +52060,7 @@ var StopTask$ = [
|
|
|
52031
52060
|
() => StopTaskResponse$
|
|
52032
52061
|
];
|
|
52033
52062
|
|
|
52034
|
-
//
|
|
52063
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/runtimeConfig.shared.js
|
|
52035
52064
|
var getRuntimeConfig4 = (config) => {
|
|
52036
52065
|
return {
|
|
52037
52066
|
apiVersion: "2014-11-13",
|
|
@@ -52065,7 +52094,7 @@ var getRuntimeConfig4 = (config) => {
|
|
|
52065
52094
|
};
|
|
52066
52095
|
};
|
|
52067
52096
|
|
|
52068
|
-
//
|
|
52097
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/runtimeConfig.js
|
|
52069
52098
|
var getRuntimeConfig5 = (config) => {
|
|
52070
52099
|
import_client33.emitWarningIfUnsupportedVersion(process.version);
|
|
52071
52100
|
const defaultsMode = import_config38.resolveDefaultsModeConfig(config);
|
|
@@ -52099,12 +52128,12 @@ var getRuntimeConfig5 = (config) => {
|
|
|
52099
52128
|
};
|
|
52100
52129
|
};
|
|
52101
52130
|
|
|
52102
|
-
//
|
|
52131
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/runtimeExtensions.js
|
|
52103
52132
|
var import_client34 = __toESM(require_client2(), 1);
|
|
52104
52133
|
var import_client35 = __toESM(require_client(), 1);
|
|
52105
52134
|
var import_protocols9 = __toESM(require_protocols(), 1);
|
|
52106
52135
|
|
|
52107
|
-
//
|
|
52136
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/auth/httpAuthExtensionConfiguration.js
|
|
52108
52137
|
var getHttpAuthExtensionConfiguration3 = (runtimeConfig) => {
|
|
52109
52138
|
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
52110
52139
|
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
@@ -52143,14 +52172,14 @@ var resolveHttpAuthRuntimeConfig3 = (config) => {
|
|
|
52143
52172
|
};
|
|
52144
52173
|
};
|
|
52145
52174
|
|
|
52146
|
-
//
|
|
52175
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/runtimeExtensions.js
|
|
52147
52176
|
var resolveRuntimeExtensions3 = (runtimeConfig, extensions) => {
|
|
52148
52177
|
const extensionConfiguration = Object.assign(import_client34.getAwsRegionExtensionConfiguration(runtimeConfig), import_client35.getDefaultExtensionConfiguration(runtimeConfig), import_protocols9.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration3(runtimeConfig));
|
|
52149
52178
|
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
52150
52179
|
return Object.assign(runtimeConfig, import_client34.resolveAwsRegionExtensionConfiguration(extensionConfiguration), import_client35.resolveDefaultRuntimeConfig(extensionConfiguration), import_protocols9.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig3(extensionConfiguration));
|
|
52151
52180
|
};
|
|
52152
52181
|
|
|
52153
|
-
//
|
|
52182
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/ECSClient.js
|
|
52154
52183
|
class ECSClient extends import_client37.Client {
|
|
52155
52184
|
config;
|
|
52156
52185
|
constructor(...[configuration]) {
|
|
@@ -52186,26 +52215,26 @@ class ECSClient extends import_client37.Client {
|
|
|
52186
52215
|
}
|
|
52187
52216
|
}
|
|
52188
52217
|
|
|
52189
|
-
//
|
|
52218
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/commandBuilder.js
|
|
52190
52219
|
var import_client38 = __toESM(require_client(), 1);
|
|
52191
52220
|
var import_endpoints9 = __toESM(require_endpoints(), 1);
|
|
52192
52221
|
var command3 = import_client38.makeBuilder(commonParams3, "AmazonEC2ContainerServiceV20141113", "ECSClient", import_endpoints9.getEndpointPlugin);
|
|
52193
52222
|
var _ep03 = {};
|
|
52194
52223
|
var _mw03 = (Command, cs, config, o2) => [];
|
|
52195
52224
|
|
|
52196
|
-
//
|
|
52225
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/commands/DescribeTasksCommand.js
|
|
52197
52226
|
class DescribeTasksCommand extends command3(_ep03, _mw03, "DescribeTasks", DescribeTasks$) {
|
|
52198
52227
|
}
|
|
52199
52228
|
|
|
52200
|
-
//
|
|
52229
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/commands/ListTasksCommand.js
|
|
52201
52230
|
class ListTasksCommand extends command3(_ep03, _mw03, "ListTasks", ListTasks$) {
|
|
52202
52231
|
}
|
|
52203
52232
|
|
|
52204
|
-
//
|
|
52233
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/commands/RunTaskCommand.js
|
|
52205
52234
|
class RunTaskCommand extends command3(_ep03, _mw03, "RunTask", RunTask$) {
|
|
52206
52235
|
}
|
|
52207
52236
|
|
|
52208
|
-
//
|
|
52237
|
+
// ../../node_modules/.bun/@aws-sdk+client-ecs@3.1127.0/node_modules/@aws-sdk/client-ecs/dist-es/commands/StopTaskCommand.js
|
|
52209
52238
|
class StopTaskCommand extends command3(_ep03, _mw03, "StopTask", StopTask$) {
|
|
52210
52239
|
}
|
|
52211
52240
|
|
|
@@ -52707,11 +52736,14 @@ function createRunEventEmitter(options = {}) {
|
|
|
52707
52736
|
function createSpendService(options) {
|
|
52708
52737
|
const store = options.governanceStore;
|
|
52709
52738
|
const ceilings = { ...DEFAULT_SPEND_CEILINGS, ...options.ceilings, perRun: { ...DEFAULT_SPEND_CEILINGS.perRun, ...options.ceilings?.perRun } };
|
|
52739
|
+
assertCents(ceilings.monthlyTotalCents, "monthlyTotalCents");
|
|
52710
52740
|
function exhaust(ceiling, detail) {
|
|
52711
52741
|
throw new GovernanceError(GOVERNANCE_ERROR_CODES.RUN_BUDGET_EXHAUSTED, `admission refused for run: ${detail}`, { gate: "spend", ceiling });
|
|
52712
52742
|
}
|
|
52713
52743
|
return {
|
|
52714
52744
|
async admit(input) {
|
|
52745
|
+
const estimated = input.estimatedCents === undefined ? 0 : input.estimatedCents;
|
|
52746
|
+
assertReservationCents(estimated, "estimatedCents");
|
|
52715
52747
|
const quota = input.quota ?? ceilings.perRun;
|
|
52716
52748
|
const perRun = ceilings.perRun;
|
|
52717
52749
|
const over = (label, requested, allowed) => requested > allowed;
|
|
@@ -52732,15 +52764,17 @@ function createSpendService(options) {
|
|
|
52732
52764
|
const now2 = input.now ?? new Date;
|
|
52733
52765
|
const monthPrefix = now2.toISOString().slice(0, 7);
|
|
52734
52766
|
const monthly = await store.monthlySpendCents(input.principal.orgId, monthPrefix);
|
|
52735
|
-
|
|
52736
|
-
if (
|
|
52767
|
+
assertCents(monthly, "monthlySpendCents");
|
|
52768
|
+
if (estimated > ceilings.monthlyTotalCents - monthly) {
|
|
52737
52769
|
exhaust("monthly", `org spend for ${monthPrefix} is ${monthly} cents and this run estimates ${estimated}; monthly ceiling is ${ceilings.monthlyTotalCents} cents`);
|
|
52738
52770
|
}
|
|
52739
52771
|
},
|
|
52740
52772
|
async reserve(tenantId, runId2, estimatedCents) {
|
|
52773
|
+
assertReservationCents(estimatedCents, "estimatedCents");
|
|
52741
52774
|
return store.createReservation({ orgId: tenantId, runId: runId2, estimatedCents });
|
|
52742
52775
|
},
|
|
52743
52776
|
async reconcile(tenantId, runId2, actualCents) {
|
|
52777
|
+
assertReservationCents(actualCents, "actualCents");
|
|
52744
52778
|
const reservations = await store.reservationsForRun(tenantId, runId2);
|
|
52745
52779
|
const open = reservations.find((reservation) => reservation.status === "reserved");
|
|
52746
52780
|
if (!open)
|