@relkit/runtime-hono 0.7.2 → 0.7.6

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 (77) hide show
  1. package/dist/agent-observation-pages.d.ts +15 -0
  2. package/dist/agent-observation-pages.d.ts.map +1 -0
  3. package/dist/agent-observation-pages.js +69 -0
  4. package/dist/agent-observation-pages.js.map +1 -0
  5. package/dist/agent-observation.d.ts +18 -21
  6. package/dist/agent-observation.d.ts.map +1 -1
  7. package/dist/agent-observation.js +39 -73
  8. package/dist/agent-observation.js.map +1 -1
  9. package/dist/agent-observation.schemas.d.ts +16 -0
  10. package/dist/agent-observation.schemas.d.ts.map +1 -0
  11. package/dist/agent-observation.schemas.js +18 -0
  12. package/dist/agent-observation.schemas.js.map +1 -0
  13. package/dist/agent-observation.types.d.ts +25 -1
  14. package/dist/agent-observation.types.d.ts.map +1 -1
  15. package/dist/agent-rpc-resume-admission.d.ts +80 -0
  16. package/dist/agent-rpc-resume-admission.d.ts.map +1 -0
  17. package/dist/agent-rpc-resume-admission.js +95 -0
  18. package/dist/agent-rpc-resume-admission.js.map +1 -0
  19. package/dist/agent-rpc-resume.d.ts +22 -52
  20. package/dist/agent-rpc-resume.d.ts.map +1 -1
  21. package/dist/agent-rpc-resume.js +38 -86
  22. package/dist/agent-rpc-resume.js.map +1 -1
  23. package/dist/agent-rpc-resume.types.d.ts +17 -1
  24. package/dist/agent-rpc-resume.types.d.ts.map +1 -1
  25. package/dist/api-docs-auth.d.ts +16 -0
  26. package/dist/api-docs-auth.d.ts.map +1 -0
  27. package/dist/api-docs-auth.js +92 -0
  28. package/dist/api-docs-auth.js.map +1 -0
  29. package/dist/api-docs-document.d.ts +37 -0
  30. package/dist/api-docs-document.d.ts.map +1 -0
  31. package/dist/api-docs-document.js +109 -0
  32. package/dist/api-docs-document.js.map +1 -0
  33. package/dist/api-docs.d.ts.map +1 -1
  34. package/dist/api-docs.js +31 -70
  35. package/dist/api-docs.js.map +1 -1
  36. package/dist/api-docs.types.d.ts +2 -0
  37. package/dist/api-docs.types.d.ts.map +1 -1
  38. package/dist/auth.d.ts.map +1 -1
  39. package/dist/auth.js +5 -0
  40. package/dist/auth.js.map +1 -1
  41. package/dist/auth.types.d.ts +3 -0
  42. package/dist/auth.types.d.ts.map +1 -1
  43. package/dist/create-app.d.ts +8 -8
  44. package/dist/create-app.d.ts.map +1 -1
  45. package/dist/create-app.js +6 -91
  46. package/dist/create-app.js.map +1 -1
  47. package/dist/create-rest-app.d.ts +36 -0
  48. package/dist/create-rest-app.d.ts.map +1 -0
  49. package/dist/create-rest-app.js +133 -0
  50. package/dist/create-rest-app.js.map +1 -0
  51. package/dist/materialize-rest-routes.d.ts +9 -0
  52. package/dist/materialize-rest-routes.d.ts.map +1 -0
  53. package/dist/materialize-rest-routes.js +62 -0
  54. package/dist/materialize-rest-routes.js.map +1 -0
  55. package/dist/materialize-routes-utils.d.ts +1 -1
  56. package/dist/materialize-routes-utils.d.ts.map +1 -1
  57. package/dist/materialize-routes-utils.js +10 -3
  58. package/dist/materialize-routes-utils.js.map +1 -1
  59. package/dist/materialize-routes.d.ts +5 -0
  60. package/dist/materialize-routes.d.ts.map +1 -1
  61. package/dist/materialize-routes.js +2 -49
  62. package/dist/materialize-routes.js.map +1 -1
  63. package/dist/materialize-routes.types.d.ts +3 -0
  64. package/dist/materialize-routes.types.d.ts.map +1 -1
  65. package/dist/prepared-app.d.ts +17 -0
  66. package/dist/prepared-app.d.ts.map +1 -0
  67. package/dist/prepared-app.js +56 -0
  68. package/dist/prepared-app.js.map +1 -0
  69. package/dist/prepared-transports.service.d.ts +30 -0
  70. package/dist/prepared-transports.service.d.ts.map +1 -0
  71. package/dist/prepared-transports.service.js +45 -0
  72. package/dist/prepared-transports.service.js.map +1 -0
  73. package/dist/prepared-transports.types.d.ts +33 -0
  74. package/dist/prepared-transports.types.d.ts.map +1 -0
  75. package/dist/prepared-transports.types.js +2 -0
  76. package/dist/prepared-transports.types.js.map +1 -0
  77. package/package.json +19 -15
