@elevasis/sdk 0.5.6 → 0.5.7

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/cli.cjs CHANGED
@@ -43708,17 +43708,17 @@ function resolveEnvironment(prod) {
43708
43708
  }
43709
43709
  function resolveApiKey(prod) {
43710
43710
  if (!prod && process.env.NODE_ENV === "development") {
43711
- return process.env.ELEVASIS_API_KEY_DEV ?? process.env.ELEVASIS_API_KEY ?? "";
43711
+ return process.env.ELEVASIS_PLATFORM_KEY_DEV ?? process.env.ELEVASIS_PLATFORM_KEY ?? "";
43712
43712
  }
43713
- return process.env.ELEVASIS_API_KEY ?? "";
43713
+ return process.env.ELEVASIS_PLATFORM_KEY ?? "";
43714
43714
  }
43715
43715
 
43716
43716
  // src/cli/api-client.ts
43717
43717
  function getApiKey() {
43718
- const key = process.env.ELEVASIS_API_KEY;
43718
+ const key = process.env.ELEVASIS_PLATFORM_KEY;
43719
43719
  if (!key) {
43720
43720
  throw new Error(
43721
- "ELEVASIS_API_KEY environment variable is required.\nSet it in your .env file: ELEVASIS_API_KEY=sk_..."
43721
+ "ELEVASIS_PLATFORM_KEY environment variable is required.\nSet it in your .env file: ELEVASIS_PLATFORM_KEY=sk_..."
43722
43722
  );
43723
43723
  }
43724
43724
  return key;
@@ -43730,7 +43730,7 @@ async function apiGet(endpoint, apiUrl = resolveApiUrl()) {
43730
43730
  if (!response.ok) {
43731
43731
  const errorText = await response.text();
43732
43732
  if (response.status === 401) {
43733
- throw new Error(`401 Unauthorized: Invalid or missing ELEVASIS_API_KEY. Check your .env file.`);
43733
+ throw new Error(`401 Unauthorized: Invalid or missing ELEVASIS_PLATFORM_KEY. Check your .env file.`);
43734
43734
  }
43735
43735
  throw new Error(`API request failed (${response.status}): ${errorText}`);
43736
43736
  }
@@ -43793,7 +43793,7 @@ async function apiDelete(endpoint, apiUrl = resolveApiUrl()) {
43793
43793
  // package.json
43794
43794
  var package_default = {
43795
43795
  name: "@elevasis/sdk",
43796
- version: "0.5.6",
43796
+ version: "0.5.7",
43797
43797
  description: "SDK for building Elevasis organization resources",
43798
43798
  "comment:bin": "IMPORTANT: This package shares the 'elevasis' binary name with @repo/cli. They never conflict because @elevasis/sdk must NEVER be added as a dependency of any workspace package (apps/*, packages/*, organizations/*). Workspace projects use @repo/cli for the 'elevasis' binary. External developers (outside the workspace) get this SDK's binary via npm install.",
43799
43799
  type: "module",
@@ -44293,7 +44293,7 @@ async function generateProjectMap(org) {
44293
44293
  let nodeEnv = "not set";
44294
44294
  try {
44295
44295
  const envContent = await (0, import_promises.readFile)((0, import_path.resolve)(".env"), "utf-8");
44296
- const apiKeyMatch = envContent.match(/^ELEVASIS_API_KEY=(.+)$/m);
44296
+ const apiKeyMatch = envContent.match(/^ELEVASIS_PLATFORM_KEY=(.+)$/m);
44297
44297
  if (apiKeyMatch && apiKeyMatch[1].trim()) apiKeySet = "yes";
44298
44298
  const nodeEnvMatch = envContent.match(/^NODE_ENV=(.+)$/m);
44299
44299
  if (nodeEnvMatch && nodeEnvMatch[1].trim()) nodeEnv = nodeEnvMatch[1].trim();
@@ -44329,7 +44329,7 @@ function registerDeployCommand(program3) {
44329
44329
  authSpinner.fail(source_default.red("Authentication failed"));
44330
44330
  const errMsg = error46 instanceof Error ? error46.message : String(error46);
44331
44331
  if (errMsg.includes("401") || errMsg.toLowerCase().includes("unauthorized")) {
44332
- const keyVar = !options2.prod && process.env.NODE_ENV === "development" && process.env.ELEVASIS_API_KEY_DEV ? "ELEVASIS_API_KEY_DEV" : "ELEVASIS_API_KEY";
44332
+ const keyVar = !options2.prod && process.env.NODE_ENV === "development" && process.env.ELEVASIS_PLATFORM_KEY_DEV ? "ELEVASIS_PLATFORM_KEY_DEV" : "ELEVASIS_PLATFORM_KEY";
44333
44333
  console.error(source_default.red(" Invalid API key."));
44334
44334
  console.error(source_default.gray(` Your ${keyVar} was rejected by the server.`));
44335
44335
  console.error(source_default.gray(" Check your .env file and verify the key in the Elevasis dashboard."));
@@ -44469,7 +44469,7 @@ startWorker(org)
44469
44469
  entryPoints: [wrapperPath],
44470
44470
  bundle: true,
44471
44471
  platform: "node",
44472
- format: "esm",
44472
+ format: "cjs",
44473
44473
  outfile: bundleOutfile
44474
44474
  });
44475
44475
  await (0, import_promises.unlink)(wrapperPath);
@@ -44494,9 +44494,9 @@ startWorker(org)
44494
44494
  uploadSpinner.fail(source_default.red("Missing API key environment variable"));
44495
44495
  console.error(source_default.gray(" Set it in your .env file or shell environment:"));
44496
44496
  if (!options2.prod && process.env.NODE_ENV === "development") {
44497
- console.error(source_default.gray(" ELEVASIS_API_KEY_DEV=sk_... (or ELEVASIS_API_KEY as fallback)"));
44497
+ console.error(source_default.gray(" ELEVASIS_PLATFORM_KEY_DEV=sk_... (or ELEVASIS_PLATFORM_KEY as fallback)"));
44498
44498
  } else {
44499
- console.error(source_default.gray(" ELEVASIS_API_KEY=sk_..."));
44499
+ console.error(source_default.gray(" ELEVASIS_PLATFORM_KEY=sk_..."));
44500
44500
  }
44501
44501
  throw new Error("Missing API key environment variable");
44502
44502
  }
@@ -45139,11 +45139,11 @@ function tsconfigTemplate() {
45139
45139
  }, null, 2) + "\n";
45140
45140
  }
45141
45141
  function envTemplate() {
45142
- return `ELEVASIS_API_KEY=
45142
+ return `ELEVASIS_PLATFORM_KEY=
45143
45143
  `;
45144
45144
  }
45145
45145
  function envExampleTemplate() {
45146
- return `ELEVASIS_API_KEY=sk_your_key_here
45146
+ return `ELEVASIS_PLATFORM_KEY=sk_your_key_here
45147
45147
  `;
45148
45148
  }
45149
45149
  function npmrcTemplate() {
@@ -45185,7 +45185,7 @@ pnpm install
45185
45185
  Copy \`.env.example\` to \`.env\` and add your API key:
45186
45186
 
45187
45187
  \`\`\`
45188
- ELEVASIS_API_KEY=sk_...
45188
+ ELEVASIS_PLATFORM_KEY=sk_...
45189
45189
  \`\`\`
45190
45190
 
45191
45191
  ## Development
@@ -45437,7 +45437,7 @@ proactivity -- to their assessed levels.
45437
45437
  | Workspace concepts | \`reference/concepts/index.mdx\` | User asks "what is...?" or needs conceptual grounding |
45438
45438
  | SDK patterns and examples | \`reference/resources/patterns.mdx\` | Building or modifying a workflow |
45439
45439
  | Platform tool catalog | \`reference/platform-tools/index.mdx\` | Connecting to external services |
45440
- | CLI reference | \`reference/cli/index.mdx\` | Running CLI operations |
45440
+ | CLI reference | \`reference/cli/index.mdx\` | Running execution/platform operations |
45441
45441
  | Credential model | \`reference/security/credentials.mdx\` | Setting up integrations or tool access |
45442
45442
  | Interaction guidance | \`reference/developer/interaction-guidance.mdx\` | Unsure how to adapt for a skill combination |
45443
45443
  | Error history | \`.claude/memory/errors/index.md\` | Debugging errors, checking past fixes |
@@ -45455,7 +45455,7 @@ All \`reference/\` paths resolve to \`node_modules/@elevasis/sdk/reference/\`.
45455
45455
 
45456
45456
  ## Elevasis CLI
45457
45457
 
45458
- **MANDATORY:** Use the \`elevasis\` CLI for all operations -- never \`npx\`, \`curl\`, or any other tool.
45458
+ **MANDATORY:** Use the \`elevasis\` CLI for all execution/platform operations -- never \`npx\`, \`curl\`, or any other tool.
45459
45459
 
45460
45460
  - \`elevasis exec <resource-id> --input '{...}'\` -- run a resource synchronously
45461
45461
  - \`elevasis exec <resource-id> --input '{...}' --async\` -- run async, returns execution ID
@@ -46115,14 +46115,14 @@ by the \`<!-- initialized: false -->\` flag in CLAUDE.md, or run manually.
46115
46115
  Run \`pnpm install\`. Wait for completion. Report any errors.
46116
46116
 
46117
46117
  2. **Setup environment**
46118
- Read \`.env\`. It should contain only a single line: \`ELEVASIS_API_KEY=\`.
46119
- If \`ELEVASIS_API_KEY\` is empty or missing, ask the user: "What is your
46118
+ Read \`.env\`. It should contain only a single line: \`ELEVASIS_PLATFORM_KEY=\`.
46119
+ If \`ELEVASIS_PLATFORM_KEY\` is empty or missing, ask the user: "What is your
46120
46120
  Elevasis API key?" When the user provides it, write \`.env\` with exactly:
46121
46121
  \`\`\`
46122
- ELEVASIS_API_KEY=<value they provided>
46122
+ ELEVASIS_PLATFORM_KEY=<value they provided>
46123
46123
  \`\`\`
46124
46124
  No other keys (no \`NODE_ENV\`, no extras). The \`.env\` file must contain
46125
- only \`ELEVASIS_API_KEY\`.
46125
+ only \`ELEVASIS_PLATFORM_KEY\`.
46126
46126
  Validate the key works: run \`elevasis resources\` (should return an empty
46127
46127
  list, not an auth error). If auth fails, tell the user their key appears
46128
46128
  invalid and ask them to check it in the Elevasis dashboard.
@@ -46610,7 +46610,7 @@ organization. They are used by workflows and agents at runtime via \`platform.ge
46610
46610
  or the \`credential:\` field on tool steps.
46611
46611
 
46612
46612
  The SDK CLI (\`elevasis-sdk creds\`) manages credentials via API key authentication.
46613
- Your \`ELEVASIS_API_KEY\` in \`.env\` determines the organization.
46613
+ Your \`ELEVASIS_PLATFORM_KEY\` in \`.env\` determines the organization.
46614
46614
 
46615
46615
  ## Credential Types
46616
46616
 
@@ -46710,7 +46710,7 @@ description: Elevasis SDK patterns -- imports, source structure, runtime, and pl
46710
46710
 
46711
46711
  ## Runtime
46712
46712
 
46713
- - \`.env\` contains only \`ELEVASIS_API_KEY\` for CLI auth -- never deployed, never in worker memory
46713
+ - \`.env\` contains only \`ELEVASIS_PLATFORM_KEY\` for CLI auth -- never deployed, never in worker memory
46714
46714
  - Integration credentials are managed via the \`creds\` skill or Command Center UI
46715
46715
 
46716
46716
  ## Platform Tools
package/dist/index.d.ts CHANGED
@@ -6320,7 +6320,7 @@ type ResourceStatus = 'dev' | 'prod';
6320
6320
  /**
6321
6321
  * Project configuration for an external developer project.
6322
6322
  * Defined in elevasis.config.ts at the project root.
6323
- * Organization is derived from the ELEVASIS_API_KEY -- not configured here.
6323
+ * Organization is derived from the ELEVASIS_PLATFORM_KEY -- not configured here.
6324
6324
  */
6325
6325
  interface ElevasConfig {
6326
6326
  /** Managed by `elevasis init` and `elevasis update`. Do not set manually. */
package/dist/templates.js CHANGED
@@ -228,7 +228,7 @@ proactivity -- to their assessed levels.
228
228
  | Workspace concepts | \`reference/concepts/index.mdx\` | User asks "what is...?" or needs conceptual grounding |
229
229
  | SDK patterns and examples | \`reference/resources/patterns.mdx\` | Building or modifying a workflow |
230
230
  | Platform tool catalog | \`reference/platform-tools/index.mdx\` | Connecting to external services |
231
- | CLI reference | \`reference/cli/index.mdx\` | Running CLI operations |
231
+ | CLI reference | \`reference/cli/index.mdx\` | Running execution/platform operations |
232
232
  | Credential model | \`reference/security/credentials.mdx\` | Setting up integrations or tool access |
233
233
  | Interaction guidance | \`reference/developer/interaction-guidance.mdx\` | Unsure how to adapt for a skill combination |
234
234
  | Error history | \`.claude/memory/errors/index.md\` | Debugging errors, checking past fixes |
@@ -246,7 +246,7 @@ All \`reference/\` paths resolve to \`node_modules/@elevasis/sdk/reference/\`.
246
246
 
247
247
  ## Elevasis CLI
248
248
 
249
- **MANDATORY:** Use the \`elevasis\` CLI for all operations -- never \`npx\`, \`curl\`, or any other tool.
249
+ **MANDATORY:** Use the \`elevasis\` CLI for all execution/platform operations -- never \`npx\`, \`curl\`, or any other tool.
250
250
 
251
251
  - \`elevasis exec <resource-id> --input '{...}'\` -- run a resource synchronously
252
252
  - \`elevasis exec <resource-id> --input '{...}' --async\` -- run async, returns execution ID
@@ -906,14 +906,14 @@ by the \`<!-- initialized: false -->\` flag in CLAUDE.md, or run manually.
906
906
  Run \`pnpm install\`. Wait for completion. Report any errors.
907
907
 
908
908
  2. **Setup environment**
909
- Read \`.env\`. It should contain only a single line: \`ELEVASIS_API_KEY=\`.
910
- If \`ELEVASIS_API_KEY\` is empty or missing, ask the user: "What is your
909
+ Read \`.env\`. It should contain only a single line: \`ELEVASIS_PLATFORM_KEY=\`.
910
+ If \`ELEVASIS_PLATFORM_KEY\` is empty or missing, ask the user: "What is your
911
911
  Elevasis API key?" When the user provides it, write \`.env\` with exactly:
912
912
  \`\`\`
913
- ELEVASIS_API_KEY=<value they provided>
913
+ ELEVASIS_PLATFORM_KEY=<value they provided>
914
914
  \`\`\`
915
915
  No other keys (no \`NODE_ENV\`, no extras). The \`.env\` file must contain
916
- only \`ELEVASIS_API_KEY\`.
916
+ only \`ELEVASIS_PLATFORM_KEY\`.
917
917
  Validate the key works: run \`elevasis resources\` (should return an empty
918
918
  list, not an auth error). If auth fails, tell the user their key appears
919
919
  invalid and ask them to check it in the Elevasis dashboard.
@@ -1401,7 +1401,7 @@ organization. They are used by workflows and agents at runtime via \`platform.ge
1401
1401
  or the \`credential:\` field on tool steps.
1402
1402
 
1403
1403
  The SDK CLI (\`elevasis-sdk creds\`) manages credentials via API key authentication.
1404
- Your \`ELEVASIS_API_KEY\` in \`.env\` determines the organization.
1404
+ Your \`ELEVASIS_PLATFORM_KEY\` in \`.env\` determines the organization.
1405
1405
 
1406
1406
  ## Credential Types
1407
1407
 
@@ -1501,7 +1501,7 @@ description: Elevasis SDK patterns -- imports, source structure, runtime, and pl
1501
1501
 
1502
1502
  ## Runtime
1503
1503
 
1504
- - \`.env\` contains only \`ELEVASIS_API_KEY\` for CLI auth -- never deployed, never in worker memory
1504
+ - \`.env\` contains only \`ELEVASIS_PLATFORM_KEY\` for CLI auth -- never deployed, never in worker memory
1505
1505
  - Integration credentials are managed via the \`creds\` skill or Command Center UI
1506
1506
 
1507
1507
  ## Platform Tools
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevasis/sdk",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "description": "SDK for building Elevasis organization resources",
5
5
  "comment:bin": "IMPORTANT: This package shares the 'elevasis' binary name with @repo/cli. They never conflict because @elevasis/sdk must NEVER be added as a dependency of any workspace package (apps/*, packages/*, organizations/*). Workspace projects use @repo/cli for the 'elevasis' binary. External developers (outside the workspace) get this SDK's binary via npm install.",
6
6
  "type": "module",