@twelvehart/cursor-agents 0.1.0 → 0.2.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 CHANGED
@@ -100,9 +100,9 @@ const repos = await client.repositories();
100
100
 
101
101
  ## Publishing
102
102
 
103
- This repository is set up to publish `@twelvehart/cursor-agents` from GitHub Actions when a `v*` tag is pushed. The publish workflow runs lint, typecheck, unit tests, a build, a CLI smoke test, and `npm pack --dry-run` before publishing.
103
+ This repository is set up to publish `@twelvehart/cursor-agents` with `release-please`. Commits merged to `main` update or create a release PR, and merging that PR triggers a GitHub release plus npm publish after lint, typecheck, unit tests, build, CLI smoke test, and `npm pack --dry-run`.
104
104
 
105
- To make the workflow actually publish on npm, configure npm trusted publishing for the `@twelvehart/cursor-agents` package and point it at `.github/workflows/publish.yml`. npms current docs recommend trusted publishing with GitHub-hosted runners and `id-token: write` instead of long-lived `NPM_TOKEN` secrets.
105
+ To make the workflow actually publish on npm, configure npm trusted publishing for the `@twelvehart/cursor-agents` package and point it at `.github/workflows/release-please.yml`. npm's current docs recommend trusted publishing with GitHub-hosted runners and `id-token: write` instead of long-lived `NPM_TOKEN` secrets.
106
106
 
107
107
  ## CLI Usage
108
108
 
package/dist/cli/index.js CHANGED
@@ -2547,6 +2547,9 @@ var {
2547
2547
  Help
2548
2548
  } = import__.default;
2549
2549
 
2550
+ // src/index.ts
2551
+ import { createRequire as createRequire2 } from "node:module";
2552
+
2550
2553
  // node_modules/zod/v4/classic/external.js
2551
2554
  var exports_external = {};
2552
2555
  __export(exports_external, {
@@ -16350,6 +16353,20 @@ class BaseClient {
16350
16353
 
16351
16354
  // src/index.ts
16352
16355
  init_errors();
16356
+ var require2 = createRequire2(import.meta.url);
16357
+ var packageJson = readPackageJson();
16358
+ var VERSION = packageJson.version;
16359
+ function readPackageJson() {
16360
+ for (const path of ["../package.json", "../../package.json"]) {
16361
+ try {
16362
+ return require2(path);
16363
+ } catch {
16364
+ continue;
16365
+ }
16366
+ }
16367
+ throw new Error("Unable to resolve package.json for version metadata.");
16368
+ }
16369
+
16353
16370
  class CursorAgents {
16354
16371
  agents;
16355
16372
  client;
@@ -16529,6 +16546,17 @@ function validateCreateOptions(opts) {
16529
16546
  }
16530
16547
  });
16531
16548
  }
16549
+ if (opts.repo && opts.pr) {
16550
+ throw new CursorAgentsError({
16551
+ code: "bad_request",
16552
+ status: 400,
16553
+ message: "--repo and --pr are mutually exclusive.",
16554
+ details: {
16555
+ hint: "--repo starts from a repository branch. --pr starts from an existing pull request.",
16556
+ nextStep: "Pick exactly one source mode: use --repo <owner/repo> for repository-based runs or --pr <url> for PR-based runs."
16557
+ }
16558
+ });
16559
+ }
16532
16560
  if (!opts.prompt && !opts.promptFile) {
16533
16561
  throw new CursorAgentsError({
16534
16562
  code: "bad_request",
@@ -16982,7 +17010,7 @@ function registerModelsCommands(program2, getClient) {
16982
17010
 
16983
17011
  // src/cli/index.ts
16984
17012
  var program2 = new Command;
16985
- program2.name("cursor-agents").description("CLI for the Cursor Cloud Agents API").version("0.1.0").option("--json", "Output structured JSON").option("--api-key <key>", "API key (overrides CURSOR_API_KEY env)").option("--base-url <url>", "Override API base URL").option("--quiet", "Suppress non-essential output");
17013
+ program2.name("cursor-agents").description("CLI for the Cursor Cloud Agents API").version(VERSION).option("--json", "Output structured JSON").option("--api-key <key>", "API key (overrides CURSOR_API_KEY env)").option("--base-url <url>", "Override API base URL").option("--quiet", "Suppress non-essential output");
16986
17014
  var clientInstance;
16987
17015
  function getClient() {
16988
17016
  if (!clientInstance) {
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import { AgentsAPI } from "./agents";
2
2
  import { ArtifactsAPI } from "./artifacts";
3
3
  import { type ClientOptions } from "./client";
4
4
  import { type MeResponse, type ModelsResponse, type RepositoriesResponse } from "./schemas";
5
- export declare const VERSION = "0.1.0";
5
+ export declare const VERSION: string;
6
6
  export declare class CursorAgents {
7
7
  readonly agents: AgentsAPI & {
8
8
  artifacts: ArtifactsAPI;
package/dist/index.js CHANGED
@@ -438,6 +438,9 @@ var require_main = __commonJS((exports, module) => {
438
438
  module.exports = DotenvModule;
439
439
  });
440
440
 
441
+ // src/index.ts
442
+ import { createRequire as createRequire2 } from "node:module";
443
+
441
444
  // node_modules/zod/v4/classic/external.js
442
445
  var exports_external = {};
443
446
  __export(exports_external, {
@@ -14241,7 +14244,19 @@ class BaseClient {
14241
14244
 
14242
14245
  // src/index.ts
14243
14246
  init_errors();
14244
- var VERSION = "0.1.0";
14247
+ var require2 = createRequire2(import.meta.url);
14248
+ var packageJson = readPackageJson();
14249
+ var VERSION = packageJson.version;
14250
+ function readPackageJson() {
14251
+ for (const path of ["../package.json", "../../package.json"]) {
14252
+ try {
14253
+ return require2(path);
14254
+ } catch {
14255
+ continue;
14256
+ }
14257
+ }
14258
+ throw new Error("Unable to resolve package.json for version metadata.");
14259
+ }
14245
14260
 
14246
14261
  class CursorAgents {
14247
14262
  agents;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twelvehart/cursor-agents",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "TypeScript SDK and CLI for the Cursor Cloud Agents API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -27,7 +27,12 @@
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
- "files": ["bin", "dist", "README.md", "LICENSE"],
30
+ "files": [
31
+ "bin",
32
+ "dist",
33
+ "README.md",
34
+ "LICENSE"
35
+ ],
31
36
  "license": "MIT",
32
37
  "repository": {
33
38
  "type": "git",