@quatronic/sdk 0.9.0-rc.1 → 0.9.0-rc.2
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/dist/{chunk-TOBGX4CZ.js → chunk-5RAO3LPF.js} +9 -2
- package/dist/chunk-5RAO3LPF.js.map +1 -0
- package/dist/{chunk-F3NHTHFO.js → chunk-NMJOF3ZM.js} +2 -2
- package/dist/cli/skills-postinstall.js +4 -3
- package/dist/cli/skills.js +4 -3
- package/dist/integrations/index.d.ts +2 -2
- package/dist/integrations/index.js +2 -2
- package/dist/next/boot/index.d.ts +1 -1
- package/dist/next/boot/index.js +1 -1
- package/dist/next/integrations/index.d.ts +1 -1
- package/dist/next/integrations/index.js +2 -2
- package/dist/node/boot/index.d.ts +1 -1
- package/dist/node/boot/index.js +1 -1
- package/dist/node/integrations/index.d.ts +1 -1
- package/dist/node/integrations/index.js +2 -2
- package/dist/{node-OVIG5ZYJ.js → node-YQDRNIYH.js} +2 -2
- package/dist/{types-CAwj03sM.d.ts → types-Cl7g4ego.d.ts} +7 -2
- package/package.json +1 -1
- package/skills/catalog.json +1 -0
- package/skills/qore-add-env-key/SKILL.md +57 -0
- package/skills/qore-add-integration/SKILL.next.md +13 -7
- package/skills/qore-add-integration/SKILL.node.md +13 -7
- package/skills/qore-author-skill/SKILL.md +1 -0
- package/dist/chunk-TOBGX4CZ.js.map +0 -1
- /package/dist/{chunk-F3NHTHFO.js.map → chunk-NMJOF3ZM.js.map} +0 -0
- /package/dist/{node-OVIG5ZYJ.js.map → node-YQDRNIYH.js.map} +0 -0
|
@@ -14,7 +14,14 @@ var AUTH_ENV_FIELDS = {
|
|
|
14
14
|
basic: ["username", "password"],
|
|
15
15
|
oauth2_client_credentials: ["tokenUrl", "clientId", "clientSecret", "scope", "audience"]
|
|
16
16
|
};
|
|
17
|
-
var AUTH_SECRET_FIELDS = [
|
|
17
|
+
var AUTH_SECRET_FIELDS = [
|
|
18
|
+
"apiKey",
|
|
19
|
+
"token",
|
|
20
|
+
"username",
|
|
21
|
+
"password",
|
|
22
|
+
"clientId",
|
|
23
|
+
"clientSecret"
|
|
24
|
+
];
|
|
18
25
|
var RESERVED_KEY_PREFIX = "QORE_INTEGRATION_";
|
|
19
26
|
|
|
20
27
|
// src/integrations-core/env.ts
|
|
@@ -106,4 +113,4 @@ export {
|
|
|
106
113
|
loggingEnabled,
|
|
107
114
|
assertIntegrations
|
|
108
115
|
};
|
|
109
|
-
//# sourceMappingURL=chunk-
|
|
116
|
+
//# sourceMappingURL=chunk-5RAO3LPF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/integrations-core/types.ts","../src/integrations-core/env.ts","../src/integrations-core/assertIntegrations.ts"],"sourcesContent":["/**\n * How an integration authenticates. Every field except `header` and\n * `credentialsIn` names an **env key** — the SDK reads the value from the\n * environment at call time, never from the declaration — so a declaration can\n * sit in source control and carry no secret.\n */\nexport type AuthKind =\n | \"none\"\n | \"api_key_header\"\n | \"bearer_static\"\n | \"basic\"\n | \"oauth2_client_credentials\"\n\n/** What the API speaks. Informational for the portal; the client sends bytes either way. */\nexport type Protocol = \"rest\" | \"odata\" | \"soap\" | \"graphql\"\n\n/** The name of an env var, e.g. `SAP_BASE_URL`. */\nexport type EnvKey = string\n\n/**\n * A reference to an env var. The short form is required; the object form can\n * be optional and carry a default the app falls back on when the key is unset.\n */\nexport type EnvRef =\n | EnvKey\n | { key: EnvKey; optional?: boolean; default?: string | number | boolean }\n\nexport type IntegrationAuth =\n | { kind: \"none\" }\n | { kind: \"api_key_header\"; header: string; apiKey: EnvKey }\n | { kind: \"bearer_static\"; token: EnvKey }\n | { kind: \"basic\"; username: EnvKey; password: EnvKey }\n | {\n kind: \"oauth2_client_credentials\"\n tokenUrl: EnvKey\n clientId: EnvKey\n clientSecret: EnvKey\n scope?: EnvKey\n audience?: EnvKey\n /** Where the client credentials go on the token request. Default `\"header\"`. */\n credentialsIn?: \"header\" | \"body\"\n }\n\nexport interface IntegrationDefinition {\n /** Human name shown in the portal, e.g. \"SAP S/4HANA Cloud\". */\n label: string\n protocol: Protocol\n /** Env key holding the base URL for this environment. */\n baseUrl: EnvKey\n auth: IntegrationAuth\n /** Further env the app reads for this integration, by logical name. */\n config?: Record<string, EnvRef>\n}\n\nexport type IntegrationMap = Record<string, IntegrationDefinition>\n\n/**\n * Identity function that pins the literal types of the map, so an alias typo\n * at a call site is a compile error (`keyof M`) rather than a runtime\n * `not_declared`. Same shape as `definePermissions` in `auth-core`.\n */\nexport function defineIntegrations<const M extends IntegrationMap>(map: M): M {\n return map\n}\n\n/**\n * Which fields of each auth kind name an env key. Shared with the manifest\n * extractor and the portal, which derive the required-env list from a\n * declaration without evaluating app code.\n */\nexport const AUTH_ENV_FIELDS: Record<AuthKind, readonly string[]> = {\n none: [],\n api_key_header: [\"apiKey\"],\n bearer_static: [\"token\"],\n basic: [\"username\", \"password\"],\n oauth2_client_credentials: [\"tokenUrl\", \"clientId\", \"clientSecret\", \"scope\", \"audience\"],\n}\n\n/**\n * Auth fields whose env value is a secret, so the portal locks it whatever\n * `env.ts` labels it. The identifier of a login counts with its secret:\n * `username` sits with `password` and `clientId` with `clientSecret`, because\n * that is where a person looks for them and they are replaced together.\n */\nexport const AUTH_SECRET_FIELDS = [\n \"apiKey\",\n \"token\",\n \"username\",\n \"password\",\n \"clientId\",\n \"clientSecret\",\n] as const\n\n/**\n * Env keys under this prefix belong to the platform\n * (`QORE_INTEGRATION_<ALIAS>_LOGGING` today). A declaration may not claim one.\n */\nexport const RESERVED_KEY_PREFIX = \"QORE_INTEGRATION_\"\n","import { normalizeAlias, type Env } from \"../connections-core/env\"\nimport {\n AUTH_ENV_FIELDS,\n RESERVED_KEY_PREFIX,\n type EnvRef,\n type IntegrationDefinition,\n} from \"./types\"\n\nexport type { Env }\n\nexport function refKey(ref: EnvRef): string {\n return typeof ref === \"string\" ? ref : ref.key\n}\n\nfunction refOptional(ref: EnvRef): boolean {\n return typeof ref !== \"string\" && (ref.optional === true || ref.default !== undefined)\n}\n\n/** The auth fields of `def` that are set, as env keys. */\nfunction authKeys(def: IntegrationDefinition): string[] {\n const auth = def.auth as unknown as Record<string, unknown>\n return AUTH_ENV_FIELDS[def.auth.kind]\n .map((field) => auth[field])\n .filter((key): key is string => typeof key === \"string\" && key !== \"\")\n}\n\n/**\n * Every env key the integration cannot run without: the base URL, every auth\n * field that is set, and every config ref that is neither optional nor\n * defaulted. Order is stable so an error message reads the same twice.\n */\nexport function requiredKeys(def: IntegrationDefinition): string[] {\n const keys = [def.baseUrl, ...authKeys(def)]\n for (const ref of Object.values(def.config ?? {})) {\n if (!refOptional(ref)) keys.push(refKey(ref))\n }\n return [...new Set(keys)]\n}\n\n/** Every env key the declaration names, required or not. */\nexport function allKeys(def: IntegrationDefinition): string[] {\n const keys = [def.baseUrl, ...authKeys(def)]\n for (const ref of Object.values(def.config ?? {})) keys.push(refKey(ref))\n return [...new Set(keys)]\n}\n\n/**\n * Read one ref from `env`, applying its default when the key is unset or\n * empty. A default comes back as declared (a number or boolean stays typed);\n * an env value is always a string.\n */\nexport function readRef(env: Env, ref: EnvRef): string | number | boolean | undefined {\n const value = env[refKey(ref)]\n if (value !== undefined && value !== \"\") return value\n return typeof ref === \"string\" ? undefined : ref.default\n}\n\n/** `QORE_INTEGRATION_<ALIAS>_LOGGING` — the one reserved key v1 reads. */\nexport function loggingKey(alias: string): string {\n return `${RESERVED_KEY_PREFIX}${normalizeAlias(alias)}_LOGGING`\n}\n\n/** Whether the per-call JSON log line is switched on for this alias (\"1\" or \"true\"). */\nexport function loggingEnabled(env: Env, alias: string): boolean {\n const value = env[loggingKey(alias)]\n return value === \"1\" || value?.toLowerCase() === \"true\"\n}\n","import { defaultEnv, type Env } from \"../connections-core/env\"\nimport { allKeys, requiredKeys } from \"./env\"\nimport { RESERVED_KEY_PREFIX, type IntegrationMap } from \"./types\"\n\nconst ENV_KEY_RE = /^[A-Z][A-Z0-9_]*$/\n\nexport interface IntegrationProblem {\n alias: string\n key: string\n /** `missing_env`: a required key is unset or empty. `reserved_key`: the declaration claims a key it may not. */\n code: \"missing_env\" | \"reserved_key\"\n message: string\n}\n\n/**\n * Report, at app startup, what is wrong with the declared integrations: a\n * required env key that is unset, or a key the declaration may not claim.\n * **It never throws.** Integrations are a visibility tool: an API key that is\n * not set (an obsolete integration, a vendor not contracted in this\n * environment) must cost the calls to that one integration — they fail with\n * `missing_env` — never the boot of the whole app. Each problem is logged as\n * one warning and returned, so a caller may act on them if it chooses.\n */\nexport function assertIntegrations(\n map: IntegrationMap,\n opts: { env?: Env; warn?: (message: string) => void } = {},\n): IntegrationProblem[] {\n const env = opts.env ?? defaultEnv()\n const warn = opts.warn ?? ((message: string) => console.warn(message))\n const problems: IntegrationProblem[] = []\n\n for (const [alias, def] of Object.entries(map)) {\n for (const key of allKeys(def)) {\n let why: string | undefined\n if (key.startsWith(RESERVED_KEY_PREFIX)) {\n why = `${RESERVED_KEY_PREFIX}* keys are reserved by the platform`\n } else if (key.startsWith(\"CONN_\")) {\n why = \"CONN_* keys belong to module connections, not integrations\"\n } else if (!ENV_KEY_RE.test(key)) {\n why = \"an env key is uppercase letters, digits and underscores\"\n }\n if (why) {\n problems.push({\n alias,\n key,\n code: \"reserved_key\",\n message: `Integration \"${alias}\" declares env key \"${key}\": ${why}`,\n })\n }\n }\n for (const key of requiredKeys(def)) {\n const value = env[key]\n if (value === undefined || value === \"\") {\n problems.push({\n alias,\n key,\n code: \"missing_env\",\n message: `Integration \"${alias}\" is missing env key \"${key}\"; calls to it will fail until it is set`,\n })\n }\n }\n }\n\n for (const p of problems) warn(`[integrations] ${p.message}`)\n return problems\n}\n"],"mappings":";;;;;;AA6DO,SAAS,mBAAmD,KAAW;AAC5E,SAAO;AACT;AAOO,IAAM,kBAAuD;AAAA,EAClE,MAAM,CAAC;AAAA,EACP,gBAAgB,CAAC,QAAQ;AAAA,EACzB,eAAe,CAAC,OAAO;AAAA,EACvB,OAAO,CAAC,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@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loggingEnabled,
|
|
3
3
|
readRef
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5RAO3LPF.js";
|
|
5
5
|
import {
|
|
6
6
|
defaultEnv
|
|
7
7
|
} from "./chunk-5XMTUPIY.js";
|
|
@@ -346,4 +346,4 @@ export {
|
|
|
346
346
|
IntegrationError,
|
|
347
347
|
createIntegrationClient
|
|
348
348
|
};
|
|
349
|
-
//# sourceMappingURL=chunk-
|
|
349
|
+
//# sourceMappingURL=chunk-NMJOF3ZM.js.map
|
|
@@ -163,9 +163,10 @@ extension file.
|
|
|
163
163
|
|
|
164
164
|
## Contract skills
|
|
165
165
|
|
|
166
|
-
\`qore-add-
|
|
167
|
-
\`qore-observability\` and \`qore-use-database\`
|
|
168
|
-
the
|
|
166
|
+
\`qore-add-env-key\`, \`qore-add-integration\`, \`qore-add-connection\`,
|
|
167
|
+
\`qore-use-permissions\`, \`qore-observability\` and \`qore-use-database\`
|
|
168
|
+
produce code the portal reads: the Secrets tab, the Integrations tab,
|
|
169
|
+
connections, roles, Monitoring, the local database. An
|
|
169
170
|
extension may add to them but not relax them, and turning one off does not turn
|
|
170
171
|
off the SDK's lint rules that check the same things.
|
|
171
172
|
|
package/dist/cli/skills.js
CHANGED
|
@@ -162,9 +162,10 @@ extension file.
|
|
|
162
162
|
|
|
163
163
|
## Contract skills
|
|
164
164
|
|
|
165
|
-
\`qore-add-
|
|
166
|
-
\`qore-observability\` and \`qore-use-database\`
|
|
167
|
-
the
|
|
165
|
+
\`qore-add-env-key\`, \`qore-add-integration\`, \`qore-add-connection\`,
|
|
166
|
+
\`qore-use-permissions\`, \`qore-observability\` and \`qore-use-database\`
|
|
167
|
+
produce code the portal reads: the Secrets tab, the Integrations tab,
|
|
168
|
+
connections, roles, Monitoring, the local database. An
|
|
168
169
|
extension may add to them but not relax them, and turning one off does not turn
|
|
169
170
|
off the SDK's lint rules that check the same things.
|
|
170
171
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as IntegrationMap, a as IntegrationDefinition, E as EnvRef } from '../types-
|
|
2
|
-
export { A as AUTH_ENV_FIELDS, b as AUTH_SECRET_FIELDS, c as AuthKind, d as EnvKey, e as IntegrationAuth, P as Protocol, R as RESERVED_KEY_PREFIX, f as defineIntegrations } from '../types-
|
|
1
|
+
import { I as IntegrationMap, a as IntegrationDefinition, E as EnvRef } from '../types-Cl7g4ego.js';
|
|
2
|
+
export { A as AUTH_ENV_FIELDS, b as AUTH_SECRET_FIELDS, c as AuthKind, d as EnvKey, e as IntegrationAuth, P as Protocol, R as RESERVED_KEY_PREFIX, f as defineIntegrations } from '../types-Cl7g4ego.js';
|
|
3
3
|
import { E as Env } from '../env-R-bci5RU.js';
|
|
4
4
|
|
|
5
5
|
interface IntegrationProblem {
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
IntegrationError,
|
|
7
7
|
OAUTH_REFRESH_SKEW_MS,
|
|
8
8
|
createIntegrationClient
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-NMJOF3ZM.js";
|
|
10
10
|
import {
|
|
11
11
|
AUTH_ENV_FIELDS,
|
|
12
12
|
AUTH_SECRET_FIELDS,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
loggingKey,
|
|
19
19
|
readRef,
|
|
20
20
|
requiredKeys
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-5RAO3LPF.js";
|
|
22
22
|
import {
|
|
23
23
|
PLATFORM_MANAGED_HOSTS,
|
|
24
24
|
isPlatformManagedHost
|
package/dist/next/boot/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import "../../chunk-IFESUTF2.js";
|
|
|
11
11
|
async function qoreRegister(node) {
|
|
12
12
|
await register();
|
|
13
13
|
if (process.env.NEXT_RUNTIME === "nodejs" && node) {
|
|
14
|
-
const { bootNode } = await import("../../node-
|
|
14
|
+
const { bootNode } = await import("../../node-YQDRNIYH.js");
|
|
15
15
|
await bootNode(node);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as AUTH_ENV_FIELDS, b as AUTH_SECRET_FIELDS, c as AuthKind, d as EnvKey, E as EnvRef, e as IntegrationAuth, a as IntegrationDefinition, I as IntegrationMap, P as Protocol, R as RESERVED_KEY_PREFIX, f as defineIntegrations } from '../../types-
|
|
1
|
+
export { A as AUTH_ENV_FIELDS, b as AUTH_SECRET_FIELDS, c as AuthKind, d as EnvKey, E as EnvRef, e as IntegrationAuth, a as IntegrationDefinition, I as IntegrationMap, P as Protocol, R as RESERVED_KEY_PREFIX, f as defineIntegrations } from '../../types-Cl7g4ego.js';
|
|
2
2
|
export { DEFAULT_INTEGRATION_TIMEOUT_MS, INTEGRATION_ALIAS_ATTR, INTEGRATION_SPAN_TYPE, INTEGRATION_SPAN_TYPE_ATTR, IntegrationClient, IntegrationConfig, IntegrationError, IntegrationErrorCode, IntegrationHandle, IntegrationProblem, IntegrationRequest, OAUTH_REFRESH_SKEW_MS, PLATFORM_MANAGED_HOSTS, ParamValue, allKeys, assertIntegrations, createIntegrationClient, isPlatformManagedHost, loggingEnabled, loggingKey, readRef, requiredKeys } from '../../integrations/index.js';
|
|
3
3
|
import '../../env-R-bci5RU.js';
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
IntegrationError,
|
|
7
7
|
OAUTH_REFRESH_SKEW_MS,
|
|
8
8
|
createIntegrationClient
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-NMJOF3ZM.js";
|
|
10
10
|
import {
|
|
11
11
|
AUTH_ENV_FIELDS,
|
|
12
12
|
AUTH_SECRET_FIELDS,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
loggingKey,
|
|
19
19
|
readRef,
|
|
20
20
|
requiredKeys
|
|
21
|
-
} from "../../chunk-
|
|
21
|
+
} from "../../chunk-5RAO3LPF.js";
|
|
22
22
|
import {
|
|
23
23
|
PLATFORM_MANAGED_HOSTS,
|
|
24
24
|
isPlatformManagedHost
|
package/dist/node/boot/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as AUTH_ENV_FIELDS, b as AUTH_SECRET_FIELDS, c as AuthKind, d as EnvKey, E as EnvRef, e as IntegrationAuth, a as IntegrationDefinition, I as IntegrationMap, P as Protocol, R as RESERVED_KEY_PREFIX, f as defineIntegrations } from '../../types-
|
|
1
|
+
export { A as AUTH_ENV_FIELDS, b as AUTH_SECRET_FIELDS, c as AuthKind, d as EnvKey, E as EnvRef, e as IntegrationAuth, a as IntegrationDefinition, I as IntegrationMap, P as Protocol, R as RESERVED_KEY_PREFIX, f as defineIntegrations } from '../../types-Cl7g4ego.js';
|
|
2
2
|
export { DEFAULT_INTEGRATION_TIMEOUT_MS, INTEGRATION_ALIAS_ATTR, INTEGRATION_SPAN_TYPE, INTEGRATION_SPAN_TYPE_ATTR, IntegrationClient, IntegrationConfig, IntegrationError, IntegrationErrorCode, IntegrationHandle, IntegrationProblem, IntegrationRequest, OAUTH_REFRESH_SKEW_MS, PLATFORM_MANAGED_HOSTS, ParamValue, allKeys, assertIntegrations, createIntegrationClient, isPlatformManagedHost, loggingEnabled, loggingKey, readRef, requiredKeys } from '../../integrations/index.js';
|
|
3
3
|
import '../../env-R-bci5RU.js';
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
IntegrationError,
|
|
7
7
|
OAUTH_REFRESH_SKEW_MS,
|
|
8
8
|
createIntegrationClient
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-NMJOF3ZM.js";
|
|
10
10
|
import {
|
|
11
11
|
AUTH_ENV_FIELDS,
|
|
12
12
|
AUTH_SECRET_FIELDS,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
loggingKey,
|
|
19
19
|
readRef,
|
|
20
20
|
requiredKeys
|
|
21
|
-
} from "../../chunk-
|
|
21
|
+
} from "../../chunk-5RAO3LPF.js";
|
|
22
22
|
import {
|
|
23
23
|
PLATFORM_MANAGED_HOSTS,
|
|
24
24
|
isPlatformManagedHost
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertIntegrations
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5RAO3LPF.js";
|
|
4
4
|
import "./chunk-5XMTUPIY.js";
|
|
5
5
|
|
|
6
6
|
// src/next/boot/node.ts
|
|
@@ -30,4 +30,4 @@ async function bootNode(boot) {
|
|
|
30
30
|
export {
|
|
31
31
|
bootNode
|
|
32
32
|
};
|
|
33
|
-
//# sourceMappingURL=node-
|
|
33
|
+
//# sourceMappingURL=node-YQDRNIYH.js.map
|
|
@@ -64,8 +64,13 @@ declare function defineIntegrations<const M extends IntegrationMap>(map: M): M;
|
|
|
64
64
|
* declaration without evaluating app code.
|
|
65
65
|
*/
|
|
66
66
|
declare const AUTH_ENV_FIELDS: Record<AuthKind, readonly string[]>;
|
|
67
|
-
/**
|
|
68
|
-
|
|
67
|
+
/**
|
|
68
|
+
* Auth fields whose env value is a secret, so the portal locks it whatever
|
|
69
|
+
* `env.ts` labels it. The identifier of a login counts with its secret:
|
|
70
|
+
* `username` sits with `password` and `clientId` with `clientSecret`, because
|
|
71
|
+
* that is where a person looks for them and they are replaced together.
|
|
72
|
+
*/
|
|
73
|
+
declare const AUTH_SECRET_FIELDS: readonly ["apiKey", "token", "username", "password", "clientId", "clientSecret"];
|
|
69
74
|
/**
|
|
70
75
|
* Env keys under this prefix belong to the platform
|
|
71
76
|
* (`QORE_INTEGRATION_<ALIAS>_LOGGING` today). A declaration may not claim one.
|
package/package.json
CHANGED
package/skills/catalog.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
{"name": "qore-add-api-route", "kind": "convenience", "requires": ["runtime=next"], "legacyNames": ["quatronic-add-api-route"]},
|
|
4
4
|
{"name": "qore-add-connection", "kind": "contract", "legacyNames": ["quatronic-add-connection"]},
|
|
5
5
|
{"name": "qore-add-db-table", "kind": "convenience", "requires": ["runtime=next", "db"], "legacyNames": ["quatronic-add-db-table"]},
|
|
6
|
+
{"name": "qore-add-env-key", "kind": "contract"},
|
|
6
7
|
{"name": "qore-add-feature", "kind": "convenience", "requires": ["runtime=next"], "legacyNames": ["quatronic-add-feature"]},
|
|
7
8
|
{"name": "qore-add-integration", "kind": "contract", "legacyNames": ["quatronic-add-integration"]},
|
|
8
9
|
{"name": "qore-add-page", "kind": "convenience", "requires": ["runtime=next"], "legacyNames": ["quatronic-add-page"]},
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: qore-add-env-key
|
|
3
|
+
description: Add an env key to src/config/env.ts and decide whether it is a secret or configuration (`.meta({ kind: "config" })`). Use whenever this app reads a new environment variable, or when a key shows up under the wrong heading in the portal.
|
|
4
|
+
allowed-tools: Edit, Read
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Add an env key
|
|
8
|
+
|
|
9
|
+
`src/config/env.ts` is the one list of env this app reads. The manifest
|
|
10
|
+
extractor reads it on every deploy and sends the portal each key's **name**
|
|
11
|
+
(never its value), whether it is optional, and whether it is labelled
|
|
12
|
+
configuration. Values are set per environment in the portal's Secrets tab.
|
|
13
|
+
|
|
14
|
+
## 1. Declare it
|
|
15
|
+
|
|
16
|
+
Add the key to the zod server schema, and to `.env.example` with a blank value
|
|
17
|
+
(never a real one). A required key that is unset fails the env parse, so make a
|
|
18
|
+
key required only when the app cannot work without it; otherwise add
|
|
19
|
+
`.optional()`.
|
|
20
|
+
|
|
21
|
+
## 2. Secret or configuration?
|
|
22
|
+
|
|
23
|
+
Every key is a **secret** unless you label it configuration:
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
SAP_BASE_URL: z.string().url().meta({ kind: "config" }),
|
|
27
|
+
SAP_CLIENT_ID: z.string().min(1),
|
|
28
|
+
SAP_CLIENT_SECRET: z.string().min(1),
|
|
29
|
+
SAP_COMPANY_CODE: z.string().min(1).meta({ kind: "config" }),
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The label decides two things in the portal: where a person looks for the key
|
|
33
|
+
(Secrets or Configuration), and whether it is governed as a secret (age,
|
|
34
|
+
rotation reminders, findings). So judge a key by what it belongs to, not only
|
|
35
|
+
by what leaking it would cost.
|
|
36
|
+
|
|
37
|
+
- **Secret:** everything that belongs to a login. That is the secret itself
|
|
38
|
+
**and** the identifier paired with it: client id + client secret, username +
|
|
39
|
+
password, key id + key. It also covers any value with a credential embedded in
|
|
40
|
+
it (a database URL with a password, a webhook URL carrying a token). These are
|
|
41
|
+
looked up together, aged together and replaced together, so a client id
|
|
42
|
+
labelled config ends up on a different screen from its secret.
|
|
43
|
+
- **Configuration** (`.meta({ kind: "config" })`): everything that says *where*
|
|
44
|
+
or *how* to call something. That includes URLs, hosts, ports, paths, realm /
|
|
45
|
+
tenant / company codes, timeouts, retries, feature flags, public keys and
|
|
46
|
+
certificates, and anything shipped to the browser.
|
|
47
|
+
- **In doubt:** ask the user. Do not pick a side yourself.
|
|
48
|
+
|
|
49
|
+
A key with more than one environment counts as configuration only when every
|
|
50
|
+
environment's `env.ts` labels it so. An integration's credential fields
|
|
51
|
+
(`apiKey`, `token`, `username`, `password`, `clientId`, `clientSecret`; see
|
|
52
|
+
/qore-add-integration) are always shown as secrets on the Integrations tab,
|
|
53
|
+
whatever the label says, so never label one of them config.
|
|
54
|
+
|
|
55
|
+
## Don't
|
|
56
|
+
|
|
57
|
+
- **Don't** put a real value in `.env.example`, in code, or in a log line.
|
|
@@ -90,14 +90,19 @@ the app cannot do its job without that integration; otherwise mark it
|
|
|
90
90
|
|
|
91
91
|
```ts
|
|
92
92
|
// inside serverSchema = z.object({ ... })
|
|
93
|
-
SAP_BASE_URL: z.string().url(),
|
|
94
|
-
SAP_TOKEN_URL: z.string().url(),
|
|
93
|
+
SAP_BASE_URL: z.string().url().meta({ kind: "config" }),
|
|
94
|
+
SAP_TOKEN_URL: z.string().url().meta({ kind: "config" }),
|
|
95
95
|
SAP_CLIENT_ID: z.string().min(1),
|
|
96
96
|
SAP_CLIENT_SECRET: z.string().min(1),
|
|
97
|
-
SAP_COMPANY_CODE: z.string().min(1),
|
|
98
|
-
SAP_TIMEOUT_MS: z.coerce.number().optional(),
|
|
97
|
+
SAP_COMPANY_CODE: z.string().min(1).meta({ kind: "config" }),
|
|
98
|
+
SAP_TIMEOUT_MS: z.coerce.number().optional().meta({ kind: "config" }),
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
+
URLs, codes and timeouts are configuration, so they carry
|
|
102
|
+
`.meta({ kind: "config" })`. The client id stays unlabelled, a secret beside
|
|
103
|
+
the client secret, because it belongs to the same login. /qore-add-env-key has
|
|
104
|
+
the rule; in doubt, ask the user.
|
|
105
|
+
|
|
101
106
|
Add the same keys to `.env.example` with a blank value (never a real one), so
|
|
102
107
|
a colleague's `pnpm bootstrap` knows what to ask the portal for. Then set the
|
|
103
108
|
values per environment in the portal's Secrets tab; the Integrations tab shows
|
|
@@ -197,9 +202,10 @@ per call (`qore.integration.call`: alias, method, template, status, duration).
|
|
|
197
202
|
declaration; the client refuses `http(s)://…` paths (`absolute_url`), which is
|
|
198
203
|
what keeps a path parameter from redirecting a call to another host.
|
|
199
204
|
- **Don't put a credential in `config`, in `.env.example`, or in a log line.**
|
|
200
|
-
`apiKey` / `token` / `
|
|
201
|
-
SDK never logs them and neither should you. A
|
|
202
|
-
error carry no secret, so reporting one is safe;
|
|
205
|
+
`apiKey` / `token` / `username` / `password` / `clientId` / `clientSecret`
|
|
206
|
+
are the secret fields; the SDK never logs them and neither should you. A
|
|
207
|
+
failed call's span and error carry no secret, so reporting one is safe;
|
|
208
|
+
whether to report it at all
|
|
203
209
|
follows /qore-observability (unexpected: let it throw; expected: no capture).
|
|
204
210
|
- **Don't bypass `env.ts`.** Reading `process.env.SAP_BASE_URL` directly skips
|
|
205
211
|
validation and leaves `qore env pull` unaware of the key.
|
|
@@ -90,14 +90,19 @@ the service cannot do its job without that integration; otherwise mark it
|
|
|
90
90
|
|
|
91
91
|
```ts
|
|
92
92
|
// inside `const schema = z.object({ ... })`
|
|
93
|
-
SAP_BASE_URL: z.string().url(),
|
|
94
|
-
SAP_TOKEN_URL: z.string().url(),
|
|
93
|
+
SAP_BASE_URL: z.string().url().meta({ kind: "config" }),
|
|
94
|
+
SAP_TOKEN_URL: z.string().url().meta({ kind: "config" }),
|
|
95
95
|
SAP_CLIENT_ID: z.string().min(1),
|
|
96
96
|
SAP_CLIENT_SECRET: z.string().min(1),
|
|
97
|
-
SAP_COMPANY_CODE: z.string().min(1),
|
|
98
|
-
SAP_TIMEOUT_MS: z.coerce.number().optional(),
|
|
97
|
+
SAP_COMPANY_CODE: z.string().min(1).meta({ kind: "config" }),
|
|
98
|
+
SAP_TIMEOUT_MS: z.coerce.number().optional().meta({ kind: "config" }),
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
+
URLs, codes and timeouts are configuration, so they carry
|
|
102
|
+
`.meta({ kind: "config" })`. The client id stays unlabelled, a secret beside
|
|
103
|
+
the client secret, because it belongs to the same login. /qore-add-env-key has
|
|
104
|
+
the rule; in doubt, ask the user.
|
|
105
|
+
|
|
101
106
|
Add the same keys to `.env.example` with a blank value (never a real one), so
|
|
102
107
|
a colleague's `pnpm bootstrap` knows what to ask the portal for. Then set the
|
|
103
108
|
values per environment in the portal's Secrets tab; the Integrations tab shows
|
|
@@ -197,9 +202,10 @@ per call (`qore.integration.call`: alias, method, template, status, duration).
|
|
|
197
202
|
declaration; the client refuses `http(s)://…` paths (`absolute_url`), which is
|
|
198
203
|
what keeps a path parameter from redirecting a call to another host.
|
|
199
204
|
- **Don't put a credential in `config`, in `.env.example`, or in a log line.**
|
|
200
|
-
`apiKey` / `token` / `
|
|
201
|
-
SDK never logs them and neither should you. A
|
|
202
|
-
error carry no secret, so reporting one is safe;
|
|
205
|
+
`apiKey` / `token` / `username` / `password` / `clientId` / `clientSecret`
|
|
206
|
+
are the secret fields; the SDK never logs them and neither should you. A
|
|
207
|
+
failed call's span and error carry no secret, so reporting one is safe;
|
|
208
|
+
whether to report it at all
|
|
203
209
|
follows /qore-observability (unexpected: let it throw; expected: no capture).
|
|
204
210
|
- **Don't bypass `env.ts`.** Reading `process.env.SAP_BASE_URL` directly skips
|
|
205
211
|
validation and leaves `qore env pull` unaware of the key.
|
|
@@ -40,6 +40,7 @@ Code written with these skills is read by the portal:
|
|
|
40
40
|
|
|
41
41
|
| Skill | What the portal reads |
|
|
42
42
|
|---|---|
|
|
43
|
+
| `qore-add-env-key` | The Secrets tab: which keys are secrets, which configuration |
|
|
43
44
|
| `qore-add-integration` | The Integrations tab |
|
|
44
45
|
| `qore-add-connection` | Connection wiring |
|
|
45
46
|
| `qore-use-permissions` | Roles on the Access page |
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/integrations-core/types.ts","../src/integrations-core/env.ts","../src/integrations-core/assertIntegrations.ts"],"sourcesContent":["/**\n * How an integration authenticates. Every field except `header` and\n * `credentialsIn` names an **env key** — the SDK reads the value from the\n * environment at call time, never from the declaration — so a declaration can\n * sit in source control and carry no secret.\n */\nexport type AuthKind =\n | \"none\"\n | \"api_key_header\"\n | \"bearer_static\"\n | \"basic\"\n | \"oauth2_client_credentials\"\n\n/** What the API speaks. Informational for the portal; the client sends bytes either way. */\nexport type Protocol = \"rest\" | \"odata\" | \"soap\" | \"graphql\"\n\n/** The name of an env var, e.g. `SAP_BASE_URL`. */\nexport type EnvKey = string\n\n/**\n * A reference to an env var. The short form is required; the object form can\n * be optional and carry a default the app falls back on when the key is unset.\n */\nexport type EnvRef =\n | EnvKey\n | { key: EnvKey; optional?: boolean; default?: string | number | boolean }\n\nexport type IntegrationAuth =\n | { kind: \"none\" }\n | { kind: \"api_key_header\"; header: string; apiKey: EnvKey }\n | { kind: \"bearer_static\"; token: EnvKey }\n | { kind: \"basic\"; username: EnvKey; password: EnvKey }\n | {\n kind: \"oauth2_client_credentials\"\n tokenUrl: EnvKey\n clientId: EnvKey\n clientSecret: EnvKey\n scope?: EnvKey\n audience?: EnvKey\n /** Where the client credentials go on the token request. Default `\"header\"`. */\n credentialsIn?: \"header\" | \"body\"\n }\n\nexport interface IntegrationDefinition {\n /** Human name shown in the portal, e.g. \"SAP S/4HANA Cloud\". */\n label: string\n protocol: Protocol\n /** Env key holding the base URL for this environment. */\n baseUrl: EnvKey\n auth: IntegrationAuth\n /** Further env the app reads for this integration, by logical name. */\n config?: Record<string, EnvRef>\n}\n\nexport type IntegrationMap = Record<string, IntegrationDefinition>\n\n/**\n * Identity function that pins the literal types of the map, so an alias typo\n * at a call site is a compile error (`keyof M`) rather than a runtime\n * `not_declared`. Same shape as `definePermissions` in `auth-core`.\n */\nexport function defineIntegrations<const M extends IntegrationMap>(map: M): M {\n return map\n}\n\n/**\n * Which fields of each auth kind name an env key. Shared with the manifest\n * extractor and the portal, which derive the required-env list from a\n * declaration without evaluating app code.\n */\nexport const AUTH_ENV_FIELDS: Record<AuthKind, readonly string[]> = {\n none: [],\n api_key_header: [\"apiKey\"],\n bearer_static: [\"token\"],\n basic: [\"username\", \"password\"],\n oauth2_client_credentials: [\"tokenUrl\", \"clientId\", \"clientSecret\", \"scope\", \"audience\"],\n}\n\n/** Auth fields whose env value is a secret, so the portal masks it. */\nexport const AUTH_SECRET_FIELDS = [\"apiKey\", \"token\", \"password\", \"clientSecret\"] as const\n\n/**\n * Env keys under this prefix belong to the platform\n * (`QORE_INTEGRATION_<ALIAS>_LOGGING` today). A declaration may not claim one.\n */\nexport const RESERVED_KEY_PREFIX = \"QORE_INTEGRATION_\"\n","import { normalizeAlias, type Env } from \"../connections-core/env\"\nimport {\n AUTH_ENV_FIELDS,\n RESERVED_KEY_PREFIX,\n type EnvRef,\n type IntegrationDefinition,\n} from \"./types\"\n\nexport type { Env }\n\nexport function refKey(ref: EnvRef): string {\n return typeof ref === \"string\" ? ref : ref.key\n}\n\nfunction refOptional(ref: EnvRef): boolean {\n return typeof ref !== \"string\" && (ref.optional === true || ref.default !== undefined)\n}\n\n/** The auth fields of `def` that are set, as env keys. */\nfunction authKeys(def: IntegrationDefinition): string[] {\n const auth = def.auth as unknown as Record<string, unknown>\n return AUTH_ENV_FIELDS[def.auth.kind]\n .map((field) => auth[field])\n .filter((key): key is string => typeof key === \"string\" && key !== \"\")\n}\n\n/**\n * Every env key the integration cannot run without: the base URL, every auth\n * field that is set, and every config ref that is neither optional nor\n * defaulted. Order is stable so an error message reads the same twice.\n */\nexport function requiredKeys(def: IntegrationDefinition): string[] {\n const keys = [def.baseUrl, ...authKeys(def)]\n for (const ref of Object.values(def.config ?? {})) {\n if (!refOptional(ref)) keys.push(refKey(ref))\n }\n return [...new Set(keys)]\n}\n\n/** Every env key the declaration names, required or not. */\nexport function allKeys(def: IntegrationDefinition): string[] {\n const keys = [def.baseUrl, ...authKeys(def)]\n for (const ref of Object.values(def.config ?? {})) keys.push(refKey(ref))\n return [...new Set(keys)]\n}\n\n/**\n * Read one ref from `env`, applying its default when the key is unset or\n * empty. A default comes back as declared (a number or boolean stays typed);\n * an env value is always a string.\n */\nexport function readRef(env: Env, ref: EnvRef): string | number | boolean | undefined {\n const value = env[refKey(ref)]\n if (value !== undefined && value !== \"\") return value\n return typeof ref === \"string\" ? undefined : ref.default\n}\n\n/** `QORE_INTEGRATION_<ALIAS>_LOGGING` — the one reserved key v1 reads. */\nexport function loggingKey(alias: string): string {\n return `${RESERVED_KEY_PREFIX}${normalizeAlias(alias)}_LOGGING`\n}\n\n/** Whether the per-call JSON log line is switched on for this alias (\"1\" or \"true\"). */\nexport function loggingEnabled(env: Env, alias: string): boolean {\n const value = env[loggingKey(alias)]\n return value === \"1\" || value?.toLowerCase() === \"true\"\n}\n","import { defaultEnv, type Env } from \"../connections-core/env\"\nimport { allKeys, requiredKeys } from \"./env\"\nimport { RESERVED_KEY_PREFIX, type IntegrationMap } from \"./types\"\n\nconst ENV_KEY_RE = /^[A-Z][A-Z0-9_]*$/\n\nexport interface IntegrationProblem {\n alias: string\n key: string\n /** `missing_env`: a required key is unset or empty. `reserved_key`: the declaration claims a key it may not. */\n code: \"missing_env\" | \"reserved_key\"\n message: string\n}\n\n/**\n * Report, at app startup, what is wrong with the declared integrations: a\n * required env key that is unset, or a key the declaration may not claim.\n * **It never throws.** Integrations are a visibility tool: an API key that is\n * not set (an obsolete integration, a vendor not contracted in this\n * environment) must cost the calls to that one integration — they fail with\n * `missing_env` — never the boot of the whole app. Each problem is logged as\n * one warning and returned, so a caller may act on them if it chooses.\n */\nexport function assertIntegrations(\n map: IntegrationMap,\n opts: { env?: Env; warn?: (message: string) => void } = {},\n): IntegrationProblem[] {\n const env = opts.env ?? defaultEnv()\n const warn = opts.warn ?? ((message: string) => console.warn(message))\n const problems: IntegrationProblem[] = []\n\n for (const [alias, def] of Object.entries(map)) {\n for (const key of allKeys(def)) {\n let why: string | undefined\n if (key.startsWith(RESERVED_KEY_PREFIX)) {\n why = `${RESERVED_KEY_PREFIX}* keys are reserved by the platform`\n } else if (key.startsWith(\"CONN_\")) {\n why = \"CONN_* keys belong to module connections, not integrations\"\n } else if (!ENV_KEY_RE.test(key)) {\n why = \"an env key is uppercase letters, digits and underscores\"\n }\n if (why) {\n problems.push({\n alias,\n key,\n code: \"reserved_key\",\n message: `Integration \"${alias}\" declares env key \"${key}\": ${why}`,\n })\n }\n }\n for (const key of requiredKeys(def)) {\n const value = env[key]\n if (value === undefined || value === \"\") {\n problems.push({\n alias,\n key,\n code: \"missing_env\",\n message: `Integration \"${alias}\" is missing env key \"${key}\"; calls to it will fail until it is set`,\n })\n }\n }\n }\n\n for (const p of problems) warn(`[integrations] ${p.message}`)\n return problems\n}\n"],"mappings":";;;;;;AA6DO,SAAS,mBAAmD,KAAW;AAC5E,SAAO;AACT;AAOO,IAAM,kBAAuD;AAAA,EAClE,MAAM,CAAC;AAAA,EACP,gBAAgB,CAAC,QAAQ;AAAA,EACzB,eAAe,CAAC,OAAO;AAAA,EACvB,OAAO,CAA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