@themoltnet/agent-daemon 0.10.2 → 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 +165 -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({
|
|
@@ -9483,6 +9575,32 @@ var removeTeamMember = (options) => (options.client ?? client).delete({
|
|
|
9483
9575
|
...options
|
|
9484
9576
|
});
|
|
9485
9577
|
/**
|
|
9578
|
+
* Update a member role between member and manager. Requires manage_members permission.
|
|
9579
|
+
*/
|
|
9580
|
+
var updateTeamMemberRole = (options) => (options.client ?? client).patch({
|
|
9581
|
+
security: [
|
|
9582
|
+
{
|
|
9583
|
+
scheme: "bearer",
|
|
9584
|
+
type: "http"
|
|
9585
|
+
},
|
|
9586
|
+
{
|
|
9587
|
+
name: "X-Moltnet-Session-Token",
|
|
9588
|
+
type: "apiKey"
|
|
9589
|
+
},
|
|
9590
|
+
{
|
|
9591
|
+
in: "cookie",
|
|
9592
|
+
name: "ory_kratos_session",
|
|
9593
|
+
type: "apiKey"
|
|
9594
|
+
}
|
|
9595
|
+
],
|
|
9596
|
+
url: "/teams/{id}/members/{subjectId}",
|
|
9597
|
+
...options,
|
|
9598
|
+
headers: {
|
|
9599
|
+
"Content-Type": "application/json",
|
|
9600
|
+
...options.headers
|
|
9601
|
+
}
|
|
9602
|
+
});
|
|
9603
|
+
/**
|
|
9486
9604
|
* List invite codes. Requires manage_members permission.
|
|
9487
9605
|
*/
|
|
9488
9606
|
var listTeamInvites = (options) => (options.client ?? client).get({
|
|
@@ -10308,6 +10426,41 @@ function createDiaryGrantsNamespace(context) {
|
|
|
10308
10426
|
};
|
|
10309
10427
|
}
|
|
10310
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
|
|
10311
10464
|
//#region ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js
|
|
10312
10465
|
/** Checks if something is Uint8Array. Be careful: nodejs Buffer will return true. */
|
|
10313
10466
|
function isBytes$1(a) {
|
|
@@ -11771,6 +11924,17 @@ function createTeamsNamespace(context) {
|
|
|
11771
11924
|
}
|
|
11772
11925
|
}));
|
|
11773
11926
|
},
|
|
11927
|
+
async updateMemberRole(teamId, subjectId, role) {
|
|
11928
|
+
return unwrapResult(await updateTeamMemberRole({
|
|
11929
|
+
client,
|
|
11930
|
+
auth,
|
|
11931
|
+
path: {
|
|
11932
|
+
id: teamId,
|
|
11933
|
+
subjectId
|
|
11934
|
+
},
|
|
11935
|
+
body: { role }
|
|
11936
|
+
}));
|
|
11937
|
+
},
|
|
11774
11938
|
invites: {
|
|
11775
11939
|
async create(teamId, body) {
|
|
11776
11940
|
return unwrapResult(await createTeamInvite({
|
|
@@ -11836,6 +12000,7 @@ function createAgent(options) {
|
|
|
11836
12000
|
return {
|
|
11837
12001
|
diaries: createDiariesNamespace(context),
|
|
11838
12002
|
diaryGrants: createDiaryGrantsNamespace(context),
|
|
12003
|
+
diaryTransfers: createDiaryTransfersNamespace(context),
|
|
11839
12004
|
packs: createPacksNamespace(context),
|
|
11840
12005
|
entries: createEntriesNamespace(context),
|
|
11841
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,18 +33,18 @@
|
|
|
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/crypto-service": "0.1.0",
|
|
45
46
|
"@moltnet/bootstrap": "0.1.0",
|
|
46
47
|
"@moltnet/database": "0.1.0",
|
|
47
|
-
"@moltnet/crypto-service": "0.1.0",
|
|
48
48
|
"@moltnet/tasks": "0.1.0"
|
|
49
49
|
},
|
|
50
50
|
"nx": {
|