@ahpd/server 0.1.0 → 0.3.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 (170) hide show
  1. package/README.md +88 -81
  2. package/dist/config.d.ts +72 -0
  3. package/dist/config.js +75 -0
  4. package/dist/daemon.d.ts +31 -0
  5. package/dist/daemon.js +162 -0
  6. package/dist/main.d.ts +2 -0
  7. package/dist/main.js +335 -0
  8. package/dist/pty.d.ts +12 -0
  9. package/dist/pty.js +56 -0
  10. package/package.json +15 -25
  11. package/dist/automations.d.ts +0 -4
  12. package/dist/automations.d.ts.map +0 -1
  13. package/dist/automations.js +0 -191
  14. package/dist/automations.js.map +0 -1
  15. package/dist/catalog.d.ts +0 -48
  16. package/dist/catalog.d.ts.map +0 -1
  17. package/dist/catalog.js +0 -51
  18. package/dist/catalog.js.map +0 -1
  19. package/dist/changes.d.ts +0 -4
  20. package/dist/changes.d.ts.map +0 -1
  21. package/dist/changes.js +0 -601
  22. package/dist/changes.js.map +0 -1
  23. package/dist/cron.d.ts +0 -43
  24. package/dist/cron.d.ts.map +0 -1
  25. package/dist/cron.js +0 -211
  26. package/dist/cron.js.map +0 -1
  27. package/dist/git.d.ts +0 -16
  28. package/dist/git.d.ts.map +0 -1
  29. package/dist/git.js +0 -126
  30. package/dist/git.js.map +0 -1
  31. package/dist/host.d.ts +0 -24
  32. package/dist/host.d.ts.map +0 -1
  33. package/dist/host.js +0 -5850
  34. package/dist/host.js.map +0 -1
  35. package/dist/index.d.ts +0 -36
  36. package/dist/index.d.ts.map +0 -1
  37. package/dist/index.js +0 -34
  38. package/dist/index.js.map +0 -1
  39. package/dist/listen.d.ts +0 -3
  40. package/dist/listen.d.ts.map +0 -1
  41. package/dist/listen.js +0 -183
  42. package/dist/listen.js.map +0 -1
  43. package/dist/paging.d.ts +0 -38
  44. package/dist/paging.d.ts.map +0 -1
  45. package/dist/paging.js +0 -53
  46. package/dist/paging.js.map +0 -1
  47. package/dist/paths.d.ts +0 -15
  48. package/dist/paths.d.ts.map +0 -1
  49. package/dist/paths.js +0 -19
  50. package/dist/paths.js.map +0 -1
  51. package/dist/resources.d.ts +0 -122
  52. package/dist/resources.d.ts.map +0 -1
  53. package/dist/resources.js +0 -494
  54. package/dist/resources.js.map +0 -1
  55. package/dist/rpc.d.ts +0 -63
  56. package/dist/rpc.d.ts.map +0 -1
  57. package/dist/rpc.js +0 -208
  58. package/dist/rpc.js.map +0 -1
  59. package/dist/scheduled.d.ts +0 -48
  60. package/dist/scheduled.d.ts.map +0 -1
  61. package/dist/scheduled.js +0 -325
  62. package/dist/scheduled.js.map +0 -1
  63. package/dist/terminals.d.ts +0 -29
  64. package/dist/terminals.d.ts.map +0 -1
  65. package/dist/terminals.js +0 -346
  66. package/dist/terminals.js.map +0 -1
  67. package/dist/tools.d.ts +0 -18
  68. package/dist/tools.d.ts.map +0 -1
  69. package/dist/tools.js +0 -65
  70. package/dist/tools.js.map +0 -1
  71. package/dist/types/agent.d.ts +0 -245
  72. package/dist/types/agent.d.ts.map +0 -1
  73. package/dist/types/agent.js +0 -3
  74. package/dist/types/agent.js.map +0 -1
  75. package/dist/types/automations.d.ts +0 -164
  76. package/dist/types/automations.d.ts.map +0 -1
  77. package/dist/types/automations.js +0 -3
  78. package/dist/types/automations.js.map +0 -1
  79. package/dist/types/catalog.d.ts +0 -30
  80. package/dist/types/catalog.d.ts.map +0 -1
  81. package/dist/types/catalog.js +0 -3
  82. package/dist/types/catalog.js.map +0 -1
  83. package/dist/types/changes.d.ts +0 -272
  84. package/dist/types/changes.d.ts.map +0 -1
  85. package/dist/types/changes.js +0 -3
  86. package/dist/types/changes.js.map +0 -1
  87. package/dist/types/common.d.ts +0 -9
  88. package/dist/types/common.d.ts.map +0 -1
  89. package/dist/types/common.js +0 -3
  90. package/dist/types/common.js.map +0 -1
  91. package/dist/types/host.d.ts +0 -372
  92. package/dist/types/host.d.ts.map +0 -1
  93. package/dist/types/host.js +0 -3
  94. package/dist/types/host.js.map +0 -1
  95. package/dist/types/index.d.ts +0 -20
  96. package/dist/types/index.d.ts.map +0 -1
  97. package/dist/types/index.js +0 -8
  98. package/dist/types/index.js.map +0 -1
  99. package/dist/types/listen.d.ts +0 -48
  100. package/dist/types/listen.d.ts.map +0 -1
  101. package/dist/types/listen.js +0 -3
  102. package/dist/types/listen.js.map +0 -1
  103. package/dist/types/paging.d.ts +0 -10
  104. package/dist/types/paging.d.ts.map +0 -1
  105. package/dist/types/paging.js +0 -3
  106. package/dist/types/paging.js.map +0 -1
  107. package/dist/types/probe.d.ts +0 -46
  108. package/dist/types/probe.d.ts.map +0 -1
  109. package/dist/types/probe.js +0 -3
  110. package/dist/types/probe.js.map +0 -1
  111. package/dist/types/resources.d.ts +0 -83
  112. package/dist/types/resources.d.ts.map +0 -1
  113. package/dist/types/resources.js +0 -3
  114. package/dist/types/resources.js.map +0 -1
  115. package/dist/types/rpc.d.ts +0 -65
  116. package/dist/types/rpc.d.ts.map +0 -1
  117. package/dist/types/rpc.js +0 -3
  118. package/dist/types/rpc.js.map +0 -1
  119. package/dist/types/session.d.ts +0 -395
  120. package/dist/types/session.d.ts.map +0 -1
  121. package/dist/types/session.js +0 -3
  122. package/dist/types/session.js.map +0 -1
  123. package/dist/types/terminals.d.ts +0 -131
  124. package/dist/types/terminals.d.ts.map +0 -1
  125. package/dist/types/terminals.js +0 -3
  126. package/dist/types/terminals.js.map +0 -1
  127. package/dist/types/wire.d.ts +0 -62
  128. package/dist/types/wire.d.ts.map +0 -1
  129. package/dist/types/wire.js +0 -13
  130. package/dist/types/wire.js.map +0 -1
  131. package/dist/types/worktrees.d.ts +0 -86
  132. package/dist/types/worktrees.d.ts.map +0 -1
  133. package/dist/types/worktrees.js +0 -3
  134. package/dist/types/worktrees.js.map +0 -1
  135. package/dist/worktrees.d.ts +0 -27
  136. package/dist/worktrees.d.ts.map +0 -1
  137. package/dist/worktrees.js +0 -152
  138. package/dist/worktrees.js.map +0 -1
  139. package/src/automations.ts +0 -204
  140. package/src/catalog.ts +0 -53
  141. package/src/changes.ts +0 -629
  142. package/src/cron.ts +0 -251
  143. package/src/git.ts +0 -132
  144. package/src/host.ts +0 -5947
  145. package/src/index.ts +0 -40
  146. package/src/listen.ts +0 -240
  147. package/src/paging.ts +0 -56
  148. package/src/paths.ts +0 -19
  149. package/src/resources.ts +0 -513
  150. package/src/rpc.ts +0 -222
  151. package/src/scheduled.ts +0 -369
  152. package/src/terminals.ts +0 -353
  153. package/src/tools.ts +0 -64
  154. package/src/types/agent.ts +0 -255
  155. package/src/types/automations.ts +0 -164
  156. package/src/types/catalog.ts +0 -26
  157. package/src/types/changes.ts +0 -266
  158. package/src/types/common.ts +0 -9
  159. package/src/types/host.ts +0 -386
  160. package/src/types/index.ts +0 -27
  161. package/src/types/listen.ts +0 -53
  162. package/src/types/paging.ts +0 -11
  163. package/src/types/probe.ts +0 -42
  164. package/src/types/resources.ts +0 -107
  165. package/src/types/rpc.ts +0 -68
  166. package/src/types/session.ts +0 -415
  167. package/src/types/terminals.ts +0 -133
  168. package/src/types/wire.ts +0 -69
  169. package/src/types/worktrees.ts +0 -91
  170. package/src/worktrees.ts +0 -162
