@ampcode/plugin 0.0.0-20260818001058-gcb0a91a → 0.0.0-20260818221056-gdf9ae7e

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 +29 -3
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -354,6 +354,12 @@ declare module '@ampcode/plugin' {
354
354
  tools?: AgentToolSelection
355
355
  /** Optional reasoning effort override for models that support it. */
356
356
  reasoningEffort?: AgentReasoningEffort
357
+ /**
358
+ * Estimated input-token count at which Amp automatically compacts the thread.
359
+ * Must be a positive safe integer. When omitted, Amp uses the configured
360
+ * percentage threshold, which defaults to 90%.
361
+ */
362
+ compactionThresholdTokens?: number
357
363
  /**
358
364
  * Features required on threads created from this agent. Omit this field to inherit
359
365
  * the creating thread's features when the caller also omits
@@ -491,7 +497,10 @@ declare module '@ampcode/plugin' {
491
497
  * agent has no display.
492
498
  */
493
499
  label?: string
494
- /** Optional longer description shown in command palettes and pickers. */
500
+ /**
501
+ * Optional longer description shown in command palettes and pickers. State both what the
502
+ * mode does and when to use it.
503
+ */
495
504
  description?: string
496
505
  /**
497
506
  * Optional label color as a hex RGB string, for example "#d97706".
@@ -1067,6 +1076,20 @@ declare module '@ampcode/plugin' {
1067
1076
  */
1068
1077
  cancel(): Promise<void>
1069
1078
 
1079
+ /**
1080
+ * Make this thread private or visible to every member of its workspace.
1081
+ * Making a thread private closes multiplayer. The authenticated user must
1082
+ * own the thread.
1083
+ */
1084
+ setVisibility(visibility: 'private' | 'workspace'): Promise<void>
1085
+
1086
+ /**
1087
+ * Open multiplayer for the given number of seconds, or close it with `null`.
1088
+ * Opening multiplayer requires an Orb thread that is already shared. Valid
1089
+ * durations range from 5 minutes to 7 days.
1090
+ */
1091
+ setMultiplayer(options: { ttlSeconds: number | null }): Promise<void>
1092
+
1070
1093
  /**
1071
1094
  * Read messages from the thread in a stable plugin-facing schema.
1072
1095
  *
@@ -1710,7 +1733,10 @@ declare module '@ampcode/plugin' {
1710
1733
  export interface AgentConfig {
1711
1734
  /** Label shown in mode pickers and thread headers, 24 characters or less. Defaults to the agent's directory name. */
1712
1735
  label?: string
1713
- /** Description shown in agent listings, 500 characters or less. */
1736
+ /**
1737
+ * Description shown in agent listings, 500 characters or less. State both what the agent
1738
+ * does and when to use it.
1739
+ */
1714
1740
  description?: string
1715
1741
  /** Label color as a hex RGB string, for example "#d97706". */
1716
1742
  color?: string
@@ -1739,7 +1765,7 @@ declare module '@ampcode/plugin' {
1739
1765
  * import { defineAgent } from '@ampcode/plugin'
1740
1766
  *
1741
1767
  * export default defineAgent({
1742
- * description: 'Researches requests and cites primary sources',
1768
+ * description: 'Researches requests and cites primary sources. Use for evidence-backed research.',
1743
1769
  * model: 'openai/gpt-5-mini',
1744
1770
  * tools: ['web_search', 'read_web_page'],
1745
1771
  * reasoningEffort: 'medium',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampcode/plugin",
3
- "version": "0.0.0-20260818001058-gcb0a91a",
3
+ "version": "0.0.0-20260818221056-gdf9ae7e",
4
4
  "description": "Amp Plugin API",
5
5
  "homepage": "https://ampcode.com/manual/plugin-api",
6
6
  "author": {