@relkit/runtime-hono 0.7.9 → 0.8.0

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 (99) hide show
  1. package/dist/agent-control-admission.d.ts +1 -1
  2. package/dist/agent-control-admission.d.ts.map +1 -1
  3. package/dist/agent-control-application.d.ts +1 -1
  4. package/dist/agent-control-worker.d.ts +1 -1
  5. package/dist/agent-follow-up.d.ts +2 -2
  6. package/dist/agent-journal.d.ts +5 -5
  7. package/dist/agent-reads.d.ts +5 -5
  8. package/dist/agent-reads.d.ts.map +1 -1
  9. package/dist/agent-rpc-read.d.ts +5 -5
  10. package/dist/agent-rpc-read.d.ts.map +1 -1
  11. package/dist/agent-rpc-resume-admission.d.ts +2 -2
  12. package/dist/agent-rpc-resume-admission.d.ts.map +1 -1
  13. package/dist/agent-rpc-resume-admission.js +1 -1
  14. package/dist/agent-rpc-resume-admission.js.map +1 -1
  15. package/dist/agent-rpc-resume.d.ts +1 -1
  16. package/dist/agent-rpc-resume.d.ts.map +1 -1
  17. package/dist/agent-rpc-support.d.ts +2 -2
  18. package/dist/agent-rpc-worker.d.ts +1 -1
  19. package/dist/agent-rpc-write.d.ts +2 -2
  20. package/dist/agent-rpc-write.d.ts.map +1 -1
  21. package/dist/agent-run-admission.d.ts +1 -1
  22. package/dist/agent-run-admission.d.ts.map +1 -1
  23. package/dist/api-docs.d.ts +1 -1
  24. package/dist/api-docs.d.ts.map +1 -1
  25. package/dist/api-docs.js +12 -8
  26. package/dist/api-docs.js.map +1 -1
  27. package/dist/api-docs.types.d.ts +18 -0
  28. package/dist/api-docs.types.d.ts.map +1 -1
  29. package/dist/core-endpoints.d.ts +9 -0
  30. package/dist/core-endpoints.d.ts.map +1 -0
  31. package/dist/core-endpoints.js +33 -0
  32. package/dist/core-endpoints.js.map +1 -0
  33. package/dist/create-app.d.ts +2 -2
  34. package/dist/create-app.d.ts.map +1 -1
  35. package/dist/create-app.js +24 -3
  36. package/dist/create-app.js.map +1 -1
  37. package/dist/create-app.types.d.ts +10 -1
  38. package/dist/create-app.types.d.ts.map +1 -1
  39. package/dist/create-inspection-app.d.ts +7 -0
  40. package/dist/create-inspection-app.d.ts.map +1 -0
  41. package/dist/create-inspection-app.js +22 -0
  42. package/dist/create-inspection-app.js.map +1 -0
  43. package/dist/create-rest-app.d.ts.map +1 -1
  44. package/dist/create-rest-app.js +8 -1
  45. package/dist/create-rest-app.js.map +1 -1
  46. package/dist/index.d.ts +5 -2
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +5 -2
  49. package/dist/index.js.map +1 -1
  50. package/dist/internal-endpoints-utils.d.ts +1 -0
  51. package/dist/internal-endpoints-utils.d.ts.map +1 -1
  52. package/dist/internal-endpoints-utils.js +2 -1
  53. package/dist/internal-endpoints-utils.js.map +1 -1
  54. package/dist/internal-endpoints.types.d.ts +6 -1
  55. package/dist/internal-endpoints.types.d.ts.map +1 -1
  56. package/dist/materialize-routes.d.ts +2 -2
  57. package/dist/materialize-routes.d.ts.map +1 -1
  58. package/dist/materialize-routes.js +1 -3
  59. package/dist/materialize-routes.js.map +1 -1
  60. package/dist/materialize-routes.types.d.ts +2 -1
  61. package/dist/materialize-routes.types.d.ts.map +1 -1
  62. package/dist/mcp.d.ts +1 -1
  63. package/dist/mcp.d.ts.map +1 -1
  64. package/dist/mcp.js +5 -0
  65. package/dist/mcp.js.map +1 -1
  66. package/dist/optional-transports.types.d.ts +21 -0
  67. package/dist/optional-transports.types.d.ts.map +1 -0
  68. package/dist/optional-transports.types.js +2 -0
  69. package/dist/optional-transports.types.js.map +1 -0
  70. package/dist/prepared-app.d.ts +2 -1
  71. package/dist/prepared-app.d.ts.map +1 -1
  72. package/dist/prepared-app.js +19 -9
  73. package/dist/prepared-app.js.map +1 -1
  74. package/dist/prepared-transports.service.d.ts +3 -2
  75. package/dist/prepared-transports.service.d.ts.map +1 -1
  76. package/dist/prepared-transports.service.js +35 -13
  77. package/dist/prepared-transports.service.js.map +1 -1
  78. package/dist/prepared-transports.types.d.ts +10 -3
  79. package/dist/prepared-transports.types.d.ts.map +1 -1
  80. package/dist/request-mapping-body.d.ts.map +1 -1
  81. package/dist/request-mapping-body.js +2 -6
  82. package/dist/request-mapping-body.js.map +1 -1
  83. package/dist/request-multipart.d.ts +3 -0
  84. package/dist/request-multipart.d.ts.map +1 -0
  85. package/dist/request-multipart.js +38 -0
  86. package/dist/request-multipart.js.map +1 -0
  87. package/dist/scalar.d.ts +16 -0
  88. package/dist/scalar.d.ts.map +1 -0
  89. package/dist/scalar.js +22 -0
  90. package/dist/scalar.js.map +1 -0
  91. package/dist/selected-transports.d.ts +16 -0
  92. package/dist/selected-transports.d.ts.map +1 -0
  93. package/dist/selected-transports.js +41 -0
  94. package/dist/selected-transports.js.map +1 -0
  95. package/dist/selected-transports.service.d.ts +22 -0
  96. package/dist/selected-transports.service.d.ts.map +1 -0
  97. package/dist/selected-transports.service.js +73 -0
  98. package/dist/selected-transports.service.js.map +1 -0
  99. package/package.json +54 -18
