@agentjam/sdk 0.9.0 → 0.10.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/README.md +2 -1
- package/dist/agent.d.ts +49 -15
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +185 -68
- package/dist/agent.js.map +1 -1
- package/dist/artifacts.d.ts +8 -9
- package/dist/artifacts.d.ts.map +1 -1
- package/dist/artifacts.js +40 -76
- package/dist/artifacts.js.map +1 -1
- package/dist/attachments.d.ts +30 -5
- package/dist/attachments.d.ts.map +1 -1
- package/dist/attachments.js +53 -8
- package/dist/attachments.js.map +1 -1
- package/dist/content.d.ts +3 -9
- package/dist/content.d.ts.map +1 -1
- package/dist/content.js +0 -9
- package/dist/content.js.map +1 -1
- package/dist/definitions.d.ts +20 -0
- package/dist/definitions.d.ts.map +1 -0
- package/dist/definitions.js +28 -0
- package/dist/definitions.js.map +1 -0
- package/dist/errors.d.ts +24 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +28 -0
- package/dist/errors.js.map +1 -1
- package/dist/files.d.ts +16 -4
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +26 -11
- package/dist/files.js.map +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/inputs.d.ts +14 -0
- package/dist/inputs.d.ts.map +1 -1
- package/dist/inputs.js +59 -12
- package/dist/inputs.js.map +1 -1
- package/dist/managedWebhooks.d.ts.map +1 -1
- package/dist/managedWebhooks.js +2 -0
- package/dist/managedWebhooks.js.map +1 -1
- package/dist/platforms/datadog.d.ts +2 -2
- package/dist/platforms/datadog.d.ts.map +1 -1
- package/dist/platforms/discord.d.ts +59 -54
- package/dist/platforms/discord.d.ts.map +1 -1
- package/dist/platforms/discord.js +4 -0
- package/dist/platforms/discord.js.map +1 -1
- package/dist/platforms/discordEvents.d.ts.map +1 -1
- package/dist/platforms/discordEvents.js +2 -0
- package/dist/platforms/discordEvents.js.map +1 -1
- package/dist/platforms/discordInteractions.d.ts.map +1 -1
- package/dist/platforms/discordInteractions.js +2 -0
- package/dist/platforms/discordInteractions.js.map +1 -1
- package/dist/platforms/github.d.ts +37 -34
- package/dist/platforms/github.d.ts.map +1 -1
- package/dist/platforms/github.js +4 -0
- package/dist/platforms/github.js.map +1 -1
- package/dist/platforms/githubEvents.d.ts.map +1 -1
- package/dist/platforms/githubEvents.js +2 -0
- package/dist/platforms/githubEvents.js.map +1 -1
- package/dist/platforms/grafana.d.ts +2 -2
- package/dist/platforms/grafana.d.ts.map +1 -1
- package/dist/platforms/microsoft.d.ts +6 -3
- package/dist/platforms/microsoft.d.ts.map +1 -1
- package/dist/platforms/microsoft.js +4 -0
- package/dist/platforms/microsoft.js.map +1 -1
- package/dist/platforms/pagerduty.d.ts +2 -2
- package/dist/platforms/pagerduty.d.ts.map +1 -1
- package/dist/platforms/sentry.d.ts +8 -7
- package/dist/platforms/sentry.d.ts.map +1 -1
- package/dist/platforms/sentry.js +2 -0
- package/dist/platforms/sentry.js.map +1 -1
- package/dist/platforms/sentryEvents.d.ts.map +1 -1
- package/dist/platforms/sentryEvents.js +2 -0
- package/dist/platforms/sentryEvents.js.map +1 -1
- package/dist/platforms/slack.d.ts +54 -54
- package/dist/platforms/slack.d.ts.map +1 -1
- package/dist/platforms/slackEvents.d.ts.map +1 -1
- package/dist/platforms/slackEvents.js +2 -0
- package/dist/platforms/slackEvents.js.map +1 -1
- package/dist/platforms/slackInteractions.d.ts.map +1 -1
- package/dist/platforms/slackInteractions.js +2 -0
- package/dist/platforms/slackInteractions.js.map +1 -1
- package/dist/principals.d.ts +9 -0
- package/dist/principals.d.ts.map +1 -0
- package/dist/principals.js +9 -0
- package/dist/principals.js.map +1 -0
- package/dist/profile.d.ts +5 -5
- package/dist/profile.d.ts.map +1 -1
- package/dist/profile.js +9 -5
- package/dist/profile.js.map +1 -1
- package/dist/protocol.d.ts +14 -5
- package/dist/protocol.d.ts.map +1 -1
- package/dist/recaps.d.ts +12 -2
- package/dist/recaps.d.ts.map +1 -1
- package/dist/recaps.js +12 -1
- package/dist/recaps.js.map +1 -1
- package/dist/relay/chains.d.ts +6 -1
- package/dist/relay/chains.d.ts.map +1 -1
- package/dist/relay/chains.js +16 -1
- package/dist/relay/chains.js.map +1 -1
- package/dist/relay/frames.d.ts +3 -2
- package/dist/relay/frames.d.ts.map +1 -1
- package/dist/relay/frames.js +8 -2
- package/dist/relay/frames.js.map +1 -1
- package/dist/relay/history.d.ts +45 -0
- package/dist/relay/history.d.ts.map +1 -0
- package/dist/relay/history.js +235 -0
- package/dist/relay/history.js.map +1 -0
- package/dist/relay/memory.d.ts +34 -10
- package/dist/relay/memory.d.ts.map +1 -1
- package/dist/relay/memory.js +180 -36
- package/dist/relay/memory.js.map +1 -1
- package/dist/relay/relay.d.ts +2 -0
- package/dist/relay/relay.d.ts.map +1 -1
- package/dist/relay/remote.d.ts +1 -1
- package/dist/relay/remote.d.ts.map +1 -1
- package/dist/relay/remote.js +4 -2
- package/dist/relay/remote.js.map +1 -1
- package/dist/relay/resumes.d.ts +40 -0
- package/dist/relay/resumes.d.ts.map +1 -0
- package/dist/relay/resumes.js +75 -0
- package/dist/relay/resumes.js.map +1 -0
- package/dist/relay/schedules.d.ts.map +1 -1
- package/dist/relay/schedules.js +3 -2
- package/dist/relay/schedules.js.map +1 -1
- package/dist/relay/sessions.d.ts +14 -4
- package/dist/relay/sessions.d.ts.map +1 -1
- package/dist/relay/sessions.js +30 -8
- package/dist/relay/sessions.js.map +1 -1
- package/dist/skillChecks.d.ts +58 -0
- package/dist/skillChecks.d.ts.map +1 -0
- package/dist/skillChecks.js +173 -0
- package/dist/skillChecks.js.map +1 -0
- package/dist/tasks/incoming.d.ts +78 -34
- package/dist/tasks/incoming.d.ts.map +1 -1
- package/dist/tasks/incoming.js +75 -32
- package/dist/tasks/incoming.js.map +1 -1
- package/dist/tasks/triggers.d.ts +2 -2
- package/dist/tasks/triggers.d.ts.map +1 -1
- package/dist/tasks/triggers.js +11 -1
- package/dist/tasks/triggers.js.map +1 -1
- package/dist/tools/network.js +1 -1
- package/dist/tools/network.js.map +1 -1
- package/dist/tools/shared.d.ts +3 -3
- package/dist/types.d.ts +215 -60
- package/dist/types.d.ts.map +1 -1
- package/dist/verdicts.d.ts +4 -2
- package/dist/verdicts.d.ts.map +1 -1
- package/dist/verdicts.js +4 -2
- package/dist/verdicts.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { AgentJamError } from "./errors.js";
|
|
2
|
+
import { assertSubscriptions } from "./subscriptions.js";
|
|
3
|
+
const requirementKey = /^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/;
|
|
4
|
+
const maxRequirements = 10;
|
|
5
|
+
const maxMatches = 20;
|
|
6
|
+
const maxDescription = 500;
|
|
7
|
+
const previousChoice = "a matching file the followed-up task delivered";
|
|
8
|
+
const runModes = {
|
|
9
|
+
oneOff: {
|
|
10
|
+
shape: "a one-off task",
|
|
11
|
+
refusal: "it can't run as a one-off task",
|
|
12
|
+
},
|
|
13
|
+
cron: {
|
|
14
|
+
shape: "a cron schedule",
|
|
15
|
+
refusal: "it can't be scheduled on a cron",
|
|
16
|
+
},
|
|
17
|
+
trigger: {
|
|
18
|
+
shape: "a triggered schedule",
|
|
19
|
+
refusal: "it can't be scheduled on a trigger",
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
const joinChoices = (choices) => choices.length < 2
|
|
23
|
+
? choices.join("")
|
|
24
|
+
: `${choices.slice(0, -1).join(", ")} or ${choices.at(-1)}`;
|
|
25
|
+
/** Returns how proposed work runs: on a trigger, on a cron, or once. */
|
|
26
|
+
export const getRunMode = ({ cron, trigger }) => {
|
|
27
|
+
if (trigger)
|
|
28
|
+
return "trigger";
|
|
29
|
+
return cron ? "cron" : "oneOff";
|
|
30
|
+
};
|
|
31
|
+
const findRunModeProblem = ({ name, runsAs }, work) => {
|
|
32
|
+
const mode = getRunMode(work);
|
|
33
|
+
if (!runsAs || runsAs.includes(mode))
|
|
34
|
+
return undefined;
|
|
35
|
+
const shapes = runsAs.map((allowed) => runModes[allowed].shape);
|
|
36
|
+
return `The "${name}" skill runs only as ${joinChoices(shapes)}, so ${runModes[mode].refusal}`;
|
|
37
|
+
};
|
|
38
|
+
const describeSkill = ({ name, description }) => {
|
|
39
|
+
const sentence = /^.*?[.!?](?=\s|$)/s.exec(description.trim())?.[0];
|
|
40
|
+
const summary = sentence ?? description.trim();
|
|
41
|
+
return summary === "" ? `"${name}"` : `"${name}" (${summary})`;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Describes why a proposal must name one of an agent's skills, listing each with its description's first sentence.
|
|
45
|
+
*
|
|
46
|
+
* @param agent The agent the proposal is for.
|
|
47
|
+
* @param skills The skills the proposer can see.
|
|
48
|
+
* @returns The refusal the requester reads.
|
|
49
|
+
*/
|
|
50
|
+
export const describeMissingSkill = (agent, skills) => `"${agent}" charges for its skills, so propose again with skill set to one of: ${skills.map(describeSkill).join(", ")}`;
|
|
51
|
+
/** Returns the skills of the agent with `card` that `viewer` can see and propose, leaving out the private ones of other agents. */
|
|
52
|
+
export const listVisibleSkills = (card, viewer) => card.skills.filter(({ visibility }) => visibility !== "private" || viewer === card.name);
|
|
53
|
+
const stripParameters = (mimeType) => mimeType.split(";")[0].trim().toLowerCase();
|
|
54
|
+
const isMimeTypeMatching = (mimeType, pattern) => {
|
|
55
|
+
const type = stripParameters(mimeType);
|
|
56
|
+
const wanted = stripParameters(pattern);
|
|
57
|
+
return wanted.endsWith("/*")
|
|
58
|
+
? type.startsWith(wanted.slice(0, -1))
|
|
59
|
+
: type === wanted;
|
|
60
|
+
};
|
|
61
|
+
const isMatching = ({ name, mimeType }, match) => "extension" in match
|
|
62
|
+
? (name ?? "").toLowerCase().endsWith(match.extension.toLowerCase())
|
|
63
|
+
: mimeType !== undefined && isMimeTypeMatching(mimeType, match.mimeType);
|
|
64
|
+
/**
|
|
65
|
+
* Matches each of a skill's attachment requirements to the first attached file that meets it, or else, when the
|
|
66
|
+
* requirement allows it, to the first file artifact of the followed-up task that does.
|
|
67
|
+
*
|
|
68
|
+
* @returns The file that met each requirement by key, and the requirements no file met.
|
|
69
|
+
*/
|
|
70
|
+
export const matchRequirements = (requirements, { attached, previous }) => {
|
|
71
|
+
const included = {};
|
|
72
|
+
const unmet = [];
|
|
73
|
+
for (const [key, requirement] of Object.entries(requirements?.mustInclude ?? {})) {
|
|
74
|
+
const isMeeting = (file) => requirement.anyOf.some((match) => isMatching(file, match));
|
|
75
|
+
const file = attached.find(isMeeting) ??
|
|
76
|
+
(requirement.orPreviousArtifact ? previous.find(isMeeting) : undefined);
|
|
77
|
+
if (file)
|
|
78
|
+
included[key] = file;
|
|
79
|
+
else
|
|
80
|
+
unmet.push([key, requirement]);
|
|
81
|
+
}
|
|
82
|
+
return { included, unmet };
|
|
83
|
+
};
|
|
84
|
+
/** Returns the files a proposal envelope offers its skill's attachment requirements. */
|
|
85
|
+
export const listOfferedFiles = ({ attachments = [], previous, }) => ({
|
|
86
|
+
attached: attachments,
|
|
87
|
+
previous: previous?.artifacts.filter(({ kind }) => kind === "file") ?? [],
|
|
88
|
+
});
|
|
89
|
+
const describeRequirement = ([key, requirement]) => {
|
|
90
|
+
const choices = requirement.anyOf.map((match) => "extension" in match ? match.extension : match.mimeType);
|
|
91
|
+
if (requirement.orPreviousArtifact)
|
|
92
|
+
choices.push(previousChoice);
|
|
93
|
+
return `"${key}" (${requirement.description}), which accepts ${joinChoices(choices)}`;
|
|
94
|
+
};
|
|
95
|
+
const findAttachmentProblem = (skill, offered) => {
|
|
96
|
+
const { unmet } = matchRequirements(skill.attachments, offered);
|
|
97
|
+
if (unmet.length === 0)
|
|
98
|
+
return undefined;
|
|
99
|
+
return `The "${skill.name}" skill needs attachments the proposal doesn't include: ${unmet.map(describeRequirement).join("; ")}`;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Returns why the network refuses work proposed to the agent with `card` before the agent sees it, judged by the card
|
|
103
|
+
* and the files the proposal offers, or undefined when it doesn't.
|
|
104
|
+
*/
|
|
105
|
+
export const findProposalProblem = (card, work, offered) => {
|
|
106
|
+
const skill = listVisibleSkills(card, work.from).find(({ name }) => name === work.skill);
|
|
107
|
+
if (work.skill !== undefined && !skill) {
|
|
108
|
+
return `"${card.name}" has no "${work.skill}" skill`;
|
|
109
|
+
}
|
|
110
|
+
return (skill &&
|
|
111
|
+
(findRunModeProblem(skill, work) ?? findAttachmentProblem(skill, offered)));
|
|
112
|
+
};
|
|
113
|
+
const findRunModesProblem = ({ name, runsAs, triggers }) => {
|
|
114
|
+
if (!runsAs)
|
|
115
|
+
return undefined;
|
|
116
|
+
if (runsAs.length === 0 || new Set(runsAs).size < runsAs.length) {
|
|
117
|
+
return `The "${name}" skill must list each of its run modes once`;
|
|
118
|
+
}
|
|
119
|
+
const unknown = runsAs.find((mode) => !Object.hasOwn(runModes, mode));
|
|
120
|
+
if (unknown !== undefined) {
|
|
121
|
+
return `The "${name}" skill lists the unknown run mode "${unknown}"`;
|
|
122
|
+
}
|
|
123
|
+
return runsAs.includes("trigger") && !triggers?.length
|
|
124
|
+
? `The "${name}" skill runs on a trigger, so it must declare at least one`
|
|
125
|
+
: undefined;
|
|
126
|
+
};
|
|
127
|
+
const findMatchProblem = (name, key, match) => {
|
|
128
|
+
if ("extension" in match) {
|
|
129
|
+
return match.extension.startsWith(".") && match.extension.length > 1
|
|
130
|
+
? undefined
|
|
131
|
+
: `The "${name}" skill's "${key}" attachment lists the extension "${match.extension}", which must start with a dot`;
|
|
132
|
+
}
|
|
133
|
+
return match.mimeType.includes("/")
|
|
134
|
+
? undefined
|
|
135
|
+
: `The "${name}" skill's "${key}" attachment lists "${match.mimeType}", which isn't a MIME type`;
|
|
136
|
+
};
|
|
137
|
+
const findRequirementProblem = (name, [key, { description, anyOf }]) => {
|
|
138
|
+
if (!requirementKey.test(key)) {
|
|
139
|
+
return `The "${name}" skill's attachment key "${key}" must be 1 to 64 letters, digits, hyphens or underscores, starting with a letter or digit`;
|
|
140
|
+
}
|
|
141
|
+
if (description.length > maxDescription) {
|
|
142
|
+
return `The "${name}" skill's "${key}" attachment description must be at most ${maxDescription} characters`;
|
|
143
|
+
}
|
|
144
|
+
if (anyOf.length === 0 || anyOf.length > maxMatches) {
|
|
145
|
+
return `The "${name}" skill's "${key}" attachment must accept from 1 to ${maxMatches} file types`;
|
|
146
|
+
}
|
|
147
|
+
return anyOf
|
|
148
|
+
.map((match) => findMatchProblem(name, key, match))
|
|
149
|
+
.find((problem) => problem !== undefined);
|
|
150
|
+
};
|
|
151
|
+
const findRequirementsProblem = ({ name, attachments }) => {
|
|
152
|
+
const requirements = Object.entries(attachments?.mustInclude ?? {});
|
|
153
|
+
if (requirements.length > maxRequirements) {
|
|
154
|
+
return `The "${name}" skill must require at most ${maxRequirements} attachments`;
|
|
155
|
+
}
|
|
156
|
+
return requirements
|
|
157
|
+
.map((requirement) => findRequirementProblem(name, requirement))
|
|
158
|
+
.find((problem) => problem !== undefined);
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Checks the skills an agent publishes follow the network's rules.
|
|
162
|
+
*
|
|
163
|
+
* @throws {AgentJamError} If a skill breaks one, saying how.
|
|
164
|
+
*/
|
|
165
|
+
export const assertSkillCards = (skills) => {
|
|
166
|
+
for (const card of skills) {
|
|
167
|
+
const problem = findRunModesProblem(card) ?? findRequirementsProblem(card);
|
|
168
|
+
if (problem)
|
|
169
|
+
throw new AgentJamError(problem);
|
|
170
|
+
}
|
|
171
|
+
assertSubscriptions(skills);
|
|
172
|
+
};
|
|
173
|
+
//# sourceMappingURL=skillChecks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skillChecks.js","sourceRoot":"","sources":["../src/skillChecks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC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C,CAAC;QAC3E,IAAI,OAAO;YAAE,MAAM,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;IAED,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAC9B,CAAC,CAAC"}
|
package/dist/tasks/incoming.d.ts
CHANGED
|
@@ -2,41 +2,57 @@ import type { AnyOfConnection, AnyOfCredentials } from "../anyOf.js";
|
|
|
2
2
|
import type { ArtifactSource } from "../artifacts.js";
|
|
3
3
|
import type { CredentialSource } from "../connections.js";
|
|
4
4
|
import { AgentJamError } from "../errors.js";
|
|
5
|
-
import type { Body, CostReport, TaskEndCode, TaskEnvelope } from "../protocol.js";
|
|
5
|
+
import type { Body, CostReport, TaskEndCode, TaskEnvelope, TaskRef } from "../protocol.js";
|
|
6
6
|
import type { Account } from "../providers.js";
|
|
7
7
|
import type { UploadSource } from "../relay/uploads.js";
|
|
8
|
-
import type { Attachment, Awaitable, ConnectionFetch, DeclaredConnection, Delegate, HistoryPage, HistoryQuery, IncomingMessage, InferInput,
|
|
8
|
+
import type { Attachment, Awaitable, ConnectionFetch, DeclaredConnection, Delegate, FiredEvent, HistoryPage, HistoryQuery, IncludedFiles, IncomingMessage, InferInput, InputSchema, JsonObject, MessageReply, Price, SecretConnection, SendOptions, SkillCard, TaskEnding, TaskInbox, TaskRecap, TriggerCard } from "../types.js";
|
|
9
9
|
import type { AccessOptions } from "./access.js";
|
|
10
10
|
/** What `onTask` may return: nothing, one artifact source, or several to send in order. */
|
|
11
11
|
export type TaskOutput = ArtifactSource | ArtifactSource[] | void;
|
|
12
12
|
/** A task this agent accepted. It's passed to `onTask` and available through `currentTask()`. */
|
|
13
|
-
export interface IncomingTask {
|
|
13
|
+
export interface IncomingTask<Input = unknown, Event = FiredEvent | undefined, Included = IncludedFiles> {
|
|
14
14
|
/** The task's unique id. */
|
|
15
15
|
readonly id: string;
|
|
16
16
|
/** The agent that proposed the task. */
|
|
17
17
|
readonly from: string;
|
|
18
|
-
/** The human whose request started the task's chain, as their email or `guest:<agent
|
|
19
|
-
readonly principal: string
|
|
18
|
+
/** The human whose request started the task's chain, as their email or `guest:<agent>` for a chain no human started. */
|
|
19
|
+
readonly principal: string;
|
|
20
20
|
/** The requester's description of the task. */
|
|
21
21
|
readonly text: string;
|
|
22
22
|
/** The name of the skill the task calls for, if the requester named one. */
|
|
23
23
|
readonly skill: string | undefined;
|
|
24
|
-
/**
|
|
25
|
-
|
|
24
|
+
/**
|
|
25
|
+
* The requester's structured input. For a skill with an `input` schema, it's the schema's parsed output, so its
|
|
26
|
+
* refinements held and its transforms applied.
|
|
27
|
+
*/
|
|
28
|
+
readonly input: Input;
|
|
26
29
|
/** The files the requester attached, already downloaded. */
|
|
27
30
|
readonly attachments: Attachment[];
|
|
31
|
+
/**
|
|
32
|
+
* The file that met each of the skill's attachment requirements, by requirement key: the first attached file that
|
|
33
|
+
* matches it, or else the first matching file artifact of the task this one follows up on.
|
|
34
|
+
*/
|
|
35
|
+
readonly included: Included;
|
|
28
36
|
/** What the earlier task this one follows up on asked for and produced, when the requester proposed it as a follow-up. */
|
|
29
37
|
readonly previous: TaskRecap | undefined;
|
|
38
|
+
/** The follow-up chain the task belongs to. */
|
|
39
|
+
readonly chain: TaskChain;
|
|
30
40
|
/** The schedule this task is a run of, if any. */
|
|
31
41
|
readonly scheduleId: string | undefined;
|
|
32
42
|
/** The run's number, starting from 1, if the task is a run of a schedule. */
|
|
33
43
|
readonly run: number | undefined;
|
|
34
|
-
/** The trigger event that started this run, if it's a run of a trigger schedule. */
|
|
35
|
-
readonly event:
|
|
44
|
+
/** The trigger event that started this run, with its trigger's name and parsed data, if it's a run of a trigger schedule. */
|
|
45
|
+
readonly event: Event;
|
|
36
46
|
/** Whether another session of this agent started the task before it left, so the work may be partly done. */
|
|
37
47
|
readonly resumed: boolean;
|
|
38
48
|
/** Which attempt at the task this is: 1 for the first, plus one for each time it resumed. */
|
|
39
49
|
readonly attempt: number;
|
|
50
|
+
/**
|
|
51
|
+
* Whether this attempt left the session for another session to resume, because the task moved or this session left
|
|
52
|
+
* it running when it drained or closed. Check it to keep what the resumed attempt needs alive, such as not closing a
|
|
53
|
+
* sandbox in `finally`. It stays false for cancellations, failures and disconnects.
|
|
54
|
+
*/
|
|
55
|
+
readonly handedOver: boolean;
|
|
40
56
|
/**
|
|
41
57
|
* Aborts when the requester cancels, the task fails, or this agent disconnects. It aborts with a `ReassignedError` once
|
|
42
58
|
* the task moved to another session of this agent, after which nothing this session sends for it reaches the requester.
|
|
@@ -57,15 +73,32 @@ export interface IncomingTask {
|
|
|
57
73
|
/**
|
|
58
74
|
* Sends the requester a message about this task and resolves with its reply, waiting until the task
|
|
59
75
|
* ends since a human may need to answer. It reaches the session that proposed the task, in a
|
|
60
|
-
* conversation named after the task unless `options` names another.
|
|
76
|
+
* conversation named after the task unless `options` names another. Use `sendWithDefault()` for a
|
|
77
|
+
* reply the task can do without.
|
|
61
78
|
*
|
|
62
79
|
* @param text The message to send.
|
|
63
80
|
* @param options The conversation to continue and the files to attach, plus per-call request overrides.
|
|
64
81
|
* @returns The requester's reply, with its files downloaded.
|
|
65
82
|
* @throws {AgentNotFoundError} If the session that proposed the task is gone.
|
|
83
|
+
* @throws {MessagesNotAcceptedError} If the requester connected without `onMessage`.
|
|
66
84
|
* @throws {TimeoutError} If `options` sets a timeout and no reply arrives within it.
|
|
67
85
|
*/
|
|
68
86
|
send(text: string, options?: RequesterMessageOptions): Promise<MessageReply>;
|
|
87
|
+
/**
|
|
88
|
+
* Sends the requester a message about this task like `send()`, but resolves with `fallback` instead
|
|
89
|
+
* of throwing when no reply can come: the reply takes longer than `timeoutMs`, the session that
|
|
90
|
+
* proposed the task is gone, or the requester takes no messages. It's a shorthand for wrapping
|
|
91
|
+
* `send()` in a try/catch for those errors, for a task that can go on without an answer. Use `send()`
|
|
92
|
+
* when the task can't go on without one.
|
|
93
|
+
*
|
|
94
|
+
* @param text The message to send.
|
|
95
|
+
* @param timeoutMs How long to wait for the reply, in milliseconds.
|
|
96
|
+
* @param fallback What to resolve with when no reply can come.
|
|
97
|
+
* @param options The conversation to continue and the files to attach, plus per-call request overrides.
|
|
98
|
+
* @returns The requester's reply, with its files downloaded, or `fallback`.
|
|
99
|
+
* @throws The task's abort reason, once the task is canceled, fails or moves to another session.
|
|
100
|
+
*/
|
|
101
|
+
sendWithDefault<T>(text: string, timeoutMs: number, fallback: T, options?: Omit<RequesterMessageOptions, "timeoutMs">): Promise<MessageReply | T>;
|
|
69
102
|
/**
|
|
70
103
|
* Opens the task's inbox, so the requester's messages about the task queue up for the work in progress
|
|
71
104
|
* instead of reaching `onMessage`, each answered right away with an acknowledgement. It closes once the task ends.
|
|
@@ -83,10 +116,12 @@ export interface IncomingTask {
|
|
|
83
116
|
*/
|
|
84
117
|
deliver(source: ArtifactSource): Promise<void>;
|
|
85
118
|
/**
|
|
86
|
-
* Adds to the task's running cost, which a `cost_plus` skill charges plus its markup once the
|
|
87
|
-
*
|
|
119
|
+
* Adds to the task's running cost, which a `cost_plus` skill charges plus its markup once the task
|
|
120
|
+
* completes or its requester cancels it. Call it as each cost is incurred, such as after every model
|
|
121
|
+
* step: the SDK adds up the increments and reports the running total to the relay in batches, so
|
|
122
|
+
* there's no need to round or accumulate costs first. A task that never calls it costs nothing.
|
|
88
123
|
*
|
|
89
|
-
* @param costCents The cost to add in cents,
|
|
124
|
+
* @param costCents The cost to add, in cents, which may be fractional down to a millionth of a cent, such as 0.0137.
|
|
90
125
|
* @throws {AgentJamError} If `costCents` isn't a finite number of at least 0.
|
|
91
126
|
*/
|
|
92
127
|
incrementCost(costCents: number): void;
|
|
@@ -182,17 +217,13 @@ export interface IncomingTask {
|
|
|
182
217
|
*/
|
|
183
218
|
listHistory(query?: HistoryQuery): Promise<HistoryPage>;
|
|
184
219
|
/**
|
|
185
|
-
*
|
|
186
|
-
*
|
|
220
|
+
* Recaps the most recent run of this task's schedule that completed before this one, such as to pick up where it
|
|
221
|
+
* left off, by paging through `listHistory()` and recalling the run it finds.
|
|
187
222
|
*
|
|
188
|
-
* @
|
|
189
|
-
* @
|
|
190
|
-
* @throws {AgentJamError} If the task calls for another skill, or this process wasn't connected with the skill's input schema.
|
|
223
|
+
* @returns What the run asked for and produced, or `undefined` when no earlier run completed or the task isn't a run.
|
|
224
|
+
* @throws {AgentJamError} If the relay doesn't keep tasks.
|
|
191
225
|
*/
|
|
192
|
-
|
|
193
|
-
name: string;
|
|
194
|
-
input: Schema;
|
|
195
|
-
}): InferOutput<Schema>;
|
|
226
|
+
lastRun(): Promise<TaskRecap | undefined>;
|
|
196
227
|
/**
|
|
197
228
|
* Sets the task's structured output, which the requester reads with `getOutput()` once the task completes.
|
|
198
229
|
* A task whose skill has an output schema must set it before it completes, and setting it again replaces it.
|
|
@@ -215,6 +246,11 @@ export interface IncomingTask {
|
|
|
215
246
|
*/
|
|
216
247
|
subscribe(config: Record<string, unknown>): void;
|
|
217
248
|
}
|
|
249
|
+
/** The follow-up chain a task belongs to. */
|
|
250
|
+
export type TaskChain = {
|
|
251
|
+
/** The id of the chain's first task, which is the task's own id when it follows up on nothing. */
|
|
252
|
+
readonly root: string;
|
|
253
|
+
};
|
|
218
254
|
/** Options for a task's `send()`, which is always about that task. */
|
|
219
255
|
export type TaskMessageOptions = Omit<SendOptions, "taskId">;
|
|
220
256
|
/** Options for a running task's `send()` to its requester, which only the requester can steer. */
|
|
@@ -233,7 +269,7 @@ type TaskDetails = Pick<IncomingTask, "id" | "from" | "text" | "skill" | "attach
|
|
|
233
269
|
previous?: TaskRecap | undefined;
|
|
234
270
|
scheduleId?: string | undefined;
|
|
235
271
|
run?: number | undefined;
|
|
236
|
-
event?:
|
|
272
|
+
event?: FiredEvent | undefined;
|
|
237
273
|
attempt?: number | undefined;
|
|
238
274
|
resumable?: boolean;
|
|
239
275
|
price?: Price | undefined;
|
|
@@ -250,10 +286,11 @@ export type ConnectionAccess = Pick<IncomingTask, "credentials" | "account" | "c
|
|
|
250
286
|
type ExecutionLink = {
|
|
251
287
|
post: (body: Body<TaskEnvelope> | CostReport) => Promise<void>;
|
|
252
288
|
send: (text: string, options: TaskMessageOptions) => Promise<MessageReply>;
|
|
253
|
-
/** Uploads a file artifact,
|
|
254
|
-
upload: (source: UploadSource, signal: AbortSignal) => Promise<string
|
|
289
|
+
/** Uploads a file artifact, rejecting when the relay can't store files. */
|
|
290
|
+
upload: (source: UploadSource, signal: AbortSignal) => Promise<string>;
|
|
255
291
|
prepare: (delegates: Delegate[]) => Promise<void>;
|
|
256
292
|
listHistory: (query: HistoryQuery) => Promise<HistoryPage>;
|
|
293
|
+
recall: (task: TaskRef) => Promise<TaskRecap>;
|
|
257
294
|
requireAccess: (connection: DeclaredConnection, options: AccessOptions, signal: AbortSignal) => Promise<void>;
|
|
258
295
|
};
|
|
259
296
|
/**
|
|
@@ -271,15 +308,17 @@ export declare class TaskExecution implements IncomingTask {
|
|
|
271
308
|
private readonly link;
|
|
272
309
|
readonly id: string;
|
|
273
310
|
readonly from: string;
|
|
274
|
-
readonly principal: string
|
|
311
|
+
readonly principal: string;
|
|
275
312
|
readonly text: string;
|
|
276
313
|
readonly skill: string | undefined;
|
|
277
|
-
readonly input:
|
|
314
|
+
readonly input: unknown;
|
|
278
315
|
readonly attachments: Attachment[];
|
|
316
|
+
readonly included: IncludedFiles;
|
|
279
317
|
readonly previous: TaskRecap | undefined;
|
|
318
|
+
readonly chain: TaskChain;
|
|
280
319
|
readonly scheduleId: string | undefined;
|
|
281
320
|
readonly run: number | undefined;
|
|
282
|
-
readonly event:
|
|
321
|
+
readonly event: FiredEvent | undefined;
|
|
283
322
|
readonly attempt: number;
|
|
284
323
|
/** Whether another session of this agent picks the task up once this one leaves, rather than it failing. */
|
|
285
324
|
readonly resumable: boolean;
|
|
@@ -292,6 +331,8 @@ export declare class TaskExecution implements IncomingTask {
|
|
|
292
331
|
private readonly backlogs;
|
|
293
332
|
private readonly outcome;
|
|
294
333
|
private ended;
|
|
334
|
+
private isHandedOver;
|
|
335
|
+
private result;
|
|
295
336
|
private costCents;
|
|
296
337
|
private reportedCents;
|
|
297
338
|
private reportedAt;
|
|
@@ -300,7 +341,6 @@ export declare class TaskExecution implements IncomingTask {
|
|
|
300
341
|
private readonly price;
|
|
301
342
|
private readonly card;
|
|
302
343
|
private readonly isSelf;
|
|
303
|
-
private readonly parsedInput;
|
|
304
344
|
private readonly subscribedTrigger;
|
|
305
345
|
private readonly isOptedOut;
|
|
306
346
|
private inbox;
|
|
@@ -314,20 +354,20 @@ export declare class TaskExecution implements IncomingTask {
|
|
|
314
354
|
setHeldCents(heldCents: number): void;
|
|
315
355
|
/** Resolves once the task has ended and its terminal envelope, if any, has been sent. */
|
|
316
356
|
get settled(): Promise<void>;
|
|
357
|
+
/** How the task ended in this session, once `settled` resolved. */
|
|
358
|
+
get ending(): TaskEnding;
|
|
317
359
|
update(text: string): Promise<void>;
|
|
318
360
|
send(text: string, options?: RequesterMessageOptions): Promise<MessageReply>;
|
|
361
|
+
sendWithDefault<T>(text: string, timeoutMs: number, fallback: T, options?: Omit<RequesterMessageOptions, "timeoutMs">): Promise<T | MessageReply>;
|
|
319
362
|
openInbox(): TaskInbox;
|
|
320
363
|
/** Queues a requester's message about the task for the work in progress, returning whether its open inbox took it. */
|
|
321
364
|
queueMessage(message: IncomingMessage): boolean;
|
|
322
365
|
prepare(delegates: Delegate[]): Promise<void>;
|
|
323
366
|
listHistory(query?: HistoryQuery): Promise<HistoryPage>;
|
|
367
|
+
lastRun(): Promise<TaskRecap | undefined>;
|
|
324
368
|
requireAccess(connection: DeclaredConnection, options: AccessOptions): Promise<void>;
|
|
325
369
|
incrementCost(costCents: number): void;
|
|
326
370
|
commit({ costCents }?: CommitOptions): Promise<void>;
|
|
327
|
-
getInput<Schema extends InputSchema>({ name, }: {
|
|
328
|
-
name: string;
|
|
329
|
-
input: Schema;
|
|
330
|
-
}): InferOutput<Schema>;
|
|
331
371
|
setOutput<Schema extends InputSchema>({ name, output }: {
|
|
332
372
|
name: string;
|
|
333
373
|
output: Schema;
|
|
@@ -338,8 +378,12 @@ export declare class TaskExecution implements IncomingTask {
|
|
|
338
378
|
perform(work: (task: IncomingTask) => Awaitable<TaskOutput>): Promise<void>;
|
|
339
379
|
fail(error: unknown): Promise<void>;
|
|
340
380
|
cancel(reason: string | undefined, code?: TaskEndCode): void;
|
|
381
|
+
get handedOver(): boolean;
|
|
341
382
|
/** Ends the task in this session without telling the requester, aborting its signal with `error`. */
|
|
342
383
|
abandon(error: AgentJamError): void;
|
|
384
|
+
/** Leaves the task for another session to resume, aborting its signal with `error`. */
|
|
385
|
+
handOver(error: AgentJamError): void;
|
|
386
|
+
private stop;
|
|
343
387
|
private settle;
|
|
344
388
|
private post;
|
|
345
389
|
/** Abandons the task once the relay refuses `request` because the task moved to another session. */
|
|
@@ -357,7 +401,7 @@ export declare class TaskExecution implements IncomingTask {
|
|
|
357
401
|
private assertSkill;
|
|
358
402
|
private finish;
|
|
359
403
|
private stream;
|
|
360
|
-
/** Uploads a stream of bytes as a file, or hands back
|
|
404
|
+
/** Uploads a stream of bytes as a file, or hands back text to stream live. */
|
|
361
405
|
private uploadBytes;
|
|
362
406
|
private sendUpload;
|
|
363
407
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"incoming.d.ts","sourceRoot":"","sources":["../../src/tasks/incoming.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAQtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"incoming.d.ts","sourceRoot":"","sources":["../../src/tasks/incoming.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAQtD,OAAO,KAAK,EAAE,gB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