@vincentt-xr/cli 0.8.0 → 0.10.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 +40 -13
- package/dist/cli/args.d.ts +22 -0
- package/dist/cli/args.js +71 -0
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +359 -91
- package/dist/cli/usage-text.d.ts +1 -0
- package/dist/cli/usage-text.js +97 -0
- package/dist/cli/verb-surface.d.ts +24 -0
- package/dist/cli/verb-surface.js +49 -0
- package/dist/dx/clusters.d.ts +0 -17
- package/dist/dx/clusters.js +50 -1
- package/dist/dx/skeleton.js +1 -0
- package/dist/lib/backend.d.ts +11 -0
- package/dist/lib/backend.js +23 -0
- package/dist/lib/classifyTarget.d.ts +42 -0
- package/dist/lib/classifyTarget.js +83 -0
- package/dist/lib/feedback.d.ts +46 -5
- package/dist/lib/feedback.js +76 -19
- package/dist/lib/feedbackCopy.d.ts +70 -0
- package/dist/lib/feedbackCopy.js +163 -0
- package/dist/lib/initCommand.d.ts +28 -1
- package/dist/lib/initCommand.js +91 -16
- package/dist/lib/initFrom.d.ts +70 -0
- package/dist/lib/initFrom.js +222 -0
- package/dist/lib/lifecycle.d.ts +28 -3
- package/dist/lib/lifecycle.js +99 -7
- package/dist/lib/listProjects.d.ts +41 -0
- package/dist/lib/listProjects.js +77 -0
- package/dist/lib/projects.d.ts +64 -8
- package/dist/lib/projects.js +316 -24
- package/dist/lib/sourceRef.d.ts +46 -0
- package/dist/lib/sourceRef.js +107 -0
- package/dist/lib/sourceRefCopy.d.ts +30 -0
- package/dist/lib/sourceRefCopy.js +116 -0
- package/dist/preview/command.d.ts +11 -0
- package/dist/preview/command.js +19 -1
- package/dist/preview/copy.d.ts +7 -0
- package/dist/preview/copy.js +8 -1
- package/dist/preview/runner.d.ts +6 -0
- package/dist/preview/runner.js +1 -0
- package/dist/preview/stream.d.ts +11 -0
- package/dist/preview/stream.js +13 -0
- package/dist/publish/api.d.ts +20 -0
- package/dist/publish/command.d.ts +3 -0
- package/dist/publish/command.js +39 -4
- package/dist/publish/copy.d.ts +29 -0
- package/dist/publish/copy.js +86 -0
- package/dist/relay/annotations.d.ts +28 -4
- package/dist/relay/annotations.js +23 -7
- package/dist/relay/qa.f12.fixtures.d.ts +154 -0
- package/dist/relay/qa.f12.fixtures.js +358 -0
- package/dist/relay/server.d.ts +41 -3
- package/dist/relay/server.js +90 -32
- package/dist/scaffold/index.d.ts +9 -0
- package/dist/scaffold/index.js +13 -1
- package/package.json +2 -2
- package/dist/library/qa.f5-b32.spec.d.ts +0 -1
- package/dist/library/qa.f5-b32.spec.js +0 -202
- package/dist/library/qa.f5-cli.spec.d.ts +0 -1
- package/dist/library/qa.f5-cli.spec.js +0 -433
- package/dist/library/qa.f5-contract.spec.d.ts +0 -1
- package/dist/library/qa.f5-contract.spec.js +0 -206
- package/dist/relay/injectors.d.ts +0 -29
- package/dist/relay/injectors.js +0 -72
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { Annotation } from "@vincentt-xr/harness/events";
|
|
2
|
-
export interface Injector {
|
|
3
|
-
/** Stable id for config/logging: "claude-code" | "paste" | … */
|
|
4
|
-
readonly name: string;
|
|
5
|
-
/** Cheap best-effort readiness probe. The dispatcher skips unavailable injectors. */
|
|
6
|
-
isAvailable(): Promise<boolean>;
|
|
7
|
-
/**
|
|
8
|
-
* Deliver so the agent acts with zero user action. Resolves when the host
|
|
9
|
-
* accepted the injection (not when the agent finishes). Throws if it couldn't —
|
|
10
|
-
* the dispatcher falls through to the next injector (paste never throws).
|
|
11
|
-
*/
|
|
12
|
-
inject(a: Annotation): Promise<void>;
|
|
13
|
-
}
|
|
14
|
-
export interface Dispatcher {
|
|
15
|
-
dispatch(a: Annotation): Promise<string>;
|
|
16
|
-
}
|
|
17
|
-
/** Walk the injector chain; first available that accepts wins, else fall through. */
|
|
18
|
-
export declare function createDispatcher(injectors: Injector[], onLog?: (msg: string) => void): Dispatcher;
|
|
19
|
-
/**
|
|
20
|
-
* Claude Code passive injector: append the annotation to a queue a running `/loop`
|
|
21
|
-
* drains. Available only when the queue dir exists (the loop has been set up), so a
|
|
22
|
-
* project with no loop configured falls through to the fallback.
|
|
23
|
-
*/
|
|
24
|
-
export declare function claudeCodeInjector(queuePath: string): Injector;
|
|
25
|
-
/**
|
|
26
|
-
* Universal never-fail fallback. When no zero-action injector accepted the
|
|
27
|
-
* annotation, stage a ready prompt so the worst case is a single paste.
|
|
28
|
-
*/
|
|
29
|
-
export declare function pasteInjector(onReady: (prompt: string) => void): Injector;
|
package/dist/relay/injectors.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
// The one per-agent seam of the reverse channel (docs/harness-annotation-push.md).
|
|
2
|
-
// Everything upstream — capture, relay, store — is agent-agnostic; turning a
|
|
3
|
-
// stored annotation into an agent turn goes through an Injector. The dispatcher
|
|
4
|
-
// walks an ordered chain: the first available injector that accepts wins, and on
|
|
5
|
-
// failure it falls through to the next. The final injector never fails.
|
|
6
|
-
//
|
|
7
|
-
// This change ships only the Claude Code passive injector (append to the queue a
|
|
8
|
-
// running `/loop` drains) plus the never-fail paste fallback. Active injectors and
|
|
9
|
-
// other agents' injectors are follow-ups behind this same interface.
|
|
10
|
-
import { appendFile, mkdir } from "node:fs/promises";
|
|
11
|
-
import { existsSync } from "node:fs";
|
|
12
|
-
import path from "node:path";
|
|
13
|
-
/** Walk the injector chain; first available that accepts wins, else fall through. */
|
|
14
|
-
export function createDispatcher(injectors, onLog = () => undefined) {
|
|
15
|
-
return {
|
|
16
|
-
async dispatch(a) {
|
|
17
|
-
for (const inj of injectors) {
|
|
18
|
-
try {
|
|
19
|
-
if (!(await inj.isAvailable()))
|
|
20
|
-
continue;
|
|
21
|
-
await inj.inject(a);
|
|
22
|
-
onLog(`annotation ${a.id} → ${inj.name}`);
|
|
23
|
-
return inj.name;
|
|
24
|
-
}
|
|
25
|
-
catch (err) {
|
|
26
|
-
onLog(`injector ${inj.name} failed: ${err.message}; falling back`);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
// Unreachable when a never-fail fallback (pasteInjector) terminates the chain.
|
|
30
|
-
throw new Error("no injector accepted the annotation");
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Claude Code passive injector: append the annotation to a queue a running `/loop`
|
|
36
|
-
* drains. Available only when the queue dir exists (the loop has been set up), so a
|
|
37
|
-
* project with no loop configured falls through to the fallback.
|
|
38
|
-
*/
|
|
39
|
-
export function claudeCodeInjector(queuePath) {
|
|
40
|
-
return {
|
|
41
|
-
name: "claude-code",
|
|
42
|
-
async isAvailable() {
|
|
43
|
-
return existsSync(path.dirname(queuePath));
|
|
44
|
-
},
|
|
45
|
-
async inject(a) {
|
|
46
|
-
await mkdir(path.dirname(queuePath), { recursive: true });
|
|
47
|
-
const line = JSON.stringify({
|
|
48
|
-
id: a.id,
|
|
49
|
-
seq: a.seq,
|
|
50
|
-
message: a.message,
|
|
51
|
-
screenshot: a.screenshotPath,
|
|
52
|
-
spec: a.spec,
|
|
53
|
-
}) + "\n";
|
|
54
|
-
await appendFile(queuePath, line, "utf8");
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Universal never-fail fallback. When no zero-action injector accepted the
|
|
60
|
-
* annotation, stage a ready prompt so the worst case is a single paste.
|
|
61
|
-
*/
|
|
62
|
-
export function pasteInjector(onReady) {
|
|
63
|
-
return {
|
|
64
|
-
name: "paste",
|
|
65
|
-
async isAvailable() {
|
|
66
|
-
return true;
|
|
67
|
-
},
|
|
68
|
-
async inject(a) {
|
|
69
|
-
onReady(`Review annotation ${a.id}: ${a.message}\nScreenshot: ${a.screenshotPath}`);
|
|
70
|
-
},
|
|
71
|
-
};
|
|
72
|
-
}
|