@@ -9,5 +9,5 @@ import { type AgentInput } from "./agent-rpc-support.js";
9
9
  * @param options - Application dependencies and configuration for this domain.
10
10
  * @returns The accepted control receipt for the current writable run.
11
11
  */
12
- export declare const acceptAgentControlEffect: (input: AgentInput, context: RpcContext, options: RouteMaterializationOptions) => Effect.Effect<import("@relkit/agents").ControlReceipt, HttpBoundaryError, never>;
12
+ export declare const acceptAgentControlEffect: (input: AgentInput, context: RpcContext, options: RouteMaterializationOptions) => Effect.Effect<import("@relkit/contracts").ControlReceipt, HttpBoundaryError, never>;
13
13
  //# sourceMappingURL=agent-control-admission.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-control-admission.d.ts","sourceRoot":"","sources":["../src/agent-control-admission.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAgB,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAKnE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,wBAAwB,CAAC;AAIhC;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,oKAmFnC,CAAC"}
1
+ {"version":3,"file":"agent-control-admission.d.ts","sourceRoot":"","sources":["../src/agent-control-admission.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAgB,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAKnE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,wBAAwB,CAAC;AAIhC;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,uKAmFnC,CAAC"}
@@ -25,7 +25,7 @@ export declare const applyControlEffect: (resolved: {
25
25
  };
26
26
  };
27
27
  node: import("@relkit/graph").AgentRegistration;
28
- provider: import("@relkit/agents").AgentStateProvider;
28
+ provider: import("@relkit/contracts").AgentStateProvider;
29
29
  scope: import("@relkit/contracts").AgentRequestScope;
30
30
  trusted: unknown;
31
31
  }, threadId: string, runId: string, options: RouteMaterializationOptions, operationId: OperationId, runController: AbortController, approvals: AgentApprovalCoordinator, active: ActiveAgentExecution) => Effect.Effect<void, import("./http-effect.js").HttpBoundaryError, never>;
@@ -23,7 +23,7 @@ declare const consumeAgentControlsEffect: (resolved: {
23
23
  };
24
24
  };
25
25
  node: import("@relkit/graph").AgentRegistration;
26
- provider: import("@relkit/agents").AgentStateProvider;
26
+ provider: import("@relkit/contracts").AgentStateProvider;
27
27
  scope: import("@relkit/contracts").AgentRequestScope;
28
28
  trusted: unknown;
29
29
  }, active: ActiveAgentExecution, options: RouteMaterializationOptions, runController: AbortController, approvals: AgentApprovalCoordinator, signal: AbortSignal) => Effect.Effect<void, import("./http-effect.js").HttpBoundaryError, never>;
@@ -21,11 +21,11 @@ declare const processAgentFollowUpsEffect: (resolved: {
21
21
  };
22
22
  };
23
23
  node: import("@relkit/graph").AgentRegistration;
24
- provider: import("@relkit/agents").AgentStateProvider;
24
+ provider: import("@relkit/contracts").AgentStateProvider;
25
25
  scope: import("@relkit/contracts").AgentRequestScope;
26
26
  trusted: unknown;
27
27
  }, active: ActiveAgentExecution, options: RouteMaterializationOptions, startNext: boolean) => Effect.Effect<{
28
- receipt: import("@relkit/agents").AcceptRunReceipt;
28
+ receipt: import("@relkit/contracts").AcceptRunReceipt;
29
29
  input: unknown;
30
30
  controlRunIds: string[];
31
31
  } | undefined, import("./http-effect.js").HttpBoundaryError, never>;
@@ -24,7 +24,7 @@ export declare const appendAgentMessageEffect: (resolved: {
24
24
  };
25
25
  };
26
26
  node: import("@relkit/graph").AgentRegistration;
27
- provider: import("@relkit/agents").AgentStateProvider;
27
+ provider: import("@relkit/contracts").AgentStateProvider;
28
28
  scope: import("@relkit/contracts").AgentRequestScope;
29
29
  trusted: unknown;
30
30
  }, receipt: AcceptRunReceipt, claim: ExecutionClaim, role: "user" | "assistant", value: unknown, messageId?: string | undefined, createdAt?: string | undefined, state?: "streaming" | "complete" | undefined) => Effect.Effect<void, import("./http-effect.js").HttpBoundaryError, never>;
@@ -46,7 +46,7 @@ export declare const appendBrowserMessageEffect: (resolved: {
46
46
  };
47
47
  };
48
48
  node: import("@relkit/graph").AgentRegistration;
49
- provider: import("@relkit/agents").AgentStateProvider;
49
+ provider: import("@relkit/contracts").AgentStateProvider;
50
50
  scope: import("@relkit/contracts").AgentRequestScope;
51
51
  trusted: unknown;
52
52
  }, receipt: AcceptRunReceipt, claim: ExecutionClaim, message: BrowserMessage) => Effect.Effect<void, import("./http-effect.js").HttpBoundaryError, never>;
@@ -76,10 +76,10 @@ export declare const completeAgentRunEffect: (resolved: {
76
76
  };
77
77
  };
78
78
  node: import("@relkit/graph").AgentRegistration;
79
- provider: import("@relkit/agents").AgentStateProvider;
79
+ provider: import("@relkit/contracts").AgentStateProvider;
80
80
  scope: import("@relkit/contracts").AgentRequestScope;
81
81
  trusted: unknown;
