@limetry/sdk 1.2.60 → 1.2.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/dist/app-version.d.ts +1 -1
- package/dist/app-version.js +1 -1
- package/dist/compatibility.d.ts +12 -12
- package/dist/compatibility.js +12 -12
- package/dist/engine/remote-engine.d.ts +1 -1
- package/dist/engine/remote-engine.d.ts.map +1 -1
- package/dist/engine/remote-engine.js +3 -6
- package/dist/engine/remote-engine.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/urls.d.ts +36 -0
- package/dist/urls.d.ts.map +1 -0
- package/dist/urls.js +43 -0
- package/dist/urls.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,14 +8,15 @@ TypeScript SDK for Limetry agent action governance. Evaluate an action before it
|
|
|
8
8
|
npm install @limetry/sdk
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
the
|
|
11
|
+
This installs the published package, so `npm install`, `yarn add`, and
|
|
12
|
+
`pnpm add` are equivalent. For a cloned Limetry repository, use the root Yarn
|
|
13
|
+
Berry workspace instructions.
|
|
13
14
|
|
|
14
15
|
Requires Node.js 20 or newer.
|
|
15
16
|
|
|
16
17
|
## Evaluate an action
|
|
17
18
|
|
|
18
|
-
`LIMETRY_API_KEY` is a bearer token from `limetry setup` or your organization. `LIMETRY_BASE_URL` overrides the default API origin.
|
|
19
|
+
`LIMETRY_API_KEY` is a bearer token from `limetry setup` or your organization. `LIMETRY_BASE_URL` overrides the default API origin (`https://api.limetry.org`).
|
|
19
20
|
|
|
20
21
|
```ts
|
|
21
22
|
import { createRemoteEngine } from "@limetry/sdk"
|
package/dist/app-version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const APP_VERSION = "1.2.
|
|
1
|
+
export declare const APP_VERSION = "1.2.63";
|
|
2
2
|
//# sourceMappingURL=app-version.d.ts.map
|
package/dist/app-version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const APP_VERSION = "1.2.
|
|
1
|
+
export const APP_VERSION = "1.2.63";
|
|
2
2
|
//# sourceMappingURL=app-version.js.map
|
package/dist/compatibility.d.ts
CHANGED
|
@@ -2,55 +2,55 @@
|
|
|
2
2
|
* Product, package, website, and schema compatibility for this release.
|
|
3
3
|
*/
|
|
4
4
|
export declare const COMPATIBILITY: {
|
|
5
|
-
readonly product: "1.2.
|
|
5
|
+
readonly product: "1.2.63";
|
|
6
6
|
readonly compatibleProduct: ">=1.2.0 <1.3.0";
|
|
7
7
|
readonly packages: {
|
|
8
8
|
readonly "@limetry/ci": {
|
|
9
|
-
readonly version: "1.2.
|
|
9
|
+
readonly version: "1.2.63";
|
|
10
10
|
readonly compatible: ">=1.2.0 <1.3.0";
|
|
11
11
|
};
|
|
12
12
|
readonly "@limetry/cli": {
|
|
13
|
-
readonly version: "1.2.
|
|
13
|
+
readonly version: "1.2.63";
|
|
14
14
|
readonly compatible: ">=1.2.0 <1.3.0";
|
|
15
15
|
};
|
|
16
16
|
readonly "@limetry/mcp": {
|
|
17
|
-
readonly version: "1.2.
|
|
17
|
+
readonly version: "1.2.63";
|
|
18
18
|
readonly compatible: ">=1.2.0 <1.3.0";
|
|
19
19
|
};
|
|
20
20
|
readonly "@limetry/preflight": {
|
|
21
|
-
readonly version: "1.2.
|
|
21
|
+
readonly version: "1.2.63";
|
|
22
22
|
readonly compatible: ">=1.2.0 <1.3.0";
|
|
23
23
|
};
|
|
24
24
|
readonly "@limetry/sdk": {
|
|
25
|
-
readonly version: "1.2.
|
|
25
|
+
readonly version: "1.2.63";
|
|
26
26
|
readonly compatible: ">=1.2.0 <1.3.0";
|
|
27
27
|
};
|
|
28
28
|
readonly "@limetry/shopify": {
|
|
29
|
-
readonly version: "1.2.
|
|
29
|
+
readonly version: "1.2.63";
|
|
30
30
|
readonly compatible: ">=1.2.0 <1.3.0";
|
|
31
31
|
};
|
|
32
32
|
readonly "@limetry/sql": {
|
|
33
|
-
readonly version: "1.2.
|
|
33
|
+
readonly version: "1.2.63";
|
|
34
34
|
readonly compatible: ">=1.2.0 <1.3.0";
|
|
35
35
|
};
|
|
36
36
|
readonly "@limetry/ui": {
|
|
37
|
-
readonly version: "1.2.
|
|
37
|
+
readonly version: "1.2.63";
|
|
38
38
|
readonly compatible: ">=1.2.0 <1.3.0";
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
41
|
readonly websites: {
|
|
42
42
|
readonly oss: {
|
|
43
|
-
readonly version: "1.2.
|
|
43
|
+
readonly version: "1.2.63";
|
|
44
44
|
readonly compatible: ">=1.2.0 <1.3.0";
|
|
45
45
|
};
|
|
46
46
|
readonly cloud: {
|
|
47
|
-
readonly version: "1.2.
|
|
47
|
+
readonly version: "1.2.63";
|
|
48
48
|
readonly compatible: ">=1.2.0 <1.3.0";
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
51
|
readonly schemas: {
|
|
52
52
|
readonly "openapi.evaluate": {
|
|
53
|
-
readonly version: "1.0.
|
|
53
|
+
readonly version: "1.0.1";
|
|
54
54
|
readonly compatible: ">=1.0.0 <2.0.0";
|
|
55
55
|
};
|
|
56
56
|
readonly "openapi.custom-gpt": {
|
package/dist/compatibility.js
CHANGED
|
@@ -2,55 +2,55 @@
|
|
|
2
2
|
* Product, package, website, and schema compatibility for this release.
|
|
3
3
|
*/
|
|
4
4
|
export const COMPATIBILITY = {
|
|
5
|
-
"product": "1.2.
|
|
5
|
+
"product": "1.2.63",
|
|
6
6
|
"compatibleProduct": ">=1.2.0 <1.3.0",
|
|
7
7
|
"packages": {
|
|
8
8
|
"@limetry/ci": {
|
|
9
|
-
"version": "1.2.
|
|
9
|
+
"version": "1.2.63",
|
|
10
10
|
"compatible": ">=1.2.0 <1.3.0",
|
|
11
11
|
},
|
|
12
12
|
"@limetry/cli": {
|
|
13
|
-
"version": "1.2.
|
|
13
|
+
"version": "1.2.63",
|
|
14
14
|
"compatible": ">=1.2.0 <1.3.0",
|
|
15
15
|
},
|
|
16
16
|
"@limetry/mcp": {
|
|
17
|
-
"version": "1.2.
|
|
17
|
+
"version": "1.2.63",
|
|
18
18
|
"compatible": ">=1.2.0 <1.3.0",
|
|
19
19
|
},
|
|
20
20
|
"@limetry/preflight": {
|
|
21
|
-
"version": "1.2.
|
|
21
|
+
"version": "1.2.63",
|
|
22
22
|
"compatible": ">=1.2.0 <1.3.0",
|
|
23
23
|
},
|
|
24
24
|
"@limetry/sdk": {
|
|
25
|
-
"version": "1.2.
|
|
25
|
+
"version": "1.2.63",
|
|
26
26
|
"compatible": ">=1.2.0 <1.3.0",
|
|
27
27
|
},
|
|
28
28
|
"@limetry/shopify": {
|
|
29
|
-
"version": "1.2.
|
|
29
|
+
"version": "1.2.63",
|
|
30
30
|
"compatible": ">=1.2.0 <1.3.0",
|
|
31
31
|
},
|
|
32
32
|
"@limetry/sql": {
|
|
33
|
-
"version": "1.2.
|
|
33
|
+
"version": "1.2.63",
|
|
34
34
|
"compatible": ">=1.2.0 <1.3.0",
|
|
35
35
|
},
|
|
36
36
|
"@limetry/ui": {
|
|
37
|
-
"version": "1.2.
|
|
37
|
+
"version": "1.2.63",
|
|
38
38
|
"compatible": ">=1.2.0 <1.3.0",
|
|
39
39
|
},
|
|
40
40
|
},
|
|
41
41
|
"websites": {
|
|
42
42
|
"oss": {
|
|
43
|
-
"version": "1.2.
|
|
43
|
+
"version": "1.2.63",
|
|
44
44
|
"compatible": ">=1.2.0 <1.3.0",
|
|
45
45
|
},
|
|
46
46
|
"cloud": {
|
|
47
|
-
"version": "1.2.
|
|
47
|
+
"version": "1.2.63",
|
|
48
48
|
"compatible": ">=1.2.0 <1.3.0",
|
|
49
49
|
},
|
|
50
50
|
},
|
|
51
51
|
"schemas": {
|
|
52
52
|
"openapi.evaluate": {
|
|
53
|
-
"version": "1.0.
|
|
53
|
+
"version": "1.0.1",
|
|
54
54
|
"compatible": ">=1.0.0 <2.0.0",
|
|
55
55
|
},
|
|
56
56
|
"openapi.custom-gpt": {
|
|
@@ -11,7 +11,7 @@ import type { ActionEvaluationResponse, ActionIntent } from "../types.js";
|
|
|
11
11
|
export type RemotePolicyEngineOptions = {
|
|
12
12
|
/**
|
|
13
13
|
* Base URL of the Limetry server.
|
|
14
|
-
* Defaults to the
|
|
14
|
+
* Defaults to the OSS production API: https://api.limetry.org
|
|
15
15
|
*/
|
|
16
16
|
baseUrl?: string;
|
|
17
17
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-engine.d.ts","sourceRoot":"","sources":["../../src/engine/remote-engine.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EACV,wBAAwB,EACxB,YAAY,EACb,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"remote-engine.d.ts","sourceRoot":"","sources":["../../src/engine/remote-engine.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EACV,wBAAwB,EACxB,YAAY,EACb,MAAM,aAAa,CAAA;AAGpB;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAA;CAChC,CAAA;AAmCD;;GAEG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAQ;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAQ;IAC/B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAQ;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;IAEjD;;;;;;;;OAQG;gBACS,OAAO,EAAE,yBAAyB;IAc9C;;;;;;OAMG;IACG,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,wBAAwB,CAAC;CAa9E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,GAAG,kBAAkB,CAiBrG"}
|
|
@@ -5,10 +5,7 @@
|
|
|
5
5
|
* {@link createRemoteEngine} to construct an instance from environment variables.
|
|
6
6
|
*/
|
|
7
7
|
import { EngineLoadError } from "../errors.js";
|
|
8
|
-
|
|
9
|
-
* Default hosted Limetry API origin when `baseUrl` is omitted.
|
|
10
|
-
*/
|
|
11
|
-
const DEFAULT_BASE_URL = "https://api.limetry.com";
|
|
8
|
+
import { resolveLimetryBaseUrl } from "../urls.js";
|
|
12
9
|
/**
|
|
13
10
|
* Posts a JSON body to a Limetry API URL with Bearer authentication.
|
|
14
11
|
*
|
|
@@ -52,7 +49,7 @@ export class RemotePolicyEngine {
|
|
|
52
49
|
* @throws {@link EngineLoadError} when no `fetch` implementation is available.
|
|
53
50
|
*/
|
|
54
51
|
constructor(options) {
|
|
55
|
-
this.baseUrl = (options.baseUrl
|
|
52
|
+
this.baseUrl = resolveLimetryBaseUrl(process.env, options.baseUrl);
|
|
56
53
|
this.apiKey = options.apiKey;
|
|
57
54
|
this.tenantId = options.tenantId ?? "default";
|
|
58
55
|
this.fetcher = options.fetch ?? globalThis.fetch;
|
|
@@ -96,7 +93,7 @@ export function createRemoteEngine(overrides) {
|
|
|
96
93
|
throw new EngineLoadError("No Limetry API key found. Set LIMETRY_API_KEY or run `limetry setup`.");
|
|
97
94
|
}
|
|
98
95
|
return new RemotePolicyEngine({
|
|
99
|
-
baseUrl:
|
|
96
|
+
baseUrl: resolveLimetryBaseUrl(process.env, overrides?.baseUrl),
|
|
100
97
|
apiKey,
|
|
101
98
|
...overrides,
|
|
102
99
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-engine.js","sourceRoot":"","sources":["../../src/engine/remote-engine.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"remote-engine.js","sourceRoot":"","sources":["../../src/engine/remote-engine.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAK9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AA0BlD;;;;;;;;;GASG;AACH,KAAK,UAAU,OAAO,CACpB,OAAgC,EAChC,GAAW,EACX,MAAc,EACd,IAAa;IAEb,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,GAAG,EAAE;QAClC,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACP,eAAe,EAAE,UAAU,MAAM,EAAE;YACnC,cAAc,EAAE,kBAAkB;SACnC;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;KAC3B,CAAC,CAAA;IAEF,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,QAAQ,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;QACzE,MAAM,IAAI,eAAe,CAAC,gCAAgC,QAAQ,CAAC,MAAM,MAAM,IAAI,EAAE,CAAC,CAAA;IACxF,CAAC;IAED,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAA;AACxB,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,kBAAkB;IACZ,OAAO,CAAQ;IACf,MAAM,CAAQ;IACd,QAAQ,CAAQ;IAChB,OAAO,CAAyB;IAEjD;;;;;;;;OAQG;IACH,YAAY,OAAkC;QAC5C,IAAI,CAAC,OAAO,GAAG,qBAAqB,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,OAAO,CAAC,CAAA;QAClE,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAA;QAC5B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,SAAS,CAAA;QAC7C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,UAAU,CAAC,KAAK,CAAA;QAEhD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,MAAM,IAAI,eAAe,CACvB,6DAA6D;gBAC7D,0DAA0D,CAC3D,CAAA;QACH,CAAC;IACH,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,cAAc,CAAC,MAAoB;QACvC,MAAM,MAAM,GAAG,MAAM,OAAO,CAC1B,IAAI,CAAC,OAAO,EACZ,GAAG,IAAI,CAAC,OAAO,qBAAqB,EACpC,IAAI,CAAC,MAAM,EACX;YACE,SAAS,EAAE,IAAI,CAAC,QAAQ;YACxB,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,MAAM;SACP,CACF,CAAA;QACD,OAAO,MAAkC,CAAA;IAC3C,CAAC;CACF;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kBAAkB,CAAC,SAA8C;IAC/E,MAAM,MAAM,GACV,SAAS,EAAE,MAAM;QACjB,OAAO,CAAC,GAAG,CAAC,eAAe;QAC3B,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAA;IAElC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,eAAe,CACvB,uEAAuE,CACxE,CAAA;IACH,CAAC;IAED,OAAO,IAAI,kBAAkB,CAAC;QAC5B,OAAO,EAAE,qBAAqB,CAAC,OAAO,CAAC,GAAG,EAAE,SAAS,EAAE,OAAO,CAAC;QAC/D,MAAM;QACN,GAAG,SAAS;KACb,CAAC,CAAA;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -16,4 +16,5 @@ export { EngineLoadError, LimetryError, PaymentInterceptionError, PolicyViolatio
|
|
|
16
16
|
export { createSlimActionPolicy, createSlimPolicy, type SlimActionPolicyInput, type SlimPolicyInput, } from "./policy/slim-policy.js";
|
|
17
17
|
export { type AuditIntentProjection, type AuditMode, buildEvaluatedAuditDetails, buildMinimizedAuthorizationRequest, buildMinimizedAuthorizationResponse, buildRecordedAuditDetails, DEFAULT_AUDIT_MODE, isSensitiveKey, projectIntentForAudit, redactActionIntent, redactDetails, redactMetadata, resolveAuditMode, scrubEmbeddedSecrets, scrubResource, } from "./privacy/redact.js";
|
|
18
18
|
export type * from "./types.js";
|
|
19
|
+
export { DEFAULT_LIMETRY_BASE_URL, LIMETRY_CLOUD_ORIGINS, LIMETRY_OSS_ORIGINS, resolveLimetryBaseUrl, } from "./urls.js";
|
|
19
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,YAAY,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,YAAY,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,kBAAkB,EAAC,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AACjF,OAAO,EACL,eAAe,EACf,YAAY,EACZ,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,GACrB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,0BAA0B,EAC1B,kCAAkC,EAClC,mCAAmC,EACnC,yBAAyB,EACzB,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,GACd,MAAM,qBAAqB,CAAA;AAC5B,mBAAmB,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,YAAY,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,YAAY,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,kBAAkB,EAAC,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AACjF,OAAO,EACL,eAAe,EACf,YAAY,EACZ,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,GACrB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EACd,0BAA0B,EAC1B,kCAAkC,EAClC,mCAAmC,EACnC,yBAAyB,EACzB,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,GACd,MAAM,qBAAqB,CAAA;AAC5B,mBAAmB,YAAY,CAAA;AAC/B,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,WAAW,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -13,4 +13,5 @@ export { createRemoteEngine, RemotePolicyEngine } from "./engine/remote-engine.j
|
|
|
13
13
|
export { EngineLoadError, LimetryError, PaymentInterceptionError, PolicyViolationError, RateLimitExceededError, } from "./errors.js";
|
|
14
14
|
export { createSlimActionPolicy, createSlimPolicy, } from "./policy/slim-policy.js";
|
|
15
15
|
export { buildEvaluatedAuditDetails, buildMinimizedAuthorizationRequest, buildMinimizedAuthorizationResponse, buildRecordedAuditDetails, DEFAULT_AUDIT_MODE, isSensitiveKey, projectIntentForAudit, redactActionIntent, redactDetails, redactMetadata, resolveAuditMode, scrubEmbeddedSecrets, scrubResource, } from "./privacy/redact.js";
|
|
16
|
+
export { DEFAULT_LIMETRY_BASE_URL, LIMETRY_CLOUD_ORIGINS, LIMETRY_OSS_ORIGINS, resolveLimetryBaseUrl, } from "./urls.js";
|
|
16
17
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAGlD,OAAO,EAAE,kBAAkB,EAAC,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AACjF,OAAO,EACL,eAAe,EACf,YAAY,EACZ,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,sBAAsB,EACtB,gBAAgB,GAGjB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAGL,0BAA0B,EAC1B,kCAAkC,EAClC,mCAAmC,EACnC,yBAAyB,EACzB,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,GACd,MAAM,qBAAqB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAGlD,OAAO,EAAE,kBAAkB,EAAC,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AACjF,OAAO,EACL,eAAe,EACf,YAAY,EACZ,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,sBAAsB,EACtB,gBAAgB,GAGjB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAGL,0BAA0B,EAC1B,kCAAkC,EAClC,mCAAmC,EACnC,yBAAyB,EACzB,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,GACd,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,WAAW,CAAA"}
|
package/dist/urls.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical Limetry product origins for OSS and Cloud.
|
|
3
|
+
*
|
|
4
|
+
* Published npm packages resolve API calls to these hosts when
|
|
5
|
+
* `LIMETRY_BASE_URL` is unset.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Production origins for the open-source product (limetry.org).
|
|
9
|
+
*/
|
|
10
|
+
export declare const LIMETRY_OSS_ORIGINS: {
|
|
11
|
+
readonly web: "https://limetry.org";
|
|
12
|
+
readonly api: "https://api.limetry.org";
|
|
13
|
+
readonly app: "https://app.limetry.com";
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Production origins for Limetry Cloud (limetry.com).
|
|
17
|
+
*/
|
|
18
|
+
export declare const LIMETRY_CLOUD_ORIGINS: {
|
|
19
|
+
readonly web: "https://limetry.com";
|
|
20
|
+
readonly api: "https://api.app.limetry.com";
|
|
21
|
+
readonly app: "https://app.limetry.com";
|
|
22
|
+
readonly ossApi: "https://api.limetry.org";
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Default Limetry evaluate API for OSS npm packages and adapters.
|
|
26
|
+
*/
|
|
27
|
+
export declare const DEFAULT_LIMETRY_BASE_URL: "https://api.limetry.org";
|
|
28
|
+
/**
|
|
29
|
+
* Resolves the Limetry API base URL from env or OSS production default.
|
|
30
|
+
*
|
|
31
|
+
* @param source - Environment map; defaults to `process.env`.
|
|
32
|
+
* @param override - Explicit base URL that wins over env.
|
|
33
|
+
* @returns Origin without a trailing slash.
|
|
34
|
+
*/
|
|
35
|
+
export declare function resolveLimetryBaseUrl(source?: NodeJS.ProcessEnv, override?: string): string;
|
|
36
|
+
//# sourceMappingURL=urls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"urls.d.ts","sourceRoot":"","sources":["../src/urls.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;CAItB,CAAA;AAEV;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;CAKxB,CAAA;AAEV;;GAEG;AACH,eAAO,MAAM,wBAAwB,2BAA0B,CAAA;AAE/D;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,GAAE,MAAM,CAAC,UAAwB,EACvC,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,CAQR"}
|
package/dist/urls.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical Limetry product origins for OSS and Cloud.
|
|
3
|
+
*
|
|
4
|
+
* Published npm packages resolve API calls to these hosts when
|
|
5
|
+
* `LIMETRY_BASE_URL` is unset.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Production origins for the open-source product (limetry.org).
|
|
9
|
+
*/
|
|
10
|
+
export const LIMETRY_OSS_ORIGINS = {
|
|
11
|
+
web: "https://limetry.org",
|
|
12
|
+
api: "https://api.limetry.org",
|
|
13
|
+
app: "https://app.limetry.com",
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Production origins for Limetry Cloud (limetry.com).
|
|
17
|
+
*/
|
|
18
|
+
export const LIMETRY_CLOUD_ORIGINS = {
|
|
19
|
+
web: "https://limetry.com",
|
|
20
|
+
api: "https://api.app.limetry.com",
|
|
21
|
+
app: "https://app.limetry.com",
|
|
22
|
+
ossApi: "https://api.limetry.org",
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Default Limetry evaluate API for OSS npm packages and adapters.
|
|
26
|
+
*/
|
|
27
|
+
export const DEFAULT_LIMETRY_BASE_URL = LIMETRY_OSS_ORIGINS.api;
|
|
28
|
+
/**
|
|
29
|
+
* Resolves the Limetry API base URL from env or OSS production default.
|
|
30
|
+
*
|
|
31
|
+
* @param source - Environment map; defaults to `process.env`.
|
|
32
|
+
* @param override - Explicit base URL that wins over env.
|
|
33
|
+
* @returns Origin without a trailing slash.
|
|
34
|
+
*/
|
|
35
|
+
export function resolveLimetryBaseUrl(source = process.env, override) {
|
|
36
|
+
const trimmedOverride = override?.trim();
|
|
37
|
+
const trimmedEnv = source.LIMETRY_BASE_URL?.trim();
|
|
38
|
+
const raw = (trimmedOverride && trimmedOverride.length > 0 ? trimmedOverride : undefined)
|
|
39
|
+
?? (trimmedEnv && trimmedEnv.length > 0 ? trimmedEnv : undefined)
|
|
40
|
+
?? DEFAULT_LIMETRY_BASE_URL;
|
|
41
|
+
return raw.replace(/\/$/, "");
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=urls.js.map
|
package/dist/urls.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"urls.js","sourceRoot":"","sources":["../src/urls.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,GAAG,EAAE,qBAAqB;IAC1B,GAAG,EAAE,yBAAyB;IAC9B,GAAG,EAAE,yBAAyB;CACtB,CAAA;AAEV;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,GAAG,EAAE,qBAAqB;IAC1B,GAAG,EAAE,6BAA6B;IAClC,GAAG,EAAE,yBAAyB;IAC9B,MAAM,EAAE,yBAAyB;CACzB,CAAA;AAEV;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CAAC,GAAG,CAAA;AAE/D;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACnC,SAA4B,OAAO,CAAC,GAAG,EACvC,QAAiB;IAEjB,MAAM,eAAe,GAAG,QAAQ,EAAE,IAAI,EAAE,CAAA;IACxC,MAAM,UAAU,GAAG,MAAM,CAAC,gBAAgB,EAAE,IAAI,EAAE,CAAA;IAClD,MAAM,GAAG,GACP,CAAC,eAAe,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC;WAC1E,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;WAC9D,wBAAwB,CAAA;IAC7B,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;AAC/B,CAAC"}
|