HarborForge.OpenclawPlugin: dev-2026-03-29 -> main #4

Merged
hzhang merged 15 commits from dev-2026-03-29 into main 2026-04-05 22:09:30 +00:00
Showing only changes of commit b81125db0d - Show all commits

View File

@@ -107,7 +107,7 @@ export class CalendarBridgeClient {
*/
async updateSlot(slotId: number, update: SlotAgentUpdate): Promise<boolean> {
const url = `${this.baseUrl}/calendar/slots/${slotId}/agent-update`;
return this.postBoolean(url, update);
return this.sendBoolean('PATCH', url, update);
}
/**
@@ -166,7 +166,7 @@ export class CalendarBridgeClient {
claw_identifier: this.config.clawIdentifier,
...params,
};
return this.postBoolean(url, body);
return this.sendBoolean('POST', url, body);
}
// -------------------------------------------------------------------------
@@ -195,13 +195,13 @@ export class CalendarBridgeClient {
}
}
private async postBoolean(url: string, body: unknown): Promise<boolean> {
private async sendBoolean(method: 'POST' | 'PATCH', url: string, body: unknown): Promise<boolean> {
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), this.timeoutMs);
try {
const response = await fetch(url, {
method: 'POST',
method,
headers: {
'Content-Type': 'application/json',
'X-Agent-ID': this.config.agentId,