@@ -1,60 +1,30 @@
1
- import type { ResolvedAgent } from "./agent-rpc-resume.types.js";
1
+ /**
2
+ * Owns request-level continuation admission through a replaceable Effect service.
3
+ * Authorization remains supplied by the request; durable lookup, validation and
4
+ * generation-owned execution use the narrow admission helpers without agent runtime imports.
5
+ */
2
6
  import { type OperationId } from "@relkit/contracts";
3
- import type { RouteMaterializationOptions } from "./materialize-routes.js";
4
- import { type AgentInput } from "./agent-rpc-support.js";
5
7
  import { Context, Effect, Layer } from "effect";
6
- import { HttpBoundaryError } from "./http-effect.js";
7
- /** Admits a resume only after revision validation and joining the interrupted run.
8
- * @param input - Public resume payload and observed revision.
9
- * @param threadId - Authorized durable thread identifier.
10
- * @param operationId - Idempotency identifier for continuation admission.
11
- * @param resolved - Authorized descriptor, provider and scope.
12
- * @param options - Generation and runtime dependencies.
13
- * @returns The accepted continuation receipt, including whether admission was a duplicate.
14
- */
15
- declare const resume: (input: AgentInput, threadId: string, operationId: OperationId, resolved: {
16
- descriptor: {
17
- readonly input: import("@relkit/schema").StandardSchemaV1;
18
- readonly output: import("@relkit/schema").StandardSchemaV1;
19
- readonly client?: unknown;
20
- readonly chat?: {
21
- readonly input?: unknown;
22
- readonly output?: unknown;
23
- };
24
- };
25
- node: import("@relkit/graph").AgentRegistration;
26
- provider: import("@relkit/agents").AgentStateProvider;
27
- scope: import("@relkit/contracts").AgentRequestScope;
28
- trusted: unknown;
29
- }, options: RouteMaterializationOptions) => Effect.Effect<{
30
- operationId: OperationId;
31
- threadId: string;
32
- runId: string;
33
- status: "accepted";
34
- duplicate: boolean;
35
- }, HttpBoundaryError, never>;
36
- declare const AgentContinuations_base: Context.ServiceClass<AgentContinuations, "@relkit/runtime-hono/AgentContinuations", {
37
- readonly resume: typeof resume;
38
- }>;
39
- /** Admits resumptions only after the prior run and its durable waiting revision settle. */
8
+ import { type AgentInput } from "./agent-rpc-support.js";
9
+ import type { RouteMaterializationOptions } from "./materialize-routes.js";
10
+ import type { AgentContinuationOperations, ResolvedAgent } from "./agent-rpc-resume.types.js";
11
+ declare const AgentContinuations_base: Context.ServiceClass<AgentContinuations, "@relkit/runtime-hono/AgentContinuations", AgentContinuationOperations> & {
12
+ readonly make: Effect.Effect<AgentContinuationOperations, never, never>;
13
+ };
14
+ /** Continuation admission authority captures no per-request authorization during acquisition. */
40
15
  export declare class AgentContinuations extends AgentContinuations_base {
41
16
  }
42
- /** Live continuation admission preserves receipt idempotency and revision fencing. */
17
+ /** Builds the concrete continuation service; tests replace the same contract through a Layer. */
43
18
  export declare const AgentContinuationsLive: Layer.Layer<AgentContinuations, never, never>;
44
- /** Executes durable resume admission at the native oRPC boundary.
45
- * @param input - Submitted operation input; validation and authorization occur before effects are admitted.
46
- * @param threadId - Stable thread identifier within the authorized agent scope.
47
- * @param operationId - Idempotency identifier for durable admission or lookup.
48
- * @param resolved - Authorized agent descriptor, provider and durable request scope.
49
- * @param options - Application dependencies and configuration for this domain.
50
- * @returns The accepted continuation receipt, including whether admission was a duplicate.
19
+ /**
20
+ * Runs durable continuation admission at the native oRPC edge.
21
+ * @param input - Submitted operation input; caller already owns request authorization.
22
+ * @param threadId - Authorized durable thread identity.
23
+ * @param operationId - Stable admission/duplicate lookup identity.
24
+ * @param resolved - Fresh descriptor/provider authority.
25
+ * @param options - Owning generation dependencies.
26
+ * @returns Accepted durable receipt, including duplicate status, or original public failure.
51
27
  */
