@themoltnet/agent-daemon 0.10.3 → 0.10.4
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/main.js +128 -0
- package/package.json +5 -5
package/dist/main.js
CHANGED
|
@@ -8536,6 +8536,98 @@ var createDiaryGrant = (options) => (options.client ?? client).post({
|
|
|
8536
8536
|
}
|
|
8537
8537
|
});
|
|
8538
8538
|
/**
|
|
8539
|
+
* Initiate a diary transfer to another team. Requires diary manage permission.
|
|
8540
|
+
*/
|
|
8541
|
+
var initiateTransfer = (options) => (options.client ?? client).post({
|
|
8542
|
+
security: [
|
|
8543
|
+
{
|
|
8544
|
+
scheme: "bearer",
|
|
8545
|
+
type: "http"
|
|
8546
|
+
},
|
|
8547
|
+
{
|
|
8548
|
+
name: "X-Moltnet-Session-Token",
|
|
8549
|
+
type: "apiKey"
|
|
8550
|
+
},
|
|
8551
|
+
{
|
|
8552
|
+
in: "cookie",
|
|
8553
|
+
name: "ory_kratos_session",
|
|
8554
|
+
type: "apiKey"
|
|
8555
|
+
}
|
|
8556
|
+
],
|
|
8557
|
+
url: "/diaries/{id}/transfer",
|
|
8558
|
+
...options,
|
|
8559
|
+
headers: {
|
|
8560
|
+
"Content-Type": "application/json",
|
|
8561
|
+
...options.headers
|
|
8562
|
+
}
|
|
8563
|
+
});
|
|
8564
|
+
/**
|
|
8565
|
+
* List pending transfers where the caller is destination team owner.
|
|
8566
|
+
*/
|
|
8567
|
+
var listPendingTransfers = (options) => (options?.client ?? client).get({
|
|
8568
|
+
security: [
|
|
8569
|
+
{
|
|
8570
|
+
scheme: "bearer",
|
|
8571
|
+
type: "http"
|
|
8572
|
+
},
|
|
8573
|
+
{
|
|
8574
|
+
name: "X-Moltnet-Session-Token",
|
|
8575
|
+
type: "apiKey"
|
|
8576
|
+
},
|
|
8577
|
+
{
|
|
8578
|
+
in: "cookie",
|
|
8579
|
+
name: "ory_kratos_session",
|
|
8580
|
+
type: "apiKey"
|
|
8581
|
+
}
|
|
8582
|
+
],
|
|
8583
|
+
url: "/transfers",
|
|
8584
|
+
...options
|
|
8585
|
+
});
|
|
8586
|
+
/**
|
|
8587
|
+
* Accept a pending diary transfer. Caller must be destination team owner.
|
|
8588
|
+
*/
|
|
8589
|
+
var acceptTransfer = (options) => (options.client ?? client).post({
|
|
8590
|
+
security: [
|
|
8591
|
+
{
|
|
8592
|
+
scheme: "bearer",
|
|
8593
|
+
type: "http"
|
|
8594
|
+
},
|
|
8595
|
+
{
|
|
8596
|
+
name: "X-Moltnet-Session-Token",
|
|
8597
|
+
type: "apiKey"
|
|
8598
|
+
},
|
|
8599
|
+
{
|
|
8600
|
+
in: "cookie",
|
|
8601
|
+
name: "ory_kratos_session",
|
|
8602
|
+
type: "apiKey"
|
|
8603
|
+
}
|
|
8604
|
+
],
|
|
8605
|
+
url: "/transfers/{transferId}/accept",
|
|
8606
|
+
...options
|
|
8607
|
+
});
|
|
8608
|
+
/**
|
|
8609
|
+
* Reject a pending diary transfer.
|
|
8610
|
+
*/
|
|
8611
|
+
var rejectTransfer = (options) => (options.client ?? client).post({
|
|
8612
|
+
security: [
|
|
8613
|
+
{
|
|
8614
|
+
scheme: "bearer",
|
|
8615
|
+
type: "http"
|
|
8616
|
+
},
|
|
8617
|
+
{
|
|
8618
|
+
name: "X-Moltnet-Session-Token",
|
|
8619
|
+
type: "apiKey"
|
|
8620
|
+
},
|
|
8621
|
+
{
|
|
8622
|
+
in: "cookie",
|
|
8623
|
+
name: "ory_kratos_session",
|
|
8624
|
+
type: "apiKey"
|
|
8625
|
+
}
|
|
8626
|
+
],
|
|
8627
|
+
url: "/transfers/{transferId}/reject",
|
|
8628
|
+
...options
|
|
8629
|
+
});
|
|
8630
|
+
/**
|
|
8539
8631
|
* List diary entries for a specific diary.
|
|
8540
8632
|
*/
|
|
8541
8633
|
var listDiaryEntries = (options) => (options.client ?? client).get({
|
|
@@ -10334,6 +10426,41 @@ function createDiaryGrantsNamespace(context) {
|
|
|
10334
10426
|
};
|
|
10335
10427
|
}
|
|
10336
10428
|
//#endregion
|
|
10429
|
+
//#region ../../libs/sdk/src/namespaces/diary-transfers.ts
|
|
10430
|
+
function createDiaryTransfersNamespace(context) {
|
|
10431
|
+
const { client, auth } = context;
|
|
10432
|
+
return {
|
|
10433
|
+
async initiate(diaryId, body) {
|
|
10434
|
+
return unwrapResult(await initiateTransfer({
|
|
10435
|
+
client,
|
|
10436
|
+
auth,
|
|
10437
|
+
path: { id: diaryId },
|
|
10438
|
+
body
|
|
10439
|
+
}));
|
|
10440
|
+
},
|
|
10441
|
+
async listPending() {
|
|
10442
|
+
return unwrapResult(await listPendingTransfers({
|
|
10443
|
+
client,
|
|
10444
|
+
auth
|
|
10445
|
+
}));
|
|
10446
|
+
},
|
|
10447
|
+
async accept(transferId) {
|
|
10448
|
+
return unwrapResult(await acceptTransfer({
|
|
10449
|
+
client,
|
|
10450
|
+
auth,
|
|
10451
|
+
path: { transferId }
|
|
10452
|
+
}));
|
|
10453
|
+
},
|
|
10454
|
+
async reject(transferId) {
|
|
10455
|
+
return unwrapResult(await rejectTransfer({
|
|
10456
|
+
client,
|
|
10457
|
+
auth,
|
|
10458
|
+
path: { transferId }
|
|
10459
|
+
}));
|
|
10460
|
+
}
|
|
10461
|
+
};
|
|
10462
|
+
}
|
|
10463
|
+
//#endregion
|
|
10337
10464
|
//#region ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js
|
|
10338
10465
|
/** Checks if something is Uint8Array. Be careful: nodejs Buffer will return true. */
|
|
10339
10466
|
function isBytes$1(a) {
|
|
@@ -11873,6 +12000,7 @@ function createAgent(options) {
|
|
|
11873
12000
|
return {
|
|
11874
12001
|
diaries: createDiariesNamespace(context),
|
|
11875
12002
|
diaryGrants: createDiaryGrantsNamespace(context),
|
|
12003
|
+
diaryTransfers: createDiaryTransfersNamespace(context),
|
|
11876
12004
|
packs: createPacksNamespace(context),
|
|
11877
12005
|
entries: createEntriesNamespace(context),
|
|
11878
12006
|
agents: createAgentsNamespace(context),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@themoltnet/agent-daemon",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.4",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "MoltNet agent daemon — claims and executes tasks (fulfill_brief, assess_brief) from the MoltNet task-service via Pi-headless. CLI: moltnet-agent.",
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"@opentelemetry/semantic-conventions": "^1.39.0",
|
|
34
34
|
"pino": "^10.3.1",
|
|
35
35
|
"pino-pretty": "^13.1.3",
|
|
36
|
-
"@themoltnet/agent-runtime": "0.18.
|
|
37
|
-
"@themoltnet/pi-extension": "0.19.
|
|
38
|
-
"@themoltnet/sdk": "0.
|
|
36
|
+
"@themoltnet/agent-runtime": "0.18.3",
|
|
37
|
+
"@themoltnet/pi-extension": "0.19.4",
|
|
38
|
+
"@themoltnet/sdk": "0.105.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"tsx": "^4.7.0",
|
|
42
42
|
"typescript": "^5.3.3",
|
|
43
43
|
"vite": "^8.0.0",
|
|
44
44
|
"vitest": "^3.0.0",
|
|
45
|
-
"@moltnet/bootstrap": "0.1.0",
|
|
46
45
|
"@moltnet/crypto-service": "0.1.0",
|
|
46
|
+
"@moltnet/bootstrap": "0.1.0",
|
|
47
47
|
"@moltnet/database": "0.1.0",
|
|
48
48
|
"@moltnet/tasks": "0.1.0"
|
|
49
49
|
},
|