shiplightai 0.1.49 → 0.1.50
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 +44 -628
- package/dist/cjs/debugger-pw.cjs +45 -45
- package/dist/cjs/fixture.cjs +78 -76
- package/dist/cjs/index.cjs +55 -53
- package/dist/cli.js +2 -2
- package/dist/debugger-pw.js +46 -46
- package/dist/fixture.d.ts +25 -1
- package/dist/fixture.js +79 -77
- package/dist/index.js +56 -54
- package/package.json +4 -4
package/dist/fixture.d.ts
CHANGED
|
@@ -43,6 +43,30 @@ interface TestContext {
|
|
|
43
43
|
[key: string]: any;
|
|
44
44
|
}
|
|
45
45
|
declare function createTestContext(variableStore: VariableStore): TestContext;
|
|
46
|
+
/**
|
|
47
|
+
* Explicit allowlist of environment variable names that Shiplight forwards
|
|
48
|
+
* from `process.env` into sdk-core's internal `SdkConfig.env`. sdk-core is
|
|
49
|
+
* strict — it reads env vars only from `SdkConfig.env`, never from
|
|
50
|
+
* `process.env` directly — so this allowlist is the single point where
|
|
51
|
+
* user-visible env state crosses into the agent runtime.
|
|
52
|
+
*
|
|
53
|
+
* To add a new env var that sdk-core should honor, append it here AND make
|
|
54
|
+
* sure a corresponding consumer exists in `packages/sdk-core/src`. Do NOT
|
|
55
|
+
* spread `process.env` into this object — the allowlist exists so that user
|
|
56
|
+
* test code cannot exfiltrate arbitrary shell state through the SDK.
|
|
57
|
+
*
|
|
58
|
+
* Keep in sync with the "Environment variables" section of the public
|
|
59
|
+
* documentation at `docs.shiplight.ai/local/cli-reference`.
|
|
60
|
+
*/
|
|
61
|
+
declare const SDK_ENV_ALLOWLIST: readonly ["GOOGLE_API_KEY", "ANTHROPIC_API_KEY", "OPENAI_API_KEY", "OPENAI_BASE_URL", "ANTHROPIC_MODELS_USE_VERTEXAI", "GOOGLE_GENAI_USE_VERTEXAI", "GOOGLE_CLOUD_PROJECT", "GOOGLE_CLOUD_LOCATION", "MAILGUN_API_KEY", "MAILGUN_DOMAIN"];
|
|
62
|
+
/**
|
|
63
|
+
* Pick the allowlisted env vars out of a source record (defaults to
|
|
64
|
+
* `process.env`) and return them as a plain object with empty-string
|
|
65
|
+
* fallbacks. The empty-string default is deliberate — sdk-core checks
|
|
66
|
+
* `config.env?.KEY` for truthiness, and an empty string is falsy, so an
|
|
67
|
+
* unset allowlisted key behaves the same as an entirely missing key.
|
|
68
|
+
*/
|
|
69
|
+
declare function buildSdkEnv(source?: Record<string, string | undefined>): Record<string, string>;
|
|
46
70
|
type ShiplightFixtures = {
|
|
47
71
|
agent: WebAgent;
|
|
48
72
|
testContext: TestContext;
|
|
@@ -56,4 +80,4 @@ type ShiplightFixtures = {
|
|
|
56
80
|
};
|
|
57
81
|
declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArgs & _playwright_test.PlaywrightTestOptions & ShiplightFixtures, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions>;
|
|
58
82
|
|
|
59
|
-
export { type AuthSpec, type TestContext, createTestContext, resolveAuthState, test };
|
|
83
|
+
export { type AuthSpec, SDK_ENV_ALLOWLIST, type TestContext, buildSdkEnv, createTestContext, resolveAuthState, test };
|