@questionbase/deskfree 0.6.7 → 0.6.8
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/bin.js +9 -8
- package/dist/bin.js.map +1 -1
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7000,12 +7000,13 @@ var init_dist = __esm({
|
|
|
7000
7000
|
* Validates that a string parameter is non-empty.
|
|
7001
7001
|
* Catches invalid inputs before they hit the network.
|
|
7002
7002
|
*/
|
|
7003
|
-
requireNonEmpty(value, name) {
|
|
7003
|
+
requireNonEmpty(value, name, caller) {
|
|
7004
7004
|
if (!value || value.trim() === "") {
|
|
7005
|
+
const ctx = caller ? ` (in ${caller})` : "";
|
|
7005
7006
|
throw new DeskFreeError(
|
|
7006
7007
|
"client",
|
|
7007
7008
|
name,
|
|
7008
|
-
`${name} is required and cannot be empty`,
|
|
7009
|
+
`${name} is required and cannot be empty${ctx}`,
|
|
7009
7010
|
`Missing required parameter: ${name}. Please provide a valid value.`
|
|
7010
7011
|
);
|
|
7011
7012
|
}
|
|
@@ -7031,7 +7032,7 @@ var init_dist = __esm({
|
|
|
7031
7032
|
* @param input - Message content, optional userId, taskId, attachments
|
|
7032
7033
|
*/
|
|
7033
7034
|
async sendMessage(input) {
|
|
7034
|
-
this.requireNonEmpty(input.content, "content");
|
|
7035
|
+
this.requireNonEmpty(input.content, "content", "sendMessage");
|
|
7035
7036
|
return this.request("POST", "messages.send", input);
|
|
7036
7037
|
}
|
|
7037
7038
|
/** Fetch paginated message history for a conversation. */
|
|
@@ -7068,8 +7069,8 @@ var init_dist = __esm({
|
|
|
7068
7069
|
}
|
|
7069
7070
|
/** Update the content of an existing file. */
|
|
7070
7071
|
async updateFile(input) {
|
|
7071
|
-
this.requireNonEmpty(input.fileId, "fileId");
|
|
7072
|
-
this.requireNonEmpty(input.content, "content");
|
|
7072
|
+
this.requireNonEmpty(input.fileId, "fileId", "updateFile");
|
|
7073
|
+
this.requireNonEmpty(input.content, "content", "updateFile");
|
|
7073
7074
|
return this.request("POST", "files.update", input);
|
|
7074
7075
|
}
|
|
7075
7076
|
/** Create a new persistent file. */
|
|
@@ -7113,13 +7114,13 @@ var init_dist = __esm({
|
|
|
7113
7114
|
}
|
|
7114
7115
|
/** Report a learning observation from a worker task. Posts a system message in the task thread AND writes to memory_entries. */
|
|
7115
7116
|
async reportLearning(input) {
|
|
7116
|
-
this.requireNonEmpty(input.content, "content");
|
|
7117
|
+
this.requireNonEmpty(input.content, "content", "reportLearning");
|
|
7117
7118
|
return this.request("POST", "tasks.learning", input);
|
|
7118
7119
|
}
|
|
7119
7120
|
// ── Memory ──────────────────────────────────────────────────
|
|
7120
7121
|
/** Add a memory entry directly (bypasses system message — used by consolidation). */
|
|
7121
7122
|
async addMemory(input) {
|
|
7122
|
-
this.requireNonEmpty(input.content, "content");
|
|
7123
|
+
this.requireNonEmpty(input.content, "content", "addMemory");
|
|
7123
7124
|
return this.request("POST", "memory.add", input);
|
|
7124
7125
|
}
|
|
7125
7126
|
/**
|
|
@@ -14470,7 +14471,7 @@ async function startAgent(opts) {
|
|
|
14470
14471
|
log.info("DeskFree Agent Runtime starting...");
|
|
14471
14472
|
const { getRotationToken: getRotationToken2, setInitialRotationToken: setInitialRotationToken2 } = await Promise.resolve().then(() => (init_ws_gateway(), ws_gateway_exports));
|
|
14472
14473
|
const { collectFingerprint: collectFingerprint2 } = await Promise.resolve().then(() => (init_fingerprint(), fingerprint_exports));
|
|
14473
|
-
const runtimeVersion = "0.6.
|
|
14474
|
+
const runtimeVersion = "0.6.8";
|
|
14474
14475
|
const fingerprint = collectFingerprint2(localConfig.stateDir, runtimeVersion);
|
|
14475
14476
|
log.info("Connecting to DeskFree...", { wsUrl: localConfig.wsUrl });
|
|
14476
14477
|
const connectResult = await initialConnect({
|