@stablekernel/opencode-cursor 0.7.0 → 0.7.1-next.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/CHANGELOG.md +38 -0
- package/README.md +83 -4
- package/dist/{chunk-COE6ZXMP.js → chunk-RDY3H2LE.js} +7 -6
- package/dist/chunk-RDY3H2LE.js.map +1 -0
- package/dist/plugin/index.js +795 -8
- package/dist/plugin/index.js.map +1 -1
- package/dist/provider/index.d.ts +7 -0
- package/dist/provider/index.js +6 -2
- package/dist/provider/index.js.map +1 -1
- package/package.json +2 -1
- package/dist/chunk-COE6ZXMP.js.map +0 -1
package/dist/provider/index.d.ts
CHANGED
|
@@ -105,6 +105,13 @@ interface CursorProviderOptions {
|
|
|
105
105
|
* Beats OPENCODE_CURSOR_TRANSPORT. Process-global: last provider to set it wins.
|
|
106
106
|
*/
|
|
107
107
|
transport?: "http1" | "http2-direct" | "sidecar";
|
|
108
|
+
/**
|
|
109
|
+
* `<available_skills>` catalogue text appended to the generated system rule,
|
|
110
|
+
* listing mirrored skills so the Cursor agent can discover and load them on
|
|
111
|
+
* demand. Seeded by the plugin's `config` hook from the resolved skill set.
|
|
112
|
+
* When undefined, no skills section is appended.
|
|
113
|
+
*/
|
|
114
|
+
skillsCatalogue?: string;
|
|
108
115
|
}
|
|
109
116
|
/**
|
|
110
117
|
* Cursor provider for the Vercel AI SDK (V3), backed by the official
|
package/dist/provider/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
setPreferredTransport,
|
|
15
15
|
streamAgentTurn,
|
|
16
16
|
withSessionLock
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-RDY3H2LE.js";
|
|
18
18
|
|
|
19
19
|
// src/provider/index.ts
|
|
20
20
|
import { NoSuchModelError } from "@ai-sdk/provider";
|
|
@@ -1263,11 +1263,14 @@ var CursorLanguageModel = class {
|
|
|
1263
1263
|
record2,
|
|
1264
1264
|
latestUser?.text ?? JSON.stringify(options.prompt)
|
|
1265
1265
|
);
|
|
1266
|
+
const dynamicSkillsCatalogue = typeof providerOptions?.["skillsCatalogue"] === "string" ? providerOptions["skillsCatalogue"] : void 0;
|
|
1267
|
+
const skillsCatalogue = dynamicSkillsCatalogue ?? this.config.skillsCatalogue;
|
|
1266
1268
|
const delivery = resolveSystemDelivery({
|
|
1267
1269
|
mode: this.config.systemPrompt ?? "rules",
|
|
1268
1270
|
settingSources: this.config.settingSources,
|
|
1269
1271
|
cwd: this.config.cwd,
|
|
1270
1272
|
systemText: extractSystemText(options.prompt),
|
|
1273
|
+
skillsCatalogue,
|
|
1271
1274
|
warn: (message) => this.warnOnce(message)
|
|
1272
1275
|
});
|
|
1273
1276
|
const systemMode2 = delivery.mode;
|
|
@@ -1447,7 +1450,8 @@ function createCursor(options = {}) {
|
|
|
1447
1450
|
...options.agents ? { agents: options.agents } : {},
|
|
1448
1451
|
session: options.session ?? "auto",
|
|
1449
1452
|
toolDisplay: options.toolDisplay ?? "blocks",
|
|
1450
|
-
systemPrompt: options.systemPrompt ?? "rules"
|
|
1453
|
+
systemPrompt: options.systemPrompt ?? "rules",
|
|
1454
|
+
...options.skillsCatalogue ? { skillsCatalogue: options.skillsCatalogue } : {}
|
|
1451
1455
|
};
|
|
1452
1456
|
const notImplemented = (kind, modelId) => {
|
|
1453
1457
|
throw new NoSuchModelError({
|