@velum-labs/cursorkit 0.1.0 → 0.1.2
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 +18 -17
- package/dist/src/ckLauncher.d.ts +16 -6
- package/dist/src/ckLauncher.js +334 -478
- package/dist/src/cli.d.ts +2 -1
- package/dist/src/cli.js +25 -253
- package/dist/src/commands/doctor.d.ts +2 -0
- package/dist/src/commands/doctor.js +129 -0
- package/dist/src/commands/maintenance.d.ts +2 -0
- package/dist/src/commands/maintenance.js +94 -0
- package/dist/src/commands/render.d.ts +14 -0
- package/dist/src/commands/render.js +17 -0
- package/dist/src/commands/serve.d.ts +2 -0
- package/dist/src/commands/serve.js +52 -0
- package/dist/src/cursorDesktopState.d.ts +10 -0
- package/dist/src/cursorDesktopState.js +204 -0
- package/dist/src/desktopConnectProxy.d.ts +10 -0
- package/dist/src/desktopConnectProxy.js +7 -1
- package/dist/src/server.js +35 -2
- package/dist/src/tools/releaseCheck.d.ts +1 -1
- package/dist/src/tools/releaseCheck.js +1 -6
- package/dist/src/ui/index.d.ts +8 -0
- package/dist/src/ui/index.js +6 -0
- package/dist/src/ui/prompt.d.ts +30 -0
- package/dist/src/ui/prompt.js +182 -0
- package/dist/src/ui/runtime.d.ts +14 -0
- package/dist/src/ui/runtime.js +35 -0
- package/dist/src/ui/spinner.d.ts +31 -0
- package/dist/src/ui/spinner.js +102 -0
- package/dist/src/ui/steps.d.ts +38 -0
- package/dist/src/ui/steps.js +154 -0
- package/dist/src/ui/theme.d.ts +35 -0
- package/dist/src/ui/theme.js +63 -0
- package/package.json +5 -3
- package/dist/src/ck.d.ts +0 -2
- package/dist/src/ck.js +0 -6
package/README.md
CHANGED
|
@@ -28,16 +28,6 @@ pass through to an upstream. See `docs/configuration.md` for all config.
|
|
|
28
28
|
## CLI
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
ck
|
|
32
|
-
ck test
|
|
33
|
-
ck --use-default-profile
|
|
34
|
-
ck --print
|
|
35
|
-
ck doctor
|
|
36
|
-
ck cert
|
|
37
|
-
ck route
|
|
38
|
-
ck route status
|
|
39
|
-
ck route rollback
|
|
40
|
-
ck stop
|
|
41
31
|
cursorkit serve
|
|
42
32
|
cursorkit doctor
|
|
43
33
|
cursorkit desktop-cert
|
|
@@ -45,6 +35,16 @@ cursorkit desktop-proxy
|
|
|
45
35
|
cursorkit desktop-doctor
|
|
46
36
|
cursorkit capture
|
|
47
37
|
cursorkit fixtures
|
|
38
|
+
cursorkit ck
|
|
39
|
+
cursorkit ck test
|
|
40
|
+
cursorkit ck --use-default-profile
|
|
41
|
+
cursorkit ck --print
|
|
42
|
+
cursorkit ck doctor
|
|
43
|
+
cursorkit ck cert
|
|
44
|
+
cursorkit ck route
|
|
45
|
+
cursorkit ck route status
|
|
46
|
+
cursorkit ck route rollback
|
|
47
|
+
cursorkit ck stop
|
|
48
48
|
cursorkit --help
|
|
49
49
|
```
|
|
50
50
|
|
|
@@ -66,18 +66,19 @@ capabilities explicitly. It does not own fan-out, judge synthesis, lifecycle,
|
|
|
66
66
|
receipts, or live Cursor tool-call replay; desktop routes remain observed-only
|
|
67
67
|
until fixture-backed evidence proves stability.
|
|
68
68
|
|
|
69
|
-
`ck` is the recommended desktop test launcher. It starts the desktop
|
|
70
|
-
a local HTTP CONNECT proxy, opens an isolated Cursor profile with
|
|
69
|
+
`cursorkit ck` is the recommended desktop test launcher. It starts the desktop
|
|
70
|
+
bridge plus a local HTTP CONNECT proxy, opens an isolated Cursor profile with
|
|
71
71
|
`--proxy-server`, and reports whether route inventory traffic reaches the
|
|
72
72
|
bridge. For isolated desktop UI tests, it also seeds/activates local models
|
|
73
73
|
additively in Cursor's settings-backed model picker state. It does not install
|
|
74
74
|
certificates, edit `/etc/hosts`, modify `pf`, or kill your normal Cursor app.
|
|
75
75
|
Inside this repo, use `pnpm ck`; when installed or linked as a package, use
|
|
76
|
-
`ck` directly. If the isolated profile cannot complete browser login,
|
|
77
|
-
`ck --use-default-profile` reuses your current Cursor auth state while
|
|
78
|
-
the same non-privileged routing attempt.
|
|
79
|
-
Use `ck test --use-default-profile` for a bounded desktop smoke test
|
|
80
|
-
whether route inventory and the known model-list RPCs reached the
|
|
76
|
+
`cursorkit ck` directly. If the isolated profile cannot complete browser login,
|
|
77
|
+
`cursorkit ck --use-default-profile` reuses your current Cursor auth state while
|
|
78
|
+
keeping the same non-privileged routing attempt.
|
|
79
|
+
Use `cursorkit ck test --use-default-profile` for a bounded desktop smoke test
|
|
80
|
+
that reports whether route inventory and the known model-list RPCs reached the
|
|
81
|
+
bridge.
|
|
81
82
|
|
|
82
83
|
The project knowledge base for observed Cursor behavior is `docs/learnings.md`.
|
|
83
84
|
Read it before changing route interception, model metadata, or desktop proxy
|
package/dist/src/ckLauncher.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type ChildProcess } from "node:child_process";
|
|
2
2
|
import fs from "node:fs";
|
|
3
|
-
import {
|
|
3
|
+
import { Command } from "commander";
|
|
4
|
+
import { buildLocalDesktopModelEntry, mergeLocalAgentBackendUrlsIntoApplicationUser, mergeLocalDesktopModelsIntoApplicationUser } from "./cursorDesktopState.js";
|
|
5
|
+
export { buildLocalDesktopModelEntry, mergeLocalAgentBackendUrlsIntoApplicationUser, mergeLocalDesktopModelsIntoApplicationUser, };
|
|
4
6
|
import { type DesktopConnectProxy } from "./desktopConnectProxy.js";
|
|
5
|
-
export type CkCommand = "launch" | "test" | "doctor" | "cert" | "route" | "stop"
|
|
7
|
+
export type CkCommand = "launch" | "test" | "doctor" | "cert" | "route" | "stop";
|
|
6
8
|
export type CkProfileMode = "isolated" | "default";
|
|
7
9
|
export type CkRouteMethod = "pf" | "direct";
|
|
8
10
|
export type CkRouteAction = "plan" | "status" | "rollback";
|
|
@@ -116,6 +118,16 @@ interface CkState {
|
|
|
116
118
|
}
|
|
117
119
|
export declare const CK_STATE_DIR: string;
|
|
118
120
|
export declare const CK_STATE_PATH: string;
|
|
121
|
+
/**
|
|
122
|
+
* Build the commander program for `ck`. `dispatch` receives the resolved
|
|
123
|
+
* {@link CkArgs}; the real binary runs the command while {@link parseCkArgs}
|
|
124
|
+
* captures the args for tests.
|
|
125
|
+
*/
|
|
126
|
+
export declare function buildCkProgram(dispatch: (args: CkArgs) => void | Promise<void>): Command;
|
|
127
|
+
/**
|
|
128
|
+
* Pure argument parser built on the commander program: returns the resolved
|
|
129
|
+
* {@link CkArgs} (or throws on invalid input) without running the command.
|
|
130
|
+
*/
|
|
119
131
|
export declare function parseCkArgs(argv: string[]): CkArgs;
|
|
120
132
|
export declare function buildCkLaunchPlan(options: {
|
|
121
133
|
env: NodeJS.ProcessEnv;
|
|
@@ -139,12 +151,10 @@ export declare function containsPrivilegedCommand(spec: CommandSpec): boolean;
|
|
|
139
151
|
export declare function routeInventoryTimeoutDiagnosis(): string[];
|
|
140
152
|
export declare function analyzeRouteInventoryLog(logText: string): DesktopTestReport;
|
|
141
153
|
export declare function runCk(argv?: string[]): Promise<void>;
|
|
154
|
+
/** Attach the `ck` desktop launcher as a subcommand group of another program. */
|
|
155
|
+
export declare function registerCk(program: Command): void;
|
|
142
156
|
export declare function chooseBridgePort(): Promise<number>;
|
|
143
157
|
export declare function seedCursorAuthFromDefault(plan: Pick<CkLaunchPlan, "profileMode" | "userDataDir" | "seedAuthFromDefault">): CursorAuthSeedStatus;
|
|
144
158
|
export declare function seedLocalModelsIntoCursorState(plan: Pick<CkLaunchPlan, "agentHttpPort" | "bridge" | "profileMode" | "userDataDir">): CursorLocalModelSeedStatus;
|
|
145
|
-
export declare function mergeLocalAgentBackendUrlsIntoApplicationUser(applicationUser: Record<string, unknown>, agentOrigin: string): void;
|
|
146
|
-
export declare function mergeLocalDesktopModelsIntoApplicationUser(applicationUser: Record<string, unknown>, models: LocalModelConfig[]): void;
|
|
147
|
-
export declare function buildLocalDesktopModelEntry(model: LocalModelConfig): Record<string, unknown>;
|
|
148
159
|
export declare function cleanupIsolatedCursorProcesses(userDataDir: string): number[];
|
|
149
160
|
export declare function bridgeProcessMatchesState(command: string, state?: Pick<CkState, "bridgeCommand">): boolean;
|
|
150
|
-
export {};
|