@primusclaw/personal-agent-runtime 0.13.0 → 0.15.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/index.js +13 -0
- package/dist/types/claw/remote-agents.d.ts +2 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -536,6 +536,13 @@ function enabledOf(answer2) {
|
|
|
536
536
|
if (typeof enabled !== "boolean") throw new ClawAnswerInvalid4("the approvals setting has no enabled");
|
|
537
537
|
return enabled;
|
|
538
538
|
}
|
|
539
|
+
function summaryOf(answer2) {
|
|
540
|
+
const data = anyDataOf(answer2, "the summary setting");
|
|
541
|
+
const minutes = data !== null && typeof data === "object" ? data["summary_minutes"] : void 0;
|
|
542
|
+
if (typeof minutes !== "number" || !Number.isSafeInteger(minutes) || minutes < 0)
|
|
543
|
+
throw new ClawAnswerInvalid4("the summary setting has no summary_minutes");
|
|
544
|
+
return minutes;
|
|
545
|
+
}
|
|
539
546
|
var HttpRemoteAgents = class {
|
|
540
547
|
constructor(http, clientLabel) {
|
|
541
548
|
this.http = http;
|
|
@@ -556,6 +563,12 @@ var HttpRemoteAgents = class {
|
|
|
556
563
|
async setApprovals(key2, enabled) {
|
|
557
564
|
return enabledOf(await this.#call("PUT", "/approvals", key2, { enabled }));
|
|
558
565
|
}
|
|
566
|
+
async summary(key2) {
|
|
567
|
+
return summaryOf(await this.#call("GET", "/approvals", key2));
|
|
568
|
+
}
|
|
569
|
+
async setSummary(key2, minutes) {
|
|
570
|
+
return summaryOf(await this.#call("PUT", "/approvals/summary", key2, { minutes }));
|
|
571
|
+
}
|
|
559
572
|
async muteTerminal(key2, item2, muted) {
|
|
560
573
|
const data = anyDataOf(await this.#call("PUT", "/approvals/mutes", key2, { item: item2, muted }), "a terminal mute");
|
|
561
574
|
const d = data !== null && typeof data === "object" ? data : {};
|
|
@@ -12,6 +12,8 @@ export declare class HttpRemoteAgents implements ClawRemoteAgentsPort {
|
|
|
12
12
|
}): Promise<RemoteConnector[]>;
|
|
13
13
|
approvals(key: ClawCredential): Promise<boolean>;
|
|
14
14
|
setApprovals(key: ClawCredential, enabled: boolean): Promise<boolean>;
|
|
15
|
+
summary(key: ClawCredential): Promise<number>;
|
|
16
|
+
setSummary(key: ClawCredential, minutes: number): Promise<number>;
|
|
15
17
|
muteTerminal(key: ClawCredential, item: number, muted: boolean): Promise<TerminalMute>;
|
|
16
18
|
pair(key: ClawCredential): Promise<RemotePairing>;
|
|
17
19
|
hide(key: ClawCredential, connectorId: string, refs: readonly string[], hidden: boolean): Promise<RemoteHidden>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primusclaw/personal-agent-runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Node adapters for the personal agent's ports (clock, randomness, logging, storage, Claw, metrics, HTTP), and, at @primusclaw/personal-agent-runtime/worker, the worker process on any chat surface.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@primusclaw/personal-agent": "0.
|
|
36
|
+
"@primusclaw/personal-agent": "0.15.0",
|
|
37
37
|
"fastify": "^5.12.8",
|
|
38
38
|
"zod": "^4.6.7"
|
|
39
39
|
}
|