@ampcode/plugin 0.0.0-20260713002820-gaa17198 → 0.0.0-20260715002409-g49e2b92

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.
Files changed (2) hide show
  1. package/index.d.ts +12 -9
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -126,7 +126,7 @@ declare module '@ampcode/plugin' {
126
126
  * mode. Deprecated modes (`smart`, `deep`, `rush`) are accepted for
127
127
  * backward compatibility and spawn threads in their replacement mode.
128
128
  */
129
- getBuiltinAgent(mode: BuiltinAgentMode, options?: GetBuiltinAgentOptions): Agent
129
+ getBuiltinAgent(mode: BuiltinAgentMode): Agent
130
130
 
131
131
  /**
132
132
  * Register a custom agent mode that clients may show alongside built-in modes.
@@ -187,7 +187,7 @@ declare module '@ampcode/plugin' {
187
187
  * mode. Deprecated modes (`smart`, `deep`, `rush`) are accepted for
188
188
  * backward compatibility and spawn threads in their replacement mode.
189
189
  */
190
- getBuiltinAgent(mode: BuiltinAgentMode, options?: GetBuiltinAgentOptions): Agent
190
+ getBuiltinAgent(mode: BuiltinAgentMode): Agent
191
191
 
192
192
  /**
193
193
  * Register a custom agent mode that clients may show alongside built-in modes.
@@ -298,17 +298,10 @@ declare module '@ampcode/plugin' {
298
298
  export interface BuiltinAgentDefinition {
299
299
  readonly kind: 'builtin-agent'
300
300
  mode: BuiltinAgentMode
301
- /** Reasoning effort pinned on threads spawned from this agent. */
302
- reasoningEffort?: AgentReasoningEffort
303
301
  }
304
302
 
305
303
  export type AgentDefinition = CustomAgentDefinition | BuiltinAgentDefinition
306
304
 
307
- export interface GetBuiltinAgentOptions {
308
- /** Reasoning effort pinned on threads spawned from this agent. */
309
- reasoningEffort?: AgentReasoningEffort
310
- }
311
-
312
305
  export type AgentThreadExecutor =
313
306
  | 'local'
314
307
  | 'orb'
@@ -655,6 +648,16 @@ declare module '@ampcode/plugin' {
655
648
  */
656
649
  export interface PluginExecutor {
657
650
  readonly kind: PluginExecutorKind
651
+
652
+ /**
653
+ * Keep the current orb awake until the returned subscription is unsubscribed or the plugin
654
+ * process exits. The lease renews automatically and consumes orb runtime credits.
655
+ *
656
+ * Rejects when the plugin is not running inside an Amp-managed orb. This is a best-effort
657
+ * lease: manual pauses, insufficient credits, and provider runtime limits may still pause the
658
+ * orb.
659
+ */
660
+ keepAlive(): Promise<Subscription>
658
661
  }
659
662
 
660
663
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampcode/plugin",
3
- "version": "0.0.0-20260713002820-gaa17198",
3
+ "version": "0.0.0-20260715002409-g49e2b92",
4
4
  "description": "Amp Plugin API",
5
5
  "homepage": "https://ampcode.com/manual/plugin-api",
6
6
  "author": {