@botiverse/raft-sdk 0.11.1 → 0.12.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 +1 -2
- package/dist/cjs/index.cjs +28 -47
- package/dist/esm/index.js +29 -47
- package/dist/index.d.ts +1 -56
- package/operations.json +1 -83
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -204,8 +204,7 @@ and a repeat there creates the tasks (or posts the card) again.
|
|
|
204
204
|
- `raft.mentions.pending / notify / add / delivery` — @mentions you sent that
|
|
205
205
|
reached nobody, the notify/add recovery (`notify({ resolutionIds })`,
|
|
206
206
|
`add({ resolutionIds })`), and per-target delivery outcomes
|
|
207
|
-
(`delivery({ messageId })`).
|
|
208
|
-
aliases, removed in 0.12.0.
|
|
207
|
+
(`delivery({ messageId })`).
|
|
209
208
|
- `raft.manual.get / search` — the Raft Manual for Agents; both need a short
|
|
210
209
|
`intent` and `reason` (never prompts, credentials, or message payloads).
|
|
211
210
|
- `raft.wake.webhook.register({ url, secret })` / `status()` / `unregister()`.
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -10967,23 +10967,40 @@ function failureOutcome(error) {
|
|
|
10967
10967
|
text: formatOpErrorText(error)
|
|
10968
10968
|
};
|
|
10969
10969
|
}
|
|
10970
|
+
/** A next action written for the CLI: it names a `raft` command or a `--flag`. */
|
|
10971
|
+
const CLI_NEXT_ACTION_PATTERN = /\braft [a-z]|(^|[\s`'"(])--[a-z]/;
|
|
10970
10972
|
/**
|
|
10971
|
-
*
|
|
10972
|
-
*
|
|
10973
|
-
*
|
|
10974
|
-
|
|
10973
|
+
* The attachment routes answer one uniform 404 for missing, unreadable and
|
|
10974
|
+
* other-subsystem ids (no existence oracle); the Server's next action names
|
|
10975
|
+
* the Feedback Admin CLI command, which a tool-mode model cannot run.
|
|
10976
|
+
*/
|
|
10977
|
+
const ATTACHMENT_UNAVAILABLE_TOOL_NEXT_ACTION = "This id is not an attachment you can read. Use an attachment id from a message you can see.";
|
|
10978
|
+
/**
|
|
10979
|
+
* Render a failure's next action in a hint style. In "cli" style nothing
|
|
10980
|
+
* changes. In "tool" style no next action names a CLI command: the SDK's own
|
|
10981
|
+
* NOT_FOUND default (set deep in the shared client-error mapping) is
|
|
10982
|
+
* re-rendered as a tool call, `ATTACHMENT_UNAVAILABLE` gets a neutral step,
|
|
10983
|
+
* and any other Server-sent next action written for the CLI falls back to the
|
|
10984
|
+
* code's default.
|
|
10975
10985
|
*/
|
|
10976
10986
|
function restyleDefaultNextAction(outcome, style) {
|
|
10977
10987
|
if (style === "cli" || !outcome || typeof outcome !== "object") return outcome;
|
|
10978
10988
|
const failure = outcome;
|
|
10979
|
-
if (failure.ok !== false || !failure.error
|
|
10989
|
+
if (failure.ok !== false || !failure.error) return outcome;
|
|
10990
|
+
const current = failure.error.nextAction;
|
|
10991
|
+
let nextAction;
|
|
10992
|
+
if (current === DEFAULT_NEXT_ACTION.NOT_FOUND) nextAction = notFoundNextAction(style);
|
|
10993
|
+
else if (failure.error.serverCode === "ATTACHMENT_UNAVAILABLE") nextAction = ATTACHMENT_UNAVAILABLE_TOOL_NEXT_ACTION;
|
|
10994
|
+
else if (CLI_NEXT_ACTION_PATTERN.test(current)) nextAction = failure.error.code === "NOT_FOUND" ? notFoundNextAction(style) : DEFAULT_NEXT_ACTION[failure.error.code];
|
|
10995
|
+
else return outcome;
|
|
10996
|
+
if (nextAction === current) return outcome;
|
|
10980
10997
|
const error = {
|
|
10981
10998
|
...failure.error,
|
|
10982
|
-
nextAction
|
|
10999
|
+
nextAction
|
|
10983
11000
|
};
|
|
10984
|
-
const next = failure.next && failure.next.why ===
|
|
11001
|
+
const next = failure.next && failure.next.why === current ? {
|
|
10985
11002
|
...failure.next,
|
|
10986
|
-
why:
|
|
11003
|
+
why: nextAction
|
|
10987
11004
|
} : failure.next ?? null;
|
|
10988
11005
|
return {
|
|
10989
11006
|
...failure,
|
|
@@ -14823,11 +14840,6 @@ function formatAgentSenderMentionDeliveries(messageId, deliveries) {
|
|
|
14823
14840
|
//#region ../shared/src/agentOps/mentions.ts
|
|
14824
14841
|
const pendingMentionActionsRequestSchema = requestSchema()(object({ limit: number$1().int().positive().optional().describe("Maximum pending mentions to list.") }));
|
|
14825
14842
|
const mentionResolutionIdsRequestSchema = requestSchema()(object({ resolutionIds: array(string()).describe("resolutionId values from mentions.pending.") }));
|
|
14826
|
-
/** @deprecated The request of the deprecated `mentions.execute`; use `mentionResolutionIdsRequestSchema` (`mentions.notify` / `mentions.add`). */
|
|
14827
|
-
const executeMentionActionRequestSchema = requestSchema()(object({
|
|
14828
|
-
action: _enum(["notify", "add"]).describe("notify: tell the mentioned target about the message; add: add them to the conversation."),
|
|
14829
|
-
resolutionIds: array(string()).describe("resolutionId values from mentions.pending.")
|
|
14830
|
-
}));
|
|
14831
14843
|
const senderMentionDeliveriesRequestSchema = requestSchema()(object({ messageId: string().describe("Id of a message you sent.") }));
|
|
14832
14844
|
async function pendingMentionActions(client, request = {}, options = {}) {
|
|
14833
14845
|
const invalid = validateOpRequest(pendingMentionActionsRequestSchema, request);
|
|
@@ -14870,17 +14882,9 @@ async function addMentions(client, request) {
|
|
|
14870
14882
|
if (invalid) return invalid;
|
|
14871
14883
|
return runMentionAction(client, "add", request.resolutionIds);
|
|
14872
14884
|
}
|
|
14873
|
-
|
|
14874
|
-
async function executeMentionAction(client, request) {
|
|
14875
|
-
const invalid = validateOpRequest(executeMentionActionRequestSchema, request);
|
|
14876
|
-
if (invalid) return invalid;
|
|
14877
|
-
const missing = "Pass an action (notify | add) and at least one resolution id.";
|
|
14878
|
-
if (request.action !== "notify" && request.action !== "add") return failureOutcome(opError("INVALID_REQUEST", { message: missing }));
|
|
14879
|
-
return runMentionAction(client, request.action, request.resolutionIds, missing);
|
|
14880
|
-
}
|
|
14881
|
-
async function runMentionAction(client, action, resolutionIds, missingIdsMessage = "Pass at least one resolution id.") {
|
|
14885
|
+
async function runMentionAction(client, action, resolutionIds) {
|
|
14882
14886
|
const ids = (resolutionIds ?? []).map((id) => id.trim()).filter(Boolean);
|
|
14883
|
-
if (ids.length === 0) return failureOutcome(opError("INVALID_REQUEST", { message:
|
|
14887
|
+
if (ids.length === 0) return failureOutcome(opError("INVALID_REQUEST", { message: "Pass at least one resolution id." }));
|
|
14884
14888
|
const result = await client.mentions.executeAction({
|
|
14885
14889
|
action,
|
|
14886
14890
|
resolutionIds: ids
|
|
@@ -15690,24 +15694,6 @@ const OPERATION_DEFS = [
|
|
|
15690
15694
|
consumes: nothing,
|
|
15691
15695
|
output: small
|
|
15692
15696
|
},
|
|
15693
|
-
{
|
|
15694
|
-
name: "mentions.execute",
|
|
15695
|
-
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.",
|
|
15696
|
-
schema: executeMentionActionRequestSchema,
|
|
15697
|
-
routes: ["mentionActionsExecute"],
|
|
15698
|
-
consumes: nothing,
|
|
15699
|
-
output: small,
|
|
15700
|
-
deprecated: true
|
|
15701
|
-
},
|
|
15702
|
-
{
|
|
15703
|
-
name: "mentions.deliveries",
|
|
15704
|
-
description: "Deprecated: use mentions.delivery. Removed in the next minor release. Whether each @mention in a message you sent reached its target.",
|
|
15705
|
-
schema: senderMentionDeliveriesRequestSchema,
|
|
15706
|
-
routes: ["senderMentionDeliveries"],
|
|
15707
|
-
consumes: nothing,
|
|
15708
|
-
output: small,
|
|
15709
|
-
deprecated: true
|
|
15710
|
-
},
|
|
15711
15697
|
{
|
|
15712
15698
|
name: "actions.prepare",
|
|
15713
15699
|
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).",
|
|
@@ -16181,9 +16167,7 @@ function createRaft(options) {
|
|
|
16181
16167
|
pending: (request) => pendingMentionActions(api, request, style).then(styled),
|
|
16182
16168
|
notify: (request) => notifyMentions(api, request).then(styled),
|
|
16183
16169
|
add: (request) => addMentions(api, request).then(styled),
|
|
16184
|
-
delivery: (request) => senderMentionDeliveries(api, request).then(styled)
|
|
16185
|
-
execute: (request) => executeMentionAction(api, request).then(styled),
|
|
16186
|
-
deliveries: (request) => senderMentionDeliveries(api, request).then(styled)
|
|
16170
|
+
delivery: (request) => senderMentionDeliveries(api, request).then(styled)
|
|
16187
16171
|
},
|
|
16188
16172
|
actions: { prepare: (request) => prepareActionCard(api, request, style).then(styled) },
|
|
16189
16173
|
manual: {
|
|
@@ -16275,8 +16259,6 @@ function createRaft(options) {
|
|
|
16275
16259
|
"mentions.notify": (args) => raft.mentions.notify(args),
|
|
16276
16260
|
"mentions.add": (args) => raft.mentions.add(args),
|
|
16277
16261
|
"mentions.delivery": (args) => raft.mentions.delivery(args),
|
|
16278
|
-
"mentions.execute": (args) => raft.mentions.execute(args),
|
|
16279
|
-
"mentions.deliveries": (args) => raft.mentions.deliveries(args),
|
|
16280
16262
|
"actions.prepare": (args) => raft.actions.prepare(args),
|
|
16281
16263
|
"manual.get": (args) => raft.manual.get(args),
|
|
16282
16264
|
"manual.search": (args) => raft.manual.search(args),
|
|
@@ -16378,7 +16360,6 @@ exports.createTasksRequestSchema = createTasksRequestSchema;
|
|
|
16378
16360
|
exports.describeRaftRoute = describeRaftRoute;
|
|
16379
16361
|
exports.downloadAttachmentUrlRequestSchema = downloadAttachmentUrlRequestSchema;
|
|
16380
16362
|
exports.drainInboxRequestSchema = drainInboxRequestSchema;
|
|
16381
|
-
exports.executeMentionActionRequestSchema = executeMentionActionRequestSchema;
|
|
16382
16363
|
exports.getManualTopicRequestSchema = getManualTopicRequestSchema;
|
|
16383
16364
|
exports.hasAgentMessageIdentity = hasAgentMessageIdentity;
|
|
16384
16365
|
exports.hashRaftSendContent = hashRaftSendContent;
|
package/dist/esm/index.js
CHANGED
|
@@ -10966,23 +10966,40 @@ function failureOutcome(error) {
|
|
|
10966
10966
|
text: formatOpErrorText(error)
|
|
10967
10967
|
};
|
|
10968
10968
|
}
|
|
10969
|
+
/** A next action written for the CLI: it names a `raft` command or a `--flag`. */
|
|
10970
|
+
const CLI_NEXT_ACTION_PATTERN = /\braft [a-z]|(^|[\s`'"(])--[a-z]/;
|
|
10969
10971
|
/**
|
|
10970
|
-
*
|
|
10971
|
-
*
|
|
10972
|
-
*
|
|
10973
|
-
|
|
10972
|
+
* The attachment routes answer one uniform 404 for missing, unreadable and
|
|
10973
|
+
* other-subsystem ids (no existence oracle); the Server's next action names
|
|
10974
|
+
* the Feedback Admin CLI command, which a tool-mode model cannot run.
|
|
10975
|
+
*/
|
|
10976
|
+
const ATTACHMENT_UNAVAILABLE_TOOL_NEXT_ACTION = "This id is not an attachment you can read. Use an attachment id from a message you can see.";
|
|
10977
|
+
/**
|
|
10978
|
+
* Render a failure's next action in a hint style. In "cli" style nothing
|
|
10979
|
+
* changes. In "tool" style no next action names a CLI command: the SDK's own
|
|
10980
|
+
* NOT_FOUND default (set deep in the shared client-error mapping) is
|
|
10981
|
+
* re-rendered as a tool call, `ATTACHMENT_UNAVAILABLE` gets a neutral step,
|
|
10982
|
+
* and any other Server-sent next action written for the CLI falls back to the
|
|
10983
|
+
* code's default.
|
|
10974
10984
|
*/
|
|
10975
10985
|
function restyleDefaultNextAction(outcome, style) {
|
|
10976
10986
|
if (style === "cli" || !outcome || typeof outcome !== "object") return outcome;
|
|
10977
10987
|
const failure = outcome;
|
|
10978
|
-
if (failure.ok !== false || !failure.error
|
|
10988
|
+
if (failure.ok !== false || !failure.error) return outcome;
|
|
10989
|
+
const current = failure.error.nextAction;
|
|
10990
|
+
let nextAction;
|
|
10991
|
+
if (current === DEFAULT_NEXT_ACTION.NOT_FOUND) nextAction = notFoundNextAction(style);
|
|
10992
|
+
else if (failure.error.serverCode === "ATTACHMENT_UNAVAILABLE") nextAction = ATTACHMENT_UNAVAILABLE_TOOL_NEXT_ACTION;
|
|
10993
|
+
else if (CLI_NEXT_ACTION_PATTERN.test(current)) nextAction = failure.error.code === "NOT_FOUND" ? notFoundNextAction(style) : DEFAULT_NEXT_ACTION[failure.error.code];
|
|
10994
|
+
else return outcome;
|
|
10995
|
+
if (nextAction === current) return outcome;
|
|
10979
10996
|
const error = {
|
|
10980
10997
|
...failure.error,
|
|
10981
|
-
nextAction
|
|
10998
|
+
nextAction
|
|
10982
10999
|
};
|
|
10983
|
-
const next = failure.next && failure.next.why ===
|
|
11000
|
+
const next = failure.next && failure.next.why === current ? {
|
|
10984
11001
|
...failure.next,
|
|
10985
|
-
why:
|
|
11002
|
+
why: nextAction
|
|
10986
11003
|
} : failure.next ?? null;
|
|
10987
11004
|
return {
|
|
10988
11005
|
...failure,
|
|
@@ -14822,11 +14839,6 @@ function formatAgentSenderMentionDeliveries(messageId, deliveries) {
|
|
|
14822
14839
|
//#region ../shared/src/agentOps/mentions.ts
|
|
14823
14840
|
const pendingMentionActionsRequestSchema = requestSchema()(object({ limit: number$1().int().positive().optional().describe("Maximum pending mentions to list.") }));
|
|
14824
14841
|
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`). */
|
|
14826
|
-
const executeMentionActionRequestSchema = requestSchema()(object({
|
|
14827
|
-
action: _enum(["notify", "add"]).describe("notify: tell the mentioned target about the message; add: add them to the conversation."),
|
|
14828
|
-
resolutionIds: array(string()).describe("resolutionId values from mentions.pending.")
|
|
14829
|
-
}));
|
|
14830
14842
|
const senderMentionDeliveriesRequestSchema = requestSchema()(object({ messageId: string().describe("Id of a message you sent.") }));
|
|
14831
14843
|
async function pendingMentionActions(client, request = {}, options = {}) {
|
|
14832
14844
|
const invalid = validateOpRequest(pendingMentionActionsRequestSchema, request);
|
|
@@ -14869,17 +14881,9 @@ async function addMentions(client, request) {
|
|
|
14869
14881
|
if (invalid) return invalid;
|
|
14870
14882
|
return runMentionAction(client, "add", request.resolutionIds);
|
|
14871
14883
|
}
|
|
14872
|
-
|
|
14873
|
-
async function executeMentionAction(client, request) {
|
|
14874
|
-
const invalid = validateOpRequest(executeMentionActionRequestSchema, request);
|
|
14875
|
-
if (invalid) return invalid;
|
|
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.") {
|
|
14884
|
+
async function runMentionAction(client, action, resolutionIds) {
|
|
14881
14885
|
const ids = (resolutionIds ?? []).map((id) => id.trim()).filter(Boolean);
|
|
14882
|
-
if (ids.length === 0) return failureOutcome(opError("INVALID_REQUEST", { message:
|
|
14886
|
+
if (ids.length === 0) return failureOutcome(opError("INVALID_REQUEST", { message: "Pass at least one resolution id." }));
|
|
14883
14887
|
const result = await client.mentions.executeAction({
|
|
14884
14888
|
action,
|
|
14885
14889
|
resolutionIds: ids
|
|
@@ -15689,24 +15693,6 @@ const OPERATION_DEFS = [
|
|
|
15689
15693
|
consumes: nothing,
|
|
15690
15694
|
output: small
|
|
15691
15695
|
},
|
|
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
|
-
},
|
|
15710
15696
|
{
|
|
15711
15697
|
name: "actions.prepare",
|
|
15712
15698
|
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).",
|
|
@@ -16180,9 +16166,7 @@ function createRaft(options) {
|
|
|
16180
16166
|
pending: (request) => pendingMentionActions(api, request, style).then(styled),
|
|
16181
16167
|
notify: (request) => notifyMentions(api, request).then(styled),
|
|
16182
16168
|
add: (request) => addMentions(api, request).then(styled),
|
|
16183
|
-
delivery: (request) => senderMentionDeliveries(api, request).then(styled)
|
|
16184
|
-
execute: (request) => executeMentionAction(api, request).then(styled),
|
|
16185
|
-
deliveries: (request) => senderMentionDeliveries(api, request).then(styled)
|
|
16169
|
+
delivery: (request) => senderMentionDeliveries(api, request).then(styled)
|
|
16186
16170
|
},
|
|
16187
16171
|
actions: { prepare: (request) => prepareActionCard(api, request, style).then(styled) },
|
|
16188
16172
|
manual: {
|
|
@@ -16274,8 +16258,6 @@ function createRaft(options) {
|
|
|
16274
16258
|
"mentions.notify": (args) => raft.mentions.notify(args),
|
|
16275
16259
|
"mentions.add": (args) => raft.mentions.add(args),
|
|
16276
16260
|
"mentions.delivery": (args) => raft.mentions.delivery(args),
|
|
16277
|
-
"mentions.execute": (args) => raft.mentions.execute(args),
|
|
16278
|
-
"mentions.deliveries": (args) => raft.mentions.deliveries(args),
|
|
16279
16261
|
"actions.prepare": (args) => raft.actions.prepare(args),
|
|
16280
16262
|
"manual.get": (args) => raft.manual.get(args),
|
|
16281
16263
|
"manual.search": (args) => raft.manual.search(args),
|
|
@@ -16344,4 +16326,4 @@ function whoamiOutcome(result) {
|
|
|
16344
16326
|
};
|
|
16345
16327
|
}
|
|
16346
16328
|
//#endregion
|
|
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,
|
|
16329
|
+
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, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1298,14 +1298,6 @@ export declare const pendingMentionActionsRequestSchema: z.ZodObject<{
|
|
|
1298
1298
|
export declare const mentionResolutionIdsRequestSchema: z.ZodObject<{
|
|
1299
1299
|
resolutionIds: z.ZodArray<z.ZodString>;
|
|
1300
1300
|
}, z.core.$strip>;
|
|
1301
|
-
/** @deprecated The request of the deprecated `mentions.execute`; use `mentionResolutionIdsRequestSchema` (`mentions.notify` / `mentions.add`). */
|
|
1302
|
-
export declare const executeMentionActionRequestSchema: z.ZodObject<{
|
|
1303
|
-
action: z.ZodEnum<{
|
|
1304
|
-
notify: "notify";
|
|
1305
|
-
add: "add";
|
|
1306
|
-
}>;
|
|
1307
|
-
resolutionIds: z.ZodArray<z.ZodString>;
|
|
1308
|
-
}, z.core.$strip>;
|
|
1309
1301
|
export declare const senderMentionDeliveriesRequestSchema: z.ZodObject<{
|
|
1310
1302
|
messageId: z.ZodString;
|
|
1311
1303
|
}, z.core.$strip>;
|
|
@@ -1322,11 +1314,6 @@ type RaftMentionActionOutcome = RaftOutcome<{
|
|
|
1322
1314
|
action: AgentMentionActionKind;
|
|
1323
1315
|
results: AgentMentionActionResult[];
|
|
1324
1316
|
}, "executed">;
|
|
1325
|
-
/** @deprecated The request of the deprecated `mentions.execute`; use `MentionResolutionIdsRequest`. */
|
|
1326
|
-
interface ExecuteMentionActionRequest {
|
|
1327
|
-
action: AgentMentionActionKind;
|
|
1328
|
-
resolutionIds: string[];
|
|
1329
|
-
}
|
|
1330
1317
|
//#endregion
|
|
1331
1318
|
//#region ../shared/src/agentOps/manual.d.ts
|
|
1332
1319
|
interface ManualContext {
|
|
@@ -10110,42 +10097,6 @@ declare const OPERATION_DEFS: readonly [{
|
|
|
10110
10097
|
mayBeLarge: false;
|
|
10111
10098
|
boundBy: never[];
|
|
10112
10099
|
};
|
|
10113
|
-
}, {
|
|
10114
|
-
readonly name: "mentions.execute";
|
|
10115
|
-
readonly 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.";
|
|
10116
|
-
readonly schema: z.ZodObject<{
|
|
10117
|
-
action: z.ZodEnum<{
|
|
10118
|
-
notify: "notify";
|
|
10119
|
-
add: "add";
|
|
10120
|
-
}>;
|
|
10121
|
-
resolutionIds: z.ZodArray<z.ZodString>;
|
|
10122
|
-
}, z.core.$strip>;
|
|
10123
|
-
readonly routes: readonly ["mentionActionsExecute"];
|
|
10124
|
-
readonly consumes: {
|
|
10125
|
-
model: never[];
|
|
10126
|
-
code: never[];
|
|
10127
|
-
};
|
|
10128
|
-
readonly output: {
|
|
10129
|
-
mayBeLarge: false;
|
|
10130
|
-
boundBy: never[];
|
|
10131
|
-
};
|
|
10132
|
-
readonly deprecated: true;
|
|
10133
|
-
}, {
|
|
10134
|
-
readonly name: "mentions.deliveries";
|
|
10135
|
-
readonly description: "Deprecated: use mentions.delivery. Removed in the next minor release. Whether each @mention in a message you sent reached its target.";
|
|
10136
|
-
readonly schema: z.ZodObject<{
|
|
10137
|
-
messageId: z.ZodString;
|
|
10138
|
-
}, z.core.$strip>;
|
|
10139
|
-
readonly routes: readonly ["senderMentionDeliveries"];
|
|
10140
|
-
readonly consumes: {
|
|
10141
|
-
model: never[];
|
|
10142
|
-
code: never[];
|
|
10143
|
-
};
|
|
10144
|
-
readonly output: {
|
|
10145
|
-
mayBeLarge: false;
|
|
10146
|
-
boundBy: never[];
|
|
10147
|
-
};
|
|
10148
|
-
readonly deprecated: true;
|
|
10149
10100
|
}, {
|
|
10150
10101
|
readonly name: "actions.prepare";
|
|
10151
10102
|
readonly 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).";
|
|
@@ -10890,12 +10841,6 @@ interface Raft {
|
|
|
10890
10841
|
delivery(request: {
|
|
10891
10842
|
messageId: string;
|
|
10892
10843
|
}): Promise<RaftOutcome<AgentApiSenderMentionDeliveriesResponse, "deliveries" | "empty">>;
|
|
10893
|
-
/** @deprecated Use `mentions.notify` / `mentions.add`; removed in 0.12.0. */
|
|
10894
|
-
execute(request: ExecuteMentionActionRequest): Promise<RaftMentionActionOutcome>;
|
|
10895
|
-
/** @deprecated Use `mentions.delivery`; removed in 0.12.0. */
|
|
10896
|
-
deliveries(request: {
|
|
10897
|
-
messageId: string;
|
|
10898
|
-
}): Promise<RaftOutcome<AgentApiSenderMentionDeliveriesResponse, "deliveries" | "empty">>;
|
|
10899
10844
|
};
|
|
10900
10845
|
actions: {
|
|
10901
10846
|
/**
|
|
@@ -11030,4 +10975,4 @@ export declare const commitInboxRequestSchema: z.ZodObject<{
|
|
|
11030
10975
|
cursor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
11031
10976
|
}, z.core.$strip>;
|
|
11032
10977
|
//#endregion
|
|
11033
|
-
export type { AmendTaskOutcome, AmendTaskRequest, AssignTaskRequest, BootstrapRaftCredentialOptions, CheckInboxOutcome, CheckInboxRequest, ClaimTasksOutcome, ClaimTasksRequest, ConvertMessageToTaskRequest, CreateRaftClientFromStoreOptions, CreateRaftClientOptions, CreateRaftOptions, CreateRaftRoutesOptions, CreateTasksRequest, DrainInboxRequest,
|
|
10978
|
+
export type { AmendTaskOutcome, AmendTaskRequest, AssignTaskRequest, BootstrapRaftCredentialOptions, CheckInboxOutcome, CheckInboxRequest, ClaimTasksOutcome, ClaimTasksRequest, ConvertMessageToTaskRequest, CreateRaftClientFromStoreOptions, CreateRaftClientOptions, CreateRaftOptions, CreateRaftRoutesOptions, CreateTasksRequest, DrainInboxRequest, ListInboxRequest, ListTasksRequest, ManualContext, MentionResolutionIdsRequest, PrepareActionCardRequest, Raft, RaftAckMode, RaftActionPrepareRequest, RaftActionPrepared, RaftApiError, RaftApiResult, RaftAppConfig, RaftAppConfigPatch, RaftAttachmentBytes, RaftAttachmentDownloadUrl, RaftAttachmentUploaded, RaftAvatarUpload, RaftChannelInfo, RaftChannelJoinClient, RaftChannelJoinClientResult, RaftChannelJoinError, RaftChannelJoinFailure, RaftChannelJoinOperation, RaftChannelJoinRequest, RaftChannelJoinResult, RaftChannelJoinSuccess, RaftChannelJoinTransportError, RaftChannelMuteState, RaftChannelRef, RaftClaimResult, RaftClaimRow, RaftClaimRowState, RaftClient, RaftClientError, RaftClientFailure, RaftClientResult, RaftClientSuccess, RaftClientThrottleOptions, RaftClientTransportRequest, RaftConsumption, RaftContextAgent, RaftContextData, RaftContextError, RaftContextResult, RaftContextServer, RaftCredentialErrorCode, RaftCredentialIdentity, RaftCredentialStore, RaftEvent, RaftEventAttachment, RaftEventExternalMessage, RaftEventsReceiveData, RaftEventsReceiveError, RaftEventsReceiveRequest, RaftEventsReceiveResult, RaftFailure, RaftHintStyle, RaftHistoryPage, RaftInboxBatch, RaftInboxCommitResult, RaftInboxConversation, RaftInboxDrainSummary, RaftInboxDrained, RaftInboxListing, RaftInboxNotice, RaftInterrupt, RaftInterruptCancel, RaftInterruptReason, RaftInterruptResume, RaftInterrupted, RaftInvokeCaller, RaftInvokeResult, RaftJsonSchema, RaftJsonSchemaType, RaftLatestReadThread, RaftManageClient, RaftMentionActionOutcome, RaftMessage, RaftMessageAttachment, RaftMessageTask, RaftNextOperation, RaftNextStep, RaftNoticeFlag, RaftNoticeTarget, RaftOpError, RaftOpErrorCode, RaftOperationIdempotency, RaftOperationName, RaftOperationSpec, RaftOperationsDocument, RaftOutcome, RaftPendingMentions, RaftPreparedCard, RaftProfile, RaftProfileUpdate, RaftRouteAnnotations, RaftRouteInfo, RaftRouteKey, RaftRouteMeta, RaftRouteResult, RaftRouteRetryPolicy, RaftRoutes, RaftSdkConfigurationErrorCode, RaftSearchPage, RaftSenderType, RaftSent, RaftServerInfo, RaftServerProfile, RaftServerUpdate, RaftState, RaftStateContinuation, RaftStateSaveErrorHandler, RaftStateStore, RaftTaskBoard, RaftTaskStatus, RaftTasksCreated, RaftUserInfo, RaftUserRef, RaftWebhookStatus, ReactRequest, ReadHistoryRequest, ReadLatestReadThreadOptions, ReplyToRequest, SearchMessagesRequest, SeenAttestation, SeenFrontierSnapshot, SendMessageOutcome, SendMessageRequest, ServerInfoRequest, ServerInfoSection, StoredRaftCredential, TaskRef, UpdateTaskStatusOutcome, UpdateTaskStatusRequest, UploadAttachmentRequest, UserInfoRequest, VerifyNoticeInput, VerifyNoticeRejection, VerifyNoticeResult };
|
package/operations.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "raft-sdk-operations.v1",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24580df5e6c5b3bc",
|
|
4
4
|
"operations": [
|
|
5
5
|
{
|
|
6
6
|
"name": "identity.whoami",
|
|
@@ -837,88 +837,6 @@
|
|
|
837
837
|
"boundBy": []
|
|
838
838
|
}
|
|
839
839
|
},
|
|
840
|
-
{
|
|
841
|
-
"name": "mentions.execute",
|
|
842
|
-
"toolName": "mentions_execute",
|
|
843
|
-
"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.",
|
|
844
|
-
"inputSchema": {
|
|
845
|
-
"type": "object",
|
|
846
|
-
"properties": {
|
|
847
|
-
"action": {
|
|
848
|
-
"type": "string",
|
|
849
|
-
"description": "notify: tell the mentioned target about the message; add: add them to the conversation.",
|
|
850
|
-
"enum": [
|
|
851
|
-
"notify",
|
|
852
|
-
"add"
|
|
853
|
-
]
|
|
854
|
-
},
|
|
855
|
-
"resolutionIds": {
|
|
856
|
-
"type": "array",
|
|
857
|
-
"description": "resolutionId values from mentions.pending.",
|
|
858
|
-
"items": {
|
|
859
|
-
"type": "string"
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
},
|
|
863
|
-
"required": [
|
|
864
|
-
"action",
|
|
865
|
-
"resolutionIds"
|
|
866
|
-
]
|
|
867
|
-
},
|
|
868
|
-
"sideEffect": "write",
|
|
869
|
-
"idempotency": {
|
|
870
|
-
"kind": "none"
|
|
871
|
-
},
|
|
872
|
-
"capability": [
|
|
873
|
-
"mentions"
|
|
874
|
-
],
|
|
875
|
-
"modelOnly": false,
|
|
876
|
-
"mayInterrupt": false,
|
|
877
|
-
"consumes": {
|
|
878
|
-
"model": [],
|
|
879
|
-
"code": []
|
|
880
|
-
},
|
|
881
|
-
"output": {
|
|
882
|
-
"mayBeLarge": false,
|
|
883
|
-
"boundBy": []
|
|
884
|
-
},
|
|
885
|
-
"deprecated": true
|
|
886
|
-
},
|
|
887
|
-
{
|
|
888
|
-
"name": "mentions.deliveries",
|
|
889
|
-
"toolName": "mentions_deliveries",
|
|
890
|
-
"description": "Deprecated: use mentions.delivery. Removed in the next minor release. Whether each @mention in a message you sent reached its target.",
|
|
891
|
-
"inputSchema": {
|
|
892
|
-
"type": "object",
|
|
893
|
-
"properties": {
|
|
894
|
-
"messageId": {
|
|
895
|
-
"type": "string",
|
|
896
|
-
"description": "Id of a message you sent."
|
|
897
|
-
}
|
|
898
|
-
},
|
|
899
|
-
"required": [
|
|
900
|
-
"messageId"
|
|
901
|
-
]
|
|
902
|
-
},
|
|
903
|
-
"sideEffect": "read",
|
|
904
|
-
"idempotency": {
|
|
905
|
-
"kind": "natural"
|
|
906
|
-
},
|
|
907
|
-
"capability": [
|
|
908
|
-
"mentions"
|
|
909
|
-
],
|
|
910
|
-
"modelOnly": false,
|
|
911
|
-
"mayInterrupt": false,
|
|
912
|
-
"consumes": {
|
|
913
|
-
"model": [],
|
|
914
|
-
"code": []
|
|
915
|
-
},
|
|
916
|
-
"output": {
|
|
917
|
-
"mayBeLarge": false,
|
|
918
|
-
"boundBy": []
|
|
919
|
-
},
|
|
920
|
-
"deprecated": true
|
|
921
|
-
},
|
|
922
840
|
{
|
|
923
841
|
"name": "actions.prepare",
|
|
924
842
|
"toolName": "actions_prepare",
|