robotrock 1.3.2 → 1.3.3

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.
@@ -33,9 +33,72 @@ declare function robotrockUserContextAuth(options?: RobotrockUserContextAuthOpti
33
33
  * (`GET /eve/v1/info` during verify and tenant connect).
34
34
  */
35
35
  declare function robotrockAgentServiceAuth(): AuthFn<Request>;
36
- /** Bearer token used by the RobotRock webhook resume self-call. */
36
+ /**
37
+ * Bearer token for RobotRock platform reachability and dashboard proxy calls.
38
+ *
39
+ * When a workspace admin connects a protected single-tenant deployment, they
40
+ * enter a Bearer token in **Settings → Agents**. RobotRock stores it in
41
+ * WorkOS Vault and sends `Authorization: Bearer <token>` on:
42
+ *
43
+ * - `GET /eve/v1/info` and `GET /eve/v1/health` (connect / re-sync)
44
+ * - `POST /eve/v1/session` and `POST /eve/v1/session/:sessionId` (chat + resume)
45
+ * - `GET /eve/v1/session/:sessionId/stream` (chat streaming)
46
+ * - optional icon paths (`/favicon.ico`, `/icon.svg`, `/icon.png`)
47
+ *
48
+ * Set `EVE_SELF_AUTH_TOKEN` on the agent to the same value. Use
49
+ * `robotrockEveChannel()` so this authenticator is registered on the Eve channel.
50
+ */
37
51
  declare function eveSelfServiceAuth(): AuthFn<Request>;
38
52
 
53
+ /**
54
+ * Eve HTTP routes RobotRock reaches when connecting, re-syncing, or proxying
55
+ * dashboard chat. Use these paths when smoke-testing a protected deployment.
56
+ *
57
+ * Self-hosted agents that require deployment access: set `EVE_SELF_AUTH_TOKEN` on
58
+ * the agent to the same value the workspace admin enters under **Settings →
59
+ * Agents → Deployment access → Bearer token**. RobotRock stores that token in
60
+ * WorkOS Vault and sends it as `Authorization: Bearer <token>` on every call
61
+ * below (plus `X-RobotRock-User-Token` during inbox chat).
62
+ */
63
+ /** Routes RobotRock calls directly from the dashboard backend (connect / re-sync). */
64
+ declare const ROBOTROCK_EVE_CONNECT_ROUTES: {
65
+ /** Agent manifest + `robotrock-ready` hook detection. */
66
+ readonly info: {
67
+ readonly method: "GET";
68
+ readonly path: "/eve/v1/info";
69
+ };
70
+ /** Optional health probe (same auth as `/info` when the channel is protected). */
71
+ readonly health: {
72
+ readonly method: "GET";
73
+ readonly path: "/eve/v1/health";
74
+ };
75
+ };
76
+ /** Static assets RobotRock may HEAD/GET for the agent avatar in Settings. */
77
+ declare const ROBOTROCK_EVE_ICON_PATHS: readonly ["/favicon.ico", "/icon.svg", "/icon.png"];
78
+ /**
79
+ * Routes proxied through `/{tenant}/api/eve/{connectionId}/…` during inbox chat
80
+ * and task-handled resume. The Eve client issues these against the proxy host;
81
+ * the proxy forwards them to the deployment with vault credentials attached.
82
+ */
83
+ declare const ROBOTROCK_EVE_CHAT_ROUTES: {
84
+ readonly createSession: {
85
+ readonly method: "POST";
86
+ readonly path: "/eve/v1/session";
87
+ };
88
+ readonly continueSession: {
89
+ readonly method: "POST";
90
+ readonly path: "/eve/v1/session/:sessionId";
91
+ };
92
+ readonly messageStream: {
93
+ readonly method: "GET";
94
+ readonly path: "/eve/v1/session/:sessionId/stream";
95
+ };
96
+ };
97
+ /** Env var on the Eve agent that must match the dashboard Bearer token. */
98
+ declare const EVE_SELF_AUTH_TOKEN_ENV_VAR = "EVE_SELF_AUTH_TOKEN";
99
+ /** All Eve route paths that should accept the dashboard Bearer token on protected deployments. */
100
+ declare const ROBOTROCK_EVE_BEARER_PROTECTED_PATHS: readonly ["/eve/v1/info", "/eve/v1/health", "/eve/v1/session", "/eve/v1/session/:sessionId", "/eve/v1/session/:sessionId/stream", "/favicon.ico", "/icon.svg", "/icon.png"];
101
+
39
102
  /** Resolve the platform RS256 public key used to verify dashboard user-context JWTs. */
40
103
  declare function resolvePlatformUserContextPublicKeyPem(): Promise<string | null>;
41
104
 
@@ -161,4 +224,4 @@ declare const robotrockChatAuditHook: HookDefinition;
161
224
  /** Alias for agents that prefer a factory name. */
162
225
  declare function defineRobotRockChatAuditHook(): HookDefinition;
163
226
 
164
- export { type CreateRobotRockCronChatInput, type CreateRobotRockTaskInput, ROBOTROCK_USER_CONTEXT_HEADER, type RobotRockChatAuditPayload, type RobotRockTaskActionInput, type RobotRockTaskAssignToInput, type RobotRockTaskContextInput, type RobotRockTaskToolInput, type RobotrockEveChannelOptions, type RobotrockUserContextAuthOptions, buildRobotRockTaskPayload, createRobotRockCronChat, createRobotRockTask, defineRobotRockChatAuditHook, defineRobotRockReadyHook, eveSelfServiceAuth, fetchRobotRockStagedHitl, postRobotRockChatInputAudit, postRobotRockLinkChatTask, postRobotRockStageHitl, resetBoundClientAuthWarning, resetChatAuditWarnings, resetRobotrockChatAuditIdempotencyKeys, resolvePlatformUserContextPublicKeyPem, resolveTaskHandledWebhookUrl, robotrockAgentServiceAuth, robotrockChatAuditHook, robotrockEveChannel, robotrockReadyHook, robotrockUserContextAuth, tryCreateBoundRobotRockClient };
227
+ export { type CreateRobotRockCronChatInput, type CreateRobotRockTaskInput, EVE_SELF_AUTH_TOKEN_ENV_VAR, ROBOTROCK_EVE_BEARER_PROTECTED_PATHS, ROBOTROCK_EVE_CHAT_ROUTES, ROBOTROCK_EVE_CONNECT_ROUTES, ROBOTROCK_EVE_ICON_PATHS, ROBOTROCK_USER_CONTEXT_HEADER, type RobotRockChatAuditPayload, type RobotRockTaskActionInput, type RobotRockTaskAssignToInput, type RobotRockTaskContextInput, type RobotRockTaskToolInput, type RobotrockEveChannelOptions, type RobotrockUserContextAuthOptions, buildRobotRockTaskPayload, createRobotRockCronChat, createRobotRockTask, defineRobotRockChatAuditHook, defineRobotRockReadyHook, eveSelfServiceAuth, fetchRobotRockStagedHitl, postRobotRockChatInputAudit, postRobotRockLinkChatTask, postRobotRockStageHitl, resetBoundClientAuthWarning, resetChatAuditWarnings, resetRobotrockChatAuditIdempotencyKeys, resolvePlatformUserContextPublicKeyPem, resolveTaskHandledWebhookUrl, robotrockAgentServiceAuth, robotrockChatAuditHook, robotrockEveChannel, robotrockReadyHook, robotrockUserContextAuth, tryCreateBoundRobotRockClient };
@@ -638,6 +638,39 @@ function eveSelfServiceAuth() {
638
638
  };
639
639
  }
