@plurnk/plurnk-contracts 9.0.0 → 10.0.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 (81) hide show
  1. package/.env.defaults +1 -19
  2. package/README.md +5 -6
  3. package/SPEC.md +93 -44
  4. package/dist/schema/DaemonNotificationEnvelope.json +77 -30
  5. package/dist/schema/FunctionalityCandidate.json +4 -0
  6. package/dist/schema/FunctionalityDiscoverQuery.json +12 -0
  7. package/dist/schema/FunctionalityDiscoverResult.json +10 -0
  8. package/dist/schema/FunctionalityListQuery.json +33 -0
  9. package/dist/schema/FunctionalityListResult.json +16 -1
  10. package/dist/schema/ModelCatalogPage.json +9 -0
  11. package/dist/schema/PlurnkStatement.json +18 -2
  12. package/dist/schema/ProviderAccounting.json +3 -3
  13. package/dist/schema/ProviderCost.json +1 -1
  14. package/dist/schema/ProviderRequestAccounting.json +3 -3
  15. package/dist/schema/ProviderUsage.json +1 -1
  16. package/dist/src/ActorIdentity.d.ts +26 -0
  17. package/dist/src/ActorIdentity.d.ts.map +1 -0
  18. package/dist/src/ActorIdentity.js +179 -0
  19. package/dist/src/ActorIdentity.js.map +1 -0
  20. package/dist/src/Application.d.ts +38 -126
  21. package/dist/src/Application.d.ts.map +1 -1
  22. package/dist/src/Application.js +47 -220
  23. package/dist/src/Application.js.map +1 -1
  24. package/dist/src/ApplicationNotifications.d.ts +19 -6
  25. package/dist/src/ApplicationNotifications.d.ts.map +1 -1
  26. package/dist/src/ApplicationNotifications.js +6 -3
  27. package/dist/src/ApplicationNotifications.js.map +1 -1
  28. package/dist/src/ApplicationPort.d.ts +27 -6
  29. package/dist/src/ApplicationPort.d.ts.map +1 -1
  30. package/dist/src/ApplicationPort.js +1 -1
  31. package/dist/src/ApplicationPort.js.map +1 -1
  32. package/dist/src/ApplicationStream.d.ts +2 -2
  33. package/dist/src/ApplicationStream.d.ts.map +1 -1
  34. package/dist/src/ApplicationStream.js.map +1 -1
  35. package/dist/src/CollectionCommand.d.ts +33 -0
  36. package/dist/src/CollectionCommand.d.ts.map +1 -0
  37. package/dist/src/CollectionCommand.js +277 -0
  38. package/dist/src/CollectionCommand.js.map +1 -0
  39. package/dist/src/Functionality.d.ts +7 -2
  40. package/dist/src/Functionality.d.ts.map +1 -1
  41. package/dist/src/Functionality.js.map +1 -1
  42. package/dist/src/HttpOrigin.d.ts +79 -10
  43. package/dist/src/HttpOrigin.d.ts.map +1 -1
  44. package/dist/src/HttpOrigin.js +286 -44
  45. package/dist/src/HttpOrigin.js.map +1 -1
  46. package/dist/src/HttpPort.d.ts +35 -0
  47. package/dist/src/HttpPort.d.ts.map +1 -0
  48. package/dist/src/HttpPort.js +106 -0
  49. package/dist/src/HttpPort.js.map +1 -0
  50. package/dist/src/InteractiveCommands.d.ts +96 -0
  51. package/dist/src/InteractiveCommands.d.ts.map +1 -0
  52. package/dist/src/InteractiveCommands.js +409 -0
  53. package/dist/src/InteractiveCommands.js.map +1 -0
  54. package/dist/src/McpWireTool.d.ts +27 -0
  55. package/dist/src/McpWireTool.d.ts.map +1 -0
  56. package/dist/src/McpWireTool.js +30 -0
  57. package/dist/src/McpWireTool.js.map +1 -0
  58. package/dist/src/OAuthClient.d.ts +64 -0
  59. package/dist/src/OAuthClient.d.ts.map +1 -0
  60. package/dist/src/OAuthClient.js +226 -0
  61. package/dist/src/OAuthClient.js.map +1 -0
  62. package/dist/src/ScheduleCommand.d.ts +60 -0
  63. package/dist/src/ScheduleCommand.d.ts.map +1 -0
  64. package/dist/src/ScheduleCommand.js +677 -0
  65. package/dist/src/ScheduleCommand.js.map +1 -0
  66. package/dist/src/SessionProjection.d.ts +91 -0
  67. package/dist/src/SessionProjection.d.ts.map +1 -0
  68. package/dist/src/SessionProjection.js +223 -0
  69. package/dist/src/SessionProjection.js.map +1 -0
  70. package/dist/src/Validator.d.ts +2 -1
  71. package/dist/src/Validator.d.ts.map +1 -1
  72. package/dist/src/Validator.js +19 -1
  73. package/dist/src/Validator.js.map +1 -1
  74. package/dist/src/index.d.ts +10 -3
  75. package/dist/src/index.d.ts.map +1 -1
  76. package/dist/src/index.js +7 -1
  77. package/dist/src/index.js.map +1 -1
  78. package/dist/src/types.generated.d.ts +85 -21
  79. package/dist/src/types.generated.d.ts.map +1 -1
  80. package/dist/src/types.generated.js.map +1 -1
  81. package/package.json +3 -2
