effect-cursor-sdk 0.1.1 → 0.2.1

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/dist/index.d.ts CHANGED
@@ -156,6 +156,164 @@ declare function mapCursorError(cause: unknown, context: CursorErrorContext & {
156
156
  }): CursorAuthenticationError | CursorRateLimitError | CursorIntegrationNotConnectedError | CursorConfigurationError | CursorNetworkError | CursorUnsupportedOperationError | CursorUnknownError;
157
157
  declare function mapCursorError(cause: unknown, context: CursorErrorContext): CursorAuthenticationError | CursorRateLimitError | CursorIntegrationNotConnectedError | CursorConfigurationError | CursorNetworkError | CursorUnknownError;
158
158
  //#endregion
159
+ //#region src/cursor-config.d.ts
160
+ /**
161
+ * Branded secret material for the Cursor API key.
162
+ *
163
+ * Values are held inside {@link Redacted} on {@link CursorConfig}; this schema
164
+ * only brands the decoded plaintext type so it cannot be confused with other
165
+ * strings at the type level.
166
+ */
167
+ declare const CursorApiKey: Schema.brand<Schema.Redacted<Schema.String>, "CursorApiKey">;
168
+ type CursorApiKey = typeof CursorApiKey.Type;
169
+ /**
170
+ * Branded model identifier from wrapper config.
171
+ *
172
+ * Populated from the `CURSOR_MODEL` environment variable when using
173
+ * {@link loadCursorConfig}.
174
+ */
175
+ declare const CursorModelId: Schema.brand<Schema.String, "CursorModelId">;
176
+ type CursorModelId = typeof CursorModelId.Type;
177
+ /**
178
+ * Branded local working directory for agent runs.
179
+ *
180
+ * Populated from `CURSOR_LOCAL_CWD` when using {@link loadCursorConfig}.
181
+ */
182
+ declare const CursorLocalCwd: Schema.brand<Schema.String, "CursorLocalCwd">;
183
+ type CursorLocalCwd = typeof CursorLocalCwd.Type;
184
+ declare const CursorConfig_base: Schema.Class<CursorConfig, Schema.Struct<{
185
+ readonly apiKey: Schema.optional<Schema.brand<Schema.Redacted<Schema.String>, "CursorApiKey">>;
186
+ readonly modelId: Schema.optional<Schema.brand<Schema.String, "CursorModelId">>;
187
+ readonly cwd: Schema.optional<Schema.brand<Schema.String, "CursorLocalCwd">>;
188
+ }>, {}>;
189
+ /**
190
+ * Minimal configuration owned by this wrapper.
191
+ *
192
+ * The SDK's `AgentOptions` type remains the source of truth for complete
193
+ * runtime options. This schema models environment-derived defaults only.
194
+ * Use {@link agentOptionsFromConfig} to merge those defaults into SDK-owned
195
+ * {@link AgentOptions} at the SDK boundary.
196
+ *
197
+ * @remarks
198
+ * **Preferred path:** Load defaults with {@link loadCursorConfig}, then call
199
+ * `CursorAgentService` methods such as `createFromConfig` (and related helpers)
200
+ * or merge manually with {@link agentOptionsFromConfig}. Passing plain
201
+ * {@link AgentOptions} directly to deprecated `create` / `resume` / `prompt` /
202
+ * `scoped` overloads may be removed in a future major version.
203
+ *
204
+ * @example
205
+ * ```ts
206
+ * const config = new CursorConfig({
207
+ * apiKey: Redacted.make(CursorApiKey.make(process.env.CURSOR_API_KEY!)),
208
+ * modelId: CursorModelId.make("composer-2"),
209
+ * cwd: CursorLocalCwd.make(process.cwd())
210
+ * })
211
+ * ```
212
+ *
213
+ * @see {@link cursorConfig}
214
+ * @see {@link loadCursorConfig}
215
+ *
216
+ * @category config
217
+ */
218
+ declare class CursorConfig extends CursorConfig_base {}
219
+ /**
220
+ * Effect Config descriptors for common Cursor environment variables.
221
+ *
222
+ * Reads `CURSOR_API_KEY`, `CURSOR_MODEL`, and `CURSOR_LOCAL_CWD` from the active
223
+ * Effect {@link ConfigProvider.ConfigProvider}. All fields are optional so
224
+ * callers can merge with explicit overrides via {@link agentOptionsFromConfig}.
225
+ *
226
+ * @example
227
+ * ```ts
228
+ * const config = yield* loadCursorConfig
229
+ * const options = agentOptionsFromConfig(config)
230
+ * ```
231
+ *
232
+ * @see {@link Config}
233
+ * @see {@link loadCursorConfig}
234
+ *
235
+ * @category config
236
+ */
237
+ declare const cursorConfig: Config.Config<{
238
+ apiKey: Option.Option<Redacted.Redacted<string>>;
239
+ modelId: Option.Option<string>;
240
+ cwd: Option.Option<string>;
241
+ }>;
242
+ /**
243
+ * Build SDK `AgentOptions` from wrapper config and optional overrides.
244
+ *
245
+ * This is the adapter from typed, redacted {@link CursorConfig} to the SDK's
246
+ * plain-string `apiKey` boundary. Prefer `CursorAgentService.createFromConfig`
247
+ * (and related methods) over building {@link AgentOptions} by hand.
248
+ *
249
+ * @param config - Wrapper-owned environment defaults.
250
+ * @param overrides - Complete or partial SDK-owned options to merge over the defaults.
251
+ *
252
+ * @example
253
+ * ```ts
254
+ * const options = agentOptionsFromConfig(config, {
255
+ * cloud: {
256
+ * repos: [{ url: "https://github.com/acme/app" }],
257
+ * autoCreatePR: true
258
+ * }
259
+ * })
260
+ * ```
261
+ *
262
+ * @see {@link CursorConfig}
263
+ * @see {@link AgentOptions}
264
+ *
265
+ * @remarks
266
+ * Explicit override values always win over environment-derived defaults.
267
+ * For application code, prefer service methods that take {@link CursorConfig}
268
+ * instead of calling this helper and then the deprecated `create` overload.
269
+ *
270
+ * @category config
271
+ */
272
+ declare const agentOptionsFromConfig: (config: CursorConfig, overrides?: AgentOptions) => AgentOptions;
273
+ /**
274
+ * Load environment-derived defaults as a schema-backed value.
275
+ * It uses ConfigProvider to load the environment variables
276
+ * with their default names (`CURSOR_API_KEY`, `CURSOR_MODEL`, `CURSOR_LOCAL_CWD`)
277
+ * from {@link cursorConfig}.
278
+ *
279
+ * @example
280
+ * ```ts
281
+ * const config = yield* loadCursorConfig
282
+ * const options = agentOptionsFromConfig(config, { local: { cwd: process.cwd() } })
283
+ * // Or use CursorAgentService.createFromConfig(config, { local: { cwd: process.cwd() } })
284
+ * ```
285
+ *
286
+ * To change the way that the environment variables are loaded,
287
+ * you can do it with Effect by providing a custom ConfigProvider.
288
+ *
289
+ * ```ts
290
+ * // For example: load via custom environment object
291
+ * const config = yield* loadCursorConfig.pipe(
292
+ * Effect.provideService(
293
+ * ConfigProvider.ConfigProvider,
294
+ * ConfigProvider.fromEnv({
295
+ * env: {
296
+ * CURSOR_API_KEY: "crsr_******",
297
+ * CURSOR_MODEL: "composer-2",
298
+ * CURSOR_LOCAL_CWD: "/workspace",
299
+ * },
300
+ * }),
301
+ * ),
302
+ * )
303
+ * ```
304
+ *
305
+ * @see {@link cursorConfig}
306
+ * @see {@link agentOptionsFromConfig}
307
+ *
308
+ * @remarks
309
+ * This effect is the preferred entry for redacted environment defaults.
310
+ * Pair it with {@link agentOptionsFromConfig} or `CursorAgentService` helpers
311
+ * such as `createFromConfig`.
312
+ *
313
+ * @category config
314
+ */
315
+ declare const loadCursorConfig: Effect.Effect<CursorConfig, Config.ConfigError, never>;
316
+ //#endregion
159
317
  //#region src/cursor-sdk-factory.d.ts