@@ -1 +0,0 @@
1
- {"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/types/host.ts"],"names":[],"mappings":"AAAA,iEAAiE;AAEjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC1H,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAA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O,EAAE,OAAO,CAAC;IACjB;;;;;;;OAOG;IACH,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;CACnC"}
@@ -1,3 +0,0 @@
1
- /** The protocol server: channels, subscriptions and requests. */
2
- export {};
3
- //# sourceMappingURL=host.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"host.js","sourceRoot":"","sources":["../../src/types/host.ts"],"names":[],"mappings":"AAAA,iEAAiE"}
@@ -1,20 +0,0 @@
1
- /**
2
- * Every shape this daemon speaks.
3
- *
4
- * Nothing under `types/` imports a runtime value, so the contract can be read
5
- * without loading the server, a socket or the agent SDK.
6
- */
7
- export type { Bag } from './common.js';
8
- export type { OnWire, WireTurn } from './wire.js';
9
- export type { Request, Wire, Peer, Handler } from './rpc.js';
10
- export type { Summary } from './catalog.js';
11
- export type { Emit, SessionOptions, Session, Ran, Chosen } from './session.js';
12
- export type { HostOptions, Connection, Host } from './host.js';
13
- export type { Page } from './paging.js';
14
- export type { Connected, OnConnect, Runtime, Listener } from './listen.js';
15
- export type { Offered } from './probe.js';
16
- export type { Agent, Listed, Start, BoundTool } from './agent.js';
17
- export type { Entry, Metadata, Read } from './resources.js';
18
- export type { Claim, Terminal, TerminalOptions, SpawnPty } from './terminals.js';
19
- export type { Worktree, Worktrees } from './worktrees.js';
20
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAQvC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAClD,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAC7D,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC/E,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC/D,YAAY,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC3E,YAAY,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAClE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC5D,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACjF,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Every shape this daemon speaks.
3
- *
4
- * Nothing under `types/` imports a runtime value, so the contract can be read
5
- * without loading the server, a socket or the agent SDK.
6
- */
7
- export {};
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -1,48 +0,0 @@
1
- /** Accepting connections, on whichever JavaScript runtime is running. */
2
- import type { Peer, Request } from './rpc.js';
3
- /** One accepted client, for as long as its connection lasts. */
4
- export interface Connected {
5
- /** Answer one request from this client. */
6
- handle(request: Request): Promise<unknown>;
7
- /** Release what the connection held. Called once, when it drops. */
8
- close(): void;
9
- }
10
- /** Called per connection, to hand it to whatever will answer it. */
11
- export type OnConnect = (peer: Peer) => Connected;
12
- /** The runtimes a listener can be running on. */
13
- export type Runtime = 'node' | 'bun' | 'deno';
14
- /** A running server. */
15
- export interface Listener {
16
- /** Which runtime was detected. */
17
- readonly runtime: Runtime;
18
- /** The address it bound. */
19
- readonly host: string;
20
- /** The port it accepted. */
21
- readonly port: number;
22
- /** Whether a connection token is required. */
23
- readonly guarded: boolean;
24
- /** Stop accepting and drop open connections. */
25
- close(): void | Promise<void>;
26
- }
27
- /** Where to accept connections, and who may open one. */
28
- export interface ListenOptions {
29
- /** TCP port to bind. */
30
- port: number;
31
- /**
32
- * Address to bind.
33
- *
34
- * Loopback by default, which is the only address that needs no secret:
35
- * anything reaching it is already on this machine. `0.0.0.0` is every
36
- * interface, and is what a connection token is for.
37
- */
38
- host?: string;
39
- /**
40
- * A secret every connection must present, or nothing to accept any.
41
- *
42
- * Given as `?tkn=<token>` on the WebSocket URL or as an
43
- * `Authorization: Bearer <token>` header. Browsers cannot set headers on a
44
- * WebSocket, which is why the query string is the one that always works.
45
- */
46
- token?: string;
47
- }
48
- //# sourceMappingURL=listen.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"listen.d.ts","sourceRoot":"","sources":["../../src/types/listen.ts"],"names":[],"mappings":"AAAA,yEAAyE;AAEzE,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAE9C,gEAAgE;AAChE,MAAM,WAAW,SAAS;IACxB,2CAA2C;IAC3C,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3C,oEAAoE;IACpE,KAAK,IAAI,IAAI,CAAC;CACf;AAED,oEAAoE;AACpE,MAAM,MAAM,SAAS,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,SAAS,CAAC;AAElD,iDAAiD;AACjD,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;AAE9C,wBAAwB;AACxB,MAAM,WAAW,QAAQ;IACvB,kCAAkC;IAClC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,8CAA8C;IAC9C,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,gDAAgD;IAChD,KAAK,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED,yDAAyD;AACzD,MAAM,WAAW,aAAa;IAC5B,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
@@ -1,3 +0,0 @@
1
- /** Accepting connections, on whichever JavaScript runtime is running. */
2
- export {};
3
- //# sourceMappingURL=listen.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"listen.js","sourceRoot":"","sources":["../../src/types/listen.ts"],"names":[],"mappings":"AAAA,yEAAyE"}
@@ -1,10 +0,0 @@
1
- /** Serving a long list of turns a page at a time, walking backwards. */
2
- import type { Bag } from './common.js';
3
- /** One page of turns, newest page first, walking backwards. */
4
- export interface Page {
5
- /** The turns in this page, oldest first. */
6
- turns: Bag[];
7
- /** Cursor for the next older page. Absent when the page reaches the start. */
8
- turnsNextCursor?: string;
9
- }
10
- //# sourceMappingURL=paging.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"paging.d.ts","sourceRoot":"","sources":["../../src/types/paging.ts"],"names":[],"mappings":"AAAA,wEAAwE;AAExE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAEvC,+DAA+D;AAC/D,MAAM,WAAW,IAAI;IACnB,4CAA4C;IAC5C,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,8EAA8E;IAC9E,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B"}
@@ -1,3 +0,0 @@
1
- /** Serving a long list of turns a page at a time, walking backwards. */
2
- export {};
3
- //# sourceMappingURL=paging.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"paging.js","sourceRoot":"","sources":["../../src/types/paging.ts"],"names":[],"mappings":"AAAA,wEAAwE"}
@@ -1,46 +0,0 @@
1
- /** What the agent backend offers, read once before any session exists. */
2
- /** The harness-wide capabilities, used until a session reports its own. */
3
- export interface Offered {
4
- /**
5
- * Models a turn can run on.
6
- *
7
- * `id` is what the wire carries and `name` what a person reads.
8
- * `configSchema` is what the *model* can be told to do differently, as
9
- * `SessionModelInfo.configSchema`: a client draws it as a form beside the
10
- * model rather than as a session-wide control, which matters because
11
- * different models take different options. A model that takes none omits
12
- * it, and a client then draws no form for that one.
13
- */
14
- models: {
15
- id: string;
16
- name: string;
17
- configSchema?: Record<string, unknown>;
18
- }[];
19
- /**
20
- * Skills, commands, subagents and MCP servers the harness offers here.
21
- *
22
- * What a new session starts out reporting, so its info pane is answered at
23
- * once rather than several seconds later when its own agent replies.
24
- */
25
- customizations: Record<string, unknown>[];
26
- /**
27
- * Output styles this harness has, and the one in force.
28
- *
29
- * Optional because it is a real answer for a backend to have no such
30
- * notion: left out, no output-style control is drawn at all rather than an
31
- * empty picker being offered.
32
- */
33
- outputStyles?: string[];
34
- /** The style the harness starts on, when it has them. */
35
- outputStyle?: string;
36
- /** Commands available after a slash. */
37
- commands: {
38
- /** The command name, without its leading slash. */
39
- name: string;
40
- /** One line describing what it does. */
41
- description?: string;
42
- /** What its argument is, e.g. `<id>`, when it takes one. */
43
- argumentHint?: string;
44
- }[];
45
- }
46
- //# sourceMappingURL=probe.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"probe.d.ts","sourceRoot":"","sources":["../../src/types/probe.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAE1E,2EAA2E;AAC3E,MAAM,WAAW,OAAO;IACtB;;;;;;;;;OASG;IACH,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,EAAE,CAAC;IAC/E;;;;;OAKG;IACH,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAC1C;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,QAAQ,EAAE;QACR,mDAAmD;QACnD,IAAI,EAAE,MAAM,CAAC;QACb,wCAAwC;QACxC,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,4DAA4D;QAC5D,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,EAAE,CAAC;CACL"}
@@ -1,3 +0,0 @@
1
- /** What the agent backend offers, read once before any session exists. */
2
- export {};
3
- //# sourceMappingURL=probe.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"probe.js","sourceRoot":"","sources":["../../src/types/probe.ts"],"names":[],"mappings":"AAAA,0EAA0E"}
@@ -1,83 +0,0 @@
1
- /** The host's filesystem, as far as a client is allowed to see it. */
2
- import type { ContentEncoding, ResourceChangeType, ResourceType, ResourceWriteMode } from '@microsoft/agent-host-protocol';
3
- /** One entry in a directory listing. */
4
- export interface Entry {
5
- /** Base name, not a path. */
6
- name: string;
7
- /** Which of the two it is. A symlink is reported as what it points at. */
8
- type: Exclude<`${ResourceType}`, 'symlink'>;
9
- }
10
- /** What a path is, without opening it. */
11
- export interface Metadata {
12
- /** The canonical URI, after symlinks unless they were not followed. */
13
- uri: string;
14
- /** Resource kind. */
15
- type: `${ResourceType}`;
16
- /** Size in bytes. Omitted for directories. */
17
- size?: number;
18
- /** ISO 8601 last-modified time. */
19
- mtime: string;
20
- /** ISO 8601 creation time. */
21
- ctime: string;
22
- /**
23
- * A weak validator for the bytes, as `resourceWrite`'s `ifMatch` reads it.
24
- *
25
- * Derived from size and modification time rather than from a hash of the
26
- * content: it exists to catch a lost update, so it has to be cheap enough to
27
- * produce on every stat, and two writes a millisecond apart that leave the
28
- * file the same length are not the case anybody is guarding against.
29
- */
30
- etag?: string;
31
- }
32
- /**
33
- * Where `data` goes in the file, as `ResourceWriteMode` has it.
34
- *
35
- * All three read `position` differently, which is the part worth stating: two
36
- * of them are rooted at the start of the file and `append` is rooted at its
37
- * end, so `position: 5` means "five bytes in" for the first two and "five
38
- * bytes before EOF" for the third.
39
- */
40
- export type WriteMode = `${ResourceWriteMode}`;
41
- /** One write, with everything the protocol lets a client ask for. */
42
- export interface Write {
43
- /** The content, encoded as `encoding` says. */
44
- data: string;
45
- /** How to read `data`. Binary content MUST arrive base64. */
46
- encoding: `${ContentEncoding}`;
47
- /** How `data` is placed. `truncate` when the client says nothing. */
48
- mode?: WriteMode;
49
- /** The offset, read as `mode` says. Zero when the client says nothing. */
50
- position?: number;
51
- /** Refuse with `-32010` if the file is already there. */
52
- createOnly?: boolean;
53
- /** Refuse with `-32011` unless the file's current `etag` is this one. */
54
- ifMatch?: string;
55
- }
56
- /** One file's bytes, in whichever encoding was meaningful. */
57
- export interface Read {
58
- /** The content, encoded as `encoding` says. */
59
- data: string;
60
- /** How `data` is encoded. Reported rather than assumed. */
61
- encoding: `${ContentEncoding}`;
62
- /** Sniffed MIME type, where there is one worth reporting. */
63
- contentType?: string;
64
- }
65
- /** What happened to one path, in the protocol's three words. */
66
- export interface ResourceChange {
67
- uri: string;
68
- type: `${ResourceChangeType}`;
69
- }
70
- /** What a watch was asked to report. */
71
- export interface WatchOptions {
72
- /** Report descendants too. Without it, the path itself and its direct children. */
73
- recursive?: boolean;
74
- /** Globs, relative to the watched root, whose matches are not reported. */
75
- excludes?: string[];
76
- /** Globs the reported set is restricted to. Absent reports everything not excluded. */
77
- includes?: string[];
78
- }
79
- /** A watch, for as long as somebody wants it. */
80
- export interface Watcher {
81
- close(): void;
82
- }
83
- //# sourceMappingURL=resources.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resources.d.ts","sourceRo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,CAAC;IAC/B,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,gEAAgE;AAChE,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,GAAG,kBAAkB,EAAE,CAAC;CAC/B;AAED,wCAAwC;AACxC,MAAM,WAAW,YAAY;IAC3B,mFAAmF;IACnF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,uFAAuF;IACvF,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,iDAAiD;AACjD,MAAM,WAAW,OAAO;IACtB,KAAK,IAAI,IAAI,CAAC;CACf"}
@@ -1,3 +0,0 @@
1
- /** The host's filesystem, as far as a client is allowed to see it. */
2
- export {};
3
- //# sourceMappingURL=resources.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/types/resources.ts"],"names":[],"mappings":"AAAA,sEAAsE"}
@@ -1,65 +0,0 @@
1
- /** JSON-RPC 2.0 over a single connection. */
2
- /** One decoded JSON-RPC call: a method name and its parameters. */
3
- export interface Request {
4
- /** The JSON-RPC `method` field, e.g. `subscribe`. */
5
- readonly method: string;
6
- /** The `params` object, or an empty object when the call carried none. */
7
- readonly params: Record<string, unknown>;
8
- }
9
- /**
10
- * The bytes end of one connection.
11
- *
12
- * Implemented per runtime, since Node, Bun and Deno expose different socket
13
- * objects.
14
- */
15
- export interface Wire {
16
- /** Write one frame. */
17
- send(text: string): void;
18
- /** Close the connection. */
19
- close(): void;
20
- /** Whether a `send` would still reach the client. */
21
- isOpen(): boolean;
22
- }
23
- /**
24
- * The JSON-RPC end of one connection: messages rather than frames.
25
- *
26
- * Both directions. AHP is symmetrical - `ServerCommandMap` names ten methods
27
- * a host may call on a client, and a client publishes resources a host is
28
- * expected to be able to read - so a peer that could only answer was half a
29
- * connection.
30
- */
31
- export interface Peer {
32
- /** Send a complete JSON-RPC message. Dropped if the connection has closed. */
33
- send(message: Record<string, unknown>): void;
34
- /** Send a server-to-client notification, which carries no id and gets no reply. */
35
- notify(method: string, params: unknown): void;
36
- /**
37
- * Ask the client something, and wait for what it says.
38
- *
39
- * Rejects with an `RpcError` the client sent, an `RpcTimeout` when nothing
40
- * came back inside `timeoutMs`, or an `RpcClosed` when the connection went
41
- * away with the question still in flight. Three outcomes, three types: a
42
- * caller that has to tell "the client refused" from "the client is gone"
43
- * cannot do it by reading a message.
44
- */
45
- request(method: string, params: unknown, timeoutMs?: number): Promise<unknown>;
46
- /**
47
- * Take one JSON-RPC response off the wire and settle whatever asked for it.
48
- *
49
- * Called by `receive` for a message carrying `result` or `error` and no
50
- * `method`. An id nothing here asked about is dropped: a response is not a
51
- * request, and answering one is the violation this exists to stop.
52
- */
53
- answered(message: Record<string, unknown>): void;
54
- /** Close the connection, rejecting every question still unanswered. */
55
- close(): void;
56
- }
57
- /**
58
- * Answers one request.
59
- *
60
- * The resolved value becomes the JSON-RPC `result`. Throwing an `RpcError`
61
- * produces that error's code; any other throw becomes an internal error.
62
- * Returning nothing for a notification is correct - notifications get no reply.
63
- */
64
- export type Handler = (request: Request, peer: Peer) => Promise<unknown> | unknown;
65
- //# sourceMappingURL=rpc.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../src/types/rpc.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAE7C,mEAAmE;AACnE,MAAM,WAAW,OAAO;IACtB,qDAAqD;IACrD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,0EAA0E;IAC1E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC1C;AAED;;;;;GAKG;AACH,MAAM,WAAW,IAAI;IACnB,uBAAuB;IACvB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,4BAA4B;IAC5B,KAAK,IAAI,IAAI,CAAC;IACd,qDAAqD;IACrD,MAAM,IAAI,OAAO,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,IAAI;IACnB,8EAA8E;IAC9E,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC7C,mFAAmF;IACnF,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9C;;;;;;;;OAQG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/E;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACjD,uEAAuE;IACvE,KAAK,IAAI,IAAI,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC"}
package/dist/types/rpc.js DELETED
@@ -1,3 +0,0 @@
1
- /** JSON-RPC 2.0 over a single connection. */
2
- export {};
3
- //# sourceMappingURL=rpc.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rpc.js","sourceRoot":"","sources":["../../src/types/rpc.ts"],"names":[],"mappings":"AAAA,6CAA6C"}