82
- }, receipt: AcceptRunReceipt, claim: ExecutionClaim, outcome: "failed" | "cancelled" | "succeeded", publicValue: unknown) => Effect.Effect<void, import("./http-effect.js").HttpBoundaryError, never>;
82
+ }, receipt: AcceptRunReceipt, claim: ExecutionClaim, outcome: "cancelled" | "failed" | "succeeded", publicValue: unknown) => Effect.Effect<void, import("./http-effect.js").HttpBoundaryError, never>;
83
83
  /** Marks an owned run interrupted using its expected generation and fencing claim.
84
84
  * @param resolved - Authorized agent descriptor, provider and durable request scope.
85
85
  * @param receipt - Durable accepted-run receipt identifying the thread and run.
@@ -99,7 +99,7 @@ export declare const interruptAgentRunEffect: (resolved: {
99
99
  };
100
100
  };
101
101
  node: import("@relkit/graph").AgentRegistration;
102
- provider: import("@relkit/agents").AgentStateProvider;
102
+ provider: import("@relkit/contracts").AgentStateProvider;
103
103
  scope: import("@relkit/contracts").AgentRequestScope;
104
104
  trusted: unknown;
105
105
  }, receipt: AcceptRunReceipt, claim: ExecutionClaim, expectedOwner: RunOwner, reason?: "claim-expired" | "generation-unavailable" | "process-lost" | undefined) => Effect.Effect<void, import("./http-effect.js").HttpBoundaryError, never>;
@@ -9,7 +9,7 @@ import { type AgentInput } from "./agent-rpc-support.js";
9
9
  * @param options - Application dependencies and configuration for this domain.
10
10
  * @returns Up to 100 authorized thread summaries.
11
11
  */
12
- export declare const listAgentThreadsEffect: (input: AgentInput, context: RpcContext, options: RouteMaterializationOptions) => Effect.Effect<import("@relkit/agents").ThreadList, HttpBoundaryError, never>;
12
+ export declare const listAgentThreadsEffect: (input: AgentInput, context: RpcContext, options: RouteMaterializationOptions) => Effect.Effect<import("@relkit/contracts").ThreadList, HttpBoundaryError, never>;
13
13
  /** Loads the requested thread and applies browser compatibility projection.
14
14
  * @param input - Submitted operation input; validation and authorization occur before effects are admitted.
15
15
  * @param context - Trusted Hono or oRPC request context containing request state and authentication.
@@ -34,13 +34,13 @@ export declare const lookupAgentReceiptEffect: (input: AgentInput, context: RpcC
34
34
  readonly previousEpoch?: string;
35
35
  } | {
36
36
  readonly status: "found";
37
- readonly receipt: import("@relkit/agents").ContinuationReceipt;
37
+ readonly receipt: import("@relkit/contracts").ContinuationReceipt;
38
38
  } | {
39
39
  readonly status: "found";
40
- readonly receipt: import("@relkit/agents").ControlReceipt;
40
+ readonly receipt: import("@relkit/contracts").ControlReceipt;
41
41
  } | {
42
42
  readonly status: "found";
43
- readonly receipt: import("@relkit/agents").AcceptRunReceipt | import("@relkit/agents").CompletionReceipt;
43
+ readonly receipt: import("@relkit/contracts").AcceptRunReceipt | import("@relkit/contracts").CompletionReceipt;
44
44
  }, HttpBoundaryError, never>;
45
45
  /** Reads a bounded immutable snapshot page using its snapshot identifier and cursor.
46
46
  * @param input - Submitted operation input; validation and authorization occur before effects are admitted.
@@ -48,7 +48,7 @@ export declare const lookupAgentReceiptEffect: (input: AgentInput, context: RpcC
48
48
  * @param options - Application dependencies and configuration for this domain.
49
49
  * @returns The requested immutable snapshot page within the history byte limit.
50
50
  */
51
- export declare const readAgentHistoryEffect: (input: AgentInput, context: RpcContext, options: RouteMaterializationOptions) => Effect.Effect<import("@relkit/agents").SnapshotHistoryPage, HttpBoundaryError, never>;
51
+ export declare const readAgentHistoryEffect: (input: AgentInput, context: RpcContext, options: RouteMaterializationOptions) => Effect.Effect<import("@relkit/contracts").SnapshotHistoryPage, HttpBoundaryError, never>;
52
52
  declare const AgentReads_base: Context.ServiceClass<AgentReads, "@relkit/runtime-hono/AgentReads", {
53
53
  readonly listAgentThreads: typeof listAgentThreadsEffect;
54
54
  readonly loadAgent: typeof loadAgentEffect;
@@ -1 +1 @@
1
- {"version":3,"file":"agent-reads.d.ts","sourceRoot":"","sources":["../src/agent-reads.ts"],"names":[],"mappings":"AACA,OAAO,E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;;;;GAKG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;4BAiEnC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,4KA+BjC,CAAC;;+BAM4B,OAAO,sBAAsB;wBACpC,OAAO,eAAe;iCACb,OAAO,wBAAwB;+BACjC,OAAO,sBAAsB;;AAP5D,8DAA8D;AAC9D,qBAAa,UAAW,SAAQ,eAQM;CAAG;AAEzC,4DAA4D;AAC5D,eAAO,MAAM,cAAc,uCAQzB,CAAC"}
@@ -8,7 +8,7 @@ export { AgentReads, AgentReadsLive } from "./agent-reads.js";
8
8
  * @param options - Application dependencies and configuration for this domain.
9
9
  * @returns Up to 100 authorized thread summaries.
10
10
  */
11
- export declare function listAgentThreads(input: AgentInput, context: RpcContext, options: RouteMaterializationOptions): Promise<import("@relkit/agents").ThreadList>;
11
+ export declare function listAgentThreads(input: AgentInput, context: RpcContext, options: RouteMaterializationOptions): Promise<import("@relkit/contracts").ThreadList>;
12
12
  /** Executes loadAgent at the native Promise boundary.
13
13
  * @param input - Submitted operation input; validation and authorization occur before effects are admitted.
14
14
  * @param context - Trusted Hono or oRPC request context containing request state and authentication.
@@ -34,13 +34,13 @@ export declare function lookupAgentReceipt(input: AgentInput, context: RpcContex
34
34
  readonly previousEpoch?: string;
35
35
  } | {
36
36
  readonly status: "found";
37
- readonly receipt: import("@relkit/agents").ContinuationReceipt;
37
+ readonly receipt: import("@relkit/contracts").ContinuationReceipt;
38
38
  } | {
39
39
  readonly status: "found";
40
- readonly receipt: import("@relkit/agents").ControlReceipt;
40
+ readonly receipt: import("@relkit/contracts").ControlReceipt;
41
41
  } | {
42
42
  readonly status: "found";
43
- readonly receipt: import("@relkit/agents").AcceptRunReceipt | import("@relkit/agents").CompletionReceipt;
43
+ readonly receipt: import("@relkit/contracts").AcceptRunReceipt | import("@relkit/contracts").CompletionReceipt;
44
44
  }>;
45
45
  /** Executes readAgentHistory at the native Promise boundary.
46
46
  * @param input - Submitted operation input; validation and authorization occur before effects are admitted.
@@ -48,5 +48,5 @@ export declare function lookupAgentReceipt(input: AgentInput, context: RpcContex
48
48
  * @param options - Application dependencies and configuration for this domain.
49
49
  * @returns The requested immutable snapshot page within the history byte limit.
50
50
  */
51
- export declare function readAgentHistory(input: AgentInput, context: RpcContext, options: RouteMaterializationOptions): Promise<import("@relkit/agents").SnapshotHistoryPage>;
51
+ export declare function readAgentHistory(input: AgentInput, context: RpcContext, options: RouteMaterializationOptions): Promise<import("@relkit/contracts").SnapshotHistoryPage>;
52
52
  //# sourceMappingURL=agent-rpc-read.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-rpc-read.d.ts","sourceRoot":"","sources":["../src/agent-rpc-read.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGzD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC9D;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,2BAA2B,gDAQrC;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,2BAA2B,uDAQrC;AAED,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,2BAA2B;;;;;;;;;;;;;;;;;;GAQrC;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,2BAA2B,yDAQrC"}
1
+ {"version":3,"file":"agent-rpc-read.d.ts","sourceRoot":"","sources":["../src/agent-rpc-read.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGzD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC9D;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,2BAA2B,mDAQrC;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,2BAA2B,uDAQrC;AAED,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,2BAA2B;;;;;;;;;;;;;;;;;;GAQrC;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,2BAA2B,4DAQrC"}
@@ -29,7 +29,7 @@ export declare const lookupAgentContinuation: (input: AgentInput, threadId: stri
29
29
  };
30
30
  };
31
31
  node: import("@relkit/graph").AgentRegistration;
32
- provider: import("@relkit/agents").AgentStateProvider;
32
+ provider: import("@relkit/contracts").AgentStateProvider;
33
33
  scope: import("@relkit/contracts").AgentRequestScope;
34
34
  trusted: unknown;
35
35
  }, options: RouteMaterializationOptions, requestDigest: string) => Effect.Effect<{
@@ -61,7 +61,7 @@ export declare const admitAgentContinuation: (input: AgentInput, threadId: strin
61
61
  };
62
62
  };
