@ampcode/plugin 0.0.0-20260819001142-g296cfc0 → 0.0.0-20260821001110-g72798b8

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 +33 -3
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -413,6 +413,19 @@ declare module '@ampcode/plugin' {
413
413
  * When omitted, the thread is created without a parent.
414
414
  */
415
415
  parentThreadID?: ThreadID
416
+ /**
417
+ * Set the new thread's visibility. A child thread inherits its parent's visibility when
418
+ * omitted, so set this explicitly to opt out. Workspace visibility requires the new thread
419
+ * to belong to a workspace.
420
+ */
421
+ visibility?: 'private' | 'workspace'
422
+ /**
423
+ * Enable multiplayer for this many seconds, or set `null` to create the thread closed. A
424
+ * child thread inherits its parent's remaining multiplayer window when omitted, so set this
425
+ * explicitly to opt out. This option requires an Orb executor. Multiplayer threads must
426
+ * belong to a workspace. Valid numeric values range from 5 minutes to 7 days.
427
+ */
428
+ multiplayerTTLSeconds?: number | null
416
429
  /**
417
430
  * Where the thread should execute. Defaults to `local`, which uses the current
418
431
  * client as the executor. Use `orb` for Amp's cloud sandbox or a runner target
@@ -438,10 +451,18 @@ declare module '@ampcode/plugin' {
438
451
  */
439
452
  features?: readonly AgentFeature[]
440
453
  /**
441
- * Enable multiplayer for this many seconds. Multiplayer threads must run in an
442
- * Orb and belong to a workspace. Valid values range from 5 minutes to 7 days.
454
+ * Set the new thread's visibility. A child thread inherits its parent's visibility when
455
+ * omitted, so set this explicitly to opt out. Workspace visibility requires the new thread
456
+ * to belong to a workspace.
443
457
  */
444
- multiplayerTTLSeconds?: number
458
+ visibility?: 'private' | 'workspace'
459
+ /**
460
+ * Enable multiplayer for this many seconds, or set `null` to create the thread closed. A
461
+ * child thread inherits its parent's remaining multiplayer window when omitted, so set this
462
+ * explicitly to opt out. This option requires an Orb executor. Multiplayer threads must
463
+ * belong to a workspace. Valid numeric values range from 5 minutes to 7 days.
464
+ */
465
+ multiplayerTTLSeconds?: number | null
445
466
  /**
446
467
  * Where the thread should execute. Defaults to `local`, which uses the current
447
468
  * client as the executor. Use `orb` for Amp's cloud sandbox or a runner target
@@ -1054,6 +1075,15 @@ declare module '@ampcode/plugin' {
1054
1075
  /** Agent currently used by this thread, suitable for creating related threads. */
1055
1076
  agent(): Promise<Agent>
1056
1077
 
1078
+ /**
1079
+ * ID of this thread's direct parent thread, or `null` when it has none.
1080
+ * The parent is recorded when a thread is created with a `parentThreadID`
1081
+ * (for example a subagent or child thread) and can become `null` later if
1082
+ * the parent thread is deleted. Only supported for the plugin's current
1083
+ * thread.
1084
+ */
1085
+ parentThreadID(): Promise<ThreadID | null>
1086
+
1057
1087
  /** Current thread title stream, or `null` when no title has been set yet. */
1058
1088
  readonly title: Observable<string | null> & { get(): Promise<string | null> }
1059
1089
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampcode/plugin",
3
- "version": "0.0.0-20260819001142-g296cfc0",
3
+ "version": "0.0.0-20260821001110-g72798b8",
4
4
  "description": "Amp Plugin API",
5
5
  "homepage": "https://ampcode.com/manual/plugin-api",
6
6
  "author": {