52
- export declare function acceptAgentResume(input: AgentInput, threadId: string, operationId: OperationId, resolved: ResolvedAgent, options: RouteMaterializationOptions): Promise<{
53
- operationId: OperationId;
54
- threadId: string;
55
- runId: string;
56
- status: "accepted";
57
- duplicate: boolean;
58
- }>;
28
+ export declare function acceptAgentResume(input: AgentInput, threadId: string, operationId: OperationId, resolved: ResolvedAgent, options: RouteMaterializationOptions): Promise<import("@relkit/agents").AcceptRunReceipt>;
59
29
  export {};
60
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":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAMjE,OAAO,EAA2B,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAU,KAAK,UAAU,EAA8B,MAAM,wBAAwB,CAAC;AAI7F,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAgB,iBAAiB,EAAwB,MAAM,kBAAkB,CAAC;AAEzF;;;;;;;GAOG;AACH,QAAA,MAAM,MAAM;;;;;;0BA0EG,CAAC;2BAA0B,CAAC;;;;;;;;;;;;;4BATzC,CAAC;;qBAKkB,OAAO,MAAM;;AAHlC,2FAA2F;AAC3F,qBAAa,kBAAmB,SAAQ,uBAGM;CAAG;AAEjD,sFAAsF;AACtF,eAAO,MAAM,sBAAsB,+CAEjC,CAAC;AAEH;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,2BAA2B;;;;;;GAOrC"}
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,24 +1,27 @@
1
- import { httpValidation } from "./http-validation.js";
2
- import { isGraphDescriptor, validateGraphResumeInput, validateNativeAgentResumeInput, } from "@relkit/agents";
1
+ /**
2
+ * Owns request-level continuation admission through a replaceable Effect service.
3
+ * Authorization remains supplied by the request; durable lookup, validation and
4
+ * generation-owned execution use the narrow admission helpers without agent runtime imports.
5
+ */
3
6
  import { REALTIME_RUNTIME_LIMITS } from "@relkit/contracts";
4
- import { digest, verifiedAgentRequestDigest } from "./agent-rpc-support.js";
5
- import { startAgentRun } from "./agent-rpc-worker.js";
6
- import { waitForAgentRun } from "./agent-run-tasks.js";
7
- import { assertAgentRunWritable } from "./agent-compatibility.js";
8
7
  import { Context, Effect, Layer } from "effect";
9
- import { httpBoundary, HttpBoundaryError, observeHttp, runHttp } from "./http-effect.js";
10
- /** Admits a resume only after revision validation and joining the interrupted run.
11
- * @param input - Public resume payload and observed revision.
12
- * @param threadId - Authorized durable thread identifier.
13
- * @param operationId - Idempotency identifier for continuation admission.
14
- * @param resolved - Authorized descriptor, provider and scope.
8
+ import { httpValidation } from "./http-validation.js";
9
+ import { httpBoundary, observeHttp, runHttp } from "./http-effect.js";
10
+ import { assertAgentRunWritable } from "./agent-compatibility.js";
11
+ import { verifiedAgentRequestDigest } from "./agent-rpc-support.js";
12
+ import { admitAgentContinuation, lookupAgentContinuation, resumeError, } from "./agent-rpc-resume-admission.js";
13
+ /**
14
+ * Admits a resume after provider snapshot validation and interrupted-run joining.
15
+ * @param input - Submitted payload and observed revision.
16
+ * @param threadId - Authorized durable thread identity.
17
+ * @param operationId - Stable continuation idempotency identity.
18
+ * @param resolved - Fresh request descriptor/provider authority.
15
19
  * @param options - Generation and runtime dependencies.
16
- * @returns The accepted continuation receipt, including whether admission was a duplicate.
20
+ * @returns Lazy accepted receipt or typed public transport failure.
17
21
  */
