@theokit/sdk 4.7.1 → 4.8.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/dist/agent.d.ts +8 -0
- package/dist/cron.cjs +15 -0
- package/dist/cron.cjs.map +1 -1
- package/dist/cron.js +15 -0
- package/dist/cron.js.map +1 -1
- package/dist/eval.cjs +15 -0
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +15 -0
- package/dist/eval.js.map +1 -1
- package/dist/index.cjs +15 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -19460,6 +19460,11 @@ async function setArchivedFlag(agentId, archived) {
|
|
|
19460
19460
|
updateRegisteredAgent(agentId, { archived });
|
|
19461
19461
|
await flushRegistrySaves();
|
|
19462
19462
|
}
|
|
19463
|
+
async function setAgentName(agentId, name) {
|
|
19464
|
+
await getRegisteredAgentOrThrow(agentId);
|
|
19465
|
+
updateRegisteredAgent(agentId, { name });
|
|
19466
|
+
await flushRegistrySaves();
|
|
19467
|
+
}
|
|
19463
19468
|
async function getRegisteredAgentOrThrow(agentId) {
|
|
19464
19469
|
let agent = getRegisteredAgent(agentId);
|
|
19465
19470
|
if (agent === void 0) {
|
|
@@ -19739,6 +19744,16 @@ var Agent = class _Agent {
|
|
|
19739
19744
|
static unarchive(agentId, _options = {}) {
|
|
19740
19745
|
return setArchivedFlag(agentId, false);
|
|
19741
19746
|
}
|
|
19747
|
+
/**
|
|
19748
|
+
* Set the human-facing `name` of a registered agent (the label `Agent.list()` returns). The registry
|
|
19749
|
+
* already carries a `name` field; this is the missing public mutator for it. Runtime-agnostic (mutates
|
|
19750
|
+
* the local per-cwd registry for local agents; the cloud registry for cloud agents).
|
|
19751
|
+
*
|
|
19752
|
+
* @public
|
|
19753
|
+
*/
|
|
19754
|
+
static async rename(agentId, name, _options = {}) {
|
|
19755
|
+
await setAgentName(agentId, name);
|
|
19756
|
+
}
|
|
19742
19757
|
/**
|
|
19743
19758
|
* Permanently delete a cloud agent.
|
|
19744
19759
|
*
|