@ampcode/plugin 0.0.0-20260831001943-g13de2d7 → 0.0.0-20260902001824-gcbd038f
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/index.d.ts +46 -6
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// sitemap-lastmod: /docs/plugin-api 2026-
|
|
1
|
+
// sitemap-lastmod: /docs/plugin-api 2026-09-01
|
|
2
2
|
|
|
3
3
|
declare module '@ampcode/plugin' {
|
|
4
4
|
/**
|
|
@@ -156,11 +156,11 @@ declare module '@ampcode/plugin' {
|
|
|
156
156
|
onDispose(callback: () => void | Promise<void>): Subscription
|
|
157
157
|
|
|
158
158
|
/**
|
|
159
|
-
* Register a durable generic webhook for this plugin
|
|
159
|
+
* Register a durable generic webhook for this plugin in an Amp-managed Orb.
|
|
160
160
|
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
* URL as a credential.
|
|
161
|
+
* Project threads owned by the same user share a registration for each plugin and key.
|
|
162
|
+
* Threads without a project keep a separate registration for each thread. Re-registering
|
|
163
|
+
* returns the same capability URL. Treat the URL as a credential.
|
|
164
164
|
*
|
|
165
165
|
* Handler side effects are delivered at least once. Use `event.id` as an
|
|
166
166
|
* idempotency key because an executor can stop after the handler succeeds but
|
|
@@ -375,6 +375,19 @@ declare module '@ampcode/plugin' {
|
|
|
375
375
|
tools?: AgentToolSelection
|
|
376
376
|
/** Optional reasoning effort override for models that support it. */
|
|
377
377
|
reasoningEffort?: AgentReasoningEffort
|
|
378
|
+
/**
|
|
379
|
+
* Model and reasoning effort for the Oracle consulted from threads running this
|
|
380
|
+
* agent. Omitted fields keep Amp's automatic routing and default effort. An
|
|
381
|
+
* unavailable model falls back to Amp's routing at run time.
|
|
382
|
+
*/
|
|
383
|
+
oracle?: AgentSubagentPin
|
|
384
|
+
/**
|
|
385
|
+
* Model and reasoning effort for the other subagents spawned from threads running
|
|
386
|
+
* this agent (Task workers, finder, thread reader, librarian). Omitted fields keep
|
|
387
|
+
* Amp's automatic routing and default effort. An unavailable model falls back to
|
|
388
|
+
* Amp's routing at run time.
|
|
389
|
+
*/
|
|
390
|
+
subagents?: AgentSubagentPin
|
|
378
391
|
/**
|
|
379
392
|
* Estimated input-token count at which Amp automatically compacts the thread.
|
|
380
393
|
* Must be a positive safe integer. When omitted, Amp uses the configured
|
|
@@ -397,6 +410,20 @@ declare module '@ampcode/plugin' {
|
|
|
397
410
|
display?: AgentDisplay
|
|
398
411
|
}
|
|
399
412
|
|
|
413
|
+
/**
|
|
414
|
+
* A model pin for one subagent role of a custom agent: the Oracle or the other subagents.
|
|
415
|
+
* Each field overrides independently.
|
|
416
|
+
*/
|
|
417
|
+
export interface AgentSubagentPin {
|
|
418
|
+
/**
|
|
419
|
+
* Model identifier in `provider/model` format, such as `anthropic/claude-sonnet-4-6`.
|
|
420
|
+
* Omit to keep Amp's automatic model routing for the role.
|
|
421
|
+
*/
|
|
422
|
+
model?: PluginAgentModel
|
|
423
|
+
/** Reasoning effort for the role's model. Omit to keep the role's default effort. */
|
|
424
|
+
effort?: AgentReasoningEffort
|
|
425
|
+
}
|
|
426
|
+
|
|
400
427
|
/** Display metadata for a plugin agent. */
|
|
401
428
|
export interface AgentDisplay {
|
|
402
429
|
/** Label shown in mode pickers and thread headers, 24 characters or less. */
|
|
@@ -1721,7 +1748,7 @@ declare module '@ampcode/plugin' {
|
|
|
1721
1748
|
|
|
1722
1749
|
/** Options for registering a generic webhook handler. */
|
|
1723
1750
|
export interface CreateWebhookOptions {
|
|
1724
|
-
/** Stable, non-whitespace-padded key within this plugin
|
|
1751
|
+
/** Stable, non-whitespace-padded key within this plugin's scope (1-128 characters). */
|
|
1725
1752
|
key: string
|
|
1726
1753
|
|
|
1727
1754
|
/**
|
|
@@ -1844,6 +1871,19 @@ declare module '@ampcode/plugin' {
|
|
|
1844
1871
|
}
|
|
1845
1872
|
/** Optional reasoning effort override for models that support it. */
|
|
1846
1873
|
reasoningEffort?: AgentReasoningEffort
|
|
1874
|
+
/**
|
|
1875
|
+
* Model and reasoning effort for the Oracle consulted from threads running this
|
|
1876
|
+
* agent. Omitted fields keep Amp's automatic routing and default effort. An
|
|
1877
|
+
* unavailable model falls back to Amp's routing at run time.
|
|
1878
|
+
*/
|
|
1879
|
+
oracle?: AgentSubagentPin
|
|
1880
|
+
/**
|
|
1881
|
+
* Model and reasoning effort for the other subagents spawned from threads running
|
|
1882
|
+
* this agent (Task workers, finder, thread reader, librarian). Omitted fields keep
|
|
1883
|
+
* Amp's automatic routing and default effort. An unavailable model falls back to
|
|
1884
|
+
* Amp's routing at run time.
|
|
1885
|
+
*/
|
|
1886
|
+
subagents?: AgentSubagentPin
|
|
1847
1887
|
/** Features required on threads created from this agent. */
|
|
1848
1888
|
features?: readonly AgentFeature[]
|
|
1849
1889
|
}
|