appduct 0.12.0 → 0.14.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 +43 -37
- package/dist/bin.js +102 -37
- package/dist/cli/command-options.d.ts +7 -17
- package/dist/cli/result-types.d.ts +19 -9
- package/dist/cli/routes/daemon/index.js +70 -17
- package/dist/cli/routes/daemon/run.js +288 -50
- package/dist/cli/routes/daemon/start.js +70 -17
- package/dist/cli/routes/daemon/status.js +70 -17
- package/dist/cli/routes/daemon/stop.js +70 -17
- package/dist/cli/routes/doctor.js +70 -17
- package/dist/cli/routes/events/index.d.ts +6 -0
- package/dist/cli/routes/events/index.js +900 -0
- package/dist/cli/routes/events/ls.d.ts +5 -0
- package/dist/cli/routes/events/ls.js +1798 -0
- package/dist/cli/routes/events/shared-options.d.ts +12 -0
- package/dist/cli/routes/events/shared-options.js +102 -0
- package/dist/cli/routes/events/since.d.ts +6 -0
- package/dist/cli/routes/events/since.js +2034 -0
- package/dist/cli/routes/events/tail.d.ts +6 -0
- package/dist/cli/routes/{events.js → events/tail.js} +235 -163
- package/dist/cli/routes/init.js +72 -19
- package/dist/cli/routes/keygen.js +70 -17
- package/dist/cli/routes/mcp.js +289 -166
- package/dist/cli/routes/sessions/index.d.ts +7 -0
- package/dist/cli/routes/sessions/index.js +900 -0
- package/dist/cli/routes/sessions/link.d.ts +4 -0
- package/dist/cli/routes/{link.js → sessions/link.js} +71 -18
- package/dist/cli/routes/sessions/ls.d.ts +4 -0
- package/dist/cli/routes/{ls.js → sessions/ls.js} +71 -18
- package/dist/cli/routes/sessions/revoke.d.ts +4 -0
- package/dist/cli/routes/{revoke.js → sessions/revoke.js} +72 -19
- package/dist/cli/routes/tools/call.d.ts +4 -0
- package/dist/cli/routes/{invoke.js → tools/call.js} +73 -20
- package/dist/cli/routes/tools/describe.d.ts +6 -0
- package/dist/cli/routes/tools/describe.js +1894 -0
- package/dist/cli/routes/tools/index.d.ts +6 -0
- package/dist/cli/routes/tools/index.js +900 -0
- package/dist/cli/routes/tools/ls.d.ts +4 -0
- package/dist/cli/routes/{tools.js → tools/ls.js} +98 -74
- package/dist/cli/routes/tools/shared-options.d.ts +16 -0
- package/dist/cli/routes/tools/shared-options.js +122 -0
- package/dist/client/app-client.d.ts +96 -37
- package/dist/client/index.d.ts +3 -2
- package/dist/client/index.js +178 -138
- package/dist/commands/events-ls.d.ts +21 -0
- package/dist/commands/events.d.ts +31 -14
- package/dist/commands/invoke.d.ts +1 -1
- package/dist/commands/link.d.ts +1 -1
- package/dist/commands/ls.d.ts +1 -1
- package/dist/commands/revoke.d.ts +1 -1
- package/dist/commands/tools.d.ts +12 -13
- package/dist/daemon/calls.d.ts +3 -1
- package/dist/daemon/config.d.ts +1 -1
- package/dist/daemon/event-bus.d.ts +42 -0
- package/dist/daemon/registry.d.ts +20 -12
- package/dist/daemon/rpc-errors.d.ts +4 -1
- package/dist/daemon/sessions.d.ts +4 -2
- package/dist/errors.d.ts +1 -1
- package/dist/events/index.d.ts +60 -0
- package/dist/index.js +114 -40
- package/dist/link.d.ts +1 -1
- package/dist/mcp/app-tools.d.ts +22 -2
- package/dist/mcp/connect-tool.d.ts +1 -1
- package/dist/mcp/events-tool.d.ts +67 -27
- package/dist/native-scheme.d.ts +1 -1
- package/dist/output.d.ts +29 -6
- package/dist/rpc/client.d.ts +1 -1
- package/dist/scheme.d.ts +4 -4
- package/package.json +2 -2
- package/dist/cli/routes/events.d.ts +0 -3
- package/dist/cli/routes/invoke.d.ts +0 -3
- package/dist/cli/routes/link.d.ts +0 -3
- package/dist/cli/routes/ls.d.ts +0 -3
- package/dist/cli/routes/revoke.d.ts +0 -3
- package/dist/cli/routes/tools.d.ts +0 -3
package/dist/output.d.ts
CHANGED
|
@@ -8,18 +8,41 @@ export type RenderOptions = {
|
|
|
8
8
|
* (which is only attached under `--verbose`). Defaults to the wall clock when omitted, matching
|
|
9
9
|
* the pre-`--verbose` fallback behavior for a caller that doesn't care (e.g. non-`ls` tests). */
|
|
10
10
|
now?: Date;
|
|
11
|
-
/** `link`-only: also render the deep link as terminal QR art (never affects `--json`
|
|
11
|
+
/** `sessions link`-only: also render the deep link as terminal QR art (never affects `--json`
|
|
12
|
+
* output). */
|
|
12
13
|
qr?: boolean;
|
|
13
|
-
/** `tools`-only: render full schemas/annotations for every listed tool, not just
|
|
14
|
+
/** `tools ls`-only: render full schemas/annotations for every listed tool, not just
|
|
15
|
+
* name+description. */
|
|
14
16
|
full?: boolean;
|
|
15
17
|
};
|
|
16
18
|
export declare const renderResult: (result: CliResult<unknown>, options: RenderOptions) => {
|
|
17
19
|
stdout?: string;
|
|
18
20
|
stderr?: string;
|
|
19
21
|
};
|
|
20
|
-
/** Renders one `appduct events` line: NDJSON under `--json`, a
|
|
22
|
+
/** Renders one `appduct events tail`/`appduct events since` line: NDJSON under `--json`, a
|
|
23
|
+
* compact human line otherwise. */
|
|
21
24
|
export declare const renderEventLine: (event: EventNotification, flags: GlobalFlags) => string;
|
|
22
|
-
/**
|
|
25
|
+
/** The filter flags to echo back into the hinted resume command in {@link renderEventsCursorLine}
|
|
26
|
+
* (issue #115's should-fix on #96's echoed selector): the same `--name`/`--payload-max-bytes`
|
|
27
|
+
* the caller passed to this pull, forwarded as-is so following the hint doesn't silently widen
|
|
28
|
+
* the query. */
|
|
29
|
+
export type EventsCursorLineFilters = {
|
|
30
|
+
name?: string;
|
|
31
|
+
payloadMaxBytes?: number;
|
|
32
|
+
};
|
|
33
|
+
/** Renders the trailing cursor line for `appduct events since` (issue #6): NDJSON under
|
|
23
34
|
* `--json` so a scripted caller can parse the resume point without maxing `seq` over the printed
|
|
24
|
-
* events (impossible when the response is empty), a human note otherwise.
|
|
25
|
-
|
|
35
|
+
* events (impossible when the response is empty), a human note otherwise. `selector` is the
|
|
36
|
+
* device/session selector the caller passed (issue #96): with two devices connected, a resume
|
|
37
|
+
* hint that dropped it would resolve to `ambiguous_session`, so it is echoed back in the hinted
|
|
38
|
+
* command when present. `dropped`/`remaining` (issue #115) are carried straight from
|
|
39
|
+
* `events.since`'s own result: how many events fell off the retention buffer before this pull,
|
|
40
|
+
* and how many matching events are still waiting beyond this page. `filters` (issue #115) are the
|
|
41
|
+
* `--name`/`--payload-max-bytes` flags this pull used: without them the hint would silently drop
|
|
42
|
+
* the query's filter and cap, so they are echoed into the hinted command exactly like the
|
|
43
|
+
* selector (`--name`'s glob is shell-quoted since it can carry `*` or spaces). */
|
|
44
|
+
export declare const renderEventsCursorLine: (cursor: {
|
|
45
|
+
cursor: number;
|
|
46
|
+
dropped: number;
|
|
47
|
+
remaining: number;
|
|
48
|
+
}, flags: GlobalFlags, selector?: string, filters?: EventsCursorLineFilters) => string;
|
package/dist/rpc/client.d.ts
CHANGED
|
@@ -123,7 +123,7 @@ export type DaemonStream = {
|
|
|
123
123
|
/** Subscribes to server→client `"event"` notifications; returns an unsubscribe function. */
|
|
124
124
|
onNotification: (callback: (payload: unknown) => void) => () => void;
|
|
125
125
|
/** Fires once when the underlying socket closes (daemon gone, stop(), etc.); returns an
|
|
126
|
-
* unsubscribe function. Lets long-lived stream consumers (e.g. `appduct events`) end
|
|
126
|
+
* unsubscribe function. Lets long-lived stream consumers (e.g. `appduct events tail`) end
|
|
127
127
|
* gracefully instead of hanging once the connection is no longer usable. */
|
|
128
128
|
onClose: (callback: () => void) => () => void;
|
|
129
129
|
close: () => void;
|
package/dist/scheme.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Deep-link scheme resolution (ARCHITECTURE.md §10, issue #29).
|
|
3
3
|
*
|
|
4
|
-
* A scheme is needed to compose `<scheme>:///?appduct=<payload>` in `appduct link`,
|
|
4
|
+
* A scheme is needed to compose `<scheme>:///?appduct=<payload>` in `appduct sessions link`,
|
|
5
5
|
* `appduct/client`'s `link()` and the MCP `appduct_connect` tool. Before this module the only
|
|
6
6
|
* source was `<state-dir>/config.json` — a single global file, which meant two apps with different
|
|
7
7
|
* schemes on one machine required hand-editing it on every switch.
|
|
@@ -126,7 +126,7 @@ export declare const globalConfigDirs: (options?: ProjectConfigLookupOptions) =>
|
|
|
126
126
|
* documented precedence:
|
|
127
127
|
*
|
|
128
128
|
* - `<homeDir>/.appduct`, the default state dir. Essentially every project lives somewhere under
|
|
129
|
-
* the home directory, so without this a plain `appduct link` in any repo would pick up the
|
|
129
|
+
* the home directory, so without this a plain `appduct sessions link` in any repo would pick up the
|
|
130
130
|
* global `config.json` as if it were the project's — and with `--state-dir` pointing elsewhere it
|
|
131
131
|
* would shadow the state dir the operator explicitly chose.
|
|
132
132
|
* - `stateDirRoot`, the state dir actually in use, for the same reason when it is not the default.
|
|
@@ -191,7 +191,7 @@ export type ResolveSchemeOptions = {
|
|
|
191
191
|
export declare const resolveScheme: (options?: ResolveSchemeOptions) => Promise<ResolvedScheme>;
|
|
192
192
|
/**
|
|
193
193
|
* The shared "no scheme anywhere" message. Every caller renders the same body so the locations
|
|
194
|
-
* listed (and the fixes suggested) can't drift between `appduct link`, `appduct mcp` and
|
|
194
|
+
* listed (and the fixes suggested) can't drift between `appduct sessions link`, `appduct mcp` and
|
|
195
195
|
* `appduct_connect`.
|
|
196
196
|
*/
|
|
197
197
|
export declare const describeMissingScheme: (tried: string[]) => string;
|
|
@@ -210,7 +210,7 @@ export type ResolveAppIdOptions = {
|
|
|
210
210
|
/** Which `appId.<platform>` key to read from a project config; see `cli/open-target.ts`'s
|
|
211
211
|
* `platformOf`. */
|
|
212
212
|
platform: AppIdPlatform;
|
|
213
|
-
/** `--app-id` (CLI `link`) / `appId` (MCP `appduct_connect`) / `appId` (`mintLink`, the
|
|
213
|
+
/** `--app-id` (CLI `sessions link`) / `appId` (MCP `appduct_connect`) / `appId` (`mintLink`, the
|
|
214
214
|
* `appduct/client` `link()`) — highest precedence, because the target is known at the call
|
|
215
215
|
* site. */
|
|
216
216
|
flagAppId?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appduct",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Driving React Native tools without in-app debug UI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"reflect-metadata": "^0.2.2",
|
|
46
46
|
"toqr": "^0.1.1",
|
|
47
47
|
"ws": "^8.18.3",
|
|
48
|
-
"@appduct/shared": "0.
|
|
48
|
+
"@appduct/shared": "0.14.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/node": "^22.10.0",
|
package/dist/cli/routes/ls.d.ts
DELETED