agl 43.7.0 → 43.9.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/changelog.md +33 -0
- package/dist_serve/bundle.js +871 -858
- package/dist_serve/bundle.js.map +2 -2
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/aglapi/aglapisurface.document.js +824 -6
- package/dist_ts/aglapi/interfaces.d.ts +43 -0
- package/dist_ts/aglapi/interfaces.js +11 -1
- package/dist_ts/classes.apnsclient.d.ts +97 -0
- package/dist_ts/classes.apnsclient.js +363 -0
- package/dist_ts/classes.authmodels.js +19 -6
- package/dist_ts/classes.authstore.js +15 -2
- package/dist_ts/classes.cli.js +8 -1
- package/dist_ts/classes.controller.d.ts +30 -3
- package/dist_ts/classes.controller.js +250 -9
- package/dist_ts/classes.controllerdevices.d.ts +35 -7
- package/dist_ts/classes.controllerdevices.js +86 -13
- package/dist_ts/classes.controllerpush.d.ts +111 -0
- package/dist_ts/classes.controllerpush.js +299 -0
- package/dist_ts/classes.fcmclient.d.ts +78 -0
- package/dist_ts/classes.fcmclient.js +278 -0
- package/dist_ts/classes.inbox.d.ts +10 -2
- package/dist_ts/classes.inbox.js +9 -2
- package/dist_ts/classes.mcpclient.d.ts +5 -0
- package/dist_ts/classes.mcpclient.js +20 -8
- package/dist_ts/classes.mcpcontrollerhost.d.ts +3 -0
- package/dist_ts/classes.mcpcontrollerhost.js +21 -2
- package/dist_ts/classes.mcptools.d.ts +1 -1
- package/dist_ts/classes.mcptools.js +2 -1
- package/dist_ts/classes.mcpvalidation.js +4 -1
- package/dist_ts/classes.mcpworkercaller.d.ts +6 -0
- package/dist_ts/classes.mcpworkercaller.js +26 -4
- package/dist_ts/classes.pushdelivery.d.ts +115 -0
- package/dist_ts/classes.pushdelivery.js +311 -0
- package/dist_ts/classes.pushhandover.d.ts +46 -0
- package/dist_ts/classes.pushhandover.js +131 -0
- package/dist_ts/classes.pushregistrations.d.ts +96 -0
- package/dist_ts/classes.pushregistrations.js +263 -0
- package/dist_ts/classes.pushsettings.d.ts +125 -0
- package/dist_ts/classes.pushsettings.js +377 -0
- package/dist_ts/classes.ticketstore.d.ts +3 -3
- package/dist_ts/classes.ticketstore.js +23 -4
- package/dist_ts/classes.workercallers.d.ts +73 -2
- package/dist_ts/classes.workercallers.js +354 -43
- package/dist_ts/driver/classes.directreports.d.ts +5 -0
- package/dist_ts/driver/classes.directreports.js +3 -2
- package/dist_ts/fleet/classes.workerlaunches.d.ts +6 -4
- package/dist_ts/fleet/classes.workerlaunches.js +10 -9
- package/dist_ts/fleet/classes.workers.d.ts +12 -2
- package/dist_ts/fleet/classes.workers.js +82 -2
- package/dist_ts/functions.deviceapi.d.ts +23 -3
- package/dist_ts/functions.deviceapi.js +43 -3
- package/dist_ts/functions.mcptickettools.d.ts +60 -0
- package/dist_ts/functions.mcptickettools.js +4 -3
- package/dist_ts/functions.pushcli.d.ts +43 -0
- package/dist_ts/functions.pushcli.js +201 -0
- package/dist_ts/functions.pushcredentials.d.ts +53 -0
- package/dist_ts/functions.pushcredentials.js +111 -0
- package/dist_ts/functions.pushwire.d.ts +8 -0
- package/dist_ts/functions.pushwire.js +83 -0
- package/dist_ts/functions.remotecli.d.ts +2 -2
- package/dist_ts/functions.remotecli.js +4 -4
- package/dist_ts/functions.ticketcli.d.ts +4 -2
- package/dist_ts/functions.ticketcli.js +70 -4
- package/dist_ts/functions.ticketlisting.d.ts +38 -0
- package/dist_ts/functions.ticketlisting.js +211 -0
- package/dist_ts/functions.ticketvalidation.d.ts +62 -0
- package/dist_ts/functions.ticketvalidation.js +41 -3
- package/dist_ts/functions.workercallervalidation.js +3 -2
- package/dist_ts/functions.workerprocessproof.d.ts +12 -0
- package/dist_ts/functions.workerprocessproof.js +32 -1
- package/dist_ts/interfaces.auth.d.ts +27 -3
- package/dist_ts/interfaces.auth.js +9 -1
- package/dist_ts/interfaces.lifecycle.d.ts +7 -1
- package/dist_ts/interfaces.push.d.ts +69 -0
- package/dist_ts/interfaces.push.js +25 -0
- package/dist_ts/plugins.d.ts +3 -1
- package/dist_ts/plugins.js +4 -2
- package/dist_ts_interfaces/devices.d.ts +178 -2
- package/dist_ts_interfaces/devices.js +24 -2
- package/dist_ts_interfaces/index.d.ts +1 -0
- package/dist_ts_interfaces/index.js +2 -1
- package/dist_ts_interfaces/mcprequests.d.ts +3 -2
- package/dist_ts_interfaces/mcprequests.js +3 -1
- package/dist_ts_interfaces/push.d.ts +166 -0
- package/dist_ts_interfaces/push.js +24 -0
- package/dist_ts_interfaces/requests.tickets.d.ts +31 -3
- package/dist_ts_interfaces/requests.tickets.js +2 -2
- package/dist_ts_interfaces/tickets.d.ts +174 -2
- package/dist_ts_interfaces/tickets.js +20 -2
- package/dist_ts_interfaces/workercallers.d.ts +43 -3
- package/package.json +2 -2
- package/readme.md +95 -14
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/aglapi/aglapisurface.document.ts +823 -5
- package/ts/aglapi/interfaces.ts +10 -0
- package/ts/classes.apnsclient.ts +389 -0
- package/ts/classes.authmodels.ts +21 -5
- package/ts/classes.authstore.ts +14 -1
- package/ts/classes.cli.ts +7 -0
- package/ts/classes.controller.ts +273 -7
- package/ts/classes.controllerdevices.ts +94 -12
- package/ts/classes.controllerpush.ts +351 -0
- package/ts/classes.fcmclient.ts +292 -0
- package/ts/classes.inbox.ts +13 -2
- package/ts/classes.mcpclient.ts +22 -7
- package/ts/classes.mcpcontrollerhost.ts +22 -1
- package/ts/classes.mcptools.ts +1 -0
- package/ts/classes.mcpvalidation.ts +2 -0
- package/ts/classes.mcpworkercaller.ts +24 -2
- package/ts/classes.pushdelivery.ts +378 -0
- package/ts/classes.pushhandover.ts +98 -0
- package/ts/classes.pushregistrations.ts +244 -0
- package/ts/classes.pushsettings.ts +428 -0
- package/ts/classes.ticketstore.ts +21 -3
- package/ts/classes.workercallers.ts +329 -37
- package/ts/driver/classes.directreports.ts +7 -1
- package/ts/fleet/classes.workerlaunches.ts +9 -7
- package/ts/fleet/classes.workers.ts +65 -2
- package/ts/functions.deviceapi.ts +54 -2
- package/ts/functions.mcptickettools.ts +3 -2
- package/ts/functions.pushcli.ts +212 -0
- package/ts/functions.pushcredentials.ts +129 -0
- package/ts/functions.pushwire.ts +106 -0
- package/ts/functions.remotecli.ts +3 -2
- package/ts/functions.ticketcli.ts +70 -5
- package/ts/functions.ticketlisting.ts +214 -0
- package/ts/functions.ticketvalidation.ts +41 -2
- package/ts/functions.workercallervalidation.ts +2 -1
- package/ts/functions.workerprocessproof.ts +34 -0
- package/ts/interfaces.auth.ts +26 -3
- package/ts/interfaces.lifecycle.ts +7 -1
- package/ts/interfaces.push.ts +78 -0
- package/ts/plugins.ts +3 -1
- package/ts_interfaces/devices.schema.json +327 -0
- package/ts_interfaces/devices.ts +206 -1
- package/ts_interfaces/index.ts +1 -0
- package/ts_interfaces/mcprequests.ts +3 -0
- package/ts_interfaces/push.ts +162 -0
- package/ts_interfaces/requests.tickets.ts +32 -2
- package/ts_interfaces/tickets.ts +136 -3
- package/ts_interfaces/workercallers.ts +34 -2
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements.inbox.ts +50 -9
|
@@ -2,7 +2,7 @@ import type { ITypedRequest, implementsTR } from '@api.global/typedrequest-inter
|
|
|
2
2
|
/** The device protocol this controller speaks. */
|
|
3
3
|
export declare const deviceProtocolVersion: {
|
|
4
4
|
readonly major: 1;
|
|
5
|
-
readonly minor:
|
|
5
|
+
readonly minor: 4;
|
|
6
6
|
};
|
|
7
7
|
/** The scheme of a pairing payload: `agl-pair:?origin=<https origin>&controller=<controller id>&code=<base64url>`. */
|
|
8
8
|
export declare const devicePairingScheme: 'agl-pair';
|
|
@@ -665,7 +665,147 @@ export interface IDeviceHostDevice {
|
|
|
665
665
|
* @asType integer
|
|
666
666
|
*/
|
|
667
667
|
lastSeenAt?: number;
|
|
668
|
+
/** Its notifications, while it is registered for them; absent while it is not. Since protocol 1.4. */
|
|
669
|
+
push?: IDeviceHostPush;
|
|
668
670
|
}
|
|
671
|
+
/** The push service a device registers its token with: Apple's (APNs) or Firebase Cloud Messaging. Since protocol 1.4. */
|
|
672
|
+
export type TDevicePushPlatform = 'apns' | 'fcm';
|
|
673
|
+
/** The APNs environment a device token belongs to: `sandbox` for a development build, else `production`. Since protocol 1.4. */
|
|
674
|
+
export type TDevicePushEnvironment = 'sandbox' | 'production';
|
|
675
|
+
/**
|
|
676
|
+
* Why a notification to a device did not go out: `credential_refused`, Apple or Google refused the host's credential
|
|
677
|
+
* for the platform, and the host sends nothing on it until the owner sets the credential again; `refused`, the push
|
|
678
|
+
* service refused the notification itself; `rate_limited`, it asked the host to send less; `service_failed`, it failed
|
|
679
|
+
* the request; `unreachable`, the host could not reach it. A later minor may add a reason: an app shows one it does not
|
|
680
|
+
* know as a failure without a named cause. Since protocol 1.4.
|
|
681
|
+
*/
|
|
682
|
+
export type TDevicePushFailureReason = 'credential_refused' | 'refused' | 'rate_limited' | 'service_failed' | 'unreachable';
|
|
683
|
+
/** A notification to the device that did not go out. Since protocol 1.4. */
|
|
684
|
+
export interface IDevicePushFailure {
|
|
685
|
+
/**
|
|
686
|
+
* Unix milliseconds of the failed send.
|
|
687
|
+
* @asType integer
|
|
688
|
+
*/
|
|
689
|
+
at: number;
|
|
690
|
+
reason: TDevicePushFailureReason;
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* The notifications a device registered for, as the host sends them: never its token. Since protocol 1.4.
|
|
694
|
+
*/
|
|
695
|
+
export interface IDeviceHostPush {
|
|
696
|
+
/** Whether the device asked for direct report results too, besides what waits in the Inbox. */
|
|
697
|
+
reports: boolean;
|
|
698
|
+
/**
|
|
699
|
+
* Whether notifications carry previews: where an item lives, what it asks and its id (`IDevicePushInboxData`). One
|
|
700
|
+
* setting for every device of the host, which only the owner changes on the host; off unless the owner turns it on.
|
|
701
|
+
*/
|
|
702
|
+
previews: boolean;
|
|
703
|
+
/**
|
|
704
|
+
* Whether the host can send the device notifications now: it holds a credential for the device's platform that Apple
|
|
705
|
+
* or Google did not refuse. While it does not, the registration stays and nothing is sent until the owner sets the
|
|
706
|
+
* credential on the host.
|
|
707
|
+
*/
|
|
708
|
+
available: boolean;
|
|
709
|
+
/** The last notification to the device that did not go out, while none went out after it. */
|
|
710
|
+
lastFailure?: IDevicePushFailure;
|
|
711
|
+
}
|
|
712
|
+
/**
|
|
713
|
+
* A notification's text with previews off for an item of each kind: one fixed sentence that says only the kind.
|
|
714
|
+
* Since protocol 1.4.
|
|
715
|
+
*/
|
|
716
|
+
export declare const devicePushSentences: Readonly<Record<TDeviceInboxKind, string>>;
|
|
717
|
+
/** A summary notification's text. Since protocol 1.4. */
|
|
718
|
+
export declare const devicePushSummarySentence = "New items wait for you in the Inbox.";
|
|
719
|
+
/** A direct report's notification text with previews off. Since protocol 1.4. */
|
|
720
|
+
export declare const devicePushReportSentence = "A direct report has a new result.";
|
|
721
|
+
/** The text of the owner's test notification. Since protocol 1.4. */
|
|
722
|
+
export declare const devicePushTestSentence = "Push from AGL works.";
|
|
723
|
+
/**
|
|
724
|
+
* One Inbox item that came: an alert (iOS: thread `inbox`, interruption level `active`; Android: channel Inbox). With
|
|
725
|
+
* previews off it says only the kind's fixed sentence; with previews on also where the item lives, what it asks and
|
|
726
|
+
* its id. Tapping it opens the Inbox. Since protocol 1.4.
|
|
727
|
+
*/
|
|
728
|
+
export interface IDevicePushInboxData {
|
|
729
|
+
type: 'inbox';
|
|
730
|
+
/**
|
|
731
|
+
* The notification's key: base64url of HMAC-SHA256 under the registration's own random salt over the item's id. It
|
|
732
|
+
* names nothing, and the same item has the same key for as long as the registration stands, across restarts of the
|
|
733
|
+
* host, so a notification sent again replaces the one shown (iOS: `apns-collapse-id`; Android: the notification's
|
|
734
|
+
* tag), and a `clear` removes it.
|
|
735
|
+
*/
|
|
736
|
+
key: string;
|
|
737
|
+
kind: TDeviceInboxKind;
|
|
738
|
+
/** The number of items in the Inbox after this one came, in decimal: the app's badge (iOS: also `aps.badge`). */
|
|
739
|
+
badge: string;
|
|
740
|
+
/** Previews off: `devicePushSentences` for the kind. Previews on: the item's title, one line of at most 280 characters. */
|
|
741
|
+
body: string;
|
|
742
|
+
/** Previews on only: where the item lives, such as the session's name, `Driver` or the ticket's key and title. */
|
|
743
|
+
title?: string;
|
|
744
|
+
/** Previews on only: the item's id, as `device.inbox.list` names it. */
|
|
745
|
+
itemId?: string;
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
* More than four items came at once: one notification says so (iOS: thread `inbox`, level `active`; Android: channel
|
|
749
|
+
* Inbox) instead of one per item, with no item's kind, place or id. Since protocol 1.4.
|
|
750
|
+
*/
|
|
751
|
+
export interface IDevicePushSummaryData {
|
|
752
|
+
type: 'summary';
|
|
753
|
+
/** The registration's one summary key, the same for every summary, so a later summary replaces an earlier one. */
|
|
754
|
+
key: string;
|
|
755
|
+
/** The number of items that came, in decimal. */
|
|
756
|
+
count: string;
|
|
757
|
+
/** The number of items in the Inbox, in decimal: the app's badge. */
|
|
758
|
+
badge: string;
|
|
759
|
+
/** `devicePushSummarySentence`. */
|
|
760
|
+
body: string;
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* A direct report's new `result:` line, sent only to a registration with `reports` (iOS: thread `reports`,
|
|
764
|
+
* interruption level `passive`; Android: channel Reports, low importance). It leaves the badge alone: a result waits
|
|
765
|
+
* for nobody. Since protocol 1.4.
|
|
766
|
+
*/
|
|
767
|
+
export interface IDevicePushReportData {
|
|
768
|
+
type: 'report';
|
|
769
|
+
/** As an item's key, over the report's name: a newer result of the same report replaces the older one. */
|
|
770
|
+
key: string;
|
|
771
|
+
/** Previews off: `devicePushReportSentence`. Previews on: the `result:` line. */
|
|
772
|
+
body: string;
|
|
773
|
+
/** Previews on only: the report's name. */
|
|
774
|
+
title?: string;
|
|
775
|
+
}
|
|
776
|
+
/**
|
|
777
|
+
* The owner's test notification, which the owner sends on the host to see that notifications reach the device (iOS:
|
|
778
|
+
* thread `inbox`, interruption level `active`; Android: channel Inbox). It names no item and leaves the badge alone;
|
|
779
|
+
* tapping it opens the Inbox. Since protocol 1.4.
|
|
780
|
+
*/
|
|
781
|
+
export interface IDevicePushTestData {
|
|
782
|
+
type: 'test';
|
|
783
|
+
/** The registration's one test key, the same for every test, so a later test replaces an earlier one. */
|
|
784
|
+
key: string;
|
|
785
|
+
/** `devicePushTestSentence`. */
|
|
786
|
+
body: string;
|
|
787
|
+
}
|
|
788
|
+
/**
|
|
789
|
+
* Items left the Inbox: remove their notifications (Android cancels them by tag; on iOS it is a background push, which
|
|
790
|
+
* the system may hold back, so an app also matches its notifications against `device.inbox.list` on every connect).
|
|
791
|
+
* Since protocol 1.4.
|
|
792
|
+
*/
|
|
793
|
+
export interface IDevicePushClearData {
|
|
794
|
+
type: 'clear';
|
|
795
|
+
/** The keys of the notifications to remove, separated by single spaces. */
|
|
796
|
+
keys: string;
|
|
797
|
+
/** The number of items in the Inbox now, in decimal: the app's badge. */
|
|
798
|
+
badge: string;
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* What a notification from the host carries, the same for both platforms, each value a string because FCM data carries
|
|
802
|
+
* only strings: FCM sends it as a data-only message's `data` (the Android app builds the notification itself), APNs as
|
|
803
|
+
* the payload's `agl` object beside `aps` (an alert push for `inbox`, `summary`, `report` and `test`, a background push
|
|
804
|
+
* for `clear`). No notification carries a session's or a ticket's id with previews off. A later minor may add keys and
|
|
805
|
+
* types: an app ignores keys it does not know, and a notification whose `type` it does not know, except an iOS alert
|
|
806
|
+
* push, which the system presents from `aps` without running the app. Since protocol 1.4.
|
|
807
|
+
*/
|
|
808
|
+
export type TDevicePushData = IDevicePushInboxData | IDevicePushSummaryData | IDevicePushReportData | IDevicePushTestData | IDevicePushClearData;
|
|
669
809
|
/**
|
|
670
810
|
* Why a section was not read: `not_running`, what answers it does not run now (the configuration service the deploy
|
|
671
811
|
* monitor reads, the inference proxy or the accounts service; it may be starting); `outdated`, it runs a release this
|
|
@@ -1351,6 +1491,42 @@ export interface IReq_DeviceHostGet extends implementsTR<ITypedRequest, IReq_Dev
|
|
|
1351
1491
|
apiKeys: IDeviceHostApiKeys | IDeviceHostUnavailable;
|
|
1352
1492
|
};
|
|
1353
1493
|
}
|
|
1494
|
+
/**
|
|
1495
|
+
* Registers this device for notifications of what comes into the Inbox, and with `reports` of the direct reports'
|
|
1496
|
+
* results too: one registration per device, which the next one replaces, so an app registers again with its current
|
|
1497
|
+
* token on every connect. Taken also while the host holds no credential to send with (the answer's `available` says
|
|
1498
|
+
* so). The token stays on the host: no answer, event or log repeats it. Scope `device`. Since protocol 1.4.
|
|
1499
|
+
*/
|
|
1500
|
+
export interface IReq_DevicePushRegister extends implementsTR<ITypedRequest, IReq_DevicePushRegister> {
|
|
1501
|
+
method: 'device.push.register';
|
|
1502
|
+
request: {
|
|
1503
|
+
platform: TDevicePushPlatform;
|
|
1504
|
+
/**
|
|
1505
|
+
* APNs: the device token as lowercase hex, 32 to 100 bytes. FCM: the registration token as the Firebase SDK hands
|
|
1506
|
+
* it, 1 to 1024 characters of letters, digits, `_`, `-` and `:`.
|
|
1507
|
+
*/
|
|
1508
|
+
token: string;
|
|
1509
|
+
/** APNs only, and required there: the environment the token belongs to. */
|
|
1510
|
+
environment?: TDevicePushEnvironment;
|
|
1511
|
+
/** Whether to notify the direct reports' results too. */
|
|
1512
|
+
reports: boolean;
|
|
1513
|
+
};
|
|
1514
|
+
/** The registration as `device.host.get` shows it. */
|
|
1515
|
+
response: {
|
|
1516
|
+
push: IDeviceHostPush;
|
|
1517
|
+
};
|
|
1518
|
+
}
|
|
1519
|
+
/**
|
|
1520
|
+
* Ends this device's registration: the host sends it no notification from then on. `removed` says whether it held one.
|
|
1521
|
+
* Scope `device`. Since protocol 1.4.
|
|
1522
|
+
*/
|
|
1523
|
+
export interface IReq_DevicePushUnregister extends implementsTR<ITypedRequest, IReq_DevicePushUnregister> {
|
|
1524
|
+
method: 'device.push.unregister';
|
|
1525
|
+
request: {};
|
|
1526
|
+
response: {
|
|
1527
|
+
removed: boolean;
|
|
1528
|
+
};
|
|
1529
|
+
}
|
|
1354
1530
|
/**
|
|
1355
1531
|
* One column of the shared board, as the browser's board shows its cards: the tasks (an epic and its subtasks show on
|
|
1356
1532
|
* their task's card in the browser; a device opens them with `device.ticket.get`), in the column's order, `limit` from
|
|
@@ -1478,5 +1654,5 @@ export interface IReq_DeviceEventPush extends implementsTR<ITypedRequest, IReq_D
|
|
|
1478
1654
|
}
|
|
1479
1655
|
/** Every device method, by the scope that admits it. */
|
|
1480
1656
|
export declare const devicePairingMethods: readonly ['device.hello', 'device.pair', 'device.auth.challenge', 'device.auth.prove'];
|
|
1481
|
-
export declare const deviceMethods: readonly ['device.sessions.list', 'device.session.read', 'device.session.send', 'device.permission.reply', 'device.question.reply', 'device.elicitation.reply', 'device.inbox.list', 'device.ticket.answer', 'device.driver.get', 'device.driver.seen', 'device.driver.read', 'device.driver.send', 'device.directreports.list', 'device.directreport.message', 'device.host.get', 'device.board.list', 'device.ticket.get', 'device.ticket.comment', 'device.ticket.ask', 'device.ticket.move'];
|
|
1657
|
+
export declare const deviceMethods: readonly ['device.sessions.list', 'device.session.read', 'device.session.send', 'device.permission.reply', 'device.question.reply', 'device.elicitation.reply', 'device.inbox.list', 'device.ticket.answer', 'device.driver.get', 'device.driver.seen', 'device.driver.read', 'device.driver.send', 'device.directreports.list', 'device.directreport.message', 'device.host.get', 'device.push.register', 'device.push.unregister', 'device.board.list', 'device.ticket.get', 'device.ticket.comment', 'device.ticket.ask', 'device.ticket.move'];
|
|
1482
1658
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The device protocol this controller speaks. */
|
|
2
|
-
export const deviceProtocolVersion = { major: 1, minor:
|
|
2
|
+
export const deviceProtocolVersion = { major: 1, minor: 4 };
|
|
3
3
|
/** The scheme of a pairing payload: `agl-pair:?origin=<https origin>&controller=<controller id>&code=<base64url>`. */
|
|
4
4
|
export const devicePairingScheme = 'agl-pair';
|
|
5
5
|
/** The first field of the message a device signs to pair. */
|
|
@@ -69,6 +69,26 @@ export const deviceTicketRefusalCodes = [
|
|
|
69
69
|
'ticket_question_answered',
|
|
70
70
|
'ticket_answer_invalid',
|
|
71
71
|
];
|
|
72
|
+
/**
|
|
73
|
+
* A notification's text with previews off for an item of each kind: one fixed sentence that says only the kind.
|
|
74
|
+
* Since protocol 1.4.
|
|
75
|
+
*/
|
|
76
|
+
export const devicePushSentences = {
|
|
77
|
+
permission: 'A session waits for your permission.',
|
|
78
|
+
question: 'A session asks you a question.',
|
|
79
|
+
elicitation: 'A session asks you to fill in a form.',
|
|
80
|
+
native_wait: 'A session waits for you on the host.',
|
|
81
|
+
driver: 'The driver needs your input.',
|
|
82
|
+
deploy_go: 'A deploy waits for your go.',
|
|
83
|
+
window_go: 'A maintenance window waits for your go.',
|
|
84
|
+
ticket_question: 'A ticket asks you a question.',
|
|
85
|
+
};
|
|
86
|
+
/** A summary notification's text. Since protocol 1.4. */
|
|
87
|
+
export const devicePushSummarySentence = 'New items wait for you in the Inbox.';
|
|
88
|
+
/** A direct report's notification text with previews off. Since protocol 1.4. */
|
|
89
|
+
export const devicePushReportSentence = 'A direct report has a new result.';
|
|
90
|
+
/** The text of the owner's test notification. Since protocol 1.4. */
|
|
91
|
+
export const devicePushTestSentence = 'Push from AGL works.';
|
|
72
92
|
/**
|
|
73
93
|
* A page of a ticket's discussion holds at most `maximum` comments and questions together (`default` when the request
|
|
74
94
|
* names none) and at most `bytes` of them as JSON, but always one.
|
|
@@ -92,10 +112,12 @@ export const deviceMethods = [
|
|
|
92
112
|
'device.directreports.list',
|
|
93
113
|
'device.directreport.message',
|
|
94
114
|
'device.host.get',
|
|
115
|
+
'device.push.register',
|
|
116
|
+
'device.push.unregister',
|
|
95
117
|
'device.board.list',
|
|
96
118
|
'device.ticket.get',
|
|
97
119
|
'device.ticket.comment',
|
|
98
120
|
'device.ticket.ask',
|
|
99
121
|
'device.ticket.move',
|
|
100
122
|
];
|
|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4QixtQkFBbUI7SUFDbkIsbUJBQW1CO0lBQ25CLHVCQUF1QjtJQUN2QixtQkFBbUI7SUFDbkIsb0JBQW9CO0NBQ1osQ0FBQyJ9
|
|
@@ -37,4 +37,5 @@ export * from './metrics.js';
|
|
|
37
37
|
export * from './proxycapacity.js';
|
|
38
38
|
export * from './devices.js';
|
|
39
39
|
export * from './requests.devices.js';
|
|
40
|
-
|
|
40
|
+
export * from './push.js';
|
|
41
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90c19pbnRlcmZhY2VzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsaUJBQWlCLENBQUM7QUFDaEMsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLGlDQUFpQyxDQUFDO0FBQ2hELGNBQWMsK0JBQStCLENBQUM7QUFDOUMsY0FBYywwQkFBMEIsQ0FBQztBQUN6QyxjQUFjLCtCQUErQixDQUFDO0FBQzlDLGNBQWMsdUJBQXVCLENBQUM7QUFDdEMsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLGlDQUFpQyxDQUFDO0FBQ2hELGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsa0JBQWtCLENBQUM7QUFDakMsY0FBYyxpQkFBaUIsQ0FBQztBQUNoQyxjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLFlBQVksQ0FBQztBQUMzQixjQUFjLDJCQUEyQixDQUFDO0FBQzFDLGNBQWMscUJBQXFCLENBQUM7QUFDcEMsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMsNkJBQTZCLENBQUM7QUFDNUMsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxjQUFjLFlBQVksQ0FBQztBQUMzQixjQUFjLHFCQUFxQixDQUFDO0FBQ3BDLGNBQWMsa0JBQWtCLENBQUM7QUFFakMsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLDRCQUE0QixDQUFDO0FBQzNDLGNBQWMsb0JBQW9CLENBQUM7QUFDbkMsY0FBYyw2QkFBNkIsQ0FBQztBQUM1QyxjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsc0JBQXNCLENBQUM7QUFDckMsY0FBYyxrQkFBa0IsQ0FBQztBQUNqQyxjQUFjLFlBQVksQ0FBQztBQUMzQixjQUFjLHFCQUFxQixDQUFDO0FBQ3BDLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsb0JBQW9CLENBQUM7QUFDbkMsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxjQUFjLFdBQVcsQ0FBQyJ9
|
|
@@ -5,6 +5,7 @@ import { type TControllerMcpTicketTypedRequest } from './requests.tickets.js';
|
|
|
5
5
|
import { type TControllerMcpFleetTypedRequest } from './requests.fleet.js';
|
|
6
6
|
import { type TControllerMcpSessionFeedTypedRequest } from './sessionfeed.js';
|
|
7
7
|
import { type TControllerMcpDeployTypedRequest } from './deployments.js';
|
|
8
|
+
import { type TControllerMcpPushTypedRequest } from './push.js';
|
|
8
9
|
import * as plugins from './plugins.js';
|
|
9
10
|
import type { IProxyCapacityAnswer, IProxyCapacityRequest } from './proxycapacity.js';
|
|
10
11
|
import type { IReq_ControllerMcpWorkerEnroll, IWorkerCallerSubject } from './workercallers.js';
|
|
@@ -18,7 +19,7 @@ export declare const controllerMcpTypedRequestMaximumBodyBytes: number;
|
|
|
18
19
|
/** Admits a master configuration document or a harness review with its before and after texts. */
|
|
19
20
|
export declare const controllerMcpTypedResponseMaximumBytes: number;
|
|
20
21
|
export declare const controllerMcpToolMaximumOutputBytes: number;
|
|
21
|
-
export declare const controllerMcpMethods: readonly ["agl.mcp.controller.status", "agl.mcp.projects.list", "agl.mcp.sessions.list", "agl.mcp.session.read", "agl.mcp.session.send", "agl.mcp.session.scratchpad.read", "agl.mcp.session.scratchpad.update", "agl.mcp.session.message", "agl.mcp.proxy.capacity", "agl.mcp.browser.action", "agl.mcp.project.create", "agl.mcp.model.list", "agl.mcp.session.create", "agl.mcp.session.model.update", "agl.mcp.session.rename", "agl.mcp.session.archive", "agl.mcp.session.abort", "agl.mcp.resource.list", "agl.mcp.resource.create", "agl.mcp.resource.rename", "agl.mcp.resource.attach", "agl.mcp.resource.detach", "agl.mcp.resource.start", "agl.mcp.resource.stop", "agl.mcp.resource.retire", "agl.mcp.workspace.reveal", "agl.mcp.context.resolve", "agl.mcp.job.start", "agl.mcp.job.status", "agl.mcp.job.tail", "agl.mcp.job.wait", "agl.mcp.job.stop", "agl.mcp.job.list", "agl.mcp.controller.settings.get", "agl.mcp.controller.settings.update", "agl.mcp.configuration.state", "agl.mcp.configuration.master.get", "agl.mcp.configuration.master.save", "agl.mcp.configuration.project", "agl.mcp.configuration.review", "agl.mcp.configuration.apply", "agl.mcp.configuration.restore.review", "agl.mcp.configuration.restore", "agl.mcp.configuration.operation.retry", "agl.mcp.configuration.operation.recover", "agl.mcp.configuration.operation.abandon", "agl.mcp.ticket.list", "agl.mcp.ticket.board", "agl.mcp.ticket.search", "agl.mcp.ticket.get", "agl.mcp.ticket.comments", "agl.mcp.ticket.create", "agl.mcp.ticket.update", "agl.mcp.ticket.move", "agl.mcp.ticket.comment", "agl.mcp.ticket.link", "agl.mcp.ticket.unlink", "agl.mcp.ticket.ask", "agl.mcp.ticket.answer", "agl.mcp.fleet.land", "agl.mcp.fleet.release", "agl.mcp.fleet.tooling", "agl.mcp.fleet.audit", "agl.mcp.fleet.reconcile", "agl.mcp.fleet.status", ...("agl.mcp.fleet.worker.adopt" | "agl.mcp.fleet.worker.archive" | "agl.mcp.fleet.worker.get" | "agl.mcp.fleet.worker.job-wait" | "agl.mcp.fleet.worker.list" | "agl.mcp.fleet.worker.move" | "agl.mcp.fleet.worker.native-message" | "agl.mcp.fleet.worker.reconfirm" | "agl.mcp.fleet.worker.refresh" | "agl.mcp.fleet.worker.report" | "agl.mcp.fleet.worker.resolve-lost" | "agl.mcp.fleet.worker.start" | "agl.mcp.fleet.worker.status" | "agl.mcp.fleet.worker.steer" | "agl.mcp.fleet.worker.stop" | "agl.mcp.fleet.worker.watch")[], "agl.mcp.sessionfeed.list", "agl.mcp.sessionfeed.acknowledge", "agl.mcp.deploy.status", "agl.mcp.deploy.history", "agl.mcp.deploy.probe", "agl.mcp.deploy.release", "agl.mcp.deploy.ticket", "agl.mcp.deploy.refresh", "agl.mcp.worker.enroll"];
|
|
22
|
+
export declare const controllerMcpMethods: readonly ["agl.mcp.controller.status", "agl.mcp.projects.list", "agl.mcp.sessions.list", "agl.mcp.session.read", "agl.mcp.session.send", "agl.mcp.session.scratchpad.read", "agl.mcp.session.scratchpad.update", "agl.mcp.session.message", "agl.mcp.proxy.capacity", "agl.mcp.browser.action", "agl.mcp.project.create", "agl.mcp.model.list", "agl.mcp.session.create", "agl.mcp.session.model.update", "agl.mcp.session.rename", "agl.mcp.session.archive", "agl.mcp.session.abort", "agl.mcp.resource.list", "agl.mcp.resource.create", "agl.mcp.resource.rename", "agl.mcp.resource.attach", "agl.mcp.resource.detach", "agl.mcp.resource.start", "agl.mcp.resource.stop", "agl.mcp.resource.retire", "agl.mcp.workspace.reveal", "agl.mcp.context.resolve", "agl.mcp.job.start", "agl.mcp.job.status", "agl.mcp.job.tail", "agl.mcp.job.wait", "agl.mcp.job.stop", "agl.mcp.job.list", "agl.mcp.controller.settings.get", "agl.mcp.controller.settings.update", "agl.mcp.configuration.state", "agl.mcp.configuration.master.get", "agl.mcp.configuration.master.save", "agl.mcp.configuration.project", "agl.mcp.configuration.review", "agl.mcp.configuration.apply", "agl.mcp.configuration.restore.review", "agl.mcp.configuration.restore", "agl.mcp.configuration.operation.retry", "agl.mcp.configuration.operation.recover", "agl.mcp.configuration.operation.abandon", "agl.mcp.ticket.list", "agl.mcp.ticket.page", "agl.mcp.ticket.overview", "agl.mcp.ticket.board", "agl.mcp.ticket.search", "agl.mcp.ticket.get", "agl.mcp.ticket.comments", "agl.mcp.ticket.create", "agl.mcp.ticket.update", "agl.mcp.ticket.move", "agl.mcp.ticket.comment", "agl.mcp.ticket.link", "agl.mcp.ticket.unlink", "agl.mcp.ticket.ask", "agl.mcp.ticket.answer", "agl.mcp.fleet.land", "agl.mcp.fleet.release", "agl.mcp.fleet.tooling", "agl.mcp.fleet.audit", "agl.mcp.fleet.reconcile", "agl.mcp.fleet.status", ...("agl.mcp.fleet.worker.adopt" | "agl.mcp.fleet.worker.archive" | "agl.mcp.fleet.worker.get" | "agl.mcp.fleet.worker.job-wait" | "agl.mcp.fleet.worker.list" | "agl.mcp.fleet.worker.move" | "agl.mcp.fleet.worker.native-message" | "agl.mcp.fleet.worker.reconfirm" | "agl.mcp.fleet.worker.refresh" | "agl.mcp.fleet.worker.report" | "agl.mcp.fleet.worker.resolve-lost" | "agl.mcp.fleet.worker.start" | "agl.mcp.fleet.worker.status" | "agl.mcp.fleet.worker.steer" | "agl.mcp.fleet.worker.stop" | "agl.mcp.fleet.worker.watch")[], "agl.mcp.sessionfeed.list", "agl.mcp.sessionfeed.acknowledge", "agl.mcp.deploy.status", "agl.mcp.deploy.history", "agl.mcp.deploy.probe", "agl.mcp.deploy.release", "agl.mcp.deploy.ticket", "agl.mcp.deploy.refresh", "agl.mcp.push.status", "agl.mcp.push.apns.set", "agl.mcp.push.apns.unset", "agl.mcp.push.fcm.set", "agl.mcp.push.fcm.unset", "agl.mcp.push.previews", "agl.mcp.push.test", "agl.mcp.worker.enroll"];
|
|
22
23
|
export type TControllerMcpMethod = (typeof controllerMcpMethods)[number];
|
|
23
24
|
export type TControllerOperationPrincipal = 'browser' | 'mcp' | 'device';
|
|
24
25
|
/** JSON kind of one top-level field in a private MCP response. */
|
|
@@ -450,5 +451,5 @@ export interface IReq_ControllerMcpSessionScratchpadUpdate extends plugins.typed
|
|
|
450
451
|
scratchpad: IControllerSessionScratchpad;
|
|
451
452
|
};
|
|
452
453
|
}
|
|
453
|
-
export type TControllerMcpTypedRequest = IReq_ControllerMcpWorkerEnroll | TControllerMcpTicketTypedRequest | TControllerMcpFleetTypedRequest | TControllerMcpFleetWorkerTypedRequest | TControllerMcpSessionFeedTypedRequest | TControllerMcpDeployTypedRequest | IReq_ControllerMcpSettingsGet | IReq_ControllerMcpSettingsUpdate | TControllerMcpWorkspaceTypedRequest | TControllerMcpJobTypedRequest | IReq_ControllerMcpStatus | IReq_ControllerMcpProxyCapacity | IReq_ControllerMcpProjectsList | IReq_ControllerMcpSessionsList | IReq_ControllerMcpSessionRead | IReq_ControllerMcpSessionSend | IReq_ControllerMcpSessionScratchpadRead | IReq_ControllerMcpSessionScratchpadUpdate | IReq_ControllerMcpSessionMessage | IReq_ControllerMcpConfigurationState | IReq_ControllerMcpConfigurationMasterGet | IReq_ControllerMcpConfigurationMasterSave | IReq_ControllerMcpConfigurationProject | IReq_ControllerMcpConfigurationReview | IReq_ControllerMcpConfigurationApply | IReq_ControllerMcpConfigurationRestoreReview | IReq_ControllerMcpConfigurationRestore | IReq_ControllerMcpConfigurationOperationRetry | IReq_ControllerMcpConfigurationOperationRecover | IReq_ControllerMcpConfigurationOperationAbandon;
|
|
454
|
+
export type TControllerMcpTypedRequest = IReq_ControllerMcpWorkerEnroll | TControllerMcpTicketTypedRequest | TControllerMcpFleetTypedRequest | TControllerMcpFleetWorkerTypedRequest | TControllerMcpSessionFeedTypedRequest | TControllerMcpDeployTypedRequest | TControllerMcpPushTypedRequest | IReq_ControllerMcpSettingsGet | IReq_ControllerMcpSettingsUpdate | TControllerMcpWorkspaceTypedRequest | TControllerMcpJobTypedRequest | IReq_ControllerMcpStatus | IReq_ControllerMcpProxyCapacity | IReq_ControllerMcpProjectsList | IReq_ControllerMcpSessionsList | IReq_ControllerMcpSessionRead | IReq_ControllerMcpSessionSend | IReq_ControllerMcpSessionScratchpadRead | IReq_ControllerMcpSessionScratchpadUpdate | IReq_ControllerMcpSessionMessage | IReq_ControllerMcpConfigurationState | IReq_ControllerMcpConfigurationMasterGet | IReq_ControllerMcpConfigurationMasterSave | IReq_ControllerMcpConfigurationProject | IReq_ControllerMcpConfigurationReview | IReq_ControllerMcpConfigurationApply | IReq_ControllerMcpConfigurationRestoreReview | IReq_ControllerMcpConfigurationRestore | IReq_ControllerMcpConfigurationOperationRetry | IReq_ControllerMcpConfigurationOperationRecover | IReq_ControllerMcpConfigurationOperationAbandon;
|
|
454
455
|
export {};
|
|
@@ -5,6 +5,7 @@ import { controllerMcpTicketMethods } from './requests.tickets.js';
|
|
|
5
5
|
import { controllerMcpFleetMethods } from './requests.fleet.js';
|
|
6
6
|
import { controllerMcpSessionFeedMethods } from './sessionfeed.js';
|
|
7
7
|
import { controllerMcpDeployMethods } from './deployments.js';
|
|
8
|
+
import { controllerMcpPushMethods } from './push.js';
|
|
8
9
|
import * as plugins from './plugins.js';
|
|
9
10
|
export const controllerMcpTypedRequestPath = '/mcp/typedrequest';
|
|
10
11
|
/** Admits one master configuration document (at most 4 MiB) with its request envelope. */
|
|
@@ -42,6 +43,7 @@ export const controllerMcpMethods = [
|
|
|
42
43
|
...controllerMcpFleetWorkerMethods,
|
|
43
44
|
...controllerMcpSessionFeedMethods,
|
|
44
45
|
...controllerMcpDeployMethods,
|
|
46
|
+
...controllerMcpPushMethods,
|
|
45
47
|
'agl.mcp.worker.enroll',
|
|
46
48
|
];
|
|
47
49
|
/** The one field table the `agl mcp` bridge validates a session read against. */
|
|
@@ -87,4 +89,4 @@ export const controllerMcpNativeDeliveries = {
|
|
|
87
89
|
wake: 'next-turn',
|
|
88
90
|
inbox: 'queue',
|
|
89
91
|
};
|
|
90
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
92
|
+
//# sourceMapp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xFQUFFLFFBQVEsRUFBRSxJQUFJLEVBQUU7SUFDekMsTUFBTSxFQUFFLEVBQUUsSUFBSSxFQUFFLFFBQVEsRUFBRSxRQUFRLEVBQUUsSUFBSSxFQUFFO0lBQzFDLGdCQUFnQixFQUFFLEVBQUUsSUFBSSxFQUFFLFFBQVEsRUFBRSxRQUFRLEVBQUUsS0FBSyxFQUFFO0lBQ3JELG1CQUFtQixFQUFFLEVBQUUsSUFBSSxFQUFFLFFBQVEsRUFBRSxRQUFRLEVBQUUsS0FBSyxFQUFFO0NBQ29CLENBQUM7QUFFL0U7Ozs7OztHQU1HO0FBQ0gsTUFBTSxDQUFDLE1BQU0sZ0RBQWdELEdBQUcsMkJBQTJCLENBQUM7QUFDNUYsNkhBQTZIO0FBQzdILE1BQU0sQ0FBQyxNQUFNLDBDQUEwQyxHQUFHLHdCQUF3QixDQUFDO0FBa01uRiw0SEFBNEg7QUFDNUgsTUFBTSxDQUFDLE1BQU0sc0NBQXNDLEdBQUcsRUFBRSxDQUFDO0FBbUN6RDs7O0dBR0c7QUFDSCxNQUFNLENBQUMsTUFBTSw2QkFBNkIsR0FBOEU7SUFDdEgsSUFBSSxFQUFFLFdBQVc7SUFDakIsS0FBSyxFQUFFLE9BQU87Q0FDZixDQUFDIn0=
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import type * as plugins from './plugins.js';
|
|
2
|
+
import type { TDevicePushEnvironment, TDevicePushFailureReason, TDevicePushPlatform } from './devices.js';
|
|
3
|
+
/**
|
|
4
|
+
* Notifications from the host (AGL-1639): the push settings the owner sets with `agl push` against the running
|
|
5
|
+
* controller, through its private channel with the local owner capability. The answers name what the host holds for
|
|
6
|
+
* each push service (key id, team id, topic, Firebase project, service account address), never a key, a token or a
|
|
7
|
+
* device's push token.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* What the host holds for one push service: `unset`, no credential; `ready`, a credential it sends with;
|
|
11
|
+
* `refused`, Apple or Google refused it, and nothing is sent on the platform until the owner sets it again;
|
|
12
|
+
* `unreadable`, the stored credential cannot be read or unsealed on this machine, so the owner sets it again.
|
|
13
|
+
*/
|
|
14
|
+
export type TPushCredentialState = 'unset' | 'ready' | 'refused' | 'unreadable';
|
|
15
|
+
/** A send that failed, as `agl push status` shows it: the reason and, when the push service named one, its code. */
|
|
16
|
+
export interface IPushFailureStatus {
|
|
17
|
+
/** Unix milliseconds. */
|
|
18
|
+
at: number;
|
|
19
|
+
reason: TDevicePushFailureReason;
|
|
20
|
+
/** The push service's own code (an APNs `reason`, an FCM `errorCode` or an OAuth `error`), never its message. */
|
|
21
|
+
vendorReason?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Set when the push service refused while its clock and the host's were apart (Google's `invalid_grant` with its
|
|
24
|
+
* `Date` more than 60 s off the host's clock): the service's clock minus the host's, in milliseconds, so a positive
|
|
25
|
+
* value is a host clock behind. The send is `service_failed` and tried again, the credential kept.
|
|
26
|
+
*/
|
|
27
|
+
clockSkewMs?: number;
|
|
28
|
+
}
|
|
29
|
+
/** A clock skew as `agl push status` and the failure journal name it: how far apart, and which clock is behind. */
|
|
30
|
+
export declare const pushClockSkewText: (clockSkewMsArg: number) => string;
|
|
31
|
+
/** What the host holds for Apple's push service. */
|
|
32
|
+
export interface IPushApnsStatus {
|
|
33
|
+
state: TPushCredentialState;
|
|
34
|
+
/** The key's 10-character id; absent while unset. */
|
|
35
|
+
keyId?: string;
|
|
36
|
+
/** The 10-character Apple team id; absent while unset. */
|
|
37
|
+
teamId?: string;
|
|
38
|
+
/** The app's bundle id, the topic every notification names; absent while unset. */
|
|
39
|
+
topic?: string;
|
|
40
|
+
/** Unix milliseconds the credential was set. */
|
|
41
|
+
setAt?: number;
|
|
42
|
+
/** While `refused`: when and why Apple refused the credential. */
|
|
43
|
+
refused?: IPushFailureStatus;
|
|
44
|
+
/** The paired devices registered for APNs notifications. */
|
|
45
|
+
registrations: number;
|
|
46
|
+
/** The last send on the platform that failed since the controller started. */
|
|
47
|
+
lastFailure?: IPushFailureStatus;
|
|
48
|
+
}
|
|
49
|
+
/** What the host holds for Firebase Cloud Messaging. */
|
|
50
|
+
export interface IPushFcmStatus {
|
|
51
|
+
state: TPushCredentialState;
|
|
52
|
+
/** The Firebase project id; absent while unset. */
|
|
53
|
+
projectId?: string;
|
|
54
|
+
/** The service account's address; absent while unset. */
|
|
55
|
+
clientEmail?: string;
|
|
56
|
+
/** Unix milliseconds the credential was set. */
|
|
57
|
+
setAt?: number;
|
|
58
|
+
/** While `refused`: when and why Google refused the credential. */
|
|
59
|
+
refused?: IPushFailureStatus;
|
|
60
|
+
/** The paired devices registered for FCM notifications. */
|
|
61
|
+
registrations: number;
|
|
62
|
+
/** The last send on the platform that failed since the controller started. */
|
|
63
|
+
lastFailure?: IPushFailureStatus;
|
|
64
|
+
}
|
|
65
|
+
/** The host's push settings: one for every device of the host. */
|
|
66
|
+
export interface IPushStatus {
|
|
67
|
+
/** Whether notifications carry previews (`IDevicePushInboxData`); off unless the owner turns it on. */
|
|
68
|
+
previews: boolean;
|
|
69
|
+
apns: IPushApnsStatus;
|
|
70
|
+
fcm: IPushFcmStatus;
|
|
71
|
+
}
|
|
72
|
+
/** A change to the push settings: the settings after it, and whether it changed anything. */
|
|
73
|
+
export interface IPushChange {
|
|
74
|
+
changed: boolean;
|
|
75
|
+
status: IPushStatus;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* What the owner's test notification came to on one device: `delivered`; `unregistered`, the push service no longer
|
|
79
|
+
* knows the device's token (the registration was removed, and the app registers again on its next connect);
|
|
80
|
+
* `unavailable`, the host holds no usable credential for the device's platform, so nothing was sent; `no_answer`, the
|
|
81
|
+
* push service did not answer within `pushTestAnswerWaitMs`, and the notification may still arrive; or why it did not go out.
|
|
82
|
+
*/
|
|
83
|
+
export type TPushTestOutcome = 'delivered' | 'unregistered' | 'unavailable' | 'no_answer' | TDevicePushFailureReason;
|
|
84
|
+
/**
|
|
85
|
+
* How long `agl push test` waits for each device's answer: under the CLI's 30 s request timeout, although one attempt may
|
|
86
|
+
* take a token request, a send, a token asked anew and a send again, at 15 s each.
|
|
87
|
+
*/
|
|
88
|
+
export declare const pushTestAnswerWaitMs = 20000;
|
|
89
|
+
/** One registered device's answer to `agl push test`: never its token. */
|
|
90
|
+
export interface IPushTestResult {
|
|
91
|
+
deviceId: string;
|
|
92
|
+
name: string;
|
|
93
|
+
platform: TDevicePushPlatform;
|
|
94
|
+
environment?: TDevicePushEnvironment;
|
|
95
|
+
outcome: TPushTestOutcome;
|
|
96
|
+
/** The push service's own code, when it named one. */
|
|
97
|
+
vendorReason?: string;
|
|
98
|
+
}
|
|
99
|
+
/** Every `agl push` request: the request without the owner capability, and its answer. */
|
|
100
|
+
export interface IPushOperations {
|
|
101
|
+
status: {
|
|
102
|
+
request: Record<never, never>;
|
|
103
|
+
response: IPushStatus;
|
|
104
|
+
};
|
|
105
|
+
'apns.set': {
|
|
106
|
+
/** `signingKey` is the AuthKey .p8 file's text, which the controller seals and never repeats. */
|
|
107
|
+
request: {
|
|
108
|
+
keyId: string;
|
|
109
|
+
teamId: string;
|
|
110
|
+
topic?: string;
|
|
111
|
+
signingKey: string;
|
|
112
|
+
};
|
|
113
|
+
response: IPushChange;
|
|
114
|
+
};
|
|
115
|
+
'apns.unset': {
|
|
116
|
+
request: Record<never, never>;
|
|
117
|
+
response: IPushChange;
|
|
118
|
+
};
|
|
119
|
+
'fcm.set': {
|
|
120
|
+
/** `serviceAccount` is the service account key file's JSON text, which the controller seals and never repeats. */
|
|
121
|
+
request: {
|
|
122
|
+
serviceAccount: string;
|
|
123
|
+
};
|
|
124
|
+
response: IPushChange;
|
|
125
|
+
};
|
|
126
|
+
'fcm.unset': {
|
|
127
|
+
request: Record<never, never>;
|
|
128
|
+
response: IPushChange;
|
|
129
|
+
};
|
|
130
|
+
previews: {
|
|
131
|
+
request: {
|
|
132
|
+
previews: boolean;
|
|
133
|
+
};
|
|
134
|
+
response: IPushChange;
|
|
135
|
+
};
|
|
136
|
+
/** Sends the test notification (`IDevicePushTestData`) to every registered device, or to the one `deviceId` names. */
|
|
137
|
+
test: {
|
|
138
|
+
request: {
|
|
139
|
+
deviceId?: string;
|
|
140
|
+
};
|
|
141
|
+
response: {
|
|
142
|
+
results: IPushTestResult[];
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
export type TPushOperation = keyof IPushOperations;
|
|
147
|
+
export declare const pushOperations: readonly ["status", "apns.set", "apns.unset", "fcm.set", "fcm.unset", "previews", "test"];
|
|
148
|
+
/** The request fields that carry a secret: no answer, log or error repeats them, and the request's echo redacts them. */
|
|
149
|
+
export declare const pushSecretRequestFields: readonly ['signingKey', 'serviceAccount'];
|
|
150
|
+
/** Why the controller refused an `agl push` request; its sentence names the cause, never the input. */
|
|
151
|
+
export declare const pushErrorCodes: readonly ['push_credential_invalid', 'push_device_unknown', 'push_unavailable'];
|
|
152
|
+
export type TPushErrorCode = (typeof pushErrorCodes)[number];
|
|
153
|
+
export declare const controllerMcpPushMethods: readonly ["agl.mcp.push.status", "agl.mcp.push.apns.set", "agl.mcp.push.apns.unset", "agl.mcp.push.fcm.set", "agl.mcp.push.fcm.unset", "agl.mcp.push.previews", "agl.mcp.push.test"];
|
|
154
|
+
export type TControllerMcpPushMethod = (typeof controllerMcpPushMethods)[number];
|
|
155
|
+
export type TControllerMcpPushRequest<TOperation extends TPushOperation> = {
|
|
156
|
+
method: `agl.mcp.push.${TOperation}`;
|
|
157
|
+
request: IPushOperations[TOperation]['request'] & {
|
|
158
|
+
ownerToken: string;
|
|
159
|
+
};
|
|
160
|
+
response: IPushOperations[TOperation]['response'];
|
|
161
|
+
} & plugins.typedrequestInterfaces.ITypedRequest;
|
|
162
|
+
export type TControllerMcpPushTypedRequest = {
|
|
163
|
+
[TOperation in TPushOperation]: TControllerMcpPushRequest<TOperation>;
|
|
164
|
+
}[TPushOperation];
|
|
165
|
+
/** The operation a private push method names. */
|
|
166
|
+
export declare const pushOperationOf: (methodArg: TControllerMcpPushMethod) => TPushOperation;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** A clock skew as `agl push status` and the failure journal name it: how far apart, and which clock is behind. */
|
|
2
|
+
export const pushClockSkewText = (clockSkewMsArg) => (`${Math.round(Math.abs(clockSkewMsArg) / 1000)} s apart, the host's clock ${clockSkewMsArg > 0 ? 'behind' : 'ahead'}`);
|
|
3
|
+
/**
|
|
4
|
+
* How long `agl push test` waits for each device's answer: under the CLI's 30 s request timeout, although one attempt may
|
|
5
|
+
* take a token request, a send, a token asked anew and a send again, at 15 s each.
|
|
6
|
+
*/
|
|
7
|
+
export const pushTestAnswerWaitMs = 20_000;
|
|
8
|
+
export const pushOperations = ['status', 'apns.set', 'apns.unset', 'fcm.set', 'fcm.unset', 'previews', 'test'];
|
|
9
|
+
/** The request fields that carry a secret: no answer, log or error repeats them, and the request's echo redacts them. */
|
|
10
|
+
export const pushSecretRequestFields = ['signingKey', 'serviceAccount'];
|
|
11
|
+
/** Why the controller refused an `agl push` request; its sentence names the cause, never the input. */
|
|
12
|
+
export const pushErrorCodes = ['push_credential_invalid', 'push_device_unknown', 'push_unavailable'];
|
|
13
|
+
export const controllerMcpPushMethods = [
|
|
14
|
+
'agl.mcp.push.status',
|
|
15
|
+
'agl.mcp.push.apns.set',
|
|
16
|
+
'agl.mcp.push.apns.unset',
|
|
17
|
+
'agl.mcp.push.fcm.set',
|
|
18
|
+
'agl.mcp.push.fcm.unset',
|
|
19
|
+
'agl.mcp.push.previews',
|
|
20
|
+
'agl.mcp.push.test',
|
|
21
|
+
];
|
|
22
|
+
/** The operation a private push method names. */
|
|
23
|
+
export const pushOperationOf = (methodArg) => methodArg.slice('agl.mcp.push.'.length);
|
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVzaC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzX2ludGVyZmFjZXMvcHVzaC50cyJ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UFtQyxFQUFrQixFQUFFLENBQ3JGLFNBQVMsQ0FBQyxLQUFLLENBQUMsZUFBZSxDQUFDLE1BQU0sQ0FDdkMsQ0FBQyJ9
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as plugins from './plugins.js';
|
|
2
|
-
import type { ITicket, ITicketAnswer, ITicketAsk, ITicketBoard, ITicketChanges, ITicketComment, ITicketCreate, ITicketDetail, ITicketFilters, ITicketGet, ITicketMove, ITicketQuestion, TTicketLink, TTicketOperation, TTicketReferenceContent, TTicketRequest, TTicketResponse } from './tickets.js';
|
|
3
|
-
export declare const controllerMcpTicketMethods: readonly ['agl.mcp.ticket.list', 'agl.mcp.ticket.board', 'agl.mcp.ticket.search', 'agl.mcp.ticket.get', 'agl.mcp.ticket.comments', 'agl.mcp.ticket.create', 'agl.mcp.ticket.update', 'agl.mcp.ticket.move', 'agl.mcp.ticket.comment', 'agl.mcp.ticket.link', 'agl.mcp.ticket.unlink', 'agl.mcp.ticket.ask', 'agl.mcp.ticket.answer'];
|
|
2
|
+
import type { ITicket, ITicketAnswer, ITicketAsk, ITicketBoard, ITicketChanges, ITicketComment, ITicketCreate, ITicketDetail, ITicketFilters, ITicketGet, ITicketMove, ITicketOverview, ITicketOverviewRequest, ITicketPageRequest, TTicketPage, ITicketQuestion, TTicketLink, TTicketOperation, TTicketReferenceContent, TTicketRequest, TTicketResponse } from './tickets.js';
|
|
3
|
+
export declare const controllerMcpTicketMethods: readonly ['agl.mcp.ticket.list', 'agl.mcp.ticket.page', 'agl.mcp.ticket.overview', 'agl.mcp.ticket.board', 'agl.mcp.ticket.search', 'agl.mcp.ticket.get', 'agl.mcp.ticket.comments', 'agl.mcp.ticket.create', 'agl.mcp.ticket.update', 'agl.mcp.ticket.move', 'agl.mcp.ticket.comment', 'agl.mcp.ticket.link', 'agl.mcp.ticket.unlink', 'agl.mcp.ticket.ask', 'agl.mcp.ticket.answer'];
|
|
4
4
|
export type TControllerMcpTicketMethod = (typeof controllerMcpTicketMethods)[number];
|
|
5
5
|
export type TControllerTicketRequest<TMethod extends TTicketOperation> = {
|
|
6
6
|
method: `controller.ticket.${TMethod}`;
|
|
@@ -33,6 +33,34 @@ export interface IReq_ControllerMcpTicketList extends plugins.typedrequestInterf
|
|
|
33
33
|
tickets: ITicket[];
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Lists the board in pages of `limit` tickets (1 to 200, default 50, within 256 KiB), as summaries without
|
|
38
|
+
* description and source words unless `view` is `full`. Beyond the filters of the whole listing it narrows by
|
|
39
|
+
* `statuses`, `open`, `kind`, `priorities`, `parent` (direct children), `assignee` (a person or session id),
|
|
40
|
+
* `unassigned`, `keys` and `updatedSince`, and sorts by `board`, `updated`, `created` or `priority`. `total` and
|
|
41
|
+
* `columns` count everything the filters match. `nextCursor` continues with the same filters, sort and view;
|
|
42
|
+
* `moved` tells that the board changed since the first page.
|
|
43
|
+
*/
|
|
44
|
+
export interface IReq_ControllerMcpTicketPage extends plugins.typedrequestInterfaces.implementsTR<TControllerMcpTicketRequest<'page'>, IReq_ControllerMcpTicketPage> {
|
|
45
|
+
method: 'agl.mcp.ticket.page';
|
|
46
|
+
request: ITicketPageRequest & {
|
|
47
|
+
ownerToken?: string;
|
|
48
|
+
};
|
|
49
|
+
response: TTicketPage;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Reads the board at a glance without any ticket's texts: counts by column, priority, AutoLabel, project and
|
|
53
|
+
* assignee, each open epic's progress, the tickets that need someone (urgent, needs input, open questions,
|
|
54
|
+
* review, ready without an assignee, stale) and the tickets changed last. Lists hold at most `limit` tickets and
|
|
55
|
+
* carry the count of all they stand for.
|
|
56
|
+
*/
|
|
57
|
+
export interface IReq_ControllerMcpTicketOverview extends plugins.typedrequestInterfaces.implementsTR<TControllerMcpTicketRequest<'overview'>, IReq_ControllerMcpTicketOverview> {
|
|
58
|
+
method: 'agl.mcp.ticket.overview';
|
|
59
|
+
request: ITicketOverviewRequest & {
|
|
60
|
+
ownerToken?: string;
|
|
61
|
+
};
|
|
62
|
+
response: ITicketOverview;
|
|
63
|
+
}
|
|
36
64
|
/** Reads the board: its columns, the tickets the filters match, and the caller as `viewer`. */
|
|
37
65
|
export interface IReq_ControllerMcpTicketBoard extends plugins.typedrequestInterfaces.implementsTR<TControllerMcpTicketRequest<'board'>, IReq_ControllerMcpTicketBoard> {
|
|
38
66
|
method: 'agl.mcp.ticket.board';
|
|
@@ -205,4 +233,4 @@ export interface IReq_ControllerMcpTicketAnswer extends plugins.typedrequestInte
|
|
|
205
233
|
ticket: ITicket;
|
|
206
234
|
};
|
|
207
235
|
}
|
|
208
|
-
export type TControllerMcpTicketTypedRequest = IReq_ControllerMcpTicketList | IReq_ControllerMcpTicketBoard | IReq_ControllerMcpTicketSearch | IReq_ControllerMcpTicketGet | IReq_ControllerMcpTicketComments | IReq_ControllerMcpTicketCreate | IReq_ControllerMcpTicketUpdate | IReq_ControllerMcpTicketMove | IReq_ControllerMcpTicketComment | IReq_ControllerMcpTicketLink | IReq_ControllerMcpTicketUnlink | IReq_ControllerMcpTicketAsk | IReq_ControllerMcpTicketAnswer;
|
|
236
|
+
export type TControllerMcpTicketTypedRequest = IReq_ControllerMcpTicketList | IReq_ControllerMcpTicketPage | IReq_ControllerMcpTicketOverview | IReq_ControllerMcpTicketBoard | IReq_ControllerMcpTicketSearch | IReq_ControllerMcpTicketGet | IReq_ControllerMcpTicketComments | IReq_ControllerMcpTicketCreate | IReq_ControllerMcpTicketUpdate | IReq_ControllerMcpTicketMove | IReq_ControllerMcpTicketComment | IReq_ControllerMcpTicketLink | IReq_ControllerMcpTicketUnlink | IReq_ControllerMcpTicketAsk | IReq_ControllerMcpTicketAnswer;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const controllerMcpTicketMethods = [
|
|
2
|
-
'agl.mcp.ticket.list', 'agl.mcp.ticket.board', 'agl.mcp.ticket.search', 'agl.mcp.ticket.get',
|
|
2
|
+
'agl.mcp.ticket.list', 'agl.mcp.ticket.page', 'agl.mcp.ticket.overview', 'agl.mcp.ticket.board', 'agl.mcp.ticket.search', 'agl.mcp.ticket.get',
|
|
3
3
|
'agl.mcp.ticket.comments', 'agl.mcp.ticket.create', 'agl.mcp.ticket.update',
|
|
4
4
|
'agl.mcp.ticket.move', 'agl.mcp.ticket.comment', 'agl.mcp.ticket.link', 'agl.mcp.ticket.unlink',
|
|
5
5
|
'agl.mcp.ticket.ask', 'agl.mcp.ticket.answer',
|
|
6
6
|
];
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVxdWVzdHMudGlja2V0cy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzX2ludGVyZmFjZXMvcmVxdWVzdHMudGlja2V0cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPQSxNQUFNLENBQUMsTUFBTSwwQkFBMEIsR0FBRztJQUN4QyxxQkFBcUIsRUFBRSxxQkFBcUIsRUFBRSx5QkFBeUIsRUFBRSxzQkFBc0IsRUFBRSx1QkFBdUIsRUFBRSxvQkFBb0I7SUFDOUkseUJBQXlCLEVBQUUsdUJBQXVCLEVBQUUsdUJBQXVCO0lBQzNFLHFCQUFxQixFQUFFLHdCQUF3QixFQUFFLHFCQUFxQixFQUFFLHVCQUF1QjtJQUMvRixvQkFBb0IsRUFBRSx1QkFBdUI7Q0FDckMsQ0FBQyJ9
|