@ahpd/server 0.1.0 → 0.2.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.
- package/README.md +87 -81
- package/dist/config.d.ts +65 -0
- package/dist/config.js +75 -0
- package/dist/daemon.d.ts +26 -0
- package/dist/daemon.js +160 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +297 -0
- package/dist/pty.d.ts +12 -0
- package/dist/pty.js +56 -0
- package/package.json +15 -25
- package/dist/automations.d.ts +0 -4
- package/dist/automations.d.ts.map +0 -1
- package/dist/automations.js +0 -191
- package/dist/automations.js.map +0 -1
- package/dist/catalog.d.ts +0 -48
- package/dist/catalog.d.ts.map +0 -1
- package/dist/catalog.js +0 -51
- package/dist/catalog.js.map +0 -1
- package/dist/changes.d.ts +0 -4
- package/dist/changes.d.ts.map +0 -1
- package/dist/changes.js +0 -601
- package/dist/changes.js.map +0 -1
- package/dist/cron.d.ts +0 -43
- package/dist/cron.d.ts.map +0 -1
- package/dist/cron.js +0 -211
- package/dist/cron.js.map +0 -1
- package/dist/git.d.ts +0 -16
- package/dist/git.d.ts.map +0 -1
- package/dist/git.js +0 -126
- package/dist/git.js.map +0 -1
- package/dist/host.d.ts +0 -24
- package/dist/host.d.ts.map +0 -1
- package/dist/host.js +0 -5850
- package/dist/host.js.map +0 -1
- package/dist/index.d.ts +0 -36
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -34
- package/dist/index.js.map +0 -1
- package/dist/listen.d.ts +0 -3
- package/dist/listen.d.ts.map +0 -1
- package/dist/listen.js +0 -183
- package/dist/listen.js.map +0 -1
- package/dist/paging.d.ts +0 -38
- package/dist/paging.d.ts.map +0 -1
- package/dist/paging.js +0 -53
- package/dist/paging.js.map +0 -1
- package/dist/paths.d.ts +0 -15
- package/dist/paths.d.ts.map +0 -1
- package/dist/paths.js +0 -19
- package/dist/paths.js.map +0 -1
- package/dist/resources.d.ts +0 -122
- package/dist/resources.d.ts.map +0 -1
- package/dist/resources.js +0 -494
- package/dist/resources.js.map +0 -1
- package/dist/rpc.d.ts +0 -63
- package/dist/rpc.d.ts.map +0 -1
- package/dist/rpc.js +0 -208
- package/dist/rpc.js.map +0 -1
- package/dist/scheduled.d.ts +0 -48
- package/dist/scheduled.d.ts.map +0 -1
- package/dist/scheduled.js +0 -325
- package/dist/scheduled.js.map +0 -1
- package/dist/terminals.d.ts +0 -29
- package/dist/terminals.d.ts.map +0 -1
- package/dist/terminals.js +0 -346
- package/dist/terminals.js.map +0 -1
- package/dist/tools.d.ts +0 -18
- package/dist/tools.d.ts.map +0 -1
- package/dist/tools.js +0 -65
- package/dist/tools.js.map +0 -1
- package/dist/types/agent.d.ts +0 -245
- package/dist/types/agent.d.ts.map +0 -1
- package/dist/types/agent.js +0 -3
- package/dist/types/agent.js.map +0 -1
- package/dist/types/automations.d.ts +0 -164
- package/dist/types/automations.d.ts.map +0 -1
- package/dist/types/automations.js +0 -3
- package/dist/types/automations.js.map +0 -1
- package/dist/types/catalog.d.ts +0 -30
- package/dist/types/catalog.d.ts.map +0 -1
- package/dist/types/catalog.js +0 -3
- package/dist/types/catalog.js.map +0 -1
- package/dist/types/changes.d.ts +0 -272
- package/dist/types/changes.d.ts.map +0 -1
- package/dist/types/changes.js +0 -3
- package/dist/types/changes.js.map +0 -1
- package/dist/types/common.d.ts +0 -9
- package/dist/types/common.d.ts.map +0 -1
- package/dist/types/common.js +0 -3
- package/dist/types/common.js.map +0 -1
- package/dist/types/host.d.ts +0 -372
- package/dist/types/host.d.ts.map +0 -1
- package/dist/types/host.js +0 -3
- package/dist/types/host.js.map +0 -1
- package/dist/types/index.d.ts +0 -20
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -8
- package/dist/types/index.js.map +0 -1
- package/dist/types/listen.d.ts +0 -48
- package/dist/types/listen.d.ts.map +0 -1
- package/dist/types/listen.js +0 -3
- package/dist/types/listen.js.map +0 -1
- package/dist/types/paging.d.ts +0 -10
- package/dist/types/paging.d.ts.map +0 -1
- package/dist/types/paging.js +0 -3
- package/dist/types/paging.js.map +0 -1
- package/dist/types/probe.d.ts +0 -46
- package/dist/types/probe.d.ts.map +0 -1
- package/dist/types/probe.js +0 -3
- package/dist/types/probe.js.map +0 -1
- package/dist/types/resources.d.ts +0 -83
- package/dist/types/resources.d.ts.map +0 -1
- package/dist/types/resources.js +0 -3
- package/dist/types/resources.js.map +0 -1
- package/dist/types/rpc.d.ts +0 -65
- package/dist/types/rpc.d.ts.map +0 -1
- package/dist/types/rpc.js +0 -3
- package/dist/types/rpc.js.map +0 -1
- package/dist/types/session.d.ts +0 -395
- package/dist/types/session.d.ts.map +0 -1
- package/dist/types/session.js +0 -3
- package/dist/types/session.js.map +0 -1
- package/dist/types/terminals.d.ts +0 -131
- package/dist/types/terminals.d.ts.map +0 -1
- package/dist/types/terminals.js +0 -3
- package/dist/types/terminals.js.map +0 -1
- package/dist/types/wire.d.ts +0 -62
- package/dist/types/wire.d.ts.map +0 -1
- package/dist/types/wire.js +0 -13
- package/dist/types/wire.js.map +0 -1
- package/dist/types/worktrees.d.ts +0 -86
- package/dist/types/worktrees.d.ts.map +0 -1
- package/dist/types/worktrees.js +0 -3
- package/dist/types/worktrees.js.map +0 -1
- package/dist/worktrees.d.ts +0 -27
- package/dist/worktrees.d.ts.map +0 -1
- package/dist/worktrees.js +0 -152
- package/dist/worktrees.js.map +0 -1
- package/src/automations.ts +0 -204
- package/src/catalog.ts +0 -53
- package/src/changes.ts +0 -629
- package/src/cron.ts +0 -251
- package/src/git.ts +0 -132
- package/src/host.ts +0 -5947
- package/src/index.ts +0 -40
- package/src/listen.ts +0 -240
- package/src/paging.ts +0 -56
- package/src/paths.ts +0 -19
- package/src/resources.ts +0 -513
- package/src/rpc.ts +0 -222
- package/src/scheduled.ts +0 -369
- package/src/terminals.ts +0 -353
- package/src/tools.ts +0 -64
- package/src/types/agent.ts +0 -255
- package/src/types/automations.ts +0 -164
- package/src/types/catalog.ts +0 -26
- package/src/types/changes.ts +0 -266
- package/src/types/common.ts +0 -9
- package/src/types/host.ts +0 -386
- package/src/types/index.ts +0 -27
- package/src/types/listen.ts +0 -53
- package/src/types/paging.ts +0 -11
- package/src/types/probe.ts +0 -42
- package/src/types/resources.ts +0 -107
- package/src/types/rpc.ts +0 -68
- package/src/types/session.ts +0 -415
- package/src/types/terminals.ts +0 -133
- package/src/types/wire.ts +0 -69
- package/src/types/worktrees.ts +0 -91
- package/src/worktrees.ts +0 -162
package/dist/catalog.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* How a session is named, and what its status bits are worth.
|
|
3
|
-
*
|
|
4
|
-
* URIs and numbers, and nothing that knows what a session *is*: the listing
|
|
5
|
-
* itself belongs to whichever backend wrote the sessions down, because only
|
|
6
|
-
* that one can say which exist. See `catalogue` in `@ahpd/agent-claude`.
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* `SessionStatus`, as values.
|
|
10
|
-
*
|
|
11
|
-
* The protocol declares it as a `const enum`, which exists only in the type
|
|
12
|
-
* system - importing it at runtime is a value import of something that was
|
|
13
|
-
* erased. So the numbers are restated here, and they are the protocol's:
|
|
14
|
-
* `InputNeeded` is 24 and *carries* `InProgress` (8), which is why anything
|
|
15
|
-
* testing activity has to test it first.
|
|
16
|
-
*/
|
|
17
|
-
export declare const Status: {
|
|
18
|
-
readonly Idle: 1;
|
|
19
|
-
readonly Error: 2;
|
|
20
|
-
readonly InProgress: 8;
|
|
21
|
-
readonly InputNeeded: 24;
|
|
22
|
-
readonly IsRead: 32;
|
|
23
|
-
readonly IsArchived: 64;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* A URI for a session this host found on disk. `ahp-session:/<uuid>`, and the
|
|
27
|
-
* SDK's id is already a uuid.
|
|
28
|
-
*
|
|
29
|
-
* Only for rows this host names itself. A session a *client* created is named
|
|
30
|
-
* by that client, in whatever scheme it likes - see {@link idOf}.
|
|
31
|
-
*/
|
|
32
|
-
export declare const uriFor: (sessionId: string) => string;
|
|
33
|
-
/**
|
|
34
|
-
* The id inside a channel URI, whatever scheme the client chose.
|
|
35
|
-
*
|
|
36
|
-
* A channel URI is the **client's** to name and this host's to echo. VS Code
|
|
37
|
-
* names a session after its provider - `claude:/<uuid>`, with the provider as
|
|
38
|
-
* the *scheme* - and its terminals `agenthost-terminal:/<uuid>`. This used to
|
|
39
|
-
* strip a literal `ahp-session:/` and refuse anything else, so every session
|
|
40
|
-
* and every terminal VS Code opened was answered `is not a session URI`.
|
|
41
|
-
*
|
|
42
|
-
* So: everything after the scheme, without its leading slashes. The result is
|
|
43
|
-
* an opaque key, not something to parse further.
|
|
44
|
-
*/
|
|
45
|
-
export declare const idOf: (uri: string) => string;
|
|
46
|
-
/** The same, and the name it goes by where a session rather than a chat is meant. */
|
|
47
|
-
export declare const idFor: (uri: string) => string;
|
|
48
|
-
//# sourceMappingURL=catalog.d.ts.map
|
package/dist/catalog.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM;;;;;;;CAOT,CAAC;AAEX;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,GAAI,WAAW,MAAM,KAAG,MAAqC,CAAC;AAEjF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,IAAI,GAAI,KAAK,MAAM,KAAG,MAGlC,CAAC;AACF,qFAAqF;AACrF,eAAO,MAAM,KAAK,QALQ,MAAM,KAAG,MAKV,CAAC"}
|
package/dist/catalog.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* How a session is named, and what its status bits are worth.
|
|
3
|
-
*
|
|
4
|
-
* URIs and numbers, and nothing that knows what a session *is*: the listing
|
|
5
|
-
* itself belongs to whichever backend wrote the sessions down, because only
|
|
6
|
-
* that one can say which exist. See `catalogue` in `@ahpd/agent-claude`.
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* `SessionStatus`, as values.
|
|
10
|
-
*
|
|
11
|
-
* The protocol declares it as a `const enum`, which exists only in the type
|
|
12
|
-
* system - importing it at runtime is a value import of something that was
|
|
13
|
-
* erased. So the numbers are restated here, and they are the protocol's:
|
|
14
|
-
* `InputNeeded` is 24 and *carries* `InProgress` (8), which is why anything
|
|
15
|
-
* testing activity has to test it first.
|
|
16
|
-
*/
|
|
17
|
-
export const Status = {
|
|
18
|
-
Idle: 1,
|
|
19
|
-
Error: 2,
|
|
20
|
-
InProgress: 8,
|
|
21
|
-
InputNeeded: 24,
|
|
22
|
-
IsRead: 32,
|
|
23
|
-
IsArchived: 64,
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* A URI for a session this host found on disk. `ahp-session:/<uuid>`, and the
|
|
27
|
-
* SDK's id is already a uuid.
|
|
28
|
-
*
|
|
29
|
-
* Only for rows this host names itself. A session a *client* created is named
|
|
30
|
-
* by that client, in whatever scheme it likes - see {@link idOf}.
|
|
31
|
-
*/
|
|
32
|
-
export const uriFor = (sessionId) => `ahp-session:/${sessionId}`;
|
|
33
|
-
/**
|
|
34
|
-
* The id inside a channel URI, whatever scheme the client chose.
|
|
35
|
-
*
|
|
36
|
-
* A channel URI is the **client's** to name and this host's to echo. VS Code
|
|
37
|
-
* names a session after its provider - `claude:/<uuid>`, with the provider as
|
|
38
|
-
* the *scheme* - and its terminals `agenthost-terminal:/<uuid>`. This used to
|
|
39
|
-
* strip a literal `ahp-session:/` and refuse anything else, so every session
|
|
40
|
-
* and every terminal VS Code opened was answered `is not a session URI`.
|
|
41
|
-
*
|
|
42
|
-
* So: everything after the scheme, without its leading slashes. The result is
|
|
43
|
-
* an opaque key, not something to parse further.
|
|
44
|
-
*/
|
|
45
|
-
export const idOf = (uri) => {
|
|
46
|
-
const colon = uri.indexOf(':');
|
|
47
|
-
return (colon < 0 ? uri : uri.slice(colon + 1)).replace(/^\/+/, '');
|
|
48
|
-
};
|
|
49
|
-
/** The same, and the name it goes by where a session rather than a chat is meant. */
|
|
50
|
-
export const idFor = idOf;
|
|
51
|
-
//# sourceMappingURL=catalog.js.map
|
package/dist/catalog.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;IACR,UAAU,EAAE,CAAC;IACb,WAAW,EAAE,EAAE;IACf,MAAM,EAAE,EAAE;IACV,UAAU,EAAE,EAAE;CACN,CAAC;AAEX;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,SAAiB,EAAU,EAAE,CAAC,gBAAgB,SAAS,EAAE,CAAC;AAEjF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,GAAW,EAAU,EAAE;IAC1C,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC/B,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACtE,CAAC,CAAC;AACF,qFAAqF;AACrF,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC"}
|
package/dist/changes.d.ts
DELETED
package/dist/changes.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../src/changes.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAI5E,OAAO,KAAK,EACyC,eAAe,EACnE,MAAM,oBAAoB,CAAC;AAuJ5B,wBAAgB,UAAU,IAAI,eAAe,CAud5C"}
|