@cursor-harness-provider/native 0.0.0-stage → 0.4.6
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/LICENSE +21 -0
- package/README.md +8 -2
- package/THIRD_PARTY_NOTICES.md +16 -0
- package/dist/cursor-protocol/auth/oauth.d.ts +65 -0
- package/dist/cursor-protocol/client/bridge.d.ts +86 -0
- package/dist/cursor-protocol/client/cursor-wire.d.ts +27 -0
- package/dist/cursor-protocol/client/h1-bridge.d.ts +23 -0
- package/dist/cursor-protocol/client/h2-proxy.d.ts +7 -0
- package/dist/cursor-protocol/client/h2-session.d.ts +54 -0
- package/dist/cursor-protocol/client/h2-unary.d.ts +23 -0
- package/dist/cursor-protocol/config/index.d.ts +24 -0
- package/dist/cursor-protocol/models/limits.d.ts +33 -0
- package/dist/cursor-protocol/models/parameterized.d.ts +98 -0
- package/dist/cursor-protocol/models/processing.d.ts +39 -0
- package/dist/cursor-protocol/proto/agent_pb.d.ts +13052 -0
- package/dist/cursor-protocol/stream/bridge-session.d.ts +30 -0
- package/dist/cursor-protocol/stream/client-transcript.d.ts +30 -0
- package/dist/cursor-protocol/stream/clipboard-images.d.ts +23 -0
- package/dist/cursor-protocol/stream/config.d.ts +5 -0
- package/dist/cursor-protocol/stream/context-normalize.d.ts +66 -0
- package/dist/cursor-protocol/stream/debug-log.d.ts +26 -0
- package/dist/cursor-protocol/stream/drift.d.ts +26 -0
- package/dist/cursor-protocol/stream/exec-native.d.ts +13 -0
- package/dist/cursor-protocol/stream/images.d.ts +24 -0
- package/dist/cursor-protocol/stream/interaction-query.d.ts +15 -0
- package/dist/cursor-protocol/stream/local-tool-policy.d.ts +73 -0
- package/dist/cursor-protocol/stream/message-parsing.d.ts +38 -0
- package/dist/cursor-protocol/stream/model-discovery.d.ts +50 -0
- package/dist/cursor-protocol/stream/model-routing.d.ts +30 -0
- package/dist/cursor-protocol/stream/native-core.d.ts +63 -0
- package/dist/cursor-protocol/stream/pi-adapter.d.ts +74 -0
- package/dist/cursor-protocol/stream/protocol.d.ts +23 -0
- package/dist/cursor-protocol/stream/recovery.d.ts +96 -0
- package/dist/cursor-protocol/stream/request-build.d.ts +134 -0
- package/dist/cursor-protocol/stream/root-prompt.d.ts +74 -0
- package/dist/cursor-protocol/stream/run-journal.d.ts +77 -0
- package/dist/cursor-protocol/stream/scope-journal.d.ts +43 -0
- package/dist/cursor-protocol/stream/server-messages.d.ts +49 -0
- package/dist/cursor-protocol/stream/session-state.d.ts +73 -0
- package/dist/cursor-protocol/stream/stream-writer.d.ts +6 -0
- package/dist/cursor-protocol/stream/thinking-filter.d.ts +19 -0
- package/dist/cursor-protocol/stream/tool-schema.d.ts +10 -0
- package/dist/cursor-protocol/stream/transport-errors.d.ts +29 -0
- package/dist/cursor-protocol/stream/tuning.d.ts +104 -0
- package/dist/cursor-protocol/stream/types.d.ts +339 -0
- package/dist/cursor-protocol/types/enums.d.ts +40 -0
- package/dist/cursor-protocol/utils/cache-dir.d.ts +6 -0
- package/dist/cursor-protocol/utils/security.d.ts +4 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +15195 -0
- package/dist/index.js.map +7 -0
- package/dist/js-engine/engine.d.ts +88 -0
- package/dist/lifecycle.d.ts +25 -0
- package/dist/lifecycle.js +112 -0
- package/dist/lifecycle.js.map +7 -0
- package/licenses/distribution.json +12 -0
- package/licenses/pi-cursor/LICENSE +21 -0
- package/package.json +42 -4
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { RustEngine, RustStream } from "../index.js";
|
|
2
|
+
interface StartInput {
|
|
3
|
+
scope: string;
|
|
4
|
+
modelId: string;
|
|
5
|
+
modelParameters?: Array<{
|
|
6
|
+
id: string;
|
|
7
|
+
value: string;
|
|
8
|
+
}>;
|
|
9
|
+
maxMode?: boolean;
|
|
10
|
+
workspace: string;
|
|
11
|
+
prompt: unknown[];
|
|
12
|
+
tools?: unknown[];
|
|
13
|
+
toolChoice?: string;
|
|
14
|
+
reasoning?: string;
|
|
15
|
+
stateless?: boolean;
|
|
16
|
+
agentUrl?: string;
|
|
17
|
+
/** Directory holding this scope's engine records; the Pi host passes <cache>/pi/rust-sessions-v1. */
|
|
18
|
+
cacheDir?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Per-effort routes for this model, keyed by the reasoning-effort value the
|
|
21
|
+
* host sends (`""` default, `low`/`medium`/`high`/... as Cursor names them).
|
|
22
|
+
* Hosts that own a catalog (OpenCode) pass the matching entry of
|
|
23
|
+
* buildRawModelLookup's map here, so effort selection, parameterized models
|
|
24
|
+
* and Max Mode reach the wire instead of degrading to the base model id.
|
|
25
|
+
*/
|
|
26
|
+
modelRoutes?: Record<string, EngineModelRoute>;
|
|
27
|
+
}
|
|
28
|
+
/** One wire route, as cursor-protocol's applyNativeCursorRouting consumes it. */
|
|
29
|
+
export interface EngineModelRoute {
|
|
30
|
+
modelId: string;
|
|
31
|
+
parameters?: Array<{
|
|
32
|
+
id: string;
|
|
33
|
+
value: string;
|
|
34
|
+
}>;
|
|
35
|
+
requiresMaxMode?: boolean;
|
|
36
|
+
requestedMaxMode?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The rawRoutingByModelId entry for a start request: effort-keyed routes under
|
|
40
|
+
* the request's model id.
|
|
41
|
+
*
|
|
42
|
+
* The historical one-line map ("this model routes to itself") was written for
|
|
43
|
+
* `auto` → `default`, but it gave every model a `""` route, so
|
|
44
|
+
* applyNativeCursorRouting resolved every effort to the base id and
|
|
45
|
+
* resolveRequestedModelId never reassembled the effort suffix — OpenCode's
|
|
46
|
+
* #high/#low variants and every parameterized or Max-Mode selection silently
|
|
47
|
+
* ran at the server default. Host-resolved routes (Pi compat sends
|
|
48
|
+
* modelId + modelParameters + maxMode) and host-catalog routes (OpenCode sends
|
|
49
|
+
* modelRoutes) both take precedence; the self-route stays only as the
|
|
50
|
+
* minimal fallback, and an explicit host route always wins over a catalog one.
|
|
51
|
+
*/
|
|
52
|
+
export declare function engineRoutingForModel(input: Pick<StartInput, "modelId" | "modelParameters" | "maxMode" | "modelRoutes">): Map<string, Record<string, EngineModelRoute>>;
|
|
53
|
+
export declare function toPiContext(input: StartInput): {
|
|
54
|
+
messages: any[];
|
|
55
|
+
systemPrompt: string;
|
|
56
|
+
tools: any[];
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Validate a host-supplied agent endpoint. Mirrors the hosts' own rules
|
|
60
|
+
* (Pi's endpoint(), the same shape as assertSafeCursorBaseUrl): HTTPS, or
|
|
61
|
+
* loopback HTTP for development fixtures; no credentials, query or fragment.
|
|
62
|
+
* Returns undefined when absent so the shared env → Cursor CLI config →
|
|
63
|
+
* default chain keeps resolving; throws on malformed values — a wrong endpoint
|
|
64
|
+
* is a first-party contract violation, not a silent fallback case.
|
|
65
|
+
*/
|
|
66
|
+
export declare function resolveEngineAgentUrl(value: unknown): string | undefined;
|
|
67
|
+
export declare class JsEngine implements RustEngine {
|
|
68
|
+
private readonly nativeVersion;
|
|
69
|
+
/** In-flight engine streams per scope; a reset cancels these so late work cannot resurrect a discarded conversation. */
|
|
70
|
+
private readonly streamsByScope;
|
|
71
|
+
/** The record directory each started scope uses (input.cacheDir or the env-derived default). */
|
|
72
|
+
private readonly scopeCacheDirs;
|
|
73
|
+
/** Latest known in-memory state footprint per scope, for resourceStats. */
|
|
74
|
+
private readonly trackedBytesByScope;
|
|
75
|
+
private peakTrackedBytes;
|
|
76
|
+
constructor(nativeVersion: string);
|
|
77
|
+
start(request: string, accessToken: string): Promise<RustStream>;
|
|
78
|
+
/** A stream settled (finished or cancelled): persist the scope's engine record from live conversation state. */
|
|
79
|
+
private persistScopeRecord;
|
|
80
|
+
private currentTrackedBytes;
|
|
81
|
+
listModels(accessToken: string, url?: string): Promise<string>;
|
|
82
|
+
remove(scope: string): Promise<void>;
|
|
83
|
+
shutdown(): void;
|
|
84
|
+
resourceStats(): string;
|
|
85
|
+
maintainCache(scope: string, apply?: boolean): Promise<string>;
|
|
86
|
+
getUsage(_accessToken: string): Promise<string>;
|
|
87
|
+
}
|
|
88
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Host-independent bounds for asynchronous lifecycle work; no I/O or credentials. */
|
|
2
|
+
export interface DeadlineOptions {
|
|
3
|
+
signal?: AbortSignal;
|
|
4
|
+
timeoutMs: number;
|
|
5
|
+
code: string;
|
|
6
|
+
message: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Reject with the signal's reason when it aborts. Shared by both hosts — the
|
|
10
|
+
* copies had already drifted in error text. The DOMException matches pi's
|
|
11
|
+
* AbortError expectations (stopReason "aborted").
|
|
12
|
+
*/
|
|
13
|
+
export declare function abortable<T>(pending: Promise<T>, signal: AbortSignal): Promise<T>;
|
|
14
|
+
/**
|
|
15
|
+
* Clamp a host-supplied auth timeout from its raw env string. Shared by both
|
|
16
|
+
* hosts (pi and opencode each had an inline copy of the same Math.max/min
|
|
17
|
+
* chain, with the same defaults and ceiling).
|
|
18
|
+
*/
|
|
19
|
+
export declare function clampAuthTimeoutMs(configured: string | undefined, defaultMs?: number, maxMs?: number): number;
|
|
20
|
+
export declare class DeadlineError extends Error {
|
|
21
|
+
readonly code: string;
|
|
22
|
+
constructor(code: string, message: string);
|
|
23
|
+
}
|
|
24
|
+
/** Bound even dependencies that ignore cancellation, while observing their late settlement. */
|
|
25
|
+
export declare function withDeadline<T>(run: (boundedSignal: AbortSignal) => Promise<T>, options: DeadlineOptions): Promise<T>;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// packages/native/src/lifecycle.ts
|
|
2
|
+
function abortable(pending, signal) {
|
|
3
|
+
return new Promise((resolve, reject) => {
|
|
4
|
+
const onAbort = () => {
|
|
5
|
+
signal.removeEventListener("abort", onAbort);
|
|
6
|
+
reject(new DOMException("Cursor request aborted", "AbortError"));
|
|
7
|
+
};
|
|
8
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
9
|
+
if (signal.aborted) {
|
|
10
|
+
onAbort();
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
pending.then(
|
|
14
|
+
(v) => {
|
|
15
|
+
signal.removeEventListener("abort", onAbort);
|
|
16
|
+
resolve(v);
|
|
17
|
+
},
|
|
18
|
+
(e) => {
|
|
19
|
+
signal.removeEventListener("abort", onAbort);
|
|
20
|
+
reject(e);
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function clampAuthTimeoutMs(configured, defaultMs = 25e3, maxMs = 3e4) {
|
|
26
|
+
const parsed = Number(configured?.trim() || defaultMs);
|
|
27
|
+
return Number.isFinite(parsed) ? Math.max(1, Math.min(maxMs, parsed)) : defaultMs;
|
|
28
|
+
}
|
|
29
|
+
var DeadlineError = class extends Error {
|
|
30
|
+
code;
|
|
31
|
+
constructor(code, message) {
|
|
32
|
+
super(message);
|
|
33
|
+
this.name = "DeadlineError";
|
|
34
|
+
this.code = code;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
function withDeadline(run, options) {
|
|
38
|
+
const { signal, timeoutMs } = options;
|
|
39
|
+
if (signal?.aborted) return Promise.reject(signal.reason);
|
|
40
|
+
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) return Promise.reject(new RangeError("timeoutMs must be positive and finite"));
|
|
41
|
+
return new Promise((resolve, reject) => {
|
|
42
|
+
const bounded = new AbortController();
|
|
43
|
+
const started = performance.now();
|
|
44
|
+
let settled = false, timer;
|
|
45
|
+
const cleanup = () => {
|
|
46
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
47
|
+
signal?.removeEventListener("abort", onAbort);
|
|
48
|
+
};
|
|
49
|
+
const cancel = (reason) => {
|
|
50
|
+
if (settled) return;
|
|
51
|
+
settled = true;
|
|
52
|
+
cleanup();
|
|
53
|
+
bounded.abort(reason);
|
|
54
|
+
reject(reason);
|
|
55
|
+
};
|
|
56
|
+
const onAbort = () => cancel(signal.reason);
|
|
57
|
+
const fail = (error) => {
|
|
58
|
+
if (signal?.aborted) {
|
|
59
|
+
onAbort();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (settled) return;
|
|
63
|
+
settled = true;
|
|
64
|
+
cleanup();
|
|
65
|
+
reject(error);
|
|
66
|
+
};
|
|
67
|
+
const succeed = (value) => {
|
|
68
|
+
if (signal?.aborted) {
|
|
69
|
+
onAbort();
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (settled) return;
|
|
73
|
+
settled = true;
|
|
74
|
+
cleanup();
|
|
75
|
+
resolve(value);
|
|
76
|
+
};
|
|
77
|
+
const expire = () => {
|
|
78
|
+
if (signal?.aborted) {
|
|
79
|
+
onAbort();
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
if (settled) return;
|
|
83
|
+
const remaining = timeoutMs - (performance.now() - started);
|
|
84
|
+
if (remaining > 0) {
|
|
85
|
+
schedule(remaining);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
cancel(new DeadlineError(options.code, options.message));
|
|
89
|
+
};
|
|
90
|
+
const schedule = (remaining) => {
|
|
91
|
+
timer = setTimeout(expire, Math.min(remaining, 2147483647));
|
|
92
|
+
};
|
|
93
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
94
|
+
if (signal?.aborted) {
|
|
95
|
+
onAbort();
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
schedule(timeoutMs);
|
|
99
|
+
try {
|
|
100
|
+
Promise.resolve(run(bounded.signal)).then(succeed, fail);
|
|
101
|
+
} catch (error) {
|
|
102
|
+
fail(error);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
export {
|
|
107
|
+
DeadlineError,
|
|
108
|
+
abortable,
|
|
109
|
+
clampAuthTimeoutMs,
|
|
110
|
+
withDeadline
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=lifecycle.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/lifecycle.ts"],
|
|
4
|
+
"sourcesContent": ["/** Host-independent bounds for asynchronous lifecycle work; no I/O or credentials. */\nexport interface DeadlineOptions {\n signal?: AbortSignal;\n timeoutMs: number;\n code: string;\n message: string;\n}\n\n/**\n * Reject with the signal's reason when it aborts. Shared by both hosts \u2014 the\n * copies had already drifted in error text. The DOMException matches pi's\n * AbortError expectations (stopReason \"aborted\").\n */\nexport function abortable<T>(pending: Promise<T>, signal: AbortSignal): Promise<T> {\n return new Promise<T>((resolve, reject) => {\n const onAbort = () => { signal.removeEventListener(\"abort\", onAbort); reject(new DOMException(\"Cursor request aborted\", \"AbortError\")); };\n signal.addEventListener(\"abort\", onAbort, { once: true });\n if (signal.aborted) { onAbort(); return; }\n pending.then(v => { signal.removeEventListener(\"abort\", onAbort); resolve(v); },\n e => { signal.removeEventListener(\"abort\", onAbort); reject(e); });\n });\n}\n\n/**\n * Clamp a host-supplied auth timeout from its raw env string. Shared by both\n * hosts (pi and opencode each had an inline copy of the same Math.max/min\n * chain, with the same defaults and ceiling).\n */\nexport function clampAuthTimeoutMs(\n configured: string | undefined,\n defaultMs = 25_000,\n maxMs = 30_000,\n): number {\n const parsed = Number(configured?.trim() || defaultMs);\n return Number.isFinite(parsed) ? Math.max(1, Math.min(maxMs, parsed)) : defaultMs;\n}\n\nexport class DeadlineError extends Error {\n readonly code: string;\n constructor(code: string, message: string) {\n super(message);\n this.name = \"DeadlineError\";\n this.code = code;\n }\n}\n\n/** Bound even dependencies that ignore cancellation, while observing their late settlement. */\nexport function withDeadline<T>(run: (boundedSignal: AbortSignal) => Promise<T>, options: DeadlineOptions): Promise<T> {\n const { signal, timeoutMs } = options;\n // A caller's cancellation is authoritative, including over invalid options.\n if (signal?.aborted) return Promise.reject(signal.reason);\n if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) return Promise.reject(new RangeError(\"timeoutMs must be positive and finite\"));\n return new Promise<T>((resolve, reject) => {\n const bounded = new AbortController();\n const started = performance.now();\n let settled = false, timer: ReturnType<typeof setTimeout> | undefined;\n const cleanup = () => {\n if (timer !== undefined) clearTimeout(timer);\n signal?.removeEventListener(\"abort\", onAbort);\n };\n const cancel = (reason: unknown) => {\n if (settled) return;\n settled = true;\n cleanup();\n bounded.abort(reason);\n reject(reason);\n };\n const onAbort = () => cancel(signal!.reason);\n const fail = (error: unknown) => {\n if (signal?.aborted) { onAbort(); return; }\n if (settled) return;\n settled = true;\n cleanup();\n reject(error);\n };\n const succeed = (value: T) => {\n if (signal?.aborted) { onAbort(); return; }\n if (settled) return;\n settled = true;\n cleanup();\n resolve(value);\n };\n const expire = () => {\n if (signal?.aborted) { onAbort(); return; }\n if (settled) return;\n const remaining = timeoutMs - (performance.now() - started);\n if (remaining > 0) { schedule(remaining); return; }\n cancel(new DeadlineError(options.code, options.message));\n };\n const schedule = (remaining: number) => {\n // Keep awaited headless work alive. Chunk long waits rather than letting\n // Node overflow a positive finite timeout into an immediate 1ms timer.\n timer = setTimeout(expire, Math.min(remaining, 2147483647));\n };\n signal?.addEventListener(\"abort\", onAbort, { once: true });\n if (signal?.aborted) { onAbort(); return; }\n schedule(timeoutMs);\n try { Promise.resolve(run(bounded.signal)).then(succeed, fail); }\n catch (error) { fail(error); }\n });\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"generatedBy": "cursor-harness-provider/package-licenses-v1",
|
|
3
|
+
"version": "0.4.6",
|
|
4
|
+
"projectLicenseSha256": "ba4c49f714a4761dc650028ecca5f3ea5b95b975e30962d5363632589bca708c",
|
|
5
|
+
"upstreamLicenseSha256": "cf95abbe1576653e1e335cba07a100a71cda8dc580fa88baeb0185526b4b8155",
|
|
6
|
+
"files": [
|
|
7
|
+
{
|
|
8
|
+
"path": "pi-cursor/LICENSE",
|
|
9
|
+
"sha256": "cf95abbe1576653e1e335cba07a100a71cda8dc580fa88baeb0185526b4b8155"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rahul Arya
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,6 +1,44 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cursor-harness-provider/native",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.4.6",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"description": "Shared Cursor runtime for coding harnesses",
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=22.19.0"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/berialcheng/cursor-harness-provider.git",
|
|
14
|
+
"directory": "packages/native"
|
|
15
|
+
},
|
|
16
|
+
"homepage": "https://github.com/berialcheng/cursor-harness-provider#readme",
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public",
|
|
19
|
+
"registry": "https://registry.npmjs.org/"
|
|
20
|
+
},
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"import": "./dist/index.js",
|
|
25
|
+
"default": "./dist/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./lifecycle": {
|
|
28
|
+
"types": "./dist/lifecycle.d.ts",
|
|
29
|
+
"import": "./dist/lifecycle.js",
|
|
30
|
+
"default": "./dist/lifecycle.js"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"dist",
|
|
35
|
+
"LICENSE",
|
|
36
|
+
"THIRD_PARTY_NOTICES.md",
|
|
37
|
+
"licenses"
|
|
38
|
+
],
|
|
39
|
+
"dependencies": {},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"@earendil-works/pi-ai": "*"
|
|
42
|
+
},
|
|
43
|
+
"main": "./dist/index.js"
|
|
44
|
+
}
|