@themoltnet/pi-extension 0.19.2 → 0.19.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/index.js +165 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -850,6 +850,98 @@ var createDiaryGrant = (options) => (options.client ?? client).post({
|
|
|
850
850
|
}
|
|
851
851
|
});
|
|
852
852
|
/**
|
|
853
|
+
* Initiate a diary transfer to another team. Requires diary manage permission.
|
|
854
|
+
*/
|
|
855
|
+
var initiateTransfer = (options) => (options.client ?? client).post({
|
|
856
|
+
security: [
|
|
857
|
+
{
|
|
858
|
+
scheme: "bearer",
|
|
859
|
+
type: "http"
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
name: "X-Moltnet-Session-Token",
|
|
863
|
+
type: "apiKey"
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
in: "cookie",
|
|
867
|
+
name: "ory_kratos_session",
|
|
868
|
+
type: "apiKey"
|
|
869
|
+
}
|
|
870
|
+
],
|
|
871
|
+
url: "/diaries/{id}/transfer",
|
|
872
|
+
...options,
|
|
873
|
+
headers: {
|
|
874
|
+
"Content-Type": "application/json",
|
|
875
|
+
...options.headers
|
|
876
|
+
}
|
|
877
|
+
});
|
|
878
|
+
/**
|
|
879
|
+
* List pending transfers where the caller is destination team owner.
|
|
880
|
+
*/
|
|
881
|
+
var listPendingTransfers = (options) => (options?.client ?? client).get({
|
|
882
|
+
security: [
|
|
883
|
+
{
|
|
884
|
+
scheme: "bearer",
|
|
885
|
+
type: "http"
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
name: "X-Moltnet-Session-Token",
|
|
889
|
+
type: "apiKey"
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
in: "cookie",
|
|
893
|
+
name: "ory_kratos_session",
|
|
894
|
+
type: "apiKey"
|
|
895
|
+
}
|
|
896
|
+
],
|
|
897
|
+
url: "/transfers",
|
|
898
|
+
...options
|
|
899
|
+
});
|
|
900
|
+
/**
|
|
901
|
+
* Accept a pending diary transfer. Caller must be destination team owner.
|
|
902
|
+
*/
|
|
903
|
+
var acceptTransfer = (options) => (options.client ?? client).post({
|
|
904
|
+
security: [
|
|
905
|
+
{
|
|
906
|
+
scheme: "bearer",
|
|
907
|
+
type: "http"
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
name: "X-Moltnet-Session-Token",
|
|
911
|
+
type: "apiKey"
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
in: "cookie",
|
|
915
|
+
name: "ory_kratos_session",
|
|
916
|
+
type: "apiKey"
|
|
917
|
+
}
|
|
918
|
+
],
|
|
919
|
+
url: "/transfers/{transferId}/accept",
|
|
920
|
+
...options
|
|
921
|
+
});
|
|
922
|
+
/**
|
|
923
|
+
* Reject a pending diary transfer.
|
|
924
|
+
*/
|
|
925
|
+
var rejectTransfer = (options) => (options.client ?? client).post({
|
|
926
|
+
security: [
|
|
927
|
+
{
|
|
928
|
+
scheme: "bearer",
|
|
929
|
+
type: "http"
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
name: "X-Moltnet-Session-Token",
|
|
933
|
+
type: "apiKey"
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
in: "cookie",
|
|
937
|
+
name: "ory_kratos_session",
|
|
938
|
+
type: "apiKey"
|
|
939
|
+
}
|
|
940
|
+
],
|
|
941
|
+
url: "/transfers/{transferId}/reject",
|
|
942
|
+
...options
|
|
943
|
+
});
|
|
944
|
+
/**
|
|
853
945
|
* List diary entries for a specific diary.
|
|
854
946
|
*/
|
|
855
947
|
var listDiaryEntries = (options) => (options.client ?? client).get({
|
|
@@ -1797,6 +1889,32 @@ var removeTeamMember = (options) => (options.client ?? client).delete({
|
|
|
1797
1889
|
...options
|
|
1798
1890
|
});
|
|
1799
1891
|
/**
|
|
1892
|
+
* Update a member role between member and manager. Requires manage_members permission.
|
|
1893
|
+
*/
|
|
1894
|
+
var updateTeamMemberRole = (options) => (options.client ?? client).patch({
|
|
1895
|
+
security: [
|
|
1896
|
+
{
|
|
1897
|
+
scheme: "bearer",
|
|
1898
|
+
type: "http"
|
|
1899
|
+
},
|
|
1900
|
+
{
|
|
1901
|
+
name: "X-Moltnet-Session-Token",
|
|
1902
|
+
type: "apiKey"
|
|
1903
|
+
},
|
|
1904
|
+
{
|
|
1905
|
+
in: "cookie",
|
|
1906
|
+
name: "ory_kratos_session",
|
|
1907
|
+
type: "apiKey"
|
|
1908
|
+
}
|
|
1909
|
+
],
|
|
1910
|
+
url: "/teams/{id}/members/{subjectId}",
|
|
1911
|
+
...options,
|
|
1912
|
+
headers: {
|
|
1913
|
+
"Content-Type": "application/json",
|
|
1914
|
+
...options.headers
|
|
1915
|
+
}
|
|
1916
|
+
});
|
|
1917
|
+
/**
|
|
1800
1918
|
* List invite codes. Requires manage_members permission.
|
|
1801
1919
|
*/
|
|
1802
1920
|
var listTeamInvites = (options) => (options.client ?? client).get({
|
|
@@ -2622,6 +2740,41 @@ function createDiaryGrantsNamespace(context) {
|
|
|
2622
2740
|
};
|
|
2623
2741
|
}
|
|
2624
2742
|
//#endregion
|
|
2743
|
+
//#region ../sdk/src/namespaces/diary-transfers.ts
|
|
2744
|
+
function createDiaryTransfersNamespace(context) {
|
|
2745
|
+
const { client, auth } = context;
|
|
2746
|
+
return {
|
|
2747
|
+
async initiate(diaryId, body) {
|
|
2748
|
+
return unwrapResult(await initiateTransfer({
|
|
2749
|
+
client,
|
|
2750
|
+
auth,
|
|
2751
|
+
path: { id: diaryId },
|
|
2752
|
+
body
|
|
2753
|
+
}));
|
|
2754
|
+
},
|
|
2755
|
+
async listPending() {
|
|
2756
|
+
return unwrapResult(await listPendingTransfers({
|
|
2757
|
+
client,
|
|
2758
|
+
auth
|
|
2759
|
+
}));
|
|
2760
|
+
},
|
|
2761
|
+
async accept(transferId) {
|
|
2762
|
+
return unwrapResult(await acceptTransfer({
|
|
2763
|
+
client,
|
|
2764
|
+
auth,
|
|
2765
|
+
path: { transferId }
|
|
2766
|
+
}));
|
|
2767
|
+
},
|
|
2768
|
+
async reject(transferId) {
|
|
2769
|
+
return unwrapResult(await rejectTransfer({
|
|
2770
|
+
client,
|
|
2771
|
+
auth,
|
|
2772
|
+
path: { transferId }
|
|
2773
|
+
}));
|
|
2774
|
+
}
|
|
2775
|
+
};
|
|
2776
|
+
}
|
|
2777
|
+
//#endregion
|
|
2625
2778
|
//#region ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js
|
|
2626
2779
|
/** Checks if something is Uint8Array. Be careful: nodejs Buffer will return true. */
|
|
2627
2780
|
function isBytes$1(a) {
|
|
@@ -4861,6 +5014,17 @@ function createTeamsNamespace(context) {
|
|
|
4861
5014
|
}
|
|
4862
5015
|
}));
|
|
4863
5016
|
},
|
|
5017
|
+
async updateMemberRole(teamId, subjectId, role) {
|
|
5018
|
+
return unwrapResult(await updateTeamMemberRole({
|
|
5019
|
+
client,
|
|
5020
|
+
auth,
|
|
5021
|
+
path: {
|
|
5022
|
+
id: teamId,
|
|
5023
|
+
subjectId
|
|
5024
|
+
},
|
|
5025
|
+
body: { role }
|
|
5026
|
+
}));
|
|
5027
|
+
},
|
|
4864
5028
|
invites: {
|
|
4865
5029
|
async create(teamId, body) {
|
|
4866
5030
|
return unwrapResult(await createTeamInvite({
|
|
@@ -4926,6 +5090,7 @@ function createAgent(options) {
|
|
|
4926
5090
|
return {
|
|
4927
5091
|
diaries: createDiariesNamespace(context),
|
|
4928
5092
|
diaryGrants: createDiaryGrantsNamespace(context),
|
|
5093
|
+
diaryTransfers: createDiaryTransfersNamespace(context),
|
|
4929
5094
|
packs: createPacksNamespace(context),
|
|
4930
5095
|
entries: createEntriesNamespace(context),
|
|
4931
5096
|
agents: createAgentsNamespace(context),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@themoltnet/pi-extension",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "MoltNet pi extension — sandboxed tool execution in Gondolin VMs with MoltNet identity and persistent memory",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"@earendil-works/gondolin": "^0.9.1",
|
|
32
32
|
"@opentelemetry/api": "^1.9.0",
|
|
33
33
|
"@sinclair/typebox": "^0.34.0",
|
|
34
|
-
"@themoltnet/
|
|
35
|
-
"@themoltnet/
|
|
34
|
+
"@themoltnet/agent-runtime": "0.18.3",
|
|
35
|
+
"@themoltnet/sdk": "0.105.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@earendil-works/pi-coding-agent": ">=0.74.0",
|