activitysmith 1.16.0 → 1.17.0
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/README.md +29 -3
- package/dist/generated/models/index.d.ts +16 -10
- package/dist/src/ActivitySmith.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -504,15 +504,20 @@ Choose from these colors for the Live Activity accent, including progress bars a
|
|
|
504
504
|
|
|
505
505
|
Live Activities can include an action button.
|
|
506
506
|
|
|
507
|
-
- `open_url`: Open a web page
|
|
507
|
+
- `open_url`: Open a web page, run an iOS Shortcut, or open an app
|
|
508
508
|
- `webhook`: Trigger a backend GET/POST workflow
|
|
509
509
|
|
|
510
510
|
#### Open URL action
|
|
511
511
|
|
|
512
|
-
Open a web page
|
|
512
|
+
Open a web page, run an iOS Shortcut, or open an app when someone taps the button. Supported links:
|
|
513
513
|
|
|
514
514
|
- **HTTP/HTTPS:** Web pages, e.g. `https://example.com`
|
|
515
515
|
- **Shortcuts:** Run Jarvis with `shortcuts://run-shortcut?name=Jarvis` <!-- full-width -->
|
|
516
|
+
- **App deep links:** Installed apps or specific content within them
|
|
517
|
+
- **Spotify:** A track, e.g. `spotify:track:6rqhFgbbKwnb9MLmUQDhG6`
|
|
518
|
+
- **Termius:** `termius://` to open the app
|
|
519
|
+
- **Claude:** `claude://code` to open the Code tab
|
|
520
|
+
- **ChatGPT:** `chatgpt://` to open the app <!-- Verify ChatGPT URL scheme on iOS before publishing -->
|
|
516
521
|
|
|
517
522
|
```ts
|
|
518
523
|
await activitysmith.liveActivities.stream("prod-web-1", {
|
|
@@ -554,6 +559,27 @@ await activitysmith.liveActivities.stream("prod-web-1", {
|
|
|
554
559
|
});
|
|
555
560
|
```
|
|
556
561
|
|
|
562
|
+
#### End after the tap
|
|
563
|
+
|
|
564
|
+
Set `dismiss_after_action` on an `open_url` button to end the Live Activity when someone taps it. The button opens its link, then the Live Activity ends.
|
|
565
|
+
|
|
566
|
+
```ts
|
|
567
|
+
await activitysmith.liveActivities.stream("agent-review", {
|
|
568
|
+
content_state: {
|
|
569
|
+
title: "Review Ready",
|
|
570
|
+
message: "Claude finished the checkout refactor.",
|
|
571
|
+
type: "alert",
|
|
572
|
+
color: "green",
|
|
573
|
+
},
|
|
574
|
+
action: {
|
|
575
|
+
title: "Open Claude",
|
|
576
|
+
type: "open_url",
|
|
577
|
+
url: "claude://code",
|
|
578
|
+
dismiss_after_action: true,
|
|
579
|
+
},
|
|
580
|
+
});
|
|
581
|
+
```
|
|
582
|
+
|
|
557
583
|
#### Webhook action
|
|
558
584
|
|
|
559
585
|
```ts
|
|
@@ -627,7 +653,7 @@ await activitysmith.liveActivities.stream("agent-approval", {
|
|
|
627
653
|
|
|
628
654
|
### Live Activity Sounds
|
|
629
655
|
|
|
630
|
-
Starting a Live Activity plays the Live Activities sound picked in the ActivitySmith app. Updates and ends are silent. Set `sound` on a start, update, or end to choose its sound, with the same values as [Push Notification Sounds](#push-notification-sounds). A sound on an update or end
|
|
656
|
+
Starting a Live Activity plays the Live Activities sound picked in the ActivitySmith app. Updates and ends are silent. Set `sound` on a start, update, or end to choose its sound, with the same values as [Push Notification Sounds](#push-notification-sounds). A sound on an update or end plays only while the screen is on. Use it for moments that need attention, such as a failed step.
|
|
631
657
|
|
|
632
658
|
```ts
|
|
633
659
|
await activitysmith.liveActivities.stream("deploy-api", {
|
|
@@ -1059,11 +1059,17 @@ export interface LiveActivityAction {
|
|
|
1059
1059
|
*/
|
|
1060
1060
|
type: LiveActivityActionType;
|
|
1061
1061
|
/**
|
|
1062
|
-
* Action URL. For open_url, use an HTTP or HTTPS URL
|
|
1062
|
+
* Action URL. For open_url, use an HTTP or HTTPS URL, a shortcuts://run-shortcut?name=... URL that runs a specific iPhone Shortcut, or an installed app's custom URL scheme, such as spotify:// or spotify:track:123. Custom app schemes need the target app installed and have no web fallback. Unsafe schemes and ActivitySmith's own scheme are blocked. For webhook, use an HTTPS URL called by the ActivitySmith backend.
|
|
1063
1063
|
* @type {string}
|
|
1064
1064
|
* @memberof LiveActivityAction
|
|
1065
1065
|
*/
|
|
1066
1066
|
url: string;
|
|
1067
|
+
/**
|
|
1068
|
+
* Ends the Live Activity after the button opens its URL. Used only when type=open_url. Defaults to false.
|
|
1069
|
+
* @type {boolean}
|
|
1070
|
+
* @memberof LiveActivityAction
|
|
1071
|
+
*/
|
|
1072
|
+
dismiss_after_action?: boolean;
|
|
1067
1073
|
/**
|
|
1068
1074
|
* Webhook HTTP method. Used only when type=webhook.
|
|
1069
1075
|
* @type {LiveActivityWebhookMethod}
|
|
@@ -1180,13 +1186,13 @@ export interface LiveActivityEndRequest {
|
|
|
1180
1186
|
*/
|
|
1181
1187
|
action?: LiveActivityAction;
|
|
1182
1188
|
/**
|
|
1183
|
-
* Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url
|
|
1189
|
+
* Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url and webhook shapes as action, including app URL schemes and dismiss_after_action.
|
|
1184
1190
|
* @type {LiveActivityAction}
|
|
1185
1191
|
* @memberof LiveActivityEndRequest
|
|
1186
1192
|
*/
|
|
1187
1193
|
secondary_action?: LiveActivityAction;
|
|
1188
1194
|
/**
|
|
1189
|
-
* Optional sound for the end. Ends are silent unless you set one.
|
|
1195
|
+
* Optional sound for the end. Ends are silent unless you set one. iOS plays the sound only while the screen is on. Sounds bundled with the ActivitySmith app: `arrive`, `bell`, `bells`, `bitflip`, `bloom`, `callout`, `chime`, `coin`, `corrupt`, `crest`, `cue`, `ding`, `drop`, `ember`, `emblem`, `flourish`, `glimmer`, `glint`, `glitch`, `lantern`, `nightfall`, `nudge`, `pixel`, `pop`, `signal`, `streak`, `tally`, `wand`, `whoosh`, `zip`. Use `default` for the sound picked on the device, or `none` for no sound.
|
|
1190
1196
|
* @type {string}
|
|
1191
1197
|
* @memberof LiveActivityEndRequest
|
|
1192
1198
|
*/
|
|
@@ -1335,7 +1341,7 @@ export interface LiveActivityStartRequest {
|
|
|
1335
1341
|
*/
|
|
1336
1342
|
action?: LiveActivityAction;
|
|
1337
1343
|
/**
|
|
1338
|
-
* Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url
|
|
1344
|
+
* Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url and webhook shapes as action, including app URL schemes and dismiss_after_action.
|
|
1339
1345
|
* @type {LiveActivityAction}
|
|
1340
1346
|
* @memberof LiveActivityStartRequest
|
|
1341
1347
|
*/
|
|
@@ -1465,7 +1471,7 @@ export interface LiveActivityStreamDeleteRequest {
|
|
|
1465
1471
|
*/
|
|
1466
1472
|
action?: LiveActivityAction;
|
|
1467
1473
|
/**
|
|
1468
|
-
* Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url
|
|
1474
|
+
* Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url and webhook shapes as action, including app URL schemes and dismiss_after_action.
|
|
1469
1475
|
* @type {LiveActivityAction}
|
|
1470
1476
|
* @memberof LiveActivityStreamDeleteRequest
|
|
1471
1477
|
*/
|
|
@@ -1477,7 +1483,7 @@ export interface LiveActivityStreamDeleteRequest {
|
|
|
1477
1483
|
*/
|
|
1478
1484
|
alert?: AlertPayload;
|
|
1479
1485
|
/**
|
|
1480
|
-
* Optional sound for the end. Ends are silent unless you set one.
|
|
1486
|
+
* Optional sound for the end. Ends are silent unless you set one. iOS plays the sound only while the screen is on. Sounds bundled with the ActivitySmith app: `arrive`, `bell`, `bells`, `bitflip`, `bloom`, `callout`, `chime`, `coin`, `corrupt`, `crest`, `cue`, `ding`, `drop`, `ember`, `emblem`, `flourish`, `glimmer`, `glint`, `glitch`, `lantern`, `nightfall`, `nudge`, `pixel`, `pop`, `signal`, `streak`, `tally`, `wand`, `whoosh`, `zip`. Use `default` for the sound picked on the device, or `none` for no sound.
|
|
1481
1487
|
* @type {string}
|
|
1482
1488
|
* @memberof LiveActivityStreamDeleteRequest
|
|
1483
1489
|
*/
|
|
@@ -1716,7 +1722,7 @@ export interface LiveActivityStreamRequest {
|
|
|
1716
1722
|
*/
|
|
1717
1723
|
action?: LiveActivityAction;
|
|
1718
1724
|
/**
|
|
1719
|
-
* Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url
|
|
1725
|
+
* Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url and webhook shapes as action, including app URL schemes and dismiss_after_action.
|
|
1720
1726
|
* @type {LiveActivityAction}
|
|
1721
1727
|
* @memberof LiveActivityStreamRequest
|
|
1722
1728
|
*/
|
|
@@ -1746,7 +1752,7 @@ export interface LiveActivityStreamRequest {
|
|
|
1746
1752
|
*/
|
|
1747
1753
|
tags?: Array<string>;
|
|
1748
1754
|
/**
|
|
1749
|
-
* Optional sound for this call. A call that starts a Live Activity plays the Live Activities sound picked on the device unless you set one. Updates are silent unless you set one.
|
|
1755
|
+
* Optional sound for this call. A call that starts a Live Activity plays the Live Activities sound picked on the device unless you set one. Updates are silent unless you set one. iOS plays an update sound only while the screen is on. Sounds bundled with the ActivitySmith app: `arrive`, `bell`, `bells`, `bitflip`, `bloom`, `callout`, `chime`, `coin`, `corrupt`, `crest`, `cue`, `ding`, `drop`, `ember`, `emblem`, `flourish`, `glimmer`, `glint`, `glitch`, `lantern`, `nightfall`, `nudge`, `pixel`, `pop`, `signal`, `streak`, `tally`, `wand`, `whoosh`, `zip`. Use `default` for the sound picked on the device, or `none` for no sound.
|
|
1750
1756
|
* @type {string}
|
|
1751
1757
|
* @memberof LiveActivityStreamRequest
|
|
1752
1758
|
*/
|
|
@@ -1791,13 +1797,13 @@ export interface LiveActivityUpdateRequest {
|
|
|
1791
1797
|
*/
|
|
1792
1798
|
action?: LiveActivityAction;
|
|
1793
1799
|
/**
|
|
1794
|
-
* Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url
|
|
1800
|
+
* Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url and webhook shapes as action, including app URL schemes and dismiss_after_action.
|
|
1795
1801
|
* @type {LiveActivityAction}
|
|
1796
1802
|
* @memberof LiveActivityUpdateRequest
|
|
1797
1803
|
*/
|
|
1798
1804
|
secondary_action?: LiveActivityAction;
|
|
1799
1805
|
/**
|
|
1800
|
-
* Optional sound for this update. Updates are silent unless you set one.
|
|
1806
|
+
* Optional sound for this update. Updates are silent unless you set one. iOS plays the sound only while the screen is on. Sounds bundled with the ActivitySmith app: `arrive`, `bell`, `bells`, `bitflip`, `bloom`, `callout`, `chime`, `coin`, `corrupt`, `crest`, `cue`, `ding`, `drop`, `ember`, `emblem`, `flourish`, `glimmer`, `glint`, `glitch`, `lantern`, `nightfall`, `nudge`, `pixel`, `pop`, `signal`, `streak`, `tally`, `wand`, `whoosh`, `zip`. Use `default` for the sound picked on the device, or `none` for no sound.
|
|
1801
1807
|
* @type {string}
|
|
1802
1808
|
* @memberof LiveActivityUpdateRequest
|
|
1803
1809
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ActivitySmith = exports.DevicesResource = exports.MetricsResource = exports.LiveActivitiesResource = exports.NotificationsResource = void 0;
|
|
4
4
|
const index_1 = require("../generated/index");
|
|
5
|
-
const SDK_VERSION = "1.
|
|
5
|
+
const SDK_VERSION = "1.17.0";
|
|
6
6
|
const SDK_HEADER_NAME = "X-ActivitySmith-SDK";
|
|
7
7
|
const DEFAULT_SDK_NAME = "node";
|
|
8
8
|
const SDK_HEADER_VALUE = `${DEFAULT_SDK_NAME}-v${SDK_VERSION}`;
|