@@ -1 +1 @@
1
- {"version":3,"file":"Validator.js","sourceRoot":"","sources":["../../src/Validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,WAAW,EAAgC,MAAM,uBAAuB,CAAC;AAC/F,OAAO,cAAc,MAAM,yBAAyB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC3E,OAAO,gBAAgB,MAAM,2BAA2B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC/E,OAAO,oBAAoB,MAAM,+BAA+B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACvF,OAAO,gBAAgB,MAAM,2BAA2B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC/E,OAAO,iBAAiB,MAAM,4BAA4B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACjF,OAAO,cAAc,MAAM,yBAAyB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC3E,OAAO,uBAAuB,MAAM,kCAAkC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC7F,OAAO,qBAAqB,MAAM,gCAAgC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACzF,OAAO,gCAAgC,MAAM,2CAA2C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAC/G,OAAO,YAAY,MAAM,uBAAuB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACvE,OAAO,oBAAoB,MAAM,+BAA+B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACvF,OAAO,uBAAuB,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AS,CAAC,OAAO,CAAoB,uBAAuB,EAAE,mBAAmB,EAAE,KAAK,CAAC,CAAC;IACrG,CAAC;IAED,MAAM,CAAC,oBAAoB,CAAC,KAAc;QACtC,MAAM,SAAS,GAAG,SAAS,CAAC,OAAO,CAAiB,oBAAoB,EAAE,gBAAgB,EAAE,KAAK,CAAC,CAAC;QACnG,IAAI,SAAS,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC;YACtD,MAAM,IAAI,SAAS,CAAC,yEAAyE,CAAC,CAAC;QACnG,CAAC;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,MAAM,CAAC,gBAAgB,CAAC,KAAc;QAClC,OAAO,SAAS,CAAC,OAAO,CAAa,gBAAgB,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;IAChF,CAAC;IAED,MAAM,CAAC,kBAAkB,CAAC,KAAc;QACpC,OAAO,SAAS,CAAC,OAAO,CAAe,kBAAkB,EAAE,wBAAwB,EAAE,KAAK,CAAC,CAAC;IAChG,CAAC;IAED,MAAM,CAAC,0BAA0B,CAAC,KAAc;QAC5C,OAAO,SAAS,CAAC,0BAA0B,CAAC,gCAAgC,EAAE,KAAK,CAAC,CAAC;IACzF,CAAC;IAED,MAAM,CAAC,wBAAwB,CAAC,KAAc;QAC1C,OAAO,SAAS,CAAC,OAAO,CACpB,gCAAgC,EAChC,4BAA4B,EAC5B,KAAK,CACR,CAAC;IACN,CAAC;CACJ","sourcesContent":["import { Validator as CfValidator, type OutputUnit, type Schema } from \"@cfworker/json-schema\";\nimport positionSchema from \"../schema/Position.json\" with { type: \"json\" };\nimport lineMarkerSchema from \"../schema/LineMarker.json\" with { type: \"json\" };\nimport textLineMarkerSchema from \"../schema/TextLineMarker.json\" with { type: \"json\" };\nimport parsedPathSchema from \"../schema/ParsedPath.json\" with { type: \"json\" };\nimport matcherBodySchema from \"../schema/MatcherBody.json\" with { type: \"json\" };\nimport sendBodySchema from \"../schema/SendBody.json\" with { type: \"json\" };\nimport resourceSelectionSchema from \"../schema/ResourceSelection.json\" with { type: \"json\" };\nimport plurnkStatementSchema from \"../schema/PlurnkStatement.json\" with { type: \"json\" };\nimport daemonNotificationEnvelopeSchema from \"../schema/DaemonNotificationEnvelope.json\" with { type: \"json\" };\nimport noticeSchema from \"../schema/Notice.json\" with { type: \"json\" };\nimport problemDetailsSchema from \"../schema/ProblemDetails.json\" with { type: \"json\" };\nimport problemProjectionSchema from \"../schema/ProblemProjection.json\" with { type: \"json\" };\nimport operationResultSchema from \"../schema/OperationResult.json\" with { type: \"json\" };\nimport entryReadResultSchema from \"../schema/EntryReadResult.json\" with { type: \"json\" };\nimport textRegionSchema from \"../schema/TextRegion.json\" with { type: \"json\" };\nimport rangeExtentSchema from \"../schema/RangeExtent.json\" with { type: \"json\" };\nimport proposalProjectionSchema from \"../schema/ProposalProjection.json\" with { type: \"json\" };\nimport proposalDispositionSchema from \"../schema/ProposalDisposition.json\" with { type: \"json\" };\nimport sessionOwnerSchema from \"../schema/SessionOwner.json\" with { type: \"json\" };\nimport type { SessionOwner, RollbackReport, AcpDiscovery, ClientDisplayCapabilities, ClientInteractionProjection, ClientInteractionRequest, ClientInteractionResolution, DaemonNotificationEnvelope, EntryReadResult, FunctionalityDiscoverResult, FunctionalityListResult, FunctionalityMutationResult, McpOAuth, McpServerDefinition, ModelCatalogPage, ModelCatalogQuery, ModelReadiness, ModelRoute, Notice, OperationResult, ProblemDetails, ProblemProjection, ProposalProjection, RangeExtent, Effort, SkillDefinition, TextRegion, JsonSchema, ParsedPath, PlurnkStatement } from \"./types.generated.ts\";\nimport clientDisplayCapabilitiesSchema from \"../schema/ClientDisplayCapabilities.json\" with { type: \"json\" };\nimport mcpServerDefinitionSchema from \"../schema/McpServerDefinition.json\" with { type: \"json\" };\nimport skillDefinitionSchema from \"../schema/SkillDefinition.json\" with { type: \"json\" };\nimport mcpOAuthSchema from \"../schema/McpOAuth.json\" with { type: \"json\" };\nimport clientInteractionRequestSchema from \"../schema/ClientInteractionRequest.json\" with { type: \"json\" };\nimport clientInteractionProjectionSchema from \"../schema/ClientInteractionProjection.json\" with { type: \"json\" };\nimport clientInteractionResolutionSchema from \"../schema/ClientInteractionResolution.json\" with { type: \"json\" };\nimport effortSchema from \"../schema/Effort.json\" with { type: \"json\" };\nimport modelCatalogPageSchema from \"../schema/ModelCatalogPage.json\" with { type: \"json\" };\nimport modelCatalogQuerySchema from \"../schema/ModelCatalogQuery.json\" with { type: \"json\" };\nimport functionalityCandidateSchema from \"../schema/FunctionalityCandidate.json\" with { type: \"json\" };\nimport functionalityProvenanceSchema from \"../schema/FunctionalityProvenance.json\" with { type: \"json\" };\nimport functionalityDiscoverQuerySchema from \"../schema/FunctionalityDiscoverQuery.json\" with { type: \"json\" };\nimport functionalityDiscoverResultSchema from \"../schema/FunctionalityDiscoverResult.json\" with { type: \"json\" };\nimport functionalityDefinitionStateSchema from \"../schema/FunctionalityDefinitionState.json\" with { type: \"json\" };\nimport functionalityListResultSchema from \"../schema/FunctionalityListResult.json\" with { type: \"json\" };\nimport functionalityMutationResultSchema from \"../schema/FunctionalityMutationResult.json\" with { type: \"json\" };\nimport rollbackReportSchema from \"../schema/RollbackReport.json\" with { type: \"json\" };\nimport mcpOAuthCompletionResultSchema from \"../schema/McpOAuthCompletionResult.json\" with { type: \"json\" };\nimport mcpOAuthBeginResultSchema from \"../schema/McpOAuthBeginResult.json\" with { type: \"json\" };\nimport functionalityPreparationActivitySchema from \"../schema/FunctionalityPreparationActivity.json\" with { type: \"json\" };\nimport modelReadinessSchema from \"../schema/ModelReadiness.json\" with { type: \"json\" };\nimport modelRouteSchema from \"../schema/ModelRoute.json\" with { type: \"json\" };\nimport acpDiscoverySchema from \"../schema/AcpDiscovery.json\" with { type: \"json\" };\nimport providerAccountingSchema from \"../schema/ProviderAccounting.json\" with { type: \"json\" };\nimport providerRequestAccountingSchema from \"../schema/ProviderRequestAccounting.json\" with { type: \"json\" };\nimport providerUsageSchema from \"../schema/ProviderUsage.json\" with { type: \"json\" };\nimport providerCostSchema from \"../schema/ProviderCost.json\" with { type: \"json\" };\n\nexport type ValidationResult = { valid: boolean; errors: OutputUnit[] };\n\nexport class InvalidProblemDetailsError extends TypeError {}\nexport class InvalidOperationResultError extends TypeError {}\n\nexport default class Validator {\n static #jsonSchemaValidators = new WeakMap<JsonSchema, CfValidator>();\n static #publicSchemas = [\n daemonNotificationEnvelopeSchema,\n plurnkStatementSchema,\n positionSchema,\n lineMarkerSchema,\n textLineMarkerSchema,\n parsedPathSchema,\n matcherBodySchema,\n sendBodySchema,\n resourceSelectionSchema,\n acpDiscoverySchema,\n clientDisplayCapabilitiesSchema,\n clientInteractionProjectionSchema,\n clientInteractionRequestSchema,\n clientInteractionResolutionSchema,\n entryReadResultSchema,\n functionalityCandidateSchema,\n functionalityProvenanceSchema,\n functionalityDefinitionStateSchema,\n functionalityDiscoverQuerySchema,\n functionalityDiscoverResultSchema,\n functionalityListResultSchema,\n functionalityMutationResultSchema,\n functionalityPreparationActivitySchema,\n rollbackReportSchema,\n mcpOAuthCompletionResultSchema,\n mcpOAuthBeginResultSchema,\n mcpOAuthSchema,\n mcpServerDefinitionSchema,\n skillDefinitionSchema,\n sessionOwnerSchema,\n modelCatalogPageSchema,\n modelCatalogQuerySchema,\n modelReadinessSchema,\n modelRouteSchema,\n noticeSchema,\n operationResultSchema,\n problemDetailsSchema,\n problemProjectionSchema,\n proposalDispositionSchema,\n proposalProjectionSchema,\n providerAccountingSchema,\n providerRequestAccountingSchema,\n providerUsageSchema,\n providerCostSchema,\n rangeExtentSchema,\n textRegionSchema,\n effortSchema,\n ];\n\n // The exact schema behind a `$ref` a Functionality family declares as its definition\n // schema — the source its generated document teaches the definition from.\n static schemaByRef(ref: string): object | null {\n const schema = Validator.#publicSchemas.find((candidate) => Validator.#schemaId(candidate) === ref);\n return schema === undefined ? null : schema;\n }\n\n // {§text-region} A schema document is an object, naming its dialect in `$schema` or taking the validator's\n // default; every validator compiles one, the checked-in documents and the dynamic ones callers own alike. What\n // the document then means is the validator's to read, its declared dialect included.\n static #schemaDocument(value: unknown): value is Schema {\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) return false;\n return !(\"$schema\" in value) || typeof value.$schema === \"string\";\n }\n\n static #schemaId(document: unknown): string | undefined {\n return typeof document === \"object\" && document !== null && \"$id\" in document && typeof document.$id === \"string\"\n ? document.$id\n : undefined;\n }\n\n static #compile(document: unknown): CfValidator {\n if (!Validator.#schemaDocument(document)) {\n throw new TypeError(\"a JSON Schema document is an object declaring draft 2020-12, or no draft\");\n }\n return new CfValidator(document, \"2020-12\");\n }\n\n static #withRefs(mainSchema: unknown, refSchemas: unknown[]): CfValidator {\n const validator = Validator.#compile(mainSchema);\n const mainId = Validator.#schemaId(mainSchema);\n for (const ref of refSchemas) {\n if (Validator.#schemaId(ref) === mainId) continue;\n if (!Validator.#schemaDocument(ref)) {\n throw new TypeError(\"a referenced JSON Schema document is an object declaring draft 2020-12, or no draft\");\n }\n validator.addSchema(ref);\n }\n return validator;\n }\n\n // {§text-region} The schema's acceptance is the proof a value has its wire type: a guard over the result of\n // validating that value, the one place a validated `unknown` takes its type. The caller names the type the\n // schema it validated against generates; the predicate is where it appears.\n // oxlint-disable-next-line typescript/no-unnecessary-type-parameters -- a type predicate's parameter appears once by nature\n static #accepted<T>(value: unknown, result: ValidationResult): value is T {\n return result.valid;\n }\n\n // oxlint-disable-next-line typescript/no-unnecessary-type-parameters -- schema assertion returns the type the validated schema generates\n static #assert<T>(\n schema: JsonSchema,\n label: string,\n value: unknown,\n ErrorClass: new (message: string) => Error = TypeError,\n ): T {\n const result = Validator.validateJsonSchemaInstance(schema, value);\n if (!Validator.#accepted<T>(value, result)) {\n throw new ErrorClass(`invalid ${label}: ${JSON.stringify(result.errors)}`);\n }\n return value;\n }\n\n static validateJsonSchemaInstance(schema: JsonSchema, value: unknown): ValidationResult {\n let validator = Validator.#jsonSchemaValidators.get(schema);\n if (validator === undefined) {\n // @cfworker annotates a schema while dereferencing it. Dynamic wire\n // schemas are caller-owned discovery values and may be frozen; never\n // mutate the authority merely by compiling its executable projection.\n validator = Validator.#withRefs(structuredClone(schema), Validator.#publicSchemas);\n Validator.#jsonSchemaValidators.set(schema, validator);\n }\n const result = validator.validate(value);\n return { valid: result.valid, errors: result.errors };\n }\n\n static assertJsonSchemaInstance<T>(label: string, schema: JsonSchema, value: T): T {\n const result = Validator.validateJsonSchemaInstance(schema, value);\n if (!result.valid) {\n throw new TypeError(`${label} does not satisfy its JSON Schema: ${JSON.stringify(result.errors)}`);\n }\n return value;\n }\n\n static validateParsedPath(value: unknown): ValidationResult {\n return Validator.validateJsonSchemaInstance(parsedPathSchema, value);\n }\n\n static validatePlurnkStatement(value: unknown): ValidationResult {\n return Validator.validateJsonSchemaInstance(plurnkStatementSchema, value);\n }\n\n static validateEffort(value: unknown): ValidationResult {\n return Validator.validateJsonSchemaInstance(effortSchema, value);\n }\n\n static assertSessionOwner(value: unknown): SessionOwner {\n return Validator.#assert<SessionOwner>(sessionOwnerSchema, \"SessionOwner\", value);\n }\n\n static assertRollbackReport(value: unknown): RollbackReport {\n return Validator.#assert<RollbackReport>(rollbackReportSchema, \"RollbackReport\", value);\n }\n\n static assertNotice(value: unknown): Notice {\n return Validator.#assert<Notice>(noticeSchema, \"Notice\", value);\n }\n\n static assertProblemDetails(value: unknown): ProblemDetails {\n return Validator.#assert<ProblemDetails>(\n problemDetailsSchema,\n \"RFC 9457 Problem Details\",\n value,\n InvalidProblemDetailsError,\n );\n }\n\n static assertProblemProjection(value: unknown): ProblemProjection {\n return Validator.#assert<ProblemProjection>(problemProjectionSchema, \"model Problem projection\", value);\n }\n\n static assertOperationResult(value: unknown): OperationResult {\n const exact = Validator.#assert<OperationResult>(\n operationResultSchema,\n \"operation result\",\n value,\n InvalidOperationResultError,\n );\n if (exact.problem !== undefined && exact.problem.status !== exact.status) {\n throw new InvalidOperationResultError(\n `operation result status ${exact.status} does not match problem status ${exact.problem.status}`,\n );\n }\n if (exact.range !== undefined) {\n try {\n Validator.assertRangeExtent(exact.range);\n } catch (cause) {\n throw new InvalidOperationResultError(\"operation result contains an invalid RangeExtent\", { cause });\n }\n }\n return exact;\n }\n\n static assertEntryReadResult(value: unknown): EntryReadResult {\n const exact = Validator.#assert<EntryReadResult>(entryReadResultSchema, \"EntryReadResult\", value);\n if (\"problem\" in exact && exact.problem.status !== exact.status) {\n throw new TypeError(`EntryReadResult status ${exact.status} does not match problem status ${exact.problem.status}`);\n }\n if (exact.entry !== null) {\n for (const [name, channel] of Object.entries(exact.entry.channels)) {\n const returnedLength = Array.from(channel.content).length;\n if (channel.contentOffset + returnedLength !== channel.contentLength) {\n throw new TypeError(\n `invalid EntryReadResult: /entry/channels/${name} contentOffset plus the returned Unicode-code-point length must equal contentLength`,\n );\n }\n }\n }\n return exact;\n }\n\n static assertTextRegion(value: unknown): TextRegion {\n const exact = Validator.#assert<TextRegion>(textRegionSchema, \"TextRegion\", value);\n if (\n exact.endLine < exact.startLine\n || (exact.endLine === exact.startLine && exact.endColumn < exact.startColumn)\n ) {\n throw new TypeError(\"TextRegion ends before it starts\");\n }\n return exact;\n }\n\n static assertRangeExtent(value: unknown): RangeExtent {\n const exact = Validator.#assert<RangeExtent>(rangeExtentSchema, \"RangeExtent\", value);\n if (exact.returned !== undefined) {\n const [first, last] = exact.returned;\n if (first > last || last > exact.total) {\n throw new TypeError(\"RangeExtent returned positions must be ordered within total\");\n }\n }\n return exact;\n }\n\n static assertProposalProjection(value: unknown): ProposalProjection {\n return Validator.#assert<ProposalProjection>(proposalProjectionSchema, \"ProposalProjection\", value);\n }\n\n static assertClientDisplayCapabilities(value: unknown): ClientDisplayCapabilities {\n return Validator.#assert<ClientDisplayCapabilities>(clientDisplayCapabilitiesSchema, \"ClientDisplayCapabilities\", value);\n }\n\n static assertMcpServerDefinition(value: unknown): McpServerDefinition {\n return Validator.#assert<McpServerDefinition>(mcpServerDefinitionSchema, \"MCP server definition\", value);\n }\n\n static assertSkillDefinition(value: unknown): SkillDefinition {\n return Validator.#assert<SkillDefinition>(skillDefinitionSchema, \"Skill definition\", value);\n }\n\n static assertMcpOAuth(value: unknown): McpOAuth {\n return Validator.#assert<McpOAuth>(mcpOAuthSchema, \"MCP OAuth settings\", value);\n }\n\n static assertClientInteractionRequest(value: unknown): ClientInteractionRequest {\n return Validator.#assert<ClientInteractionRequest>(clientInteractionRequestSchema, \"ClientInteractionRequest\", value);\n }\n\n static assertClientInteractionProjection(value: unknown): ClientInteractionProjection {\n return Validator.#assert<ClientInteractionProjection>(clientInteractionProjectionSchema, \"ClientInteractionProjection\", value);\n }\n\n static assertClientInteractionResolution(value: unknown): ClientInteractionResolution {\n return Validator.#assert<ClientInteractionResolution>(clientInteractionResolutionSchema, \"ClientInteractionResolution\", value);\n }\n\n static assertParsedPath(value: unknown): ParsedPath {\n return Validator.#assert<ParsedPath>(parsedPathSchema, \"ParsedPath\", value);\n }\n\n static assertPlurnkStatement(value: unknown): PlurnkStatement {\n return Validator.#assert<PlurnkStatement>(plurnkStatementSchema, \"PlurnkStatement\", value);\n }\n\n static assertEffort(value: unknown): Effort {\n return Validator.#assert<Effort>(effortSchema, \"Effort\", value);\n }\n\n static assertModelCatalogPage(value: unknown): ModelCatalogPage {\n const page = Validator.#assert<ModelCatalogPage>(modelCatalogPageSchema, \"ModelCatalogPage\", value);\n const selectors = new Set<string>();\n for (const item of page.items) {\n Validator.assertModelReadiness(item.readiness);\n if (item.selector !== `${item.provider}/${item.model}`) {\n throw new TypeError(\"ModelCatalogPage item selector must equal provider/model\");\n }\n if (selectors.has(item.selector)) {\n throw new TypeError(\"ModelCatalogPage item selectors must be unique\");\n }\n selectors.add(item.selector);\n }\n const pageEnd = page.offset + page.items.length;\n if (page.items.length > 0 && pageEnd > page.total) {\n throw new TypeError(\"ModelCatalogPage items extend beyond total\");\n }\n if (page.nextOffset !== undefined) {\n if (page.nextOffset !== pageEnd || page.nextOffset >= page.total) {\n throw new TypeError(\"ModelCatalogPage nextOffset must equal the page end and leave remaining items\");\n }\n } else if (page.offset < page.total && pageEnd < page.total) {\n throw new TypeError(\"ModelCatalogPage omits nextOffset before total\");\n }\n return page;\n }\n\n static assertFunctionalityListResult(value: unknown): FunctionalityListResult {\n return Validator.#assert<FunctionalityListResult>(functionalityListResultSchema, \"FunctionalityListResult\", value);\n }\n\n static assertFunctionalityDiscoverResult(value: unknown): FunctionalityDiscoverResult {\n return Validator.#assert<FunctionalityDiscoverResult>(functionalityDiscoverResultSchema, \"FunctionalityDiscoverResult\", value);\n }\n\n static assertFunctionalityMutationResult(value: unknown): FunctionalityMutationResult {\n return Validator.#assert<FunctionalityMutationResult>(functionalityMutationResultSchema, \"FunctionalityMutationResult\", value);\n }\n\n static assertModelCatalogQuery(value: unknown): ModelCatalogQuery {\n return Validator.#assert<ModelCatalogQuery>(modelCatalogQuerySchema, \"ModelCatalogQuery\", value);\n }\n\n static assertModelReadiness(value: unknown): ModelReadiness {\n const readiness = Validator.#assert<ModelReadiness>(modelReadinessSchema, \"ModelReadiness\", value);\n if (readiness.ready !== (readiness.causes.length === 0)) {\n throw new TypeError(\"invalid ModelReadiness: ready must be true exactly when causes is empty\");\n }\n return readiness;\n }\n\n static assertModelRoute(value: unknown): ModelRoute {\n return Validator.#assert<ModelRoute>(modelRouteSchema, \"ModelRoute\", value);\n }\n\n static assertAcpDiscovery(value: unknown): AcpDiscovery {\n return Validator.#assert<AcpDiscovery>(acpDiscoverySchema, \"ACP discovery manifest\", value);\n }\n\n static validateDaemonNotification(value: unknown): ValidationResult {\n return Validator.validateJsonSchemaInstance(daemonNotificationEnvelopeSchema, value);\n }\n\n static assertDaemonNotification(value: unknown): DaemonNotificationEnvelope {\n return Validator.#assert<DaemonNotificationEnvelope>(\n daemonNotificationEnvelopeSchema,\n \"DaemonNotificationEnvelope\",\n value,\n );\n }\n}\n"]}
1
+ {"version":3,"file":"Validator.js","sourceRoot":"","sources":["../../src/Validator.ts"],"names":[],"mappings":"A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kB,EAAE,wBAAwB,EAAE,KAAK,CAAC,CAAC;IAChG,CAAC;IAED,MAAM,CAAC,0BAA0B,CAAC,KAAc;QAC5C,OAAO,SAAS,CAAC,0BAA0B,CAAC,gCAAgC,EAAE,KAAK,CAAC,CAAC;IACzF,CAAC;IAED,MAAM,CAAC,wBAAwB,CAAC,KAAc;QAC1C,OAAO,SAAS,CAAC,OAAO,CACpB,gCAAgC,EAChC,4BAA4B,EAC5B,KAAK,CACR,CAAC;IACN,CAAC;CACJ","sourcesContent":["import { Validator as CfValidator, type OutputUnit, type Schema } from \"@cfworker/json-schema\";\nimport positionSchema from \"../schema/Position.json\" with { type: \"json\" };\nimport lineMarkerSchema from \"../schema/LineMarker.json\" with { type: \"json\" };\nimport textLineMarkerSchema from \"../schema/TextLineMarker.json\" with { type: \"json\" };\nimport parsedPathSchema from \"../schema/ParsedPath.json\" with { type: \"json\" };\nimport matcherBodySchema from \"../schema/MatcherBody.json\" with { type: \"json\" };\nimport sendBodySchema from \"../schema/SendBody.json\" with { type: \"json\" };\nimport resourceSelectionSchema from \"../schema/ResourceSelection.json\" with { type: \"json\" };\nimport plurnkStatementSchema from \"../schema/PlurnkStatement.json\" with { type: \"json\" };\nimport daemonNotificationEnvelopeSchema from \"../schema/DaemonNotificationEnvelope.json\" with { type: \"json\" };\nimport noticeSchema from \"../schema/Notice.json\" with { type: \"json\" };\nimport problemDetailsSchema from \"../schema/ProblemDetails.json\" with { type: \"json\" };\nimport problemProjectionSchema from \"../schema/ProblemProjection.json\" with { type: \"json\" };\nimport operationResultSchema from \"../schema/OperationResult.json\" with { type: \"json\" };\nimport entryReadResultSchema from \"../schema/EntryReadResult.json\" with { type: \"json\" };\nimport textRegionSchema from \"../schema/TextRegion.json\" with { type: \"json\" };\nimport rangeExtentSchema from \"../schema/RangeExtent.json\" with { type: \"json\" };\nimport proposalProjectionSchema from \"../schema/ProposalProjection.json\" with { type: \"json\" };\nimport proposalDispositionSchema from \"../schema/ProposalDisposition.json\" with { type: \"json\" };\nimport sessionOwnerSchema from \"../schema/SessionOwner.json\" with { type: \"json\" };\nimport type { SessionOwner, RollbackReport, AcpDiscovery, ClientDisplayCapabilities, ClientInteractionProjection, ClientInteractionRequest, ClientInteractionResolution, DaemonNotificationEnvelope, EntryReadResult, FunctionalityDiscoverResult, FunctionalityListQuery, FunctionalityListResult, FunctionalityMutationResult, McpOAuth, McpServerDefinition, ModelCatalogPage, ModelCatalogQuery, ModelReadiness, ModelRoute, Notice, OperationResult, ProblemDetails, ProblemProjection, ProposalProjection, RangeExtent, Effort, SkillDefinition, TextRegion, JsonSchema, ParsedPath, PlurnkStatement } from \"./types.generated.ts\";\nimport clientDisplayCapabilitiesSchema from \"../schema/ClientDisplayCapabilities.json\" with { type: \"json\" };\nimport mcpServerDefinitionSchema from \"../schema/McpServerDefinition.json\" with { type: \"json\" };\nimport skillDefinitionSchema from \"../schema/SkillDefinition.json\" with { type: \"json\" };\nimport mcpOAuthSchema from \"../schema/McpOAuth.json\" with { type: \"json\" };\nimport clientInteractionRequestSchema from \"../schema/ClientInteractionRequest.json\" with { type: \"json\" };\nimport clientInteractionProjectionSchema from \"../schema/ClientInteractionProjection.json\" with { type: \"json\" };\nimport clientInteractionResolutionSchema from \"../schema/ClientInteractionResolution.json\" with { type: \"json\" };\nimport effortSchema from \"../schema/Effort.json\" with { type: \"json\" };\nimport modelCatalogPageSchema from \"../schema/ModelCatalogPage.json\" with { type: \"json\" };\nimport modelCatalogQuerySchema from \"../schema/ModelCatalogQuery.json\" with { type: \"json\" };\nimport functionalityCandidateSchema from \"../schema/FunctionalityCandidate.json\" with { type: \"json\" };\nimport functionalityProvenanceSchema from \"../schema/FunctionalityProvenance.json\" with { type: \"json\" };\nimport functionalityDiscoverQuerySchema from \"../schema/FunctionalityDiscoverQuery.json\" with { type: \"json\" };\nimport functionalityDiscoverResultSchema from \"../schema/FunctionalityDiscoverResult.json\" with { type: \"json\" };\nimport functionalityDefinitionStateSchema from \"../schema/FunctionalityDefinitionState.json\" with { type: \"json\" };\nimport functionalityListQuerySchema from \"../schema/FunctionalityListQuery.json\" with { type: \"json\" };\nimport functionalityListResultSchema from \"../schema/FunctionalityListResult.json\" with { type: \"json\" };\nimport functionalityMutationResultSchema from \"../schema/FunctionalityMutationResult.json\" with { type: \"json\" };\nimport rollbackReportSchema from \"../schema/RollbackReport.json\" with { type: \"json\" };\nimport mcpOAuthCompletionResultSchema from \"../schema/McpOAuthCompletionResult.json\" with { type: \"json\" };\nimport mcpOAuthBeginResultSchema from \"../schema/McpOAuthBeginResult.json\" with { type: \"json\" };\nimport functionalityPreparationActivitySchema from \"../schema/FunctionalityPreparationActivity.json\" with { type: \"json\" };\nimport modelReadinessSchema from \"../schema/ModelReadiness.json\" with { type: \"json\" };\nimport modelRouteSchema from \"../schema/ModelRoute.json\" with { type: \"json\" };\nimport acpDiscoverySchema from \"../schema/AcpDiscovery.json\" with { type: \"json\" };\nimport providerAccountingSchema from \"../schema/ProviderAccounting.json\" with { type: \"json\" };\nimport providerRequestAccountingSchema from \"../schema/ProviderRequestAccounting.json\" with { type: \"json\" };\nimport providerUsageSchema from \"../schema/ProviderUsage.json\" with { type: \"json\" };\nimport providerCostSchema from \"../schema/ProviderCost.json\" with { type: \"json\" };\n\nexport type ValidationResult = { valid: boolean; errors: OutputUnit[] };\n\nexport class InvalidProblemDetailsError extends TypeError {}\nexport class InvalidOperationResultError extends TypeError {}\n\nexport default class Validator {\n static #jsonSchemaValidators = new WeakMap<JsonSchema, CfValidator>();\n static #publicSchemas = [\n daemonNotificationEnvelopeSchema,\n plurnkStatementSchema,\n positionSchema,\n lineMarkerSchema,\n textLineMarkerSchema,\n parsedPathSchema,\n matcherBodySchema,\n sendBodySchema,\n resourceSelectionSchema,\n acpDiscoverySchema,\n clientDisplayCapabilitiesSchema,\n clientInteractionProjectionSchema,\n clientInteractionRequestSchema,\n clientInteractionResolutionSchema,\n entryReadResultSchema,\n functionalityCandidateSchema,\n functionalityProvenanceSchema,\n functionalityDefinitionStateSchema,\n functionalityDiscoverQuerySchema,\n functionalityDiscoverResultSchema,\n functionalityListQuerySchema,\n functionalityListResultSchema,\n functionalityMutationResultSchema,\n functionalityPreparationActivitySchema,\n rollbackReportSchema,\n mcpOAuthCompletionResultSchema,\n mcpOAuthBeginResultSchema,\n mcpOAuthSchema,\n mcpServerDefinitionSchema,\n skillDefinitionSchema,\n sessionOwnerSchema,\n modelCatalogPageSchema,\n modelCatalogQuerySchema,\n modelReadinessSchema,\n modelRouteSchema,\n noticeSchema,\n operationResultSchema,\n problemDetailsSchema,\n problemProjectionSchema,\n proposalDispositionSchema,\n proposalProjectionSchema,\n providerAccountingSchema,\n providerRequestAccountingSchema,\n providerUsageSchema,\n providerCostSchema,\n rangeExtentSchema,\n textRegionSchema,\n effortSchema,\n ];\n\n // The exact schema behind a `$ref` a Functionality family declares as its definition\n // schema — the source its generated document teaches the definition from.\n static schemaByRef(ref: string): object | null {\n const schema = Validator.#publicSchemas.find((candidate) => Validator.#schemaId(candidate) === ref);\n return schema === undefined ? null : schema;\n }\n\n // {§text-region} A schema document is an object, naming its dialect in `$schema` or taking the validator's\n // default; every validator compiles one, the checked-in documents and the dynamic ones callers own alike. What\n // the document then means is the validator's to read, its declared dialect included.\n static #schemaDocument(value: unknown): value is Schema {\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) return false;\n return !(\"$schema\" in value) || typeof value.$schema === \"string\";\n }\n\n static #schemaId(document: unknown): string | undefined {\n return typeof document === \"object\" && document !== null && \"$id\" in document && typeof document.$id === \"string\"\n ? document.$id\n : undefined;\n }\n\n static #compile(document: unknown): CfValidator {\n if (!Validator.#schemaDocument(document)) {\n throw new TypeError(\"a JSON Schema document is an object declaring draft 2020-12, or no draft\");\n }\n return new CfValidator(document, \"2020-12\");\n }\n\n static #withRefs(mainSchema: unknown, refSchemas: unknown[]): CfValidator {\n const validator = Validator.#compile(mainSchema);\n const mainId = Validator.#schemaId(mainSchema);\n for (const ref of refSchemas) {\n if (Validator.#schemaId(ref) === mainId) continue;\n if (!Validator.#schemaDocument(ref)) {\n throw new TypeError(\"a referenced JSON Schema document is an object declaring draft 2020-12, or no draft\");\n }\n validator.addSchema(ref);\n }\n return validator;\n }\n\n // {§text-region} The schema's acceptance is the proof a value has its wire type: a guard over the result of\n // validating that value, the one place a validated `unknown` takes its type. The caller names the type the\n // schema it validated against generates; the predicate is where it appears.\n // oxlint-disable-next-line typescript/no-unnecessary-type-parameters -- a type predicate's parameter appears once by nature\n static #accepted<T>(value: unknown, result: ValidationResult): value is T {\n return result.valid;\n }\n\n // oxlint-disable-next-line typescript/no-unnecessary-type-parameters -- schema assertion returns the type the validated schema generates\n static #assert<T>(\n schema: JsonSchema,\n label: string,\n value: unknown,\n ErrorClass: new (message: string) => Error = TypeError,\n ): T {\n const result = Validator.validateJsonSchemaInstance(schema, value);\n if (!Validator.#accepted<T>(value, result)) {\n throw new ErrorClass(`invalid ${label}: ${JSON.stringify(result.errors)}`);\n }\n return value;\n }\n\n static validateJsonSchemaInstance(schema: JsonSchema, value: unknown): ValidationResult {\n let validator = Validator.#jsonSchemaValidators.get(schema);\n if (validator === undefined) {\n // @cfworker annotates a schema while dereferencing it. Dynamic wire\n // schemas are caller-owned discovery values and may be frozen; never\n // mutate the authority merely by compiling its executable projection.\n validator = Validator.#withRefs(structuredClone(schema), Validator.#publicSchemas);\n Validator.#jsonSchemaValidators.set(schema, validator);\n }\n const result = validator.validate(value);\n return { valid: result.valid, errors: result.errors };\n }\n\n static assertJsonSchemaInstance<T>(label: string, schema: JsonSchema, value: T): T {\n const result = Validator.validateJsonSchemaInstance(schema, value);\n if (!result.valid) {\n throw new TypeError(`${label} does not satisfy its JSON Schema: ${JSON.stringify(result.errors)}`);\n }\n return value;\n }\n\n static validateParsedPath(value: unknown): ValidationResult {\n return Validator.validateJsonSchemaInstance(parsedPathSchema, value);\n }\n\n static validatePlurnkStatement(value: unknown): ValidationResult {\n return Validator.validateJsonSchemaInstance(plurnkStatementSchema, value);\n }\n\n static validateEffort(value: unknown): ValidationResult {\n return Validator.validateJsonSchemaInstance(effortSchema, value);\n }\n\n static assertSessionOwner(value: unknown): SessionOwner {\n return Validator.#assert<SessionOwner>(sessionOwnerSchema, \"SessionOwner\", value);\n }\n\n static assertRollbackReport(value: unknown): RollbackReport {\n return Validator.#assert<RollbackReport>(rollbackReportSchema, \"RollbackReport\", value);\n }\n\n static assertNotice(value: unknown): Notice {\n return Validator.#assert<Notice>(noticeSchema, \"Notice\", value);\n }\n\n static assertProblemDetails(value: unknown): ProblemDetails {\n return Validator.#assert<ProblemDetails>(\n problemDetailsSchema,\n \"RFC 9457 Problem Details\",\n value,\n InvalidProblemDetailsError,\n );\n }\n\n static assertProblemProjection(value: unknown): ProblemProjection {\n return Validator.#assert<ProblemProjection>(problemProjectionSchema, \"model Problem projection\", value);\n }\n\n static assertOperationResult(value: unknown): OperationResult {\n const exact = Validator.#assert<OperationResult>(\n operationResultSchema,\n \"operation result\",\n value,\n InvalidOperationResultError,\n );\n if (exact.problem !== undefined && exact.problem.status !== exact.status) {\n throw new InvalidOperationResultError(\n `operation result status ${exact.status} does not match problem status ${exact.problem.status}`,\n );\n }\n if (exact.range !== undefined) {\n try {\n Validator.assertRangeExtent(exact.range);\n } catch (cause) {\n throw new InvalidOperationResultError(\"operation result contains an invalid RangeExtent\", { cause });\n }\n }\n return exact;\n }\n\n static assertEntryReadResult(value: unknown): EntryReadResult {\n const exact = Validator.#assert<EntryReadResult>(entryReadResultSchema, \"EntryReadResult\", value);\n if (\"problem\" in exact && exact.problem.status !== exact.status) {\n throw new TypeError(`EntryReadResult status ${exact.status} does not match problem status ${exact.problem.status}`);\n }\n if (exact.entry !== null) {\n for (const [name, channel] of Object.entries(exact.entry.channels)) {\n const returnedLength = Array.from(channel.content).length;\n if (channel.contentOffset + returnedLength !== channel.contentLength) {\n throw new TypeError(\n `invalid EntryReadResult: /entry/channels/${name} contentOffset plus the returned Unicode-code-point length must equal contentLength`,\n );\n }\n }\n }\n return exact;\n }\n\n static assertTextRegion(value: unknown): TextRegion {\n const exact = Validator.#assert<TextRegion>(textRegionSchema, \"TextRegion\", value);\n if (\n exact.endLine < exact.startLine\n || (exact.endLine === exact.startLine && exact.endColumn < exact.startColumn)\n ) {\n throw new TypeError(\"TextRegion ends before it starts\");\n }\n return exact;\n }\n\n static assertRangeExtent(value: unknown): RangeExtent {\n const exact = Validator.#assert<RangeExtent>(rangeExtentSchema, \"RangeExtent\", value);\n if (exact.returned !== undefined) {\n const [first, last] = exact.returned;\n if (first > last || last > exact.total) {\n throw new TypeError(\"RangeExtent returned positions must be ordered within total\");\n }\n }\n return exact;\n }\n\n static assertProposalProjection(value: unknown): ProposalProjection {\n return Validator.#assert<ProposalProjection>(proposalProjectionSchema, \"ProposalProjection\", value);\n }\n\n static assertClientDisplayCapabilities(value: unknown): ClientDisplayCapabilities {\n return Validator.#assert<ClientDisplayCapabilities>(clientDisplayCapabilitiesSchema, \"ClientDisplayCapabilities\", value);\n }\n\n static assertMcpServerDefinition(value: unknown): McpServerDefinition {\n return Validator.#assert<McpServerDefinition>(mcpServerDefinitionSchema, \"MCP server definition\", value);\n }\n\n static assertSkillDefinition(value: unknown): SkillDefinition {\n return Validator.#assert<SkillDefinition>(skillDefinitionSchema, \"Skill definition\", value);\n }\n\n static assertMcpOAuth(value: unknown): McpOAuth {\n return Validator.#assert<McpOAuth>(mcpOAuthSchema, \"MCP OAuth settings\", value);\n }\n\n static assertClientInteractionRequest(value: unknown): ClientInteractionRequest {\n return Validator.#assert<ClientInteractionRequest>(clientInteractionRequestSchema, \"ClientInteractionRequest\", value);\n }\n\n static assertClientInteractionProjection(value: unknown): ClientInteractionProjection {\n return Validator.#assert<ClientInteractionProjection>(clientInteractionProjectionSchema, \"ClientInteractionProjection\", value);\n }\n\n static assertClientInteractionResolution(value: unknown): ClientInteractionResolution {\n return Validator.#assert<ClientInteractionResolution>(clientInteractionResolutionSchema, \"ClientInteractionResolution\", value);\n }\n\n static assertParsedPath(value: unknown): ParsedPath {\n return Validator.#assert<ParsedPath>(parsedPathSchema, \"ParsedPath\", value);\n }\n\n static assertPlurnkStatement(value: unknown): PlurnkStatement {\n return Validator.#assert<PlurnkStatement>(plurnkStatementSchema, \"PlurnkStatement\", value);\n }\n\n static assertEffort(value: unknown): Effort {\n return Validator.#assert<Effort>(effortSchema, \"Effort\", value);\n }\n\n static assertModelCatalogPage(value: unknown): ModelCatalogPage {\n const page = Validator.#assert<ModelCatalogPage>(modelCatalogPageSchema, \"ModelCatalogPage\", value);\n const selectors = new Set<string>();\n for (const item of page.items) {\n Validator.assertModelReadiness(item.readiness);\n if (item.selector !== `${item.provider}/${item.model}`) {\n throw new TypeError(\"ModelCatalogPage item selector must equal provider/model\");\n }\n if (selectors.has(item.selector)) {\n throw new TypeError(\"ModelCatalogPage item selectors must be unique\");\n }\n selectors.add(item.selector);\n }\n const pageEnd = page.offset + page.items.length;\n if (page.items.length > 0 && pageEnd > page.total) {\n throw new TypeError(\"ModelCatalogPage items extend beyond total\");\n }\n if (page.nextOffset !== undefined) {\n if (page.nextOffset !== pageEnd || page.nextOffset >= page.total) {\n throw new TypeError(\"ModelCatalogPage nextOffset must equal the page end and leave remaining items\");\n }\n } else if (page.offset < page.total && pageEnd < page.total) {\n throw new TypeError(\"ModelCatalogPage omits nextOffset before total\");\n }\n return page;\n }\n\n static assertFunctionalityListQuery(value: unknown): FunctionalityListQuery {\n return Validator.#assert<FunctionalityListQuery>(functionalityListQuerySchema, \"FunctionalityListQuery\", value);\n }\n\n static assertFunctionalityListResult(value: unknown): FunctionalityListResult {\n const result = Validator.#assert<FunctionalityListResult>(functionalityListResultSchema, \"FunctionalityListResult\", value);\n const pageEnd = result.offset + result.definitions.length;\n if (result.definitions.length > 0 && pageEnd > result.total) {\n throw new TypeError(\"FunctionalityListResult definitions extend beyond total\");\n }\n if (result.nextOffset !== undefined) {\n if (result.nextOffset !== pageEnd || result.nextOffset >= result.total) {\n throw new TypeError(\"FunctionalityListResult nextOffset must equal the page end and leave remaining items\");\n }\n } else if (result.offset < result.total && pageEnd < result.total) {\n throw new TypeError(\"FunctionalityListResult omits nextOffset before total\");\n }\n return result;\n }\n\n static assertFunctionalityDiscoverResult(value: unknown): FunctionalityDiscoverResult {\n return Validator.#assert<FunctionalityDiscoverResult>(functionalityDiscoverResultSchema, \"FunctionalityDiscoverResult\", value);\n }\n\n static assertFunctionalityMutationResult(value: unknown): FunctionalityMutationResult {\n return Validator.#assert<FunctionalityMutationResult>(functionalityMutationResultSchema, \"FunctionalityMutationResult\", value);\n }\n\n static assertModelCatalogQuery(value: unknown): ModelCatalogQuery {\n return Validator.#assert<ModelCatalogQuery>(modelCatalogQuerySchema, \"ModelCatalogQuery\", value);\n }\n\n static assertModelReadiness(value: unknown): ModelReadiness {\n const readiness = Validator.#assert<ModelReadiness>(modelReadinessSchema, \"ModelReadiness\", value);\n if (readiness.ready !== (readiness.causes.length === 0)) {\n throw new TypeError(\"invalid ModelReadiness: ready must be true exactly when causes is empty\");\n }\n return readiness;\n }\n\n static assertModelRoute(value: unknown): ModelRoute {\n return Validator.#assert<ModelRoute>(modelRouteSchema, \"ModelRoute\", value);\n }\n\n static assertAcpDiscovery(value: unknown): AcpDiscovery {\n return Validator.#assert<AcpDiscovery>(acpDiscoverySchema, \"ACP discovery manifest\", value);\n }\n\n static validateDaemonNotification(value: unknown): ValidationResult {\n return Validator.validateJsonSchemaInstance(daemonNotificationEnvelopeSchema, value);\n }\n\n static assertDaemonNotification(value: unknown): DaemonNotificationEnvelope {\n return Validator.#assert<DaemonNotificationEnvelope>(\n daemonNotificationEnvelopeSchema,\n \"DaemonNotificationEnvelope\",\n value,\n );\n }\n}\n"]}
@@ -13,14 +13,21 @@ export { default as TurnDisposition } from "./TurnDisposition.ts";
13
13
  export { renderJsonResult } from "./JsonResult.ts";
14
14
  export { formatJsonDocument } from "./JsonDocument.ts";
15
15
  export type { JsonReplacer } from "./JsonResult.ts";
16
- export { admitBearerRequest, requestOrigin } from "./HttpOrigin.ts";
17
- export type { BearerAdmission, BearerAdmissionOptions, RequestHeaders } from "./HttpOrigin.ts";
16
+ export { admitBearerRequest, admitBrowserOrigin, buildCorsHeaders, isLoopbackHost, parseScopedRoute, requestOrigin, resolvePublicOrigin, } from "./HttpOrigin.ts";
17
+ export type { BearerAdmission, BearerAdmissionOptions, BrowserOriginAdmission, BrowserOriginOptions, CorsHeaderOptions, RequestHeaders, ScopedRouteOptions, ScopedRouteParseResult, } from "./HttpOrigin.ts";
18
+ export { actorsMatch, extractActor, isDefaultExteriorActor, parseExteriorActor, type ExteriorActor, type ExteriorActorScheme, } from "./ActorIdentity.ts";
18
19
  export { LOG_ENTRY_KINDS, addressOf, isLogEntryKind, toolKindOf, type LogAddressColumns, type LogEntryKind, type ProposalToolKind, } from "./LogRow.ts";
19
- export { APPLICATION_RUNTIME_STREAM_EVENTS, DAEMON_NOTIFICATION_EVENTS, isApplicationRuntimeStreamEvent, isDaemonNotificationEvent, isRuntimeTelemetryNotice, matchesNotificationFilter, toDaemonNotification, type ApplicationNotificationContract, type ApplicationRuntimeStreamEvent, type ApplicationRuntimeStreamHandler, type ApplicationRuntimeStreamPayloadMap, type DaemonNotification, type DaemonNotificationEvent, type DaemonNotificationPayloadMap, type FunctionalityChangedNotification, type LogEntryNotification, type LoopGateSettledNotification, type LoopInteractionNotification, type LoopPacketNotification, type NoticeEventNotification, type NotificationFilter, type NotificationReplayResult, type NotificationsResyncPayload, type ProposalNotification, type ReasoningEventNotification, type SessionArchivedNotification, type SessionCreatedNotification, type SessionDeletedNotification, type SessionPolicyNotification, type SessionTitledNotification, type StreamConcludedNotification, type StreamEventNotification, type TerminatedNotification, type WorkspaceArchivedNotification, type WorkspaceCreatedNotification, type WorkspacePreparationNotification, type WorkspaceRenamedNotification, } from "./ApplicationNotifications.ts";
20
+ export { APPLICATION_RUNTIME_STREAM_EVENTS, DAEMON_NOTIFICATION_EVENTS, isApplicationRuntimeStreamEvent, isDaemonNotificationEvent, isRuntimeTelemetryNotice, matchesNotificationFilter, toDaemonNotification, type ApplicationNotificationContract, type ApplicationRuntimeStreamEvent, type ApplicationRuntimeStreamHandler, type ApplicationRuntimeStreamPayloadMap, type DaemonNotification, type DaemonNotificationEvent, type DaemonNotificationPayloadMap, type FunctionalityChangedNotification, type LogEntryNotification, type LoopGateSettledNotification, type LoopInteractionNotification, type LoopPacketNotification, type LoopParkedNotification, type LoopStartedNotification, type NoticeEventNotification, type NotificationFilter, type NotificationReplayResult, type NotificationsResyncPayload, type ProposalNotification, type ReasoningEventNotification, type SessionArchivedNotification, type SessionCreatedNotification, type SessionDeletedNotification, type SessionPolicyNotification, type SessionTitledNotification, type StreamConcludedNotification, type StreamEventNotification, type TerminatedNotification, type WorkspaceArchivedNotification, type WorkspaceCreatedNotification, type WorkspacePreparationNotification, type WorkspaceRenamedNotification, } from "./ApplicationNotifications.ts";
20
21
  export { expandLearnCommand, formatFamilyResult, formatFamilyRows, formatServiceUpdateReport, parseFamilyCommand, } from "./Application.ts";
22
+ export { SCHEDULE_ADD_FLAGS, SCHEDULE_USAGE, extractScheduleProblem, formatScheduleInspect, formatScheduleStepReceipts, tokenizeSlashArgs, type ScheduleRunResult, type ScheduleStatus, type ScheduledStepReceipt, type ScheduledToolCall, } from "./ScheduleCommand.ts";
23
+ export { FAMILY_SUBCOMMANDS_BY_FAMILY, INTERACTIVE_COMMANDS, buildPromptBlocks, classifyComposerInput, completeInteractiveCommand, longestCommonPrefix, } from "./InteractiveCommands.ts";
24
+ export { SingleFlightRefresh, buildAuthorizationServerMetadataUrls, discoverAuthorizationServerMetadata, discoverProtectedResourceMetadata, generatePkcePair, isAllowedOAuthUrl, parseJwtExpiresAt, parseWwwAuthenticateResourceMetadata, resolveTokenExpiresAt, type AuthorizationServerMetadata, type PkcePair, type ProtectedResourceMetadata, } from "./OAuthClient.ts";
25
+ export { flattenConfigSelectOptions, formatProblemSummary, parseSessionConfigOptions, projectSessionStatus, rankModelChoices, summarizeOperation, type FlatConfigSelectOption, type ModelChoiceCandidate, type OperationSummary, type ParsedConfigOption, type ParsedSessionConfigOptions, type ProjectedSessionStatus, type SessionPhase, type SessionStatusInput, } from "./SessionProjection.ts";
26
+ export type * from "./InteractiveCommands.ts";
21
27
  export type * from "./Application.ts";
22
28
  export type * from "./Functionality.ts";
23
29
  export { PLURNK_OPS, PROPOSAL_POLICIES, RUNTIME_TAG, INTERNAL_ROW_OPS, isExecution, isExecutionOp, isPlurnkOp, writtenOp, EFFORTS, SESSION_NAME, SKILL_NAME, UNKNOWN_POSITION, MAX_TIMER_MS } from "./types.ts";
30
+ export { MCP_WIRE_TOOL, type McpWireToolDefinition } from "./McpWireTool.ts";
24
31
  export type * from "./types.ts";
25
32
  export type { ErrorSource, Severity } from "./PlurnkParseError.ts";
26
33
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,OAAO,IAAI,SAAS,EACpB,2BAA2B,EAC3B,0BAA0B,GAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjE,YAAY,EAAE,eAAe,EAAE,sBAAsB,EAAE,eAAe,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAClJ,YAAY,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAC1F,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAClG,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,YAAY,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAC9E,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,O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AkB,CAAC;AAC1B,OAAO,EACH,0BAA0B,EAC1B,oBAAoB,EACpB,yBAAyB,EACzB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EACjB,KAAK,kBAAkB,GAC1B,MAAM,wBAAwB,CAAC;AAChC,mBAAmB,0BAA0B,CAAC;AAC9C,mBAAmB,kBAAkB,CAAC;AACtC,mBAAmB,oBAAoB,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,WAAW,EAAE,gBAAgB,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAChN,OAAO,EAAE,aAAa,EAAE,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,mBAAmB,YAAY,CAAC;AAChC,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC"}
package/dist/src/index.js CHANGED
@@ -10,10 +10,16 @@ export { default as PathSyntax } from "./PathSyntax.js";
10
10
  export { default as TurnDisposition } from "./TurnDisposition.js";
11
11
  export { renderJsonResult } from "./JsonResult.js";
12
12
  export { formatJsonDocument } from "./JsonDocument.js";
13
- export { admitBearerRequest, requestOrigin } from "./HttpOrigin.js";
13
+ export { admitBearerRequest, admitBrowserOrigin, buildCorsHeaders, isLoopbackHost, parseScopedRoute, requestOrigin, resolvePublicOrigin, } from "./HttpOrigin.js";
14
+ export { actorsMatch, extractActor, isDefaultExteriorActor, parseExteriorActor, } from "./ActorIdentity.js";
14
15
  export { LOG_ENTRY_KINDS, addressOf, isLogEntryKind, toolKindOf, } from "./LogRow.js";
15
16
  export { APPLICATION_RUNTIME_STREAM_EVENTS, DAEMON_NOTIFICATION_EVENTS, isApplicationRuntimeStreamEvent, isDaemonNotificationEvent, isRuntimeTelemetryNotice, matchesNotificationFilter, toDaemonNotification, } from "./ApplicationNotifications.js";
16
17
  // {§whitespace-contract} The application port is Node-bound and is its own entry, `@plurnk/plurnk-contracts/port`.
17
18
  export { expandLearnCommand, formatFamilyResult, formatFamilyRows, formatServiceUpdateReport, parseFamilyCommand, } from "./Application.js";
19
+ export { SCHEDULE_ADD_FLAGS, SCHEDULE_USAGE, extractScheduleProblem, formatScheduleInspect, formatScheduleStepReceipts, tokenizeSlashArgs, } from "./ScheduleCommand.js";
20
+ export { FAMILY_SUBCOMMANDS_BY_FAMILY, INTERACTIVE_COMMANDS, buildPromptBlocks, classifyComposerInput, completeInteractiveCommand, longestCommonPrefix, } from "./InteractiveCommands.js";
21
+ export { SingleFlightRefresh, buildAuthorizationServerMetadataUrls, discoverAuthorizationServerMetadata, discoverProtectedResourceMetadata, generatePkcePair, isAllowedOAuthUrl, parseJwtExpiresAt, parseWwwAuthenticateResourceMetadata, resolveTokenExpiresAt, } from "./OAuthClient.js";
22
+ export { flattenConfigSelectOptions, formatProblemSummary, parseSessionConfigOptions, projectSessionStatus, rankModelChoices, summarizeOperation, } from "./SessionProjection.js";
18
23
  export { PLURNK_OPS, PROPOSAL_POLICIES, RUNTIME_TAG, INTERNAL_ROW_OPS, isExecution, isExecutionOp, isPlurnkOp, writtenOp, EFFORTS, SESSION_NAME, SKILL_NAME, UNKNOWN_POSITION, MAX_TIMER_MS } from "./types.js";
24
+ export { MCP_WIRE_TOOL } from "./McpWireTool.js";
19
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,mFAAmF;AACnF,OAAO,EACH,OAAO,IAAI,SAAS,EACpB,2BAA2B,EAC3B,0BAA0B,GAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjE,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAsB,MAAM,oBAAoB,CAAC;AAClG,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEpE,OAAO,EACH,eAAe,EACf,SAAS,EACT,cAAc,EACd,UAAU,GAIb,MAAM,aAAa,CAAC;AACrB,OAAO,EACH,iCAAiC,EACjC,0BAA0B,EAC1B,+BAA+B,EAC/B,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,oBAAoB,GA+BvB,MAAM,+BAA+B,CAAC;AACvC,mHAAmH;AACnH,OAAO,EACH,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,yBAAyB,EACzB,kBAAkB,GACrB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,WAAW,EAAE,gBAAgB,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC","sourcesContent":["// {§text-region} — the package root: validators, Problems and generated types. The schemas\n// themselves are published at `./schema/*.json`, never re-exported here as values.\nexport {\n default as Validator,\n InvalidOperationResultError,\n InvalidProblemDetailsError,\n} from \"./Validator.ts\";\nexport { default as Problems } from \"./Problems.ts\";\nexport { errnoCode, isRecord, isSafeInteger } from \"./guards.ts\";\nexport type { MessageResource, MessageResourceReceipt, MessageEvidence, ApplicationMessage, ApplicationInboxMessage } from \"./MessageResource.ts\";\nexport type { ApplicationStream, ApplicationStreamChannel } from \"./ApplicationStream.ts\";\nexport { lifecycleOfLoopStatus, selectSessionLoop, type LoopLifecycle } from \"./LoopLifecycle.ts\";\nexport { excerptOf } from \"./Excerpt.ts\";\nexport type { ProblemOptions, ProblemProjectionContext } from \"./Problems.ts\";\nexport type { ValidationResult } from \"./Validator.ts\";\nexport { default as PlurnkParseError } from \"./PlurnkParseError.ts\";\nexport { default as PathSyntax } from \"./PathSyntax.ts\";\nexport { default as TurnDisposition } from \"./TurnDisposition.ts\";\nexport { renderJsonResult } from \"./JsonResult.ts\";\nexport { formatJsonDocument } from \"./JsonDocument.ts\";\nexport type { JsonReplacer } from \"./JsonResult.ts\";\nexport { admitBearerRequest, requestOrigin } from \"./HttpOrigin.ts\";\nexport type { BearerAdmission, BearerAdmissionOptions, RequestHeaders } from \"./HttpOrigin.ts\";\nexport {\n LOG_ENTRY_KINDS,\n addressOf,\n isLogEntryKind,\n toolKindOf,\n type LogAddressColumns,\n type LogEntryKind,\n type ProposalToolKind,\n} from \"./LogRow.ts\";\nexport {\n APPLICATION_RUNTIME_STREAM_EVENTS,\n DAEMON_NOTIFICATION_EVENTS,\n isApplicationRuntimeStreamEvent,\n isDaemonNotificationEvent,\n isRuntimeTelemetryNotice,\n matchesNotificationFilter,\n toDaemonNotification,\n type ApplicationNotificationContract,\n type ApplicationRuntimeStreamEvent,\n type ApplicationRuntimeStreamHandler,\n type ApplicationRuntimeStreamPayloadMap,\n type DaemonNotification,\n type DaemonNotificationEvent,\n type DaemonNotificationPayloadMap,\n type FunctionalityChangedNotification,\n type LogEntryNotification,\n type LoopGateSettledNotification,\n type LoopInteractionNotification,\n type LoopPacketNotification,\n type NoticeEventNotification,\n type NotificationFilter,\n type NotificationReplayResult,\n type NotificationsResyncPayload,\n type ProposalNotification,\n type ReasoningEventNotification,\n type SessionArchivedNotification,\n type SessionCreatedNotification,\n type SessionDeletedNotification,\n type SessionPolicyNotification,\n type SessionTitledNotification,\n type StreamConcludedNotification,\n type StreamEventNotification,\n type TerminatedNotification,\n type WorkspaceArchivedNotification,\n type WorkspaceCreatedNotification,\n type WorkspacePreparationNotification,\n type WorkspaceRenamedNotification,\n} from \"./ApplicationNotifications.ts\";\n// {§whitespace-contract} The application port is Node-bound and is its own entry, `@plurnk/plurnk-contracts/port`.\nexport {\n expandLearnCommand,\n formatFamilyResult,\n formatFamilyRows,\n formatServiceUpdateReport,\n parseFamilyCommand,\n} from \"./Application.ts\";\nexport type * from \"./Application.ts\";\nexport type * from \"./Functionality.ts\";\n\nexport { PLURNK_OPS, PROPOSAL_POLICIES, RUNTIME_TAG, INTERNAL_ROW_OPS, isExecution, isExecutionOp, isPlurnkOp, writtenOp, EFFORTS, SESSION_NAME, SKILL_NAME, UNKNOWN_POSITION, MAX_TIMER_MS } from \"./types.ts\";\nexport type * from \"./types.ts\";\nexport type { ErrorSource, Severity } from \"./PlurnkParseError.ts\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,mFAAmF;AACnF,OAAO,EACH,OAAO,IAAI,SAAS,EACpB,2BAA2B,EAC3B,0BAA0B,GAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjE,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAsB,MAAM,oBAAoB,CAAC;AAClG,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,C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AiB,EACjB,oCAAoC,EACpC,qBAAqB,GAIxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACH,0BAA0B,EAC1B,oBAAoB,EACpB,yBAAyB,EACzB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,GASrB,MAAM,wBAAwB,CAAC;AAKhC,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,WAAW,EAAE,gBAAgB,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAChN,OAAO,EAAE,aAAa,EAA8B,MAAM,kBAAkB,CAAC","sourcesContent":["// {§text-region} — the package root: validators, Problems and generated types. The schemas\n// themselves are published at `./schema/*.json`, never re-exported here as values.\nexport {\n default as Validator,\n InvalidOperationResultError,\n InvalidProblemDetailsError,\n} from \"./Validator.ts\";\nexport { default as Problems } from \"./Problems.ts\";\nexport { errnoCode, isRecord, isSafeInteger } from \"./guards.ts\";\nexport type { MessageResource, MessageResourceReceipt, MessageEvidence, ApplicationMessage, ApplicationInboxMessage } from \"./MessageResource.ts\";\nexport type { ApplicationStream, ApplicationStreamChannel } from \"./ApplicationStream.ts\";\nexport { lifecycleOfLoopStatus, selectSessionLoop, type LoopLifecycle } from \"./LoopLifecycle.ts\";\nexport { excerptOf } from \"./Excerpt.ts\";\nexport type { ProblemOptions, ProblemProjectionContext } from \"./Problems.ts\";\nexport type { ValidationResult } from \"./Validator.ts\";\nexport { default as PlurnkParseError } from \"./PlurnkParseError.ts\";\nexport { default as PathSyntax } from \"./PathSyntax.ts\";\nexport { default as TurnDisposition } from \"./TurnDisposition.ts\";\nexport { renderJsonResult } from \"./JsonResult.ts\";\nexport { formatJsonDocument } from \"./JsonDocument.ts\";\nexport type { JsonReplacer } from \"./JsonResult.ts\";\nexport {\n admitBearerRequest,\n admitBrowserOrigin,\n buildCorsHeaders,\n isLoopbackHost,\n parseScopedRoute,\n requestOrigin,\n resolvePublicOrigin,\n} from \"./HttpOrigin.ts\";\nexport type {\n BearerAdmission,\n BearerAdmissionOptions,\n BrowserOriginAdmission,\n BrowserOriginOptions,\n CorsHeaderOptions,\n RequestHeaders,\n ScopedRouteOptions,\n ScopedRouteParseResult,\n} from \"./HttpOrigin.ts\";\nexport {\n actorsMatch,\n extractActor,\n isDefaultExteriorActor,\n parseExteriorActor,\n type ExteriorActor,\n type ExteriorActorScheme,\n} from \"./ActorIdentity.ts\";\nexport {\n LOG_ENTRY_KINDS,\n addressOf,\n isLogEntryKind,\n toolKindOf,\n type LogAddressColumns,\n type LogEntryKind,\n type ProposalToolKind,\n} from \"./LogRow.ts\";\nexport {\n APPLICATION_RUNTIME_STREAM_EVENTS,\n DAEMON_NOTIFICATION_EVENTS,\n isApplicationRuntimeStreamEvent,\n isDaemonNotificationEvent,\n isRuntimeTelemetryNotice,\n matchesNotificationFilter,\n toDaemonNotification,\n type ApplicationNotificationContract,\n type ApplicationRuntimeStreamEvent,\n type ApplicationRuntimeStreamHandler,\n type ApplicationRuntimeStreamPayloadMap,\n type DaemonNotification,\n type DaemonNotificationEvent,\n type DaemonNotificationPayloadMap,\n type FunctionalityChangedNotification,\n type LogEntryNotification,\n type LoopGateSettledNotification,\n type LoopInteractionNotification,\n type LoopPacketNotification,\n type LoopParkedNotification,\n type LoopStartedNotification,\n type NoticeEventNotification,\n type NotificationFilter,\n type NotificationReplayResult,\n type NotificationsResyncPayload,\n type ProposalNotification,\n type ReasoningEventNotification,\n type SessionArchivedNotification,\n type SessionCreatedNotification,\n type SessionDeletedNotification,\n type SessionPolicyNotification,\n type SessionTitledNotification,\n type StreamConcludedNotification,\n type StreamEventNotification,\n type TerminatedNotification,\n type WorkspaceArchivedNotification,\n type WorkspaceCreatedNotification,\n type WorkspacePreparationNotification,\n type WorkspaceRenamedNotification,\n} from \"./ApplicationNotifications.ts\";\n// {§whitespace-contract} The application port is Node-bound and is its own entry, `@plurnk/plurnk-contracts/port`.\nexport {\n expandLearnCommand,\n formatFamilyResult,\n formatFamilyRows,\n formatServiceUpdateReport,\n parseFamilyCommand,\n} from \"./Application.ts\";\nexport {\n SCHEDULE_ADD_FLAGS,\n SCHEDULE_USAGE,\n extractScheduleProblem,\n formatScheduleInspect,\n formatScheduleStepReceipts,\n tokenizeSlashArgs,\n type ScheduleRunResult,\n type ScheduleStatus,\n type ScheduledStepReceipt,\n type ScheduledToolCall,\n} from \"./ScheduleCommand.ts\";\nexport {\n FAMILY_SUBCOMMANDS_BY_FAMILY,\n INTERACTIVE_COMMANDS,\n buildPromptBlocks,\n classifyComposerInput,\n completeInteractiveCommand,\n longestCommonPrefix,\n} from \"./InteractiveCommands.ts\";\nexport {\n SingleFlightRefresh,\n buildAuthorizationServerMetadataUrls,\n discoverAuthorizationServerMetadata,\n discoverProtectedResourceMetadata,\n generatePkcePair,\n isAllowedOAuthUrl,\n parseJwtExpiresAt,\n parseWwwAuthenticateResourceMetadata,\n resolveTokenExpiresAt,\n type AuthorizationServerMetadata,\n type PkcePair,\n type ProtectedResourceMetadata,\n} from \"./OAuthClient.ts\";\nexport {\n flattenConfigSelectOptions,\n formatProblemSummary,\n parseSessionConfigOptions,\n projectSessionStatus,\n rankModelChoices,\n summarizeOperation,\n type FlatConfigSelectOption,\n type ModelChoiceCandidate,\n type OperationSummary,\n type ParsedConfigOption,\n type ParsedSessionConfigOptions,\n type ProjectedSessionStatus,\n type SessionPhase,\n type SessionStatusInput,\n} from \"./SessionProjection.ts\";\nexport type * from \"./InteractiveCommands.ts\";\nexport type * from \"./Application.ts\";\nexport type * from \"./Functionality.ts\";\n\nexport { PLURNK_OPS, PROPOSAL_POLICIES, RUNTIME_TAG, INTERNAL_ROW_OPS, isExecution, isExecutionOp, isPlurnkOp, writtenOp, EFFORTS, SESSION_NAME, SKILL_NAME, UNKNOWN_POSITION, MAX_TIMER_MS } from \"./types.ts\";\nexport { MCP_WIRE_TOOL, type McpWireToolDefinition } from \"./McpWireTool.ts\";\nexport type * from \"./types.ts\";\nexport type { ErrorSource, Severity } from \"./PlurnkParseError.ts\";\n"]}
@@ -137,6 +137,20 @@ export type DaemonNotificationEnvelope = ({
137
137
  workspaceId: (number | null);
138
138
  sessionId: (number | null);
139
139
  data: SessionPolicy;
140
+ } | {
141
+ id: number;
142
+ event: "loop/started";
143
+ timestamp: number;
144
+ workspaceId: (number | null);
145
+ sessionId: (number | null);
146
+ data: LoopStarted;
147
+ } | {
148
+ id: number;
149
+ event: "loop/parked";
150
+ timestamp: number;
151
+ workspaceId: (number | null);
152
+ sessionId: (number | null);
153
+ data: LoopParked;
140
154
  } | {
141
155
  id: number;
142
156
  event: "loop/proposal";
@@ -266,7 +280,7 @@ export interface WorkspaceRenamed {
266
280
  }
267
281
  export interface WorkspaceArchived {
268
282
  id: number;
269
- archived_at: (string | null);
283
+ archivedAt: (string | null);
270
284
  }
271
285
  export interface FunctionalityChanged {
272
286
  workspaceId: number;
@@ -288,7 +302,7 @@ export interface SessionCreated {
288
302
  }
289
303
  export interface SessionArchived {
290
304
  id: number;
291
- archived_at: (string | null);
305
+ archivedAt: (string | null);
292
306
  sessionIds: number[];
293
307
  }
294
308
  export interface SessionDeleted {
@@ -302,7 +316,7 @@ export interface SessionTitled {
302
316
  export interface SessionPolicy {
303
317
  sessionId: number;
304
318
  model: (ModelRoute | null);
305
- spawnModel: (ModelRoute | null);
319
+ childModel: (ModelRoute | null);
306
320
  persona?: (string | null);
307
321
  }
308
322
  /**
@@ -318,6 +332,17 @@ export interface ModelRoute {
318
332
  */
319
333
  effortSource?: ("default" | "explicit");
320
334
  }
335
+ export interface LoopStarted {
336
+ sessionId: number;
337
+ loopId: number;
338
+ loopSeq: number;
339
+ }
340
+ export interface LoopParked {
341
+ sessionId: number;
342
+ loopId: number;
343
+ loopSeq: number;
344
+ status: 202;
345
+ }
321
346
  /**
322
347
  * The runtime-neutral client-interface projection of one durable stopped-world proposal. Live delivery and reconnect discovery expose this same shape.
323
348
  */
@@ -488,12 +513,12 @@ export interface MonetaryAmount {
488
513
  export interface LogEntry {
489
514
  entry: {
490
515
  id: number;
491
- session_id: number;
492
- session_name: string;
493
- loop_id: number;
494
- loop_seq: number;
495
- turn_id: number;
496
- turn_seq: number;
516
+ sessionId: number;
517
+ sessionName: string;
518
+ loopId: number;
519
+ loopSeq: number;
520
+ turnId: number;
521
+ turnSeq: number;
497
522
  sequence: number;
498
523
  at: string;
499
524
  origin: string;
@@ -510,19 +535,19 @@ export interface LogEntry {
510
535
  signal: unknown;
511
536
  lineMarker: unknown;
512
537
  tx: unknown;
513
- mimetype_tx: string;
538
+ mimetypeTx: string;
514
539
  rx: unknown;
515
- mimetype_rx: string;
516
- status_rx: number;
540
+ mimetypeRx: string;
541
+ statusRx: number;
517
542
  weight: number;
518
543
  attrs: unknown;
519
544
  state: ("proposed" | "resolved" | "failed" | "cancelled");
520
545
  reasoning?: string;
521
- reasoning_model_call_id?: number;
522
- reasoning_request_sequence?: number;
546
+ reasoningModelCallId?: number;
547
+ reasoningRequestSequence?: number;
523
548
  invocation?: string;
524
549
  answering?: string;
525
- replied_to_sources?: string[];
550
+ repliedToSources?: string[];
526
551
  };
527
552
  }
528
553
  export interface StreamConcluded {
@@ -534,8 +559,8 @@ export interface StreamConcluded {
534
559
  scheme: string;
535
560
  summary: string;
536
561
  wakeAction: string;
537
- loop_seq?: number;
538
- turn_seq?: number;
562
+ loopSeq?: number;
563
+ turnSeq?: number;
539
564
  sequence?: number;
540
565
  }
541
566
  export interface NoticeEvent {
@@ -630,6 +655,10 @@ export interface FunctionalityCandidate {
630
655
  */
631
656
  alias?: string;
632
657
  summary?: string;
658
+ /**
659
+ * Optional family-owned structured presentation facts (for example a members preview's match counts and sample paths). Never credentials, never authority.
660
+ */
661
+ detail?: {};
633
662
  /**
634
663
  * The exact family definition, conforming to the family's definition schema.
635
664
  */
@@ -683,17 +712,46 @@ export interface FunctionalityDiscoverQuery {
683
712
  * Caller-supplied configuration material the family interprets as candidates (a client's own PLURNK_SCHEDULE_* environment, a local directory list). It contributes candidates with client-configuration provenance; it never becomes durable authority.
684
713
  */
685
714
  configuration?: {};
715
+ /**
716
+ * Opaque continuation cursor returned by a previous discover page.
717
+ */
718
+ cursor?: string;
719
+ /**
720
+ * Maximum number of candidates or preview items to return on one page.
721
+ */
722
+ limit?: number;
686
723
  }
687
724
  export interface FunctionalityDiscoverResult {
688
725
  family: string;
689
726
  candidates: FunctionalityCandidate[];
727
+ total?: number;
728
+ nextCursor?: string;
690
729
  }
691
730
  /**
692
731
  * One inert discovery result: an exact family definition with its provenance. Discovery never installs, persists, enables, or executes it.
693
732
  */
733
+ export interface FunctionalityListQuery {
734
+ /**
735
+ * Case-insensitive substring filter over alias, provenance, and non-secret definition metadata.
736
+ */
737
+ query?: string;
738
+ /**
739
+ * Filter by current preparation or enablement state.
740
+ */
741
+ state?: ("disabled" | "dormant" | "active" | "unavailable" | "authorization-required");
742
+ /**
743
+ * Filter by definition ownership.
744
+ */
745
+ origin?: ("service" | "workspace" | "session");
746
+ offset?: number;
747
+ limit?: number;
748
+ }
694
749
  export interface FunctionalityListResult {
695
750
  family: string;
696
751
  definitions: FunctionalityDefinitionState[];
752
+ offset: number;
753
+ total: number;
754
+ nextOffset?: number;
697
755
  }
698
756
  /**
699
757
  * The winning configuration input, when supplied by a source reader. Independent of origin and readiness; absent for locally owned definitions or host-provided resources without a configuration input.
@@ -919,6 +977,10 @@ export interface ModelCatalogPage {
919
977
  offset: number;
920
978
  total: number;
921
979
  nextOffset?: number;
980
+ /**
981
+ * Sorted unique provider ids available in this availability-scoped catalog.
982
+ */
983
+ providers?: string[];
922
984
  }
923
985
  export interface ModelCatalogEntry {
924
986
  selector: string;
@@ -1119,6 +1181,7 @@ export interface SendStatement {
1119
1181
  target: PathOrNull;
1120
1182
  lineMarker: null;
1121
1183
  body: SendBodyOrNull;
1184
+ actor?: (string | null);
1122
1185
  position: Position;
1123
1186
  }
1124
1187
  /**
@@ -1158,6 +1221,10 @@ export interface ExecStatement {
1158
1221
  aside: AsideOrNull;
1159
1222
  target: PathOrNull;
1160
1223
  cwd?: (string | null);
1224
+ /**
1225
+ * Optional per-invocation environment variables (`{ [name: string]: string }`).
1226
+ */
1227
+ env?: Readonly<Record<string, string>>;
1161
1228
  lineMarker: LineMarkerOrNull;
1162
1229
  body: (string | null);
1163
1230
  position: Position;
@@ -1209,10 +1276,7 @@ export interface KillStatement {
1209
1276
  * The selection matcher lifted from the `pattern` option ({§parse-recovery}); null when omitted.
1210
1277
  */
1211
1278
  matcher: (MatcherBody | null);
1212
- /**
1213
- * A `log:///` `kill` carries its optional distillation, kept as the model's own `note` row ({§log-kill-scope}). Other `kill` statements take no body; their matcher rides on the `pattern` option ({§parse-recovery}).
1214
- */
1215
- body: (string | null);
1279
+ body: null;
1216
1280
  position: Position;
1217
1281
  }
1218
1282
  export interface DispositionStatement {