160
318
  /**
161
319
  * Thin boundary around the static `@cursor/sdk` APIs.
@@ -187,17 +345,29 @@ declare function mapCursorError(cause: unknown, context: CursorErrorContext): Cu
187
345
  * @see {@link CursorArtifactService} for artifact APIs on an SDK agent.
188
346
  *
189
347
  * @remarks
190
- * **API boundary notice:** `create`, `resume`, and `prompt` take raw
191
- * {@link AgentOptions} today; the same possible future change described on
192
- * {@link CursorAgentServiceShape} may apply here. Prefer
193
- * {@link loadCursorConfig} with {@link agentOptionsFromConfig} before calling
194
- * these methods when wiring production code.
348
+ * **Deprecated for application code:** `create`, `resume`, and `prompt` accept
349
+ * raw {@link AgentOptions} (including a plain `apiKey` string). Prefer
350
+ * {@link CursorAgentService} with `loadCursorConfig` and `createFromConfig` /
351
+ * `resumeFromConfig` / `promptFromConfig` from this package instead.
352
+ * This factory remains the low-level adapter for tests and advanced overrides.
195
353
  *
196
354
  * @category services
197
355
  */
198
356
  interface CursorSdkFactoryShape {
357
+ /**
358
+ * @deprecated Prefer {@link CursorAgentService} with config-based helpers.
359
+ * Low-level adapter to `Agent.create`.
360
+ */
199
361
  readonly create: (options: AgentOptions) => Promise<SDKAgent>;
362
+ /**
363
+ * @deprecated Prefer {@link CursorAgentService} with config-based helpers.
364
+ * Low-level adapter to `Agent.resume`.
365
+ */
200
366
  readonly resume: (agentId: string, options?: Partial<AgentOptions>) => Promise<SDKAgent>;
367
+ /**
368
+ * @deprecated Prefer {@link CursorAgentService} with config-based helpers.
369
+ * Low-level adapter to `Agent.prompt`.
370
+ */
201
371
  readonly prompt: (message: string, options?: AgentOptions) => Promise<RunResult>;
202
372
  readonly listAgents: (options?: ListAgentsOptions) => Promise<ListResult<SDKAgentInfo>>;
203
373
  readonly listRuns: (agentId: string, options?: ListRunsOptions) => Promise<ListResult<Run>>;
@@ -220,9 +390,13 @@ declare const CursorSdkFactory_base: Context.ServiceClass<CursorSdkFactory, "eff
220
390
  *
221
391
  * @example
222
392
  * ```ts
393
+ * import { CursorSdkFactory, agentOptionsFromConfig, loadCursorConfig } from "effect-cursor-sdk"
394
+ * import { Effect } from "effect"
395
+ *
223
396
  * const program = Effect.gen(function*() {
224
397
  * const sdk = yield* CursorSdkFactory
225
- * return sdk.create({ model: { id: "composer-2" }, local: { cwd: process.cwd() } })
398
+ * const config = yield* loadCursorConfig
399
+ * return sdk.create(agentOptionsFromConfig(config, { model: { id: "composer-2" } }))
226
400
  * })
227
401
  * ```
228
402
  *
@@ -239,22 +413,80 @@ declare class CursorSdkFactory extends CursorSdkFactory_base {
239
413
  * Agent lifecycle surface backed by the Cursor SDK.
240
414
  *
241
415
  * @remarks
242
- * **API boundary notice:** `create`, `resume`, `prompt`, and `scoped` currently
243
- * accept raw {@link AgentOptions} (including a plain `apiKey` string). A future
244
- * major version may require options to flow through Effectful {@link CursorConfig}
245
- * with {@link loadCursorConfig} and {@link agentOptionsFromConfig} instead of
246
- * passing `AgentOptions` at this boundary. Prefer the config path for new code;
247
- * see the package README.
416
+ * Prefer {@link loadCursorConfig} with {@link CursorAgentServiceShape.createFromConfig},
417
+ * {@link CursorAgentServiceShape.resumeFromConfig},
418
+ * {@link CursorAgentServiceShape.promptFromConfig}, and
419
+ * {@link CursorAgentServiceShape.scopedFromConfig}
420
+ * so secrets stay in `Redacted` form until {@link agentOptionsFromConfig}
421
+ * merges into SDK {@link AgentOptions}. Plain {@link AgentOptions} entry points
422
+ * are deprecated; see `DEPRECATIONS.md` and the README at the package root.
248
423
  */
249
424
  interface CursorAgentServiceShape {
425
+ /**
426
+ * @deprecated Prefer {@link CursorAgentServiceShape.createFromConfig} with {@link loadCursorConfig}
427
+ * instead of raw {@link AgentOptions} (including a plain `apiKey` string). Next major: `createFromConfig`
428
+ * is planned to become `create` with the same parameters.
429
+ */
250
430
  readonly create: (options: AgentOptions) => Effect.Effect<SDKAgent, CursorAuthenticationError | CursorRateLimitError | CursorIntegrationNotConnectedError | CursorConfigurationError | CursorNetworkError | CursorUnknownError>;
431
+ /**
432
+ * Create an agent from {@link CursorConfig} and optional SDK overrides.
433
+ *
434
+ * @remarks
435
+ * Next major: planned rename to `create` with the same signature once plain-`AgentOptions` entry points are removed.
436
+ *
437
+ * @see {@link loadCursorConfig}
438
+ * @see {@link agentOptionsFromConfig}
439
+ */
440
+ readonly createFromConfig: (config: CursorConfig, overrides?: AgentOptions) => Effect.Effect<SDKAgent, CursorAuthenticationError | CursorRateLimitError | CursorIntegrationNotConnectedError | CursorConfigurationError | CursorNetworkError | CursorUnknownError>;
441
+ /**
442
+ * @deprecated Prefer {@link CursorAgentServiceShape.resumeFromConfig} with {@link loadCursorConfig}
443
+ * instead of raw {@link AgentOptions}. Next major: `resumeFromConfig` is planned to become `resume` with the same parameters.
444
+ */
251
445
  readonly resume: (agentId: string, options?: Partial<AgentOptions>) => Effect.Effect<SDKAgent, CursorAuthenticationError | CursorRateLimitError | CursorIntegrationNotConnectedError | CursorConfigurationError | CursorNetworkError | CursorUnknownError>;
446
+ /**
447
+ * Resume an agent from {@link CursorConfig} and optional SDK overrides.
448
+ *
449
+ * @remarks
450
+ * Next major: planned rename to `resume` with the same signature once plain-`AgentOptions` entry points are removed.
451
+ *
452
+ * @see {@link loadCursorConfig}
453
+ * @see {@link agentOptionsFromConfig}
454
+ */
455
+ readonly resumeFromConfig: (agentId: string, config: CursorConfig, overrides?: AgentOptions) => Effect.Effect<SDKAgent, CursorAuthenticationError | CursorRateLimitError | CursorIntegrationNotConnectedError | CursorConfigurationError | CursorNetworkError | CursorUnknownError>;
456
+ /**
457
+ * @deprecated Prefer {@link CursorAgentServiceShape.promptFromConfig} with {@link loadCursorConfig}
458
+ * instead of raw {@link AgentOptions}. Next major: `promptFromConfig` is planned to become `prompt` with the same parameters.
459
+ */
252
460
  readonly prompt: (message: string, options?: AgentOptions) => Effect.Effect<RunResult, CursorAuthenticationError | CursorRateLimitError | CursorIntegrationNotConnectedError | CursorConfigurationError | CursorNetworkError | CursorUnknownError>;
461
+ /**
462
+ * One-shot prompt from {@link CursorConfig} and optional SDK overrides.
463
+ *
464
+ * @remarks
465
+ * Next major: planned rename to `prompt` with the same signature once plain-`AgentOptions` entry points are removed.
466
+ *
467
+ * @see {@link loadCursorConfig}
468
+ * @see {@link agentOptionsFromConfig}
469
+ */
470
+ readonly promptFromConfig: (message: string, config: CursorConfig, overrides?: AgentOptions) => Effect.Effect<RunResult, CursorAuthenticationError | CursorRateLimitError | CursorIntegrationNotConnectedError | CursorConfigurationError | CursorNetworkError | CursorUnknownError>;
253
471
  readonly send: (agent: SDKAgent, message: string | SDKUserMessage, options?: SendOptions) => Effect.Effect<Run, CursorAuthenticationError | CursorRateLimitError | CursorIntegrationNotConnectedError | CursorConfigurationError | CursorNetworkError | CursorUnknownError>;
254
472
  readonly reload: (agent: SDKAgent) => Effect.Effect<void, CursorAuthenticationError | CursorRateLimitError | CursorIntegrationNotConnectedError | CursorConfigurationError | CursorNetworkError | CursorUnknownError>;
255
473
  readonly close: (agent: SDKAgent) => Effect.Effect<void>;
256
474
  readonly dispose: (agent: SDKAgent) => Effect.Effect<void, CursorAuthenticationError | CursorRateLimitError | CursorIntegrationNotConnectedError | CursorConfigurationError | CursorNetworkError | CursorUnknownError>;
475
+ /**
476
+ * @deprecated Prefer {@link CursorAgentServiceShape.scopedFromConfig} with {@link loadCursorConfig}
477
+ * instead of raw {@link AgentOptions}. Next major: `scopedFromConfig` is planned to become `scoped` with the same parameters.
478
+ */
257
479
  readonly scoped: (options: AgentOptions) => Effect.Effect<SDKAgent, CursorAuthenticationError | CursorRateLimitError | CursorIntegrationNotConnectedError | CursorConfigurationError | CursorNetworkError | CursorUnknownError, Scope.Scope>;
480
+ /**
481
+ * Acquire an agent in a scope from {@link CursorConfig} and optional SDK overrides.
482
+ *
483
+ * @remarks
484
+ * Next major: planned rename to `scoped` with the same signature once plain-`AgentOptions` entry points are removed.
485
+ *
486
+ * @see {@link loadCursorConfig}
487
+ * @see {@link agentOptionsFromConfig}
488
+ */
489
+ readonly scopedFromConfig: (config: CursorConfig, overrides?: AgentOptions) => Effect.Effect<SDKAgent, CursorAuthenticationError | CursorRateLimitError | CursorIntegrationNotConnectedError | CursorConfigurationError | CursorNetworkError | CursorUnknownError, Scope.Scope>;
258
490
  }
259
491
  declare const CursorAgentService_base: Context.ServiceClass<CursorAgentService, "effect-cursor-sdk/cursor-agent/CursorAgentService", CursorAgentServiceShape>;
260
492
  /**
@@ -266,12 +498,16 @@ declare const CursorAgentService_base: Context.ServiceClass<CursorAgentService,
266
498
  *
267
499
  * @example
268
500
  * ```ts
269
- * import { CursorAgentService, liveLayer } from "effect-cursor-sdk"
501
+ * import { CursorAgentService, liveLayer, loadCursorConfig } from "effect-cursor-sdk"
270
502
  * import { Effect } from "effect"
271
503
  *
272
504
  * const program = Effect.gen(function*() {
273
505
  * const agents = yield* CursorAgentService
274
- * const agent = yield* agents.create({ model: { id: "composer-2" }, local: { cwd: process.cwd() } })
506
+ * const config = yield* loadCursorConfig
507
+ * const agent = yield* agents.createFromConfig(config, {
508
+ * model: { id: "composer-2" },
509
+ * local: { cwd: process.cwd() },
510
+ * })
275
511
  * return yield* agents.send(agent, "Summarize this repository")
276
512
  * }).pipe(Effect.provide(liveLayer))
277
513
  * ```
@@ -280,9 +516,11 @@ declare const CursorAgentService_base: Context.ServiceClass<CursorAgentService,
280
516
  * @see {@link CursorSdkFactory} for replacing SDK construction in tests.
281
517
  *
282
518
  * @remarks
283
- * Inherits the **API boundary notice** on {@link CursorAgentServiceShape} about
284
- * a possible future switch from raw {@link AgentOptions} to
285
- * {@link loadCursorConfig} / {@link agentOptionsFromConfig}.
519
+ * Prefer {@link CursorAgentServiceShape.createFromConfig} and related methods
520
+ * with {@link loadCursorConfig}; raw {@link AgentOptions} on
521
+ * {@link CursorAgentServiceShape.create} and siblings are deprecated.
522
+ * See `DEPRECATIONS.md` at the package root for migration and planned next-major renames
523
+ * (`createFromConfig` → `create`, etc.).
286
524
  *
287
525
  * @category services
288
526
  */
@@ -314,139 +552,6 @@ declare class CursorArtifactService extends CursorArtifactService_base {
314
552
  static readonly Live: Layer.Layer<CursorArtifactService, never, never>;
315
553
  }
316
554
  //#endregion
317
- //#region src/cursor-config.d.ts
318
- /**
319
- * Branded secret material for the Cursor API key.
320
- *
321
- * Values are held inside {@link Redacted} on {@link CursorConfig}; this schema
322
- * only brands the decoded plaintext type so it cannot be confused with other
323
- * strings at the type level.
324
- */
325
- declare const CursorApiKey: Schema.brand<Schema.Redacted<Schema.String>, "CursorApiKey">;
326
- type CursorApiKey = typeof CursorApiKey.Type;
327
- /**
328
- * Branded model identifier from wrapper config.
329
- *
330
- * Populated from the `CURSOR_MODEL` environment variable when using
331
- * {@link loadCursorConfig}.
332
- */
333
- declare const CursorModelId: Schema.brand<Schema.String, "CursorModelId">;
334
- type CursorModelId = typeof CursorModelId.Type;
335
- /**
336
- * Branded local working directory for agent runs.
337
- *
338
- * Populated from `CURSOR_LOCAL_CWD` when using {@link loadCursorConfig}.
339
- */
340
- declare const CursorLocalCwd: Schema.brand<Schema.String, "CursorLocalCwd">;
341
- type CursorLocalCwd = typeof CursorLocalCwd.Type;
342
- declare const CursorConfig_base: Schema.Class<CursorConfig, Schema.Struct<{
343
- readonly apiKey: Schema.optional<Schema.brand<Schema.Redacted<Schema.String>, "CursorApiKey">>;
344
- readonly modelId: Schema.optional<Schema.brand<Schema.String, "CursorModelId">>;
345
- readonly cwd: Schema.optional<Schema.brand<Schema.String, "CursorLocalCwd">>;
346
- }>, {}>;
347
- /**
348
- * Minimal configuration owned by this wrapper.
349
- *
350
- * The SDK's `AgentOptions` type remains the source of truth for complete
351
- * runtime options. This schema only models environment-derived defaults.
352
- * Use {@link agentOptionsFromConfig} to merge those defaults into SDK-owned
353
- * {@link AgentOptions}.
354
- *
355
- * @remarks
356
- * **Forward path:** A future major version of this package may require all
357
- * agent-related options to be supplied through this module (for example
358
- * {@link loadCursorConfig} plus {@link agentOptionsFromConfig}) instead of raw
359
- * {@link AgentOptions} on {@link CursorAgentService}.
360
- * Prefer this path for new code.
361
- *
362
- * @example
363
- * ```ts
364
- * const config = new CursorConfig({
365
- * apiKey: Redacted.make(CursorApiKey.make(process.env.CURSOR_API_KEY!)),
366
- * modelId: CursorModelId.make("composer-2"),
367
- * cwd: CursorLocalCwd.make(process.cwd())
368
- * })
369
- * ```
370
- *
371
- * @see {@link cursorConfig}
372
- * @see {@link loadCursorConfig}
373
- *
374
- * @category config
375
- */
376
- declare class CursorConfig extends CursorConfig_base {}
377
- /**
378
- * Effect Config descriptors for common Cursor environment variables.
379
- *
380
- * Reads `CURSOR_API_KEY`, `CURSOR_MODEL`, and `CURSOR_LOCAL_CWD` from the active
381
- * Effect {@link ConfigProvider.ConfigProvider}. All fields are optional so
382
- * callers can still pass complete SDK options explicitly.
383
- *
384
- * @example
385
- * ```ts
386
- * const config = yield* loadCursorConfig
387
- * const options = agentOptionsFromConfig(config)
388
- * ```
389
- *
390
- * @see {@link Config}
391
- * @see {@link loadCursorConfig}
392
- *
393
- * @category config
394
- */
395
- declare const cursorConfig: Config.Config<{
396
- apiKey: Option.Option<Redacted.Redacted<string>>;
397
- modelId: Option.Option<string>;
398
- cwd: Option.Option<string>;
399
- }>;
400
- /**
401
- * Build SDK `AgentOptions` from wrapper config and optional overrides.
402
- *
403
- * Explicit override values always win over environment-derived defaults.
404
- *
405
- * @param config - Wrapper-owned environment defaults.
406
- * @param overrides - Complete or partial SDK-owned options to merge over the defaults.
407
- *
408
- * @example
409
- * ```ts
410
- * const options = agentOptionsFromConfig(config, {
411
- * cloud: {
412
- * repos: [{ url: "https://github.com/acme/app" }],
413
- * autoCreatePR: true
414
- * }
415
- * })
416
- * ```
417
- *
418
- * @see {@link CursorConfig}
419
- * @see {@link AgentOptions}
420
- *
421
- * @remarks
422
- * Same **forward path** notice as {@link CursorConfig}: this merge is the
423
- * intended boundary for redacted keys and env defaults ahead of a possible
424
- * requirement to use it for all agent entry points.
425
- *
426
- * @category config
427
- */
428
- declare const agentOptionsFromConfig: (config: CursorConfig, overrides?: AgentOptions) => AgentOptions;
429
- /**
430
- * Load environment-derived defaults as a schema-backed value.
431
- *
432
- * @example
433
- * ```ts
434
- * const config = yield* loadCursorConfig
435
- * const options = agentOptionsFromConfig(config, { local: { cwd: process.cwd() } })
436
- * ```
437
- *
438
- * @see {@link cursorConfig}
439
- * @see {@link agentOptionsFromConfig}
440
- *
441
- * @remarks
442
- * Same **forward path** notice as {@link CursorConfig}: this effect is the
443
- * intended entry for redacted env defaults ahead of a possible requirement to
444
- * use it (with {@link agentOptionsFromConfig}) for all agent entry points.
445
- *
446
- * @category config
447
- */
448
- declare const loadCursorConfig: Effect.Effect<CursorConfig, Config.ConfigError, never>;
449
- //#endregion
450
555
  //#region src/cursor-inspection.d.ts
451
556
  interface CursorInspectionServiceShape {
452
557
  readonly listAgents: (options?: ListAgentsOptions) => Effect.Effect<ListResult<SDKAgentInfo>, CursorAuthenticationError | CursorRateLimitError | CursorIntegrationNotConnectedError | CursorConfigurationError | CursorNetworkError | CursorUnknownError>;
@@ -665,7 +770,7 @@ declare class CursorRunService extends CursorRunService_base {
665
770
  *
666
771
  * @category layers
667
772
  */
668
- declare const liveLayer: Layer.Layer<CursorAgentService | CursorSdkFactory | CursorArtifactService | CursorRunService | CursorInspectionService, never, never>;
773
+ declare const liveLayer: Layer.Layer<CursorAgentService | CursorSdkFactory | CursorArtifactService | CursorInspectionService | CursorRunService, never, never>;
669
774
  /**
670
775
  * Deterministic mock layer for tests and examples.
671
776
  *
@@ -683,7 +788,7 @@ declare const liveLayer: Layer.Layer<CursorAgentService | CursorSdkFactory | Cur
683
788
  *
684
789
  * @category layers
685
790
  */
686
- declare const mockLayer: (fixtures?: CursorMockFixtures) => Layer.Layer<CursorAgentService | CursorSdkFactory | CursorArtifactService | CursorRunService | CursorInspectionService, never, never>;
791
+ declare const mockLayer: (fixtures?: CursorMockFixtures) => Layer.Layer<CursorAgentService | CursorSdkFactory | CursorArtifactService | CursorInspectionService | CursorRunService, never, never>;
687
792
  /**
688
793
  * Ready-made live runtime.
689
794
  *
@@ -699,7 +804,7 @@ declare const mockLayer: (fixtures?: CursorMockFixtures) => Layer.Layer<CursorAg
699
804
  *
700
805
  * @category runtimes
701
806
  */
702
- declare const liveRuntime: ManagedRuntime.ManagedRuntime<CursorAgentService | CursorSdkFactory | CursorArtifactService | CursorRunService | CursorInspectionService, never>;
807
+ declare const liveRuntime: ManagedRuntime.ManagedRuntime<CursorAgentService | CursorSdkFactory | CursorArtifactService | CursorInspectionService | CursorRunService, never>;
703
808
  /**
704
809
  * Ready-made mock runtime.
705
810
  *
@@ -716,7 +821,7 @@ declare const liveRuntime: ManagedRuntime.ManagedRuntime<CursorAgentService | Cu
716
821
  *
717
822
  * @category runtimes
718
823
  */
719
- declare const makeMockRuntime: (fixtures?: CursorMockFixtures) => ManagedRuntime.ManagedRuntime<CursorAgentService | CursorSdkFactory | CursorArtifactService | CursorRunService | CursorInspectionService, never>;
824
+ declare const makeMockRuntime: (fixtures?: CursorMockFixtures) => ManagedRuntime.ManagedRuntime<CursorAgentService | CursorSdkFactory | CursorArtifactService | CursorInspectionService | CursorRunService, never>;
720
825
  //#endregion
721
826
  //#region src/cursor-telemetry.d.ts
722
827
  /**