@agenthippo-ai/agenthippo 0.1.0 → 0.2.3-dataplane

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.
Files changed (68) hide show
  1. package/out/agentpack/index.js +2 -1
  2. package/out/agentpack/paths.js +23 -0
  3. package/out/analytics/dashboard/fleetDisplayUtils.js +3 -0
  4. package/out/analytics/dashboard/webview/panel.js +290 -80
  5. package/out/analytics/sessionEvents.js +21 -4
  6. package/out/auth/brokerClient.js +1 -1
  7. package/out/auth/onboardingPrompt.js +112 -0
  8. package/out/auth/provider.js +1 -1
  9. package/out/auth-broker/config.js +8 -3
  10. package/out/auth-broker/pkce.js +3 -1
  11. package/out/auth-broker/server.js +43 -1
  12. package/out/auth-broker/store.js +6 -5
  13. package/out/cli/commands/ask.js +3 -0
  14. package/out/cli/commands/chat.js +3 -0
  15. package/out/cli/commands/deploy.js +49 -10
  16. package/out/cli/commands/gateway.js +54 -0
  17. package/out/cli/commands/idp.js +85 -0
  18. package/out/cli/commands/serve.js +401 -49
  19. package/out/cli/credential-context.js +47 -69
  20. package/out/cli/data-plane/broker.js +78 -0
  21. package/out/cli/data-plane/connector-host.js +121 -0
  22. package/out/cli/data-plane/egress.js +189 -0
  23. package/out/cli/data-plane/gateway.js +195 -0
  24. package/out/cli/data-plane/index.js +137 -0
  25. package/out/cli/data-plane/registry.js +80 -0
  26. package/out/cli/deploy/blueprints/registry.js +84 -0
  27. package/out/cli/deploy/layers/identity.js +91 -0
  28. package/out/cli/deploy-init.js +1156 -285
  29. package/out/cli/idp-init.js +303 -0
  30. package/out/cli/index.js +46 -8
  31. package/out/cli/pack-loader.js +37 -2
  32. package/out/cli/runtime.js +10 -3
  33. package/out/cli/serve-hardening.js +217 -12
  34. package/out/cli/state-sync.js +318 -29
  35. package/out/engines/claude.js +26 -5
  36. package/out/engines/codex.js +24 -5
  37. package/out/engines/custom.js +46 -12
  38. package/out/extension.js +2 -0
  39. package/out/gateway/outboundSend.js +6 -6
  40. package/out/headless/index.js +24 -6
  41. package/out/live-probe/connector.mjs +8 -0
  42. package/out/live-probe/env-report.mjs +8 -0
  43. package/out/mcp.js +88 -61
  44. package/out/remote/handleRemoteChat.js +7 -1
  45. package/out/remote/serveClient.js +27 -13
  46. package/out/scripts/analytics/agentide-litellm-otel.config.yaml +14 -0
  47. package/out/shared/models.js +1 -1
  48. package/out/shared/providers.js +5 -2
  49. package/out/test/analytics.test.js +93 -0
  50. package/out/test/auth-broker.test.js +59 -2
  51. package/out/test/blueprint-registry.test.js +105 -0
  52. package/out/test/credential-context.test.js +55 -0
  53. package/out/test/custom-env-layering.test.js +151 -0
  54. package/out/test/data-plane-engine-wiring.test.js +250 -0
  55. package/out/test/data-plane.test.js +244 -0
  56. package/out/test/deploy-init.test.js +287 -5
  57. package/out/test/egress-broker.test.js +172 -0
  58. package/out/test/fleetDisplayUtils.test.js +4 -0
  59. package/out/test/idp-init.test.js +151 -0
  60. package/out/test/mcp-obo.test.js +52 -27
  61. package/out/test/mcp.test.js +60 -4
  62. package/out/test/model-routing.test.js +133 -0
  63. package/out/test/serve-gateway-turn.test.js +267 -0
  64. package/out/test/serve-hardening.test.js +187 -0
  65. package/out/test/serveClient.test.js +37 -2
  66. package/out/test/state-sync-peer.test.js +83 -1
  67. package/out/utils.js +27 -11
  68. package/package.json +3 -4
package/out/utils.js CHANGED
@@ -55,6 +55,7 @@ exports.shortSig = shortSig;
55
55
  exports.isLocalHttps = isLocalHttps;
56
56
  exports.applyLocalTlsBypass = applyLocalTlsBypass;
57
57
  exports.getOverrideOpenAIBaseUrl = getOverrideOpenAIBaseUrl;
58
+ exports.inferModelProvider = inferModelProvider;
58
59
  exports.resolveApiRouting = resolveApiRouting;
59
60
  exports.getExplicitConfigValue = getExplicitConfigValue;
