@await-widget/runtime 0.0.25 → 0.0.27
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/bin/await-widget.js +13 -14
- package/package.json +1 -1
- package/types/bridge.d.ts +6 -0
- package/types/model.d.ts +15 -0
package/bin/await-widget.js
CHANGED
|
@@ -564,13 +564,13 @@ function zipFiles(files) {
|
|
|
564
564
|
|
|
565
565
|
const appCommands = [
|
|
566
566
|
{
|
|
567
|
-
name: '
|
|
567
|
+
name: 'list-app-widgets',
|
|
568
568
|
usage: 'list-app-widgets',
|
|
569
569
|
description: 'List Await widgets currently stored in the Await app.',
|
|
570
570
|
inputSchema: {type: 'object', properties: {}},
|
|
571
571
|
},
|
|
572
572
|
{
|
|
573
|
-
name: '
|
|
573
|
+
name: 'open-widget-detail',
|
|
574
574
|
usage: 'open-widget-detail --widget-id <id>',
|
|
575
575
|
description: 'Open a widget detail page in the Await app.',
|
|
576
576
|
inputSchema: {
|
|
@@ -580,13 +580,13 @@ const appCommands = [
|
|
|
580
580
|
},
|
|
581
581
|
},
|
|
582
582
|
{
|
|
583
|
-
name: '
|
|
583
|
+
name: 'open-syncing-widget-detail',
|
|
584
584
|
usage: 'open-syncing-widget-detail',
|
|
585
585
|
description: 'Open the widget detail page for the widget currently syncing from this computer.',
|
|
586
586
|
inputSchema: {type: 'object', properties: {}},
|
|
587
587
|
},
|
|
588
588
|
{
|
|
589
|
-
name: '
|
|
589
|
+
name: 'set-preview-mode',
|
|
590
590
|
usage: 'set-preview-mode --mode <small|medium|large|extraLarge> [--widget-id <id>]',
|
|
591
591
|
description: 'Set the current widget detail preview mode.',
|
|
592
592
|
inputSchema: {
|
|
@@ -599,7 +599,7 @@ const appCommands = [
|
|
|
599
599
|
},
|
|
600
600
|
},
|
|
601
601
|
{
|
|
602
|
-
name: '
|
|
602
|
+
name: 'capture-current-preview',
|
|
603
603
|
usage: 'capture-current-preview [--widget-id <id>]',
|
|
604
604
|
description: 'Capture the currently visible widget preview as PNG.',
|
|
605
605
|
inputSchema: {
|
|
@@ -608,7 +608,7 @@ const appCommands = [
|
|
|
608
608
|
},
|
|
609
609
|
},
|
|
610
610
|
{
|
|
611
|
-
name: '
|
|
611
|
+
name: 'get-widget-status',
|
|
612
612
|
usage: 'get-widget-status --widget-id <id>',
|
|
613
613
|
description: 'Get App-side status for a widget.',
|
|
614
614
|
inputSchema: {
|
|
@@ -618,7 +618,7 @@ const appCommands = [
|
|
|
618
618
|
},
|
|
619
619
|
},
|
|
620
620
|
{
|
|
621
|
-
name: '
|
|
621
|
+
name: 'wait-for-widget-ready',
|
|
622
622
|
usage: 'wait-for-widget-ready --widget-id <id> [--timeout-ms <ms>]',
|
|
623
623
|
description: 'Wait for the current widget preview to have rendered data.',
|
|
624
624
|
inputSchema: {
|
|
@@ -631,7 +631,7 @@ const appCommands = [
|
|
|
631
631
|
},
|
|
632
632
|
},
|
|
633
633
|
{
|
|
634
|
-
name: '
|
|
634
|
+
name: 'get-build-errors',
|
|
635
635
|
usage: 'get-build-errors --widget-id <id>',
|
|
636
636
|
description: 'Get recent build errors for a widget.',
|
|
637
637
|
inputSchema: {
|
|
@@ -641,7 +641,7 @@ const appCommands = [
|
|
|
641
641
|
},
|
|
642
642
|
},
|
|
643
643
|
{
|
|
644
|
-
name: '
|
|
644
|
+
name: 'list-widget-intents',
|
|
645
645
|
usage: 'list-widget-intents --widget-id <id>',
|
|
646
646
|
description: 'List widget intents registered by a widget.',
|
|
647
647
|
inputSchema: {
|
|
@@ -651,7 +651,7 @@ const appCommands = [
|
|
|
651
651
|
},
|
|
652
652
|
},
|
|
653
653
|
{
|
|
654
|
-
name: '
|
|
654
|
+
name: 'call-widget-intent',
|
|
655
655
|
usage: 'call-widget-intent --widget-id <id> --intent-id <id> [--input <json-array>]',
|
|
656
656
|
description: 'Call a widget intent with positional input arguments.',
|
|
657
657
|
inputSchema: {
|
|
@@ -670,12 +670,11 @@ const appCommands = [
|
|
|
670
670
|
];
|
|
671
671
|
|
|
672
672
|
function appCommandName(value) {
|
|
673
|
-
|
|
674
|
-
if (!appCommands.some(command => command.name === name)) {
|
|
673
|
+
if (!appCommands.some(command => command.name === value)) {
|
|
675
674
|
throw new Error(`Unsupported Await app command: ${value}`);
|
|
676
675
|
}
|
|
677
676
|
|
|
678
|
-
return
|
|
677
|
+
return value;
|
|
679
678
|
}
|
|
680
679
|
|
|
681
680
|
async function runAppCommand(options) {
|
|
@@ -725,7 +724,7 @@ async function callAppCommand(bridgeUrl, tool, args) {
|
|
|
725
724
|
}
|
|
726
725
|
|
|
727
726
|
function appCommandResult(options, tool, result) {
|
|
728
|
-
if (tool === '
|
|
727
|
+
if (tool === 'capture-current-preview' && result.imageBase64) {
|
|
729
728
|
const filePath = saveCapture(options, result);
|
|
730
729
|
return {...result, imageBase64: undefined, filePath};
|
|
731
730
|
}
|
package/package.json
CHANGED
package/types/bridge.d.ts
CHANGED
|
@@ -58,6 +58,12 @@ export declare const AwaitCalendar: {
|
|
|
58
58
|
};
|
|
59
59
|
export declare const AwaitReminder: {
|
|
60
60
|
get(config?: AwaitReminderConfig): Promise<AwaitReminderItem[] | undefined>;
|
|
61
|
+
set(
|
|
62
|
+
id: string,
|
|
63
|
+
config: {
|
|
64
|
+
completed: boolean;
|
|
65
|
+
},
|
|
66
|
+
): Promise<void>;
|
|
61
67
|
};
|
|
62
68
|
export declare const AwaitSystem: {
|
|
63
69
|
get(): AwaitSystemInfo;
|
package/types/model.d.ts
CHANGED
|
@@ -236,6 +236,11 @@ type AwaitMusicSource =
|
|
|
236
236
|
type: 'station';
|
|
237
237
|
id: string;
|
|
238
238
|
name: string;
|
|
239
|
+
}
|
|
240
|
+
| {
|
|
241
|
+
type: 'playlist';
|
|
242
|
+
id: string;
|
|
243
|
+
name: string;
|
|
239
244
|
};
|
|
240
245
|
|
|
241
246
|
type AwaitNowPlayingInfo = {
|
|
@@ -302,6 +307,14 @@ type AwaitMusicPlayConfig =
|
|
|
302
307
|
query?: string;
|
|
303
308
|
type?: 'discovery' | 'user';
|
|
304
309
|
id?: string;
|
|
310
|
+
}
|
|
311
|
+
| {
|
|
312
|
+
source: 'playlist';
|
|
313
|
+
query?: string;
|
|
314
|
+
type?: 'public' | 'user';
|
|
315
|
+
id?: string;
|
|
316
|
+
shuffle?: boolean;
|
|
317
|
+
loop?: boolean;
|
|
305
318
|
};
|
|
306
319
|
|
|
307
320
|
type AwaitCalendarConfig = {
|
|
@@ -323,10 +336,12 @@ type AwaitCalendarItem = {
|
|
|
323
336
|
|
|
324
337
|
type AwaitReminderConfig = {
|
|
325
338
|
type?: 'all' | 'incomplete' | 'completed';
|
|
339
|
+
calendarTitle?: string;
|
|
326
340
|
limit?: number;
|
|
327
341
|
};
|
|
328
342
|
|
|
329
343
|
type AwaitReminderItem = {
|
|
344
|
+
id: string;
|
|
330
345
|
calendarTitle: string;
|
|
331
346
|
title: string;
|
|
332
347
|
notes?: string;
|