640
640
 
641
+ // src/eve/agent/deployment-access.ts
642
+ var ROBOTROCK_EVE_CONNECT_ROUTES = {
643
+ /** Agent manifest + `robotrock-ready` hook detection. */
644
+ info: { method: "GET", path: "/eve/v1/info" },
645
+ /** Optional health probe (same auth as `/info` when the channel is protected). */
646
+ health: { method: "GET", path: "/eve/v1/health" }
647
+ };
648
+ var ROBOTROCK_EVE_ICON_PATHS = [
649
+ "/favicon.ico",
650
+ "/icon.svg",
651
+ "/icon.png"
652
+ ];
653
+ var ROBOTROCK_EVE_CHAT_ROUTES = {
654
+ createSession: { method: "POST", path: "/eve/v1/session" },
655
+ continueSession: {
656
+ method: "POST",
657
+ path: "/eve/v1/session/:sessionId"
658
+ },
659
+ messageStream: {
660
+ method: "GET",
661
+ path: "/eve/v1/session/:sessionId/stream"
662
+ }
663
+ };
664
+ var EVE_SELF_AUTH_TOKEN_ENV_VAR = "EVE_SELF_AUTH_TOKEN";
665
+ var ROBOTROCK_EVE_BEARER_PROTECTED_PATHS = [
666
+ ROBOTROCK_EVE_CONNECT_ROUTES.info.path,
667
+ ROBOTROCK_EVE_CONNECT_ROUTES.health.path,
668
+ ROBOTROCK_EVE_CHAT_ROUTES.createSession.path,
669
+ ROBOTROCK_EVE_CHAT_ROUTES.continueSession.path,
670
+ ROBOTROCK_EVE_CHAT_ROUTES.messageStream.path,
671
+ ...ROBOTROCK_EVE_ICON_PATHS
672
+ ];
673
+
641
674
  // src/eve/agent/channel.ts
642
675
  import { eveChannel } from "eve/channels/eve";
643
676
  import { localDev, vercelOidc } from "eve/channels/auth";
@@ -2706,6 +2739,11 @@ function requireBoundAgentAdminClient(ctx) {
2706
2739
  return createBoundAgentAdminClient(ctx);
2707
2740
  }
2708
2741
  export {
2742
+ EVE_SELF_AUTH_TOKEN_ENV_VAR,
2743
+ ROBOTROCK_EVE_BEARER_PROTECTED_PATHS,
2744
+ ROBOTROCK_EVE_CHAT_ROUTES,
2745
+ ROBOTROCK_EVE_CONNECT_ROUTES,
2746
+ ROBOTROCK_EVE_ICON_PATHS,
2709
2747
  ROBOTROCK_PLATFORM_USER_CONTEXT_PUBLIC_KEY_URL,
2710
2748
  ROBOTROCK_READY_HOOK_SLUG,
2711
2749
  ROBOTROCK_USER_CONTEXT_AUDIENCE,