@rowan-agent/agent 0.9.20 → 0.9.21
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/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1637,7 +1637,7 @@ type AgentRecord = Readonly<{
|
|
|
1637
1637
|
type AgentDeletionRequest = Readonly<{
|
|
1638
1638
|
agentId: AgentId;
|
|
1639
1639
|
expectedRunIds: readonly RunId[];
|
|
1640
|
-
confirmation: "
|
|
1640
|
+
confirmation: "agent-delete-v1";
|
|
1641
1641
|
}>;
|
|
1642
1642
|
type ExecutionToken = Readonly<{
|
|
1643
1643
|
runId: RunId;
|
package/dist/index.js
CHANGED
|
@@ -5912,7 +5912,7 @@ var AgentRuntime = class _AgentRuntime {
|
|
|
5912
5912
|
const runs = await this.owned.listRuns({ agentId: input.agentId });
|
|
5913
5913
|
for (const run of runs) {
|
|
5914
5914
|
if (["queued", "running", "input_required"].includes(run.state)) {
|
|
5915
|
-
await this.cancel(run.id, "
|
|
5915
|
+
await this.cancel(run.id, "Agent deleted.");
|
|
5916
5916
|
}
|
|
5917
5917
|
}
|
|
5918
5918
|
await this.owned.deleteAgent(input);
|
|
@@ -7009,8 +7009,8 @@ var InMemoryStore = class _InMemoryStore {
|
|
|
7009
7009
|
}
|
|
7010
7010
|
deleteAgent(lease, input) {
|
|
7011
7011
|
this.assertOwner(lease);
|
|
7012
|
-
if (input.confirmation !== "
|
|
7013
|
-
throw new TypeError("Agent deletion requires the
|
|
7012
|
+
if (input.confirmation !== "agent-delete-v1") {
|
|
7013
|
+
throw new TypeError("Agent deletion requires the agent-delete-v1 confirmation token");
|
|
7014
7014
|
}
|
|
7015
7015
|
const agent = this.requireAgent(input.agentId);
|
|
7016
7016
|
const runs = [...this.runs.values()].filter((run) => run.agentId === agent.id);
|