@botiverse/raft-sdk 0.10.0 → 0.11.1
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 +6 -3
- package/dist/cjs/index.cjs +222 -71
- package/dist/esm/index.js +223 -73
- package/dist/index.d.ts +212 -11
- package/operations.json +118 -7
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -4706,6 +4706,7 @@ const AGENT_API_ROUTE_META = {
|
|
|
4706
4706
|
inboxList: read,
|
|
4707
4707
|
agentContext: read,
|
|
4708
4708
|
serverInfo: read,
|
|
4709
|
+
userChannels: read,
|
|
4709
4710
|
serverUpdate: naturalDestructive,
|
|
4710
4711
|
mentionActionsPending: read,
|
|
4711
4712
|
senderMentionDeliveries: read,
|
|
@@ -5707,6 +5708,31 @@ const agentApiAgentContextResponseSchema = passthroughObject({
|
|
|
5707
5708
|
text: string()
|
|
5708
5709
|
}).nullable()
|
|
5709
5710
|
});
|
|
5711
|
+
const agentApiServerInfoChannelSchema = passthroughObject({
|
|
5712
|
+
id: string().transform(asChannelId),
|
|
5713
|
+
name: string(),
|
|
5714
|
+
joined: boolean()
|
|
5715
|
+
});
|
|
5716
|
+
const agentApiServerInfoAgentSchema = passthroughObject({
|
|
5717
|
+
name: string(),
|
|
5718
|
+
status: string().optional(),
|
|
5719
|
+
activity: string().nullable().optional(),
|
|
5720
|
+
activityDetail: string().nullable().optional(),
|
|
5721
|
+
role: _enum([
|
|
5722
|
+
"owner",
|
|
5723
|
+
"admin",
|
|
5724
|
+
"member"
|
|
5725
|
+
]).nullable().optional()
|
|
5726
|
+
});
|
|
5727
|
+
const agentApiServerInfoHumanSchema = passthroughObject({
|
|
5728
|
+
name: string(),
|
|
5729
|
+
role: _enum([
|
|
5730
|
+
"owner",
|
|
5731
|
+
"admin",
|
|
5732
|
+
"member",
|
|
5733
|
+
"guest"
|
|
5734
|
+
]).nullable().optional()
|
|
5735
|
+
});
|
|
5710
5736
|
const agentApiServerInfoResponseSchema = passthroughObject({
|
|
5711
5737
|
runtimeContext: passthroughObject({
|
|
5712
5738
|
agentId: string(),
|
|
@@ -5724,32 +5750,39 @@ const agentApiServerInfoResponseSchema = passthroughObject({
|
|
|
5724
5750
|
}),
|
|
5725
5751
|
serverRole: string().nullable().optional(),
|
|
5726
5752
|
serverCapabilities: passthroughObject({}).optional(),
|
|
5727
|
-
channels: array(
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
+
channels: array(agentApiServerInfoChannelSchema),
|
|
5754
|
+
agents: array(agentApiServerInfoAgentSchema),
|
|
5755
|
+
humans: array(agentApiServerInfoHumanSchema)
|
|
5756
|
+
});
|
|
5757
|
+
const nonNegativeIntegerStringSchema = string().trim().regex(/^(0|[1-9][0-9]*)$/, "must be a non-negative integer");
|
|
5758
|
+
const agentApiUserChannelsParamsSchema = passthroughObject({ name: string().trim().min(1) });
|
|
5759
|
+
const agentApiUserChannelsQuerySchema = passthroughObject({
|
|
5760
|
+
offset: nonNegativeIntegerStringSchema.optional(),
|
|
5761
|
+
limit: string().trim().regex(/^([1-9]|[1-9][0-9]|1[0-9][0-9]|200)$/, "must be an integer from 1 to 200").optional()
|
|
5762
|
+
});
|
|
5763
|
+
const agentApiUserChannelsPageFields = {
|
|
5764
|
+
memberships: array(agentApiServerInfoChannelSchema),
|
|
5765
|
+
uncheckedCount: number$1().int().nonnegative(),
|
|
5766
|
+
page: passthroughObject({
|
|
5767
|
+
total: number$1().int().nonnegative(),
|
|
5768
|
+
offset: number$1().int().nonnegative(),
|
|
5769
|
+
limit: number$1().int().positive()
|
|
5770
|
+
})
|
|
5771
|
+
};
|
|
5772
|
+
/**
|
|
5773
|
+
* One user's visible facts and their memberships among one window of the
|
|
5774
|
+
* caller's visible channels (`GET /users/:name/channels`). `user` is the
|
|
5775
|
+
* user's `serverInfo` agents / humans entry, unchanged.
|
|
5776
|
+
*/
|
|
5777
|
+
const agentApiUserChannelsResponseSchema = discriminatedUnion("kind", [passthroughObject({
|
|
5778
|
+
user: agentApiServerInfoAgentSchema,
|
|
5779
|
+
kind: literal("agent"),
|
|
5780
|
+
...agentApiUserChannelsPageFields
|
|
5781
|
+
}), passthroughObject({
|
|
5782
|
+
user: agentApiServerInfoHumanSchema,
|
|
5783
|
+
kind: literal("human"),
|
|
5784
|
+
...agentApiUserChannelsPageFields
|
|
5785
|
+
})]);
|
|
5753
5786
|
const agentApiMentionActionsPendingQuerySchema = passthroughObject({ limit: optionalStringSchema });
|
|
5754
5787
|
const agentApiMentionActionEnvelopeSchema = passthroughObject({ resolutionId: string() });
|
|
5755
5788
|
const agentApiMentionActionResultSchema = passthroughObject({
|
|
@@ -6742,6 +6775,22 @@ const agentApiContract = {
|
|
|
6742
6775
|
request: {},
|
|
6743
6776
|
response: { body: agentApiServerInfoResponseSchema }
|
|
6744
6777
|
}),
|
|
6778
|
+
userChannels: route({
|
|
6779
|
+
key: "userChannels",
|
|
6780
|
+
method: "GET",
|
|
6781
|
+
path: "/users/:name/channels",
|
|
6782
|
+
client: {
|
|
6783
|
+
resource: "users",
|
|
6784
|
+
method: "channels"
|
|
6785
|
+
},
|
|
6786
|
+
capability: "channels",
|
|
6787
|
+
description: "One visible agent or human (exact name, agents first; the serverInfo entry) and which of one window of your visible channels (serverInfo order, offset/limit, limit at most 200) list them as a member, in one request. Needs the read capability as well. 404 user_not_found when no visible user has that name.",
|
|
6788
|
+
request: {
|
|
6789
|
+
params: agentApiUserChannelsParamsSchema,
|
|
6790
|
+
query: agentApiUserChannelsQuerySchema
|
|
6791
|
+
},
|
|
6792
|
+
response: { body: agentApiUserChannelsResponseSchema }
|
|
6793
|
+
}),
|
|
6745
6794
|
serverUpdate: route({
|
|
6746
6795
|
key: "serverUpdate",
|
|
6747
6796
|
method: "PATCH",
|
|
@@ -8607,6 +8656,31 @@ const AGENT_API_ROUTE_MANIFEST = [
|
|
|
8607
8656
|
"body": true
|
|
8608
8657
|
}
|
|
8609
8658
|
},
|
|
8659
|
+
{
|
|
8660
|
+
"key": "userChannels",
|
|
8661
|
+
"method": "GET",
|
|
8662
|
+
"path": "/users/:name/channels",
|
|
8663
|
+
"fullPath": "/internal/agent-api/users/:name/channels",
|
|
8664
|
+
"client": {
|
|
8665
|
+
"resource": "users",
|
|
8666
|
+
"method": "channels"
|
|
8667
|
+
},
|
|
8668
|
+
"capability": "channels",
|
|
8669
|
+
"description": "One visible agent or human (exact name, agents first; the serverInfo entry) and which of one window of your visible channels (serverInfo order, offset/limit, limit at most 200) list them as a member, in one request. Needs the read capability as well. 404 user_not_found when no visible user has that name.",
|
|
8670
|
+
"sideEffect": "read",
|
|
8671
|
+
"idempotency": "natural",
|
|
8672
|
+
"destructive": false,
|
|
8673
|
+
"audience": "both",
|
|
8674
|
+
"request": {
|
|
8675
|
+
"params": true,
|
|
8676
|
+
"query": true,
|
|
8677
|
+
"body": false
|
|
8678
|
+
},
|
|
8679
|
+
"response": {
|
|
8680
|
+
"kind": "json",
|
|
8681
|
+
"body": true
|
|
8682
|
+
}
|
|
8683
|
+
},
|
|
8610
8684
|
{
|
|
8611
8685
|
"key": "serverUpdate",
|
|
8612
8686
|
"method": "PATCH",
|
|
@@ -9909,7 +9983,7 @@ const AGENT_API_ROUTE_MANIFEST = [
|
|
|
9909
9983
|
}
|
|
9910
9984
|
];
|
|
9911
9985
|
/** Content hash of AGENT_API_ROUTE_MANIFEST; see computeAgentApiManifestVersion. */
|
|
9912
|
-
const AGENT_API_MANIFEST_VERSION = "
|
|
9986
|
+
const AGENT_API_MANIFEST_VERSION = "edd02bcf059dbd7c";
|
|
9913
9987
|
//#endregion
|
|
9914
9988
|
//#region src/routes.ts
|
|
9915
9989
|
const ROUTE_INFO = Object.fromEntries(AGENT_API_ROUTE_MANIFEST.map((entry) => {
|
|
@@ -10734,11 +10808,8 @@ const RAFT_HINTS = {
|
|
|
10734
10808
|
action,
|
|
10735
10809
|
resolutionId
|
|
10736
10810
|
], {
|
|
10737
|
-
name: "mentions.
|
|
10738
|
-
args: {
|
|
10739
|
-
action,
|
|
10740
|
-
resolutionIds: [resolutionId]
|
|
10741
|
-
}
|
|
10811
|
+
name: action === "notify" ? "mentions.notify" : "mentions.add",
|
|
10812
|
+
args: { resolutionIds: [resolutionId] }
|
|
10742
10813
|
}),
|
|
10743
10814
|
mentionPending: () => hint(["mention", "pending"], {
|
|
10744
10815
|
name: "mentions.pending",
|
|
@@ -13863,12 +13934,23 @@ async function updateProfile(client, request, options = {}) {
|
|
|
13863
13934
|
const userInfoRequestSchema = requestSchema()(object({
|
|
13864
13935
|
name: string().describe("The human or agent, `@handle` (or the bare handle)."),
|
|
13865
13936
|
offset: number$1().int().nonnegative().optional().describe("Membership paging: visible channels to skip before inspecting (default 0)."),
|
|
13866
|
-
limit: number$1().int().positive().optional().describe(
|
|
13937
|
+
limit: number$1().int().positive().max(200).optional().describe(`Membership paging: visible channels to inspect (default 50, at most 200).`)
|
|
13867
13938
|
}));
|
|
13939
|
+
/** The route's gate refused this credential (capability, grant, or runner session); `server.info` decides what remains visible. */
|
|
13940
|
+
function isUserChannelsGateRefusal(result) {
|
|
13941
|
+
if (result.error.kind !== "http") return false;
|
|
13942
|
+
return result.error.status === 403 || result.error.status === 501 && result.error.errorCode === "unsupported_capability";
|
|
13943
|
+
}
|
|
13944
|
+
function isUserNotFound(result) {
|
|
13945
|
+
return result.error.kind === "http" && result.error.status === 404 && result.error.errorCode === "user_not_found";
|
|
13946
|
+
}
|
|
13868
13947
|
/**
|
|
13869
|
-
* `raft user info <name>`: the user's visible facts
|
|
13870
|
-
* their memberships among one page of the visible channels,
|
|
13871
|
-
*
|
|
13948
|
+
* `raft user info <name>`: the user's visible facts (their `server.info`
|
|
13949
|
+
* entry) and their memberships among one page of the visible channels, in one
|
|
13950
|
+
* `users.channels` request. A channel whose roster the Server would refuse is
|
|
13951
|
+
* skipped and counted. A credential the route refuses (no `channels`
|
|
13952
|
+
* capability or `channel:read` grant) can read no roster, so the user is
|
|
13953
|
+
* looked up in `server.info` and every inspected channel is skipped.
|
|
13872
13954
|
*/
|
|
13873
13955
|
async function userInfo(client, request, options = {}) {
|
|
13874
13956
|
const invalid = validateOpRequest(userInfoRequestSchema, request);
|
|
@@ -13878,18 +13960,7 @@ async function userInfo(client, request, options = {}) {
|
|
|
13878
13960
|
if (!name) return failureOutcome(opError("INVALID_REQUEST", { message: "user name is required" }));
|
|
13879
13961
|
const limit = request.limit ?? 50;
|
|
13880
13962
|
const offset = request.offset ?? 0;
|
|
13881
|
-
const
|
|
13882
|
-
if (!info.ok) return failureFromClientResult(info);
|
|
13883
|
-
const agent = info.data.agents.find((candidate) => candidate.name === name);
|
|
13884
|
-
const human = info.data.humans.find((candidate) => candidate.name === name);
|
|
13885
|
-
const user = agent ? {
|
|
13886
|
-
kind: "agent",
|
|
13887
|
-
value: agent
|
|
13888
|
-
} : human ? {
|
|
13889
|
-
kind: "human",
|
|
13890
|
-
value: human
|
|
13891
|
-
} : null;
|
|
13892
|
-
if (!user) return failureOutcome(opError("NOT_FOUND", {
|
|
13963
|
+
const notFound = () => failureOutcome(opError("NOT_FOUND", {
|
|
13893
13964
|
message: `User not found or not visible: @${name}`,
|
|
13894
13965
|
nextAction: `Run \`${formatHint(RAFT_HINTS.serverInfo({
|
|
13895
13966
|
view: "agents",
|
|
@@ -13899,30 +13970,57 @@ async function userInfo(client, request, options = {}) {
|
|
|
13899
13970
|
query: true
|
|
13900
13971
|
}), options.hints)}\` to inspect visible users.`
|
|
13901
13972
|
}));
|
|
13902
|
-
|
|
13903
|
-
|
|
13904
|
-
let skippedChannels
|
|
13905
|
-
|
|
13906
|
-
|
|
13907
|
-
|
|
13908
|
-
|
|
13909
|
-
|
|
13910
|
-
|
|
13911
|
-
|
|
13973
|
+
let user;
|
|
13974
|
+
let memberships;
|
|
13975
|
+
let skippedChannels;
|
|
13976
|
+
let total;
|
|
13977
|
+
const result = await client.users.channels({ name }, {
|
|
13978
|
+
offset: String(offset),
|
|
13979
|
+
limit: String(limit)
|
|
13980
|
+
});
|
|
13981
|
+
if (result.ok) {
|
|
13982
|
+
user = result.data.kind === "agent" ? {
|
|
13983
|
+
kind: "agent",
|
|
13984
|
+
value: result.data.user
|
|
13985
|
+
} : {
|
|
13986
|
+
kind: "human",
|
|
13987
|
+
value: result.data.user
|
|
13988
|
+
};
|
|
13989
|
+
memberships = result.data.memberships.map((channel) => ({
|
|
13912
13990
|
...channel,
|
|
13913
13991
|
joined: true,
|
|
13914
13992
|
muted: void 0,
|
|
13915
13993
|
activityMuted: void 0
|
|
13916
|
-
});
|
|
13917
|
-
|
|
13994
|
+
}));
|
|
13995
|
+
skippedChannels = result.data.uncheckedCount;
|
|
13996
|
+
total = result.data.page.total;
|
|
13997
|
+
} else if (isUserNotFound(result)) return notFound();
|
|
13998
|
+
else if (isUserChannelsGateRefusal(result)) {
|
|
13999
|
+
const info = await client.server.info();
|
|
14000
|
+
if (!info.ok) return failureFromClientResult(info);
|
|
14001
|
+
const agent = info.data.agents.find((candidate) => candidate.name === name);
|
|
14002
|
+
const human = info.data.humans.find((candidate) => candidate.name === name);
|
|
14003
|
+
if (agent) user = {
|
|
14004
|
+
kind: "agent",
|
|
14005
|
+
value: agent
|
|
14006
|
+
};
|
|
14007
|
+
else if (human) user = {
|
|
14008
|
+
kind: "human",
|
|
14009
|
+
value: human
|
|
14010
|
+
};
|
|
14011
|
+
else return notFound();
|
|
14012
|
+
memberships = [];
|
|
14013
|
+
skippedChannels = info.data.channels.slice(offset, offset + limit).length;
|
|
14014
|
+
total = info.data.channels.length;
|
|
14015
|
+
} else return failureFromClientResult(result);
|
|
13918
14016
|
const nextOffset = offset + limit;
|
|
13919
|
-
const nextHint = nextOffset <
|
|
14017
|
+
const nextHint = nextOffset < total ? RAFT_HINTS.userInfo({
|
|
13920
14018
|
name,
|
|
13921
14019
|
offset: nextOffset,
|
|
13922
14020
|
limit
|
|
13923
14021
|
}) : null;
|
|
13924
14022
|
const page = {
|
|
13925
|
-
total
|
|
14023
|
+
total,
|
|
13926
14024
|
offset,
|
|
13927
14025
|
limit,
|
|
13928
14026
|
nextCommand: nextHint ? formatHint(nextHint, options.hints) : void 0
|
|
@@ -14723,6 +14821,8 @@ function formatAgentSenderMentionDeliveries(messageId, deliveries) {
|
|
|
14723
14821
|
//#endregion
|
|
14724
14822
|
//#region ../shared/src/agentOps/mentions.ts
|
|
14725
14823
|
const pendingMentionActionsRequestSchema = requestSchema()(object({ limit: number$1().int().positive().optional().describe("Maximum pending mentions to list.") }));
|
|
14824
|
+
const mentionResolutionIdsRequestSchema = requestSchema()(object({ resolutionIds: array(string()).describe("resolutionId values from mentions.pending.") }));
|
|
14825
|
+
/** @deprecated The request of the deprecated `mentions.execute`; use `mentionResolutionIdsRequestSchema` (`mentions.notify` / `mentions.add`). */
|
|
14726
14826
|
const executeMentionActionRequestSchema = requestSchema()(object({
|
|
14727
14827
|
action: _enum(["notify", "add"]).describe("notify: tell the mentioned target about the message; add: add them to the conversation."),
|
|
14728
14828
|
resolutionIds: array(string()).describe("resolutionId values from mentions.pending.")
|
|
@@ -14757,13 +14857,31 @@ async function pendingMentionActions(client, request = {}, options = {}) {
|
|
|
14757
14857
|
})
|
|
14758
14858
|
};
|
|
14759
14859
|
}
|
|
14860
|
+
/** Tell the targets of unreached @mentions about the message (`raft mention notify`). */
|
|
14861
|
+
async function notifyMentions(client, request) {
|
|
14862
|
+
const invalid = validateOpRequest(mentionResolutionIdsRequestSchema, request);
|
|
14863
|
+
if (invalid) return invalid;
|
|
14864
|
+
return runMentionAction(client, "notify", request.resolutionIds);
|
|
14865
|
+
}
|
|
14866
|
+
/** Add the targets of unreached @mentions to the conversation (`raft mention add`). */
|
|
14867
|
+
async function addMentions(client, request) {
|
|
14868
|
+
const invalid = validateOpRequest(mentionResolutionIdsRequestSchema, request);
|
|
14869
|
+
if (invalid) return invalid;
|
|
14870
|
+
return runMentionAction(client, "add", request.resolutionIds);
|
|
14871
|
+
}
|
|
14872
|
+
/** @deprecated Backs the deprecated `mentions.execute`; use `notifyMentions` / `addMentions`. */
|
|
14760
14873
|
async function executeMentionAction(client, request) {
|
|
14761
14874
|
const invalid = validateOpRequest(executeMentionActionRequestSchema, request);
|
|
14762
14875
|
if (invalid) return invalid;
|
|
14763
|
-
const
|
|
14764
|
-
if (
|
|
14876
|
+
const missing = "Pass an action (notify | add) and at least one resolution id.";
|
|
14877
|
+
if (request.action !== "notify" && request.action !== "add") return failureOutcome(opError("INVALID_REQUEST", { message: missing }));
|
|
14878
|
+
return runMentionAction(client, request.action, request.resolutionIds, missing);
|
|
14879
|
+
}
|
|
14880
|
+
async function runMentionAction(client, action, resolutionIds, missingIdsMessage = "Pass at least one resolution id.") {
|
|
14881
|
+
const ids = (resolutionIds ?? []).map((id) => id.trim()).filter(Boolean);
|
|
14882
|
+
if (ids.length === 0) return failureOutcome(opError("INVALID_REQUEST", { message: missingIdsMessage }));
|
|
14765
14883
|
const result = await client.mentions.executeAction({
|
|
14766
|
-
action
|
|
14884
|
+
action,
|
|
14767
14885
|
resolutionIds: ids
|
|
14768
14886
|
});
|
|
14769
14887
|
if (!result.ok) return failureFromClientResult(result);
|
|
@@ -14772,11 +14890,11 @@ async function executeMentionAction(client, request) {
|
|
|
14772
14890
|
ok: true,
|
|
14773
14891
|
state: "executed",
|
|
14774
14892
|
data: {
|
|
14775
|
-
action
|
|
14893
|
+
action,
|
|
14776
14894
|
results
|
|
14777
14895
|
},
|
|
14778
14896
|
next: null,
|
|
14779
|
-
text: formatAgentMentionActionResults(
|
|
14897
|
+
text: formatAgentMentionActionResults(action, results)
|
|
14780
14898
|
};
|
|
14781
14899
|
}
|
|
14782
14900
|
async function senderMentionDeliveries(client, request) {
|
|
@@ -15548,21 +15666,47 @@ const OPERATION_DEFS = [
|
|
|
15548
15666
|
}
|
|
15549
15667
|
},
|
|
15550
15668
|
{
|
|
15551
|
-
name: "mentions.
|
|
15552
|
-
description: "Deliver unreached @mentions
|
|
15553
|
-
schema:
|
|
15669
|
+
name: "mentions.notify",
|
|
15670
|
+
description: "Deliver unreached @mentions by notifying each mentioned target about the message, without adding them to the conversation. Takes resolutionId values from mentions.pending.",
|
|
15671
|
+
schema: mentionResolutionIdsRequestSchema,
|
|
15554
15672
|
routes: ["mentionActionsExecute"],
|
|
15555
15673
|
consumes: nothing,
|
|
15556
15674
|
output: small
|
|
15557
15675
|
},
|
|
15558
15676
|
{
|
|
15559
|
-
name: "mentions.
|
|
15677
|
+
name: "mentions.add",
|
|
15678
|
+
description: "Deliver unreached @mentions by adding each mentioned target to the conversation, so they see the message and what follows. Takes resolutionId values from mentions.pending.",
|
|
15679
|
+
schema: mentionResolutionIdsRequestSchema,
|
|
15680
|
+
routes: ["mentionActionsExecute"],
|
|
15681
|
+
consumes: nothing,
|
|
15682
|
+
output: small
|
|
15683
|
+
},
|
|
15684
|
+
{
|
|
15685
|
+
name: "mentions.delivery",
|
|
15560
15686
|
description: "Whether each @mention in a message you sent reached its target.",
|
|
15561
15687
|
schema: senderMentionDeliveriesRequestSchema,
|
|
15562
15688
|
routes: ["senderMentionDeliveries"],
|
|
15563
15689
|
consumes: nothing,
|
|
15564
15690
|
output: small
|
|
15565
15691
|
},
|
|
15692
|
+
{
|
|
15693
|
+
name: "mentions.execute",
|
|
15694
|
+
description: "Deprecated: use mentions.notify / mentions.add. Removed in the next minor release. Deliver unreached @mentions: notify the mentioned target, or add them to the conversation.",
|
|
15695
|
+
schema: executeMentionActionRequestSchema,
|
|
15696
|
+
routes: ["mentionActionsExecute"],
|
|
15697
|
+
consumes: nothing,
|
|
15698
|
+
output: small,
|
|
15699
|
+
deprecated: true
|
|
15700
|
+
},
|
|
15701
|
+
{
|
|
15702
|
+
name: "mentions.deliveries",
|
|
15703
|
+
description: "Deprecated: use mentions.delivery. Removed in the next minor release. Whether each @mention in a message you sent reached its target.",
|
|
15704
|
+
schema: senderMentionDeliveriesRequestSchema,
|
|
15705
|
+
routes: ["senderMentionDeliveries"],
|
|
15706
|
+
consumes: nothing,
|
|
15707
|
+
output: small,
|
|
15708
|
+
deprecated: true
|
|
15709
|
+
},
|
|
15566
15710
|
{
|
|
15567
15711
|
name: "actions.prepare",
|
|
15568
15712
|
description: "Post an action card (create a channel, add members, create an agent, or an integration step) for a human to confirm; the human who clicks it carries it out as themselves. When it is executed (or fails), the outcome arrives as a reply that @mentions you in the card's thread (or in the thread the card was posted in).",
|
|
@@ -15797,7 +15941,7 @@ const OPERATION_DEFS = [
|
|
|
15797
15941
|
name: "users.info",
|
|
15798
15942
|
description: "A human's or agent's visible facts (kind, status, role, description) and which visible channels they are in. Memberships are checked over one page of visible channels; page with offset and limit.",
|
|
15799
15943
|
schema: userInfoRequestSchema,
|
|
15800
|
-
routes: ["
|
|
15944
|
+
routes: ["userChannels", "serverInfo"],
|
|
15801
15945
|
consumes: nothing,
|
|
15802
15946
|
output: {
|
|
15803
15947
|
mayBeLarge: true,
|
|
@@ -16034,6 +16178,9 @@ function createRaft(options) {
|
|
|
16034
16178
|
},
|
|
16035
16179
|
mentions: {
|
|
16036
16180
|
pending: (request) => pendingMentionActions(api, request, style).then(styled),
|
|
16181
|
+
notify: (request) => notifyMentions(api, request).then(styled),
|
|
16182
|
+
add: (request) => addMentions(api, request).then(styled),
|
|
16183
|
+
delivery: (request) => senderMentionDeliveries(api, request).then(styled),
|
|
16037
16184
|
execute: (request) => executeMentionAction(api, request).then(styled),
|
|
16038
16185
|
deliveries: (request) => senderMentionDeliveries(api, request).then(styled)
|
|
16039
16186
|
},
|
|
@@ -16124,6 +16271,9 @@ function createRaft(options) {
|
|
|
16124
16271
|
"attachments.downloadUrl": (args) => raft.attachments.downloadUrl(args),
|
|
16125
16272
|
"attachments.comments": (args) => raft.attachments.comments(args),
|
|
16126
16273
|
"mentions.pending": (args) => raft.mentions.pending(args),
|
|
16274
|
+
"mentions.notify": (args) => raft.mentions.notify(args),
|
|
16275
|
+
"mentions.add": (args) => raft.mentions.add(args),
|
|
16276
|
+
"mentions.delivery": (args) => raft.mentions.delivery(args),
|
|
16127
16277
|
"mentions.execute": (args) => raft.mentions.execute(args),
|
|
16128
16278
|
"mentions.deliveries": (args) => raft.mentions.deliveries(args),
|
|
16129
16279
|
"actions.prepare": (args) => raft.actions.prepare(args),
|
|
@@ -16194,4 +16344,4 @@ function whoamiOutcome(result) {
|
|
|
16194
16344
|
};
|
|
16195
16345
|
}
|
|
16196
16346
|
//#endregion
|
|
16197
|
-
export { RAFT_INBOX_NOTICE_SCHEMA, RAFT_JSON_SCHEMA_KEYWORDS, RAFT_NOTICE_DELIVERY_ID_HEADER, RAFT_NOTICE_SIGNATURE_HEADER, RAFT_OPERATIONS, RAFT_OPERATIONS_SCHEMA, RAFT_OPERATIONS_VERSION, RAFT_STATE_CONTINUATIONS_PER_TARGET, RAFT_STATE_CONTINUATIONS_TOTAL, RAFT_STATE_SCHEMA, RaftCredentialError, RaftSdkConfigurationError, SeenFrontier, amendTaskRequestSchema, assignTaskRequestSchema, attachmentCommentsRequestSchema, bootstrapRaftCredential, channelInfoRequestSchema, channelMembersRequestSchema, channelTargetRequestSchema, checkInboxRequestSchema, claimTasksRequestSchema, commitInboxRequestSchema, convertMessageToTaskRequestSchema, createFileCredentialStore, createRaft, createRaftClient, createRaftClientFromStore, createRaftRoutes, createTasksRequestSchema, describeRaftRoute, downloadAttachmentUrlRequestSchema, drainInboxRequestSchema, executeMentionActionRequestSchema, getManualTopicRequestSchema, hasAgentMessageIdentity, hashRaftSendContent, inferAttachmentMimeType, isInterrupted, joinRaftChannelByTarget, listInboxRequestSchema, listRaftRoutes, listTasksRequestSchema, listThreadsRequestSchema, parseRaftRegularChannelTarget, parseRaftState, pendingMentionActionsRequestSchema, prepareActionCardRequestSchema, projectRaftMessage, projectRaftMessages, raftToolNameFor, reactRequestSchema, readHistoryRequestSchema, readLatestReadThread, replyToRequestSchema, resolveMessageRequestSchema, searchManualRequestSchema, searchMessagesRequestSchema, sendMessageRequestSchema, senderMentionDeliveriesRequestSchema, serverInfoRequestSchema, showProfileRequestSchema, taskRefSchema, unfollowThreadRequestSchema, updateProfileRequestSchema, updateTaskStatusRequestSchema, userInfoRequestSchema, verifyInboxNotice, whoamiRequestSchema };
|
|
16347
|
+
export { RAFT_INBOX_NOTICE_SCHEMA, RAFT_JSON_SCHEMA_KEYWORDS, RAFT_NOTICE_DELIVERY_ID_HEADER, RAFT_NOTICE_SIGNATURE_HEADER, RAFT_OPERATIONS, RAFT_OPERATIONS_SCHEMA, RAFT_OPERATIONS_VERSION, RAFT_STATE_CONTINUATIONS_PER_TARGET, RAFT_STATE_CONTINUATIONS_TOTAL, RAFT_STATE_SCHEMA, RaftCredentialError, RaftSdkConfigurationError, SeenFrontier, amendTaskRequestSchema, assignTaskRequestSchema, attachmentCommentsRequestSchema, bootstrapRaftCredential, channelInfoRequestSchema, channelMembersRequestSchema, channelTargetRequestSchema, checkInboxRequestSchema, claimTasksRequestSchema, commitInboxRequestSchema, convertMessageToTaskRequestSchema, createFileCredentialStore, createRaft, createRaftClient, createRaftClientFromStore, createRaftRoutes, createTasksRequestSchema, describeRaftRoute, downloadAttachmentUrlRequestSchema, drainInboxRequestSchema, executeMentionActionRequestSchema, getManualTopicRequestSchema, hasAgentMessageIdentity, hashRaftSendContent, inferAttachmentMimeType, isInterrupted, joinRaftChannelByTarget, listInboxRequestSchema, listRaftRoutes, listTasksRequestSchema, listThreadsRequestSchema, mentionResolutionIdsRequestSchema, parseRaftRegularChannelTarget, parseRaftState, pendingMentionActionsRequestSchema, prepareActionCardRequestSchema, projectRaftMessage, projectRaftMessages, raftToolNameFor, reactRequestSchema, readHistoryRequestSchema, readLatestReadThread, replyToRequestSchema, resolveMessageRequestSchema, searchManualRequestSchema, searchMessagesRequestSchema, sendMessageRequestSchema, senderMentionDeliveriesRequestSchema, serverInfoRequestSchema, showProfileRequestSchema, taskRefSchema, unfollowThreadRequestSchema, updateProfileRequestSchema, updateTaskStatusRequestSchema, userInfoRequestSchema, verifyInboxNotice, whoamiRequestSchema };
|