@themoltnet/pi-extension 0.19.3 → 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 +128 -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({
|
|
@@ -2648,6 +2740,41 @@ function createDiaryGrantsNamespace(context) {
|
|
|
2648
2740
|
};
|
|
2649
2741
|
}
|
|
2650
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
|
|
2651
2778
|
//#region ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/utils.js
|
|
2652
2779
|
/** Checks if something is Uint8Array. Be careful: nodejs Buffer will return true. */
|
|
2653
2780
|
function isBytes$1(a) {
|
|
@@ -4963,6 +5090,7 @@ function createAgent(options) {
|
|
|
4963
5090
|
return {
|
|
4964
5091
|
diaries: createDiariesNamespace(context),
|
|
4965
5092
|
diaryGrants: createDiaryGrantsNamespace(context),
|
|
5093
|
+
diaryTransfers: createDiaryTransfersNamespace(context),
|
|
4966
5094
|
packs: createPacksNamespace(context),
|
|
4967
5095
|
entries: createEntriesNamespace(context),
|
|
4968
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/agent-runtime": "0.18.
|
|
35
|
-
"@themoltnet/sdk": "0.
|
|
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",
|