@arnilo/prism-server 0.2.7 → 0.2.8

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.
@@ -1,12 +1,13 @@
1
- import { PrismServerError } from "../types.js";
1
+ /** core (0.2.5 plan 025 Task 1 split). Moved verbatim from handler.ts; public surface unchanged behind the barrel. */
2
2
  import { cancelWorkflowRun, createWorkflowEventBus, enqueueWorkflow, getWorkflowRun, replayWorkflow, resumeWorkflow, runWorkflow, } from "@arnilo/prism-workflows";
3
3
  import { isAdmitOperation } from "../drain.js";
4
4
  import { resolvePrismServerLimits } from "../limits.js";
5
- import { addHeaders, errorResponse, json } from "./respond.js";
6
- import { assertRequestPolicy, awaitWithSignal, ownedSignal } from "./policy.js";
5
+ import { PrismServerError } from "../types.js";
7
6
  import { authorize, createSession, sameOwnership } from "./authorize.js";
8
- import { normalizeBasePath, parseRoute } from "./routing.js";
7
+ import { assertRequestPolicy, awaitWithSignal, ownedSignal } from "./policy.js";
9
8
  import { readAgentInput, readAgentResume, readJsonObject, readOptionalId, readOptionalObject, readPositiveInteger, readRequiredId, readRequiredString, readResume, readScheduleStatus, replayCursor, } from "./readers.js";
9
+ import { addHeaders, errorResponse, json } from "./respond.js";
10
+ import { normalizeBasePath, parseRoute } from "./routing.js";
10
11
  import { sse, sseAgentEvents } from "./sse.js";
11
12
  export function createPrismHandler(options) {
12
13
  const limits = resolvePrismServerLimits(options.limits);
@@ -1,5 +1,5 @@
1
- import type { CreatePrismHandlerOptions } from "../types.js";
2
1
  import type { ResolvedPrismServerLimits } from "../limits.js";
2
+ import type { CreatePrismHandlerOptions } from "../types.js";
3
3
  export declare function json(value: unknown, status: number, limits: ResolvedPrismServerLimits, options: CreatePrismHandlerOptions): Response;
4
4
  export declare function errorResponse(error: unknown, limits: ResolvedPrismServerLimits, options: CreatePrismHandlerOptions): Response;
5
5
  export declare function addHeaders(response: Response, extra?: Readonly<Record<string, string>>): Response;
@@ -1,8 +1,8 @@
1
1
  /** sse (0.2.5 plan 025 Task 1 split). Moved verbatim from handler.ts; public surface unchanged behind the barrel. */
2
2
  import type { AgentEvent, AgentEventEnvelope } from "@arnilo/prism";
3
- import type { CreatePrismHandlerOptions } from "../types.js";
4
- import type { ResolvedPrismServerLimits } from "../limits.js";
5
3
  import type { WorkflowEvent } from "@arnilo/prism-workflows";
4
+ import type { ResolvedPrismServerLimits } from "../limits.js";
5
+ import type { CreatePrismHandlerOptions } from "../types.js";
6
6
  import { ownedSignal } from "./policy.js";
7
7
  export declare function sseAgentEvents(source: AsyncIterable<AgentEventEnvelope>, owned: ReturnType<typeof ownedSignal>, limits: ResolvedPrismServerLimits, options: CreatePrismHandlerOptions, release: () => void): Response;
8
8
  export declare function sse(source: AsyncIterable<AgentEvent | WorkflowEvent>, owned: ReturnType<typeof ownedSignal>, limits: ResolvedPrismServerLimits, options: CreatePrismHandlerOptions, release: () => void): Response;
package/dist/handler.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  /** handler.ts barrel (0.2.5 plan 025 Task 1 god-module split): re-exports the
2
2
  * public surface from cohesive family modules (0.1.4 barrel precedent). */
3
+ export * from "./handler/authorize.js";
3
4
  export * from "./handler/consts.js";
4
5
  export * from "./handler/core.js";
5
- export * from "./handler/routing.js";
6
- export * from "./handler/authorize.js";
7
- export * from "./handler/readers.js";
8
6
  export * from "./handler/policy.js";
9
- export * from "./handler/sse.js";
7
+ export * from "./handler/readers.js";
10
8
  export * from "./handler/respond.js";
9
+ export * from "./handler/routing.js";
10
+ export * from "./handler/sse.js";
package/dist/handler.js CHANGED
@@ -1,11 +1,11 @@
1
1
  /** handler.ts barrel (0.2.5 plan 025 Task 1 god-module split): re-exports the
2
2
  * public surface from cohesive family modules (0.1.4 barrel precedent). */
3
+ export * from "./handler/authorize.js";
3
4
  export * from "./handler/consts.js";
4
5
  export * from "./handler/core.js";
5
- export * from "./handler/routing.js";
6
- export * from "./handler/authorize.js";
7
- export * from "./handler/readers.js";
8
6
  export * from "./handler/policy.js";
9
- export * from "./handler/sse.js";
7
+ export * from "./handler/readers.js";
10
8
  export * from "./handler/respond.js";
9
+ export * from "./handler/routing.js";
10
+ export * from "./handler/sse.js";
11
11
  //# sourceMappingURL=handler.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arnilo/prism-server",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "Optional framework-free Web Request-to-Response handler for explicitly selected Prism agents and workflows.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -29,8 +29,8 @@
29
29
  "pack:dry-run": "npm pack --dry-run"
30
30
  },
31
31
  "peerDependencies": {
32
- "@arnilo/prism": "0.2.7",
33
- "@arnilo/prism-workflows": "0.2.7"
32
+ "@arnilo/prism": "0.2.8",
33
+ "@arnilo/prism-workflows": "0.2.8"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@arnilo/prism": "file:../..",