@plurnk/plurnk-contracts 8.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 (97) hide show
  1. package/.env.defaults +1 -19
  2. package/README.md +5 -6
  3. package/SPEC.md +100 -65
  4. package/dist/schema/DaemonNotificationEnvelope.json +602 -0
  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/McpServerDefinition.json +1 -1
  11. package/dist/schema/ModelCatalogPage.json +9 -0
  12. package/dist/schema/PlurnkStatement.json +42 -2
  13. package/dist/schema/ProposalProjection.json +0 -4
  14. package/dist/schema/ProviderAccounting.json +3 -3
  15. package/dist/schema/ProviderCost.json +1 -1
  16. package/dist/schema/ProviderRequestAccounting.json +3 -3
  17. package/dist/schema/ProviderUsage.json +1 -1
  18. package/dist/src/ActorIdentity.d.ts +26 -0
  19. package/dist/src/ActorIdentity.d.ts.map +1 -0
  20. package/dist/src/ActorIdentity.js +179 -0
  21. package/dist/src/ActorIdentity.js.map +1 -0
  22. package/dist/src/Application.d.ts +58 -125
  23. package/dist/src/Application.d.ts.map +1 -1
  24. package/dist/src/Application.js +372 -80
  25. package/dist/src/Application.js.map +1 -1
  26. package/dist/src/ApplicationNotifications.d.ts +77 -24
  27. package/dist/src/ApplicationNotifications.d.ts.map +1 -1
  28. package/dist/src/ApplicationNotifications.js +45 -9
  29. package/dist/src/ApplicationNotifications.js.map +1 -1
  30. package/dist/src/ApplicationPort.d.ts +53 -13
  31. package/dist/src/ApplicationPort.d.ts.map +1 -1
  32. package/dist/src/ApplicationPort.js +1 -1
  33. package/dist/src/ApplicationPort.js.map +1 -1
  34. package/dist/src/ApplicationStream.d.ts +2 -2
  35. package/dist/src/ApplicationStream.d.ts.map +1 -1
  36. package/dist/src/ApplicationStream.js.map +1 -1
  37. package/dist/src/CollectionCommand.d.ts +33 -0
  38. package/dist/src/CollectionCommand.d.ts.map +1 -0
  39. package/dist/src/CollectionCommand.js +277 -0
  40. package/dist/src/CollectionCommand.js.map +1 -0
  41. package/dist/src/Functionality.d.ts +7 -2
  42. package/dist/src/Functionality.d.ts.map +1 -1
  43. package/dist/src/Functionality.js.map +1 -1
  44. package/dist/src/HttpOrigin.d.ts +79 -10
  45. package/dist/src/HttpOrigin.d.ts.map +1 -1
  46. package/dist/src/HttpOrigin.js +286 -44
  47. package/dist/src/HttpOrigin.js.map +1 -1
  48. package/dist/src/HttpPort.d.ts +35 -0
  49. package/dist/src/HttpPort.d.ts.map +1 -0
  50. package/dist/src/HttpPort.js +106 -0
  51. package/dist/src/HttpPort.js.map +1 -0
  52. package/dist/src/InteractiveCommands.d.ts +96 -0
  53. package/dist/src/InteractiveCommands.d.ts.map +1 -0
  54. package/dist/src/InteractiveCommands.js +409 -0
  55. package/dist/src/InteractiveCommands.js.map +1 -0
  56. package/dist/src/LogRow.d.ts +1 -1
  57. package/dist/src/LogRow.js +1 -1
  58. package/dist/src/LogRow.js.map +1 -1
  59. package/dist/src/McpWireTool.d.ts +27 -0
  60. package/dist/src/McpWireTool.d.ts.map +1 -0
  61. package/dist/src/McpWireTool.js +30 -0
  62. package/dist/src/McpWireTool.js.map +1 -0
  63. package/dist/src/OAuthClient.d.ts +64 -0
  64. package/dist/src/OAuthClient.d.ts.map +1 -0
  65. package/dist/src/OAuthClient.js +226 -0
  66. package/dist/src/OAuthClient.js.map +1 -0
  67. package/dist/src/ScheduleCommand.d.ts +60 -0
  68. package/dist/src/ScheduleCommand.d.ts.map +1 -0
  69. package/dist/src/ScheduleCommand.js +677 -0
  70. package/dist/src/ScheduleCommand.js.map +1 -0
  71. package/dist/src/SessionProjection.d.ts +91 -0
  72. package/dist/src/SessionProjection.d.ts.map +1 -0
  73. package/dist/src/SessionProjection.js +223 -0
  74. package/dist/src/SessionProjection.js.map +1 -0
  75. package/dist/src/Validator.d.ts +4 -3
  76. package/dist/src/Validator.d.ts.map +1 -1
  77. package/dist/src/Validator.js +27 -17
  78. package/dist/src/Validator.js.map +1 -1
  79. package/dist/src/index.d.ts +11 -5
  80. package/dist/src/index.d.ts.map +1 -1
  81. package/dist/src/index.js +9 -4
  82. package/dist/src/index.js.map +1 -1
  83. package/dist/src/types.generated.d.ts +814 -566
  84. package/dist/src/types.generated.d.ts.map +1 -1
  85. package/dist/src/types.generated.js.map +1 -1
  86. package/dist/src/types.js +1 -1
  87. package/dist/src/types.js.map +1 -1
  88. package/package.json +3 -2
  89. package/dist/schema/ApplicationOperationEvent.json +0 -27
  90. package/dist/schema/CapabilityDescriptor.json +0 -28
  91. package/dist/schema/CapabilityPolicy.json +0 -22
  92. package/dist/schema/CapabilityProjection.json +0 -14
  93. package/dist/schema/CapabilitySelector.json +0 -29
  94. package/dist/src/CapabilityAdmission.d.ts +0 -11
  95. package/dist/src/CapabilityAdmission.d.ts.map +0 -1
  96. package/dist/src/CapabilityAdmission.js +0 -108
  97. package/dist/src/CapabilityAdmission.js.map +0 -1
