@persistmemory/sdk 0.4.1 → 0.5.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.cjs +25 -0
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +25 -0
- package/dist/index.js.map +2 -2
- package/dist/resources/agent.d.ts +22 -1
- package/dist/types.d.ts +15 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1354,6 +1354,31 @@ var Agent = class {
|
|
|
1354
1354
|
options
|
|
1355
1355
|
);
|
|
1356
1356
|
}
|
|
1357
|
+
/**
|
|
1358
|
+
* A Space's requests — what the project has in flight and what came back,
|
|
1359
|
+
* whoever raised it and whichever machine answered. For an editor or owner
|
|
1360
|
+
* of the Space; a viewer, and anybody not in it, is answered 404.
|
|
1361
|
+
*/
|
|
1362
|
+
async spaceRequests(spaceId, options) {
|
|
1363
|
+
return this.#http.get(
|
|
1364
|
+
`/api/v1/agent/spaces/${encodeURIComponent(spaceId)}/requests`,
|
|
1365
|
+
void 0,
|
|
1366
|
+
options
|
|
1367
|
+
);
|
|
1368
|
+
}
|
|
1369
|
+
/**
|
|
1370
|
+
* Shares one of your own machines into a Space, so the Space's editors can
|
|
1371
|
+
* ask it for files and commands. Every such ask waits for you, the
|
|
1372
|
+
* machine's owner, whatever your own approval settings say. Session
|
|
1373
|
+
* credentials only.
|
|
1374
|
+
*/
|
|
1375
|
+
async shareMachine(args, options) {
|
|
1376
|
+
return this.#http.post("/api/v1/agent/connections/share", args, options);
|
|
1377
|
+
}
|
|
1378
|
+
/** Takes a machine back out of a Space. Requests already answered stay answered. */
|
|
1379
|
+
async unshareMachine(args, options) {
|
|
1380
|
+
return this.#http.delete("/api/v1/agent/connections/share", args, options);
|
|
1381
|
+
}
|
|
1357
1382
|
};
|
|
1358
1383
|
|
|
1359
1384
|
// src/client.ts
|