@abyss-project/runtime 3.7.0 → 3.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/.prettierrc +5 -5
- package/README.md +88 -88
- package/dist/cost/execution-cost.d.ts +6 -0
- package/dist/cost/execution-cost.js +27 -12
- package/dist/cost/execution-cost.js.map +1 -1
- package/dist/discord/discord.types.d.ts +43 -2
- package/dist/discord/discord.types.js +11 -1
- package/dist/discord/discord.types.js.map +1 -1
- package/dist/engine/engine-source.js +1 -1
- package/dist/engine/run-in-isolate.js +32 -2
- package/dist/engine/run-in-isolate.js.map +1 -1
- package/dist/runner-protocol/execution-protocol.types.d.ts +5 -0
- package/dist/runner-protocol/execution-protocol.types.js +6 -1
- package/dist/runner-protocol/execution-protocol.types.js.map +1 -1
- package/package.json +10 -15
- package/src/__tests__/surface.test.ts +12 -1
- package/src/cost/__tests__/execution-cost.test.ts +53 -0
- package/src/cost/execution-cost.ts +30 -13
- package/src/discord/__tests__/discord-event-input.test.ts +1 -0
- package/src/discord/discord.types.ts +54 -1
- package/src/engine/__tests__/run-in-isolate.test.ts +56 -5
- package/src/engine/run-in-isolate.ts +47 -4
- package/src/runner-protocol/__tests__/file-payload.test.ts +26 -0
- package/src/runner-protocol/execution-protocol.types.ts +40 -3
package/.prettierrc
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
{
|
|
2
|
-
"singleQuote": true,
|
|
3
|
-
"trailingComma": "all",
|
|
4
|
-
"printWidth": 100
|
|
5
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"singleQuote": true,
|
|
3
|
+
"trailingComma": "all",
|
|
4
|
+
"printWidth": 100
|
|
5
|
+
}
|
package/README.md
CHANGED
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
# @abyss-project/runtime
|
|
2
|
-
|
|
3
|
-
Abyss automation core: definitions, interpreter, execution protocol `abyss-runtime.v2` and
|
|
4
|
-
execution cost.
|
|
5
|
-
|
|
6
|
-
The package root (`@abyss-project/runtime`) is browser-compatible. Node-only code (the
|
|
7
|
-
`CodeRunnerSession` WebSocket client) lives under `@abyss-project/runtime/server`.
|
|
8
|
-
`@abyss-project/runtime/engine` exports `ENGINE_SOURCE`, the interpreter bundled into one
|
|
9
|
-
self-contained script for the code runner's isolate.
|
|
10
|
-
|
|
11
|
-
## Host globals
|
|
12
|
-
|
|
13
|
-
`ExecuteMessage.globals` gives the client code read-only globals: each top-level key becomes a
|
|
14
|
-
frozen global. Two keys are conventional: `secrets` (`{{ secrets.NAME }}` / `secrets.NAME`, masked
|
|
15
|
-
by the host) and `config` (`Record<string, string>`, the non-secret per-environment variables:
|
|
16
|
-
`{{ config.NAME }}` / `config.NAME`, not masked). A name the host did not send is `undefined`.
|
|
17
|
-
The host sends the names `collectGlobalReferences(definition, 'config')` finds.
|
|
18
|
-
|
|
19
|
-
## Discord helpers
|
|
20
|
-
|
|
21
|
-
A host that grants the `DiscordCapability` names (`discord.reply`, `discord.update`,
|
|
22
|
-
`discord.showModal`, `discord.followUp`, `discord.sendMessage`, `discord.editMessage`,
|
|
23
|
-
`discord.deleteMessage`, `discord.addRole`, `discord.removeRole`, `discord.sendDirectMessage`,
|
|
24
|
-
`discord.getMember`, `discord.getGuildRoles`, `discord.getChannel`, `discord.getGuild`) lets the
|
|
25
|
-
client code call `abyss.discord.<name>(...)`. Every helper always exists; one whose capability the
|
|
26
|
-
function does not declare rejects with an error naming the action to declare:
|
|
27
|
-
|
|
28
|
-
- `reply(message)`, `update(message)`, `followUp(message)`, `showModal({ customId, title, fields })`
|
|
29
|
-
- `sendMessage(channelId, message)`, `editMessage(channelId, messageId, message)`,
|
|
30
|
-
`deleteMessage(channelId, messageId)`, `sendDirectMessage(userId, message)`
|
|
31
|
-
- `addRole(guildId, userId, roleId)`, `removeRole(guildId, userId, roleId)`
|
|
32
|
-
- reads: `getMember(guildId, userId)` (a `DiscordMember`, or `null` when the user is not in the
|
|
33
|
-
server), `getGuildRoles(guildId)` (`DiscordRole[]`), `getChannel(channelId)` (`DiscordChannel`),
|
|
34
|
-
`getGuild(guildId)` (`DiscordGuild`). The shapes are Discord's in camelCase; permissions are
|
|
35
|
-
decimal strings, since they exceed 2^53.
|
|
36
|
-
|
|
37
|
-
`reply`, `update`, `showModal` and `followUp` need an interaction: in an execution no interaction
|
|
38
|
-
started (a task, a delayed run) the host rejects them with `NO_INTERACTION`.
|
|
39
|
-
|
|
40
|
-
`message` is a `DiscordMessage` (`{ content?, embeds?, components?, ephemeral?, allowedMentions? }`).
|
|
41
|
-
By default a message pings the users it mentions and nobody else: `@everyone`, `@here` and roles
|
|
42
|
-
stay plain text. `allowedMentions` (`DiscordAllowedMentions`: `parse` of `DiscordMentionType`
|
|
43
|
-
values, `users`, `roles`, `repliedUser`) replaces that default. The `args` of
|
|
44
|
-
each host `call` are the types `Discord*Args` (a `DiscordMessage` itself for `reply`, `update`,
|
|
45
|
-
`followUp`). A host failing a call with the message `<DiscordErrorCode>: <detail>` (or the bare
|
|
46
|
-
code) makes the helper throw an `Error` named `DiscordError` with `code` and `message` set; any
|
|
47
|
-
other failure is thrown unchanged. `DiscordInteractionInput` types the `input` of a function
|
|
48
|
-
triggered by a Discord interaction; `DiscordEventInput` (`kind: 'DISCORD_EVENT'`, `event`, `guildId`, `receivedAt`, `firedAt`, `attempt`, `data`) types the `input` of one triggered by a Gateway event (`DiscordEventType`), and `isDiscordEventInput` tells it from the other inputs.
|
|
49
|
-
|
|
50
|
-
## Schedule helpers
|
|
51
|
-
|
|
52
|
-
A host that grants the `ScheduleCapability` names (`schedule.after`, `schedule.at`,
|
|
53
|
-
`schedule.cancel`) lets the client code schedule a delayed run of a named task. Every helper always
|
|
54
|
-
exists; one whose capability the function does not declare rejects with an error naming the action
|
|
55
|
-
to declare:
|
|
56
|
-
|
|
57
|
-
- `after(seconds, taskName, payload?, { key? })` and `at(isoDate, taskName, payload?, { key? })`
|
|
58
|
-
(`isoDate` an ISO 8601 string, or a `Date`) resolve to a `ScheduleResult` (`{ id, deduplicated }`).
|
|
59
|
-
While a run with the same `key` is pending, scheduling again returns its `id` with
|
|
60
|
-
`deduplicated: true`.
|
|
61
|
-
- `cancel(idOrKey)` resolves to a `ScheduleCancelResult` (`{ cancelled }`).
|
|
62
|
-
|
|
63
|
-
The `args` of each host `call` are `ScheduleAfterArgs`, `ScheduleAtArgs` and `ScheduleCancelArgs`
|
|
64
|
-
(`payload` and `key` left out when not given). A host failing a call with the message
|
|
65
|
-
`<ScheduleErrorCode>: <detail>` (or the bare code) makes the helper throw an `Error` named
|
|
66
|
-
`ScheduleError` with `code` and `message` set; any other failure is thrown unchanged.
|
|
67
|
-
`ScheduledRunInput` (`{ kind, task: { id, name }, scheduledFor, firedAt, attempt, payload? }`, `kind`
|
|
68
|
-
a `ScheduledRunKind`: `SCHEDULE` for a cron tick, `DELAYED` for a delayed run) types the `input` of a
|
|
69
|
-
function started by a task.
|
|
70
|
-
|
|
71
|
-
## Installation
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
npm install @abyss-project/runtime
|
|
75
|
-
# or
|
|
76
|
-
pnpm add @abyss-project/runtime
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## Liens
|
|
80
|
-
|
|
81
|
-
- **Documentation** : [https://docs.abyss-project.fr](https://docs.abyss-project.fr)
|
|
82
|
-
- **NPM** : [@abyss-project/runtime](https://www.npmjs.com/package/@abyss-project/runtime)
|
|
83
|
-
- **Application Abyss** : [app.abyss-project.fr](https://app.abyss-project.fr)
|
|
84
|
-
- **Statut des services** : [status.abyss-project.fr](https://status.abyss-project.fr)
|
|
85
|
-
|
|
86
|
-
## Support
|
|
87
|
-
|
|
88
|
-
Pour toute demande, ouvrir un ticket depuis [l'application Abyss](https://app.abyss-project.fr/dashboard/account/tickets/create).
|
|
1
|
+
# @abyss-project/runtime
|
|
2
|
+
|
|
3
|
+
Abyss automation core: definitions, interpreter, execution protocol `abyss-runtime.v2` and
|
|
4
|
+
execution cost.
|
|
5
|
+
|
|
6
|
+
The package root (`@abyss-project/runtime`) is browser-compatible. Node-only code (the
|
|
7
|
+
`CodeRunnerSession` WebSocket client) lives under `@abyss-project/runtime/server`.
|
|
8
|
+
`@abyss-project/runtime/engine` exports `ENGINE_SOURCE`, the interpreter bundled into one
|
|
9
|
+
self-contained script for the code runner's isolate.
|
|
10
|
+
|
|
11
|
+
## Host globals
|
|
12
|
+
|
|
13
|
+
`ExecuteMessage.globals` gives the client code read-only globals: each top-level key becomes a
|
|
14
|
+
frozen global. Two keys are conventional: `secrets` (`{{ secrets.NAME }}` / `secrets.NAME`, masked
|
|
15
|
+
by the host) and `config` (`Record<string, string>`, the non-secret per-environment variables:
|
|
16
|
+
`{{ config.NAME }}` / `config.NAME`, not masked). A name the host did not send is `undefined`.
|
|
17
|
+
The host sends the names `collectGlobalReferences(definition, 'config')` finds.
|
|
18
|
+
|
|
19
|
+
## Discord helpers
|
|
20
|
+
|
|
21
|
+
A host that grants the `DiscordCapability` names (`discord.reply`, `discord.update`,
|
|
22
|
+
`discord.showModal`, `discord.followUp`, `discord.sendMessage`, `discord.editMessage`,
|
|
23
|
+
`discord.deleteMessage`, `discord.addRole`, `discord.removeRole`, `discord.sendDirectMessage`,
|
|
24
|
+
`discord.getMember`, `discord.getGuildRoles`, `discord.getChannel`, `discord.getGuild`) lets the
|
|
25
|
+
client code call `abyss.discord.<name>(...)`. Every helper always exists; one whose capability the
|
|
26
|
+
function does not declare rejects with an error naming the action to declare:
|
|
27
|
+
|
|
28
|
+
- `reply(message)`, `update(message)`, `followUp(message)`, `showModal({ customId, title, fields })`
|
|
29
|
+
- `sendMessage(channelId, message)`, `editMessage(channelId, messageId, message)`,
|
|
30
|
+
`deleteMessage(channelId, messageId)`, `sendDirectMessage(userId, message)`
|
|
31
|
+
- `addRole(guildId, userId, roleId)`, `removeRole(guildId, userId, roleId)`
|
|
32
|
+
- reads: `getMember(guildId, userId)` (a `DiscordMember`, or `null` when the user is not in the
|
|
33
|
+
server), `getGuildRoles(guildId)` (`DiscordRole[]`), `getChannel(channelId)` (`DiscordChannel`),
|
|
34
|
+
`getGuild(guildId)` (`DiscordGuild`). The shapes are Discord's in camelCase; permissions are
|
|
35
|
+
decimal strings, since they exceed 2^53.
|
|
36
|
+
|
|
37
|
+
`reply`, `update`, `showModal` and `followUp` need an interaction: in an execution no interaction
|
|
38
|
+
started (a task, a delayed run) the host rejects them with `NO_INTERACTION`.
|
|
39
|
+
|
|
40
|
+
`message` is a `DiscordMessage` (`{ content?, embeds?, components?, ephemeral?, allowedMentions? }`).
|
|
41
|
+
By default a message pings the users it mentions and nobody else: `@everyone`, `@here` and roles
|
|
42
|
+
stay plain text. `allowedMentions` (`DiscordAllowedMentions`: `parse` of `DiscordMentionType`
|
|
43
|
+
values, `users`, `roles`, `repliedUser`) replaces that default. The `args` of
|
|
44
|
+
each host `call` are the types `Discord*Args` (a `DiscordMessage` itself for `reply`, `update`,
|
|
45
|
+
`followUp`). A host failing a call with the message `<DiscordErrorCode>: <detail>` (or the bare
|
|
46
|
+
code) makes the helper throw an `Error` named `DiscordError` with `code` and `message` set; any
|
|
47
|
+
other failure is thrown unchanged. `DiscordInteractionInput` types the `input` of a function
|
|
48
|
+
triggered by a Discord interaction; `DiscordEventInput` (`kind: 'DISCORD_EVENT'`, `event`, `guildId`, `receivedAt`, `firedAt`, `attempt`, `data`) types the `input` of one triggered by a Gateway event (`DiscordEventType`), and `isDiscordEventInput` tells it from the other inputs.
|
|
49
|
+
|
|
50
|
+
## Schedule helpers
|
|
51
|
+
|
|
52
|
+
A host that grants the `ScheduleCapability` names (`schedule.after`, `schedule.at`,
|
|
53
|
+
`schedule.cancel`) lets the client code schedule a delayed run of a named task. Every helper always
|
|
54
|
+
exists; one whose capability the function does not declare rejects with an error naming the action
|
|
55
|
+
to declare:
|
|
56
|
+
|
|
57
|
+
- `after(seconds, taskName, payload?, { key? })` and `at(isoDate, taskName, payload?, { key? })`
|
|
58
|
+
(`isoDate` an ISO 8601 string, or a `Date`) resolve to a `ScheduleResult` (`{ id, deduplicated }`).
|
|
59
|
+
While a run with the same `key` is pending, scheduling again returns its `id` with
|
|
60
|
+
`deduplicated: true`.
|
|
61
|
+
- `cancel(idOrKey)` resolves to a `ScheduleCancelResult` (`{ cancelled }`).
|
|
62
|
+
|
|
63
|
+
The `args` of each host `call` are `ScheduleAfterArgs`, `ScheduleAtArgs` and `ScheduleCancelArgs`
|
|
64
|
+
(`payload` and `key` left out when not given). A host failing a call with the message
|
|
65
|
+
`<ScheduleErrorCode>: <detail>` (or the bare code) makes the helper throw an `Error` named
|
|
66
|
+
`ScheduleError` with `code` and `message` set; any other failure is thrown unchanged.
|
|
67
|
+
`ScheduledRunInput` (`{ kind, task: { id, name }, scheduledFor, firedAt, attempt, payload? }`, `kind`
|
|
68
|
+
a `ScheduledRunKind`: `SCHEDULE` for a cron tick, `DELAYED` for a delayed run) types the `input` of a
|
|
69
|
+
function started by a task.
|
|
70
|
+
|
|
71
|
+
## Installation
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npm install @abyss-project/runtime
|
|
75
|
+
# or
|
|
76
|
+
pnpm add @abyss-project/runtime
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Liens
|
|
80
|
+
|
|
81
|
+
- **Documentation** : [https://docs.abyss-project.fr](https://docs.abyss-project.fr)
|
|
82
|
+
- **NPM** : [@abyss-project/runtime](https://www.npmjs.com/package/@abyss-project/runtime)
|
|
83
|
+
- **Application Abyss** : [app.abyss-project.fr](https://app.abyss-project.fr)
|
|
84
|
+
- **Statut des services** : [status.abyss-project.fr](https://status.abyss-project.fr)
|
|
85
|
+
|
|
86
|
+
## Support
|
|
87
|
+
|
|
88
|
+
Pour toute demande, ouvrir un ticket depuis [l'application Abyss](https://app.abyss-project.fr/dashboard/account/tickets/create).
|
|
@@ -12,12 +12,17 @@ export interface ResourceProfileSpec {
|
|
|
12
12
|
export declare const RESOURCE_PROFILES: Readonly<Record<ResourceProfile, ResourceProfileSpec>>;
|
|
13
13
|
export declare const COST_RATES: {
|
|
14
14
|
readonly executionMillicredits: 10;
|
|
15
|
+
readonly autocompleteExecutionMillicredits: 1;
|
|
15
16
|
readonly cpuMillicreditsPerSecond: 500;
|
|
16
17
|
readonly memoryMillicreditsPerGbSecond: 100;
|
|
17
18
|
readonly networkOutMillicreditsPerMb: 1000;
|
|
18
19
|
readonly httpCallMillicredits: 10;
|
|
19
20
|
readonly storeWriteMillicredits: 10;
|
|
20
21
|
};
|
|
22
|
+
export declare enum CostedExecutionKind {
|
|
23
|
+
STANDARD = "STANDARD",
|
|
24
|
+
AUTOCOMPLETE = "AUTOCOMPLETE"
|
|
25
|
+
}
|
|
21
26
|
export declare enum CostedExecutionStatus {
|
|
22
27
|
RAN = "RAN",
|
|
23
28
|
INTERRUPTED = "INTERRUPTED",
|
|
@@ -33,6 +38,7 @@ export interface StepUsage {
|
|
|
33
38
|
export interface ExecutionCostInput extends StepUsage {
|
|
34
39
|
status: CostedExecutionStatus;
|
|
35
40
|
profile: ResourceProfile;
|
|
41
|
+
kind?: CostedExecutionKind;
|
|
36
42
|
resumedSegment?: boolean;
|
|
37
43
|
}
|
|
38
44
|
export interface StepCostInput {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.computeStepCost = exports.computeExecutionCost = exports.CostedExecutionStatus = exports.COST_RATES = exports.RESOURCE_PROFILES = exports.ResourceProfile = void 0;
|
|
3
|
+
exports.computeStepCost = exports.computeExecutionCost = exports.CostedExecutionStatus = exports.CostedExecutionKind = exports.COST_RATES = exports.RESOURCE_PROFILES = exports.ResourceProfile = void 0;
|
|
4
4
|
var ResourceProfile;
|
|
5
5
|
(function (ResourceProfile) {
|
|
6
6
|
ResourceProfile["S"] = "S";
|
|
@@ -18,12 +18,18 @@ exports.RESOURCE_PROFILES = {
|
|
|
18
18
|
};
|
|
19
19
|
exports.COST_RATES = {
|
|
20
20
|
executionMillicredits: 10,
|
|
21
|
+
autocompleteExecutionMillicredits: 1,
|
|
21
22
|
cpuMillicreditsPerSecond: 500,
|
|
22
23
|
memoryMillicreditsPerGbSecond: 100,
|
|
23
24
|
networkOutMillicreditsPerMb: 1000,
|
|
24
25
|
httpCallMillicredits: 10,
|
|
25
26
|
storeWriteMillicredits: 10,
|
|
26
27
|
};
|
|
28
|
+
var CostedExecutionKind;
|
|
29
|
+
(function (CostedExecutionKind) {
|
|
30
|
+
CostedExecutionKind["STANDARD"] = "STANDARD";
|
|
31
|
+
CostedExecutionKind["AUTOCOMPLETE"] = "AUTOCOMPLETE";
|
|
32
|
+
})(CostedExecutionKind || (exports.CostedExecutionKind = CostedExecutionKind = {}));
|
|
27
33
|
var CostedExecutionStatus;
|
|
28
34
|
(function (CostedExecutionStatus) {
|
|
29
35
|
CostedExecutionStatus["RAN"] = "RAN";
|
|
@@ -51,16 +57,21 @@ const whole = (count) => BigInt(Math.round(count));
|
|
|
51
57
|
const hundredths = (coefficient) => BigInt(Math.round(coefficient * 100));
|
|
52
58
|
const variableUnits = (usage, execution) => {
|
|
53
59
|
const profile = exports.RESOURCE_PROFILES[execution.profile];
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
const metered = execution.kind !== CostedExecutionKind.AUTOCOMPLETE;
|
|
61
|
+
const cpu = !metered
|
|
62
|
+
? ZERO
|
|
63
|
+
: (micros(usage.cpuMs) *
|
|
64
|
+
BigInt(exports.COST_RATES.cpuMillicreditsPerSecond) *
|
|
65
|
+
hundredths(profile.cpuCoefficient) *
|
|
66
|
+
UNITS_PER_MILLICREDIT) /
|
|
67
|
+
CPU_DENOMINATOR;
|
|
68
|
+
const memory = !metered
|
|
69
|
+
? ZERO
|
|
70
|
+
: (BigInt(profile.memoryMb) *
|
|
71
|
+
micros(usage.wallMs) *
|
|
72
|
+
BigInt(exports.COST_RATES.memoryMillicreditsPerGbSecond) *
|
|
73
|
+
UNITS_PER_MILLICREDIT) /
|
|
74
|
+
MEMORY_DENOMINATOR;
|
|
64
75
|
const network = (whole(usage.netOutBytes) *
|
|
65
76
|
BigInt(exports.COST_RATES.networkOutMillicreditsPerMb) *
|
|
66
77
|
UNITS_PER_MILLICREDIT) /
|
|
@@ -76,7 +87,11 @@ const floorDiv = (numerator, denominator) => {
|
|
|
76
87
|
};
|
|
77
88
|
const roundHalfUp = (units) => Number(floorDiv(units * TWO + UNITS_PER_MILLICREDIT, UNITS_PER_MILLICREDIT * TWO));
|
|
78
89
|
const isFree = (execution) => execution.status !== CostedExecutionStatus.RAN;
|
|
79
|
-
const executionPrice = (execution) => isFree(execution) || execution.resumedSegment
|
|
90
|
+
const executionPrice = (execution) => isFree(execution) || execution.resumedSegment
|
|
91
|
+
? 0
|
|
92
|
+
: execution.kind === CostedExecutionKind.AUTOCOMPLETE
|
|
93
|
+
? exports.COST_RATES.autocompleteExecutionMillicredits
|
|
94
|
+
: exports.COST_RATES.executionMillicredits;
|
|
80
95
|
const computeExecutionCost = (input) => {
|
|
81
96
|
assertUsage(input, 'execution');
|
|
82
97
|
if (isFree(input)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-cost.js","sourceRoot":"","sources":["../../src/cost/execution-cost.ts"],"names":[],"mappings":";;;AAIA,IAAY,eAMX;AAND,WAAY,eAAe;IACzB,0BAAO,CAAA;IACP,0BAAO,CAAA;IACP,0BAAO,CAAA;IACP,4BAAS,CAAA;IACT,8BAAW,CAAA;AACb,CAAC,EANW,eAAe,+BAAf,eAAe,QAM1B;AASY,QAAA,iBAAiB,GAA2D;IACvF,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,cAAc,EAAE,CAAC,EAAE;IACzD,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,GAAG,E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C,UAAU,GAAG,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAC9F,MAAM,OAAO,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;QACxC,MAAM,IAAI,GAAG,OAAO,GAAG,QAAQ,CAAC;QAChC,QAAQ,GAAG,OAAO,CAAC;QACnB,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AApBW,QAAA,eAAe,mBAoB1B"}
|
|
@@ -28,8 +28,15 @@ export declare enum DiscordCapability {
|
|
|
28
28
|
CREATE_ROLE = "discord.createRole",
|
|
29
29
|
DELETE_ROLE = "discord.deleteRole",
|
|
30
30
|
CREATE_THREAD = "discord.createThread",
|
|
31
|
-
END_POLL = "discord.endPoll"
|
|
32
|
-
|
|
31
|
+
END_POLL = "discord.endPoll",
|
|
32
|
+
AUTOCOMPLETE = "discord.autocomplete",
|
|
33
|
+
READ_ATTACHMENT = "discord.readAttachment"
|
|
34
|
+
}
|
|
35
|
+
export declare const DISCORD_AUTOCOMPLETE_MAX_CHOICES = 25;
|
|
36
|
+
export declare const DISCORD_MESSAGE_MAX_FILES = 10;
|
|
37
|
+
export declare const DISCORD_MESSAGE_MAX_FILES_BYTES: number;
|
|
38
|
+
export declare const REFLEX_ATTACHMENT_MAX_BYTES_BOUND: number;
|
|
39
|
+
export declare const REFLEX_ATTACHMENT_DEFAULT_MAX_BYTES: number;
|
|
33
40
|
export declare const DISCORD_CAPABILITY_LIMITS: {
|
|
34
41
|
readonly auditReasonMaxLength: 512;
|
|
35
42
|
readonly timeoutMaxDays: 28;
|
|
@@ -81,8 +88,17 @@ export interface DiscordPoll {
|
|
|
81
88
|
durationHours?: number;
|
|
82
89
|
allowMultiselect?: boolean;
|
|
83
90
|
}
|
|
91
|
+
export type DiscordMessageFile = {
|
|
92
|
+
name: string;
|
|
93
|
+
description?: string;
|
|
94
|
+
} & ({
|
|
95
|
+
contentBase64: string;
|
|
96
|
+
} | {
|
|
97
|
+
attachmentId: string;
|
|
98
|
+
});
|
|
84
99
|
export interface DiscordMessage {
|
|
85
100
|
content?: string;
|
|
101
|
+
files?: DiscordMessageFile[];
|
|
86
102
|
embeds?: DiscordJsonObject[];
|
|
87
103
|
components?: DiscordJsonObject[];
|
|
88
104
|
ephemeral?: boolean;
|
|
@@ -218,6 +234,23 @@ export interface DiscordCreateThreadArgs extends DiscordAuditReason {
|
|
|
218
234
|
private?: boolean;
|
|
219
235
|
autoArchiveMinutes?: number;
|
|
220
236
|
}
|
|
237
|
+
export interface DiscordAutocompleteChoice {
|
|
238
|
+
name: string;
|
|
239
|
+
value: string | number;
|
|
240
|
+
nameLocalizations?: Record<string, string>;
|
|
241
|
+
}
|
|
242
|
+
export interface DiscordAutocompleteArgs {
|
|
243
|
+
choices: DiscordAutocompleteChoice[];
|
|
244
|
+
}
|
|
245
|
+
export interface DiscordReadAttachmentArgs {
|
|
246
|
+
attachmentId: string;
|
|
247
|
+
}
|
|
248
|
+
export interface DiscordReadAttachmentResult {
|
|
249
|
+
filename: string;
|
|
250
|
+
contentType: string | null;
|
|
251
|
+
size: number;
|
|
252
|
+
contentBase64: string;
|
|
253
|
+
}
|
|
221
254
|
export interface DiscordEndPollArgs {
|
|
222
255
|
channelId: string;
|
|
223
256
|
messageId: string;
|
|
@@ -288,6 +321,7 @@ export interface DiscordGuild {
|
|
|
288
321
|
}
|
|
289
322
|
export declare enum DiscordInteractionKind {
|
|
290
323
|
COMMAND = "COMMAND",
|
|
324
|
+
AUTOCOMPLETE = "AUTOCOMPLETE",
|
|
291
325
|
COMPONENT = "COMPONENT",
|
|
292
326
|
MODAL = "MODAL"
|
|
293
327
|
}
|
|
@@ -295,6 +329,7 @@ export declare enum DiscordInteractionType {
|
|
|
295
329
|
PING = 1,
|
|
296
330
|
APPLICATION_COMMAND = 2,
|
|
297
331
|
MESSAGE_COMPONENT = 3,
|
|
332
|
+
APPLICATION_COMMAND_AUTOCOMPLETE = 4,
|
|
298
333
|
MODAL_SUBMIT = 5
|
|
299
334
|
}
|
|
300
335
|
export declare enum DiscordCallbackType {
|
|
@@ -303,6 +338,7 @@ export declare enum DiscordCallbackType {
|
|
|
303
338
|
DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE = 5,
|
|
304
339
|
DEFERRED_UPDATE_MESSAGE = 6,
|
|
305
340
|
UPDATE_MESSAGE = 7,
|
|
341
|
+
APPLICATION_COMMAND_AUTOCOMPLETE_RESULT = 8,
|
|
306
342
|
MODAL = 9
|
|
307
343
|
}
|
|
308
344
|
export declare const EPHEMERAL_FLAG = 64;
|
|
@@ -332,6 +368,10 @@ export interface DiscordInteractionInput {
|
|
|
332
368
|
name: string;
|
|
333
369
|
options: Record<string, string | number | boolean>;
|
|
334
370
|
resolved?: DiscordResolved;
|
|
371
|
+
focused?: {
|
|
372
|
+
name: string;
|
|
373
|
+
value: string;
|
|
374
|
+
};
|
|
335
375
|
};
|
|
336
376
|
component?: {
|
|
337
377
|
customId: string;
|
|
@@ -403,6 +443,7 @@ export interface DiscordMessageCreateData {
|
|
|
403
443
|
mentions: string[];
|
|
404
444
|
referencedMessageId: string | null;
|
|
405
445
|
attachmentCount: number;
|
|
446
|
+
attachments: DiscordAttachment[];
|
|
406
447
|
createdAt: string;
|
|
407
448
|
content?: string;
|
|
408
449
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isDiscordEventInput = exports.DISCORD_EVENT_INPUT_KIND = exports.DiscordEventType = exports.EPHEMERAL_FLAG = exports.DiscordCallbackType = exports.DiscordInteractionType = exports.DiscordInteractionKind = exports.DiscordPermissionTargetType = exports.DiscordChannelType = exports.DiscordModalFieldStyle = exports.DiscordMentionType = exports.DiscordErrorCode = exports.DISCORD_CAPABILITY_LIMITS = exports.DiscordCapability = void 0;
|
|
3
|
+
exports.isDiscordEventInput = exports.DISCORD_EVENT_INPUT_KIND = exports.DiscordEventType = exports.EPHEMERAL_FLAG = exports.DiscordCallbackType = exports.DiscordInteractionType = exports.DiscordInteractionKind = exports.DiscordPermissionTargetType = exports.DiscordChannelType = exports.DiscordModalFieldStyle = exports.DiscordMentionType = exports.DiscordErrorCode = exports.DISCORD_CAPABILITY_LIMITS = exports.REFLEX_ATTACHMENT_DEFAULT_MAX_BYTES = exports.REFLEX_ATTACHMENT_MAX_BYTES_BOUND = exports.DISCORD_MESSAGE_MAX_FILES_BYTES = exports.DISCORD_MESSAGE_MAX_FILES = exports.DISCORD_AUTOCOMPLETE_MAX_CHOICES = exports.DiscordCapability = void 0;
|
|
4
4
|
var DiscordCapability;
|
|
5
5
|
(function (DiscordCapability) {
|
|
6
6
|
DiscordCapability["REPLY"] = "discord.reply";
|
|
@@ -32,7 +32,14 @@ var DiscordCapability;
|
|
|
32
32
|
DiscordCapability["DELETE_ROLE"] = "discord.deleteRole";
|
|
33
33
|
DiscordCapability["CREATE_THREAD"] = "discord.createThread";
|
|
34
34
|
DiscordCapability["END_POLL"] = "discord.endPoll";
|
|
35
|
+
DiscordCapability["AUTOCOMPLETE"] = "discord.autocomplete";
|
|
36
|
+
DiscordCapability["READ_ATTACHMENT"] = "discord.readAttachment";
|
|
35
37
|
})(DiscordCapability || (exports.DiscordCapability = DiscordCapability = {}));
|
|
38
|
+
exports.DISCORD_AUTOCOMPLETE_MAX_CHOICES = 25;
|
|
39
|
+
exports.DISCORD_MESSAGE_MAX_FILES = 10;
|
|
40
|
+
exports.DISCORD_MESSAGE_MAX_FILES_BYTES = 10 * 1024 * 1024;
|
|
41
|
+
exports.REFLEX_ATTACHMENT_MAX_BYTES_BOUND = 8 * 1024 * 1024;
|
|
42
|
+
exports.REFLEX_ATTACHMENT_DEFAULT_MAX_BYTES = 2 * 1024 * 1024;
|
|
36
43
|
exports.DISCORD_CAPABILITY_LIMITS = {
|
|
37
44
|
auditReasonMaxLength: 512,
|
|
38
45
|
timeoutMaxDays: 28,
|
|
@@ -88,6 +95,7 @@ var DiscordPermissionTargetType;
|
|
|
88
95
|
var DiscordInteractionKind;
|
|
89
96
|
(function (DiscordInteractionKind) {
|
|
90
97
|
DiscordInteractionKind["COMMAND"] = "COMMAND";
|
|
98
|
+
DiscordInteractionKind["AUTOCOMPLETE"] = "AUTOCOMPLETE";
|
|
91
99
|
DiscordInteractionKind["COMPONENT"] = "COMPONENT";
|
|
92
100
|
DiscordInteractionKind["MODAL"] = "MODAL";
|
|
93
101
|
})(DiscordInteractionKind || (exports.DiscordInteractionKind = DiscordInteractionKind = {}));
|
|
@@ -96,6 +104,7 @@ var DiscordInteractionType;
|
|
|
96
104
|
DiscordInteractionType[DiscordInteractionType["PING"] = 1] = "PING";
|
|
97
105
|
DiscordInteractionType[DiscordInteractionType["APPLICATION_COMMAND"] = 2] = "APPLICATION_COMMAND";
|
|
98
106
|
DiscordInteractionType[DiscordInteractionType["MESSAGE_COMPONENT"] = 3] = "MESSAGE_COMPONENT";
|
|
107
|
+
DiscordInteractionType[DiscordInteractionType["APPLICATION_COMMAND_AUTOCOMPLETE"] = 4] = "APPLICATION_COMMAND_AUTOCOMPLETE";
|
|
99
108
|
DiscordInteractionType[DiscordInteractionType["MODAL_SUBMIT"] = 5] = "MODAL_SUBMIT";
|
|
100
109
|
})(DiscordInteractionType || (exports.DiscordInteractionType = DiscordInteractionType = {}));
|
|
101
110
|
var DiscordCallbackType;
|
|
@@ -105,6 +114,7 @@ var DiscordCallbackType;
|
|
|
105
114
|
DiscordCallbackType[DiscordCallbackType["DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE"] = 5] = "DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE";
|
|
106
115
|
DiscordCallbackType[DiscordCallbackType["DEFERRED_UPDATE_MESSAGE"] = 6] = "DEFERRED_UPDATE_MESSAGE";
|
|
107
116
|
DiscordCallbackType[DiscordCallbackType["UPDATE_MESSAGE"] = 7] = "UPDATE_MESSAGE";
|
|
117
|
+
DiscordCallbackType[DiscordCallbackType["APPLICATION_COMMAND_AUTOCOMPLETE_RESULT"] = 8] = "APPLICATION_COMMAND_AUTOCOMPLETE_RESULT";
|
|
108
118
|
DiscordCallbackType[DiscordCallbackType["MODAL"] = 9] = "MODAL";
|
|
109
119
|
})(DiscordCallbackType || (exports.DiscordCallbackType = DiscordCallbackType = {}));
|
|
110
120
|
exports.EPHEMERAL_FLAG = 64;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discord.types.js","sourceRoot":"","sources":["../../src/discord/discord.types.ts"],"names":[],"mappings":";;;AAOA,IAAY,
|
|
1
|
+
{"version":3,"file":"discord.types.js","sourceRoot":"","sources":["../../src/discord/discord.types.ts"],"names":[],"mappings":";;;AAOA,IAAY,iBA+DX;AA/DD,WAAY,iBAAiB;IAE3B,4CAAuB,CAAA;IAEvB,8CAAyB,CAAA;IAEzB,qDAAgC,CAAA;IAEhC,mDAA8B,CAAA;IAE9B,yDAAoC,CAAA;IAEpC,yDAAoC,CAAA;IAEpC,6DAAwC,CAAA;IAExC,iDAA4B,CAAA;IAE5B,uDAAkC,CAAA;IAElC,sEAAiD,CAAA;IAEjD,qDAAgC,CAAA;IAEhC,8DAAyC,CAAA;IAEzC,uDAAkC,CAAA;IAElC,mDAA8B,CAAA;IAE9B,uDAAkC,CAAA;IAElC,qDAAgC,CAAA;IAEhC,yDAAoC,CAAA;IAEpC,6DAAwC,CAAA;IAExC,wEAAmD,CAAA;IAEnD,yDAAoC,CAAA;IAEpC,+DAA0C,CAAA;IAE1C,6DAAwC,CAAA;IAExC,6DAAwC,CAAA;IAExC,4EAAuD,CAAA;IAEvD,kFAA6D,CAAA;IAE7D,uDAAkC,CAAA;IAElC,uDAAkC,CAAA;IAElC,2DAAsC,CAAA;IAEtC,iDAA4B,CAAA;IAE5B,0DAAqC,CAAA;IAErC,+DAA0C,CAAA;AAC5C,CAAC,EA/DW,iBAAiB,iCAAjB,iBAAiB,QA+D5B;AAGY,QAAA,gCAAgC,GAAG,EAAE,CAAC;AAEtC,QAAA,yBAAyB,GAAG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