63
63
  node: import("@relkit/graph").AgentRegistration;
64
- provider: import("@relkit/agents").AgentStateProvider;
64
+ provider: import("@relkit/contracts").AgentStateProvider;
65
65
  scope: import("@relkit/contracts").AgentRequestScope;
66
66
  trusted: unknown;
67
67
  }, options: RouteMaterializationOptions, requestDigest: string, waiting: import("@relkit/contracts").AgentWaitingState) => Effect.Effect<{
@@ -1 +1 @@
1
- {"version":3,"file":"agent-rpc-resume-admission.d.ts","sourceRoot":"","sources":["../src/agent-rpc-resume-admission.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAA2B,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAgB,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAU,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGjE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAG3E;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB;;;;;;0BAmEc,CAAC;2BAEnD,CAAA;;;;;;;;;;;;;4BAhDE,CAAC;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB;;;;;;0BAiCe,CAAC;2BAEnD,CAAA;;;;;;;;;;;;;4BAAE,CAAC;AAEH;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAE9D"}
1
+ {"version":3,"file":"agent-rpc-resume-admission.d.ts","sourceRoot":"","sources":["../src/agent-rpc-resume-admission.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAA2B,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAgB,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAU,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGjE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAG3E;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB;;;;;;0BAmEW,CAAC;2BACjC,CAAC;;;;;;;;;;;;;4BA/Cd,CAAC;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB;;;;;;0BAiCY,CAAC;2BACjC,CAAC;;;;;;;;;;;;;4BACd,CAAC;AAEH;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAE9D"}
@@ -48,7 +48,7 @@ export const admitAgentContinuation = Effect.fn("AgentContinuations.admit")(func
48
48
  if (input.waitingRevision !== waiting.revision)
49
49
  return yield* resumeError("Agent waiting revision is stale.");
50
50
  const reply = yield* httpBoundary("agent.resume.validate", async () => {
51
- const validators = await import("@relkit/agents/continuation-validation");
51
+ const validators = await import("@relkit/langchain/continuation-validation");
52
52
  return validators.isGraphDescriptor(resolved.descriptor)
53
53
  ? validators.validateGraphResumeInput(resolved.descriptor, waiting.requests, input.payload)
54
54
  : validators.validateNativeAgentResumeInput(waiting.requests, input.payload);
@@ -1 +1 @@
1
- {"version":3,"file":"agent-rpc-resume-admission.js","sourceRoot":"","sources":["../src/agent-rpc-resume-admission.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,uBAAuB,EAAoB,MAAM,mBAAmB,CAAC;AAE9E,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAmB,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAIvD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAA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CAAC,CAAC;AAC7F,CAAC;AAED;;;;GAIG;AACH,SAAS,aAAa,CACpB,YAEC;IAED,OAAO;QACL,WAAW,EAAE,YAAY,CAAC,WAAW;QACrC,QAAQ,EAAE,YAAY,CAAC,QAAQ;QAC/B,KAAK,EAAE,YAAY,CAAC,KAAK;QACzB,MAAM,EAAE,UAAmB;QAC3B,SAAS,EAAE,YAAY,CAAC,SAAS;KAClC,CAAC;AACJ,CAAC"}
@@ -25,6 +25,6 @@ export declare const AgentContinuationsLive: Layer.Layer<AgentContinuations, nev
25
25
  * @param options - Owning generation dependencies.
26
26
  * @returns Accepted durable receipt, including duplicate status, or original public failure.
27
27
  */
28
- export declare function acceptAgentResume(input: AgentInput, threadId: string, operationId: OperationId, resolved: ResolvedAgent, options: RouteMaterializationOptions): Promise<import("@relkit/agents").AcceptRunReceipt>;
28
+ export declare function acceptAgentResume(input: AgentInput, threadId: string, operationId: OperationId, resolved: ResolvedAgent, options: RouteMaterializationOptions): Promise<import("@relkit/contracts").AcceptRunReceipt>;
29
29
  export {};
30
30
  //# sourceMappingURL=agent-rpc-resume.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-rpc-resume.d.ts","sourceRoot":"","sources":["../src/agent-rpc-resume.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAA2B,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAIhD,OAAO,EAA8B,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAMrF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,KAAK,EAAE,2BAA2B,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;;;;AAoD9F,iGAAiG;AACjG,qBAAa,kBAAmB,SAAQ,uBAWtC;CAAG;AAEL,iGAAiG;AACjG,eAAO,MAAM,sBAAsB,+CAA4D,CAAC;AAEhG;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,2BAA2B,sDAOrC"}
1
+ {"version":3,"file":"agent-rpc-resume.d.ts","sourceRoot":"","sources":["../src/agent-rpc-resume.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAA2B,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAIhD,OAAO,EAA8B,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAMrF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,KAAK,EAAE,2BAA2B,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;;;;AAoD9F,iGAAiG;AACjG,qBAAa,kBAAmB,SAAQ,uBAWtC;CAAG;AAEL,iGAAiG;AACjG,eAAO,MAAM,sBAAsB,+CAA4D,CAAC;AAEhG;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,2BAA2B,yDAOrC"}
@@ -25,7 +25,7 @@ declare const agentContextEffect: (input: AgentInput, context: RpcContext, optio
25
25
  };
26
26
  };
27
27
  node: import("@relkit/graph").AgentRegistration;
28
- provider: import("@relkit/agents").AgentStateProvider;
28
+ provider: import("@relkit/contracts").AgentStateProvider;
29
29
  scope: AgentRequestScope;
30
30
  trusted: unknown;
31
31
  }, HttpBoundaryError, never>;
@@ -47,7 +47,7 @@ export declare function agentContext(input: AgentInput, context: RpcContext, opt
47
47
  };
48
48
  };
49
49
  node: import("@relkit/graph").AgentRegistration;
50
- provider: import("@relkit/agents").AgentStateProvider;
50
+ provider: import("@relkit/contracts").AgentStateProvider;
51
51
  scope: AgentRequestScope;
52
52
  trusted: unknown;
53
53
  }>;
@@ -32,7 +32,7 @@ declare const execute: (resolved: {
32
32
  };
33
33
  };
34
34
  node: import("@relkit/graph").AgentRegistration;
35
- provider: import("@relkit/agents").AgentStateProvider;
35
+ provider: import("@relkit/contracts").AgentStateProvider;
36
36
  scope: import("@relkit/contracts").AgentRequestScope;
37
37
  trusted: unknown;
38
38
  }, receipt: AcceptRunReceipt, input: unknown, options: RouteMaterializationOptions, resume: boolean, controlRunIds: readonly string[]) => Effect.Effect<void, import("./http-effect.js").HttpBoundaryError, never>;
@@ -10,14 +10,14 @@ import { acceptAgentControlEffect } from "./agent-control-admission.js";
10
10
  * @param options - Application dependencies and configuration for this domain.
11
11
  * @returns The durable admission receipt after generation-owned execution has been started.
12
12
  */
13
- export declare function acceptAgentRun(input: AgentInput, context: RpcContext, options: RouteMaterializationOptions): Promise<import("@relkit/agents").AcceptRunReceipt>;
13
+ export declare function acceptAgentRun(input: AgentInput, context: RpcContext, options: RouteMaterializationOptions): Promise<import("@relkit/contracts").AcceptRunReceipt>;
14
14
  /** Executes acceptAgentControl at the native Promise boundary.
15
15
  * @param input - Submitted operation input; validation and authorization occur before effects are admitted.
16
16
  * @param context - Trusted Hono or oRPC request context containing request state and authentication.
17
17
  * @param options - Application dependencies and configuration for this domain.
18
18
  * @returns The accepted control receipt for the current writable run.
19
19
  */
20
- export declare function acceptAgentControl(input: AgentInput, context: RpcContext, options: RouteMaterializationOptions): Promise<import("@relkit/agents").ControlReceipt>;
20
+ export declare function acceptAgentControl(input: AgentInput, context: RpcContext, options: RouteMaterializationOptions): Promise<import("@relkit/contracts").ControlReceipt>;
21
21
  declare const AgentCommands_base: Context.ServiceClass<AgentCommands, "@relkit/runtime-hono/AgentCommands", {
22
22
  readonly acceptAgentRun: typeof acceptAgentRunEffect;
23
23
  readonly acceptAgentControl: typeof acceptAgentControlEffect;
@@ -1 +1 @@
1
- {"version":3,"file":"agent-rpc-write.d.ts","sourceRoot":"","sources":["../src/agent-rpc-write.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,KAAK,EAAE,MAAM,QAAQ,CAAC;AAGhD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,2BAA2B,sDAQrC;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,2BAA2B,oDAQrC;;6BAM4B,OAAO,oBAAoB;iCACvB,OAAO,wBAAwB;;AALhE,8DAA8D;AAC9D,qBAAa,aAAc,SAAQ,kBAMM;CAAG;AAE5C,4DAA4D;AAC5D,eAAO,MAAM,iBAAiB,0CAI5B,CAAC"}
1
+ {"version":3,"file":"agent-rpc-write.d.ts","sourceRoot":"","sources":["../src/agent-rpc-write.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,KAAK,EAAE,MAAM,QAAQ,CAAC;AAGhD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,2BAA2B,yDAQrC;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,2BAA2B,uDAQrC;;6BAM4B,OAAO,oBAAoB;iCACvB,OAAO,wBAAwB;;AALhE,8DAA8D;AAC9D,qBAAa,aAAc,SAAQ,kBAMM;CAAG;AAE5C,4DAA4D;AAC5D,eAAO,MAAM,iBAAiB,0CAI5B,CAAC"}
@@ -9,5 +9,5 @@ import { type AgentInput } from "./agent-rpc-support.js";
9
9
  * @param options - Application dependencies and configuration for this domain.
10
10
  * @returns The durable admission receipt after generation-owned execution has been started.
11
11
  */
12
- export declare const acceptAgentRunEffect: (input: AgentInput, context: RpcContext, options: RouteMaterializationOptions) => Effect.Effect<import("@relkit/agents").AcceptRunReceipt, HttpBoundaryError, never>;
12
+ export declare const acceptAgentRunEffect: (input: AgentInput, context: RpcContext, options: RouteMaterializationOptions) => Effect.Effect<import("@relkit/contracts").AcceptRunReceipt, HttpBoundaryError, never>;
13
13
  //# sourceMappingURL=agent-run-admission.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-run-admission.d.ts","sourceRoot":"","sources":["../src/agent-run-admission.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAgB,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAOnE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAKL,KAAK,UAAU,EAGhB,MAAM,wBAAwB,CAAC;AAKhC;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,sKAuE/B,CAAC"}
1
+ {"version":3,"file":"agent-run-admission.d.ts","sourceRoot":"","sources":["../src/agent-run-admission.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAgB,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAOnE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAKL,KAAK,UAAU,EAGhB,MAAM,wBAAwB,CAAC;AAKhC;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,yKAuE/B,CAAC"}
@@ -7,7 +7,7 @@ export declare const API_REFERENCE_PATH: "/_relkit/v1/api-reference";
7
7
  export declare class ApiDocsConfigurationError extends TypeError {
8
8
  constructor(message: string);
9
9
  }
10
- /** Installs the active OpenAPI document and the sole bundled Scalar reference UI.
10
+ /** Installs the active OpenAPI document and an explicitly supplied optional reference UI.
11
11
  * @param app - Hono application receiving the configured endpoints or middleware.
12
12
  * @param plan - Validated application registration plan.
13
13
  * @param options - Application dependencies and configuration for this domain.
@@ -1 +1 @@
1
- {"version":3,"file":"api-docs.d.ts","sourceRoot":"","sources":["../src/api-docs.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,KAAK,EAAW,IAAI,EAAQ,MAAM,MAAM,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAK1D,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,eAAO,MAAM,YAAY,4BAA2C,CAAC;AACrE,eAAO,MAAM,kBAAkB,6BAA4C,CAAC;AAE5E,qBAAa,yBAA0B,SAAQ,SAAS;gBAC1C,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,IAAI,EACT,IAAI,EAAE,gBAAgB,EACtB,OAAO,GAAE,cAAmB,GAC3B,IAAI,CAeN"}
1
+ {"version":3,"file":"api-docs.d.ts","sourceRoot":"","sources":["../src/api-docs.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,KAAK,EAAW,IAAI,EAAQ,MAAM,MAAM,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAuB,MAAM,qBAAqB,CAAC;AAK/E,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,eAAO,MAAM,YAAY,4BAA2C,CAAC;AACrE,eAAO,MAAM,kBAAkB,6BAA4C,CAAC;AAE5E,qBAAa,yBAA0B,SAAQ,SAAS;gBAC1C,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,IAAI,EACT,IAAI,EAAE,gBAAgB,EACtB,OAAO,GAAE,cAAmB,GAC3B,IAAI,CAyBN"}
package/dist/api-docs.js CHANGED
@@ -1,11 +1,10 @@
1
1
  /**
2
- * Installs protected JSON and Scalar routes for the shared application reference.
2
+ * Installs protected JSON and explicitly selected reference routes independently.
3
3
  * Configuration is validated before registration; authorization precedes lazy
4
4
  * document generation through ApiDocuments, executed at each HTTP request edge.
5
5
  */
6
6
  import { API_BASE_PATH, API_VERSION, assertJsonValue, canonicalJson, } from "@relkit/contracts";
7
7
  import { Effect, Layer } from "effect";
8
- import { Scalar } from "@scalar/hono-api-reference";
9
8
  import { ApiDocuments, documentFrom } from "./api-docs-document.js";
10
9
  import { runHttp } from "./http-effect.js";
11
10
  import { isAuthorized, jsonResponse } from "./internal-endpoints-utils.js";
@@ -17,7 +16,7 @@ export class ApiDocsConfigurationError extends TypeError {
17
16
  this.name = "ApiDocsConfigurationError";
18
17
  }
19
18
  }
20
- /** Installs the active OpenAPI document and the sole bundled Scalar reference UI.
19
+ /** Installs the active OpenAPI document and an explicitly supplied optional reference UI.
21
20
  * @param app - Hono application receiving the configured endpoints or middleware.
22
21
  * @param plan - Validated application registration plan.
23
22
  * @param options - Application dependencies and configuration for this domain.
@@ -29,13 +28,15 @@ export function installApiDocs(app, plan, options = {}) {
29
28
  validate(mode, enabled, options);
30
29
  if (!enabled)
31
30
  return;
31
+ if (options.ui === "scalar" && options.reference === undefined)
32
+ throw new ApiDocsConfigurationError("Scalar UI requires createPreparedApp or @relkit/runtime-hono/scalar.");
32
33
  const baseDocument = options.document ?? documentFrom(plan);
33
34
  assertJsonValue(baseDocument);
34
35
  const documents = Layer.effect(ApiDocuments, ApiDocuments.make(baseDocument, options));
35
36
  const document = (signal) => runHttp(ApiDocuments.use((service) => service.get()).pipe(Effect.provide(documents)), signal);
36
37
  const auth = authorization(options);
37
38
  const embed = mode === "production" || auth.bearerToken !== undefined || auth.authorize !== undefined;
38
- registerDocumentRoutes(app, document, auth, embed);
39
+ registerDocumentRoutes(app, document, auth, embed, options.ui === false ? undefined : options.reference);
39
40
  }
40
41
  /**
41
42
  * Registers both representations behind the same authorization barrier.
@@ -43,9 +44,10 @@ export function installApiDocs(app, plan, options = {}) {
43
44
  * @param document - Lazy JSON reader executed only for an authorized request.
44
45
  * @param auth - Existing internal endpoint authorization policy.
45
46
  * @param embed - Whether Scalar must embed JSON to avoid a second protected fetch.
46
- * @returns Nothing; installs two request handlers.
47
+ * @param reference - Explicitly supplied optional UI factory.
48
+ * @returns Nothing; installs JSON and, when supplied, the optional UI handler.
47
49
  */
48
- function registerDocumentRoutes(app, document, auth, embed) {
50
+ function registerDocumentRoutes(app, document, auth, embed, reference) {
49
51
  /** Require the configured inspector authorization before serving API documentation.
50
52
  * @param handler - Document or reference-UI handler to run after authorization.
51
53
  * @returns A handler yielding the protected response or a bearer-authentication challenge.
@@ -61,14 +63,16 @@ function registerDocumentRoutes(app, document, auth, embed) {
61
63
  app.get(OPENAPI_PATH, protect(async (context) => new Response(canonicalJson(await document(context.req.raw.signal)), {
62
64
  headers: responseHeaders("application/json"),
63
65
  })));
66
+ if (reference === undefined)
67
+ return;
64
68
  app.get(API_REFERENCE_PATH, protect(async (context, next) => {
65
- const reference = Scalar({
69
+ const render = reference({
66
70
  ...(embed
67
71
  ? { content: canonicalJson(await document(context.req.raw.signal)) }
68
72
  : { url: "./openapi.json" }),
69
73
  pageTitle: "RELKIT API Reference",
70
74
  });
71
- const response = await reference(context, next);
75
+ const response = await render(context, next);
72
76
  if (!(response instanceof Response))
73
77
  return response;
74
78
  return new Response(response.body, {
@@ -1 +1 @@
1
- {"version":3,"file":"api-docs.js","sourceRoot":"","sources":["../src/api-docs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,aAAa,EACb,WAAW,EACX,eAAe,EACf,aAAa,GAEd,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAGpD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAI3E,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,aAAa,eAAwB,CAAC;AACrE,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,aAAa,gBAAyB,CAAC;AAE5E,MAAM,OAAO,yBAA0B,SAAQ,SAAS;IACtD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;IAC1C,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAC5B,GAAS,EACT,IAAsB,EACtB,UAA0B,EAAE;IAE5B,MAAM,I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C3B,cAAc,EAAE,WAAW;QAC3B,sBAAsB,EAAE,MAAM,CAAC,WAAW,CAAC;KAC5C,CAAC;AACJ,CAAC"}
@@ -1,8 +1,18 @@
1
+ /**
2
+ * Keeps OpenAPI exposure and optional UI configuration independent of Scalar's
3
+ * declarations. A selected renderer is supplied by the explicit scalar entrypoint
4
+ * or acquired by prepared application startup before readiness.
5
+ */
1
6
  import type { JsonValue } from "@relkit/contracts";
2
7
  import type { OpenApiDocument } from "@relkit/openapi";
8
+ import type { MiddlewareHandler } from "hono";
3
9
  import type { InternalEndpointMode, InternalEndpointOptions } from "./internal-endpoints.js";
4
10
  /** api docs options configuring dependencies, callbacks and runtime policy. */
5
11
  export interface ApiDocsOptions {
12
+ /** Optional UI selection; JSON OpenAPI remains independently available. */
13
+ readonly ui?: "scalar" | false;
14
+ /** Already loaded optional renderer, isolated from the core declaration graph. */
15
+ readonly reference?: ApiReferenceFactory;
6
16
  readonly mode?: InternalEndpointMode;
7
17
  readonly enabled?: boolean;
8
18
  readonly enabledInProduction?: boolean;
@@ -13,4 +23,12 @@ export interface ApiDocsOptions {
13
23
  /** Native authentication schema, acquired only for authorized documentation requests. */
14
24
  readonly getAuthDocument?: () => Promise<JsonValue>;
15
25
  }
26
+ /** Native reference input built only after the existing authorization barrier. */
27
+ export interface ApiReferenceConfiguration {
28
+ readonly content?: string;
29
+ readonly url?: string;
30
+ readonly pageTitle: string;
31
+ }
32
+ /** Factory for an explicitly loaded Hono documentation UI handler. */
33
+ export type ApiReferenceFactory = (configuration: ApiReferenceConfiguration) => MiddlewareHandler;
16
34
  //# sourceMappingURL=api-docs.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-docs.types.d.ts","sourceRoot":"","sources":["../src/api-docs.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK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,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IACvC,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,uBAAuB,CAAC,WAAW,CAAC,CAAC;IAC1D,QAAQ,CAAC,QAAQ,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;IAChD,yFAAyF;IACzF,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,OAAO,CAAC,SAAS,CAAC,CAAC;CACrD;AAED,kFAAkF;AAClF,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,sEAAsE;AACtE,MAAM,MAAM,mBAAmB,GAAG,CAAC,aAAa,EAAE,yBAAyB,KAAK,iBAAiB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { Hono } from "hono";
2
+ import type { InternalEndpointOptions } from "./internal-endpoints.types.js";
3
+ /** Installs core probes before optional inspection routes are considered.
4
+ * @param app - Shell whose security and common middleware are already installed.
5
+ * @param options - Existing probe authorization, cohort witness and readiness owner.
6
+ * @returns Nothing; core handlers remain present when rich inspection is disabled.
7
+ */
8
+ export declare function installCoreEndpoints(app: Hono, options: InternalEndpointOptions): void;
9
+ //# sourceMappingURL=core-endpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core-endpoints.d.ts","sourceRoot":"","sources":["../src/core-endpoints.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAW,IAAI,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAG7E;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,uBAAuB,GAAG,IAAI,CA+BtF"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Keeps liveness, readiness and the development activation witness independent
3
+ * of rich inspection. Existing authorization still protects configured probes;
4
+ * production graph proof requires an explicit authorization authority.
5
+ */
6
+ import { API_BASE_PATH } from "@relkit/contracts";
7
+ import { isAuthorized, jsonResponse, resolveValue } from "./internal-endpoints-utils.js";
8
+ /** Installs core probes before optional inspection routes are considered.
9
+ * @param app - Shell whose security and common middleware are already installed.
10
+ * @param options - Existing probe authorization, cohort witness and readiness owner.
11
+ * @returns Nothing; core handlers remain present when rich inspection is disabled.
12
+ */
13
+ export function installCoreEndpoints(app, options) {
14
+ const guard = (handler) => async (context) => {
15
+ if (!(await isAuthorized(context.req.raw, options)))
16
+ return jsonResponse({ error: "internal-endpoint-protected" }, 401, {
17
+ "www-authenticate": "Bearer",
18
+ });
19
+ return handler();
20
+ };
21
+ app.get(`${API_BASE_PATH}/health/live`, guard(async () => jsonResponse({ status: "ok" })));
22
+ app.get(`${API_BASE_PATH}/health/ready`, guard(async () => {
23
+ const ready = await resolveValue(options.readiness ?? options.ready ?? { ready: true });
24
+ return jsonResponse(ready.ready
25
+ ? { status: "ready" }
26
+ : { status: "not-ready", reason: ready.reason ?? "unavailable" }, ready.ready ? 200 : 503);
27
+ }));
28
+ const mode = options.environment ?? options.mode ?? "development";
29
+ if (mode === "production" && options.bearerToken === undefined && options.authorize === undefined)
30
+ return;
31
+ app.get(`${API_BASE_PATH}/graph`, guard(async () => jsonResponse(await resolveValue(options.graph ?? { graph: null }))));
32
+ }
33
+ //# sourceMappingURL=core-endpoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core-endpoints.js","sourceRoot":"","sources":["../src/core-endpoints.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EAAE,YAAY,EAAE,YAAY,EA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,YAAY,IAAI,OAAO,CAAC,WAAW,KAAK,SAAS,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS;QAC/F,OAAO;IACT,GAAG,CAAC,GAAG,CACL,GAAG,aAAa,QAAQ,EACxB,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,YAAY,CAAC,MAAM,YAAY,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CACtF,CAAC;AACJ,CAAC"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Constructs the canonical eager HTTP application. Shared REST setup lives in
3
- * create-rest-app; this public factory adds the agent and RPC/MCP transports in
4
- * their existing order and preserves synchronous configuration rejection.
3
+ * create-rest-app; RPC stays core and optional protocols require an explicitly
4
+ * loaded installer. Prepared construction supplies selected installers at startup.
5
5
  */
6
6
  import type { Hono } from "hono";
7
7
  import type { CreateAppOptions } from "./create-app.types.js";
@@ -1 +1 @@
1
- {"version":3,"file":"create-app.d.ts","sourceRoot":"","sources":["../src/create-app.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAGjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAO9D,YAAY,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAElE;;;GAGG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAOzD"}
1
+ {"version":3,"file":"create-app.d.ts","sourceRoot":"","sources":["../src/create-app.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAEjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAO9D,YAAY,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAElE;;;GAGG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAYzD"}
@@ -1,5 +1,4 @@
1
1
  import { installAgentInspectorEndpoints } from "./agent-inspector.js";
2
- import { installAgentProtocolEndpoints } from "./agent-protocol.js";
3
2
  import { createApplicationShell, installApplicationDocuments, routeOptions, } from "./create-rest-app.js";
4
3
  import { materializeRoutes } from "./materialize-routes.js";
5
4
  export { installFrameworkMiddleware } from "./create-rest-app.js";
@@ -9,10 +8,32 @@ export { installFrameworkMiddleware } from "./create-rest-app.js";
9
8
  */
10
9
  export function createApp(options) {
11
10
  const app = createApplicationShell(options);
12
- installAgentInspectorEndpoints(app, options, options.internalEndpoints ?? {});
11
+ const internal = options.internalEndpoints ?? {};
12
+ const mode = internal.environment ?? internal.mode ?? "development";
13
+ installAgentInspectorEndpoints(app, options, {
14
+ ...internal,
15
+ enabled: mode !== "production" && internal.enabled !== false,
16
+ });
13
17
  installApplicationDocuments(app, options);
14
- installAgentProtocolEndpoints(app, options);
18
+ installSelectedProtocols(app, options);
15
19
  materializeRoutes(app, routeOptions(options));
16
20
  return app;
17
21
  }
22
+ /** Registers explicitly selected optional protocols before declared REST routes.
23
+ * @param app - Validated shell whose common policy is already installed.
24
+ * @param options - Capability selection and borrowed native installers.
25
+ * @returns Nothing; missing selected installers reject synchronous construction.
26
+ */
27
+ function installSelectedProtocols(app, options) {
28
+ if (options.agUi === true) {
29
+ if (options.optionalTransports?.agUi === undefined)
30
+ throw new TypeError("AG-UI requires createPreparedApp or an explicit @relkit/runtime-hono/ag-ui installer.");
31
+ options.optionalTransports.agUi(app, options);
32
+ }
33
+ if (options.mcp?.enabled === true) {
34
+ if (options.optionalTransports?.mcp === undefined)
35
+ throw new TypeError("MCP requires createPreparedApp or an explicit @relkit/runtime-hono/mcp installer.");
36
+ options.optionalTransports.mcp(app, options);
37
+ }
38
+ }
18
39
  //# sourceMappingURL=create-app.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-app.js","sourceRoot":"","sources":["../src/create-app.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AAEpE,OAAO,EACL,sBAAsB,EACtB,2BAA2B,EAC3B,YAAY,GACb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAElE;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,OAAyB;IACjD,MAAM,GAAG,GAAG,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAC5C,8BAA8B,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;IAC9E,2BAA2B,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAC1C,6BAA6B,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAC5C,iBAAiB,CAAC,GAAG,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9C,OAAO,GAAG,CAAC;AACb,CAAC"}
1
+ {"version":3,"file":"create-app.js","sourceRoot":"","sources":["../src/create-app.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AAEtE,OAAO,EACL,sBAAsB,EACtB,2BAA2B,EAC3B,YAAY,GACb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAElE;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,OAAyB;IACjD,MAAM,GAAG,GAAG,sBAAsB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