@runeya/runeya 2.0.96 → 2.0.97

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/agent/index.js CHANGED
@@ -5575,11 +5575,13 @@ function resolveMcpServerPath() {
5575
5575
  function pickEnv(env2) {
5576
5576
  return {
5577
5577
  ...env2.RUNEYA_BASE_URL ? { RUNEYA_BASE_URL: env2.RUNEYA_BASE_URL } : {},
5578
- ...env2.RUNEYA_API_TOKEN ? { RUNEYA_API_TOKEN: env2.RUNEYA_API_TOKEN } : {}
5578
+ ...env2.RUNEYA_API_TOKEN ? { RUNEYA_API_TOKEN: env2.RUNEYA_API_TOKEN } : {},
5579
+ ...env2.RUNEYA_PROJECT_ID ? { RUNEYA_PROJECT_ID: env2.RUNEYA_PROJECT_ID } : {},
5580
+ ...env2.RUNEYA_ORG_ID ? { RUNEYA_ORG_ID: env2.RUNEYA_ORG_ID } : {}
5579
5581
  };
5580
5582
  }
5581
- function claudeMcpArgs(env2) {
5582
- const config = JSON.stringify({
5583
+ function runeyaMcpConfig(env2) {
5584
+ return JSON.stringify({
5583
5585
  mcpServers: {
5584
5586
  runeya: {
5585
5587
  command: "node",
@@ -5588,7 +5590,9 @@ function claudeMcpArgs(env2) {
5588
5590
  }
5589
5591
  }
5590
5592
  });
5591
- return ["--mcp-config", config];
5593
+ }
5594
+ function claudeMcpArgs(env2) {
5595
+ return ["--mcp-config", runeyaMcpConfig(env2)];
5592
5596
  }
5593
5597
  function codexMcpArgs(env2) {
5594
5598
  const fields = [
@@ -5646,14 +5650,18 @@ var TTL_IDLE_PTY_MS = 30 * 6e4;
5646
5650
  function resolveSpawnEnvAndArgs(opts) {
5647
5651
  const runeyaEnv = {
5648
5652
  ...opts.mcpApiBaseUrl ? { RUNEYA_BASE_URL: opts.mcpApiBaseUrl } : {},
5649
- ...opts.mcpApiToken ? { RUNEYA_API_TOKEN: opts.mcpApiToken } : {}
5653
+ ...opts.mcpApiToken ? { RUNEYA_API_TOKEN: opts.mcpApiToken } : {},
5654
+ ...opts.mcpProjectId ? { RUNEYA_PROJECT_ID: opts.mcpProjectId } : {},
5655
+ ...opts.mcpOrgId ? { RUNEYA_ORG_ID: opts.mcpOrgId } : {}
5650
5656
  };
5651
5657
  const env2 = { ...process.env, ...opts.env, ...runeyaEnv };
5652
5658
  let args = [...opts.args];
5653
5659
  if (opts.enableMcp) {
5654
5660
  const mcpEnv = {
5655
5661
  RUNEYA_BASE_URL: env2.RUNEYA_BASE_URL,
5656
- RUNEYA_API_TOKEN: env2.RUNEYA_API_TOKEN
5662
+ RUNEYA_API_TOKEN: env2.RUNEYA_API_TOKEN,
5663
+ RUNEYA_PROJECT_ID: env2.RUNEYA_PROJECT_ID,
5664
+ RUNEYA_ORG_ID: env2.RUNEYA_ORG_ID
5657
5665
  };
5658
5666
  try {
5659
5667
  if (opts.cli === "claude") {
@@ -6261,7 +6269,9 @@ var aiRouter = router({
6261
6269
  stdinData: z27.string().max(1e7).optional(),
6262
6270
  enableMcp: z27.boolean().optional(),
6263
6271
  mcpApiBaseUrl: z27.string().max(512).optional(),
6264
- mcpApiToken: z27.string().max(8192).optional()
6272
+ mcpApiToken: z27.string().max(8192).optional(),
6273
+ mcpProjectId: z27.string().max(128).optional(),
6274
+ mcpOrgId: z27.string().max(128).optional()
6265
6275
  })).mutation(({ input }) => {
6266
6276
  const spawnId = aiSpawnManager.spawn(input);
6267
6277
  return { spawnId };
@@ -6293,7 +6303,9 @@ var aiRouter = router({
6293
6303
  sessionId: z27.string().max(128).optional(),
6294
6304
  enableMcp: z27.boolean().optional(),
6295
6305
  mcpApiBaseUrl: z27.string().max(512).optional(),
6296
- mcpApiToken: z27.string().max(8192).optional()
6306
+ mcpApiToken: z27.string().max(8192).optional(),
6307
+ mcpProjectId: z27.string().max(128).optional(),
6308
+ mcpOrgId: z27.string().max(128).optional()
6297
6309
  })).mutation(({ input }) => {
6298
6310
  const spawnId = aiSpawnManager.spawnPty(input);
6299
6311
  return { spawnId };