60
61
  exports.getAgentideEngineSettings = getAgentideEngineSettings;
@@ -651,20 +652,35 @@ function getOverrideOpenAIBaseUrl(baseUrl, configProvider) {
651
652
  }
652
653
  return undefined;
653
654
  }
655
+ /** Infer the direct provider from a model id — used by engines (e.g. custom) that aren't pinned to one vendor. */
656
+ function inferModelProvider(modelId) {
657
+ return modelId && /claude|anthropic/i.test(modelId) ? 'anthropic' : 'openai';
658
+ }
654
659
  /**
655
- * Resolve API key and base URL based on LiteLLM routing configuration.
656
- * Handles fallback to global litellm* settings when useLiteLLM is true.
657
- * Returns both baseUrl (for Claude/Anthropic) and openaiBaseUrl (with overrideOpenAIBaseUrl applied for Codex).
660
+ * Resolve the API key + base URL for a turn by the DESTINATION it dials, not a global
661
+ * precedence over provider keys.
662
+ *
663
+ * - LiteLLM proxy selected (`useLiteLLM`) → the LiteLLM key.
664
+ * - direct → the key for THIS engine's provider
665
+ * (codex→openai, claude→anthropic; custom infers
666
+ * from its model). Never the "other" provider's key.
667
+ *
668
+ * An explicit per-request `options.apiKey` (the IDE's single configured key) still wins — the
669
+ * per-provider `creds` are the headless/serve fallback that replaces the old
670
+ * `anthropic || openai` collapse (which sent, e.g., a codex turn to OpenAI with an Anthropic key).
658
671
  *
659
- * @param options - Agent request options
660
- * @param litellmApiKey - Fallback LiteLLM API key
661
- * @param litellmBaseUrl - Fallback LiteLLM base URL
662
- * @param configProvider - Optional config provider for resolving overrides
672
+ * @param options - Agent request options (carries an optional explicit apiKey / baseUrl / useLiteLLM)
673
+ * @param creds - Per-destination credentials (EngineConfig satisfies this)
674
+ * @param provider - The engine's direct provider, used only when NOT routing through LiteLLM
675
+ * @param configProvider - Optional config provider for resolving overrideOpenAIBaseUrl
663
676
  */
664
- function resolveApiRouting(options, litellmApiKey, litellmBaseUrl, configProvider) {
677
+ function resolveApiRouting(options, creds, provider, configProvider) {
665
678
  const useLiteLLM = options.useLiteLLM === true;
666
- const baseUrl = options.baseUrl || (useLiteLLM ? litellmBaseUrl : undefined);
667
- const liteLLMResolvedApiKey = options.apiKey || litellmApiKey || 'sk-dummy';
679
+ const baseUrl = options.baseUrl || (useLiteLLM ? creds.litellmBaseUrl : undefined);
680
+ const directKey = provider === 'anthropic' ? creds.anthropicApiKey : creds.openaiApiKey;
681
+ const resolvedApiKey = useLiteLLM
682
+ ? (options.apiKey || creds.litellmApiKey || 'sk-dummy')
683
+ : (options.apiKey || directKey || '');
668
684
  // For OpenAI-compatible endpoints, check for per-provider overrideOpenAIBaseUrl
669
685
  let openaiBaseUrl = baseUrl;
670
686
  if (baseUrl) {
@@ -674,7 +690,7 @@ function resolveApiRouting(options, litellmApiKey, litellmBaseUrl, configProvide
674
690
  }
675
691
  }
676
692
  return {
677
- apiKey: useLiteLLM ? liteLLMResolvedApiKey : (options.apiKey || ''),
693
+ apiKey: resolvedApiKey,
678
694
  baseUrl,
679
695
  openaiBaseUrl,
680
696
  useLiteLLM,
package/package.json CHANGED
@@ -1,16 +1,15 @@
1
1
  {
2
2
  "name": "@agenthippo-ai/agenthippo",
3
- "version": "0.1.0",
3
+ "version": "0.2.3-dataplane",
4
4
  "description": "AgentHippo CLI — serve, chat, and deploy agent packs",
5
5
  "author": "AgentHippo <dev@agenthippo.ai>",
6
6
  "license": "SEE LICENSE IN LICENSE",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "https://github.com/agenthippoai/agenthippo-vscode.git",
10
- "directory": "extensions/agentide"
9
+ "url": "https://github.com/agenthippoai/agenthippo-store.git"
11
10
  },
12
11
  "homepage": "https://agenthippo.ai",
13
- "bugs": "https://github.com/agenthippoai/agenthippo-vscode/issues",
12
+ "bugs": "https://github.com/agenthippoai/agenthippo-store/issues",
14
13
  "engines": {
15
14
  "node": ">=20"
16
15
  },