18
22
  const resume = Effect.fn("AgentContinuations.resume")(function* (input, threadId, operationId, resolved, options) {
19
- if (typeof input.waitingRevision !== "string" || input.waitingRevision.length === 0) {
20
- return yield* Effect.fail(resumeError("Agent resume requires the observed waiting revision."));
21
- }
23
+ if (typeof input.waitingRevision !== "string" || input.waitingRevision.length === 0)
24
+ return yield* resumeError("Agent resume requires the observed waiting revision.");
22
25
  const requestDigest = yield* httpValidation("agent.validate", () => verifiedAgentRequestDigest(input));
23
26
  const snapshot = yield* httpBoundary("agent.resume.snapshot", () => resolved.provider.loadThread({
24
27
  ...resolved.scope,
@@ -27,80 +30,29 @@ const resume = Effect.fn("AgentContinuations.resume")(function* (input, threadId
27
30
  }));
28
31
  const waiting = snapshot.waiting;
29
32
  yield* httpValidation("agent.validate", () => assertAgentRunWritable(snapshot, waiting?.runId));
30
- if (waiting === undefined) {
31
- const prior = yield* httpBoundary("agent.resume.receipt", () => resolved.provider.lookupContinuationReceipt({
32
- ...resolved.scope,
33
- operationId,
34
- threadId,
35
- semanticDigest: requestDigest,
36
- now: new Date().toISOString(),
37
- }));
38
- if (prior.status === "found") {
39
- const accepted = asAcceptedRun({ ...prior.receipt, duplicate: true });
40
- startAgentRun(resolved, accepted, input.payload, options, true);
41
- return accepted;
42
- }
43
- return yield* Effect.fail(resumeError("Agent has no waiting continuation."));
44
- }
45
- if (input.waitingRevision !== waiting.revision) {
46
- return yield* Effect.fail(resumeError("Agent waiting revision is stale."));
47
- }
48
- const reply = yield* httpBoundary("agent.resume.validate", async () => isGraphDescriptor(resolved.descriptor)
49
- ? validateGraphResumeInput(resolved.descriptor, waiting.requests, input.payload)
50
- : validateNativeAgentResumeInput(waiting.requests, input.payload)).pipe(Effect.mapError(() => resumeError("Agent resume input validation failed.")));
51
- yield* httpBoundary("agent.resume.join", () => waitForAgentRun(waiting.runId));
52
- const continuation = yield* httpBoundary("agent.resume.admit", () => resolved.provider.admitContinuation({
53
- ...resolved.scope,
54
- kind: "resume",
55
- operationId,
56
- semanticDigest: requestDigest,
57
- threadId,
58
- interruptedRunId: waiting.runId,
59
- interruptSetDigest: digest(waiting),
60
- waitingRevision: waiting.revision,
61
- admittedAt: new Date().toISOString(),
62
- receiptExpiresAt: new Date(Date.now() + REALTIME_RUNTIME_LIMITS.agentReceiptMs).toISOString(),
63
- }));
64
- const accepted = asAcceptedRun(continuation);
65
- startAgentRun(resolved, accepted, reply, options, true);
66
- return accepted;
33
+ if (waiting === undefined)
34
+ return yield* lookupAgentContinuation(input, threadId, operationId, resolved, options, requestDigest);
35
+ return yield* admitAgentContinuation(input, threadId, operationId, resolved, options, requestDigest, waiting);
67
36
  });
68
- /** Admits resumptions only after the prior run and its durable waiting revision settle. */
69
- export class AgentContinuations extends Context.Service()("@relkit/runtime-hono/AgentContinuations") {
37
+ /** Continuation admission authority captures no per-request authorization during acquisition. */
38
+ export class AgentContinuations extends Context.Service()("@relkit/runtime-hono/AgentContinuations", {
39
+ make: Effect.sync(() => ({
40
+ resume: (...args) => observeHttp("agent.resume", resume(...args)),
41
+ })),
42
+ }) {
70
43
  }
71
- /** Live continuation admission preserves receipt idempotency and revision fencing. */
72
- export const AgentContinuationsLive = Layer.succeed(AgentContinuations, {
73
- resume: (...args) => observeHttp("agent.resume", resume(...args)),
74
- });
75
- /** Executes durable resume admission at the native oRPC boundary.
76
- * @param input - Submitted operation input; validation and authorization occur before effects are admitted.
77
- * @param threadId - Stable thread identifier within the authorized agent scope.
78
- * @param operationId - Idempotency identifier for durable admission or lookup.
79
- * @param resolved - Authorized agent descriptor, provider and durable request scope.
80
- * @param options - Application dependencies and configuration for this domain.
81
- * @returns The accepted continuation receipt, including whether admission was a duplicate.
44
+ /** Builds the concrete continuation service; tests replace the same contract through a Layer. */
45
+ export const AgentContinuationsLive = Layer.effect(AgentContinuations, AgentContinuations.make);
46
+ /**
47
+ * Runs durable continuation admission at the native oRPC edge.
48
+ * @param input - Submitted operation input; caller already owns request authorization.
49
+ * @param threadId - Authorized durable thread identity.
50
+ * @param operationId - Stable admission/duplicate lookup identity.
51
+ * @param resolved - Fresh descriptor/provider authority.
52
+ * @param options - Owning generation dependencies.
53
+ * @returns Accepted durable receipt, including duplicate status, or original public failure.
82
54
  */
83
55
  export function acceptAgentResume(input, threadId, operationId, resolved, options) {
84
56
  return runHttp(Effect.flatMap(AgentContinuations, (service) => service.resume(input, threadId, operationId, resolved, options)).pipe(Effect.provide(AgentContinuationsLive)));
85
57
  }
86
- /** Retains the original validation exception at the public Promise boundary.
87
- * @param message - Public message included in the resulting value or failure.
88
- * @returns A typed boundary failure retaining the original public TypeError.
89
- */
90
- function resumeError(message) {
91
- return new HttpBoundaryError({ operation: "agent.resume", cause: new TypeError(message) });
92
- }
93
- /** Projects a continuation receipt into the existing accepted-run response.
94
- * @param continuation - Durable continuation receipt projected into accepted-run form.
95
- * @returns An accepted run response retaining operation, thread, run and duplicate fields.
96
- */
97
- function asAcceptedRun(continuation) {
98
- return {
99
- operationId: continuation.operationId,
100
- threadId: continuation.threadId,
101
- runId: continuation.runId,
102
- status: "accepted",
103
- duplicate: continuation.duplicate,
104
- };
105
- }
106
58
  //# sourceMappingURL=agent-rpc-resume.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-rpc-resume.js","sourceRoot":"","sources":["../src/agent-rpc-resume.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,8BAA8B,GAC/B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAoB,MAA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,EACR,WAAW,EACX,QAAQ,EACR,OAAO,EACP,aAAa,CACd,CAAC;IACJ,OAAO,KAAK,CAAC,CAAC,sBAAsB,CAClC,KAAK,EACL,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,OAAO,EACP,aAAa,EACb,OAAO,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,iGAAiG;AACjG,MAAM,OAAO,kBAAmB,SAAQ,OAAO,CAAC,OAAO,EAGpD,CAAC,yCAAyC,EAAE;IAC7C,IAAI,EAAE,MAAM,CAAC,IAAI,CACf,GAAG,EAAE,CACH,CAAC;QACC,MAAM,EAAE,CAAC,GAAG,IAA+B,EAAE,EAAE,CAC7C,WAAW,CAAC,cAAc,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;KAC/C,CAAuC,CAC3C;CACF,CAAC;CAAG;AAEL,iGAAiG;AACjG,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,CAAC,MAAM,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAEhG;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAC/B,KAAiB,EACjB,QAAgB,EAChB,WAAwB,EACxB,QAAuB,EACvB,OAAoC;IAEpC,OAAO,OAAO,CACZ,MAAM,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC,OAAO,EAAE,EAAE,CAC7C,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,CAAC,CAChE,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAC/C,CAAC;AACJ,CAAC"}
@@ -1,4 +1,20 @@
1
- import type { agentContext } from "./agent-rpc-support.js";
1
+ /**
2
+ * Defines request-owned continuation admission contracts. Provider and descriptor
3
+ * authority come from authorization; service methods return durable accepted
4
+ * receipts and preserve typed transport failures without retaining request scope.
5
+ */
6
+ import type { Effect } from "effect";
7
+ import type { OperationId } from "@relkit/contracts";
8
+ import type { AcceptRunReceipt } from "@relkit/agents";
9
+ import type { HttpBoundaryError } from "./http-effect.js";
10
+ import type { RouteMaterializationOptions } from "./materialize-routes.js";
11
+ import type { AgentInput, agentContext } from "./agent-rpc-support.js";
2
12
  /** Authorized agent descriptor, provider and immutable durable request scope. */
3
13
  export type ResolvedAgent = Awaited<ReturnType<typeof agentContext>>;
14
+ /** Waiting revision is accepted only from the authorized provider snapshot. */
15
+ export type WaitingAgentContinuation = NonNullable<Awaited<ReturnType<ResolvedAgent["provider"]["loadThread"]>>["waiting"]>;
16
+ /** Replaceable continuation service; each call supplies fresh request authority. */
17
+ export interface AgentContinuationOperations {
18
+ readonly resume: (input: AgentInput, threadId: string, operationId: OperationId, resolved: ResolvedAgent, options: RouteMaterializationOptions) => Effect.Effect<AcceptRunReceipt, HttpBoundaryError>;
19
+ }
4
20
  //# sourceMappingURL=agent-rpc-resume.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-rpc-resume.types.d.ts","sourceRoot":"","sources":["../src/agent-rpc-resume.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,iFAAiF;AACjF,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"agent-rpc-resume.types.d.ts","sourceRoot":"","sources":["../src/agent-rpc-resume.types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEvE,iFAAiF;AACjF,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC;AAErE,+EAA+E;AAC/E,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAChD,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CACxE,CAAC;AAEF,oFAAoF;AACpF,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,MAAM,EAAE,CACf,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,2BAA2B,KACjC,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;CACzD"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Combines application and mounted auth metadata for the shared API document.
3
+ * Application servers/security remain authoritative; conflicting paths or
4
+ * component names throw before publishing a misleading document.
5
+ */
6
+ import { type JsonValue } from "@relkit/contracts";
7
+ import type { OpenApiDocument } from "@relkit/openapi";
8
+ /**
9
+ * Merges mounted native auth routes without changing application servers or security.
10
+ * @param document - Application document whose policy and description are preserved.
11
+ * @param auth - Mounted auth paths and namespaced components.
12
+ * @returns A detached document with authentication instructions and deduplicated tags.
13
+ * @throws TypeError When JSON metadata is invalid or path/component names collide.
14
+ */
15
+ export declare function mergeAuthDocument(document: OpenApiDocument | JsonValue, auth: JsonValue): JsonValue;
16
+ //# sourceMappingURL=api-docs-auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-docs-auth.d.ts","sourceRoot":"","sources":["../src/api-docs-auth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,eAAe,GAAG,SAAS,EACrC,IAAI,EAAE,SAAS,GACd,SAAS,CAiCX"}
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Combines application and mounted auth metadata for the shared API document.
3
+ * Application servers/security remain authoritative; conflicting paths or
4
+ * component names throw before publishing a misleading document.
5
+ */
6
+ import { assertJsonValue } from "@relkit/contracts";
7
+ /**
8
+ * Merges mounted native auth routes without changing application servers or security.
9
+ * @param document - Application document whose policy and description are preserved.
10
+ * @param auth - Mounted auth paths and namespaced components.
11
+ * @returns A detached document with authentication instructions and deduplicated tags.
12
+ * @throws TypeError When JSON metadata is invalid or path/component names collide.
13
+ */
14
+ export function mergeAuthDocument(document, auth) {
15
+ assertJsonValue(document);
16
+ if (!isRecord(document) || !isRecord(auth) || !isRecord(auth.paths))
17
+ throw new TypeError("Cannot merge an invalid authentication OpenAPI document");
18
+ const paths = isRecord(document.paths) ? document.paths : {};
19
+ for (const path of Object.keys(auth.paths)) {
20
+ if (Object.hasOwn(paths, path))
21
+ throw new TypeError(`Duplicate authentication OpenAPI path: ${path}`);
22
+ }
23
+ const info = isRecord(document.info) ? document.info : {};
24
+ const tags = [
25
+ ...(Array.isArray(document.tags) ? document.tags : []),
26
+ ...(Array.isArray(auth.tags) ? auth.tags : []),
27
+ ];
28
+ return {
29
+ ...document,
30
+ info: {
31
+ ...info,
32
+ description: [
33
+ typeof info.description === "string" ? info.description : "",
34
+ authInstructions(auth.paths),
35
+ ]
36
+ .filter(Boolean)
37
+ .join("\n\n"),
38
+ },
39
+ paths: { ...paths, ...auth.paths },
40
+ components: mergeComponents(document.components, auth.components),
41
+ tags: tags.filter((tag, index) => !isRecord(tag) ||
42
+ tags.findIndex((entry) => isRecord(entry) && entry.name === tag.name) === index),
43
+ };
44
+ }
45
+ /**
46
+ * Preserves application components while rejecting ambiguous native names.
47
+ * @param application - Optional application component categories.
48
+ * @param auth - Optional namespaced native component categories.
49
+ * @returns Categories merged without overwriting application schemas.
50
+ */
51
+ function mergeComponents(application, auth) {
52
+ const components = isRecord(application) ? application : {};
53
+ const authComponents = isRecord(auth) ? auth : {};
54
+ const merged = { ...components };
55
+ for (const [category, entries] of Object.entries(authComponents)) {
56
+ const existing = isRecord(components[category]) ? components[category] : {};
57
+ if (!isRecord(entries))
58
+ continue;
59
+ for (const name of Object.keys(entries)) {
60
+ if (Object.hasOwn(existing, name))
61
+ throw new TypeError(`Duplicate authentication component: ${name}`);
62
+ }
63
+ merged[category] = { ...existing, ...entries };
64
+ }
65
+ return merged;
66
+ }
67
+ /**
68
+ * Describes only the login/signup endpoints present in the native document.
69
+ * @param paths - Already mounted authentication endpoint paths.
70
+ * @returns Markdown instructions for same-origin browser-session requests.
71
+ */
72
+ function authInstructions(paths) {
73
+ const signIn = Object.keys(paths).find((path) => path.endsWith("/sign-in/email"));
74
+ const signUp = Object.keys(paths).find((path) => path.endsWith("/sign-up/email"));
75
+ return [
76
+ "### Authentication",
77
+ signUp === undefined
78
+ ? ""
79
+ : `For a new account, send **POST ${signUp}** with name, email and password.`,
80
+ signIn === undefined
81
+ ? "Use the Authentication endpoints to sign in."
82
+ : `Send **POST ${signIn}** with email and password to log in.`,
83
+ "Use **Test Request** in this reference. The browser stores the session cookie and sends it with subsequent requests to protected endpoints. Keep this reference and requests on the same origin; no token copying is needed.",
84
+ ]
85
+ .filter(Boolean)
86
+ .join("\n\n");
87
+ }
88
+ /** Recognizes validated JSON objects before component/path projection. */
89
+ function isRecord(value) {
90
+ return value !== null && typeof value === "object" && !Array.isArray(value);
91
+ }
92
+ //# sourceMappingURL=api-docs-auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-docs-auth.js","sourceRoot":"","sources":["../src/api-docs-auth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,eA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1,37 @@
1
+ /**
2
+ * Owns lazy document generation for JSON and embedded Scalar responses. Shared
3
+ * application metadata is captured at construction; native auth metadata is
4
+ * requested per authorized call. Foreign failures remain HttpBoundaryError and
5
+ * the HTTP transport owns execution/cancellation and its configured logger.
6
+ */
7
+ import { type JsonValue } from "@relkit/contracts";
8
+ import type { RegistrationPlan } from "@relkit/graph";
9
+ import { Context, Effect } from "effect";
10
+ import type { ApiDocsOptions } from "./api-docs.types.js";
11
+ import { HttpBoundaryError } from "./http-effect.js";
12
+ declare const ApiDocuments_base: Context.ServiceClass<ApiDocuments, "relkit/http/ApiDocuments", {
13
+ /**
14
+ * Resolves one application document without capturing request identity.
15
+ * @returns Lazy JSON metadata, or HttpBoundaryError on native generation/merge failure.
16
+ */
17
+ readonly get: () => Effect.Effect<JsonValue, HttpBoundaryError>;
18
+ }> & {
19
+ readonly make: (base: JsonValue, options: ApiDocsOptions) => Effect.Effect<{
20
+ /**
21
+ * Resolves one application document without capturing request identity.
22
+ * @returns Lazy JSON metadata, or HttpBoundaryError on native generation/merge failure.
23
+ */
24
+ readonly get: () => Effect.Effect<JsonValue, HttpBoundaryError>;
25
+ }, never, never>;
26
+ };
27
+ /** Shared documentation projection; no session/request identity is captured. */
28
+ export declare class ApiDocuments extends ApiDocuments_base {
29
+ }
30
+ /**
31
+ * Builds application metadata from callable targets and raw HTTP registrations.
32
+ * @param plan - Validated registration plan supplied by application construction.
33
+ * @returns A JSON-safe application document without acquiring native services.
34
+ */
35
+ export declare function documentFrom(plan: RegistrationPlan): JsonValue;
36
+ export {};
37
+ //# sourceMappingURL=api-docs-document.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-docs-document.d.ts","sourceRoot":"","sources":["../src/api-docs-document.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAgB,iBAAiB,EAAe,MAAM,kBAAkB,CAAC;;IAM5E;;;OAGG;kBACW,MAAM,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,iBAAiB,CAAC;;;QAJ/D;;;WAGG;sBACW,MAAM,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,iBAAiB,CAAC;;;AARnE,gFAAgF;AAChF,qBAAa,YAAa,SAAQ,iBAkChC;CAAG;AAEL;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,SAAS,CAyB9D"}
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Owns lazy document generation for JSON and embedded Scalar responses. Shared
3
+ * application metadata is captured at construction; native auth metadata is
4
+ * requested per authorized call. Foreign failures remain HttpBoundaryError and
5
+ * the HTTP transport owns execution/cancellation and its configured logger.
6
+ */
7
+ import { assertJsonValue } from "@relkit/contracts";
8
+ import { generateOpenApi } from "@relkit/openapi";
9
+ import { GRAPH_VERSION } from "@relkit/contracts";
10
+ import { Context, Effect } from "effect";
11
+ import { mergeAuthDocument } from "./api-docs-auth.js";
12
+ import { httpBoundary, HttpBoundaryError, observeHttp } from "./http-effect.js";
13
+ /** Shared documentation projection; no session/request identity is captured. */
14
+ export class ApiDocuments extends Context.Service()("relkit/http/ApiDocuments", {
15
+ /**
16
+ * Captures static metadata and native lookup policy without calling auth.
17
+ * @param base - Validated application JSON document.
18
+ * @param options - Exposure policy, native lookup and excluded service IDs.
19
+ * @returns Methods that retain HTTP execution context at each request.
20
+ */
21
+ make: (base, options) => Effect.succeed({
22
+ get: Effect.fn("ApiDocuments.get")(function* () {
23
+ let document = base;
24
+ const readAuth = options.getAuthDocument;
25
+ if (readAuth !== undefined) {
26
+ const auth = yield* httpBoundary("api.docs.auth", () => readAuth());
27
+ document = yield* Effect.try({
28
+ try: () => mergeAuthDocument(base, auth),
29
+ catch: (cause) => new HttpBoundaryError({ operation: "api.docs.merge", cause }),
30
+ });
31
+ }
32
+ return filterDomains(document, options.excludeDomains);
33
+ }, (effect) => observeHttp("api.docs.document", effect)),
34
+ }),
35
+ }) {
36
+ }
37
+ /**
38
+ * Builds application metadata from callable targets and raw HTTP registrations.
39
+ * @param plan - Validated registration plan supplied by application construction.
40
+ * @returns A JSON-safe application document without acquiring native services.
41
+ */
42
+ export function documentFrom(plan) {
43
+ const functions = new Set(plan.functions.map(({ id }) => id));
44
+ const document = generateOpenApi({
45
+ contractVersion: GRAPH_VERSION,
46
+ nodes: [
47
+ ...plan.functions,
48
+ ...plan.httpTriggers
49
+ .filter(({ config, targetFunctionId }) => (config !== null &&
50
+ typeof config === "object" &&
51
+ "rawHandler" in config &&
52
+ config.rawHandler === true) ||
53
+ functions.has(targetFunctionId))
54
+ .map((trigger) => {
55
+ assertJsonValue(trigger.config);
56
+ return { ...trigger, config: trigger.config };
57
+ }),
58
+ ...(plan.services ?? []),
59
+ ],
60
+ edges: [],
61
+ });
62
+ assertJsonValue(document);
63
+ return document;
64
+ }
65
+ /**
66
+ * Removes excluded service operations and their now-unused tags.
67
+ * @param document - Validated JSON document after optional auth merge.
68
+ * @param excluded - Service identities hidden from the shared reference.
69
+ * @returns Detached filtered metadata, or the original when filtering is unnecessary.
70
+ */
71
+ function filterDomains(document, excluded = []) {
72
+ if (excluded.length === 0 || !isRecord(document) || !isRecord(document.paths))
73
+ return document;
74
+ const domains = new Set(excluded);
75
+ const methods = new Set(["get", "put", "post", "delete", "options", "head", "patch", "trace"]);
76
+ const paths = Object.fromEntries(Object.entries(document.paths).flatMap(([path, item]) => {
77
+ if (!isRecord(item))
78
+ return [[path, item]];
79
+ const entries = Object.entries(item);
80
+ const kept = entries.filter(([method, operation]) => {
81
+ if (!methods.has(method) || !isRecord(operation))
82
+ return true;
83
+ const metadata = operation["x-relkit"];
84
+ return (!isRecord(metadata) ||
85
+ typeof metadata.serviceId !== "string" ||
86
+ !domains.has(metadata.serviceId));
87
+ });
88
+ if (kept.length < entries.length && !kept.some(([method]) => methods.has(method)))
89
+ return [];
90
+ return [[path, Object.fromEntries(kept)]];
91
+ }));
92
+ const usedTags = new Set(Object.values(paths).flatMap((item) => !isRecord(item)
93
+ ? []
94
+ : Object.entries(item).flatMap(([method, operation]) => methods.has(method) && isRecord(operation) && Array.isArray(operation.tags)
95
+ ? operation.tags
96
+ : [])));
97
+ return {
98
+ ...document,
99
+ paths,
100
+ ...(Array.isArray(document.tags)
101
+ ? { tags: document.tags.filter((tag) => isRecord(tag) && usedTags.has(tag.name)) }
102
+ : {}),
103
+ };
104
+ }
105
+ /** Recognizes a validated JSON object before path/tag projection. */
106
+ function isRecord(value) {
107
+ return value !== null && typeof value === "object" && !Array.isArray(value);
108
+ }
109
+ //# sourceMappingURL=api-docs-document.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-docs-document.js","sourceRoot":"","sources":["../src/api-docs-document.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAkB,MAAM,mBAAmB,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEhF,gFAAgF;AAChF,MAAM,OAAO,YAAa,SAAQ,OAAO,CAAC,OAAO,EAS9C,CAAC,0BAA0B,EAAE;IAC9B;;;;;OAKG;IACH,IAAI,EAAE,CAAC,IAAe,EAAE,OAAuB,EAAE,EAAE,CACjD,MAAM,CAAC,OAAO,CAAC;QACb,GAAG,E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DN"}
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"}