@@ -0,0 +1,60 @@
1
+ import type { ProblemDetails } from "./types.generated.ts";
2
+ export type ScheduleStatus = "open" | "done" | "fail";
3
+ export interface ScheduledToolCall {
4
+ readonly server: string;
5
+ readonly tool: string;
6
+ readonly arguments?: Readonly<Record<string, unknown>>;
7
+ readonly aside?: string;
8
+ }
9
+ export interface ScheduledStepReceipt {
10
+ readonly index: number;
11
+ readonly server: string;
12
+ readonly tool: string;
13
+ readonly status: number;
14
+ readonly uri?: string;
15
+ readonly preview?: string;
16
+ readonly problem?: ProblemDetails;
17
+ }
18
+ export interface ScheduleRunResult {
19
+ readonly alias: string;
20
+ readonly status: ScheduleStatus;
21
+ readonly loopId?: number | null;
22
+ readonly lastFiredAt?: string | null;
23
+ readonly doneAt?: string | null;
24
+ readonly results?: readonly ScheduledStepReceipt[];
25
+ }
26
+ export declare const SCHEDULE_USAGE = "usage: /schedule [list|show|inspect|discover|add|replace|run|done|reopen|enable|disable|remove] [options]\n\nsubcommands:\n list [query] [--state <s>] [--origin <o>] [--offset <n>] [--limit <n>]\n List or filter workspace schedules and macros (default).\n show <alias> | inspect <alias> Inspect one schedule or macro definition in full.\n discover [<rule>] [--cursor <c>] [--limit <n>]\n Show workspace clock or preview occurrences of <rule>.\n add <alias> <session> <rule> <prompt...> Add a prompt schedule (cron, RRULE, +duration, ISO, manual, or once).\n add <alias> [--manual|--once|--rule <r>] --target <session> [--persona <p>] [--catchup|--no-catchup] --prompt <text>\n add <alias> [--manual|--once|--rule <r>] --step <server>.<tool> ['<json>'] [--aside <label>] [--step ...]\n add <alias> [--manual|--once|--rule <r>] --run '<json-steps>'\n replace ... Replace an existing schedule or macro using any add form.\n run <alias> Execute a schedule or macro now and display step receipts.\n done <alias> | reopen <alias> Mark an obligation done or reopen it.\n enable <alias> | disable <alias> Enable or disable a schedule.\n remove <alias> Remove a workspace schedule.\n";
27
+ export declare const SCHEDULE_ADD_FLAGS: readonly {
28
+ readonly value: string;
29
+ readonly description: string;
30
+ }[];
31
+ /**
32
+ * {§acp-action-binding} Shell-style tokenizer for interactive slash-command arguments so quoted rules
33
+ * (`"0 9 * * 1-5"`) and JSON step payloads (`'{"text":"echo hi"}'`) stay intact.
34
+ */
35
+ export declare const tokenizeSlashArgs: (raw: string) => string[];
36
+ export interface ParsedScheduleFamilyCommand {
37
+ readonly scopePrefix: "workspace";
38
+ readonly sub: string;
39
+ readonly rest: readonly string[];
40
+ readonly actionName: string;
41
+ readonly params: Record<string, unknown>;
42
+ }
43
+ /**
44
+ * {§acp-action-binding} Canonical `schedule` subcommand parser shared by `parseFamilyCommand`, ACP, CLI, and Web.
45
+ */
46
+ export declare const parseScheduleFamilyArgs: (rawSub: string, rest: readonly string[]) => ParsedScheduleFamilyCommand;
47
+ /** {§acp-action-binding} Formats schedule definition rows for `list`, `add`, `replace`, `enable`, and `disable`. */
48
+ export declare const formatScheduleRows: (result: Readonly<Record<string, unknown>>) => string;
49
+ /** {§acp-action-binding} Formats a full single-alias schedule inspection view (`/schedule show|inspect <alias>`). */
50
+ export declare const formatScheduleInspect: (entry: Readonly<Record<string, unknown>>) => string;
51
+ /** {§acp-action-binding} Formats compact per-step macro receipts (`results[]`) for CLI, ACP, and Web. */
52
+ export declare const formatScheduleStepReceipts: (rawResults: unknown) => string[];
53
+ export declare const formatScheduleRunResult: (fallbackAlias: string, result: Readonly<Record<string, unknown>>) => string;
54
+ export declare const formatScheduleStatusResult: (fallbackAlias: string, result: Readonly<Record<string, unknown>>) => string;
55
+ /**
56
+ * {§client-schedule-command} Extracts a structured `ProblemDetails` from a schedule usage or RPC failure,
57
+ * attaching `recovery: "/schedule reopen <alias>"` on `409 already-done` conflicts when absent.
58
+ */
59
+ export declare const extractScheduleProblem: (error: unknown, fallbackAlias?: string) => ProblemDetails | null;
60
+ //# sourceMappingURL=ScheduleCommand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScheduleCommand.d.ts","sourceRoot":"","sources":["../../src/ScheduleCommand.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtD,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACvD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,oBAAoB;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB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